19f62ea84SAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
39f62ea84SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
49f62ea84SAndrew Rist * or more contributor license agreements. See the NOTICE file
59f62ea84SAndrew Rist * distributed with this work for additional information
69f62ea84SAndrew Rist * regarding copyright ownership. The ASF licenses this file
79f62ea84SAndrew Rist * to you under the Apache License, Version 2.0 (the
89f62ea84SAndrew Rist * "License"); you may not use this file except in compliance
99f62ea84SAndrew Rist * with the License. You may obtain a copy of the License at
10cdf0e10cSrcweir *
119f62ea84SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir *
139f62ea84SAndrew Rist * Unless required by applicable law or agreed to in writing,
149f62ea84SAndrew Rist * software distributed under the License is distributed on an
159f62ea84SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
169f62ea84SAndrew Rist * KIND, either express or implied. See the License for the
179f62ea84SAndrew Rist * specific language governing permissions and limitations
189f62ea84SAndrew Rist * under the License.
19cdf0e10cSrcweir *
209f62ea84SAndrew Rist *************************************************************/
219f62ea84SAndrew Rist
22cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
23cdf0e10cSrcweir #include "precompiled_vcl.hxx"
24cdf0e10cSrcweir
25cdf0e10cSrcweir #define ENABLE_BYTESTRING_STREAM_OPERATORS
26cdf0e10cSrcweir
27cdf0e10cSrcweir #include <algorithm>
28cdf0e10cSrcweir #include <string.h>
29cdf0e10cSrcweir #include <tools/stream.hxx>
30cdf0e10cSrcweir #include <tools/vcompat.hxx>
31cdf0e10cSrcweir #include <vcl/outdev.hxx>
32cdf0e10cSrcweir #include <vcl/salbtype.hxx>
33cdf0e10cSrcweir #include <vcl/metaact.hxx>
34cdf0e10cSrcweir #include <vcl/graphictools.hxx>
35ddde725dSArmin Le Grand #include <basegfx/matrix/b2dhommatrixtools.hxx>
3645fd3b9aSArmin Le Grand #include <vcl/dibtools.hxx>
37cdf0e10cSrcweir
38cdf0e10cSrcweir // ========================================================================
39cdf0e10cSrcweir
ImplScalePoint(Point & rPt,double fScaleX,double fScaleY)40cdf0e10cSrcweir inline void ImplScalePoint( Point& rPt, double fScaleX, double fScaleY )
41cdf0e10cSrcweir {
42cdf0e10cSrcweir rPt.X() = FRound( fScaleX * rPt.X() );
43cdf0e10cSrcweir rPt.Y() = FRound( fScaleY * rPt.Y() );
44cdf0e10cSrcweir }
45cdf0e10cSrcweir
46cdf0e10cSrcweir // ------------------------------------------------------------------------
47cdf0e10cSrcweir
ImplScaleRect(Rectangle & rRect,double fScaleX,double fScaleY)48cdf0e10cSrcweir inline void ImplScaleRect( Rectangle& rRect, double fScaleX, double fScaleY )
49cdf0e10cSrcweir {
50cdf0e10cSrcweir Point aTL( rRect.TopLeft() );
51cdf0e10cSrcweir Point aBR( rRect.BottomRight() );
52cdf0e10cSrcweir
53cdf0e10cSrcweir ImplScalePoint( aTL, fScaleX, fScaleY );
54cdf0e10cSrcweir ImplScalePoint( aBR, fScaleX, fScaleY );
55cdf0e10cSrcweir
56cdf0e10cSrcweir rRect = Rectangle( aTL, aBR );
57cdf0e10cSrcweir rRect.Justify();
58cdf0e10cSrcweir }
59cdf0e10cSrcweir
60cdf0e10cSrcweir // ------------------------------------------------------------------------
61cdf0e10cSrcweir
ImplScalePoly(Polygon & rPoly,double fScaleX,double fScaleY)62cdf0e10cSrcweir inline void ImplScalePoly( Polygon& rPoly, double fScaleX, double fScaleY )
63cdf0e10cSrcweir {
64cdf0e10cSrcweir for( sal_uInt16 i = 0, nCount = rPoly.GetSize(); i < nCount; i++ )
65cdf0e10cSrcweir ImplScalePoint( rPoly[ i ], fScaleX, fScaleY );
66cdf0e10cSrcweir }
67cdf0e10cSrcweir
68cdf0e10cSrcweir // ------------------------------------------------------------------------
69cdf0e10cSrcweir
ImplScaleLineInfo(LineInfo & rLineInfo,double fScaleX,double fScaleY)70cdf0e10cSrcweir inline void ImplScaleLineInfo( LineInfo& rLineInfo, double fScaleX, double fScaleY )
71cdf0e10cSrcweir {
72cdf0e10cSrcweir if( !rLineInfo.IsDefault() )
73cdf0e10cSrcweir {
74cdf0e10cSrcweir const double fScale = ( fabs(fScaleX) + fabs(fScaleY) ) * 0.5;
75cdf0e10cSrcweir
76cdf0e10cSrcweir rLineInfo.SetWidth( FRound( fScale * rLineInfo.GetWidth() ) );
77cdf0e10cSrcweir rLineInfo.SetDashLen( FRound( fScale * rLineInfo.GetDashLen() ) );
78cdf0e10cSrcweir rLineInfo.SetDotLen( FRound( fScale * rLineInfo.GetDotLen() ) );
79cdf0e10cSrcweir rLineInfo.SetDistance( FRound( fScale * rLineInfo.GetDistance() ) );
80cdf0e10cSrcweir }
81cdf0e10cSrcweir }
82cdf0e10cSrcweir
83cdf0e10cSrcweir // ========================================================================
84cdf0e10cSrcweir
85cdf0e10cSrcweir #define COMPAT( _def_rIStm ) VersionCompat aCompat( ( _def_rIStm ), STREAM_READ );
86cdf0e10cSrcweir #define COMPAT_VERSION() aCompat.GetVersion()
87cdf0e10cSrcweir #define WRITE_BASE_COMPAT( _def_rOStm, _def_nVer, _pWriteData ) \
88cdf0e10cSrcweir MetaAction::Write( ( _def_rOStm ), _pWriteData ); \
89cdf0e10cSrcweir VersionCompat aCompat( ( _def_rOStm ), STREAM_WRITE, ( _def_nVer ) );
90cdf0e10cSrcweir
91cdf0e10cSrcweir // ========================================================================
92cdf0e10cSrcweir
MetaAction()93cdf0e10cSrcweir MetaAction::MetaAction() :
94cdf0e10cSrcweir mnRefCount( 1 ),
95cdf0e10cSrcweir mnType( META_NULL_ACTION )
96cdf0e10cSrcweir {
97cdf0e10cSrcweir }
98cdf0e10cSrcweir
99cdf0e10cSrcweir // ------------------------------------------------------------------------
100cdf0e10cSrcweir
MetaAction(sal_uInt16 nType)101cdf0e10cSrcweir MetaAction::MetaAction( sal_uInt16 nType ) :
102cdf0e10cSrcweir mnRefCount( 1 ),
103cdf0e10cSrcweir mnType( nType )
104cdf0e10cSrcweir {
105cdf0e10cSrcweir }
106cdf0e10cSrcweir
107cdf0e10cSrcweir // ------------------------------------------------------------------------
108cdf0e10cSrcweir
~MetaAction()109cdf0e10cSrcweir MetaAction::~MetaAction()
110cdf0e10cSrcweir {
111cdf0e10cSrcweir }
112cdf0e10cSrcweir
113cdf0e10cSrcweir // ------------------------------------------------------------------------
114cdf0e10cSrcweir
Execute(OutputDevice *)115cdf0e10cSrcweir void MetaAction::Execute( OutputDevice* )
116cdf0e10cSrcweir {
117cdf0e10cSrcweir }
118cdf0e10cSrcweir
119cdf0e10cSrcweir // ------------------------------------------------------------------------
120cdf0e10cSrcweir
Clone()121cdf0e10cSrcweir MetaAction* MetaAction::Clone()
122cdf0e10cSrcweir {
123cdf0e10cSrcweir return new MetaAction;
124cdf0e10cSrcweir }
125cdf0e10cSrcweir
126cdf0e10cSrcweir // ------------------------------------------------------------------------
127cdf0e10cSrcweir
Move(long,long)128cdf0e10cSrcweir void MetaAction::Move( long, long )
129cdf0e10cSrcweir {
130cdf0e10cSrcweir }
131cdf0e10cSrcweir
132cdf0e10cSrcweir // ------------------------------------------------------------------------
133cdf0e10cSrcweir
Scale(double,double)134cdf0e10cSrcweir void MetaAction::Scale( double, double )
135cdf0e10cSrcweir {
136cdf0e10cSrcweir }
137cdf0e10cSrcweir
138cdf0e10cSrcweir // ------------------------------------------------------------------------
139cdf0e10cSrcweir
Compare(const MetaAction &) const140cdf0e10cSrcweir sal_Bool MetaAction::Compare( const MetaAction& ) const
141cdf0e10cSrcweir {
142cdf0e10cSrcweir return sal_True;
143cdf0e10cSrcweir }
144cdf0e10cSrcweir
145cdf0e10cSrcweir // ------------------------------------------------------------------------
146cdf0e10cSrcweir
IsEqual(const MetaAction & rMetaAction) const147cdf0e10cSrcweir sal_Bool MetaAction::IsEqual( const MetaAction& rMetaAction ) const
148cdf0e10cSrcweir {
149cdf0e10cSrcweir if ( mnType != rMetaAction.mnType )
150cdf0e10cSrcweir return sal_False;
151cdf0e10cSrcweir else
152cdf0e10cSrcweir return Compare( rMetaAction );
153cdf0e10cSrcweir }
154cdf0e10cSrcweir
155cdf0e10cSrcweir // ------------------------------------------------------------------------
156cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData *)157cdf0e10cSrcweir void MetaAction::Write( SvStream& rOStm, ImplMetaWriteData* )
158cdf0e10cSrcweir {
159cdf0e10cSrcweir rOStm << mnType;
160cdf0e10cSrcweir }
161cdf0e10cSrcweir
162cdf0e10cSrcweir // ------------------------------------------------------------------------
163cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)164cdf0e10cSrcweir void MetaAction::Read( SvStream& rIStm, ImplMetaReadData* )
165cdf0e10cSrcweir {
166cdf0e10cSrcweir rIStm >> mnType;
167cdf0e10cSrcweir }
168cdf0e10cSrcweir
169cdf0e10cSrcweir // ------------------------------------------------------------------------
170cdf0e10cSrcweir
ReadMetaAction(SvStream & rIStm,ImplMetaReadData * pData)171cdf0e10cSrcweir MetaAction* MetaAction::ReadMetaAction( SvStream& rIStm, ImplMetaReadData* pData )
172cdf0e10cSrcweir {
173cdf0e10cSrcweir MetaAction* pAction = NULL;
174cdf0e10cSrcweir sal_uInt16 nType;
175cdf0e10cSrcweir
176cdf0e10cSrcweir rIStm >> nType;
177cdf0e10cSrcweir
178cdf0e10cSrcweir switch( nType )
179cdf0e10cSrcweir {
180cdf0e10cSrcweir case( META_NULL_ACTION ): pAction = new MetaAction; break;
181cdf0e10cSrcweir case( META_PIXEL_ACTION ): pAction = new MetaPixelAction; break;
182cdf0e10cSrcweir case( META_POINT_ACTION ): pAction = new MetaPointAction; break;
183cdf0e10cSrcweir case( META_LINE_ACTION ): pAction = new MetaLineAction; break;
184cdf0e10cSrcweir case( META_RECT_ACTION ): pAction = new MetaRectAction; break;
185cdf0e10cSrcweir case( META_ROUNDRECT_ACTION ): pAction = new MetaRoundRectAction; break;
186cdf0e10cSrcweir case( META_ELLIPSE_ACTION ): pAction = new MetaEllipseAction; break;
187cdf0e10cSrcweir case( META_ARC_ACTION ): pAction = new MetaArcAction; break;
188cdf0e10cSrcweir case( META_PIE_ACTION ): pAction = new MetaPieAction; break;
189cdf0e10cSrcweir case( META_CHORD_ACTION ): pAction = new MetaChordAction; break;
190cdf0e10cSrcweir case( META_POLYLINE_ACTION ): pAction = new MetaPolyLineAction; break;
191cdf0e10cSrcweir case( META_POLYGON_ACTION ): pAction = new MetaPolygonAction; break;
192cdf0e10cSrcweir case( META_POLYPOLYGON_ACTION ): pAction = new MetaPolyPolygonAction; break;
193cdf0e10cSrcweir case( META_TEXT_ACTION ): pAction = new MetaTextAction; break;
194cdf0e10cSrcweir case( META_TEXTARRAY_ACTION ): pAction = new MetaTextArrayAction; break;
195cdf0e10cSrcweir case( META_STRETCHTEXT_ACTION ): pAction = new MetaStretchTextAction; break;
196cdf0e10cSrcweir case( META_TEXTRECT_ACTION ): pAction = new MetaTextRectAction; break;
197cdf0e10cSrcweir case( META_TEXTLINE_ACTION ): pAction = new MetaTextLineAction; break;
198cdf0e10cSrcweir case( META_BMP_ACTION ): pAction = new MetaBmpAction; break;
199cdf0e10cSrcweir case( META_BMPSCALE_ACTION ): pAction = new MetaBmpScaleAction; break;
200cdf0e10cSrcweir case( META_BMPSCALEPART_ACTION ): pAction = new MetaBmpScalePartAction; break;
201cdf0e10cSrcweir case( META_BMPEX_ACTION ): pAction = new MetaBmpExAction; break;
202cdf0e10cSrcweir case( META_BMPEXSCALE_ACTION ): pAction = new MetaBmpExScaleAction; break;
203cdf0e10cSrcweir case( META_BMPEXSCALEPART_ACTION ): pAction = new MetaBmpExScalePartAction; break;
204cdf0e10cSrcweir case( META_MASK_ACTION ): pAction = new MetaMaskAction; break;
205cdf0e10cSrcweir case( META_MASKSCALE_ACTION ): pAction = new MetaMaskScaleAction; break;
206cdf0e10cSrcweir case( META_MASKSCALEPART_ACTION ): pAction = new MetaMaskScalePartAction; break;
207cdf0e10cSrcweir case( META_GRADIENT_ACTION ): pAction = new MetaGradientAction; break;
208cdf0e10cSrcweir case( META_GRADIENTEX_ACTION ): pAction = new MetaGradientExAction; break;
209cdf0e10cSrcweir case( META_HATCH_ACTION ): pAction = new MetaHatchAction; break;
210cdf0e10cSrcweir case( META_WALLPAPER_ACTION ): pAction = new MetaWallpaperAction; break;
211cdf0e10cSrcweir case( META_CLIPREGION_ACTION ): pAction = new MetaClipRegionAction; break;
212cdf0e10cSrcweir case( META_ISECTRECTCLIPREGION_ACTION ): pAction = new MetaISectRectClipRegionAction; break;
213cdf0e10cSrcweir case( META_ISECTREGIONCLIPREGION_ACTION ): pAction = new MetaISectRegionClipRegionAction; break;
214cdf0e10cSrcweir case( META_MOVECLIPREGION_ACTION ): pAction = new MetaMoveClipRegionAction; break;
215cdf0e10cSrcweir case( META_LINECOLOR_ACTION ): pAction = new MetaLineColorAction; break;
216cdf0e10cSrcweir case( META_FILLCOLOR_ACTION ): pAction = new MetaFillColorAction; break;
217cdf0e10cSrcweir case( META_TEXTCOLOR_ACTION ): pAction = new MetaTextColorAction; break;
218cdf0e10cSrcweir case( META_TEXTFILLCOLOR_ACTION ): pAction = new MetaTextFillColorAction; break;
219cdf0e10cSrcweir case( META_TEXTLINECOLOR_ACTION ): pAction = new MetaTextLineColorAction; break;
220cdf0e10cSrcweir case( META_OVERLINECOLOR_ACTION ): pAction = new MetaOverlineColorAction; break;
221cdf0e10cSrcweir case( META_TEXTALIGN_ACTION ): pAction = new MetaTextAlignAction; break;
222cdf0e10cSrcweir case( META_MAPMODE_ACTION ): pAction = new MetaMapModeAction; break;
223cdf0e10cSrcweir case( META_FONT_ACTION ): pAction = new MetaFontAction; break;
224cdf0e10cSrcweir case( META_PUSH_ACTION ): pAction = new MetaPushAction; break;
225cdf0e10cSrcweir case( META_POP_ACTION ): pAction = new MetaPopAction; break;
226cdf0e10cSrcweir case( META_RASTEROP_ACTION ): pAction = new MetaRasterOpAction; break;
227cdf0e10cSrcweir case( META_TRANSPARENT_ACTION ): pAction = new MetaTransparentAction; break;
228cdf0e10cSrcweir case( META_FLOATTRANSPARENT_ACTION ): pAction = new MetaFloatTransparentAction; break;
229cdf0e10cSrcweir case( META_EPS_ACTION ): pAction = new MetaEPSAction; break;
230cdf0e10cSrcweir case( META_REFPOINT_ACTION ): pAction = new MetaRefPointAction; break;
231cdf0e10cSrcweir case( META_COMMENT_ACTION ): pAction = new MetaCommentAction; break;
232cdf0e10cSrcweir case( META_LAYOUTMODE_ACTION ): pAction = new MetaLayoutModeAction; break;
233cdf0e10cSrcweir case( META_TEXTLANGUAGE_ACTION ): pAction = new MetaTextLanguageAction; break;
234cdf0e10cSrcweir
235cdf0e10cSrcweir default:
236cdf0e10cSrcweir {
237cdf0e10cSrcweir // Action ueberlesen durch Kombination Ctor/Dtor,
238cdf0e10cSrcweir // new/delete, weil Compiler sonst vielleicht wegoptimieren
239cdf0e10cSrcweir delete ( new VersionCompat( rIStm, STREAM_READ ) );
240cdf0e10cSrcweir }
241cdf0e10cSrcweir break;
242cdf0e10cSrcweir }
243cdf0e10cSrcweir
244cdf0e10cSrcweir if( pAction )
245cdf0e10cSrcweir pAction->Read( rIStm, pData );
246cdf0e10cSrcweir
247cdf0e10cSrcweir return pAction;
248cdf0e10cSrcweir }
249cdf0e10cSrcweir
250cdf0e10cSrcweir // ========================================================================
251cdf0e10cSrcweir
IMPL_META_ACTION(Pixel,META_PIXEL_ACTION)252cdf0e10cSrcweir IMPL_META_ACTION( Pixel, META_PIXEL_ACTION )
253cdf0e10cSrcweir
254cdf0e10cSrcweir // ------------------------------------------------------------------------
255cdf0e10cSrcweir
256cdf0e10cSrcweir MetaPixelAction::MetaPixelAction( const Point& rPt, const Color& rColor ) :
257cdf0e10cSrcweir MetaAction ( META_PIXEL_ACTION ),
258cdf0e10cSrcweir maPt ( rPt ),
259cdf0e10cSrcweir maColor ( rColor )
260cdf0e10cSrcweir {
261cdf0e10cSrcweir }
262cdf0e10cSrcweir
263cdf0e10cSrcweir // ------------------------------------------------------------------------
264cdf0e10cSrcweir
Execute(OutputDevice * pOut)265cdf0e10cSrcweir void MetaPixelAction::Execute( OutputDevice* pOut )
266cdf0e10cSrcweir {
267cdf0e10cSrcweir pOut->DrawPixel( maPt, maColor );
268cdf0e10cSrcweir }
269cdf0e10cSrcweir
270cdf0e10cSrcweir // ------------------------------------------------------------------------
271cdf0e10cSrcweir
Clone()272cdf0e10cSrcweir MetaAction* MetaPixelAction::Clone()
273cdf0e10cSrcweir {
274cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaPixelAction( *this );
275cdf0e10cSrcweir pClone->ResetRefCount();
276cdf0e10cSrcweir return pClone;
277cdf0e10cSrcweir }
278cdf0e10cSrcweir
279cdf0e10cSrcweir // ------------------------------------------------------------------------
280cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)281cdf0e10cSrcweir void MetaPixelAction::Move( long nHorzMove, long nVertMove )
282cdf0e10cSrcweir {
283cdf0e10cSrcweir maPt.Move( nHorzMove, nVertMove );
284cdf0e10cSrcweir }
285cdf0e10cSrcweir
286cdf0e10cSrcweir // ------------------------------------------------------------------------
287cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)288cdf0e10cSrcweir void MetaPixelAction::Scale( double fScaleX, double fScaleY )
289cdf0e10cSrcweir {
290cdf0e10cSrcweir ImplScalePoint( maPt, fScaleX, fScaleY );
291cdf0e10cSrcweir }
292cdf0e10cSrcweir
293cdf0e10cSrcweir // ------------------------------------------------------------------------
294cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const295cdf0e10cSrcweir sal_Bool MetaPixelAction::Compare( const MetaAction& rMetaAction ) const
296cdf0e10cSrcweir {
297cdf0e10cSrcweir return ( maPt == ((MetaPixelAction&)rMetaAction).maPt ) &&
298cdf0e10cSrcweir ( maColor == ((MetaPixelAction&)rMetaAction).maColor );
299cdf0e10cSrcweir }
300cdf0e10cSrcweir
301cdf0e10cSrcweir // ------------------------------------------------------------------------
302cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)303cdf0e10cSrcweir void MetaPixelAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
304cdf0e10cSrcweir {
305cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
306cdf0e10cSrcweir rOStm << maPt;
307cdf0e10cSrcweir maColor.Write( rOStm, sal_True );
308cdf0e10cSrcweir }
309cdf0e10cSrcweir
310cdf0e10cSrcweir // ------------------------------------------------------------------------
311cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)312cdf0e10cSrcweir void MetaPixelAction::Read( SvStream& rIStm, ImplMetaReadData* )
313cdf0e10cSrcweir {
314cdf0e10cSrcweir COMPAT( rIStm );
315cdf0e10cSrcweir rIStm >> maPt;
316cdf0e10cSrcweir maColor.Read( rIStm, sal_True );
317cdf0e10cSrcweir }
318cdf0e10cSrcweir
319cdf0e10cSrcweir // ========================================================================
320cdf0e10cSrcweir
IMPL_META_ACTION(Point,META_POINT_ACTION)321cdf0e10cSrcweir IMPL_META_ACTION( Point, META_POINT_ACTION )
322cdf0e10cSrcweir
323cdf0e10cSrcweir // ------------------------------------------------------------------------
324cdf0e10cSrcweir
325cdf0e10cSrcweir MetaPointAction::MetaPointAction( const Point& rPt ) :
326cdf0e10cSrcweir MetaAction ( META_POINT_ACTION ),
327cdf0e10cSrcweir maPt ( rPt )
328cdf0e10cSrcweir {
329cdf0e10cSrcweir }
330cdf0e10cSrcweir
331cdf0e10cSrcweir // ------------------------------------------------------------------------
332cdf0e10cSrcweir
Execute(OutputDevice * pOut)333cdf0e10cSrcweir void MetaPointAction::Execute( OutputDevice* pOut )
334cdf0e10cSrcweir {
335cdf0e10cSrcweir pOut->DrawPixel( maPt );
336cdf0e10cSrcweir }
337cdf0e10cSrcweir
338cdf0e10cSrcweir // ------------------------------------------------------------------------
339cdf0e10cSrcweir
Clone()340cdf0e10cSrcweir MetaAction* MetaPointAction::Clone()
341cdf0e10cSrcweir {
342cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaPointAction( *this );
343cdf0e10cSrcweir pClone->ResetRefCount();
344cdf0e10cSrcweir return pClone;
345cdf0e10cSrcweir }
346cdf0e10cSrcweir
347cdf0e10cSrcweir // ------------------------------------------------------------------------
348cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)349cdf0e10cSrcweir void MetaPointAction::Move( long nHorzMove, long nVertMove )
350cdf0e10cSrcweir {
351cdf0e10cSrcweir maPt.Move( nHorzMove, nVertMove );
352cdf0e10cSrcweir }
353cdf0e10cSrcweir
354cdf0e10cSrcweir // ------------------------------------------------------------------------
355cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)356cdf0e10cSrcweir void MetaPointAction::Scale( double fScaleX, double fScaleY )
357cdf0e10cSrcweir {
358cdf0e10cSrcweir ImplScalePoint( maPt, fScaleX, fScaleY );
359cdf0e10cSrcweir }
360cdf0e10cSrcweir
361cdf0e10cSrcweir // ------------------------------------------------------------------------
362cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const363cdf0e10cSrcweir sal_Bool MetaPointAction::Compare( const MetaAction& rMetaAction ) const
364cdf0e10cSrcweir {
365cdf0e10cSrcweir return maPt == ((MetaPointAction&)rMetaAction).maPt;
366cdf0e10cSrcweir }
367cdf0e10cSrcweir
368cdf0e10cSrcweir // ------------------------------------------------------------------------
369cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)370cdf0e10cSrcweir void MetaPointAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
371cdf0e10cSrcweir {
372cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
373cdf0e10cSrcweir rOStm << maPt;
374cdf0e10cSrcweir }
375cdf0e10cSrcweir
376cdf0e10cSrcweir // ------------------------------------------------------------------------
377cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)378cdf0e10cSrcweir void MetaPointAction::Read( SvStream& rIStm, ImplMetaReadData* )
379cdf0e10cSrcweir {
380cdf0e10cSrcweir COMPAT( rIStm );
381cdf0e10cSrcweir rIStm >> maPt;
382cdf0e10cSrcweir }
383cdf0e10cSrcweir
384cdf0e10cSrcweir // ========================================================================
385cdf0e10cSrcweir
IMPL_META_ACTION(Line,META_LINE_ACTION)386cdf0e10cSrcweir IMPL_META_ACTION( Line, META_LINE_ACTION )
387cdf0e10cSrcweir
388cdf0e10cSrcweir // ------------------------------------------------------------------------
389cdf0e10cSrcweir
390cdf0e10cSrcweir MetaLineAction::MetaLineAction( const Point& rStart, const Point& rEnd ) :
391cdf0e10cSrcweir MetaAction ( META_LINE_ACTION ),
392cdf0e10cSrcweir maStartPt ( rStart ),
393cdf0e10cSrcweir maEndPt ( rEnd )
394cdf0e10cSrcweir {
395cdf0e10cSrcweir }
396cdf0e10cSrcweir
397cdf0e10cSrcweir // ------------------------------------------------------------------------
398cdf0e10cSrcweir
MetaLineAction(const Point & rStart,const Point & rEnd,const LineInfo & rLineInfo)399cdf0e10cSrcweir MetaLineAction::MetaLineAction( const Point& rStart, const Point& rEnd,
400cdf0e10cSrcweir const LineInfo& rLineInfo ) :
401cdf0e10cSrcweir MetaAction ( META_LINE_ACTION ),
402cdf0e10cSrcweir maLineInfo ( rLineInfo ),
403cdf0e10cSrcweir maStartPt ( rStart ),
404cdf0e10cSrcweir maEndPt ( rEnd )
405cdf0e10cSrcweir {
406cdf0e10cSrcweir }
407cdf0e10cSrcweir
408cdf0e10cSrcweir // ------------------------------------------------------------------------
409cdf0e10cSrcweir
Execute(OutputDevice * pOut)410cdf0e10cSrcweir void MetaLineAction::Execute( OutputDevice* pOut )
411cdf0e10cSrcweir {
412cdf0e10cSrcweir if( maLineInfo.IsDefault() )
413cdf0e10cSrcweir pOut->DrawLine( maStartPt, maEndPt );
414cdf0e10cSrcweir else
415cdf0e10cSrcweir pOut->DrawLine( maStartPt, maEndPt, maLineInfo );
416cdf0e10cSrcweir }
417cdf0e10cSrcweir
418cdf0e10cSrcweir // ------------------------------------------------------------------------
419cdf0e10cSrcweir
Clone()420cdf0e10cSrcweir MetaAction* MetaLineAction::Clone()
421cdf0e10cSrcweir {
422cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaLineAction( *this );
423cdf0e10cSrcweir pClone->ResetRefCount();
424cdf0e10cSrcweir return pClone;
425cdf0e10cSrcweir }
426cdf0e10cSrcweir
427cdf0e10cSrcweir // ------------------------------------------------------------------------
428cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)429cdf0e10cSrcweir void MetaLineAction::Move( long nHorzMove, long nVertMove )
430cdf0e10cSrcweir {
431cdf0e10cSrcweir maStartPt.Move( nHorzMove, nVertMove );
432cdf0e10cSrcweir maEndPt.Move( nHorzMove, nVertMove );
433cdf0e10cSrcweir }
434cdf0e10cSrcweir
435cdf0e10cSrcweir // ------------------------------------------------------------------------
436cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)437cdf0e10cSrcweir void MetaLineAction::Scale( double fScaleX, double fScaleY )
438cdf0e10cSrcweir {
439cdf0e10cSrcweir ImplScalePoint( maStartPt, fScaleX, fScaleY );
440cdf0e10cSrcweir ImplScalePoint( maEndPt, fScaleX, fScaleY );
441cdf0e10cSrcweir ImplScaleLineInfo( maLineInfo, fScaleX, fScaleY );
442cdf0e10cSrcweir }
443cdf0e10cSrcweir
444cdf0e10cSrcweir // ------------------------------------------------------------------------
445cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const446cdf0e10cSrcweir sal_Bool MetaLineAction::Compare( const MetaAction& rMetaAction ) const
447cdf0e10cSrcweir {
448cdf0e10cSrcweir return ( maLineInfo == ((MetaLineAction&)rMetaAction).maLineInfo ) &&
449cdf0e10cSrcweir ( maStartPt == ((MetaLineAction&)rMetaAction).maStartPt ) &&
450cdf0e10cSrcweir ( maEndPt == ((MetaLineAction&)rMetaAction).maEndPt );
451cdf0e10cSrcweir }
452cdf0e10cSrcweir
453cdf0e10cSrcweir // ------------------------------------------------------------------------
454cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)455cdf0e10cSrcweir void MetaLineAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
456cdf0e10cSrcweir {
457cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 2, pData );
458cdf0e10cSrcweir
459cdf0e10cSrcweir rOStm << maStartPt << maEndPt; // Version 1
460cdf0e10cSrcweir rOStm << maLineInfo; // Version 2
461cdf0e10cSrcweir }
462cdf0e10cSrcweir
463cdf0e10cSrcweir // ------------------------------------------------------------------------
464cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)465cdf0e10cSrcweir void MetaLineAction::Read( SvStream& rIStm, ImplMetaReadData* )
466cdf0e10cSrcweir {
467cdf0e10cSrcweir COMPAT( rIStm );
468cdf0e10cSrcweir
469cdf0e10cSrcweir // Version 1
470cdf0e10cSrcweir rIStm >> maStartPt >> maEndPt;
471cdf0e10cSrcweir
472cdf0e10cSrcweir // Version 2
473cdf0e10cSrcweir if( aCompat.GetVersion() >= 2 )
474cdf0e10cSrcweir {
475cdf0e10cSrcweir rIStm >> maLineInfo;
476cdf0e10cSrcweir }
477cdf0e10cSrcweir }
478cdf0e10cSrcweir
479cdf0e10cSrcweir // ========================================================================
480cdf0e10cSrcweir
IMPL_META_ACTION(Rect,META_RECT_ACTION)481cdf0e10cSrcweir IMPL_META_ACTION( Rect, META_RECT_ACTION )
482cdf0e10cSrcweir
483cdf0e10cSrcweir // ------------------------------------------------------------------------
484cdf0e10cSrcweir
485cdf0e10cSrcweir MetaRectAction::MetaRectAction( const Rectangle& rRect ) :
486cdf0e10cSrcweir MetaAction ( META_RECT_ACTION ),
487cdf0e10cSrcweir maRect ( rRect )
488cdf0e10cSrcweir {
489cdf0e10cSrcweir }
490cdf0e10cSrcweir
491cdf0e10cSrcweir // ------------------------------------------------------------------------
492cdf0e10cSrcweir
Execute(OutputDevice * pOut)493cdf0e10cSrcweir void MetaRectAction::Execute( OutputDevice* pOut )
494cdf0e10cSrcweir {
495cdf0e10cSrcweir pOut->DrawRect( maRect );
496cdf0e10cSrcweir }
497cdf0e10cSrcweir
498cdf0e10cSrcweir // ------------------------------------------------------------------------
499cdf0e10cSrcweir
Clone()500cdf0e10cSrcweir MetaAction* MetaRectAction::Clone()
501cdf0e10cSrcweir {
502cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaRectAction( *this );
503cdf0e10cSrcweir pClone->ResetRefCount();
504cdf0e10cSrcweir return pClone;
505cdf0e10cSrcweir }
506cdf0e10cSrcweir
507cdf0e10cSrcweir // ------------------------------------------------------------------------
508cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)509cdf0e10cSrcweir void MetaRectAction::Move( long nHorzMove, long nVertMove )
510cdf0e10cSrcweir {
511cdf0e10cSrcweir maRect.Move( nHorzMove, nVertMove );
512cdf0e10cSrcweir }
513cdf0e10cSrcweir
514cdf0e10cSrcweir // ------------------------------------------------------------------------
515cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)516cdf0e10cSrcweir void MetaRectAction::Scale( double fScaleX, double fScaleY )
517cdf0e10cSrcweir {
518cdf0e10cSrcweir ImplScaleRect( maRect, fScaleX, fScaleY );
519cdf0e10cSrcweir }
520cdf0e10cSrcweir
521cdf0e10cSrcweir // ------------------------------------------------------------------------
522cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const523cdf0e10cSrcweir sal_Bool MetaRectAction::Compare( const MetaAction& rMetaAction ) const
524cdf0e10cSrcweir {
525cdf0e10cSrcweir return maRect == ((MetaRectAction&)rMetaAction).maRect;
526cdf0e10cSrcweir }
527cdf0e10cSrcweir
528cdf0e10cSrcweir // ------------------------------------------------------------------------
529cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)530cdf0e10cSrcweir void MetaRectAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
531cdf0e10cSrcweir {
532cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
533cdf0e10cSrcweir rOStm << maRect;
534cdf0e10cSrcweir }
535cdf0e10cSrcweir
536cdf0e10cSrcweir // ------------------------------------------------------------------------
537cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)538cdf0e10cSrcweir void MetaRectAction::Read( SvStream& rIStm, ImplMetaReadData* )
539cdf0e10cSrcweir {
540cdf0e10cSrcweir COMPAT( rIStm );
541cdf0e10cSrcweir rIStm >> maRect;
542cdf0e10cSrcweir }
543cdf0e10cSrcweir
544cdf0e10cSrcweir // ========================================================================
545cdf0e10cSrcweir
IMPL_META_ACTION(RoundRect,META_ROUNDRECT_ACTION)546cdf0e10cSrcweir IMPL_META_ACTION( RoundRect, META_ROUNDRECT_ACTION )
547cdf0e10cSrcweir
548cdf0e10cSrcweir // ------------------------------------------------------------------------
549cdf0e10cSrcweir
550cdf0e10cSrcweir MetaRoundRectAction::MetaRoundRectAction( const Rectangle& rRect,
551cdf0e10cSrcweir sal_uInt32 nHorzRound, sal_uInt32 nVertRound ) :
552cdf0e10cSrcweir MetaAction ( META_ROUNDRECT_ACTION ),
553cdf0e10cSrcweir maRect ( rRect ),
554cdf0e10cSrcweir mnHorzRound ( nHorzRound ),
555cdf0e10cSrcweir mnVertRound ( nVertRound )
556cdf0e10cSrcweir {
557cdf0e10cSrcweir }
558cdf0e10cSrcweir
559cdf0e10cSrcweir // ------------------------------------------------------------------------
560cdf0e10cSrcweir
Execute(OutputDevice * pOut)561cdf0e10cSrcweir void MetaRoundRectAction::Execute( OutputDevice* pOut )
562cdf0e10cSrcweir {
563cdf0e10cSrcweir pOut->DrawRect( maRect, mnHorzRound, mnVertRound );
564cdf0e10cSrcweir }
565cdf0e10cSrcweir
566cdf0e10cSrcweir // ------------------------------------------------------------------------
567cdf0e10cSrcweir
Clone()568cdf0e10cSrcweir MetaAction* MetaRoundRectAction::Clone()
569cdf0e10cSrcweir {
570cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaRoundRectAction( *this );
571cdf0e10cSrcweir pClone->ResetRefCount();
572cdf0e10cSrcweir return pClone;
573cdf0e10cSrcweir }
574cdf0e10cSrcweir
575cdf0e10cSrcweir // ------------------------------------------------------------------------
576cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)577cdf0e10cSrcweir void MetaRoundRectAction::Move( long nHorzMove, long nVertMove )
578cdf0e10cSrcweir {
579cdf0e10cSrcweir maRect.Move( nHorzMove, nVertMove );
580cdf0e10cSrcweir }
581cdf0e10cSrcweir
582cdf0e10cSrcweir // ------------------------------------------------------------------------
583cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)584cdf0e10cSrcweir void MetaRoundRectAction::Scale( double fScaleX, double fScaleY )
585cdf0e10cSrcweir {
586cdf0e10cSrcweir ImplScaleRect( maRect, fScaleX, fScaleY );
587cdf0e10cSrcweir mnHorzRound = FRound( mnHorzRound * fabs(fScaleX) );
588cdf0e10cSrcweir mnVertRound = FRound( mnVertRound * fabs(fScaleY) );
589cdf0e10cSrcweir }
590cdf0e10cSrcweir
591cdf0e10cSrcweir // ------------------------------------------------------------------------
592cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const593cdf0e10cSrcweir sal_Bool MetaRoundRectAction::Compare( const MetaAction& rMetaAction ) const
594cdf0e10cSrcweir {
595cdf0e10cSrcweir return ( maRect == ((MetaRoundRectAction&)rMetaAction).maRect ) &&
596cdf0e10cSrcweir ( mnHorzRound == ((MetaRoundRectAction&)rMetaAction).mnHorzRound ) &&
597cdf0e10cSrcweir ( mnVertRound == ((MetaRoundRectAction&)rMetaAction).mnVertRound );
598cdf0e10cSrcweir }
599cdf0e10cSrcweir
600cdf0e10cSrcweir // ------------------------------------------------------------------------
601cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)602cdf0e10cSrcweir void MetaRoundRectAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
603cdf0e10cSrcweir {
604cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
605cdf0e10cSrcweir rOStm << maRect << mnHorzRound << mnVertRound;
606cdf0e10cSrcweir }
607cdf0e10cSrcweir
608cdf0e10cSrcweir // ------------------------------------------------------------------------
609cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)610cdf0e10cSrcweir void MetaRoundRectAction::Read( SvStream& rIStm, ImplMetaReadData* )
611cdf0e10cSrcweir {
612cdf0e10cSrcweir COMPAT( rIStm );
613cdf0e10cSrcweir rIStm >> maRect >> mnHorzRound >> mnVertRound;
614cdf0e10cSrcweir }
615cdf0e10cSrcweir
616cdf0e10cSrcweir // ========================================================================
617cdf0e10cSrcweir
IMPL_META_ACTION(Ellipse,META_ELLIPSE_ACTION)618cdf0e10cSrcweir IMPL_META_ACTION( Ellipse, META_ELLIPSE_ACTION )
619cdf0e10cSrcweir
620cdf0e10cSrcweir // ------------------------------------------------------------------------
621cdf0e10cSrcweir
622cdf0e10cSrcweir MetaEllipseAction::MetaEllipseAction( const Rectangle& rRect ) :
623cdf0e10cSrcweir MetaAction ( META_ELLIPSE_ACTION ),
624cdf0e10cSrcweir maRect ( rRect )
625cdf0e10cSrcweir {
626cdf0e10cSrcweir }
627cdf0e10cSrcweir
628cdf0e10cSrcweir // ------------------------------------------------------------------------
629cdf0e10cSrcweir
Execute(OutputDevice * pOut)630cdf0e10cSrcweir void MetaEllipseAction::Execute( OutputDevice* pOut )
631cdf0e10cSrcweir {
632cdf0e10cSrcweir pOut->DrawEllipse( maRect );
633cdf0e10cSrcweir }
634cdf0e10cSrcweir
635cdf0e10cSrcweir // ------------------------------------------------------------------------
636cdf0e10cSrcweir
Clone()637cdf0e10cSrcweir MetaAction* MetaEllipseAction::Clone()
638cdf0e10cSrcweir {
639cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaEllipseAction( *this );
640cdf0e10cSrcweir pClone->ResetRefCount();
641cdf0e10cSrcweir return pClone;
642cdf0e10cSrcweir }
643cdf0e10cSrcweir
644cdf0e10cSrcweir // ------------------------------------------------------------------------
645cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)646cdf0e10cSrcweir void MetaEllipseAction::Move( long nHorzMove, long nVertMove )
647cdf0e10cSrcweir {
648cdf0e10cSrcweir maRect.Move( nHorzMove, nVertMove );
649cdf0e10cSrcweir }
650cdf0e10cSrcweir
651cdf0e10cSrcweir // ------------------------------------------------------------------------
652cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)653cdf0e10cSrcweir void MetaEllipseAction::Scale( double fScaleX, double fScaleY )
654cdf0e10cSrcweir {
655cdf0e10cSrcweir ImplScaleRect( maRect, fScaleX, fScaleY );
656cdf0e10cSrcweir }
657cdf0e10cSrcweir
658cdf0e10cSrcweir // ------------------------------------------------------------------------
659cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const660cdf0e10cSrcweir sal_Bool MetaEllipseAction::Compare( const MetaAction& rMetaAction ) const
661cdf0e10cSrcweir {
662cdf0e10cSrcweir return maRect == ((MetaEllipseAction&)rMetaAction).maRect;
663cdf0e10cSrcweir }
664cdf0e10cSrcweir
665cdf0e10cSrcweir // ------------------------------------------------------------------------
666cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)667cdf0e10cSrcweir void MetaEllipseAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
668cdf0e10cSrcweir {
669cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
670cdf0e10cSrcweir rOStm << maRect;
671cdf0e10cSrcweir }
672cdf0e10cSrcweir
673cdf0e10cSrcweir // ------------------------------------------------------------------------
674cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)675cdf0e10cSrcweir void MetaEllipseAction::Read( SvStream& rIStm, ImplMetaReadData* )
676cdf0e10cSrcweir {
677cdf0e10cSrcweir COMPAT( rIStm );
678cdf0e10cSrcweir rIStm >> maRect;
679cdf0e10cSrcweir }
680cdf0e10cSrcweir
681cdf0e10cSrcweir // ========================================================================
682cdf0e10cSrcweir
IMPL_META_ACTION(Arc,META_ARC_ACTION)683cdf0e10cSrcweir IMPL_META_ACTION( Arc, META_ARC_ACTION )
684cdf0e10cSrcweir
685cdf0e10cSrcweir // ------------------------------------------------------------------------
686cdf0e10cSrcweir
687cdf0e10cSrcweir MetaArcAction::MetaArcAction( const Rectangle& rRect,
688cdf0e10cSrcweir const Point& rStart, const Point& rEnd ) :
689cdf0e10cSrcweir MetaAction ( META_ARC_ACTION ),
690cdf0e10cSrcweir maRect ( rRect ),
691cdf0e10cSrcweir maStartPt ( rStart ),
692cdf0e10cSrcweir maEndPt ( rEnd )
693cdf0e10cSrcweir {
694cdf0e10cSrcweir }
695cdf0e10cSrcweir
696cdf0e10cSrcweir // ------------------------------------------------------------------------
697cdf0e10cSrcweir
Execute(OutputDevice * pOut)698cdf0e10cSrcweir void MetaArcAction::Execute( OutputDevice* pOut )
699cdf0e10cSrcweir {
700cdf0e10cSrcweir pOut->DrawArc( maRect, maStartPt, maEndPt );
701cdf0e10cSrcweir }
702cdf0e10cSrcweir
703cdf0e10cSrcweir // ------------------------------------------------------------------------
704cdf0e10cSrcweir
Clone()705cdf0e10cSrcweir MetaAction* MetaArcAction::Clone()
706cdf0e10cSrcweir {
707cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaArcAction( *this );
708cdf0e10cSrcweir pClone->ResetRefCount();
709cdf0e10cSrcweir return pClone;
710cdf0e10cSrcweir }
711cdf0e10cSrcweir
712cdf0e10cSrcweir // ------------------------------------------------------------------------
713cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)714cdf0e10cSrcweir void MetaArcAction::Move( long nHorzMove, long nVertMove )
715cdf0e10cSrcweir {
716cdf0e10cSrcweir maRect.Move( nHorzMove, nVertMove );
717cdf0e10cSrcweir maStartPt.Move( nHorzMove, nVertMove );
718cdf0e10cSrcweir maEndPt.Move( nHorzMove, nVertMove );
719cdf0e10cSrcweir }
720cdf0e10cSrcweir
721cdf0e10cSrcweir // ------------------------------------------------------------------------
722cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)723cdf0e10cSrcweir void MetaArcAction::Scale( double fScaleX, double fScaleY )
724cdf0e10cSrcweir {
725cdf0e10cSrcweir ImplScaleRect( maRect, fScaleX, fScaleY );
726cdf0e10cSrcweir ImplScalePoint( maStartPt, fScaleX, fScaleY );
727cdf0e10cSrcweir ImplScalePoint( maEndPt, fScaleX, fScaleY );
728cdf0e10cSrcweir }
729cdf0e10cSrcweir
730cdf0e10cSrcweir // ------------------------------------------------------------------------
731cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const732cdf0e10cSrcweir sal_Bool MetaArcAction::Compare( const MetaAction& rMetaAction ) const
733cdf0e10cSrcweir {
734cdf0e10cSrcweir return ( maRect == ((MetaArcAction&)rMetaAction).maRect ) &&
735cdf0e10cSrcweir ( maStartPt == ((MetaArcAction&)rMetaAction).maStartPt ) &&
736cdf0e10cSrcweir ( maEndPt == ((MetaArcAction&)rMetaAction).maEndPt );
737cdf0e10cSrcweir }
738cdf0e10cSrcweir
739cdf0e10cSrcweir // ------------------------------------------------------------------------
740cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)741cdf0e10cSrcweir void MetaArcAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
742cdf0e10cSrcweir {
743cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
744cdf0e10cSrcweir rOStm << maRect << maStartPt << maEndPt;
745cdf0e10cSrcweir }
746cdf0e10cSrcweir
747cdf0e10cSrcweir // ------------------------------------------------------------------------
748cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)749cdf0e10cSrcweir void MetaArcAction::Read( SvStream& rIStm, ImplMetaReadData* )
750cdf0e10cSrcweir {
751cdf0e10cSrcweir COMPAT( rIStm );
752cdf0e10cSrcweir rIStm >> maRect >> maStartPt >> maEndPt;
753cdf0e10cSrcweir }
754cdf0e10cSrcweir
755cdf0e10cSrcweir // ========================================================================
756cdf0e10cSrcweir
IMPL_META_ACTION(Pie,META_PIE_ACTION)757cdf0e10cSrcweir IMPL_META_ACTION( Pie, META_PIE_ACTION )
758cdf0e10cSrcweir
759cdf0e10cSrcweir // ------------------------------------------------------------------------
760cdf0e10cSrcweir
761cdf0e10cSrcweir MetaPieAction::MetaPieAction( const Rectangle& rRect,
762cdf0e10cSrcweir const Point& rStart, const Point& rEnd ) :
763cdf0e10cSrcweir MetaAction ( META_PIE_ACTION ),
764cdf0e10cSrcweir maRect ( rRect ),
765cdf0e10cSrcweir maStartPt ( rStart ),
766cdf0e10cSrcweir maEndPt ( rEnd )
767cdf0e10cSrcweir {
768cdf0e10cSrcweir }
769cdf0e10cSrcweir
770cdf0e10cSrcweir // ------------------------------------------------------------------------
771cdf0e10cSrcweir
Execute(OutputDevice * pOut)772cdf0e10cSrcweir void MetaPieAction::Execute( OutputDevice* pOut )
773cdf0e10cSrcweir {
774cdf0e10cSrcweir pOut->DrawPie( maRect, maStartPt, maEndPt );
775cdf0e10cSrcweir }
776cdf0e10cSrcweir
777cdf0e10cSrcweir // ------------------------------------------------------------------------
778cdf0e10cSrcweir
Clone()779cdf0e10cSrcweir MetaAction* MetaPieAction::Clone()
780cdf0e10cSrcweir {
781cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaPieAction( *this );
782cdf0e10cSrcweir pClone->ResetRefCount();
783cdf0e10cSrcweir return pClone;
784cdf0e10cSrcweir }
785cdf0e10cSrcweir
786cdf0e10cSrcweir // ------------------------------------------------------------------------
787cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)788cdf0e10cSrcweir void MetaPieAction::Move( long nHorzMove, long nVertMove )
789cdf0e10cSrcweir {
790cdf0e10cSrcweir maRect.Move( nHorzMove, nVertMove );
791cdf0e10cSrcweir maStartPt.Move( nHorzMove, nVertMove );
792cdf0e10cSrcweir maEndPt.Move( nHorzMove, nVertMove );
793cdf0e10cSrcweir }
794cdf0e10cSrcweir
795cdf0e10cSrcweir // ------------------------------------------------------------------------
796cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)797cdf0e10cSrcweir void MetaPieAction::Scale( double fScaleX, double fScaleY )
798cdf0e10cSrcweir {
799cdf0e10cSrcweir ImplScaleRect( maRect, fScaleX, fScaleY );
800cdf0e10cSrcweir ImplScalePoint( maStartPt, fScaleX, fScaleY );
801cdf0e10cSrcweir ImplScalePoint( maEndPt, fScaleX, fScaleY );
802cdf0e10cSrcweir }
803cdf0e10cSrcweir
804cdf0e10cSrcweir // ------------------------------------------------------------------------
805cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const806cdf0e10cSrcweir sal_Bool MetaPieAction::Compare( const MetaAction& rMetaAction ) const
807cdf0e10cSrcweir {
808cdf0e10cSrcweir return ( maRect == ((MetaPieAction&)rMetaAction).maRect ) &&
809cdf0e10cSrcweir ( maStartPt == ((MetaPieAction&)rMetaAction).maStartPt ) &&
810cdf0e10cSrcweir ( maEndPt == ((MetaPieAction&)rMetaAction).maEndPt );
811cdf0e10cSrcweir }
812cdf0e10cSrcweir
813cdf0e10cSrcweir // ------------------------------------------------------------------------
814cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)815cdf0e10cSrcweir void MetaPieAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
816cdf0e10cSrcweir {
817cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
818cdf0e10cSrcweir rOStm << maRect << maStartPt << maEndPt;
819cdf0e10cSrcweir }
820cdf0e10cSrcweir
821cdf0e10cSrcweir // ------------------------------------------------------------------------
822cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)823cdf0e10cSrcweir void MetaPieAction::Read( SvStream& rIStm, ImplMetaReadData* )
824cdf0e10cSrcweir {
825cdf0e10cSrcweir COMPAT( rIStm );
826cdf0e10cSrcweir rIStm >> maRect >> maStartPt >> maEndPt;
827cdf0e10cSrcweir }
828cdf0e10cSrcweir
829cdf0e10cSrcweir // ========================================================================
830cdf0e10cSrcweir
IMPL_META_ACTION(Chord,META_CHORD_ACTION)831cdf0e10cSrcweir IMPL_META_ACTION( Chord, META_CHORD_ACTION )
832cdf0e10cSrcweir
833cdf0e10cSrcweir // ------------------------------------------------------------------------
834cdf0e10cSrcweir
835cdf0e10cSrcweir MetaChordAction::MetaChordAction( const Rectangle& rRect,
836cdf0e10cSrcweir const Point& rStart, const Point& rEnd ) :
837cdf0e10cSrcweir MetaAction ( META_CHORD_ACTION ),
838cdf0e10cSrcweir maRect ( rRect ),
839cdf0e10cSrcweir maStartPt ( rStart ),
840cdf0e10cSrcweir maEndPt ( rEnd )
841cdf0e10cSrcweir {
842cdf0e10cSrcweir }
843cdf0e10cSrcweir
844cdf0e10cSrcweir // ------------------------------------------------------------------------
845cdf0e10cSrcweir
Execute(OutputDevice * pOut)846cdf0e10cSrcweir void MetaChordAction::Execute( OutputDevice* pOut )
847cdf0e10cSrcweir {
848cdf0e10cSrcweir pOut->DrawChord( maRect, maStartPt, maEndPt );
849cdf0e10cSrcweir }
850cdf0e10cSrcweir
851cdf0e10cSrcweir // ------------------------------------------------------------------------
852cdf0e10cSrcweir
Clone()853cdf0e10cSrcweir MetaAction* MetaChordAction::Clone()
854cdf0e10cSrcweir {
855cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaChordAction( *this );
856cdf0e10cSrcweir pClone->ResetRefCount();
857cdf0e10cSrcweir return pClone;
858cdf0e10cSrcweir }
859cdf0e10cSrcweir
860cdf0e10cSrcweir // ------------------------------------------------------------------------
861cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)862cdf0e10cSrcweir void MetaChordAction::Move( long nHorzMove, long nVertMove )
863cdf0e10cSrcweir {
864cdf0e10cSrcweir maRect.Move( nHorzMove, nVertMove );
865cdf0e10cSrcweir maStartPt.Move( nHorzMove, nVertMove );
866cdf0e10cSrcweir maEndPt.Move( nHorzMove, nVertMove );
867cdf0e10cSrcweir }
868cdf0e10cSrcweir
869cdf0e10cSrcweir // ------------------------------------------------------------------------
870cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)871cdf0e10cSrcweir void MetaChordAction::Scale( double fScaleX, double fScaleY )
872cdf0e10cSrcweir {
873cdf0e10cSrcweir ImplScaleRect( maRect, fScaleX, fScaleY );
874cdf0e10cSrcweir ImplScalePoint( maStartPt, fScaleX, fScaleY );
875cdf0e10cSrcweir ImplScalePoint( maEndPt, fScaleX, fScaleY );
876cdf0e10cSrcweir }
877cdf0e10cSrcweir
878cdf0e10cSrcweir // ------------------------------------------------------------------------
879cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const880cdf0e10cSrcweir sal_Bool MetaChordAction::Compare( const MetaAction& rMetaAction ) const
881cdf0e10cSrcweir {
882cdf0e10cSrcweir return ( maRect == ((MetaChordAction&)rMetaAction).maRect ) &&
883cdf0e10cSrcweir ( maStartPt == ((MetaChordAction&)rMetaAction).maStartPt ) &&
884cdf0e10cSrcweir ( maEndPt == ((MetaChordAction&)rMetaAction).maEndPt );
885cdf0e10cSrcweir }
886cdf0e10cSrcweir
887cdf0e10cSrcweir // ------------------------------------------------------------------------
888cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)889cdf0e10cSrcweir void MetaChordAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
890cdf0e10cSrcweir {
891cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
892cdf0e10cSrcweir rOStm << maRect << maStartPt << maEndPt;
893cdf0e10cSrcweir }
894cdf0e10cSrcweir
895cdf0e10cSrcweir // ------------------------------------------------------------------------
896cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)897cdf0e10cSrcweir void MetaChordAction::Read( SvStream& rIStm, ImplMetaReadData* )
898cdf0e10cSrcweir {
899cdf0e10cSrcweir COMPAT( rIStm );
900cdf0e10cSrcweir rIStm >> maRect >> maStartPt >> maEndPt;
901cdf0e10cSrcweir }
902cdf0e10cSrcweir
903cdf0e10cSrcweir // ========================================================================
904cdf0e10cSrcweir
IMPL_META_ACTION(PolyLine,META_POLYLINE_ACTION)905cdf0e10cSrcweir IMPL_META_ACTION( PolyLine, META_POLYLINE_ACTION )
906cdf0e10cSrcweir
907cdf0e10cSrcweir // ------------------------------------------------------------------------
908cdf0e10cSrcweir
909cdf0e10cSrcweir MetaPolyLineAction::MetaPolyLineAction( const Polygon& rPoly ) :
910cdf0e10cSrcweir MetaAction ( META_POLYLINE_ACTION ),
911cdf0e10cSrcweir maPoly ( rPoly )
912cdf0e10cSrcweir {
913cdf0e10cSrcweir }
914cdf0e10cSrcweir
915cdf0e10cSrcweir // ------------------------------------------------------------------------
916cdf0e10cSrcweir
MetaPolyLineAction(const Polygon & rPoly,const LineInfo & rLineInfo)917cdf0e10cSrcweir MetaPolyLineAction::MetaPolyLineAction( const Polygon& rPoly, const LineInfo& rLineInfo ) :
918cdf0e10cSrcweir MetaAction ( META_POLYLINE_ACTION ),
919cdf0e10cSrcweir maLineInfo ( rLineInfo ),
920cdf0e10cSrcweir maPoly ( rPoly )
921cdf0e10cSrcweir {
922cdf0e10cSrcweir }
923cdf0e10cSrcweir
924cdf0e10cSrcweir // ------------------------------------------------------------------------
925cdf0e10cSrcweir
Execute(OutputDevice * pOut)926cdf0e10cSrcweir void MetaPolyLineAction::Execute( OutputDevice* pOut )
927cdf0e10cSrcweir {
928cdf0e10cSrcweir if( maLineInfo.IsDefault() )
929cdf0e10cSrcweir pOut->DrawPolyLine( maPoly );
930cdf0e10cSrcweir else
931cdf0e10cSrcweir pOut->DrawPolyLine( maPoly, maLineInfo );
932cdf0e10cSrcweir }
933cdf0e10cSrcweir
934cdf0e10cSrcweir // ------------------------------------------------------------------------
935cdf0e10cSrcweir
Clone()936cdf0e10cSrcweir MetaAction* MetaPolyLineAction::Clone()
937cdf0e10cSrcweir {
938cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaPolyLineAction( *this );
939cdf0e10cSrcweir pClone->ResetRefCount();
940cdf0e10cSrcweir return pClone;
941cdf0e10cSrcweir }
942cdf0e10cSrcweir
943cdf0e10cSrcweir // ------------------------------------------------------------------------
944cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)945cdf0e10cSrcweir void MetaPolyLineAction::Move( long nHorzMove, long nVertMove )
946cdf0e10cSrcweir {
947cdf0e10cSrcweir maPoly.Move( nHorzMove, nVertMove );
948cdf0e10cSrcweir }
949cdf0e10cSrcweir
950cdf0e10cSrcweir // ------------------------------------------------------------------------
951cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)952cdf0e10cSrcweir void MetaPolyLineAction::Scale( double fScaleX, double fScaleY )
953cdf0e10cSrcweir {
954cdf0e10cSrcweir ImplScalePoly( maPoly, fScaleX, fScaleY );
955cdf0e10cSrcweir ImplScaleLineInfo( maLineInfo, fScaleX, fScaleY );
956cdf0e10cSrcweir }
957cdf0e10cSrcweir
958cdf0e10cSrcweir // ------------------------------------------------------------------------
959cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const960cdf0e10cSrcweir sal_Bool MetaPolyLineAction::Compare( const MetaAction& rMetaAction ) const
961cdf0e10cSrcweir {
962*50626f15Smseidel sal_Bool bIsEqual = sal_True;
963cdf0e10cSrcweir if ( maLineInfo != ((MetaPolyLineAction&)rMetaAction).maLineInfo )
964cdf0e10cSrcweir bIsEqual = sal_False;
965cdf0e10cSrcweir else
966cdf0e10cSrcweir bIsEqual = maPoly.IsEqual(((MetaPolyLineAction&)rMetaAction).maPoly );
967cdf0e10cSrcweir return bIsEqual;
968cdf0e10cSrcweir
969cdf0e10cSrcweir }
970cdf0e10cSrcweir
971cdf0e10cSrcweir // ------------------------------------------------------------------------
972cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)973cdf0e10cSrcweir void MetaPolyLineAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
974cdf0e10cSrcweir {
975cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 3, pData );
976cdf0e10cSrcweir
977cdf0e10cSrcweir Polygon aSimplePoly;
978cdf0e10cSrcweir maPoly.AdaptiveSubdivide( aSimplePoly );
979cdf0e10cSrcweir
980cdf0e10cSrcweir rOStm << aSimplePoly; // Version 1
981cdf0e10cSrcweir rOStm << maLineInfo; // Version 2
982cdf0e10cSrcweir
983cdf0e10cSrcweir sal_uInt8 bHasPolyFlags = maPoly.HasFlags(); // Version 3
984cdf0e10cSrcweir rOStm << bHasPolyFlags;
985cdf0e10cSrcweir if ( bHasPolyFlags )
986cdf0e10cSrcweir maPoly.Write( rOStm );
987cdf0e10cSrcweir }
988cdf0e10cSrcweir
989cdf0e10cSrcweir // ------------------------------------------------------------------------
990cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)991cdf0e10cSrcweir void MetaPolyLineAction::Read( SvStream& rIStm, ImplMetaReadData* )
992cdf0e10cSrcweir {
993cdf0e10cSrcweir COMPAT( rIStm );
994cdf0e10cSrcweir
995cdf0e10cSrcweir // Version 1
996cdf0e10cSrcweir rIStm >> maPoly;
997cdf0e10cSrcweir
998cdf0e10cSrcweir // Version 2
999cdf0e10cSrcweir if( aCompat.GetVersion() >= 2 )
1000cdf0e10cSrcweir rIStm >> maLineInfo;
1001cdf0e10cSrcweir if ( aCompat.GetVersion() >= 3 )
1002cdf0e10cSrcweir {
1003cdf0e10cSrcweir sal_uInt8 bHasPolyFlags;
1004cdf0e10cSrcweir rIStm >> bHasPolyFlags;
1005cdf0e10cSrcweir if ( bHasPolyFlags )
1006cdf0e10cSrcweir maPoly.Read( rIStm );
1007cdf0e10cSrcweir }
1008cdf0e10cSrcweir }
1009cdf0e10cSrcweir
1010cdf0e10cSrcweir // ========================================================================
1011cdf0e10cSrcweir
IMPL_META_ACTION(Polygon,META_POLYGON_ACTION)1012cdf0e10cSrcweir IMPL_META_ACTION( Polygon, META_POLYGON_ACTION )
1013cdf0e10cSrcweir
1014cdf0e10cSrcweir // ------------------------------------------------------------------------
1015cdf0e10cSrcweir
1016cdf0e10cSrcweir MetaPolygonAction::MetaPolygonAction( const Polygon& rPoly ) :
1017cdf0e10cSrcweir MetaAction ( META_POLYGON_ACTION ),
1018cdf0e10cSrcweir maPoly ( rPoly )
1019cdf0e10cSrcweir {
1020cdf0e10cSrcweir }
1021cdf0e10cSrcweir
1022cdf0e10cSrcweir // ------------------------------------------------------------------------
1023cdf0e10cSrcweir
Execute(OutputDevice * pOut)1024cdf0e10cSrcweir void MetaPolygonAction::Execute( OutputDevice* pOut )
1025cdf0e10cSrcweir {
1026cdf0e10cSrcweir pOut->DrawPolygon( maPoly );
1027cdf0e10cSrcweir }
1028cdf0e10cSrcweir
1029cdf0e10cSrcweir // ------------------------------------------------------------------------
1030cdf0e10cSrcweir
Clone()1031cdf0e10cSrcweir MetaAction* MetaPolygonAction::Clone()
1032cdf0e10cSrcweir {
1033cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaPolygonAction( *this );
1034cdf0e10cSrcweir pClone->ResetRefCount();
1035cdf0e10cSrcweir return pClone;
1036cdf0e10cSrcweir }
1037cdf0e10cSrcweir
1038cdf0e10cSrcweir // ------------------------------------------------------------------------
1039cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)1040cdf0e10cSrcweir void MetaPolygonAction::Move( long nHorzMove, long nVertMove )
1041cdf0e10cSrcweir {
1042cdf0e10cSrcweir maPoly.Move( nHorzMove, nVertMove );
1043cdf0e10cSrcweir }
1044cdf0e10cSrcweir
1045cdf0e10cSrcweir // ------------------------------------------------------------------------
1046cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)1047cdf0e10cSrcweir void MetaPolygonAction::Scale( double fScaleX, double fScaleY )
1048cdf0e10cSrcweir {
1049cdf0e10cSrcweir ImplScalePoly( maPoly, fScaleX, fScaleY );
1050cdf0e10cSrcweir }
1051cdf0e10cSrcweir
1052cdf0e10cSrcweir // ------------------------------------------------------------------------
1053cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const1054cdf0e10cSrcweir sal_Bool MetaPolygonAction::Compare( const MetaAction& rMetaAction ) const
1055cdf0e10cSrcweir {
1056cdf0e10cSrcweir return maPoly.IsEqual(((MetaPolygonAction&)rMetaAction).maPoly );
1057cdf0e10cSrcweir }
1058cdf0e10cSrcweir
1059cdf0e10cSrcweir // ------------------------------------------------------------------------
1060cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)1061cdf0e10cSrcweir void MetaPolygonAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
1062cdf0e10cSrcweir {
1063cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 2, pData );
1064cdf0e10cSrcweir
1065cdf0e10cSrcweir Polygon aSimplePoly; // Version 1
1066cdf0e10cSrcweir maPoly.AdaptiveSubdivide( aSimplePoly );
1067cdf0e10cSrcweir rOStm << aSimplePoly;
1068cdf0e10cSrcweir
1069cdf0e10cSrcweir sal_uInt8 bHasPolyFlags = maPoly.HasFlags(); // Version 2
1070cdf0e10cSrcweir rOStm << bHasPolyFlags;
1071cdf0e10cSrcweir if ( bHasPolyFlags )
1072cdf0e10cSrcweir maPoly.Write( rOStm );
1073cdf0e10cSrcweir }
1074cdf0e10cSrcweir
1075cdf0e10cSrcweir // ------------------------------------------------------------------------
1076cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)1077cdf0e10cSrcweir void MetaPolygonAction::Read( SvStream& rIStm, ImplMetaReadData* )
1078cdf0e10cSrcweir {
1079cdf0e10cSrcweir COMPAT( rIStm );
1080cdf0e10cSrcweir
1081cdf0e10cSrcweir rIStm >> maPoly; // Version 1
1082cdf0e10cSrcweir
1083cdf0e10cSrcweir if( aCompat.GetVersion() >= 2 ) // Version 2
1084cdf0e10cSrcweir {
1085cdf0e10cSrcweir sal_uInt8 bHasPolyFlags;
1086cdf0e10cSrcweir rIStm >> bHasPolyFlags;
1087cdf0e10cSrcweir if ( bHasPolyFlags )
1088cdf0e10cSrcweir maPoly.Read( rIStm );
1089cdf0e10cSrcweir }
1090cdf0e10cSrcweir }
1091cdf0e10cSrcweir
1092cdf0e10cSrcweir // ========================================================================
1093cdf0e10cSrcweir
IMPL_META_ACTION(PolyPolygon,META_POLYPOLYGON_ACTION)1094cdf0e10cSrcweir IMPL_META_ACTION( PolyPolygon, META_POLYPOLYGON_ACTION )
1095cdf0e10cSrcweir
1096cdf0e10cSrcweir // ------------------------------------------------------------------------
1097cdf0e10cSrcweir
1098cdf0e10cSrcweir MetaPolyPolygonAction::MetaPolyPolygonAction( const PolyPolygon& rPolyPoly ) :
1099cdf0e10cSrcweir MetaAction ( META_POLYPOLYGON_ACTION ),
1100cdf0e10cSrcweir maPolyPoly ( rPolyPoly )
1101cdf0e10cSrcweir {
1102cdf0e10cSrcweir }
1103cdf0e10cSrcweir
1104cdf0e10cSrcweir // ------------------------------------------------------------------------
1105cdf0e10cSrcweir
Execute(OutputDevice * pOut)1106cdf0e10cSrcweir void MetaPolyPolygonAction::Execute( OutputDevice* pOut )
1107cdf0e10cSrcweir {
1108cdf0e10cSrcweir pOut->DrawPolyPolygon( maPolyPoly );
1109cdf0e10cSrcweir }
1110cdf0e10cSrcweir
1111cdf0e10cSrcweir // ------------------------------------------------------------------------
1112cdf0e10cSrcweir
Clone()1113cdf0e10cSrcweir MetaAction* MetaPolyPolygonAction::Clone()
1114cdf0e10cSrcweir {
1115cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaPolyPolygonAction( *this );
1116cdf0e10cSrcweir pClone->ResetRefCount();
1117cdf0e10cSrcweir return pClone;
1118cdf0e10cSrcweir }
1119cdf0e10cSrcweir
1120cdf0e10cSrcweir // ------------------------------------------------------------------------
1121cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)1122cdf0e10cSrcweir void MetaPolyPolygonAction::Move( long nHorzMove, long nVertMove )
1123cdf0e10cSrcweir {
1124cdf0e10cSrcweir maPolyPoly.Move( nHorzMove, nVertMove );
1125cdf0e10cSrcweir }
1126cdf0e10cSrcweir
1127cdf0e10cSrcweir // ------------------------------------------------------------------------
1128cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)1129cdf0e10cSrcweir void MetaPolyPolygonAction::Scale( double fScaleX, double fScaleY )
1130cdf0e10cSrcweir {
1131cdf0e10cSrcweir for( sal_uInt16 i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
1132cdf0e10cSrcweir ImplScalePoly( maPolyPoly[ i ], fScaleX, fScaleY );
1133cdf0e10cSrcweir }
1134cdf0e10cSrcweir
1135cdf0e10cSrcweir // ------------------------------------------------------------------------
1136cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const1137cdf0e10cSrcweir sal_Bool MetaPolyPolygonAction::Compare( const MetaAction& rMetaAction ) const
1138cdf0e10cSrcweir {
1139cdf0e10cSrcweir return maPolyPoly.IsEqual(((MetaPolyPolygonAction&)rMetaAction).maPolyPoly );
1140cdf0e10cSrcweir }
1141cdf0e10cSrcweir
1142cdf0e10cSrcweir // ------------------------------------------------------------------------
1143cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)1144cdf0e10cSrcweir void MetaPolyPolygonAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
1145cdf0e10cSrcweir {
1146cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 2, pData );
1147cdf0e10cSrcweir
1148cdf0e10cSrcweir sal_uInt16 nNumberOfComplexPolygons = 0;
1149cdf0e10cSrcweir sal_uInt16 i, nPolyCount = maPolyPoly.Count();
1150cdf0e10cSrcweir
1151cdf0e10cSrcweir Polygon aSimplePoly; // Version 1
1152cdf0e10cSrcweir rOStm << nPolyCount;
1153cdf0e10cSrcweir for ( i = 0; i < nPolyCount; i++ )
1154cdf0e10cSrcweir {
1155cdf0e10cSrcweir const Polygon& rPoly = maPolyPoly.GetObject( i );
1156cdf0e10cSrcweir if ( rPoly.HasFlags() )
1157cdf0e10cSrcweir nNumberOfComplexPolygons++;
1158cdf0e10cSrcweir rPoly.AdaptiveSubdivide( aSimplePoly );
1159cdf0e10cSrcweir rOStm << aSimplePoly;
1160cdf0e10cSrcweir }
1161cdf0e10cSrcweir
1162cdf0e10cSrcweir rOStm << nNumberOfComplexPolygons; // Version 2
1163cdf0e10cSrcweir for ( i = 0; nNumberOfComplexPolygons && ( i < nPolyCount ); i++ )
1164cdf0e10cSrcweir {
1165cdf0e10cSrcweir const Polygon& rPoly = maPolyPoly.GetObject( i );
1166cdf0e10cSrcweir if ( rPoly.HasFlags() )
1167cdf0e10cSrcweir {
1168cdf0e10cSrcweir rOStm << i;
1169cdf0e10cSrcweir rPoly.Write( rOStm );
1170cdf0e10cSrcweir
1171cdf0e10cSrcweir nNumberOfComplexPolygons--;
1172cdf0e10cSrcweir }
1173cdf0e10cSrcweir }
1174cdf0e10cSrcweir }
1175cdf0e10cSrcweir
1176cdf0e10cSrcweir // ------------------------------------------------------------------------
1177cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)1178cdf0e10cSrcweir void MetaPolyPolygonAction::Read( SvStream& rIStm, ImplMetaReadData* )
1179cdf0e10cSrcweir {
1180cdf0e10cSrcweir COMPAT( rIStm );
1181cdf0e10cSrcweir rIStm >> maPolyPoly; // Version 1
1182cdf0e10cSrcweir
1183cdf0e10cSrcweir if ( aCompat.GetVersion() >= 2 ) // Version 2
1184cdf0e10cSrcweir {
1185cdf0e10cSrcweir sal_uInt16 i, nIndex, nNumberOfComplexPolygons;
1186cdf0e10cSrcweir rIStm >> nNumberOfComplexPolygons;
1187cdf0e10cSrcweir for ( i = 0; i < nNumberOfComplexPolygons; i++ )
1188cdf0e10cSrcweir {
1189cdf0e10cSrcweir rIStm >> nIndex;
1190cdf0e10cSrcweir Polygon aPoly;
1191cdf0e10cSrcweir aPoly.Read( rIStm );
1192cdf0e10cSrcweir maPolyPoly.Replace( aPoly, nIndex );
1193cdf0e10cSrcweir }
1194cdf0e10cSrcweir }
1195cdf0e10cSrcweir }
1196cdf0e10cSrcweir
1197cdf0e10cSrcweir // ========================================================================
1198cdf0e10cSrcweir
IMPL_META_ACTION(Text,META_TEXT_ACTION)1199cdf0e10cSrcweir IMPL_META_ACTION( Text, META_TEXT_ACTION )
1200cdf0e10cSrcweir
1201cdf0e10cSrcweir // ------------------------------------------------------------------------
1202cdf0e10cSrcweir
1203cdf0e10cSrcweir MetaTextAction::MetaTextAction( const Point& rPt, const XubString& rStr,
1204cdf0e10cSrcweir sal_uInt16 nIndex, sal_uInt16 nLen ) :
1205cdf0e10cSrcweir MetaAction ( META_TEXT_ACTION ),
1206cdf0e10cSrcweir maPt ( rPt ),
1207cdf0e10cSrcweir maStr ( rStr ),
1208cdf0e10cSrcweir mnIndex ( nIndex ),
1209cdf0e10cSrcweir mnLen ( nLen )
1210cdf0e10cSrcweir {
1211cdf0e10cSrcweir }
1212cdf0e10cSrcweir
1213cdf0e10cSrcweir // ------------------------------------------------------------------------
1214cdf0e10cSrcweir
Execute(OutputDevice * pOut)1215cdf0e10cSrcweir void MetaTextAction::Execute( OutputDevice* pOut )
1216cdf0e10cSrcweir {
1217cdf0e10cSrcweir pOut->DrawText( maPt, maStr, mnIndex, mnLen );
1218cdf0e10cSrcweir }
1219cdf0e10cSrcweir
1220cdf0e10cSrcweir // ------------------------------------------------------------------------
1221cdf0e10cSrcweir
Clone()1222cdf0e10cSrcweir MetaAction* MetaTextAction::Clone()
1223cdf0e10cSrcweir {
1224cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaTextAction( *this );
1225cdf0e10cSrcweir pClone->ResetRefCount();
1226cdf0e10cSrcweir return pClone;
1227cdf0e10cSrcweir }
1228cdf0e10cSrcweir
1229cdf0e10cSrcweir // ------------------------------------------------------------------------
1230cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)1231cdf0e10cSrcweir void MetaTextAction::Move( long nHorzMove, long nVertMove )
1232cdf0e10cSrcweir {
1233cdf0e10cSrcweir maPt.Move( nHorzMove, nVertMove );
1234cdf0e10cSrcweir }
1235cdf0e10cSrcweir
1236cdf0e10cSrcweir // ------------------------------------------------------------------------
1237cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)1238cdf0e10cSrcweir void MetaTextAction::Scale( double fScaleX, double fScaleY )
1239cdf0e10cSrcweir {
1240cdf0e10cSrcweir ImplScalePoint( maPt, fScaleX, fScaleY );
1241cdf0e10cSrcweir }
1242cdf0e10cSrcweir
1243cdf0e10cSrcweir // ------------------------------------------------------------------------
1244cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const1245cdf0e10cSrcweir sal_Bool MetaTextAction::Compare( const MetaAction& rMetaAction ) const
1246cdf0e10cSrcweir {
1247cdf0e10cSrcweir return ( maPt == ((MetaTextAction&)rMetaAction).maPt ) &&
1248cdf0e10cSrcweir ( maStr == ((MetaTextAction&)rMetaAction).maStr ) &&
1249cdf0e10cSrcweir ( mnIndex == ((MetaTextAction&)rMetaAction).mnIndex ) &&
1250cdf0e10cSrcweir ( mnLen == ((MetaTextAction&)rMetaAction).mnLen );
1251cdf0e10cSrcweir }
1252cdf0e10cSrcweir
1253cdf0e10cSrcweir // ------------------------------------------------------------------------
1254cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)1255cdf0e10cSrcweir void MetaTextAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
1256cdf0e10cSrcweir {
1257cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 2, pData );
1258cdf0e10cSrcweir rOStm << maPt;
1259cdf0e10cSrcweir rOStm.WriteByteString( maStr, pData->meActualCharSet );
1260cdf0e10cSrcweir rOStm << mnIndex;
1261cdf0e10cSrcweir rOStm << mnLen;
1262cdf0e10cSrcweir
1263cdf0e10cSrcweir sal_uInt16 i, nLen = maStr.Len(); // version 2
1264cdf0e10cSrcweir rOStm << nLen;
1265cdf0e10cSrcweir for ( i = 0; i < nLen; i++ )
1266cdf0e10cSrcweir {
1267cdf0e10cSrcweir sal_Unicode nUni = maStr.GetChar( i );
1268cdf0e10cSrcweir rOStm << nUni;
1269cdf0e10cSrcweir }
1270cdf0e10cSrcweir }
1271cdf0e10cSrcweir
1272cdf0e10cSrcweir // ------------------------------------------------------------------------
1273cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData * pData)1274cdf0e10cSrcweir void MetaTextAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
1275cdf0e10cSrcweir {
1276cdf0e10cSrcweir COMPAT( rIStm );
1277cdf0e10cSrcweir rIStm >> maPt;
1278cdf0e10cSrcweir rIStm.ReadByteString( maStr, pData->meActualCharSet );
1279cdf0e10cSrcweir rIStm >> mnIndex;
1280cdf0e10cSrcweir rIStm >> mnLen;
1281cdf0e10cSrcweir
1282cdf0e10cSrcweir if ( aCompat.GetVersion() >= 2 ) // Version 2
1283cdf0e10cSrcweir {
1284cdf0e10cSrcweir sal_uInt16 nLen;
1285cdf0e10cSrcweir rIStm >> nLen;
1286cdf0e10cSrcweir sal_Unicode* pBuffer = maStr.AllocBuffer( nLen );
1287cdf0e10cSrcweir while ( nLen-- )
1288cdf0e10cSrcweir rIStm >> *pBuffer++;
1289cdf0e10cSrcweir }
1290cdf0e10cSrcweir }
1291cdf0e10cSrcweir
1292cdf0e10cSrcweir // ========================================================================
1293cdf0e10cSrcweir
MetaTextArrayAction()1294cdf0e10cSrcweir MetaTextArrayAction::MetaTextArrayAction() :
1295cdf0e10cSrcweir MetaAction ( META_TEXTARRAY_ACTION ),
1296cdf0e10cSrcweir mpDXAry ( NULL ),
1297cdf0e10cSrcweir mnIndex ( 0 ),
1298cdf0e10cSrcweir mnLen ( 0 )
1299cdf0e10cSrcweir {
1300cdf0e10cSrcweir }
1301cdf0e10cSrcweir
1302cdf0e10cSrcweir // ------------------------------------------------------------------------
1303cdf0e10cSrcweir
MetaTextArrayAction(const MetaTextArrayAction & rAction)1304cdf0e10cSrcweir MetaTextArrayAction::MetaTextArrayAction( const MetaTextArrayAction& rAction ) :
1305cdf0e10cSrcweir MetaAction ( META_TEXTARRAY_ACTION ),
1306cdf0e10cSrcweir maStartPt ( rAction.maStartPt ),
1307cdf0e10cSrcweir maStr ( rAction.maStr ),
1308cdf0e10cSrcweir mnIndex ( rAction.mnIndex ),
1309cdf0e10cSrcweir mnLen ( rAction.mnLen )
1310cdf0e10cSrcweir {
1311cdf0e10cSrcweir if( rAction.mpDXAry )
1312cdf0e10cSrcweir {
1313cdf0e10cSrcweir const sal_uLong nAryLen = mnLen;
1314cdf0e10cSrcweir
1315cdf0e10cSrcweir mpDXAry = new sal_Int32[ nAryLen ];
1316cdf0e10cSrcweir memcpy( mpDXAry, rAction.mpDXAry, nAryLen * sizeof( sal_Int32 ) );
1317cdf0e10cSrcweir }
1318cdf0e10cSrcweir else
1319cdf0e10cSrcweir mpDXAry = NULL;
1320cdf0e10cSrcweir }
1321cdf0e10cSrcweir
1322cdf0e10cSrcweir // ------------------------------------------------------------------------
1323cdf0e10cSrcweir
MetaTextArrayAction(const Point & rStartPt,const XubString & rStr,const sal_Int32 * pDXAry,sal_uInt16 nIndex,sal_uInt16 nLen)1324cdf0e10cSrcweir MetaTextArrayAction::MetaTextArrayAction( const Point& rStartPt,
1325cdf0e10cSrcweir const XubString& rStr,
1326cdf0e10cSrcweir const sal_Int32* pDXAry,
1327cdf0e10cSrcweir sal_uInt16 nIndex,
1328cdf0e10cSrcweir sal_uInt16 nLen ) :
1329cdf0e10cSrcweir MetaAction ( META_TEXTARRAY_ACTION ),
1330cdf0e10cSrcweir maStartPt ( rStartPt ),
1331cdf0e10cSrcweir maStr ( rStr ),
1332cdf0e10cSrcweir mnIndex ( nIndex ),
1333cdf0e10cSrcweir mnLen ( ( nLen == STRING_LEN ) ? rStr.Len() : nLen )
1334cdf0e10cSrcweir {
1335cdf0e10cSrcweir const sal_uLong nAryLen = pDXAry ? mnLen : 0;
1336cdf0e10cSrcweir
1337cdf0e10cSrcweir if( nAryLen )
1338cdf0e10cSrcweir {
1339cdf0e10cSrcweir mpDXAry = new sal_Int32[ nAryLen ];
1340cdf0e10cSrcweir memcpy( mpDXAry, pDXAry, nAryLen * sizeof( sal_Int32 ) );
1341cdf0e10cSrcweir }
1342cdf0e10cSrcweir else
1343cdf0e10cSrcweir mpDXAry = NULL;
1344cdf0e10cSrcweir }
1345cdf0e10cSrcweir
1346cdf0e10cSrcweir // ------------------------------------------------------------------------
1347cdf0e10cSrcweir
~MetaTextArrayAction()1348cdf0e10cSrcweir MetaTextArrayAction::~MetaTextArrayAction()
1349cdf0e10cSrcweir {
1350cdf0e10cSrcweir delete[] mpDXAry;
1351cdf0e10cSrcweir }
1352cdf0e10cSrcweir
1353cdf0e10cSrcweir // ------------------------------------------------------------------------
1354cdf0e10cSrcweir
Execute(OutputDevice * pOut)1355cdf0e10cSrcweir void MetaTextArrayAction::Execute( OutputDevice* pOut )
1356cdf0e10cSrcweir {
1357cdf0e10cSrcweir pOut->DrawTextArray( maStartPt, maStr, mpDXAry, mnIndex, mnLen );
1358cdf0e10cSrcweir }
1359cdf0e10cSrcweir
1360cdf0e10cSrcweir // ------------------------------------------------------------------------
1361cdf0e10cSrcweir
Clone()1362cdf0e10cSrcweir MetaAction* MetaTextArrayAction::Clone()
1363cdf0e10cSrcweir {
1364cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaTextArrayAction( *this );
1365cdf0e10cSrcweir pClone->ResetRefCount();
1366cdf0e10cSrcweir return pClone;
1367cdf0e10cSrcweir }
1368cdf0e10cSrcweir
1369cdf0e10cSrcweir // ------------------------------------------------------------------------
1370cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)1371cdf0e10cSrcweir void MetaTextArrayAction::Move( long nHorzMove, long nVertMove )
1372cdf0e10cSrcweir {
1373cdf0e10cSrcweir maStartPt.Move( nHorzMove, nVertMove );
1374cdf0e10cSrcweir }
1375cdf0e10cSrcweir
1376cdf0e10cSrcweir // ------------------------------------------------------------------------
1377cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)1378cdf0e10cSrcweir void MetaTextArrayAction::Scale( double fScaleX, double fScaleY )
1379cdf0e10cSrcweir {
1380cdf0e10cSrcweir ImplScalePoint( maStartPt, fScaleX, fScaleY );
1381cdf0e10cSrcweir
1382cdf0e10cSrcweir if ( mpDXAry && mnLen )
1383cdf0e10cSrcweir {
1384cdf0e10cSrcweir for ( sal_uInt16 i = 0, nCount = mnLen; i < nCount; i++ )
1385cdf0e10cSrcweir mpDXAry[ i ] = FRound( mpDXAry[ i ] * fabs(fScaleX) );
1386cdf0e10cSrcweir }
1387cdf0e10cSrcweir }
1388cdf0e10cSrcweir
1389cdf0e10cSrcweir // ------------------------------------------------------------------------
1390cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const1391cdf0e10cSrcweir sal_Bool MetaTextArrayAction::Compare( const MetaAction& rMetaAction ) const
1392cdf0e10cSrcweir {
1393cdf0e10cSrcweir return ( maStartPt == ((MetaTextArrayAction&)rMetaAction).maStartPt ) &&
1394cdf0e10cSrcweir ( maStr == ((MetaTextArrayAction&)rMetaAction).maStr ) &&
1395cdf0e10cSrcweir ( mnIndex == ((MetaTextArrayAction&)rMetaAction).mnIndex ) &&
1396cdf0e10cSrcweir ( mnLen == ((MetaTextArrayAction&)rMetaAction).mnLen ) &&
1397cdf0e10cSrcweir ( memcmp( mpDXAry, ((MetaTextArrayAction&)rMetaAction).mpDXAry, mnLen ) == 0 );
1398cdf0e10cSrcweir }
1399cdf0e10cSrcweir
1400cdf0e10cSrcweir // ------------------------------------------------------------------------
1401cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)1402cdf0e10cSrcweir void MetaTextArrayAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
1403cdf0e10cSrcweir {
1404cdf0e10cSrcweir const sal_uInt32 nAryLen = mpDXAry ? mnLen : 0;
1405cdf0e10cSrcweir
1406cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 2, pData );
1407cdf0e10cSrcweir rOStm << maStartPt;
1408cdf0e10cSrcweir rOStm.WriteByteString( maStr, pData->meActualCharSet );
1409cdf0e10cSrcweir rOStm << mnIndex;
1410cdf0e10cSrcweir rOStm << mnLen;
1411cdf0e10cSrcweir rOStm << nAryLen;
1412cdf0e10cSrcweir
1413cdf0e10cSrcweir for( sal_uLong i = 0UL; i < nAryLen; i++ )
1414cdf0e10cSrcweir rOStm << mpDXAry[ i ];
1415cdf0e10cSrcweir
1416cdf0e10cSrcweir sal_uInt16 j, nLen = maStr.Len(); // version 2
1417cdf0e10cSrcweir rOStm << nLen;
1418cdf0e10cSrcweir for ( j = 0; j < nLen; j++ )
1419cdf0e10cSrcweir {
1420cdf0e10cSrcweir sal_Unicode nUni = maStr.GetChar( j );
1421cdf0e10cSrcweir rOStm << nUni;
1422cdf0e10cSrcweir }
1423cdf0e10cSrcweir }
1424cdf0e10cSrcweir
1425cdf0e10cSrcweir // ------------------------------------------------------------------------
1426cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData * pData)1427cdf0e10cSrcweir void MetaTextArrayAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
1428cdf0e10cSrcweir {
1429cdf0e10cSrcweir sal_uInt32 nAryLen;
1430cdf0e10cSrcweir
1431cdf0e10cSrcweir delete[] mpDXAry;
1432cdf0e10cSrcweir
1433cdf0e10cSrcweir COMPAT( rIStm );
1434cdf0e10cSrcweir rIStm >> maStartPt;
1435cdf0e10cSrcweir rIStm.ReadByteString( maStr, pData->meActualCharSet );
1436cdf0e10cSrcweir rIStm >> mnIndex;
1437cdf0e10cSrcweir rIStm >> mnLen;
1438cdf0e10cSrcweir rIStm >> nAryLen;
1439cdf0e10cSrcweir
1440cdf0e10cSrcweir if ( mnIndex + mnLen > maStr.Len() )
1441cdf0e10cSrcweir {
1442cdf0e10cSrcweir mnIndex = 0;
1443cdf0e10cSrcweir mpDXAry = 0;
1444cdf0e10cSrcweir return;
1445cdf0e10cSrcweir }
1446cdf0e10cSrcweir
1447cdf0e10cSrcweir if( nAryLen )
1448cdf0e10cSrcweir {
1449cdf0e10cSrcweir // #i9762#, #106172# Ensure that DX array is at least mnLen entries long
1450cdf0e10cSrcweir if ( mnLen >= nAryLen )
1451cdf0e10cSrcweir {
1452cdf0e10cSrcweir mpDXAry = new (std::nothrow)sal_Int32[ mnLen ];
1453cdf0e10cSrcweir if ( mpDXAry )
1454cdf0e10cSrcweir {
1455cdf0e10cSrcweir sal_uLong i;
1456cdf0e10cSrcweir for( i = 0UL; i < nAryLen; i++ )
1457cdf0e10cSrcweir rIStm >> mpDXAry[ i ];
1458cdf0e10cSrcweir
1459cdf0e10cSrcweir // #106172# setup remainder
1460cdf0e10cSrcweir for( ; i < mnLen; i++ )
1461cdf0e10cSrcweir mpDXAry[ i ] = 0;
1462cdf0e10cSrcweir }
1463cdf0e10cSrcweir }
1464cdf0e10cSrcweir else
1465cdf0e10cSrcweir {
1466cdf0e10cSrcweir mpDXAry = NULL;
1467cdf0e10cSrcweir return;
1468cdf0e10cSrcweir }
1469cdf0e10cSrcweir }
1470cdf0e10cSrcweir else
1471cdf0e10cSrcweir mpDXAry = NULL;
1472cdf0e10cSrcweir
1473cdf0e10cSrcweir if ( aCompat.GetVersion() >= 2 ) // Version 2
1474cdf0e10cSrcweir {
1475cdf0e10cSrcweir sal_uInt16 nLen;
1476cdf0e10cSrcweir rIStm >> nLen;
1477cdf0e10cSrcweir sal_Unicode* pBuffer = maStr.AllocBuffer( nLen );
1478cdf0e10cSrcweir while ( nLen-- )
1479cdf0e10cSrcweir rIStm >> *pBuffer++;
1480cdf0e10cSrcweir
1481cdf0e10cSrcweir if ( mnIndex + mnLen > maStr.Len() )
1482cdf0e10cSrcweir {
1483cdf0e10cSrcweir mnIndex = 0;
1484cdf0e10cSrcweir delete[] mpDXAry, mpDXAry = NULL;
1485cdf0e10cSrcweir }
1486cdf0e10cSrcweir }
1487cdf0e10cSrcweir }
1488cdf0e10cSrcweir
1489cdf0e10cSrcweir // ========================================================================
1490cdf0e10cSrcweir
IMPL_META_ACTION(StretchText,META_STRETCHTEXT_ACTION)1491cdf0e10cSrcweir IMPL_META_ACTION( StretchText, META_STRETCHTEXT_ACTION )
1492cdf0e10cSrcweir
1493cdf0e10cSrcweir // ------------------------------------------------------------------------
1494cdf0e10cSrcweir
1495cdf0e10cSrcweir MetaStretchTextAction::MetaStretchTextAction( const Point& rPt, sal_uInt32 nWidth,
1496cdf0e10cSrcweir const XubString& rStr,
1497cdf0e10cSrcweir sal_uInt16 nIndex, sal_uInt16 nLen ) :
1498cdf0e10cSrcweir MetaAction ( META_STRETCHTEXT_ACTION ),
1499cdf0e10cSrcweir maPt ( rPt ),
1500cdf0e10cSrcweir maStr ( rStr ),
1501cdf0e10cSrcweir mnWidth ( nWidth ),
1502cdf0e10cSrcweir mnIndex ( nIndex ),
1503cdf0e10cSrcweir mnLen ( nLen )
1504cdf0e10cSrcweir {
1505cdf0e10cSrcweir }
1506cdf0e10cSrcweir
1507cdf0e10cSrcweir // ------------------------------------------------------------------------
1508cdf0e10cSrcweir
Execute(OutputDevice * pOut)1509cdf0e10cSrcweir void MetaStretchTextAction::Execute( OutputDevice* pOut )
1510cdf0e10cSrcweir {
1511cdf0e10cSrcweir pOut->DrawStretchText( maPt, mnWidth, maStr, mnIndex, mnLen );
1512cdf0e10cSrcweir }
1513cdf0e10cSrcweir
1514cdf0e10cSrcweir // ------------------------------------------------------------------------
1515cdf0e10cSrcweir
Clone()1516cdf0e10cSrcweir MetaAction* MetaStretchTextAction::Clone()
1517cdf0e10cSrcweir {
1518cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaStretchTextAction( *this );
1519cdf0e10cSrcweir pClone->ResetRefCount();
1520cdf0e10cSrcweir return pClone;
1521cdf0e10cSrcweir }
1522cdf0e10cSrcweir
1523cdf0e10cSrcweir // ------------------------------------------------------------------------
1524cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)1525cdf0e10cSrcweir void MetaStretchTextAction::Move( long nHorzMove, long nVertMove )
1526cdf0e10cSrcweir {
1527cdf0e10cSrcweir maPt.Move( nHorzMove, nVertMove );
1528cdf0e10cSrcweir }
1529cdf0e10cSrcweir
1530cdf0e10cSrcweir // ------------------------------------------------------------------------
1531cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)1532cdf0e10cSrcweir void MetaStretchTextAction::Scale( double fScaleX, double fScaleY )
1533cdf0e10cSrcweir {
1534cdf0e10cSrcweir ImplScalePoint( maPt, fScaleX, fScaleY );
1535cdf0e10cSrcweir mnWidth = (sal_uLong)FRound( mnWidth * fabs(fScaleX) );
1536cdf0e10cSrcweir }
1537cdf0e10cSrcweir
1538cdf0e10cSrcweir // ------------------------------------------------------------------------
1539cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const1540cdf0e10cSrcweir sal_Bool MetaStretchTextAction::Compare( const MetaAction& rMetaAction ) const
1541cdf0e10cSrcweir {
1542cdf0e10cSrcweir return ( maPt == ((MetaStretchTextAction&)rMetaAction).maPt ) &&
1543cdf0e10cSrcweir ( maStr == ((MetaStretchTextAction&)rMetaAction).maStr ) &&
1544cdf0e10cSrcweir ( mnWidth == ((MetaStretchTextAction&)rMetaAction).mnWidth ) &&
1545cdf0e10cSrcweir ( mnIndex == ((MetaStretchTextAction&)rMetaAction).mnIndex ) &&
1546cdf0e10cSrcweir ( mnLen == ((MetaStretchTextAction&)rMetaAction).mnLen );
1547cdf0e10cSrcweir }
1548cdf0e10cSrcweir
1549cdf0e10cSrcweir // ------------------------------------------------------------------------
1550cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)1551cdf0e10cSrcweir void MetaStretchTextAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
1552cdf0e10cSrcweir {
1553cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 2, pData );
1554cdf0e10cSrcweir rOStm << maPt;
1555cdf0e10cSrcweir rOStm.WriteByteString( maStr, pData->meActualCharSet );
1556cdf0e10cSrcweir rOStm << mnWidth;
1557cdf0e10cSrcweir rOStm << mnIndex;
1558cdf0e10cSrcweir rOStm << mnLen;
1559cdf0e10cSrcweir
1560cdf0e10cSrcweir sal_uInt16 i, nLen = maStr.Len(); // version 2
1561cdf0e10cSrcweir rOStm << nLen;
1562cdf0e10cSrcweir for ( i = 0; i < nLen; i++ )
1563cdf0e10cSrcweir {
1564cdf0e10cSrcweir sal_Unicode nUni = maStr.GetChar( i );
1565cdf0e10cSrcweir rOStm << nUni;
1566cdf0e10cSrcweir }
1567cdf0e10cSrcweir }
1568cdf0e10cSrcweir
1569cdf0e10cSrcweir // ------------------------------------------------------------------------
1570cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData * pData)1571cdf0e10cSrcweir void MetaStretchTextAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
1572cdf0e10cSrcweir {
1573cdf0e10cSrcweir COMPAT( rIStm );
1574cdf0e10cSrcweir rIStm >> maPt;
1575cdf0e10cSrcweir rIStm.ReadByteString( maStr, pData->meActualCharSet );
1576cdf0e10cSrcweir rIStm >> mnWidth;
1577cdf0e10cSrcweir rIStm >> mnIndex;
1578cdf0e10cSrcweir rIStm >> mnLen;
1579cdf0e10cSrcweir
1580cdf0e10cSrcweir if ( aCompat.GetVersion() >= 2 ) // Version 2
1581cdf0e10cSrcweir {
1582cdf0e10cSrcweir sal_uInt16 nLen;
1583cdf0e10cSrcweir rIStm >> nLen;
1584cdf0e10cSrcweir sal_Unicode* pBuffer = maStr.AllocBuffer( nLen );
1585cdf0e10cSrcweir while ( nLen-- )
1586cdf0e10cSrcweir rIStm >> *pBuffer++;
1587cdf0e10cSrcweir }
1588cdf0e10cSrcweir }
1589cdf0e10cSrcweir
1590cdf0e10cSrcweir // ========================================================================
1591cdf0e10cSrcweir
IMPL_META_ACTION(TextRect,META_TEXTRECT_ACTION)1592cdf0e10cSrcweir IMPL_META_ACTION( TextRect, META_TEXTRECT_ACTION )
1593cdf0e10cSrcweir
1594cdf0e10cSrcweir // ------------------------------------------------------------------------
1595cdf0e10cSrcweir
1596cdf0e10cSrcweir MetaTextRectAction::MetaTextRectAction( const Rectangle& rRect,
1597cdf0e10cSrcweir const XubString& rStr, sal_uInt16 nStyle ) :
1598cdf0e10cSrcweir MetaAction ( META_TEXTRECT_ACTION ),
1599cdf0e10cSrcweir maRect ( rRect ),
1600cdf0e10cSrcweir maStr ( rStr ),
1601cdf0e10cSrcweir mnStyle ( nStyle )
1602cdf0e10cSrcweir {
1603cdf0e10cSrcweir }
1604cdf0e10cSrcweir
1605cdf0e10cSrcweir // ------------------------------------------------------------------------
1606cdf0e10cSrcweir
Execute(OutputDevice * pOut)1607cdf0e10cSrcweir void MetaTextRectAction::Execute( OutputDevice* pOut )
1608cdf0e10cSrcweir {
1609cdf0e10cSrcweir pOut->DrawText( maRect, maStr, mnStyle );
1610cdf0e10cSrcweir }
1611cdf0e10cSrcweir
1612cdf0e10cSrcweir // ------------------------------------------------------------------------
1613cdf0e10cSrcweir
Clone()1614cdf0e10cSrcweir MetaAction* MetaTextRectAction::Clone()
1615cdf0e10cSrcweir {
1616cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaTextRectAction( *this );
1617cdf0e10cSrcweir pClone->ResetRefCount();
1618cdf0e10cSrcweir return pClone;
1619cdf0e10cSrcweir }
1620cdf0e10cSrcweir
1621cdf0e10cSrcweir // ------------------------------------------------------------------------
1622cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)1623cdf0e10cSrcweir void MetaTextRectAction::Move( long nHorzMove, long nVertMove )
1624cdf0e10cSrcweir {
1625cdf0e10cSrcweir maRect.Move( nHorzMove, nVertMove );
1626cdf0e10cSrcweir }
1627cdf0e10cSrcweir
1628cdf0e10cSrcweir // ------------------------------------------------------------------------
1629cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)1630cdf0e10cSrcweir void MetaTextRectAction::Scale( double fScaleX, double fScaleY )
1631cdf0e10cSrcweir {
1632cdf0e10cSrcweir ImplScaleRect( maRect, fScaleX, fScaleY );
1633cdf0e10cSrcweir }
1634cdf0e10cSrcweir
1635cdf0e10cSrcweir // ------------------------------------------------------------------------
1636cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const1637cdf0e10cSrcweir sal_Bool MetaTextRectAction::Compare( const MetaAction& rMetaAction ) const
1638cdf0e10cSrcweir {
1639cdf0e10cSrcweir return ( maRect == ((MetaTextRectAction&)rMetaAction).maRect ) &&
1640cdf0e10cSrcweir ( maStr == ((MetaTextRectAction&)rMetaAction).maStr ) &&
1641cdf0e10cSrcweir ( mnStyle == ((MetaTextRectAction&)rMetaAction).mnStyle );
1642cdf0e10cSrcweir }
1643cdf0e10cSrcweir
1644cdf0e10cSrcweir // ------------------------------------------------------------------------
1645cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)1646cdf0e10cSrcweir void MetaTextRectAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
1647cdf0e10cSrcweir {
1648cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 2, pData );
1649cdf0e10cSrcweir rOStm << maRect;
1650cdf0e10cSrcweir rOStm.WriteByteString( maStr, pData->meActualCharSet );
1651cdf0e10cSrcweir rOStm << mnStyle;
1652cdf0e10cSrcweir
1653cdf0e10cSrcweir sal_uInt16 i, nLen = maStr.Len(); // version 2
1654cdf0e10cSrcweir rOStm << nLen;
1655cdf0e10cSrcweir for ( i = 0; i < nLen; i++ )
1656cdf0e10cSrcweir {
1657cdf0e10cSrcweir sal_Unicode nUni = maStr.GetChar( i );
1658cdf0e10cSrcweir rOStm << nUni;
1659cdf0e10cSrcweir }
1660cdf0e10cSrcweir }
1661cdf0e10cSrcweir
1662cdf0e10cSrcweir // ------------------------------------------------------------------------
1663cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData * pData)1664cdf0e10cSrcweir void MetaTextRectAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
1665cdf0e10cSrcweir {
1666cdf0e10cSrcweir COMPAT( rIStm );
1667cdf0e10cSrcweir rIStm >> maRect;
1668cdf0e10cSrcweir rIStm.ReadByteString( maStr, pData->meActualCharSet );
1669cdf0e10cSrcweir rIStm >> mnStyle;
1670cdf0e10cSrcweir
1671cdf0e10cSrcweir if ( aCompat.GetVersion() >= 2 ) // Version 2
1672cdf0e10cSrcweir {
1673cdf0e10cSrcweir sal_uInt16 nLen;
1674cdf0e10cSrcweir rIStm >> nLen;
1675cdf0e10cSrcweir sal_Unicode* pBuffer = maStr.AllocBuffer( nLen );
1676cdf0e10cSrcweir while ( nLen-- )
1677cdf0e10cSrcweir rIStm >> *pBuffer++;
1678cdf0e10cSrcweir }
1679cdf0e10cSrcweir }
1680cdf0e10cSrcweir
1681cdf0e10cSrcweir // ========================================================================
1682cdf0e10cSrcweir
IMPL_META_ACTION(TextLine,META_TEXTLINE_ACTION)1683cdf0e10cSrcweir IMPL_META_ACTION( TextLine, META_TEXTLINE_ACTION )
1684cdf0e10cSrcweir
1685cdf0e10cSrcweir // ------------------------------------------------------------------------
1686cdf0e10cSrcweir
1687cdf0e10cSrcweir MetaTextLineAction::MetaTextLineAction( const Point& rPos, long nWidth,
1688cdf0e10cSrcweir FontStrikeout eStrikeout,
1689cdf0e10cSrcweir FontUnderline eUnderline,
1690cdf0e10cSrcweir FontUnderline eOverline ) :
1691cdf0e10cSrcweir MetaAction ( META_TEXTLINE_ACTION ),
1692cdf0e10cSrcweir maPos ( rPos ),
1693cdf0e10cSrcweir mnWidth ( nWidth ),
1694cdf0e10cSrcweir meStrikeout ( eStrikeout ),
1695cdf0e10cSrcweir meUnderline ( eUnderline ),
1696cdf0e10cSrcweir meOverline ( eOverline )
1697cdf0e10cSrcweir {
1698cdf0e10cSrcweir }
1699cdf0e10cSrcweir
1700cdf0e10cSrcweir // ------------------------------------------------------------------------
1701cdf0e10cSrcweir
Execute(OutputDevice * pOut)1702cdf0e10cSrcweir void MetaTextLineAction::Execute( OutputDevice* pOut )
1703cdf0e10cSrcweir {
1704cdf0e10cSrcweir pOut->DrawTextLine( maPos, mnWidth, meStrikeout, meUnderline, meOverline );
1705cdf0e10cSrcweir }
1706cdf0e10cSrcweir
1707cdf0e10cSrcweir // ------------------------------------------------------------------------
1708cdf0e10cSrcweir
Clone()1709cdf0e10cSrcweir MetaAction* MetaTextLineAction::Clone()
1710cdf0e10cSrcweir {
1711cdf0e10cSrcweir MetaAction* pClone = (MetaAction*)new MetaTextLineAction( *this );
1712cdf0e10cSrcweir pClone->ResetRefCount();
1713cdf0e10cSrcweir return pClone;
1714cdf0e10cSrcweir }
1715cdf0e10cSrcweir
1716cdf0e10cSrcweir // ------------------------------------------------------------------------
1717cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)1718cdf0e10cSrcweir void MetaTextLineAction::Move( long nHorzMove, long nVertMove )
1719cdf0e10cSrcweir {
1720cdf0e10cSrcweir maPos.Move( nHorzMove, nVertMove );
1721cdf0e10cSrcweir }
1722cdf0e10cSrcweir
1723cdf0e10cSrcweir // ------------------------------------------------------------------------
1724cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)1725cdf0e10cSrcweir void MetaTextLineAction::Scale( double fScaleX, double fScaleY )
1726cdf0e10cSrcweir {
1727cdf0e10cSrcweir ImplScalePoint( maPos, fScaleX, fScaleY );
1728cdf0e10cSrcweir mnWidth = FRound( mnWidth * fabs(fScaleX) );
1729cdf0e10cSrcweir }
1730cdf0e10cSrcweir
1731cdf0e10cSrcweir // ------------------------------------------------------------------------
1732cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const1733cdf0e10cSrcweir sal_Bool MetaTextLineAction::Compare( const MetaAction& rMetaAction ) const
1734cdf0e10cSrcweir {
1735cdf0e10cSrcweir return ( maPos == ((MetaTextLineAction&)rMetaAction).maPos ) &&
1736cdf0e10cSrcweir ( mnWidth == ((MetaTextLineAction&)rMetaAction).mnWidth ) &&
1737cdf0e10cSrcweir ( meStrikeout == ((MetaTextLineAction&)rMetaAction).meStrikeout ) &&
1738cdf0e10cSrcweir ( meUnderline == ((MetaTextLineAction&)rMetaAction).meUnderline ) &&
1739cdf0e10cSrcweir ( meOverline == ((MetaTextLineAction&)rMetaAction).meOverline );
1740cdf0e10cSrcweir }
1741cdf0e10cSrcweir
1742cdf0e10cSrcweir // ------------------------------------------------------------------------
1743cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)1744cdf0e10cSrcweir void MetaTextLineAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
1745cdf0e10cSrcweir {
1746cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 2, pData );
1747cdf0e10cSrcweir
1748cdf0e10cSrcweir rOStm << maPos;
1749cdf0e10cSrcweir rOStm << mnWidth;
1750cdf0e10cSrcweir rOStm << static_cast<sal_uInt32>(meStrikeout);
1751cdf0e10cSrcweir rOStm << static_cast<sal_uInt32>(meUnderline);
1752cdf0e10cSrcweir // new in version 2
1753cdf0e10cSrcweir rOStm << static_cast<sal_uInt32>(meOverline);
1754cdf0e10cSrcweir }
1755cdf0e10cSrcweir
1756cdf0e10cSrcweir // ------------------------------------------------------------------------
1757cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)1758cdf0e10cSrcweir void MetaTextLineAction::Read( SvStream& rIStm, ImplMetaReadData* )
1759cdf0e10cSrcweir {
1760cdf0e10cSrcweir COMPAT( rIStm );
1761cdf0e10cSrcweir
1762cdf0e10cSrcweir sal_uInt32 nTemp;
1763cdf0e10cSrcweir rIStm >> maPos;
1764cdf0e10cSrcweir rIStm >> mnWidth;
1765cdf0e10cSrcweir rIStm >> nTemp;
1766cdf0e10cSrcweir meStrikeout = (FontStrikeout)nTemp;
1767cdf0e10cSrcweir rIStm >> nTemp;
1768cdf0e10cSrcweir meUnderline = (FontUnderline)nTemp;
1769cdf0e10cSrcweir if ( aCompat.GetVersion() >= 2 ) {
1770cdf0e10cSrcweir rIStm >> nTemp;
1771cdf0e10cSrcweir meUnderline = (FontUnderline)nTemp;
1772cdf0e10cSrcweir }
1773cdf0e10cSrcweir }
1774cdf0e10cSrcweir
1775cdf0e10cSrcweir // ========================================================================
1776cdf0e10cSrcweir
IMPL_META_ACTION(Bmp,META_BMP_ACTION)1777cdf0e10cSrcweir IMPL_META_ACTION( Bmp, META_BMP_ACTION )
1778cdf0e10cSrcweir
1779cdf0e10cSrcweir // ------------------------------------------------------------------------
1780cdf0e10cSrcweir
1781cdf0e10cSrcweir MetaBmpAction::MetaBmpAction( const Point& rPt, const Bitmap& rBmp ) :
1782cdf0e10cSrcweir MetaAction ( META_BMP_ACTION ),
1783cdf0e10cSrcweir maBmp ( rBmp ),
1784cdf0e10cSrcweir maPt ( rPt )
1785cdf0e10cSrcweir {
1786cdf0e10cSrcweir }
1787cdf0e10cSrcweir
1788cdf0e10cSrcweir // ------------------------------------------------------------------------
1789cdf0e10cSrcweir
Execute(OutputDevice * pOut)1790cdf0e10cSrcweir void MetaBmpAction::Execute( OutputDevice* pOut )
1791cdf0e10cSrcweir {
1792cdf0e10cSrcweir pOut->DrawBitmap( maPt, maBmp );
1793cdf0e10cSrcweir }
1794cdf0e10cSrcweir
1795cdf0e10cSrcweir // ------------------------------------------------------------------------
1796cdf0e10cSrcweir
Clone()1797cdf0e10cSrcweir MetaAction* MetaBmpAction::Clone()
1798cdf0e10cSrcweir {
1799cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaBmpAction( *this );
1800cdf0e10cSrcweir pClone->ResetRefCount();
1801cdf0e10cSrcweir return pClone;
1802cdf0e10cSrcweir }
1803cdf0e10cSrcweir
1804cdf0e10cSrcweir // ------------------------------------------------------------------------
1805cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)1806cdf0e10cSrcweir void MetaBmpAction::Move( long nHorzMove, long nVertMove )
1807cdf0e10cSrcweir {
1808cdf0e10cSrcweir maPt.Move( nHorzMove, nVertMove );
1809cdf0e10cSrcweir }
1810cdf0e10cSrcweir
1811cdf0e10cSrcweir // ------------------------------------------------------------------------
1812cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)1813cdf0e10cSrcweir void MetaBmpAction::Scale( double fScaleX, double fScaleY )
1814cdf0e10cSrcweir {
1815cdf0e10cSrcweir ImplScalePoint( maPt, fScaleX, fScaleY );
1816cdf0e10cSrcweir }
1817cdf0e10cSrcweir
1818cdf0e10cSrcweir // ------------------------------------------------------------------------
1819cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const1820cdf0e10cSrcweir sal_Bool MetaBmpAction::Compare( const MetaAction& rMetaAction ) const
1821cdf0e10cSrcweir {
1822cdf0e10cSrcweir return maBmp.IsEqual(((MetaBmpAction&)rMetaAction).maBmp ) &&
1823cdf0e10cSrcweir ( maPt == ((MetaBmpAction&)rMetaAction).maPt );
1824cdf0e10cSrcweir }
1825cdf0e10cSrcweir
1826cdf0e10cSrcweir // ------------------------------------------------------------------------
1827cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)1828cdf0e10cSrcweir void MetaBmpAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
1829cdf0e10cSrcweir {
1830cdf0e10cSrcweir if( !!maBmp )
1831cdf0e10cSrcweir {
1832cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
183345fd3b9aSArmin Le Grand WriteDIB(maBmp, rOStm, false, true);
183445fd3b9aSArmin Le Grand rOStm << maPt;
1835cdf0e10cSrcweir }
1836cdf0e10cSrcweir }
1837cdf0e10cSrcweir
1838cdf0e10cSrcweir // ------------------------------------------------------------------------
1839cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)1840cdf0e10cSrcweir void MetaBmpAction::Read( SvStream& rIStm, ImplMetaReadData* )
1841cdf0e10cSrcweir {
1842cdf0e10cSrcweir COMPAT( rIStm );
184345fd3b9aSArmin Le Grand ReadDIB(maBmp, rIStm, true);
184445fd3b9aSArmin Le Grand rIStm >> maPt;
1845cdf0e10cSrcweir }
1846cdf0e10cSrcweir
1847cdf0e10cSrcweir // ========================================================================
1848cdf0e10cSrcweir
IMPL_META_ACTION(BmpScale,META_BMPSCALE_ACTION)1849cdf0e10cSrcweir IMPL_META_ACTION( BmpScale, META_BMPSCALE_ACTION )
1850cdf0e10cSrcweir
1851cdf0e10cSrcweir // ------------------------------------------------------------------------
1852cdf0e10cSrcweir
1853cdf0e10cSrcweir MetaBmpScaleAction::MetaBmpScaleAction( const Point& rPt, const Size& rSz,
1854cdf0e10cSrcweir const Bitmap& rBmp ) :
1855cdf0e10cSrcweir MetaAction ( META_BMPSCALE_ACTION ),
1856cdf0e10cSrcweir maBmp ( rBmp ),
1857cdf0e10cSrcweir maPt ( rPt ),
1858cdf0e10cSrcweir maSz ( rSz )
1859cdf0e10cSrcweir {
1860cdf0e10cSrcweir }
1861cdf0e10cSrcweir
1862cdf0e10cSrcweir // ------------------------------------------------------------------------
1863cdf0e10cSrcweir
Execute(OutputDevice * pOut)1864cdf0e10cSrcweir void MetaBmpScaleAction::Execute( OutputDevice* pOut )
1865cdf0e10cSrcweir {
1866cdf0e10cSrcweir pOut->DrawBitmap( maPt, maSz, maBmp );
1867cdf0e10cSrcweir }
1868cdf0e10cSrcweir
1869cdf0e10cSrcweir // ------------------------------------------------------------------------
1870cdf0e10cSrcweir
Clone()1871cdf0e10cSrcweir MetaAction* MetaBmpScaleAction::Clone()
1872cdf0e10cSrcweir {
1873cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaBmpScaleAction( *this );
1874cdf0e10cSrcweir pClone->ResetRefCount();
1875cdf0e10cSrcweir return pClone;
1876cdf0e10cSrcweir }
1877cdf0e10cSrcweir
1878cdf0e10cSrcweir // ------------------------------------------------------------------------
1879cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)1880cdf0e10cSrcweir void MetaBmpScaleAction::Move( long nHorzMove, long nVertMove )
1881cdf0e10cSrcweir {
1882cdf0e10cSrcweir maPt.Move( nHorzMove, nVertMove );
1883cdf0e10cSrcweir }
1884cdf0e10cSrcweir
1885cdf0e10cSrcweir // ------------------------------------------------------------------------
1886cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)1887cdf0e10cSrcweir void MetaBmpScaleAction::Scale( double fScaleX, double fScaleY )
1888cdf0e10cSrcweir {
1889cdf0e10cSrcweir Rectangle aRectangle(maPt, maSz);
1890cdf0e10cSrcweir ImplScaleRect( aRectangle, fScaleX, fScaleY );
1891cdf0e10cSrcweir maPt = aRectangle.TopLeft();
1892cdf0e10cSrcweir maSz = aRectangle.GetSize();
1893cdf0e10cSrcweir }
1894cdf0e10cSrcweir
1895cdf0e10cSrcweir // ------------------------------------------------------------------------
1896cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const1897cdf0e10cSrcweir sal_Bool MetaBmpScaleAction::Compare( const MetaAction& rMetaAction ) const
1898cdf0e10cSrcweir {
1899cdf0e10cSrcweir return ( maBmp.IsEqual(((MetaBmpScaleAction&)rMetaAction).maBmp )) &&
1900cdf0e10cSrcweir ( maPt == ((MetaBmpScaleAction&)rMetaAction).maPt ) &&
1901cdf0e10cSrcweir ( maSz == ((MetaBmpScaleAction&)rMetaAction).maSz );
1902cdf0e10cSrcweir }
1903cdf0e10cSrcweir
1904cdf0e10cSrcweir // ------------------------------------------------------------------------
1905cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)1906cdf0e10cSrcweir void MetaBmpScaleAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
1907cdf0e10cSrcweir {
1908cdf0e10cSrcweir if( !!maBmp )
1909cdf0e10cSrcweir {
1910cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
191145fd3b9aSArmin Le Grand WriteDIB(maBmp, rOStm, false, true);
191245fd3b9aSArmin Le Grand rOStm << maPt << maSz;
1913cdf0e10cSrcweir }
1914cdf0e10cSrcweir }
1915cdf0e10cSrcweir
1916cdf0e10cSrcweir // ------------------------------------------------------------------------
1917cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)1918cdf0e10cSrcweir void MetaBmpScaleAction::Read( SvStream& rIStm, ImplMetaReadData* )
1919cdf0e10cSrcweir {
1920cdf0e10cSrcweir COMPAT( rIStm );
192145fd3b9aSArmin Le Grand ReadDIB(maBmp, rIStm, true);
192245fd3b9aSArmin Le Grand rIStm >> maPt >> maSz;
1923cdf0e10cSrcweir }
1924cdf0e10cSrcweir
1925cdf0e10cSrcweir // ========================================================================
1926cdf0e10cSrcweir
IMPL_META_ACTION(BmpScalePart,META_BMPSCALEPART_ACTION)1927cdf0e10cSrcweir IMPL_META_ACTION( BmpScalePart, META_BMPSCALEPART_ACTION )
1928cdf0e10cSrcweir
1929cdf0e10cSrcweir // ------------------------------------------------------------------------
1930cdf0e10cSrcweir
1931cdf0e10cSrcweir MetaBmpScalePartAction::MetaBmpScalePartAction( const Point& rDstPt, const Size& rDstSz,
1932cdf0e10cSrcweir const Point& rSrcPt, const Size& rSrcSz,
1933cdf0e10cSrcweir const Bitmap& rBmp ) :
1934cdf0e10cSrcweir MetaAction ( META_BMPSCALEPART_ACTION ),
1935cdf0e10cSrcweir maBmp ( rBmp ),
1936cdf0e10cSrcweir maDstPt ( rDstPt ),
1937cdf0e10cSrcweir maDstSz ( rDstSz ),
1938cdf0e10cSrcweir maSrcPt ( rSrcPt ),
1939cdf0e10cSrcweir maSrcSz ( rSrcSz )
1940cdf0e10cSrcweir {
1941cdf0e10cSrcweir }
1942cdf0e10cSrcweir
1943cdf0e10cSrcweir // ------------------------------------------------------------------------
1944cdf0e10cSrcweir
Execute(OutputDevice * pOut)1945cdf0e10cSrcweir void MetaBmpScalePartAction::Execute( OutputDevice* pOut )
1946cdf0e10cSrcweir {
1947cdf0e10cSrcweir pOut->DrawBitmap( maDstPt, maDstSz, maSrcPt, maSrcSz, maBmp );
1948cdf0e10cSrcweir }
1949cdf0e10cSrcweir
1950cdf0e10cSrcweir // ------------------------------------------------------------------------
1951cdf0e10cSrcweir
Clone()1952cdf0e10cSrcweir MetaAction* MetaBmpScalePartAction::Clone()
1953cdf0e10cSrcweir {
1954cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaBmpScalePartAction( *this );
1955cdf0e10cSrcweir pClone->ResetRefCount();
1956cdf0e10cSrcweir return pClone;
1957cdf0e10cSrcweir }
1958cdf0e10cSrcweir
1959cdf0e10cSrcweir // ------------------------------------------------------------------------
1960cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)1961cdf0e10cSrcweir void MetaBmpScalePartAction::Move( long nHorzMove, long nVertMove )
1962cdf0e10cSrcweir {
1963cdf0e10cSrcweir maDstPt.Move( nHorzMove, nVertMove );
1964cdf0e10cSrcweir }
1965cdf0e10cSrcweir
1966cdf0e10cSrcweir // ------------------------------------------------------------------------
1967cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)1968cdf0e10cSrcweir void MetaBmpScalePartAction::Scale( double fScaleX, double fScaleY )
1969cdf0e10cSrcweir {
1970cdf0e10cSrcweir Rectangle aRectangle(maDstPt, maDstSz);
1971cdf0e10cSrcweir ImplScaleRect( aRectangle, fScaleX, fScaleY );
1972cdf0e10cSrcweir maDstPt = aRectangle.TopLeft();
1973cdf0e10cSrcweir maDstSz = aRectangle.GetSize();
1974cdf0e10cSrcweir }
1975cdf0e10cSrcweir
1976cdf0e10cSrcweir // ------------------------------------------------------------------------
1977cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const1978cdf0e10cSrcweir sal_Bool MetaBmpScalePartAction::Compare( const MetaAction& rMetaAction ) const
1979cdf0e10cSrcweir {
1980cdf0e10cSrcweir return ( maBmp.IsEqual(((MetaBmpScalePartAction&)rMetaAction).maBmp )) &&
1981cdf0e10cSrcweir ( maDstPt == ((MetaBmpScalePartAction&)rMetaAction).maDstPt ) &&
1982cdf0e10cSrcweir ( maDstSz == ((MetaBmpScalePartAction&)rMetaAction).maDstSz ) &&
1983cdf0e10cSrcweir ( maSrcPt == ((MetaBmpScalePartAction&)rMetaAction).maSrcPt ) &&
1984cdf0e10cSrcweir ( maSrcSz == ((MetaBmpScalePartAction&)rMetaAction).maSrcSz );
1985cdf0e10cSrcweir }
1986cdf0e10cSrcweir
1987cdf0e10cSrcweir // ------------------------------------------------------------------------
1988cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)1989cdf0e10cSrcweir void MetaBmpScalePartAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
1990cdf0e10cSrcweir {
1991cdf0e10cSrcweir if( !!maBmp )
1992cdf0e10cSrcweir {
1993cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
199445fd3b9aSArmin Le Grand WriteDIB(maBmp, rOStm, false, true);
199545fd3b9aSArmin Le Grand rOStm << maDstPt << maDstSz << maSrcPt << maSrcSz;
1996cdf0e10cSrcweir }
1997cdf0e10cSrcweir }
1998cdf0e10cSrcweir
1999cdf0e10cSrcweir // ------------------------------------------------------------------------
2000cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)2001cdf0e10cSrcweir void MetaBmpScalePartAction::Read( SvStream& rIStm, ImplMetaReadData* )
2002cdf0e10cSrcweir {
2003cdf0e10cSrcweir COMPAT( rIStm );
200445fd3b9aSArmin Le Grand ReadDIB(maBmp, rIStm, true);
200545fd3b9aSArmin Le Grand rIStm >> maDstPt >> maDstSz >> maSrcPt >> maSrcSz;
2006cdf0e10cSrcweir }
2007cdf0e10cSrcweir
2008cdf0e10cSrcweir // ========================================================================
2009cdf0e10cSrcweir
IMPL_META_ACTION(BmpEx,META_BMPEX_ACTION)2010cdf0e10cSrcweir IMPL_META_ACTION( BmpEx, META_BMPEX_ACTION )
2011cdf0e10cSrcweir
2012cdf0e10cSrcweir // ------------------------------------------------------------------------
2013cdf0e10cSrcweir
2014cdf0e10cSrcweir MetaBmpExAction::MetaBmpExAction( const Point& rPt, const BitmapEx& rBmpEx ) :
2015cdf0e10cSrcweir MetaAction ( META_BMPEX_ACTION ),
2016cdf0e10cSrcweir maBmpEx ( rBmpEx ),
2017cdf0e10cSrcweir maPt ( rPt )
2018cdf0e10cSrcweir {
2019cdf0e10cSrcweir }
2020cdf0e10cSrcweir
2021cdf0e10cSrcweir // ------------------------------------------------------------------------
2022cdf0e10cSrcweir
Execute(OutputDevice * pOut)2023cdf0e10cSrcweir void MetaBmpExAction::Execute( OutputDevice* pOut )
2024cdf0e10cSrcweir {
2025cdf0e10cSrcweir pOut->DrawBitmapEx( maPt, maBmpEx );
2026cdf0e10cSrcweir }
2027cdf0e10cSrcweir
2028cdf0e10cSrcweir // ------------------------------------------------------------------------
2029cdf0e10cSrcweir
Clone()2030cdf0e10cSrcweir MetaAction* MetaBmpExAction::Clone()
2031cdf0e10cSrcweir {
2032ddde725dSArmin Le Grand MetaBmpExAction* pClone = new MetaBmpExAction( *this );
2033cdf0e10cSrcweir pClone->ResetRefCount();
2034cdf0e10cSrcweir return pClone;
2035cdf0e10cSrcweir }
2036cdf0e10cSrcweir
2037cdf0e10cSrcweir // ------------------------------------------------------------------------
2038cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)2039cdf0e10cSrcweir void MetaBmpExAction::Move( long nHorzMove, long nVertMove )
2040cdf0e10cSrcweir {
2041cdf0e10cSrcweir maPt.Move( nHorzMove, nVertMove );
2042cdf0e10cSrcweir }
2043cdf0e10cSrcweir
2044cdf0e10cSrcweir // ------------------------------------------------------------------------
2045cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)2046cdf0e10cSrcweir void MetaBmpExAction::Scale( double fScaleX, double fScaleY )
2047cdf0e10cSrcweir {
2048cdf0e10cSrcweir ImplScalePoint( maPt, fScaleX, fScaleY );
2049cdf0e10cSrcweir }
2050cdf0e10cSrcweir
2051cdf0e10cSrcweir // ------------------------------------------------------------------------
2052cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const2053cdf0e10cSrcweir sal_Bool MetaBmpExAction::Compare( const MetaAction& rMetaAction ) const
2054cdf0e10cSrcweir {
2055cdf0e10cSrcweir return ( maBmpEx.IsEqual(((MetaBmpExAction&)rMetaAction).maBmpEx )) &&
2056cdf0e10cSrcweir ( maPt == ((MetaBmpExAction&)rMetaAction).maPt );
2057cdf0e10cSrcweir }
2058cdf0e10cSrcweir
2059cdf0e10cSrcweir // ------------------------------------------------------------------------
2060cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)2061cdf0e10cSrcweir void MetaBmpExAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
2062cdf0e10cSrcweir {
2063cdf0e10cSrcweir if( !!maBmpEx.GetBitmap() )
2064cdf0e10cSrcweir {
2065cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
206645fd3b9aSArmin Le Grand WriteDIBBitmapEx(maBmpEx, rOStm);
206745fd3b9aSArmin Le Grand rOStm << maPt;
2068cdf0e10cSrcweir }
2069cdf0e10cSrcweir }
2070cdf0e10cSrcweir
2071cdf0e10cSrcweir // ------------------------------------------------------------------------
2072cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)2073cdf0e10cSrcweir void MetaBmpExAction::Read( SvStream& rIStm, ImplMetaReadData* )
2074cdf0e10cSrcweir {
2075cdf0e10cSrcweir COMPAT( rIStm );
207645fd3b9aSArmin Le Grand ReadDIBBitmapEx(maBmpEx, rIStm);
207745fd3b9aSArmin Le Grand rIStm >> maPt;
2078cdf0e10cSrcweir }
2079cdf0e10cSrcweir
2080cdf0e10cSrcweir // ========================================================================
2081cdf0e10cSrcweir
IMPL_META_ACTION(BmpExScale,META_BMPEXSCALE_ACTION)2082cdf0e10cSrcweir IMPL_META_ACTION( BmpExScale, META_BMPEXSCALE_ACTION )
2083cdf0e10cSrcweir
2084cdf0e10cSrcweir // ------------------------------------------------------------------------
2085cdf0e10cSrcweir
2086cdf0e10cSrcweir MetaBmpExScaleAction::MetaBmpExScaleAction( const Point& rPt, const Size& rSz,
2087cdf0e10cSrcweir const BitmapEx& rBmpEx ) :
2088cdf0e10cSrcweir MetaAction ( META_BMPEXSCALE_ACTION ),
2089cdf0e10cSrcweir maBmpEx ( rBmpEx ),
2090cdf0e10cSrcweir maPt ( rPt ),
2091cdf0e10cSrcweir maSz ( rSz )
2092cdf0e10cSrcweir {
2093cdf0e10cSrcweir }
2094cdf0e10cSrcweir
2095cdf0e10cSrcweir // ------------------------------------------------------------------------
2096cdf0e10cSrcweir
Execute(OutputDevice * pOut)2097cdf0e10cSrcweir void MetaBmpExScaleAction::Execute( OutputDevice* pOut )
2098cdf0e10cSrcweir {
2099cdf0e10cSrcweir pOut->DrawBitmapEx( maPt, maSz, maBmpEx );
2100cdf0e10cSrcweir }
2101cdf0e10cSrcweir
2102cdf0e10cSrcweir // ------------------------------------------------------------------------
2103cdf0e10cSrcweir
Clone()2104cdf0e10cSrcweir MetaAction* MetaBmpExScaleAction::Clone()
2105cdf0e10cSrcweir {
2106cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaBmpExScaleAction( *this );
2107cdf0e10cSrcweir pClone->ResetRefCount();
2108cdf0e10cSrcweir return pClone;
2109cdf0e10cSrcweir }
2110cdf0e10cSrcweir
2111cdf0e10cSrcweir // ------------------------------------------------------------------------
2112cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)2113cdf0e10cSrcweir void MetaBmpExScaleAction::Move( long nHorzMove, long nVertMove )
2114cdf0e10cSrcweir {
2115cdf0e10cSrcweir maPt.Move( nHorzMove, nVertMove );
2116cdf0e10cSrcweir }
2117cdf0e10cSrcweir
2118cdf0e10cSrcweir // ------------------------------------------------------------------------
2119cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)2120cdf0e10cSrcweir void MetaBmpExScaleAction::Scale( double fScaleX, double fScaleY )
2121cdf0e10cSrcweir {
2122cdf0e10cSrcweir Rectangle aRectangle(maPt, maSz);
2123cdf0e10cSrcweir ImplScaleRect( aRectangle, fScaleX, fScaleY );
2124cdf0e10cSrcweir maPt = aRectangle.TopLeft();
2125cdf0e10cSrcweir maSz = aRectangle.GetSize();
2126cdf0e10cSrcweir }
2127cdf0e10cSrcweir
2128cdf0e10cSrcweir // ------------------------------------------------------------------------
2129cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const2130cdf0e10cSrcweir sal_Bool MetaBmpExScaleAction::Compare( const MetaAction& rMetaAction ) const
2131cdf0e10cSrcweir {
2132cdf0e10cSrcweir return ( maBmpEx.IsEqual(((MetaBmpExScaleAction&)rMetaAction).maBmpEx )) &&
2133cdf0e10cSrcweir ( maPt == ((MetaBmpExScaleAction&)rMetaAction).maPt ) &&
2134cdf0e10cSrcweir ( maSz == ((MetaBmpExScaleAction&)rMetaAction).maSz );
2135cdf0e10cSrcweir }
2136cdf0e10cSrcweir
2137cdf0e10cSrcweir // ------------------------------------------------------------------------
2138cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)2139cdf0e10cSrcweir void MetaBmpExScaleAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
2140cdf0e10cSrcweir {
2141cdf0e10cSrcweir if( !!maBmpEx.GetBitmap() )
2142cdf0e10cSrcweir {
2143cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
214445fd3b9aSArmin Le Grand WriteDIBBitmapEx(maBmpEx, rOStm);
214545fd3b9aSArmin Le Grand rOStm << maPt << maSz;
2146cdf0e10cSrcweir }
2147cdf0e10cSrcweir }
2148cdf0e10cSrcweir
2149cdf0e10cSrcweir // ------------------------------------------------------------------------
2150cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)2151cdf0e10cSrcweir void MetaBmpExScaleAction::Read( SvStream& rIStm, ImplMetaReadData* )
2152cdf0e10cSrcweir {
2153cdf0e10cSrcweir COMPAT( rIStm );
215445fd3b9aSArmin Le Grand ReadDIBBitmapEx(maBmpEx, rIStm);
215545fd3b9aSArmin Le Grand rIStm >> maPt >> maSz;
2156cdf0e10cSrcweir }
2157cdf0e10cSrcweir
2158cdf0e10cSrcweir // ========================================================================
2159cdf0e10cSrcweir
IMPL_META_ACTION(BmpExScalePart,META_BMPEXSCALEPART_ACTION)2160cdf0e10cSrcweir IMPL_META_ACTION( BmpExScalePart, META_BMPEXSCALEPART_ACTION )
2161cdf0e10cSrcweir
2162cdf0e10cSrcweir // ------------------------------------------------------------------------
2163cdf0e10cSrcweir
2164cdf0e10cSrcweir MetaBmpExScalePartAction::MetaBmpExScalePartAction( const Point& rDstPt, const Size& rDstSz,
2165cdf0e10cSrcweir const Point& rSrcPt, const Size& rSrcSz,
2166cdf0e10cSrcweir const BitmapEx& rBmpEx ) :
2167cdf0e10cSrcweir MetaAction ( META_BMPEXSCALEPART_ACTION ),
2168cdf0e10cSrcweir maBmpEx ( rBmpEx ),
2169cdf0e10cSrcweir maDstPt ( rDstPt ),
2170cdf0e10cSrcweir maDstSz ( rDstSz ),
2171cdf0e10cSrcweir maSrcPt ( rSrcPt ),
2172cdf0e10cSrcweir maSrcSz ( rSrcSz )
2173cdf0e10cSrcweir {
2174cdf0e10cSrcweir }
2175cdf0e10cSrcweir
2176cdf0e10cSrcweir // ------------------------------------------------------------------------
2177cdf0e10cSrcweir
Execute(OutputDevice * pOut)2178cdf0e10cSrcweir void MetaBmpExScalePartAction::Execute( OutputDevice* pOut )
2179cdf0e10cSrcweir {
2180cdf0e10cSrcweir pOut->DrawBitmapEx( maDstPt, maDstSz, maSrcPt, maSrcSz, maBmpEx );
2181cdf0e10cSrcweir }
2182cdf0e10cSrcweir
2183cdf0e10cSrcweir // ------------------------------------------------------------------------
2184cdf0e10cSrcweir
Clone()2185cdf0e10cSrcweir MetaAction* MetaBmpExScalePartAction::Clone()
2186cdf0e10cSrcweir {
2187cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaBmpExScalePartAction( *this );
2188cdf0e10cSrcweir pClone->ResetRefCount();
2189cdf0e10cSrcweir return pClone;
2190cdf0e10cSrcweir }
2191cdf0e10cSrcweir
2192cdf0e10cSrcweir // ------------------------------------------------------------------------
2193cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)2194cdf0e10cSrcweir void MetaBmpExScalePartAction::Move( long nHorzMove, long nVertMove )
2195cdf0e10cSrcweir {
2196cdf0e10cSrcweir maDstPt.Move( nHorzMove, nVertMove );
2197cdf0e10cSrcweir }
2198cdf0e10cSrcweir
2199cdf0e10cSrcweir // ------------------------------------------------------------------------
2200cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)2201cdf0e10cSrcweir void MetaBmpExScalePartAction::Scale( double fScaleX, double fScaleY )
2202cdf0e10cSrcweir {
2203cdf0e10cSrcweir Rectangle aRectangle(maDstPt, maDstSz);
2204cdf0e10cSrcweir ImplScaleRect( aRectangle, fScaleX, fScaleY );
2205cdf0e10cSrcweir maDstPt = aRectangle.TopLeft();
2206cdf0e10cSrcweir maDstSz = aRectangle.GetSize();
2207cdf0e10cSrcweir }
2208cdf0e10cSrcweir
2209cdf0e10cSrcweir // ------------------------------------------------------------------------
2210cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const2211cdf0e10cSrcweir sal_Bool MetaBmpExScalePartAction::Compare( const MetaAction& rMetaAction ) const
2212cdf0e10cSrcweir {
2213cdf0e10cSrcweir return ( maBmpEx.IsEqual(((MetaBmpExScalePartAction&)rMetaAction).maBmpEx )) &&
2214cdf0e10cSrcweir ( maDstPt == ((MetaBmpExScalePartAction&)rMetaAction).maDstPt ) &&
2215cdf0e10cSrcweir ( maDstSz == ((MetaBmpExScalePartAction&)rMetaAction).maDstSz ) &&
2216cdf0e10cSrcweir ( maSrcPt == ((MetaBmpExScalePartAction&)rMetaAction).maSrcPt ) &&
2217cdf0e10cSrcweir ( maSrcSz == ((MetaBmpExScalePartAction&)rMetaAction).maSrcSz );
2218cdf0e10cSrcweir }
2219cdf0e10cSrcweir
2220cdf0e10cSrcweir // ------------------------------------------------------------------------
2221cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)2222cdf0e10cSrcweir void MetaBmpExScalePartAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
2223cdf0e10cSrcweir {
2224cdf0e10cSrcweir if( !!maBmpEx.GetBitmap() )
2225cdf0e10cSrcweir {
2226cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
222745fd3b9aSArmin Le Grand WriteDIBBitmapEx(maBmpEx, rOStm);
222845fd3b9aSArmin Le Grand rOStm << maDstPt << maDstSz << maSrcPt << maSrcSz;
2229cdf0e10cSrcweir }
2230cdf0e10cSrcweir }
2231cdf0e10cSrcweir
2232cdf0e10cSrcweir // ------------------------------------------------------------------------
2233cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)2234cdf0e10cSrcweir void MetaBmpExScalePartAction::Read( SvStream& rIStm, ImplMetaReadData* )
2235cdf0e10cSrcweir {
2236cdf0e10cSrcweir COMPAT( rIStm );
223745fd3b9aSArmin Le Grand ReadDIBBitmapEx(maBmpEx, rIStm);
223845fd3b9aSArmin Le Grand rIStm >> maDstPt >> maDstSz >> maSrcPt >> maSrcSz;
2239cdf0e10cSrcweir }
2240cdf0e10cSrcweir
2241cdf0e10cSrcweir // ========================================================================
2242cdf0e10cSrcweir
IMPL_META_ACTION(Mask,META_MASK_ACTION)2243cdf0e10cSrcweir IMPL_META_ACTION( Mask, META_MASK_ACTION )
2244cdf0e10cSrcweir
2245cdf0e10cSrcweir // ------------------------------------------------------------------------
2246cdf0e10cSrcweir
2247cdf0e10cSrcweir MetaMaskAction::MetaMaskAction( const Point& rPt,
2248cdf0e10cSrcweir const Bitmap& rBmp,
2249cdf0e10cSrcweir const Color& rColor ) :
2250cdf0e10cSrcweir MetaAction ( META_MASK_ACTION ),
2251cdf0e10cSrcweir maBmp ( rBmp ),
2252cdf0e10cSrcweir maColor ( rColor ),
2253cdf0e10cSrcweir maPt ( rPt )
2254cdf0e10cSrcweir {
2255cdf0e10cSrcweir }
2256cdf0e10cSrcweir
2257cdf0e10cSrcweir // ------------------------------------------------------------------------
2258cdf0e10cSrcweir
Execute(OutputDevice * pOut)2259cdf0e10cSrcweir void MetaMaskAction::Execute( OutputDevice* pOut )
2260cdf0e10cSrcweir {
2261cdf0e10cSrcweir pOut->DrawMask( maPt, maBmp, maColor );
2262cdf0e10cSrcweir }
2263cdf0e10cSrcweir
2264cdf0e10cSrcweir // ------------------------------------------------------------------------
2265cdf0e10cSrcweir
Clone()2266cdf0e10cSrcweir MetaAction* MetaMaskAction::Clone()
2267cdf0e10cSrcweir {
2268cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaMaskAction( *this );
2269cdf0e10cSrcweir pClone->ResetRefCount();
2270cdf0e10cSrcweir return pClone;
2271cdf0e10cSrcweir }
2272cdf0e10cSrcweir
2273cdf0e10cSrcweir // ------------------------------------------------------------------------
2274cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)2275cdf0e10cSrcweir void MetaMaskAction::Move( long nHorzMove, long nVertMove )
2276cdf0e10cSrcweir {
2277cdf0e10cSrcweir maPt.Move( nHorzMove, nVertMove );
2278cdf0e10cSrcweir }
2279cdf0e10cSrcweir
2280cdf0e10cSrcweir // ------------------------------------------------------------------------
2281cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)2282cdf0e10cSrcweir void MetaMaskAction::Scale( double fScaleX, double fScaleY )
2283cdf0e10cSrcweir {
2284cdf0e10cSrcweir ImplScalePoint( maPt, fScaleX, fScaleY );
2285cdf0e10cSrcweir }
2286cdf0e10cSrcweir
2287cdf0e10cSrcweir // ------------------------------------------------------------------------
2288cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const2289cdf0e10cSrcweir sal_Bool MetaMaskAction::Compare( const MetaAction& rMetaAction ) const
2290cdf0e10cSrcweir {
2291cdf0e10cSrcweir return ( maBmp.IsEqual(((MetaMaskAction&)rMetaAction).maBmp )) &&
2292cdf0e10cSrcweir ( maColor == ((MetaMaskAction&)rMetaAction).maColor ) &&
2293cdf0e10cSrcweir ( maPt == ((MetaMaskAction&)rMetaAction).maPt );
2294cdf0e10cSrcweir }
2295cdf0e10cSrcweir
2296cdf0e10cSrcweir // ------------------------------------------------------------------------
2297cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)2298cdf0e10cSrcweir void MetaMaskAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
2299cdf0e10cSrcweir {
2300cdf0e10cSrcweir if( !!maBmp )
2301cdf0e10cSrcweir {
2302cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
230345fd3b9aSArmin Le Grand WriteDIB(maBmp, rOStm, false, true);
230445fd3b9aSArmin Le Grand rOStm << maPt;
2305cdf0e10cSrcweir }
2306cdf0e10cSrcweir }
2307cdf0e10cSrcweir
2308cdf0e10cSrcweir // ------------------------------------------------------------------------
2309cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)2310cdf0e10cSrcweir void MetaMaskAction::Read( SvStream& rIStm, ImplMetaReadData* )
2311cdf0e10cSrcweir {
2312cdf0e10cSrcweir COMPAT( rIStm );
231345fd3b9aSArmin Le Grand ReadDIB(maBmp, rIStm, true);
231445fd3b9aSArmin Le Grand rIStm >> maPt;
2315cdf0e10cSrcweir }
2316cdf0e10cSrcweir
2317cdf0e10cSrcweir // ========================================================================
2318cdf0e10cSrcweir
IMPL_META_ACTION(MaskScale,META_MASKSCALE_ACTION)2319cdf0e10cSrcweir IMPL_META_ACTION( MaskScale, META_MASKSCALE_ACTION )
2320cdf0e10cSrcweir
2321cdf0e10cSrcweir // ------------------------------------------------------------------------
2322cdf0e10cSrcweir
2323cdf0e10cSrcweir MetaMaskScaleAction::MetaMaskScaleAction( const Point& rPt, const Size& rSz,
2324cdf0e10cSrcweir const Bitmap& rBmp,
2325cdf0e10cSrcweir const Color& rColor ) :
2326cdf0e10cSrcweir MetaAction ( META_MASKSCALE_ACTION ),
2327cdf0e10cSrcweir maBmp ( rBmp ),
2328cdf0e10cSrcweir maColor ( rColor ),
2329cdf0e10cSrcweir maPt ( rPt ),
2330cdf0e10cSrcweir maSz ( rSz )
2331cdf0e10cSrcweir {
2332cdf0e10cSrcweir }
2333cdf0e10cSrcweir
2334cdf0e10cSrcweir // ------------------------------------------------------------------------
2335cdf0e10cSrcweir
Execute(OutputDevice * pOut)2336cdf0e10cSrcweir void MetaMaskScaleAction::Execute( OutputDevice* pOut )
2337cdf0e10cSrcweir {
2338cdf0e10cSrcweir pOut->DrawMask( maPt, maSz, maBmp, maColor );
2339cdf0e10cSrcweir }
2340cdf0e10cSrcweir
2341cdf0e10cSrcweir // ------------------------------------------------------------------------
2342cdf0e10cSrcweir
Clone()2343cdf0e10cSrcweir MetaAction* MetaMaskScaleAction::Clone()
2344cdf0e10cSrcweir {
2345cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaMaskScaleAction( *this );
2346cdf0e10cSrcweir pClone->ResetRefCount();
2347cdf0e10cSrcweir return pClone;
2348cdf0e10cSrcweir }
2349cdf0e10cSrcweir
2350cdf0e10cSrcweir // ------------------------------------------------------------------------
2351cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)2352cdf0e10cSrcweir void MetaMaskScaleAction::Move( long nHorzMove, long nVertMove )
2353cdf0e10cSrcweir {
2354cdf0e10cSrcweir maPt.Move( nHorzMove, nVertMove );
2355cdf0e10cSrcweir }
2356cdf0e10cSrcweir
2357cdf0e10cSrcweir // ------------------------------------------------------------------------
2358cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)2359cdf0e10cSrcweir void MetaMaskScaleAction::Scale( double fScaleX, double fScaleY )
2360cdf0e10cSrcweir {
2361cdf0e10cSrcweir Rectangle aRectangle(maPt, maSz);
2362cdf0e10cSrcweir ImplScaleRect( aRectangle, fScaleX, fScaleY );
2363cdf0e10cSrcweir maPt = aRectangle.TopLeft();
2364cdf0e10cSrcweir maSz = aRectangle.GetSize();
2365cdf0e10cSrcweir }
2366cdf0e10cSrcweir
2367cdf0e10cSrcweir // ------------------------------------------------------------------------
2368cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const2369cdf0e10cSrcweir sal_Bool MetaMaskScaleAction::Compare( const MetaAction& rMetaAction ) const
2370cdf0e10cSrcweir {
2371cdf0e10cSrcweir return ( maBmp.IsEqual(((MetaMaskScaleAction&)rMetaAction).maBmp )) &&
2372cdf0e10cSrcweir ( maColor == ((MetaMaskScaleAction&)rMetaAction).maColor ) &&
2373cdf0e10cSrcweir ( maPt == ((MetaMaskScaleAction&)rMetaAction).maPt ) &&
2374cdf0e10cSrcweir ( maSz == ((MetaMaskScaleAction&)rMetaAction).maSz );
2375cdf0e10cSrcweir }
2376cdf0e10cSrcweir
2377cdf0e10cSrcweir // ------------------------------------------------------------------------
2378cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)2379cdf0e10cSrcweir void MetaMaskScaleAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
2380cdf0e10cSrcweir {
2381cdf0e10cSrcweir if( !!maBmp )
2382cdf0e10cSrcweir {
2383cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
238445fd3b9aSArmin Le Grand WriteDIB(maBmp, rOStm, false, true);
238545fd3b9aSArmin Le Grand rOStm << maPt << maSz;
2386cdf0e10cSrcweir }
2387cdf0e10cSrcweir }
2388cdf0e10cSrcweir
2389cdf0e10cSrcweir // ------------------------------------------------------------------------
2390cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)2391cdf0e10cSrcweir void MetaMaskScaleAction::Read( SvStream& rIStm, ImplMetaReadData* )
2392cdf0e10cSrcweir {
2393cdf0e10cSrcweir COMPAT( rIStm );
239445fd3b9aSArmin Le Grand ReadDIB(maBmp, rIStm, true);
239545fd3b9aSArmin Le Grand rIStm >> maPt >> maSz;
2396cdf0e10cSrcweir }
2397cdf0e10cSrcweir
2398cdf0e10cSrcweir // ========================================================================
2399cdf0e10cSrcweir
IMPL_META_ACTION(MaskScalePart,META_MASKSCALEPART_ACTION)2400cdf0e10cSrcweir IMPL_META_ACTION( MaskScalePart, META_MASKSCALEPART_ACTION )
2401cdf0e10cSrcweir
2402cdf0e10cSrcweir // ------------------------------------------------------------------------
2403cdf0e10cSrcweir
2404cdf0e10cSrcweir MetaMaskScalePartAction::MetaMaskScalePartAction( const Point& rDstPt, const Size& rDstSz,
2405cdf0e10cSrcweir const Point& rSrcPt, const Size& rSrcSz,
2406cdf0e10cSrcweir const Bitmap& rBmp,
2407cdf0e10cSrcweir const Color& rColor ) :
2408cdf0e10cSrcweir MetaAction ( META_MASKSCALEPART_ACTION ),
2409cdf0e10cSrcweir maBmp ( rBmp ),
2410cdf0e10cSrcweir maColor ( rColor ),
2411cdf0e10cSrcweir maDstPt ( rDstPt ),
2412cdf0e10cSrcweir maDstSz ( rDstSz ),
2413cdf0e10cSrcweir maSrcPt ( rSrcPt ),
2414cdf0e10cSrcweir maSrcSz ( rSrcSz )
2415cdf0e10cSrcweir {
2416cdf0e10cSrcweir }
2417cdf0e10cSrcweir
2418cdf0e10cSrcweir // ------------------------------------------------------------------------
2419cdf0e10cSrcweir
Execute(OutputDevice * pOut)2420cdf0e10cSrcweir void MetaMaskScalePartAction::Execute( OutputDevice* pOut )
2421cdf0e10cSrcweir {
2422cdf0e10cSrcweir pOut->DrawMask( maDstPt, maDstSz, maSrcPt, maSrcSz, maBmp, maColor );
2423cdf0e10cSrcweir }
2424cdf0e10cSrcweir
2425cdf0e10cSrcweir // ------------------------------------------------------------------------
2426cdf0e10cSrcweir
Clone()2427cdf0e10cSrcweir MetaAction* MetaMaskScalePartAction::Clone()
2428cdf0e10cSrcweir {
2429cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaMaskScalePartAction( *this );
2430cdf0e10cSrcweir pClone->ResetRefCount();
2431cdf0e10cSrcweir return pClone;
2432cdf0e10cSrcweir }
2433cdf0e10cSrcweir
2434cdf0e10cSrcweir // ------------------------------------------------------------------------
2435cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)2436cdf0e10cSrcweir void MetaMaskScalePartAction::Move( long nHorzMove, long nVertMove )
2437cdf0e10cSrcweir {
2438cdf0e10cSrcweir maDstPt.Move( nHorzMove, nVertMove );
2439cdf0e10cSrcweir }
2440cdf0e10cSrcweir
2441cdf0e10cSrcweir // ------------------------------------------------------------------------
2442cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)2443cdf0e10cSrcweir void MetaMaskScalePartAction::Scale( double fScaleX, double fScaleY )
2444cdf0e10cSrcweir {
2445cdf0e10cSrcweir Rectangle aRectangle(maDstPt, maDstSz);
2446cdf0e10cSrcweir ImplScaleRect( aRectangle, fScaleX, fScaleY );
2447cdf0e10cSrcweir maDstPt = aRectangle.TopLeft();
2448cdf0e10cSrcweir maDstSz = aRectangle.GetSize();
2449cdf0e10cSrcweir }
2450cdf0e10cSrcweir
2451cdf0e10cSrcweir // ------------------------------------------------------------------------
2452cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const2453cdf0e10cSrcweir sal_Bool MetaMaskScalePartAction::Compare( const MetaAction& rMetaAction ) const
2454cdf0e10cSrcweir {
2455cdf0e10cSrcweir return ( maBmp.IsEqual(((MetaMaskScalePartAction&)rMetaAction).maBmp )) &&
2456cdf0e10cSrcweir ( maColor == ((MetaMaskScalePartAction&)rMetaAction).maColor ) &&
2457cdf0e10cSrcweir ( maDstPt == ((MetaMaskScalePartAction&)rMetaAction).maDstPt ) &&
2458cdf0e10cSrcweir ( maDstSz == ((MetaMaskScalePartAction&)rMetaAction).maDstSz ) &&
2459cdf0e10cSrcweir ( maSrcPt == ((MetaMaskScalePartAction&)rMetaAction).maSrcPt ) &&
2460cdf0e10cSrcweir ( maSrcSz == ((MetaMaskScalePartAction&)rMetaAction).maSrcSz );
2461cdf0e10cSrcweir }
2462cdf0e10cSrcweir
2463cdf0e10cSrcweir // ------------------------------------------------------------------------
2464cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)2465cdf0e10cSrcweir void MetaMaskScalePartAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
2466cdf0e10cSrcweir {
2467cdf0e10cSrcweir if( !!maBmp )
2468cdf0e10cSrcweir {
2469cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
247045fd3b9aSArmin Le Grand WriteDIB(maBmp, rOStm, false, true);
2471cdf0e10cSrcweir maColor.Write( rOStm, sal_True );
2472cdf0e10cSrcweir rOStm << maDstPt << maDstSz << maSrcPt << maSrcSz;
2473cdf0e10cSrcweir }
2474cdf0e10cSrcweir }
2475cdf0e10cSrcweir
2476cdf0e10cSrcweir // ------------------------------------------------------------------------
2477cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)2478cdf0e10cSrcweir void MetaMaskScalePartAction::Read( SvStream& rIStm, ImplMetaReadData* )
2479cdf0e10cSrcweir {
2480cdf0e10cSrcweir COMPAT( rIStm );
248145fd3b9aSArmin Le Grand ReadDIB(maBmp, rIStm, true);
2482cdf0e10cSrcweir maColor.Read( rIStm, sal_True );
2483cdf0e10cSrcweir rIStm >> maDstPt >> maDstSz >> maSrcPt >> maSrcSz;
2484cdf0e10cSrcweir }
2485cdf0e10cSrcweir
2486cdf0e10cSrcweir // ========================================================================
2487cdf0e10cSrcweir
IMPL_META_ACTION(Gradient,META_GRADIENT_ACTION)2488cdf0e10cSrcweir IMPL_META_ACTION( Gradient, META_GRADIENT_ACTION )
2489cdf0e10cSrcweir
2490cdf0e10cSrcweir // ------------------------------------------------------------------------
2491cdf0e10cSrcweir
2492cdf0e10cSrcweir MetaGradientAction::MetaGradientAction( const Rectangle& rRect, const Gradient& rGradient ) :
2493cdf0e10cSrcweir MetaAction ( META_GRADIENT_ACTION ),
2494cdf0e10cSrcweir maRect ( rRect ),
2495cdf0e10cSrcweir maGradient ( rGradient )
2496cdf0e10cSrcweir {
2497cdf0e10cSrcweir }
2498cdf0e10cSrcweir
2499cdf0e10cSrcweir // ------------------------------------------------------------------------
2500cdf0e10cSrcweir
Execute(OutputDevice * pOut)2501cdf0e10cSrcweir void MetaGradientAction::Execute( OutputDevice* pOut )
2502cdf0e10cSrcweir {
2503cdf0e10cSrcweir pOut->DrawGradient( maRect, maGradient );
2504cdf0e10cSrcweir }
2505cdf0e10cSrcweir
2506cdf0e10cSrcweir // ------------------------------------------------------------------------
2507cdf0e10cSrcweir
Clone()2508cdf0e10cSrcweir MetaAction* MetaGradientAction::Clone()
2509cdf0e10cSrcweir {
2510cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaGradientAction( *this );
2511cdf0e10cSrcweir pClone->ResetRefCount();
2512cdf0e10cSrcweir return pClone;
2513cdf0e10cSrcweir }
2514cdf0e10cSrcweir
2515cdf0e10cSrcweir // ------------------------------------------------------------------------
2516cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)2517cdf0e10cSrcweir void MetaGradientAction::Move( long nHorzMove, long nVertMove )
2518cdf0e10cSrcweir {
2519cdf0e10cSrcweir maRect.Move( nHorzMove, nVertMove );
2520cdf0e10cSrcweir }
2521cdf0e10cSrcweir
2522cdf0e10cSrcweir // ------------------------------------------------------------------------
2523cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)2524cdf0e10cSrcweir void MetaGradientAction::Scale( double fScaleX, double fScaleY )
2525cdf0e10cSrcweir {
2526cdf0e10cSrcweir ImplScaleRect( maRect, fScaleX, fScaleY );
2527cdf0e10cSrcweir }
2528cdf0e10cSrcweir
2529cdf0e10cSrcweir // ------------------------------------------------------------------------
2530cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const2531cdf0e10cSrcweir sal_Bool MetaGradientAction::Compare( const MetaAction& rMetaAction ) const
2532cdf0e10cSrcweir {
2533cdf0e10cSrcweir return ( maRect == ((MetaGradientAction&)rMetaAction).maRect ) &&
2534cdf0e10cSrcweir ( maGradient == ((MetaGradientAction&)rMetaAction).maGradient );
2535cdf0e10cSrcweir }
2536cdf0e10cSrcweir
2537cdf0e10cSrcweir // ------------------------------------------------------------------------
2538cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)2539cdf0e10cSrcweir void MetaGradientAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
2540cdf0e10cSrcweir {
2541cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
2542cdf0e10cSrcweir rOStm << maRect << maGradient;
2543cdf0e10cSrcweir }
2544cdf0e10cSrcweir
2545cdf0e10cSrcweir // ------------------------------------------------------------------------
2546cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)2547cdf0e10cSrcweir void MetaGradientAction::Read( SvStream& rIStm, ImplMetaReadData* )
2548cdf0e10cSrcweir {
2549cdf0e10cSrcweir COMPAT( rIStm );
2550cdf0e10cSrcweir rIStm >> maRect >> maGradient;
2551cdf0e10cSrcweir }
2552cdf0e10cSrcweir
2553cdf0e10cSrcweir // ========================================================================
2554cdf0e10cSrcweir
MetaGradientExAction()2555cdf0e10cSrcweir MetaGradientExAction::MetaGradientExAction() :
2556cdf0e10cSrcweir MetaAction ( META_GRADIENTEX_ACTION )
2557cdf0e10cSrcweir {
2558cdf0e10cSrcweir }
2559cdf0e10cSrcweir
2560cdf0e10cSrcweir // ------------------------------------------------------------------------
2561cdf0e10cSrcweir
MetaGradientExAction(const PolyPolygon & rPolyPoly,const Gradient & rGradient)2562cdf0e10cSrcweir MetaGradientExAction::MetaGradientExAction( const PolyPolygon& rPolyPoly, const Gradient& rGradient ) :
2563cdf0e10cSrcweir MetaAction ( META_GRADIENTEX_ACTION ),
2564cdf0e10cSrcweir maPolyPoly ( rPolyPoly ),
2565cdf0e10cSrcweir maGradient ( rGradient )
2566cdf0e10cSrcweir {
2567cdf0e10cSrcweir }
2568cdf0e10cSrcweir
2569cdf0e10cSrcweir // ------------------------------------------------------------------------
2570cdf0e10cSrcweir
~MetaGradientExAction()2571cdf0e10cSrcweir MetaGradientExAction::~MetaGradientExAction()
2572cdf0e10cSrcweir {
2573cdf0e10cSrcweir }
2574cdf0e10cSrcweir
2575cdf0e10cSrcweir // ------------------------------------------------------------------------
2576cdf0e10cSrcweir
Execute(OutputDevice * pOut)2577cdf0e10cSrcweir void MetaGradientExAction::Execute( OutputDevice* pOut )
2578cdf0e10cSrcweir {
2579cdf0e10cSrcweir if( pOut->GetConnectMetaFile() )
2580cdf0e10cSrcweir {
2581cdf0e10cSrcweir Duplicate();
2582cdf0e10cSrcweir pOut->GetConnectMetaFile()->AddAction( this );
2583cdf0e10cSrcweir }
2584cdf0e10cSrcweir }
2585cdf0e10cSrcweir
2586cdf0e10cSrcweir // ------------------------------------------------------------------------
2587cdf0e10cSrcweir
Clone()2588cdf0e10cSrcweir MetaAction* MetaGradientExAction::Clone()
2589cdf0e10cSrcweir {
2590cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaGradientExAction( *this );
2591cdf0e10cSrcweir pClone->ResetRefCount();
2592cdf0e10cSrcweir return pClone;
2593cdf0e10cSrcweir }
2594cdf0e10cSrcweir
2595cdf0e10cSrcweir // ------------------------------------------------------------------------
2596cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)2597cdf0e10cSrcweir void MetaGradientExAction::Move( long nHorzMove, long nVertMove )
2598cdf0e10cSrcweir {
2599cdf0e10cSrcweir maPolyPoly.Move( nHorzMove, nVertMove );
2600cdf0e10cSrcweir }
2601cdf0e10cSrcweir
2602cdf0e10cSrcweir // ------------------------------------------------------------------------
2603cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)2604cdf0e10cSrcweir void MetaGradientExAction::Scale( double fScaleX, double fScaleY )
2605cdf0e10cSrcweir {
2606cdf0e10cSrcweir for( sal_uInt16 i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
2607cdf0e10cSrcweir ImplScalePoly( maPolyPoly[ i ], fScaleX, fScaleY );
2608cdf0e10cSrcweir }
2609cdf0e10cSrcweir
2610cdf0e10cSrcweir // ------------------------------------------------------------------------
2611cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const2612cdf0e10cSrcweir sal_Bool MetaGradientExAction::Compare( const MetaAction& rMetaAction ) const
2613cdf0e10cSrcweir {
2614cdf0e10cSrcweir return ( maPolyPoly == ((MetaGradientExAction&)rMetaAction).maPolyPoly ) &&
2615cdf0e10cSrcweir ( maGradient == ((MetaGradientExAction&)rMetaAction).maGradient );
2616cdf0e10cSrcweir }
2617cdf0e10cSrcweir
2618cdf0e10cSrcweir // ------------------------------------------------------------------------
2619cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)2620cdf0e10cSrcweir void MetaGradientExAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
2621cdf0e10cSrcweir {
2622cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
2623cdf0e10cSrcweir
2624cdf0e10cSrcweir // #i105373# see comment at MetaTransparentAction::Write
2625cdf0e10cSrcweir PolyPolygon aNoCurvePolyPolygon;
2626cdf0e10cSrcweir maPolyPoly.AdaptiveSubdivide(aNoCurvePolyPolygon);
2627cdf0e10cSrcweir
2628cdf0e10cSrcweir rOStm << aNoCurvePolyPolygon;
2629cdf0e10cSrcweir rOStm << maGradient;
2630cdf0e10cSrcweir }
2631cdf0e10cSrcweir
2632cdf0e10cSrcweir // ------------------------------------------------------------------------
2633cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)2634cdf0e10cSrcweir void MetaGradientExAction::Read( SvStream& rIStm, ImplMetaReadData* )
2635cdf0e10cSrcweir {
2636cdf0e10cSrcweir COMPAT( rIStm );
2637cdf0e10cSrcweir rIStm >> maPolyPoly >> maGradient;
2638cdf0e10cSrcweir }
2639cdf0e10cSrcweir
2640cdf0e10cSrcweir // ========================================================================
2641cdf0e10cSrcweir
IMPL_META_ACTION(Hatch,META_HATCH_ACTION)2642cdf0e10cSrcweir IMPL_META_ACTION( Hatch, META_HATCH_ACTION )
2643cdf0e10cSrcweir
2644cdf0e10cSrcweir // ------------------------------------------------------------------------
2645cdf0e10cSrcweir
2646cdf0e10cSrcweir MetaHatchAction::MetaHatchAction( const PolyPolygon& rPolyPoly, const Hatch& rHatch ) :
2647cdf0e10cSrcweir MetaAction ( META_HATCH_ACTION ),
2648cdf0e10cSrcweir maPolyPoly ( rPolyPoly ),
2649cdf0e10cSrcweir maHatch ( rHatch )
2650cdf0e10cSrcweir {
2651cdf0e10cSrcweir }
2652cdf0e10cSrcweir
2653cdf0e10cSrcweir // ------------------------------------------------------------------------
2654cdf0e10cSrcweir
Execute(OutputDevice * pOut)2655cdf0e10cSrcweir void MetaHatchAction::Execute( OutputDevice* pOut )
2656cdf0e10cSrcweir {
2657cdf0e10cSrcweir pOut->DrawHatch( maPolyPoly, maHatch );
2658cdf0e10cSrcweir }
2659cdf0e10cSrcweir
2660cdf0e10cSrcweir // ------------------------------------------------------------------------
2661cdf0e10cSrcweir
Clone()2662cdf0e10cSrcweir MetaAction* MetaHatchAction::Clone()
2663cdf0e10cSrcweir {
2664cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaHatchAction( *this );
2665cdf0e10cSrcweir pClone->ResetRefCount();
2666cdf0e10cSrcweir return pClone;
2667cdf0e10cSrcweir }
2668cdf0e10cSrcweir
2669cdf0e10cSrcweir // ------------------------------------------------------------------------
2670cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)2671cdf0e10cSrcweir void MetaHatchAction::Move( long nHorzMove, long nVertMove )
2672cdf0e10cSrcweir {
2673cdf0e10cSrcweir maPolyPoly.Move( nHorzMove, nVertMove );
2674cdf0e10cSrcweir }
2675cdf0e10cSrcweir
2676cdf0e10cSrcweir // ------------------------------------------------------------------------
2677cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)2678cdf0e10cSrcweir void MetaHatchAction::Scale( double fScaleX, double fScaleY )
2679cdf0e10cSrcweir {
2680cdf0e10cSrcweir for( sal_uInt16 i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
2681cdf0e10cSrcweir ImplScalePoly( maPolyPoly[ i ], fScaleX, fScaleY );
2682cdf0e10cSrcweir }
2683cdf0e10cSrcweir
2684cdf0e10cSrcweir // ------------------------------------------------------------------------
2685cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const2686cdf0e10cSrcweir sal_Bool MetaHatchAction::Compare( const MetaAction& rMetaAction ) const
2687cdf0e10cSrcweir {
2688cdf0e10cSrcweir return ( maPolyPoly == ((MetaHatchAction&)rMetaAction).maPolyPoly ) &&
2689cdf0e10cSrcweir ( maHatch == ((MetaHatchAction&)rMetaAction).maHatch );
2690cdf0e10cSrcweir }
2691cdf0e10cSrcweir
2692cdf0e10cSrcweir // ------------------------------------------------------------------------
2693cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)2694cdf0e10cSrcweir void MetaHatchAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
2695cdf0e10cSrcweir {
2696cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
2697cdf0e10cSrcweir
2698cdf0e10cSrcweir // #i105373# see comment at MetaTransparentAction::Write
2699cdf0e10cSrcweir PolyPolygon aNoCurvePolyPolygon;
2700cdf0e10cSrcweir maPolyPoly.AdaptiveSubdivide(aNoCurvePolyPolygon);
2701cdf0e10cSrcweir
2702cdf0e10cSrcweir rOStm << aNoCurvePolyPolygon;
2703cdf0e10cSrcweir rOStm << maHatch;
2704cdf0e10cSrcweir }
2705cdf0e10cSrcweir
2706cdf0e10cSrcweir // ------------------------------------------------------------------------
2707cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)2708cdf0e10cSrcweir void MetaHatchAction::Read( SvStream& rIStm, ImplMetaReadData* )
2709cdf0e10cSrcweir {
2710cdf0e10cSrcweir COMPAT( rIStm );
2711cdf0e10cSrcweir rIStm >> maPolyPoly >> maHatch;
2712cdf0e10cSrcweir }
2713cdf0e10cSrcweir
2714cdf0e10cSrcweir // ========================================================================
2715cdf0e10cSrcweir
IMPL_META_ACTION(Wallpaper,META_WALLPAPER_ACTION)2716cdf0e10cSrcweir IMPL_META_ACTION( Wallpaper, META_WALLPAPER_ACTION )
2717cdf0e10cSrcweir
2718cdf0e10cSrcweir // ------------------------------------------------------------------------
2719cdf0e10cSrcweir
2720cdf0e10cSrcweir MetaWallpaperAction::MetaWallpaperAction( const Rectangle& rRect,
2721cdf0e10cSrcweir const Wallpaper& rPaper ) :
2722cdf0e10cSrcweir MetaAction ( META_WALLPAPER_ACTION ),
2723cdf0e10cSrcweir maRect ( rRect ),
2724cdf0e10cSrcweir maWallpaper ( rPaper )
2725cdf0e10cSrcweir {
2726cdf0e10cSrcweir }
2727cdf0e10cSrcweir
2728cdf0e10cSrcweir // ------------------------------------------------------------------------
2729cdf0e10cSrcweir
Execute(OutputDevice * pOut)2730cdf0e10cSrcweir void MetaWallpaperAction::Execute( OutputDevice* pOut )
2731cdf0e10cSrcweir {
2732cdf0e10cSrcweir pOut->DrawWallpaper( maRect, maWallpaper );
2733cdf0e10cSrcweir }
2734cdf0e10cSrcweir
2735cdf0e10cSrcweir // ------------------------------------------------------------------------
2736cdf0e10cSrcweir
Clone()2737cdf0e10cSrcweir MetaAction* MetaWallpaperAction::Clone()
2738cdf0e10cSrcweir {
2739cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaWallpaperAction( *this );
2740cdf0e10cSrcweir pClone->ResetRefCount();
2741cdf0e10cSrcweir return pClone;
2742cdf0e10cSrcweir }
2743cdf0e10cSrcweir
2744cdf0e10cSrcweir // ------------------------------------------------------------------------
2745cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)2746cdf0e10cSrcweir void MetaWallpaperAction::Move( long nHorzMove, long nVertMove )
2747cdf0e10cSrcweir {
2748cdf0e10cSrcweir maRect.Move( nHorzMove, nVertMove );
2749cdf0e10cSrcweir }
2750cdf0e10cSrcweir
2751cdf0e10cSrcweir // ------------------------------------------------------------------------
2752cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)2753cdf0e10cSrcweir void MetaWallpaperAction::Scale( double fScaleX, double fScaleY )
2754cdf0e10cSrcweir {
2755cdf0e10cSrcweir ImplScaleRect( maRect, fScaleX, fScaleY );
2756cdf0e10cSrcweir }
2757cdf0e10cSrcweir
2758cdf0e10cSrcweir // ------------------------------------------------------------------------
2759cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const2760cdf0e10cSrcweir sal_Bool MetaWallpaperAction::Compare( const MetaAction& rMetaAction ) const
2761cdf0e10cSrcweir {
2762cdf0e10cSrcweir return ( maRect == ((MetaWallpaperAction&)rMetaAction).maRect ) &&
2763cdf0e10cSrcweir ( maWallpaper == ((MetaWallpaperAction&)rMetaAction).maWallpaper );
2764cdf0e10cSrcweir }
2765cdf0e10cSrcweir
2766cdf0e10cSrcweir // ------------------------------------------------------------------------
2767cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)2768cdf0e10cSrcweir void MetaWallpaperAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
2769cdf0e10cSrcweir {
2770cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
2771cdf0e10cSrcweir rOStm << maWallpaper;
2772cdf0e10cSrcweir }
2773cdf0e10cSrcweir
2774cdf0e10cSrcweir // ------------------------------------------------------------------------
2775cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)2776cdf0e10cSrcweir void MetaWallpaperAction::Read( SvStream& rIStm, ImplMetaReadData* )
2777cdf0e10cSrcweir {
2778cdf0e10cSrcweir COMPAT( rIStm );
2779cdf0e10cSrcweir rIStm >> maWallpaper;
2780cdf0e10cSrcweir }
2781cdf0e10cSrcweir
2782cdf0e10cSrcweir // ========================================================================
2783cdf0e10cSrcweir
IMPL_META_ACTION(ClipRegion,META_CLIPREGION_ACTION)2784cdf0e10cSrcweir IMPL_META_ACTION( ClipRegion, META_CLIPREGION_ACTION )
2785cdf0e10cSrcweir
2786cdf0e10cSrcweir // ------------------------------------------------------------------------
2787cdf0e10cSrcweir
2788cdf0e10cSrcweir MetaClipRegionAction::MetaClipRegionAction( const Region& rRegion, sal_Bool bClip ) :
2789cdf0e10cSrcweir MetaAction ( META_CLIPREGION_ACTION ),
2790cdf0e10cSrcweir maRegion ( rRegion ),
2791cdf0e10cSrcweir mbClip ( bClip )
2792cdf0e10cSrcweir {
2793cdf0e10cSrcweir }
2794cdf0e10cSrcweir
2795cdf0e10cSrcweir // ------------------------------------------------------------------------
2796cdf0e10cSrcweir
Execute(OutputDevice * pOut)2797cdf0e10cSrcweir void MetaClipRegionAction::Execute( OutputDevice* pOut )
2798cdf0e10cSrcweir {
2799cdf0e10cSrcweir if( mbClip )
2800cdf0e10cSrcweir pOut->SetClipRegion( maRegion );
2801cdf0e10cSrcweir else
2802cdf0e10cSrcweir pOut->SetClipRegion();
2803cdf0e10cSrcweir }
2804cdf0e10cSrcweir
2805cdf0e10cSrcweir // ------------------------------------------------------------------------
2806cdf0e10cSrcweir
Clone()2807cdf0e10cSrcweir MetaAction* MetaClipRegionAction::Clone()
2808cdf0e10cSrcweir {
2809cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaClipRegionAction( *this );
2810cdf0e10cSrcweir pClone->ResetRefCount();
2811cdf0e10cSrcweir return pClone;
2812cdf0e10cSrcweir }
2813cdf0e10cSrcweir
2814cdf0e10cSrcweir // ------------------------------------------------------------------------
2815cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)2816cdf0e10cSrcweir void MetaClipRegionAction::Move( long nHorzMove, long nVertMove )
2817cdf0e10cSrcweir {
2818cdf0e10cSrcweir maRegion.Move( nHorzMove, nVertMove );
2819cdf0e10cSrcweir }
2820cdf0e10cSrcweir
2821cdf0e10cSrcweir // ------------------------------------------------------------------------
2822cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)2823cdf0e10cSrcweir void MetaClipRegionAction::Scale( double fScaleX, double fScaleY )
2824cdf0e10cSrcweir {
2825cdf0e10cSrcweir maRegion.Scale( fScaleX, fScaleY );
2826cdf0e10cSrcweir }
2827cdf0e10cSrcweir
2828cdf0e10cSrcweir // ------------------------------------------------------------------------
2829cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const2830cdf0e10cSrcweir sal_Bool MetaClipRegionAction::Compare( const MetaAction& rMetaAction ) const
2831cdf0e10cSrcweir {
2832cdf0e10cSrcweir return ( maRegion == ((MetaClipRegionAction&)rMetaAction).maRegion ) &&
2833cdf0e10cSrcweir ( mbClip == ((MetaClipRegionAction&)rMetaAction).mbClip );
2834cdf0e10cSrcweir }
2835cdf0e10cSrcweir
2836cdf0e10cSrcweir // ------------------------------------------------------------------------
2837cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)2838cdf0e10cSrcweir void MetaClipRegionAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
2839cdf0e10cSrcweir {
2840cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
2841cdf0e10cSrcweir rOStm << maRegion << mbClip;
2842cdf0e10cSrcweir }
2843cdf0e10cSrcweir
2844cdf0e10cSrcweir // ------------------------------------------------------------------------
2845cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)2846cdf0e10cSrcweir void MetaClipRegionAction::Read( SvStream& rIStm, ImplMetaReadData* )
2847cdf0e10cSrcweir {
2848cdf0e10cSrcweir COMPAT( rIStm );
2849cdf0e10cSrcweir rIStm >> maRegion >> mbClip;
2850cdf0e10cSrcweir }
2851cdf0e10cSrcweir
2852cdf0e10cSrcweir // ========================================================================
2853cdf0e10cSrcweir
IMPL_META_ACTION(ISectRectClipRegion,META_ISECTRECTCLIPREGION_ACTION)2854cdf0e10cSrcweir IMPL_META_ACTION( ISectRectClipRegion, META_ISECTRECTCLIPREGION_ACTION )
2855cdf0e10cSrcweir
2856cdf0e10cSrcweir // ------------------------------------------------------------------------
2857cdf0e10cSrcweir
2858cdf0e10cSrcweir MetaISectRectClipRegionAction::MetaISectRectClipRegionAction( const Rectangle& rRect ) :
2859cdf0e10cSrcweir MetaAction ( META_ISECTRECTCLIPREGION_ACTION ),
2860cdf0e10cSrcweir maRect ( rRect )
2861cdf0e10cSrcweir {
2862cdf0e10cSrcweir }
2863cdf0e10cSrcweir
2864cdf0e10cSrcweir // ------------------------------------------------------------------------
2865cdf0e10cSrcweir
Execute(OutputDevice * pOut)2866cdf0e10cSrcweir void MetaISectRectClipRegionAction::Execute( OutputDevice* pOut )
2867cdf0e10cSrcweir {
2868cdf0e10cSrcweir pOut->IntersectClipRegion( maRect );
2869cdf0e10cSrcweir }
2870cdf0e10cSrcweir
2871cdf0e10cSrcweir // ------------------------------------------------------------------------
2872cdf0e10cSrcweir
Clone()2873cdf0e10cSrcweir MetaAction* MetaISectRectClipRegionAction::Clone()
2874cdf0e10cSrcweir {
2875cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaISectRectClipRegionAction( *this );
2876cdf0e10cSrcweir pClone->ResetRefCount();
2877cdf0e10cSrcweir return pClone;
2878cdf0e10cSrcweir }
2879cdf0e10cSrcweir
2880cdf0e10cSrcweir // ------------------------------------------------------------------------
2881cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)2882cdf0e10cSrcweir void MetaISectRectClipRegionAction::Move( long nHorzMove, long nVertMove )
2883cdf0e10cSrcweir {
2884cdf0e10cSrcweir maRect.Move( nHorzMove, nVertMove );
2885cdf0e10cSrcweir }
2886cdf0e10cSrcweir
2887cdf0e10cSrcweir // ------------------------------------------------------------------------
2888cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)2889cdf0e10cSrcweir void MetaISectRectClipRegionAction::Scale( double fScaleX, double fScaleY )
2890cdf0e10cSrcweir {
2891cdf0e10cSrcweir ImplScaleRect( maRect, fScaleX, fScaleY );
2892cdf0e10cSrcweir }
2893cdf0e10cSrcweir
2894cdf0e10cSrcweir // ------------------------------------------------------------------------
2895cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const2896cdf0e10cSrcweir sal_Bool MetaISectRectClipRegionAction::Compare( const MetaAction& rMetaAction ) const
2897cdf0e10cSrcweir {
2898cdf0e10cSrcweir return maRect == ((MetaISectRectClipRegionAction&)rMetaAction).maRect;
2899cdf0e10cSrcweir }
2900cdf0e10cSrcweir
2901cdf0e10cSrcweir // ------------------------------------------------------------------------
2902cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)2903cdf0e10cSrcweir void MetaISectRectClipRegionAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
2904cdf0e10cSrcweir {
2905cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
2906cdf0e10cSrcweir rOStm << maRect;
2907cdf0e10cSrcweir }
2908cdf0e10cSrcweir
2909cdf0e10cSrcweir // ------------------------------------------------------------------------
2910cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)2911cdf0e10cSrcweir void MetaISectRectClipRegionAction::Read( SvStream& rIStm, ImplMetaReadData* )
2912cdf0e10cSrcweir {
2913cdf0e10cSrcweir COMPAT( rIStm );
2914cdf0e10cSrcweir rIStm >> maRect;
2915cdf0e10cSrcweir }
2916cdf0e10cSrcweir
2917cdf0e10cSrcweir // ========================================================================
2918cdf0e10cSrcweir
IMPL_META_ACTION(ISectRegionClipRegion,META_ISECTREGIONCLIPREGION_ACTION)2919cdf0e10cSrcweir IMPL_META_ACTION( ISectRegionClipRegion, META_ISECTREGIONCLIPREGION_ACTION )
2920cdf0e10cSrcweir
2921cdf0e10cSrcweir // ------------------------------------------------------------------------
2922cdf0e10cSrcweir
2923cdf0e10cSrcweir MetaISectRegionClipRegionAction::MetaISectRegionClipRegionAction( const Region& rRegion ) :
2924cdf0e10cSrcweir MetaAction ( META_ISECTREGIONCLIPREGION_ACTION ),
2925cdf0e10cSrcweir maRegion ( rRegion )
2926cdf0e10cSrcweir {
2927cdf0e10cSrcweir }
2928cdf0e10cSrcweir
2929cdf0e10cSrcweir // ------------------------------------------------------------------------
2930cdf0e10cSrcweir
Execute(OutputDevice * pOut)2931cdf0e10cSrcweir void MetaISectRegionClipRegionAction::Execute( OutputDevice* pOut )
2932cdf0e10cSrcweir {
2933cdf0e10cSrcweir pOut->IntersectClipRegion( maRegion );
2934cdf0e10cSrcweir }
2935cdf0e10cSrcweir
2936cdf0e10cSrcweir // ------------------------------------------------------------------------
2937cdf0e10cSrcweir
Clone()2938cdf0e10cSrcweir MetaAction* MetaISectRegionClipRegionAction::Clone()
2939cdf0e10cSrcweir {
2940cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaISectRegionClipRegionAction( *this );
2941cdf0e10cSrcweir pClone->ResetRefCount();
2942cdf0e10cSrcweir return pClone;
2943cdf0e10cSrcweir }
2944cdf0e10cSrcweir
2945cdf0e10cSrcweir // ------------------------------------------------------------------------
2946cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)2947cdf0e10cSrcweir void MetaISectRegionClipRegionAction::Move( long nHorzMove, long nVertMove )
2948cdf0e10cSrcweir {
2949cdf0e10cSrcweir maRegion.Move( nHorzMove, nVertMove );
2950cdf0e10cSrcweir }
2951cdf0e10cSrcweir
2952cdf0e10cSrcweir // ------------------------------------------------------------------------
2953cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)2954cdf0e10cSrcweir void MetaISectRegionClipRegionAction::Scale( double fScaleX, double fScaleY )
2955cdf0e10cSrcweir {
2956cdf0e10cSrcweir maRegion.Scale( fScaleX, fScaleY );
2957cdf0e10cSrcweir }
2958cdf0e10cSrcweir
2959cdf0e10cSrcweir // ------------------------------------------------------------------------
2960cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const2961cdf0e10cSrcweir sal_Bool MetaISectRegionClipRegionAction::Compare( const MetaAction& rMetaAction ) const
2962cdf0e10cSrcweir {
2963cdf0e10cSrcweir return maRegion == ((MetaISectRegionClipRegionAction&)rMetaAction).maRegion;
2964cdf0e10cSrcweir }
2965cdf0e10cSrcweir
2966cdf0e10cSrcweir // ------------------------------------------------------------------------
2967cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)2968cdf0e10cSrcweir void MetaISectRegionClipRegionAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
2969cdf0e10cSrcweir {
2970cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
2971cdf0e10cSrcweir rOStm << maRegion;
2972cdf0e10cSrcweir }
2973cdf0e10cSrcweir
2974cdf0e10cSrcweir // ------------------------------------------------------------------------
2975cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)2976cdf0e10cSrcweir void MetaISectRegionClipRegionAction::Read( SvStream& rIStm, ImplMetaReadData* )
2977cdf0e10cSrcweir {
2978cdf0e10cSrcweir COMPAT( rIStm );
2979cdf0e10cSrcweir rIStm >> maRegion;
2980cdf0e10cSrcweir }
2981cdf0e10cSrcweir
2982cdf0e10cSrcweir // ========================================================================
2983cdf0e10cSrcweir
IMPL_META_ACTION(MoveClipRegion,META_MOVECLIPREGION_ACTION)2984cdf0e10cSrcweir IMPL_META_ACTION( MoveClipRegion, META_MOVECLIPREGION_ACTION )
2985cdf0e10cSrcweir
2986cdf0e10cSrcweir // ------------------------------------------------------------------------
2987cdf0e10cSrcweir
2988cdf0e10cSrcweir MetaMoveClipRegionAction::MetaMoveClipRegionAction( long nHorzMove, long nVertMove ) :
2989cdf0e10cSrcweir MetaAction ( META_MOVECLIPREGION_ACTION ),
2990cdf0e10cSrcweir mnHorzMove ( nHorzMove ),
2991cdf0e10cSrcweir mnVertMove ( nVertMove )
2992cdf0e10cSrcweir {
2993cdf0e10cSrcweir }
2994cdf0e10cSrcweir
2995cdf0e10cSrcweir // ------------------------------------------------------------------------
2996cdf0e10cSrcweir
Execute(OutputDevice * pOut)2997cdf0e10cSrcweir void MetaMoveClipRegionAction::Execute( OutputDevice* pOut )
2998cdf0e10cSrcweir {
2999cdf0e10cSrcweir pOut->MoveClipRegion( mnHorzMove, mnVertMove );
3000cdf0e10cSrcweir }
3001cdf0e10cSrcweir
3002cdf0e10cSrcweir // ------------------------------------------------------------------------
3003cdf0e10cSrcweir
Clone()3004cdf0e10cSrcweir MetaAction* MetaMoveClipRegionAction::Clone()
3005cdf0e10cSrcweir {
3006cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaMoveClipRegionAction( *this );
3007cdf0e10cSrcweir pClone->ResetRefCount();
3008cdf0e10cSrcweir return pClone;
3009cdf0e10cSrcweir }
3010cdf0e10cSrcweir
3011cdf0e10cSrcweir // ------------------------------------------------------------------------
3012cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)3013cdf0e10cSrcweir void MetaMoveClipRegionAction::Scale( double fScaleX, double fScaleY )
3014cdf0e10cSrcweir {
3015cdf0e10cSrcweir mnHorzMove = FRound( mnHorzMove * fScaleX );
3016cdf0e10cSrcweir mnVertMove = FRound( mnVertMove * fScaleY );
3017cdf0e10cSrcweir }
3018cdf0e10cSrcweir
3019cdf0e10cSrcweir // ------------------------------------------------------------------------
3020cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const3021cdf0e10cSrcweir sal_Bool MetaMoveClipRegionAction::Compare( const MetaAction& rMetaAction ) const
3022cdf0e10cSrcweir {
3023cdf0e10cSrcweir return ( mnHorzMove == ((MetaMoveClipRegionAction&)rMetaAction).mnHorzMove ) &&
3024cdf0e10cSrcweir ( mnVertMove == ((MetaMoveClipRegionAction&)rMetaAction).mnVertMove );
3025cdf0e10cSrcweir }
3026cdf0e10cSrcweir
3027cdf0e10cSrcweir // ------------------------------------------------------------------------
3028cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)3029cdf0e10cSrcweir void MetaMoveClipRegionAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
3030cdf0e10cSrcweir {
3031cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
3032cdf0e10cSrcweir rOStm << mnHorzMove << mnVertMove;
3033cdf0e10cSrcweir }
3034cdf0e10cSrcweir
3035cdf0e10cSrcweir // ------------------------------------------------------------------------
3036cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)3037cdf0e10cSrcweir void MetaMoveClipRegionAction::Read( SvStream& rIStm, ImplMetaReadData* )
3038cdf0e10cSrcweir {
3039cdf0e10cSrcweir COMPAT( rIStm );
3040cdf0e10cSrcweir rIStm >> mnHorzMove >> mnVertMove;
3041cdf0e10cSrcweir }
3042cdf0e10cSrcweir
3043cdf0e10cSrcweir // ========================================================================
3044cdf0e10cSrcweir
IMPL_META_ACTION(LineColor,META_LINECOLOR_ACTION)3045cdf0e10cSrcweir IMPL_META_ACTION( LineColor, META_LINECOLOR_ACTION )
3046cdf0e10cSrcweir
3047cdf0e10cSrcweir // ------------------------------------------------------------------------
3048cdf0e10cSrcweir
3049cdf0e10cSrcweir MetaLineColorAction::MetaLineColorAction( const Color& rColor, sal_Bool bSet ) :
3050cdf0e10cSrcweir MetaAction ( META_LINECOLOR_ACTION ),
3051cdf0e10cSrcweir maColor ( rColor ),
3052cdf0e10cSrcweir mbSet ( bSet )
3053cdf0e10cSrcweir {
3054cdf0e10cSrcweir }
3055cdf0e10cSrcweir
3056cdf0e10cSrcweir // ------------------------------------------------------------------------
3057cdf0e10cSrcweir
Execute(OutputDevice * pOut)3058cdf0e10cSrcweir void MetaLineColorAction::Execute( OutputDevice* pOut )
3059cdf0e10cSrcweir {
3060cdf0e10cSrcweir if( mbSet )
3061cdf0e10cSrcweir pOut->SetLineColor( maColor );
3062cdf0e10cSrcweir else
3063cdf0e10cSrcweir pOut->SetLineColor();
3064cdf0e10cSrcweir }
3065cdf0e10cSrcweir
3066cdf0e10cSrcweir // ------------------------------------------------------------------------
3067cdf0e10cSrcweir
Clone()3068cdf0e10cSrcweir MetaAction* MetaLineColorAction::Clone()
3069cdf0e10cSrcweir {
3070cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaLineColorAction( *this );
3071cdf0e10cSrcweir pClone->ResetRefCount();
3072cdf0e10cSrcweir return pClone;
3073cdf0e10cSrcweir }
3074cdf0e10cSrcweir
3075cdf0e10cSrcweir // ------------------------------------------------------------------------
3076cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const3077cdf0e10cSrcweir sal_Bool MetaLineColorAction::Compare( const MetaAction& rMetaAction ) const
3078cdf0e10cSrcweir {
3079cdf0e10cSrcweir return ( maColor == ((MetaLineColorAction&)rMetaAction).maColor ) &&
3080cdf0e10cSrcweir ( mbSet == ((MetaLineColorAction&)rMetaAction).mbSet );
3081cdf0e10cSrcweir }
3082cdf0e10cSrcweir
3083cdf0e10cSrcweir // ------------------------------------------------------------------------
3084cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)3085cdf0e10cSrcweir void MetaLineColorAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
3086cdf0e10cSrcweir {
3087cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
3088cdf0e10cSrcweir maColor.Write( rOStm, sal_True );
3089cdf0e10cSrcweir rOStm << mbSet;
3090cdf0e10cSrcweir }
3091cdf0e10cSrcweir
3092cdf0e10cSrcweir // ------------------------------------------------------------------------
3093cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)3094cdf0e10cSrcweir void MetaLineColorAction::Read( SvStream& rIStm, ImplMetaReadData* )
3095cdf0e10cSrcweir {
3096cdf0e10cSrcweir COMPAT( rIStm );
3097cdf0e10cSrcweir maColor.Read( rIStm, sal_True );
3098cdf0e10cSrcweir rIStm >> mbSet;
3099cdf0e10cSrcweir }
3100cdf0e10cSrcweir
3101cdf0e10cSrcweir // ========================================================================
3102cdf0e10cSrcweir
IMPL_META_ACTION(FillColor,META_FILLCOLOR_ACTION)3103cdf0e10cSrcweir IMPL_META_ACTION( FillColor, META_FILLCOLOR_ACTION )
3104cdf0e10cSrcweir
3105cdf0e10cSrcweir // ------------------------------------------------------------------------
3106cdf0e10cSrcweir
3107cdf0e10cSrcweir MetaFillColorAction::MetaFillColorAction( const Color& rColor, sal_Bool bSet ) :
3108cdf0e10cSrcweir MetaAction ( META_FILLCOLOR_ACTION ),
3109cdf0e10cSrcweir maColor ( rColor ),
3110cdf0e10cSrcweir mbSet ( bSet )
3111cdf0e10cSrcweir {
3112cdf0e10cSrcweir }
3113cdf0e10cSrcweir
3114cdf0e10cSrcweir // ------------------------------------------------------------------------
3115cdf0e10cSrcweir
Execute(OutputDevice * pOut)3116cdf0e10cSrcweir void MetaFillColorAction::Execute( OutputDevice* pOut )
3117cdf0e10cSrcweir {
3118cdf0e10cSrcweir if( mbSet )
3119cdf0e10cSrcweir pOut->SetFillColor( maColor );
3120cdf0e10cSrcweir else
3121cdf0e10cSrcweir pOut->SetFillColor();
3122cdf0e10cSrcweir }
3123cdf0e10cSrcweir
3124cdf0e10cSrcweir // ------------------------------------------------------------------------
3125cdf0e10cSrcweir
Clone()3126cdf0e10cSrcweir MetaAction* MetaFillColorAction::Clone()
3127cdf0e10cSrcweir {
3128cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaFillColorAction( *this );
3129cdf0e10cSrcweir pClone->ResetRefCount();
3130cdf0e10cSrcweir return pClone;
3131cdf0e10cSrcweir }
3132cdf0e10cSrcweir
3133cdf0e10cSrcweir // ------------------------------------------------------------------------
3134cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const3135cdf0e10cSrcweir sal_Bool MetaFillColorAction::Compare( const MetaAction& rMetaAction ) const
3136cdf0e10cSrcweir {
3137cdf0e10cSrcweir return ( maColor == ((MetaFillColorAction&)rMetaAction).maColor ) &&
3138cdf0e10cSrcweir ( mbSet == ((MetaFillColorAction&)rMetaAction).mbSet );
3139cdf0e10cSrcweir }
3140cdf0e10cSrcweir
3141cdf0e10cSrcweir // ------------------------------------------------------------------------
3142cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)3143cdf0e10cSrcweir void MetaFillColorAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
3144cdf0e10cSrcweir {
3145cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
3146cdf0e10cSrcweir maColor.Write( rOStm, sal_True );
3147cdf0e10cSrcweir rOStm << mbSet;
3148cdf0e10cSrcweir }
3149cdf0e10cSrcweir
3150cdf0e10cSrcweir // ------------------------------------------------------------------------
3151cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)3152cdf0e10cSrcweir void MetaFillColorAction::Read( SvStream& rIStm, ImplMetaReadData* )
3153cdf0e10cSrcweir {
3154cdf0e10cSrcweir COMPAT( rIStm );
3155cdf0e10cSrcweir maColor.Read( rIStm, sal_True );
3156cdf0e10cSrcweir rIStm >> mbSet;
3157cdf0e10cSrcweir }
3158cdf0e10cSrcweir
3159cdf0e10cSrcweir // ========================================================================
3160cdf0e10cSrcweir
IMPL_META_ACTION(TextColor,META_TEXTCOLOR_ACTION)3161cdf0e10cSrcweir IMPL_META_ACTION( TextColor, META_TEXTCOLOR_ACTION )
3162cdf0e10cSrcweir
3163cdf0e10cSrcweir // ------------------------------------------------------------------------
3164cdf0e10cSrcweir
3165cdf0e10cSrcweir MetaTextColorAction::MetaTextColorAction( const Color& rColor ) :
3166cdf0e10cSrcweir MetaAction ( META_TEXTCOLOR_ACTION ),
3167cdf0e10cSrcweir maColor ( rColor )
3168cdf0e10cSrcweir {
3169cdf0e10cSrcweir }
3170cdf0e10cSrcweir
3171cdf0e10cSrcweir // ------------------------------------------------------------------------
3172cdf0e10cSrcweir
Execute(OutputDevice * pOut)3173cdf0e10cSrcweir void MetaTextColorAction::Execute( OutputDevice* pOut )
3174cdf0e10cSrcweir {
3175cdf0e10cSrcweir pOut->SetTextColor( maColor );
3176cdf0e10cSrcweir }
3177cdf0e10cSrcweir
3178cdf0e10cSrcweir // ------------------------------------------------------------------------
3179cdf0e10cSrcweir
Clone()3180cdf0e10cSrcweir MetaAction* MetaTextColorAction::Clone()
3181cdf0e10cSrcweir {
3182cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaTextColorAction( *this );
3183cdf0e10cSrcweir pClone->ResetRefCount();
3184cdf0e10cSrcweir return pClone;
3185cdf0e10cSrcweir }
3186cdf0e10cSrcweir
3187cdf0e10cSrcweir // ------------------------------------------------------------------------
3188cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const3189cdf0e10cSrcweir sal_Bool MetaTextColorAction::Compare( const MetaAction& rMetaAction ) const
3190cdf0e10cSrcweir {
3191cdf0e10cSrcweir return maColor == ((MetaTextColorAction&)rMetaAction).maColor;
3192cdf0e10cSrcweir }
3193cdf0e10cSrcweir
3194cdf0e10cSrcweir // ------------------------------------------------------------------------
3195cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)3196cdf0e10cSrcweir void MetaTextColorAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
3197cdf0e10cSrcweir {
3198cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
3199cdf0e10cSrcweir maColor.Write( rOStm, sal_True );
3200cdf0e10cSrcweir }
3201cdf0e10cSrcweir
3202cdf0e10cSrcweir // ------------------------------------------------------------------------
3203cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)3204cdf0e10cSrcweir void MetaTextColorAction::Read( SvStream& rIStm, ImplMetaReadData* )
3205cdf0e10cSrcweir {
3206cdf0e10cSrcweir COMPAT( rIStm );
3207cdf0e10cSrcweir maColor.Read( rIStm, sal_True );
3208cdf0e10cSrcweir }
3209cdf0e10cSrcweir
3210cdf0e10cSrcweir // ========================================================================
3211cdf0e10cSrcweir
IMPL_META_ACTION(TextFillColor,META_TEXTFILLCOLOR_ACTION)3212cdf0e10cSrcweir IMPL_META_ACTION( TextFillColor, META_TEXTFILLCOLOR_ACTION )
3213cdf0e10cSrcweir
3214cdf0e10cSrcweir // ------------------------------------------------------------------------
3215cdf0e10cSrcweir
3216cdf0e10cSrcweir MetaTextFillColorAction::MetaTextFillColorAction( const Color& rColor, sal_Bool bSet ) :
3217cdf0e10cSrcweir MetaAction ( META_TEXTFILLCOLOR_ACTION ),
3218cdf0e10cSrcweir maColor ( rColor ),
3219cdf0e10cSrcweir mbSet ( bSet )
3220cdf0e10cSrcweir {
3221cdf0e10cSrcweir }
3222cdf0e10cSrcweir
3223cdf0e10cSrcweir // ------------------------------------------------------------------------
3224cdf0e10cSrcweir
Execute(OutputDevice * pOut)3225cdf0e10cSrcweir void MetaTextFillColorAction::Execute( OutputDevice* pOut )
3226cdf0e10cSrcweir {
3227cdf0e10cSrcweir if( mbSet )
3228cdf0e10cSrcweir pOut->SetTextFillColor( maColor );
3229cdf0e10cSrcweir else
3230cdf0e10cSrcweir pOut->SetTextFillColor();
3231cdf0e10cSrcweir }
3232cdf0e10cSrcweir
3233cdf0e10cSrcweir // ------------------------------------------------------------------------
3234cdf0e10cSrcweir
Clone()3235cdf0e10cSrcweir MetaAction* MetaTextFillColorAction::Clone()
3236cdf0e10cSrcweir {
3237cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaTextFillColorAction( *this );
3238cdf0e10cSrcweir pClone->ResetRefCount();
3239cdf0e10cSrcweir return pClone;
3240cdf0e10cSrcweir }
3241cdf0e10cSrcweir
3242cdf0e10cSrcweir // ------------------------------------------------------------------------
3243cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const3244cdf0e10cSrcweir sal_Bool MetaTextFillColorAction::Compare( const MetaAction& rMetaAction ) const
3245cdf0e10cSrcweir {
3246cdf0e10cSrcweir return ( maColor == ((MetaTextFillColorAction&)rMetaAction).maColor ) &&
3247cdf0e10cSrcweir ( mbSet == ((MetaTextFillColorAction&)rMetaAction).mbSet );
3248cdf0e10cSrcweir }
3249cdf0e10cSrcweir
3250cdf0e10cSrcweir // ------------------------------------------------------------------------
3251cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)3252cdf0e10cSrcweir void MetaTextFillColorAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
3253cdf0e10cSrcweir {
3254cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
3255cdf0e10cSrcweir maColor.Write( rOStm, sal_True );
3256cdf0e10cSrcweir rOStm << mbSet;
3257cdf0e10cSrcweir }
3258cdf0e10cSrcweir
3259cdf0e10cSrcweir // ------------------------------------------------------------------------
3260cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)3261cdf0e10cSrcweir void MetaTextFillColorAction::Read( SvStream& rIStm, ImplMetaReadData* )
3262cdf0e10cSrcweir {
3263cdf0e10cSrcweir COMPAT( rIStm );
3264cdf0e10cSrcweir maColor.Read( rIStm, sal_True );
3265cdf0e10cSrcweir rIStm >> mbSet;
3266cdf0e10cSrcweir }
3267cdf0e10cSrcweir
3268cdf0e10cSrcweir // ========================================================================
3269cdf0e10cSrcweir
IMPL_META_ACTION(TextLineColor,META_TEXTLINECOLOR_ACTION)3270cdf0e10cSrcweir IMPL_META_ACTION( TextLineColor, META_TEXTLINECOLOR_ACTION )
3271cdf0e10cSrcweir
3272cdf0e10cSrcweir // ------------------------------------------------------------------------
3273cdf0e10cSrcweir
3274cdf0e10cSrcweir MetaTextLineColorAction::MetaTextLineColorAction( const Color& rColor, sal_Bool bSet ) :
3275cdf0e10cSrcweir MetaAction ( META_TEXTLINECOLOR_ACTION ),
3276cdf0e10cSrcweir maColor ( rColor ),
3277cdf0e10cSrcweir mbSet ( bSet )
3278cdf0e10cSrcweir {
3279cdf0e10cSrcweir }
3280cdf0e10cSrcweir
3281cdf0e10cSrcweir // ------------------------------------------------------------------------
3282cdf0e10cSrcweir
Execute(OutputDevice * pOut)3283cdf0e10cSrcweir void MetaTextLineColorAction::Execute( OutputDevice* pOut )
3284cdf0e10cSrcweir {
3285cdf0e10cSrcweir if( mbSet )
3286cdf0e10cSrcweir pOut->SetTextLineColor( maColor );
3287cdf0e10cSrcweir else
3288cdf0e10cSrcweir pOut->SetTextLineColor();
3289cdf0e10cSrcweir }
3290cdf0e10cSrcweir
3291cdf0e10cSrcweir // ------------------------------------------------------------------------
3292cdf0e10cSrcweir
Clone()3293cdf0e10cSrcweir MetaAction* MetaTextLineColorAction::Clone()
3294cdf0e10cSrcweir {
3295cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaTextLineColorAction( *this );
3296cdf0e10cSrcweir pClone->ResetRefCount();
3297cdf0e10cSrcweir return pClone;
3298cdf0e10cSrcweir }
3299cdf0e10cSrcweir
3300cdf0e10cSrcweir // ------------------------------------------------------------------------
3301cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const3302cdf0e10cSrcweir sal_Bool MetaTextLineColorAction::Compare( const MetaAction& rMetaAction ) const
3303cdf0e10cSrcweir {
3304cdf0e10cSrcweir return ( maColor == ((MetaTextLineColorAction&)rMetaAction).maColor ) &&
3305cdf0e10cSrcweir ( mbSet == ((MetaTextLineColorAction&)rMetaAction).mbSet );
3306cdf0e10cSrcweir }
3307cdf0e10cSrcweir
3308cdf0e10cSrcweir // ------------------------------------------------------------------------
3309cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)3310cdf0e10cSrcweir void MetaTextLineColorAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
3311cdf0e10cSrcweir {
3312cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
3313cdf0e10cSrcweir maColor.Write( rOStm, sal_True );
3314cdf0e10cSrcweir rOStm << mbSet;
3315cdf0e10cSrcweir }
3316cdf0e10cSrcweir
3317cdf0e10cSrcweir // ------------------------------------------------------------------------
3318cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)3319cdf0e10cSrcweir void MetaTextLineColorAction::Read( SvStream& rIStm, ImplMetaReadData* )
3320cdf0e10cSrcweir {
3321cdf0e10cSrcweir COMPAT( rIStm );
3322cdf0e10cSrcweir maColor.Read( rIStm, sal_True );
3323cdf0e10cSrcweir rIStm >> mbSet;
3324cdf0e10cSrcweir }
3325cdf0e10cSrcweir
3326cdf0e10cSrcweir // ========================================================================
3327cdf0e10cSrcweir
IMPL_META_ACTION(OverlineColor,META_OVERLINECOLOR_ACTION)3328cdf0e10cSrcweir IMPL_META_ACTION( OverlineColor, META_OVERLINECOLOR_ACTION )
3329cdf0e10cSrcweir
3330cdf0e10cSrcweir // ------------------------------------------------------------------------
3331cdf0e10cSrcweir
3332cdf0e10cSrcweir MetaOverlineColorAction::MetaOverlineColorAction( const Color& rColor, sal_Bool bSet ) :
3333cdf0e10cSrcweir MetaAction ( META_OVERLINECOLOR_ACTION ),
3334cdf0e10cSrcweir maColor ( rColor ),
3335cdf0e10cSrcweir mbSet ( bSet )
3336cdf0e10cSrcweir {
3337cdf0e10cSrcweir }
3338cdf0e10cSrcweir
3339cdf0e10cSrcweir // ------------------------------------------------------------------------
3340cdf0e10cSrcweir
Execute(OutputDevice * pOut)3341cdf0e10cSrcweir void MetaOverlineColorAction::Execute( OutputDevice* pOut )
3342cdf0e10cSrcweir {
3343cdf0e10cSrcweir if( mbSet )
3344cdf0e10cSrcweir pOut->SetOverlineColor( maColor );
3345cdf0e10cSrcweir else
3346cdf0e10cSrcweir pOut->SetOverlineColor();
3347cdf0e10cSrcweir }
3348cdf0e10cSrcweir
3349cdf0e10cSrcweir // ------------------------------------------------------------------------
3350cdf0e10cSrcweir
Clone()3351cdf0e10cSrcweir MetaAction* MetaOverlineColorAction::Clone()
3352cdf0e10cSrcweir {
3353cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaOverlineColorAction( *this );
3354cdf0e10cSrcweir pClone->ResetRefCount();
3355cdf0e10cSrcweir return pClone;
3356cdf0e10cSrcweir }
3357cdf0e10cSrcweir
3358cdf0e10cSrcweir // ------------------------------------------------------------------------
3359cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const3360cdf0e10cSrcweir sal_Bool MetaOverlineColorAction::Compare( const MetaAction& rMetaAction ) const
3361cdf0e10cSrcweir {
3362cdf0e10cSrcweir return ( maColor == ((MetaOverlineColorAction&)rMetaAction).maColor ) &&
3363cdf0e10cSrcweir ( mbSet == ((MetaOverlineColorAction&)rMetaAction).mbSet );
3364cdf0e10cSrcweir }
3365cdf0e10cSrcweir
3366cdf0e10cSrcweir // ------------------------------------------------------------------------
3367cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)3368cdf0e10cSrcweir void MetaOverlineColorAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
3369cdf0e10cSrcweir {
3370cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
3371cdf0e10cSrcweir maColor.Write( rOStm, sal_True );
3372cdf0e10cSrcweir rOStm << mbSet;
3373cdf0e10cSrcweir }
3374cdf0e10cSrcweir
3375cdf0e10cSrcweir // ------------------------------------------------------------------------
3376cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)3377cdf0e10cSrcweir void MetaOverlineColorAction::Read( SvStream& rIStm, ImplMetaReadData* )
3378cdf0e10cSrcweir {
3379cdf0e10cSrcweir COMPAT( rIStm );
3380cdf0e10cSrcweir maColor.Read( rIStm, sal_True );
3381cdf0e10cSrcweir rIStm >> mbSet;
3382cdf0e10cSrcweir }
3383cdf0e10cSrcweir
3384cdf0e10cSrcweir // ========================================================================
3385cdf0e10cSrcweir
IMPL_META_ACTION(TextAlign,META_TEXTALIGN_ACTION)3386cdf0e10cSrcweir IMPL_META_ACTION( TextAlign, META_TEXTALIGN_ACTION )
3387cdf0e10cSrcweir
3388cdf0e10cSrcweir // ------------------------------------------------------------------------
3389cdf0e10cSrcweir
3390cdf0e10cSrcweir MetaTextAlignAction::MetaTextAlignAction( TextAlign aAlign ) :
3391cdf0e10cSrcweir MetaAction ( META_TEXTALIGN_ACTION ),
3392cdf0e10cSrcweir maAlign ( aAlign )
3393cdf0e10cSrcweir {
3394cdf0e10cSrcweir }
3395cdf0e10cSrcweir
3396cdf0e10cSrcweir // ------------------------------------------------------------------------
3397cdf0e10cSrcweir
Execute(OutputDevice * pOut)3398cdf0e10cSrcweir void MetaTextAlignAction::Execute( OutputDevice* pOut )
3399cdf0e10cSrcweir {
3400cdf0e10cSrcweir pOut->SetTextAlign( maAlign );
3401cdf0e10cSrcweir }
3402cdf0e10cSrcweir
3403cdf0e10cSrcweir // ------------------------------------------------------------------------
3404cdf0e10cSrcweir
Clone()3405cdf0e10cSrcweir MetaAction* MetaTextAlignAction::Clone()
3406cdf0e10cSrcweir {
3407cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaTextAlignAction( *this );
3408cdf0e10cSrcweir pClone->ResetRefCount();
3409cdf0e10cSrcweir return pClone;
3410cdf0e10cSrcweir }
3411cdf0e10cSrcweir
3412cdf0e10cSrcweir // ------------------------------------------------------------------------
3413cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const3414cdf0e10cSrcweir sal_Bool MetaTextAlignAction::Compare( const MetaAction& rMetaAction ) const
3415cdf0e10cSrcweir {
3416cdf0e10cSrcweir return maAlign == ((MetaTextAlignAction&)rMetaAction).maAlign;
3417cdf0e10cSrcweir }
3418cdf0e10cSrcweir
3419cdf0e10cSrcweir // ------------------------------------------------------------------------
3420cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)3421cdf0e10cSrcweir void MetaTextAlignAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
3422cdf0e10cSrcweir {
3423cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
3424cdf0e10cSrcweir rOStm << (sal_uInt16) maAlign;
3425cdf0e10cSrcweir }
3426cdf0e10cSrcweir
3427cdf0e10cSrcweir // ------------------------------------------------------------------------
3428cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)3429cdf0e10cSrcweir void MetaTextAlignAction::Read( SvStream& rIStm, ImplMetaReadData* )
3430cdf0e10cSrcweir {
3431cdf0e10cSrcweir sal_uInt16 nTmp16;
3432cdf0e10cSrcweir
3433cdf0e10cSrcweir COMPAT( rIStm );
3434cdf0e10cSrcweir rIStm >> nTmp16; maAlign = (TextAlign) nTmp16;
3435cdf0e10cSrcweir }
3436cdf0e10cSrcweir
3437cdf0e10cSrcweir // ========================================================================
3438cdf0e10cSrcweir
IMPL_META_ACTION(MapMode,META_MAPMODE_ACTION)3439cdf0e10cSrcweir IMPL_META_ACTION( MapMode, META_MAPMODE_ACTION )
3440cdf0e10cSrcweir
3441cdf0e10cSrcweir // ------------------------------------------------------------------------
3442cdf0e10cSrcweir
3443cdf0e10cSrcweir MetaMapModeAction::MetaMapModeAction( const MapMode& rMapMode ) :
3444cdf0e10cSrcweir MetaAction ( META_MAPMODE_ACTION ),
3445cdf0e10cSrcweir maMapMode ( rMapMode )
3446cdf0e10cSrcweir {
3447cdf0e10cSrcweir }
3448cdf0e10cSrcweir
3449cdf0e10cSrcweir // ------------------------------------------------------------------------
3450cdf0e10cSrcweir
Execute(OutputDevice * pOut)3451cdf0e10cSrcweir void MetaMapModeAction::Execute( OutputDevice* pOut )
3452cdf0e10cSrcweir {
3453cdf0e10cSrcweir pOut->SetMapMode( maMapMode );
3454cdf0e10cSrcweir }
3455cdf0e10cSrcweir
3456cdf0e10cSrcweir // ------------------------------------------------------------------------
3457cdf0e10cSrcweir
Clone()3458cdf0e10cSrcweir MetaAction* MetaMapModeAction::Clone()
3459cdf0e10cSrcweir {
3460cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaMapModeAction( *this );
3461cdf0e10cSrcweir pClone->ResetRefCount();
3462cdf0e10cSrcweir return pClone;
3463cdf0e10cSrcweir }
3464cdf0e10cSrcweir
3465cdf0e10cSrcweir // ------------------------------------------------------------------------
3466cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)3467cdf0e10cSrcweir void MetaMapModeAction::Scale( double fScaleX, double fScaleY )
3468cdf0e10cSrcweir {
3469cdf0e10cSrcweir Point aPoint( maMapMode.GetOrigin() );
3470cdf0e10cSrcweir
3471cdf0e10cSrcweir ImplScalePoint( aPoint, fScaleX, fScaleY );
3472cdf0e10cSrcweir maMapMode.SetOrigin( aPoint );
3473cdf0e10cSrcweir }
3474cdf0e10cSrcweir
3475cdf0e10cSrcweir // ------------------------------------------------------------------------
3476cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const3477cdf0e10cSrcweir sal_Bool MetaMapModeAction::Compare( const MetaAction& rMetaAction ) const
3478cdf0e10cSrcweir {
3479cdf0e10cSrcweir return maMapMode == ((MetaMapModeAction&)rMetaAction).maMapMode;
3480cdf0e10cSrcweir }
3481cdf0e10cSrcweir
3482cdf0e10cSrcweir // ------------------------------------------------------------------------
3483cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)3484cdf0e10cSrcweir void MetaMapModeAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
3485cdf0e10cSrcweir {
3486cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
3487cdf0e10cSrcweir rOStm << maMapMode;
3488cdf0e10cSrcweir }
3489cdf0e10cSrcweir
3490cdf0e10cSrcweir // ------------------------------------------------------------------------
3491cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)3492cdf0e10cSrcweir void MetaMapModeAction::Read( SvStream& rIStm, ImplMetaReadData* )
3493cdf0e10cSrcweir {
3494cdf0e10cSrcweir COMPAT( rIStm );
3495cdf0e10cSrcweir rIStm >> maMapMode;
3496cdf0e10cSrcweir }
3497cdf0e10cSrcweir
3498cdf0e10cSrcweir // ========================================================================
3499cdf0e10cSrcweir
IMPL_META_ACTION(Font,META_FONT_ACTION)3500cdf0e10cSrcweir IMPL_META_ACTION( Font, META_FONT_ACTION )
3501cdf0e10cSrcweir
3502cdf0e10cSrcweir // ------------------------------------------------------------------------
3503cdf0e10cSrcweir
3504cdf0e10cSrcweir MetaFontAction::MetaFontAction( const Font& rFont ) :
3505cdf0e10cSrcweir MetaAction ( META_FONT_ACTION ),
3506cdf0e10cSrcweir maFont ( rFont )
3507cdf0e10cSrcweir {
3508cdf0e10cSrcweir // #96876: because RTL_TEXTENCODING_SYMBOL is often set at the StarSymbol font,
3509cdf0e10cSrcweir // we change the textencoding to RTL_TEXTENCODING_UNICODE here, which seems
3510cdf0e10cSrcweir // to be the right way; changing the textencoding at other sources
3511cdf0e10cSrcweir // is too dangerous at the moment
3512cdf0e10cSrcweir if( ( ( maFont.GetName().SearchAscii( "StarSymbol" ) != STRING_NOTFOUND )
3513cdf0e10cSrcweir || ( maFont.GetName().SearchAscii( "OpenSymbol" ) != STRING_NOTFOUND ) )
3514cdf0e10cSrcweir && ( maFont.GetCharSet() != RTL_TEXTENCODING_UNICODE ) )
3515cdf0e10cSrcweir {
3516cdf0e10cSrcweir maFont.SetCharSet( RTL_TEXTENCODING_UNICODE );
3517cdf0e10cSrcweir }
3518cdf0e10cSrcweir }
3519cdf0e10cSrcweir
3520cdf0e10cSrcweir // ------------------------------------------------------------------------
3521cdf0e10cSrcweir
Execute(OutputDevice * pOut)3522cdf0e10cSrcweir void MetaFontAction::Execute( OutputDevice* pOut )
3523cdf0e10cSrcweir {
3524cdf0e10cSrcweir pOut->SetFont( maFont );
3525cdf0e10cSrcweir }
3526cdf0e10cSrcweir
3527cdf0e10cSrcweir // ------------------------------------------------------------------------
3528cdf0e10cSrcweir
Clone()3529cdf0e10cSrcweir MetaAction* MetaFontAction::Clone()
3530cdf0e10cSrcweir {
3531cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaFontAction( *this );
3532cdf0e10cSrcweir pClone->ResetRefCount();
3533cdf0e10cSrcweir return pClone;
3534cdf0e10cSrcweir }
3535cdf0e10cSrcweir
3536cdf0e10cSrcweir // ------------------------------------------------------------------------
3537cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)3538cdf0e10cSrcweir void MetaFontAction::Scale( double fScaleX, double fScaleY )
3539cdf0e10cSrcweir {
3540cdf0e10cSrcweir const Size aSize(
3541cdf0e10cSrcweir FRound(maFont.GetSize().Width() * fabs(fScaleX)),
3542cdf0e10cSrcweir FRound(maFont.GetSize().Height() * fabs(fScaleY)));
3543cdf0e10cSrcweir maFont.SetSize( aSize );
3544cdf0e10cSrcweir }
3545cdf0e10cSrcweir
3546cdf0e10cSrcweir // ------------------------------------------------------------------------
3547cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const3548cdf0e10cSrcweir sal_Bool MetaFontAction::Compare( const MetaAction& rMetaAction ) const
3549cdf0e10cSrcweir {
3550cdf0e10cSrcweir return maFont == ((MetaFontAction&)rMetaAction).maFont;
3551cdf0e10cSrcweir }
3552cdf0e10cSrcweir
3553cdf0e10cSrcweir // ------------------------------------------------------------------------
3554cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)3555cdf0e10cSrcweir void MetaFontAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
3556cdf0e10cSrcweir {
3557cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
3558cdf0e10cSrcweir rOStm << maFont;
3559cdf0e10cSrcweir pData->meActualCharSet = maFont.GetCharSet();
3560cdf0e10cSrcweir if ( pData->meActualCharSet == RTL_TEXTENCODING_DONTKNOW )
3561cdf0e10cSrcweir pData->meActualCharSet = gsl_getSystemTextEncoding();
3562cdf0e10cSrcweir }
3563cdf0e10cSrcweir
3564cdf0e10cSrcweir // ------------------------------------------------------------------------
3565cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData * pData)3566cdf0e10cSrcweir void MetaFontAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
3567cdf0e10cSrcweir {
3568cdf0e10cSrcweir COMPAT( rIStm );
3569cdf0e10cSrcweir rIStm >> maFont;
3570cdf0e10cSrcweir pData->meActualCharSet = maFont.GetCharSet();
3571cdf0e10cSrcweir if ( pData->meActualCharSet == RTL_TEXTENCODING_DONTKNOW )
3572cdf0e10cSrcweir pData->meActualCharSet = gsl_getSystemTextEncoding();
3573cdf0e10cSrcweir }
3574cdf0e10cSrcweir
3575cdf0e10cSrcweir // ========================================================================
3576cdf0e10cSrcweir
IMPL_META_ACTION(Push,META_PUSH_ACTION)3577cdf0e10cSrcweir IMPL_META_ACTION( Push, META_PUSH_ACTION )
3578cdf0e10cSrcweir
3579cdf0e10cSrcweir // ------------------------------------------------------------------------
3580cdf0e10cSrcweir
3581cdf0e10cSrcweir MetaPushAction::MetaPushAction( sal_uInt16 nFlags ) :
3582cdf0e10cSrcweir MetaAction ( META_PUSH_ACTION ),
3583cdf0e10cSrcweir mnFlags ( nFlags )
3584cdf0e10cSrcweir {
3585cdf0e10cSrcweir }
3586cdf0e10cSrcweir
3587cdf0e10cSrcweir // ------------------------------------------------------------------------
3588cdf0e10cSrcweir
Execute(OutputDevice * pOut)3589cdf0e10cSrcweir void MetaPushAction::Execute( OutputDevice* pOut )
3590cdf0e10cSrcweir {
3591cdf0e10cSrcweir pOut->Push( mnFlags );
3592cdf0e10cSrcweir }
3593cdf0e10cSrcweir
3594cdf0e10cSrcweir // ------------------------------------------------------------------------
3595cdf0e10cSrcweir
Clone()3596cdf0e10cSrcweir MetaAction* MetaPushAction::Clone()
3597cdf0e10cSrcweir {
3598cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaPushAction( *this );
3599cdf0e10cSrcweir pClone->ResetRefCount();
3600cdf0e10cSrcweir return pClone;
3601cdf0e10cSrcweir }
3602cdf0e10cSrcweir
3603cdf0e10cSrcweir // ------------------------------------------------------------------------
3604cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const3605cdf0e10cSrcweir sal_Bool MetaPushAction::Compare( const MetaAction& rMetaAction ) const
3606cdf0e10cSrcweir {
3607cdf0e10cSrcweir return mnFlags == ((MetaPushAction&)rMetaAction).mnFlags;
3608cdf0e10cSrcweir }
3609cdf0e10cSrcweir
3610cdf0e10cSrcweir // ------------------------------------------------------------------------
3611cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)3612cdf0e10cSrcweir void MetaPushAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
3613cdf0e10cSrcweir {
3614cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
3615cdf0e10cSrcweir rOStm << mnFlags;
3616cdf0e10cSrcweir }
3617cdf0e10cSrcweir
3618cdf0e10cSrcweir // ------------------------------------------------------------------------
3619cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)3620cdf0e10cSrcweir void MetaPushAction::Read( SvStream& rIStm, ImplMetaReadData* )
3621cdf0e10cSrcweir {
3622cdf0e10cSrcweir COMPAT( rIStm );
3623cdf0e10cSrcweir rIStm >> mnFlags;
3624cdf0e10cSrcweir }
3625cdf0e10cSrcweir
3626cdf0e10cSrcweir // ========================================================================
3627cdf0e10cSrcweir
IMPL_META_ACTION(Pop,META_POP_ACTION)3628cdf0e10cSrcweir IMPL_META_ACTION( Pop, META_POP_ACTION )
3629cdf0e10cSrcweir
3630cdf0e10cSrcweir // ------------------------------------------------------------------------
3631cdf0e10cSrcweir
3632cdf0e10cSrcweir void MetaPopAction::Execute( OutputDevice* pOut )
3633cdf0e10cSrcweir {
3634cdf0e10cSrcweir pOut->Pop();
3635cdf0e10cSrcweir }
3636cdf0e10cSrcweir
3637cdf0e10cSrcweir // ------------------------------------------------------------------------
3638cdf0e10cSrcweir
Clone()3639cdf0e10cSrcweir MetaAction* MetaPopAction::Clone()
3640cdf0e10cSrcweir {
3641cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaPopAction( *this );
3642cdf0e10cSrcweir pClone->ResetRefCount();
3643cdf0e10cSrcweir return pClone;
3644cdf0e10cSrcweir }
3645cdf0e10cSrcweir
3646cdf0e10cSrcweir // ------------------------------------------------------------------------
3647cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)3648cdf0e10cSrcweir void MetaPopAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
3649cdf0e10cSrcweir {
3650cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
3651cdf0e10cSrcweir }
3652cdf0e10cSrcweir
3653cdf0e10cSrcweir // ------------------------------------------------------------------------
3654cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)3655cdf0e10cSrcweir void MetaPopAction::Read( SvStream& rIStm, ImplMetaReadData* )
3656cdf0e10cSrcweir {
3657cdf0e10cSrcweir COMPAT( rIStm );
3658cdf0e10cSrcweir }
3659cdf0e10cSrcweir
3660cdf0e10cSrcweir // ========================================================================
3661cdf0e10cSrcweir
IMPL_META_ACTION(RasterOp,META_RASTEROP_ACTION)3662cdf0e10cSrcweir IMPL_META_ACTION( RasterOp, META_RASTEROP_ACTION )
3663cdf0e10cSrcweir
3664cdf0e10cSrcweir // ------------------------------------------------------------------------
3665cdf0e10cSrcweir
3666cdf0e10cSrcweir MetaRasterOpAction::MetaRasterOpAction( RasterOp eRasterOp ) :
3667cdf0e10cSrcweir MetaAction ( META_RASTEROP_ACTION ),
3668cdf0e10cSrcweir meRasterOp ( eRasterOp )
3669cdf0e10cSrcweir {
3670cdf0e10cSrcweir }
3671cdf0e10cSrcweir
3672cdf0e10cSrcweir // ------------------------------------------------------------------------
3673cdf0e10cSrcweir
Execute(OutputDevice * pOut)3674cdf0e10cSrcweir void MetaRasterOpAction::Execute( OutputDevice* pOut )
3675cdf0e10cSrcweir {
3676cdf0e10cSrcweir pOut->SetRasterOp( meRasterOp );
3677cdf0e10cSrcweir }
3678cdf0e10cSrcweir
3679cdf0e10cSrcweir // ------------------------------------------------------------------------
3680cdf0e10cSrcweir
Clone()3681cdf0e10cSrcweir MetaAction* MetaRasterOpAction::Clone()
3682cdf0e10cSrcweir {
3683cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaRasterOpAction( *this );
3684cdf0e10cSrcweir pClone->ResetRefCount();
3685cdf0e10cSrcweir return pClone;
3686cdf0e10cSrcweir }
3687cdf0e10cSrcweir
3688cdf0e10cSrcweir // ------------------------------------------------------------------------
3689cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const3690cdf0e10cSrcweir sal_Bool MetaRasterOpAction::Compare( const MetaAction& rMetaAction ) const
3691cdf0e10cSrcweir {
3692cdf0e10cSrcweir return meRasterOp == ((MetaRasterOpAction&)rMetaAction).meRasterOp;
3693cdf0e10cSrcweir }
3694cdf0e10cSrcweir
3695cdf0e10cSrcweir // ------------------------------------------------------------------------
3696cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)3697cdf0e10cSrcweir void MetaRasterOpAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
3698cdf0e10cSrcweir {
3699cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
3700cdf0e10cSrcweir rOStm << (sal_uInt16) meRasterOp;
3701cdf0e10cSrcweir }
3702cdf0e10cSrcweir
3703cdf0e10cSrcweir // ------------------------------------------------------------------------
3704cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)3705cdf0e10cSrcweir void MetaRasterOpAction::Read( SvStream& rIStm, ImplMetaReadData* )
3706cdf0e10cSrcweir {
3707cdf0e10cSrcweir sal_uInt16 nTmp16;
3708cdf0e10cSrcweir
3709cdf0e10cSrcweir COMPAT( rIStm );
3710cdf0e10cSrcweir rIStm >> nTmp16; meRasterOp = (RasterOp) nTmp16;
3711cdf0e10cSrcweir }
3712cdf0e10cSrcweir
3713cdf0e10cSrcweir // ========================================================================
3714cdf0e10cSrcweir
IMPL_META_ACTION(Transparent,META_TRANSPARENT_ACTION)3715cdf0e10cSrcweir IMPL_META_ACTION( Transparent, META_TRANSPARENT_ACTION )
3716cdf0e10cSrcweir
3717cdf0e10cSrcweir // ------------------------------------------------------------------------
3718cdf0e10cSrcweir
3719cdf0e10cSrcweir MetaTransparentAction::MetaTransparentAction( const PolyPolygon& rPolyPoly, sal_uInt16 nTransPercent ) :
3720cdf0e10cSrcweir MetaAction ( META_TRANSPARENT_ACTION ),
3721cdf0e10cSrcweir maPolyPoly ( rPolyPoly ),
3722cdf0e10cSrcweir mnTransPercent ( nTransPercent )
3723cdf0e10cSrcweir {
3724cdf0e10cSrcweir }
3725cdf0e10cSrcweir
3726cdf0e10cSrcweir // ------------------------------------------------------------------------
3727cdf0e10cSrcweir
Execute(OutputDevice * pOut)3728cdf0e10cSrcweir void MetaTransparentAction::Execute( OutputDevice* pOut )
3729cdf0e10cSrcweir {
3730cdf0e10cSrcweir pOut->DrawTransparent( maPolyPoly, mnTransPercent );
3731cdf0e10cSrcweir }
3732cdf0e10cSrcweir
3733cdf0e10cSrcweir // ------------------------------------------------------------------------
3734cdf0e10cSrcweir
Clone()3735cdf0e10cSrcweir MetaAction* MetaTransparentAction::Clone()
3736cdf0e10cSrcweir {
3737cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaTransparentAction( *this );
3738cdf0e10cSrcweir pClone->ResetRefCount();
3739cdf0e10cSrcweir return pClone;
3740cdf0e10cSrcweir }
3741cdf0e10cSrcweir
3742cdf0e10cSrcweir // ------------------------------------------------------------------------
3743cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)3744cdf0e10cSrcweir void MetaTransparentAction::Move( long nHorzMove, long nVertMove )
3745cdf0e10cSrcweir {
3746cdf0e10cSrcweir maPolyPoly.Move( nHorzMove, nVertMove );
3747cdf0e10cSrcweir }
3748cdf0e10cSrcweir
3749cdf0e10cSrcweir // ------------------------------------------------------------------------
3750cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)3751cdf0e10cSrcweir void MetaTransparentAction::Scale( double fScaleX, double fScaleY )
3752cdf0e10cSrcweir {
3753cdf0e10cSrcweir for( sal_uInt16 i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
3754cdf0e10cSrcweir ImplScalePoly( maPolyPoly[ i ], fScaleX, fScaleY );
3755cdf0e10cSrcweir }
3756cdf0e10cSrcweir
3757cdf0e10cSrcweir // ------------------------------------------------------------------------
3758cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const3759cdf0e10cSrcweir sal_Bool MetaTransparentAction::Compare( const MetaAction& rMetaAction ) const
3760cdf0e10cSrcweir {
3761cdf0e10cSrcweir return ( maPolyPoly == ((MetaTransparentAction&)rMetaAction).maPolyPoly ) &&
3762cdf0e10cSrcweir ( mnTransPercent == ((MetaTransparentAction&)rMetaAction).mnTransPercent );
3763cdf0e10cSrcweir }
3764cdf0e10cSrcweir
3765cdf0e10cSrcweir // ------------------------------------------------------------------------
3766cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)3767cdf0e10cSrcweir void MetaTransparentAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
3768cdf0e10cSrcweir {
3769cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
3770cdf0e10cSrcweir
3771cdf0e10cSrcweir // #i105373# The PolyPolygon in this action may be a curve; this
3772cdf0e10cSrcweir // was ignored until now what is an error. To make older office
3773cdf0e10cSrcweir // versions work with MetaFiles, i opt for applying AdaptiveSubdivide
3774cdf0e10cSrcweir // to the PolyPoylgon.
3775cdf0e10cSrcweir // The alternative would be to really write the curve information
3776cdf0e10cSrcweir // like in MetaPolyPolygonAction::Write (where someone extended it
3777cdf0e10cSrcweir // correctly, but not here :-( ).
3778cdf0e10cSrcweir // The golden solution would be to combine both, but i think it's
3779cdf0e10cSrcweir // not necessary; a good subdivision will be sufficient.
3780cdf0e10cSrcweir PolyPolygon aNoCurvePolyPolygon;
3781cdf0e10cSrcweir maPolyPoly.AdaptiveSubdivide(aNoCurvePolyPolygon);
3782cdf0e10cSrcweir
3783cdf0e10cSrcweir rOStm << aNoCurvePolyPolygon;
3784cdf0e10cSrcweir rOStm << mnTransPercent;
3785cdf0e10cSrcweir }
3786cdf0e10cSrcweir
3787cdf0e10cSrcweir // ------------------------------------------------------------------------
3788cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)3789cdf0e10cSrcweir void MetaTransparentAction::Read( SvStream& rIStm, ImplMetaReadData* )
3790cdf0e10cSrcweir {
3791cdf0e10cSrcweir COMPAT( rIStm );
3792cdf0e10cSrcweir rIStm >> maPolyPoly;
3793cdf0e10cSrcweir rIStm >> mnTransPercent;
3794cdf0e10cSrcweir }
3795cdf0e10cSrcweir
3796cdf0e10cSrcweir // ========================================================================
3797cdf0e10cSrcweir
IMPL_META_ACTION(FloatTransparent,META_FLOATTRANSPARENT_ACTION)3798cdf0e10cSrcweir IMPL_META_ACTION( FloatTransparent, META_FLOATTRANSPARENT_ACTION )
3799cdf0e10cSrcweir
3800cdf0e10cSrcweir // ------------------------------------------------------------------------
3801cdf0e10cSrcweir
3802cdf0e10cSrcweir MetaFloatTransparentAction::MetaFloatTransparentAction( const GDIMetaFile& rMtf, const Point& rPos,
3803cdf0e10cSrcweir const Size& rSize, const Gradient& rGradient ) :
3804cdf0e10cSrcweir MetaAction ( META_FLOATTRANSPARENT_ACTION ),
3805cdf0e10cSrcweir maMtf ( rMtf ),
3806cdf0e10cSrcweir maPoint ( rPos ),
3807cdf0e10cSrcweir maSize ( rSize ),
3808cdf0e10cSrcweir maGradient ( rGradient )
3809cdf0e10cSrcweir {
3810cdf0e10cSrcweir }
3811cdf0e10cSrcweir
3812cdf0e10cSrcweir // ------------------------------------------------------------------------
3813cdf0e10cSrcweir
Execute(OutputDevice * pOut)3814cdf0e10cSrcweir void MetaFloatTransparentAction::Execute( OutputDevice* pOut )
3815cdf0e10cSrcweir {
3816cdf0e10cSrcweir pOut->DrawTransparent( maMtf, maPoint, maSize, maGradient );
3817cdf0e10cSrcweir }
3818cdf0e10cSrcweir
3819cdf0e10cSrcweir // ------------------------------------------------------------------------
3820cdf0e10cSrcweir
Clone()3821cdf0e10cSrcweir MetaAction* MetaFloatTransparentAction::Clone()
3822cdf0e10cSrcweir {
3823cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaFloatTransparentAction( *this );
3824cdf0e10cSrcweir pClone->ResetRefCount();
3825cdf0e10cSrcweir return pClone;
3826cdf0e10cSrcweir }
3827cdf0e10cSrcweir
3828cdf0e10cSrcweir // ------------------------------------------------------------------------
3829cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)3830cdf0e10cSrcweir void MetaFloatTransparentAction::Move( long nHorzMove, long nVertMove )
3831cdf0e10cSrcweir {
3832cdf0e10cSrcweir maPoint.Move( nHorzMove, nVertMove );
3833cdf0e10cSrcweir }
3834cdf0e10cSrcweir
3835cdf0e10cSrcweir // ------------------------------------------------------------------------
3836cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)3837cdf0e10cSrcweir void MetaFloatTransparentAction::Scale( double fScaleX, double fScaleY )
3838cdf0e10cSrcweir {
3839cdf0e10cSrcweir Rectangle aRectangle(maPoint, maSize);
3840cdf0e10cSrcweir ImplScaleRect( aRectangle, fScaleX, fScaleY );
3841cdf0e10cSrcweir maPoint = aRectangle.TopLeft();
3842cdf0e10cSrcweir maSize = aRectangle.GetSize();
3843cdf0e10cSrcweir }
3844cdf0e10cSrcweir
3845cdf0e10cSrcweir // ------------------------------------------------------------------------
3846cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const3847cdf0e10cSrcweir sal_Bool MetaFloatTransparentAction::Compare( const MetaAction& rMetaAction ) const
3848cdf0e10cSrcweir {
3849cdf0e10cSrcweir return ( maMtf == ((MetaFloatTransparentAction&)rMetaAction).maMtf ) &&
3850cdf0e10cSrcweir ( maPoint == ((MetaFloatTransparentAction&)rMetaAction).maPoint ) &&
3851cdf0e10cSrcweir ( maSize == ((MetaFloatTransparentAction&)rMetaAction).maSize ) &&
3852cdf0e10cSrcweir ( maGradient == ((MetaFloatTransparentAction&)rMetaAction).maGradient );
3853cdf0e10cSrcweir }
3854cdf0e10cSrcweir
3855cdf0e10cSrcweir // ------------------------------------------------------------------------
3856cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)3857cdf0e10cSrcweir void MetaFloatTransparentAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
3858cdf0e10cSrcweir {
3859cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
3860cdf0e10cSrcweir
3861cdf0e10cSrcweir maMtf.Write( rOStm );
3862cdf0e10cSrcweir rOStm << maPoint << maSize << maGradient;
3863cdf0e10cSrcweir }
3864cdf0e10cSrcweir
3865cdf0e10cSrcweir // ------------------------------------------------------------------------
3866cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)3867cdf0e10cSrcweir void MetaFloatTransparentAction::Read( SvStream& rIStm, ImplMetaReadData* )
3868cdf0e10cSrcweir {
3869cdf0e10cSrcweir COMPAT( rIStm );
3870cdf0e10cSrcweir rIStm >> maMtf >> maPoint >> maSize >> maGradient;
3871cdf0e10cSrcweir }
3872cdf0e10cSrcweir
3873cdf0e10cSrcweir // ========================================================================
3874cdf0e10cSrcweir
IMPL_META_ACTION(EPS,META_EPS_ACTION)3875cdf0e10cSrcweir IMPL_META_ACTION( EPS, META_EPS_ACTION )
3876cdf0e10cSrcweir
3877cdf0e10cSrcweir // ------------------------------------------------------------------------
3878cdf0e10cSrcweir
3879cdf0e10cSrcweir MetaEPSAction::MetaEPSAction( const Point& rPoint, const Size& rSize,
3880cdf0e10cSrcweir const GfxLink& rGfxLink, const GDIMetaFile& rSubst ) :
3881cdf0e10cSrcweir MetaAction ( META_EPS_ACTION ),
3882cdf0e10cSrcweir maGfxLink ( rGfxLink ),
3883cdf0e10cSrcweir maSubst ( rSubst ),
3884cdf0e10cSrcweir maPoint ( rPoint ),
3885cdf0e10cSrcweir maSize ( rSize )
3886cdf0e10cSrcweir {
3887cdf0e10cSrcweir }
3888cdf0e10cSrcweir
3889cdf0e10cSrcweir // ------------------------------------------------------------------------
3890cdf0e10cSrcweir
Execute(OutputDevice * pOut)3891cdf0e10cSrcweir void MetaEPSAction::Execute( OutputDevice* pOut )
3892cdf0e10cSrcweir {
3893cdf0e10cSrcweir pOut->DrawEPS( maPoint, maSize, maGfxLink, &maSubst );
3894cdf0e10cSrcweir }
3895cdf0e10cSrcweir
3896cdf0e10cSrcweir // ------------------------------------------------------------------------
3897cdf0e10cSrcweir
Clone()3898cdf0e10cSrcweir MetaAction* MetaEPSAction::Clone()
3899cdf0e10cSrcweir {
3900cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaEPSAction( *this );
3901cdf0e10cSrcweir pClone->ResetRefCount();
3902cdf0e10cSrcweir return pClone;
3903cdf0e10cSrcweir }
3904cdf0e10cSrcweir
3905cdf0e10cSrcweir // ------------------------------------------------------------------------
3906cdf0e10cSrcweir
Move(long nHorzMove,long nVertMove)3907cdf0e10cSrcweir void MetaEPSAction::Move( long nHorzMove, long nVertMove )
3908cdf0e10cSrcweir {
3909cdf0e10cSrcweir maPoint.Move( nHorzMove, nVertMove );
3910cdf0e10cSrcweir }
3911cdf0e10cSrcweir
3912cdf0e10cSrcweir // ------------------------------------------------------------------------
3913cdf0e10cSrcweir
Scale(double fScaleX,double fScaleY)3914cdf0e10cSrcweir void MetaEPSAction::Scale( double fScaleX, double fScaleY )
3915cdf0e10cSrcweir {
3916cdf0e10cSrcweir Rectangle aRectangle(maPoint, maSize);
3917cdf0e10cSrcweir ImplScaleRect( aRectangle, fScaleX, fScaleY );
3918cdf0e10cSrcweir maPoint = aRectangle.TopLeft();
3919cdf0e10cSrcweir maSize = aRectangle.GetSize();
3920cdf0e10cSrcweir }
3921cdf0e10cSrcweir
3922cdf0e10cSrcweir // ------------------------------------------------------------------------
3923cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const3924cdf0e10cSrcweir sal_Bool MetaEPSAction::Compare( const MetaAction& rMetaAction ) const
3925cdf0e10cSrcweir {
3926cdf0e10cSrcweir return ( maGfxLink.IsEqual(((MetaEPSAction&)rMetaAction).maGfxLink )) &&
3927cdf0e10cSrcweir ( maSubst == ((MetaEPSAction&)rMetaAction).maSubst ) &&
3928cdf0e10cSrcweir ( maPoint == ((MetaEPSAction&)rMetaAction).maPoint ) &&
3929cdf0e10cSrcweir ( maSize == ((MetaEPSAction&)rMetaAction).maSize );
3930cdf0e10cSrcweir }
3931cdf0e10cSrcweir
3932cdf0e10cSrcweir // ------------------------------------------------------------------------
3933cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)3934cdf0e10cSrcweir void MetaEPSAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
3935cdf0e10cSrcweir {
3936cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
3937cdf0e10cSrcweir rOStm << maGfxLink;
3938cdf0e10cSrcweir rOStm << maPoint;
3939cdf0e10cSrcweir rOStm << maSize;
3940cdf0e10cSrcweir maSubst.Write( rOStm );
3941cdf0e10cSrcweir }
3942cdf0e10cSrcweir
3943cdf0e10cSrcweir // ------------------------------------------------------------------------
3944cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)3945cdf0e10cSrcweir void MetaEPSAction::Read( SvStream& rIStm, ImplMetaReadData* )
3946cdf0e10cSrcweir {
3947cdf0e10cSrcweir COMPAT( rIStm );
3948cdf0e10cSrcweir rIStm >> maGfxLink;
3949cdf0e10cSrcweir rIStm >> maPoint;
3950cdf0e10cSrcweir rIStm >> maSize;
3951cdf0e10cSrcweir rIStm >> maSubst;
3952cdf0e10cSrcweir }
3953cdf0e10cSrcweir
3954cdf0e10cSrcweir // ========================================================================
3955cdf0e10cSrcweir
IMPL_META_ACTION(RefPoint,META_REFPOINT_ACTION)3956cdf0e10cSrcweir IMPL_META_ACTION( RefPoint, META_REFPOINT_ACTION )
3957cdf0e10cSrcweir
3958cdf0e10cSrcweir // ------------------------------------------------------------------------
3959cdf0e10cSrcweir
3960cdf0e10cSrcweir MetaRefPointAction::MetaRefPointAction( const Point& rRefPoint, sal_Bool bSet ) :
3961cdf0e10cSrcweir MetaAction ( META_REFPOINT_ACTION ),
3962cdf0e10cSrcweir maRefPoint ( rRefPoint ),
3963cdf0e10cSrcweir mbSet ( bSet )
3964cdf0e10cSrcweir {
3965cdf0e10cSrcweir }
3966cdf0e10cSrcweir
3967cdf0e10cSrcweir // ------------------------------------------------------------------------
3968cdf0e10cSrcweir
Execute(OutputDevice * pOut)3969cdf0e10cSrcweir void MetaRefPointAction::Execute( OutputDevice* pOut )
3970cdf0e10cSrcweir {
3971cdf0e10cSrcweir if( mbSet )
3972cdf0e10cSrcweir pOut->SetRefPoint( maRefPoint );
3973cdf0e10cSrcweir else
3974cdf0e10cSrcweir pOut->SetRefPoint();
3975cdf0e10cSrcweir }
3976cdf0e10cSrcweir
3977cdf0e10cSrcweir // ------------------------------------------------------------------------
3978cdf0e10cSrcweir
Clone()3979cdf0e10cSrcweir MetaAction* MetaRefPointAction::Clone()
3980cdf0e10cSrcweir {
3981cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaRefPointAction( *this );
3982cdf0e10cSrcweir pClone->ResetRefCount();
3983cdf0e10cSrcweir return pClone;
3984cdf0e10cSrcweir }
3985cdf0e10cSrcweir
3986cdf0e10cSrcweir // ------------------------------------------------------------------------
3987cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const3988cdf0e10cSrcweir sal_Bool MetaRefPointAction::Compare( const MetaAction& rMetaAction ) const
3989cdf0e10cSrcweir {
3990cdf0e10cSrcweir return ( maRefPoint == ((MetaRefPointAction&)rMetaAction).maRefPoint ) &&
3991cdf0e10cSrcweir ( mbSet == ((MetaRefPointAction&)rMetaAction).mbSet );
3992cdf0e10cSrcweir }
3993cdf0e10cSrcweir
3994cdf0e10cSrcweir // ------------------------------------------------------------------------
3995cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)3996cdf0e10cSrcweir void MetaRefPointAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
3997cdf0e10cSrcweir {
3998cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
3999cdf0e10cSrcweir rOStm << maRefPoint << mbSet;
4000cdf0e10cSrcweir }
4001cdf0e10cSrcweir
4002cdf0e10cSrcweir // ------------------------------------------------------------------------
4003cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)4004cdf0e10cSrcweir void MetaRefPointAction::Read( SvStream& rIStm, ImplMetaReadData* )
4005cdf0e10cSrcweir {
4006cdf0e10cSrcweir COMPAT( rIStm );
4007cdf0e10cSrcweir rIStm >> maRefPoint >> mbSet;
4008cdf0e10cSrcweir }
4009cdf0e10cSrcweir
4010cdf0e10cSrcweir // ========================================================================
4011cdf0e10cSrcweir
MetaCommentAction(sal_Int32 nValue)4012cdf0e10cSrcweir MetaCommentAction::MetaCommentAction( sal_Int32 nValue ) :
4013cdf0e10cSrcweir MetaAction ( META_COMMENT_ACTION ),
4014cdf0e10cSrcweir mnValue ( nValue )
4015cdf0e10cSrcweir {
4016cdf0e10cSrcweir ImplInitDynamicData( NULL, 0UL );
4017cdf0e10cSrcweir }
4018cdf0e10cSrcweir
4019cdf0e10cSrcweir // ------------------------------------------------------------------------
4020cdf0e10cSrcweir
MetaCommentAction(const MetaCommentAction & rAct)4021cdf0e10cSrcweir MetaCommentAction::MetaCommentAction( const MetaCommentAction& rAct ) :
4022cdf0e10cSrcweir MetaAction ( META_COMMENT_ACTION ),
4023cdf0e10cSrcweir maComment ( rAct.maComment ),
4024cdf0e10cSrcweir mnValue ( rAct.mnValue )
4025cdf0e10cSrcweir {
4026cdf0e10cSrcweir ImplInitDynamicData( rAct.mpData, rAct.mnDataSize );
4027cdf0e10cSrcweir }
4028cdf0e10cSrcweir
4029cdf0e10cSrcweir // ------------------------------------------------------------------------
4030cdf0e10cSrcweir
MetaCommentAction(const ByteString & rComment,sal_Int32 nValue,const sal_uInt8 * pData,sal_uInt32 nDataSize)4031cdf0e10cSrcweir MetaCommentAction::MetaCommentAction( const ByteString& rComment, sal_Int32 nValue, const sal_uInt8* pData, sal_uInt32 nDataSize ) :
4032cdf0e10cSrcweir MetaAction ( META_COMMENT_ACTION ),
4033cdf0e10cSrcweir maComment ( rComment ),
4034cdf0e10cSrcweir mnValue ( nValue )
4035cdf0e10cSrcweir {
4036cdf0e10cSrcweir ImplInitDynamicData( pData, nDataSize );
4037cdf0e10cSrcweir }
4038cdf0e10cSrcweir
4039cdf0e10cSrcweir // ------------------------------------------------------------------------
4040cdf0e10cSrcweir
MetaCommentAction(const sal_uInt8 * pData,sal_uInt32 nDataSize)4041cdf0e10cSrcweir MetaCommentAction::MetaCommentAction( const sal_uInt8* pData, sal_uInt32 nDataSize ) :
4042cdf0e10cSrcweir MetaAction ( META_COMMENT_ACTION ),
4043cdf0e10cSrcweir mnValue ( 0L )
4044cdf0e10cSrcweir {
4045cdf0e10cSrcweir ImplInitDynamicData( pData, nDataSize );
4046cdf0e10cSrcweir }
4047cdf0e10cSrcweir
4048cdf0e10cSrcweir // ------------------------------------------------------------------------
4049cdf0e10cSrcweir
~MetaCommentAction()4050cdf0e10cSrcweir MetaCommentAction::~MetaCommentAction()
4051cdf0e10cSrcweir {
4052cdf0e10cSrcweir if ( mpData )
4053cdf0e10cSrcweir delete[] mpData;
4054cdf0e10cSrcweir }
4055cdf0e10cSrcweir
4056cdf0e10cSrcweir // ------------------------------------------------------------------------
4057cdf0e10cSrcweir
ImplInitDynamicData(const sal_uInt8 * pData,sal_uInt32 nDataSize)4058cdf0e10cSrcweir void MetaCommentAction::ImplInitDynamicData( const sal_uInt8* pData, sal_uInt32 nDataSize )
4059cdf0e10cSrcweir {
4060cdf0e10cSrcweir if ( nDataSize && pData )
4061cdf0e10cSrcweir {
4062cdf0e10cSrcweir mnDataSize = nDataSize, mpData = new sal_uInt8[ mnDataSize ];
4063cdf0e10cSrcweir memcpy( mpData, pData, mnDataSize );
4064cdf0e10cSrcweir }
4065cdf0e10cSrcweir else
4066cdf0e10cSrcweir {
4067cdf0e10cSrcweir mnDataSize = 0;
4068cdf0e10cSrcweir mpData = NULL;
4069cdf0e10cSrcweir }
4070cdf0e10cSrcweir }
4071cdf0e10cSrcweir
4072cdf0e10cSrcweir // ------------------------------------------------------------------------
4073cdf0e10cSrcweir
Execute(OutputDevice * pOut)4074cdf0e10cSrcweir void MetaCommentAction::Execute( OutputDevice* pOut )
4075cdf0e10cSrcweir {
4076cdf0e10cSrcweir if ( pOut->GetConnectMetaFile() )
4077cdf0e10cSrcweir {
4078cdf0e10cSrcweir Duplicate();
4079cdf0e10cSrcweir pOut->GetConnectMetaFile()->AddAction( this );
4080cdf0e10cSrcweir }
4081cdf0e10cSrcweir }
4082cdf0e10cSrcweir
4083cdf0e10cSrcweir // ------------------------------------------------------------------------
4084cdf0e10cSrcweir
Clone()4085cdf0e10cSrcweir MetaAction* MetaCommentAction::Clone()
4086cdf0e10cSrcweir {
4087cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaCommentAction( *this );
4088cdf0e10cSrcweir pClone->ResetRefCount();
4089cdf0e10cSrcweir return pClone;
4090cdf0e10cSrcweir }
4091cdf0e10cSrcweir
Move(long nXMove,long nYMove)4092cdf0e10cSrcweir void MetaCommentAction::Move( long nXMove, long nYMove )
4093cdf0e10cSrcweir {
4094cdf0e10cSrcweir if ( nXMove || nYMove )
4095cdf0e10cSrcweir {
4096cdf0e10cSrcweir if ( mnDataSize && mpData )
4097cdf0e10cSrcweir {
4098cdf0e10cSrcweir sal_Bool bPathStroke = maComment.Equals( "XPATHSTROKE_SEQ_BEGIN" );
4099cdf0e10cSrcweir if ( bPathStroke || maComment.Equals( "XPATHFILL_SEQ_BEGIN" ) )
4100cdf0e10cSrcweir {
4101cdf0e10cSrcweir SvMemoryStream aMemStm( (void*)mpData, mnDataSize, STREAM_READ );
4102cdf0e10cSrcweir SvMemoryStream aDest;
4103cdf0e10cSrcweir if ( bPathStroke )
4104cdf0e10cSrcweir {
4105cdf0e10cSrcweir SvtGraphicStroke aStroke;
4106cdf0e10cSrcweir aMemStm >> aStroke;
41079d531167SArmin Le Grand
4108cdf0e10cSrcweir Polygon aPath;
4109cdf0e10cSrcweir aStroke.getPath( aPath );
4110cdf0e10cSrcweir aPath.Move( nXMove, nYMove );
4111cdf0e10cSrcweir aStroke.setPath( aPath );
41129d531167SArmin Le Grand
41139d531167SArmin Le Grand PolyPolygon aStartArrow;
41149d531167SArmin Le Grand aStroke.getStartArrow(aStartArrow);
41159d531167SArmin Le Grand aStartArrow.Move(nXMove, nYMove);
41169d531167SArmin Le Grand aStroke.setStartArrow(aStartArrow);
41179d531167SArmin Le Grand
41189d531167SArmin Le Grand PolyPolygon aEndArrow;
41199d531167SArmin Le Grand aStroke.getEndArrow(aEndArrow);
41209d531167SArmin Le Grand aEndArrow.Move(nXMove, nYMove);
41219d531167SArmin Le Grand aStroke.setEndArrow(aEndArrow);
41229d531167SArmin Le Grand
4123cdf0e10cSrcweir aDest << aStroke;
4124cdf0e10cSrcweir }
4125cdf0e10cSrcweir else
4126cdf0e10cSrcweir {
4127cdf0e10cSrcweir SvtGraphicFill aFill;
4128cdf0e10cSrcweir aMemStm >> aFill;
41299d531167SArmin Le Grand
4130cdf0e10cSrcweir PolyPolygon aPath;
4131cdf0e10cSrcweir aFill.getPath( aPath );
4132cdf0e10cSrcweir aPath.Move( nXMove, nYMove );
4133cdf0e10cSrcweir aFill.setPath( aPath );
41349d531167SArmin Le Grand
4135cdf0e10cSrcweir aDest << aFill;
4136cdf0e10cSrcweir }
4137cdf0e10cSrcweir delete[] mpData;
4138cdf0e10cSrcweir ImplInitDynamicData( static_cast<const sal_uInt8*>( aDest.GetData() ), aDest.Tell() );
4139cdf0e10cSrcweir }
4140cdf0e10cSrcweir }
4141cdf0e10cSrcweir }
4142cdf0e10cSrcweir }
4143cdf0e10cSrcweir
4144cdf0e10cSrcweir // ------------------------------------------------------------------------
4145cdf0e10cSrcweir // SJ: 25.07.06 #i56656# we are not able to mirrorcertain kind of
4146cdf0e10cSrcweir // comments properly, especially the XPATHSTROKE and XPATHFILL lead to
4147cdf0e10cSrcweir // problems, so it is better to remove these comments when mirroring
Scale(double fXScale,double fYScale)4148cdf0e10cSrcweir void MetaCommentAction::Scale( double fXScale, double fYScale )
4149cdf0e10cSrcweir {
4150cdf0e10cSrcweir if ( ( fXScale != 1.0 ) || ( fYScale != 1.0 ) )
4151cdf0e10cSrcweir {
4152cdf0e10cSrcweir if ( mnDataSize && mpData )
4153cdf0e10cSrcweir {
4154cdf0e10cSrcweir sal_Bool bPathStroke = maComment.Equals( "XPATHSTROKE_SEQ_BEGIN" );
4155cdf0e10cSrcweir if ( bPathStroke || maComment.Equals( "XPATHFILL_SEQ_BEGIN" ) )
4156cdf0e10cSrcweir {
4157cdf0e10cSrcweir SvMemoryStream aMemStm( (void*)mpData, mnDataSize, STREAM_READ );
4158cdf0e10cSrcweir SvMemoryStream aDest;
4159cdf0e10cSrcweir if ( bPathStroke )
4160cdf0e10cSrcweir {
4161cdf0e10cSrcweir SvtGraphicStroke aStroke;
4162cdf0e10cSrcweir aMemStm >> aStroke;
4163cdf0e10cSrcweir Polygon aPath;
4164cdf0e10cSrcweir aStroke.getPath( aPath );
4165cdf0e10cSrcweir aPath.Scale( fXScale, fYScale );
4166cdf0e10cSrcweir aStroke.setPath( aPath );
4167cdf0e10cSrcweir aDest << aStroke;
4168cdf0e10cSrcweir }
4169cdf0e10cSrcweir else
4170cdf0e10cSrcweir {
4171cdf0e10cSrcweir SvtGraphicFill aFill;
4172cdf0e10cSrcweir aMemStm >> aFill;
4173cdf0e10cSrcweir PolyPolygon aPath;
4174cdf0e10cSrcweir aFill.getPath( aPath );
4175cdf0e10cSrcweir aPath.Scale( fXScale, fYScale );
4176cdf0e10cSrcweir aFill.setPath( aPath );
4177cdf0e10cSrcweir aDest << aFill;
4178cdf0e10cSrcweir }
4179cdf0e10cSrcweir delete[] mpData;
4180cdf0e10cSrcweir ImplInitDynamicData( static_cast<const sal_uInt8*>( aDest.GetData() ), aDest.Tell() );
4181cdf0e10cSrcweir }
4182cdf0e10cSrcweir }
4183cdf0e10cSrcweir }
4184cdf0e10cSrcweir }
4185cdf0e10cSrcweir
4186cdf0e10cSrcweir // ------------------------------------------------------------------------
4187cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const4188cdf0e10cSrcweir sal_Bool MetaCommentAction::Compare( const MetaAction& rMetaAction ) const
4189cdf0e10cSrcweir {
4190cdf0e10cSrcweir return ( maComment == ((MetaCommentAction&)rMetaAction).maComment ) &&
4191cdf0e10cSrcweir ( mnValue == ((MetaCommentAction&)rMetaAction).mnValue ) &&
4192cdf0e10cSrcweir ( mnDataSize == ((MetaCommentAction&)rMetaAction).mnDataSize ) &&
4193cdf0e10cSrcweir ( memcmp( mpData, ((MetaCommentAction&)rMetaAction).mpData, mnDataSize ) == 0 );
4194cdf0e10cSrcweir }
4195cdf0e10cSrcweir
4196cdf0e10cSrcweir // ------------------------------------------------------------------------
4197cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)4198cdf0e10cSrcweir void MetaCommentAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
4199cdf0e10cSrcweir {
4200cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
4201cdf0e10cSrcweir rOStm << maComment << mnValue << mnDataSize;
4202cdf0e10cSrcweir
4203cdf0e10cSrcweir if ( mnDataSize )
4204cdf0e10cSrcweir rOStm.Write( mpData, mnDataSize );
4205cdf0e10cSrcweir }
4206cdf0e10cSrcweir
4207cdf0e10cSrcweir // ------------------------------------------------------------------------
4208cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)4209cdf0e10cSrcweir void MetaCommentAction::Read( SvStream& rIStm, ImplMetaReadData* )
4210cdf0e10cSrcweir {
4211cdf0e10cSrcweir COMPAT( rIStm );
4212cdf0e10cSrcweir rIStm >> maComment >> mnValue >> mnDataSize;
4213cdf0e10cSrcweir
4214cdf0e10cSrcweir if( mpData )
4215cdf0e10cSrcweir delete[] mpData;
4216cdf0e10cSrcweir
4217cdf0e10cSrcweir if( mnDataSize )
4218cdf0e10cSrcweir {
4219cdf0e10cSrcweir mpData = new sal_uInt8[ mnDataSize ];
4220cdf0e10cSrcweir rIStm.Read( mpData, mnDataSize );
4221cdf0e10cSrcweir }
4222cdf0e10cSrcweir else
4223cdf0e10cSrcweir mpData = NULL;
4224cdf0e10cSrcweir }
4225cdf0e10cSrcweir
4226cdf0e10cSrcweir // ========================================================================
4227cdf0e10cSrcweir
IMPL_META_ACTION(LayoutMode,META_LAYOUTMODE_ACTION)4228cdf0e10cSrcweir IMPL_META_ACTION( LayoutMode, META_LAYOUTMODE_ACTION )
4229cdf0e10cSrcweir
4230cdf0e10cSrcweir // ------------------------------------------------------------------------
4231cdf0e10cSrcweir
4232cdf0e10cSrcweir MetaLayoutModeAction::MetaLayoutModeAction( sal_uInt32 nLayoutMode ) :
4233cdf0e10cSrcweir MetaAction ( META_LAYOUTMODE_ACTION ),
4234cdf0e10cSrcweir mnLayoutMode( nLayoutMode )
4235cdf0e10cSrcweir {
4236cdf0e10cSrcweir }
4237cdf0e10cSrcweir
4238cdf0e10cSrcweir // ------------------------------------------------------------------------
4239cdf0e10cSrcweir
Execute(OutputDevice * pOut)4240cdf0e10cSrcweir void MetaLayoutModeAction::Execute( OutputDevice* pOut )
4241cdf0e10cSrcweir {
4242cdf0e10cSrcweir pOut->SetLayoutMode( mnLayoutMode );
4243cdf0e10cSrcweir }
4244cdf0e10cSrcweir
4245cdf0e10cSrcweir // ------------------------------------------------------------------------
4246cdf0e10cSrcweir
Clone()4247cdf0e10cSrcweir MetaAction* MetaLayoutModeAction::Clone()
4248cdf0e10cSrcweir {
4249cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaLayoutModeAction( *this );
4250cdf0e10cSrcweir pClone->ResetRefCount();
4251cdf0e10cSrcweir return pClone;
4252cdf0e10cSrcweir }
4253cdf0e10cSrcweir
4254cdf0e10cSrcweir // ------------------------------------------------------------------------
4255cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const4256cdf0e10cSrcweir sal_Bool MetaLayoutModeAction::Compare( const MetaAction& rMetaAction ) const
4257cdf0e10cSrcweir {
4258cdf0e10cSrcweir return mnLayoutMode == ((MetaLayoutModeAction&)rMetaAction).mnLayoutMode;
4259cdf0e10cSrcweir }
4260cdf0e10cSrcweir
4261cdf0e10cSrcweir // ------------------------------------------------------------------------
4262cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)4263cdf0e10cSrcweir void MetaLayoutModeAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
4264cdf0e10cSrcweir {
4265cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
4266cdf0e10cSrcweir rOStm << mnLayoutMode;
4267cdf0e10cSrcweir }
4268cdf0e10cSrcweir
4269cdf0e10cSrcweir // ------------------------------------------------------------------------
4270cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)4271cdf0e10cSrcweir void MetaLayoutModeAction::Read( SvStream& rIStm, ImplMetaReadData* )
4272cdf0e10cSrcweir {
4273cdf0e10cSrcweir COMPAT( rIStm );
4274cdf0e10cSrcweir rIStm >> mnLayoutMode;
4275cdf0e10cSrcweir }
4276cdf0e10cSrcweir
4277cdf0e10cSrcweir // ========================================================================
4278cdf0e10cSrcweir
IMPL_META_ACTION(TextLanguage,META_TEXTLANGUAGE_ACTION)4279cdf0e10cSrcweir IMPL_META_ACTION( TextLanguage, META_TEXTLANGUAGE_ACTION )
4280cdf0e10cSrcweir
4281cdf0e10cSrcweir // ------------------------------------------------------------------------
4282cdf0e10cSrcweir
4283cdf0e10cSrcweir MetaTextLanguageAction::MetaTextLanguageAction( LanguageType eTextLanguage ) :
4284cdf0e10cSrcweir MetaAction ( META_TEXTLANGUAGE_ACTION ),
4285cdf0e10cSrcweir meTextLanguage( eTextLanguage )
4286cdf0e10cSrcweir {
4287cdf0e10cSrcweir }
4288cdf0e10cSrcweir
4289cdf0e10cSrcweir // ------------------------------------------------------------------------
4290cdf0e10cSrcweir
Execute(OutputDevice * pOut)4291cdf0e10cSrcweir void MetaTextLanguageAction::Execute( OutputDevice* pOut )
4292cdf0e10cSrcweir {
4293cdf0e10cSrcweir pOut->SetDigitLanguage( meTextLanguage );
4294cdf0e10cSrcweir }
4295cdf0e10cSrcweir
4296cdf0e10cSrcweir // ------------------------------------------------------------------------
4297cdf0e10cSrcweir
Clone()4298cdf0e10cSrcweir MetaAction* MetaTextLanguageAction::Clone()
4299cdf0e10cSrcweir {
4300cdf0e10cSrcweir MetaAction* pClone = (MetaAction*) new MetaTextLanguageAction( *this );
4301cdf0e10cSrcweir pClone->ResetRefCount();
4302cdf0e10cSrcweir return pClone;
4303cdf0e10cSrcweir }
4304cdf0e10cSrcweir
4305cdf0e10cSrcweir // ------------------------------------------------------------------------
4306cdf0e10cSrcweir
Compare(const MetaAction & rMetaAction) const4307cdf0e10cSrcweir sal_Bool MetaTextLanguageAction::Compare( const MetaAction& rMetaAction ) const
4308cdf0e10cSrcweir {
4309cdf0e10cSrcweir return meTextLanguage == ((MetaTextLanguageAction&)rMetaAction).meTextLanguage;
4310cdf0e10cSrcweir }
4311cdf0e10cSrcweir
4312cdf0e10cSrcweir // ------------------------------------------------------------------------
4313cdf0e10cSrcweir
Write(SvStream & rOStm,ImplMetaWriteData * pData)4314cdf0e10cSrcweir void MetaTextLanguageAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
4315cdf0e10cSrcweir {
4316cdf0e10cSrcweir WRITE_BASE_COMPAT( rOStm, 1, pData );
4317cdf0e10cSrcweir rOStm << meTextLanguage;
4318cdf0e10cSrcweir }
4319cdf0e10cSrcweir
4320cdf0e10cSrcweir // ------------------------------------------------------------------------
4321cdf0e10cSrcweir
Read(SvStream & rIStm,ImplMetaReadData *)4322cdf0e10cSrcweir void MetaTextLanguageAction::Read( SvStream& rIStm, ImplMetaReadData* )
4323cdf0e10cSrcweir {
4324cdf0e10cSrcweir COMPAT( rIStm );
4325cdf0e10cSrcweir rIStm >> meTextLanguage;
4326cdf0e10cSrcweir }
4327cdf0e10cSrcweir
4328ddde725dSArmin Le Grand // eof
4329