LibreOffice Module filter (master) 1
escherex.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#ifndef INCLUDED_FILTER_MSFILTER_ESCHEREX_HXX
21#define INCLUDED_FILTER_MSFILTER_ESCHEREX_HXX
22
23#include <memory>
24#include <utility>
25#include <vector>
26
27#include <com/sun/star/awt/Point.hpp>
28#include <com/sun/star/beans/PropertyState.hpp>
29#include <com/sun/star/drawing/BitmapMode.hpp>
30#include <com/sun/star/awt/XBitmap.hpp>
31#include <com/sun/star/uno/Any.hxx>
32#include <com/sun/star/uno/Reference.hxx>
34#include <rtl/string.hxx>
35#include <rtl/ustring.hxx>
36#include <sal/types.h>
37#include <vcl/GraphicObject.hxx>
38#include <svx/svdtypes.hxx>
39#include <svx/msdffdef.hxx>
40#include <tools/gen.hxx>
41#include <tools/stream.hxx>
42#include <vcl/mapmod.hxx>
44
45class Color;
46
47namespace com::sun::star {
48 namespace awt { struct Rectangle; }
49 namespace beans { class XPropertySet; }
50 namespace drawing { struct EnhancedCustomShapeParameter; }
51 namespace drawing { struct Hatch; }
52}
53
54namespace tools {
55 class Polygon;
56 class PolyPolygon;
57}
58
59 /*Record Name FBT-Value Instance Contents Wrd Exl PPT Ver*/
60// In the Microsoft documentation the naming scheme is msofbt... instead of ESCHER_...
61#define ESCHER_DggContainer 0xF000u /* per-document data X X X */
62#define ESCHER_Dgg 0xF006u /* an FDGG and several FIDCLs X X X 0 */
63#define ESCHER_OPT 0xF00Bu /* count of properties the document-wide default shape properties X X X 3 */
64#define ESCHER_SplitMenuColors 0xF11Eu /* count of colors the colors in the top-level split menus X X X 0 */
65#define ESCHER_BstoreContainer 0xF001u /* count of BLIPs all images in the document (JPEGs, metafiles, etc.) X X X */
66#define ESCHER_BSE 0xF007u /* BLIP type an FBSE (one per BLIP) X X X 2 */
67#define ESCHER_BlipFirst 0xF018u /* range of fbts reserved for various kinds of BLIPs X X X */
68
69#define ESCHER_DgContainer 0xF002u /* per-sheet/page/slide data X X X */
70#define ESCHER_Dg 0xF008u /* drawing ID an FDG X X X 0 */
71#define ESCHER_SpgrContainer 0xF003u /* several SpContainers, the first of which is the group shape itself X X X */
72#define ESCHER_SpContainer 0xF004u /* a shape X X X */
73#define ESCHER_Spgr 0xF009u /* an FSPGR; only present if the shape is a group shape X X X 1 */
74#define ESCHER_Sp 0xF00Au /* shape type an FSP X X X 2 */
75//#define ESCHER_OPT 0xF00Bu /* count of properties a shape property table X X X 3 */
76#define ESCHER_ClientTextbox 0xF00Du /* host-defined the text in the textbox, in host-defined format X X X */
77#define ESCHER_ChildAnchor 0xF00Fu /* a RECT, in units relative to the parent group X X X 0 */
78#define ESCHER_ClientAnchor 0xF010u /* host-defined the location of the shape, in a host-defined format X X X */
79#define ESCHER_ClientData 0xF011u /* host-defined host-specific data X X X */
80#define ESCHER_SolverContainer 0xF005u /* count of rules the rules governing shapes X X X */
81#define ESCHER_ConnectorRule 0xF012u /* an FConnectorRule X X 1 */
82#define ESCHER_UDefProp 0xF122u
83
84enum class ShapeFlag : sal_uInt32
85{
86 NONE = 0x000,
87 Group = 0x001, /* shape is a group shape */
88 Child = 0x002, /* shape is a child shape */
89 Patriarch = 0x004, /* shape is the topmost group shape.
90 Exactly one of these per drawing. */
91 Deleted = 0x008, /* shape has been deleted */
92 OLEShape = 0x010, /* shape is an OLE object */
93 HaveMaster = 0x020, /* shape has a valid master in hspMaster property */
94 FlipH = 0x040, /* shape is flipped horizontally */
95 FlipV = 0x080, /* shape is flipped vertically */
96 Connector = 0x100, /* shape is a connector shape */
97 HaveAnchor = 0x200, /* shape has an anchor of some kind */
98 Background = 0x400, /* shape is a background shape */
99 HaveShapeProperty = 0x800 /* shape has a shape type property */
100}; /* 20 bits unused */
101namespace o3tl {
102 template<> struct typed_flags<ShapeFlag> : is_typed_flags<ShapeFlag, 0x00000FFF> {};
103}
104
105#define ESCHER_ShpInst_Min 0
106#define ESCHER_ShpInst_NotPrimitive ESCHER_ShpInst_Min
107#define ESCHER_ShpInst_Rectangle 1
108#define ESCHER_ShpInst_RoundRectangle 2
109#define ESCHER_ShpInst_Ellipse 3
110#define ESCHER_ShpInst_Arc 19
111#define ESCHER_ShpInst_Line 20
112#define ESCHER_ShpInst_StraightConnector1 32
113#define ESCHER_ShpInst_BentConnector2 33
114#define ESCHER_ShpInst_BentConnector3 34
115#define ESCHER_ShpInst_CurvedConnector3 38
116#define ESCHER_ShpInst_PictureFrame 75
117#define ESCHER_ShpInst_TextPlainText 136
118#define ESCHER_ShpInst_TextDeflateInflateDeflate 167
119#define ESCHER_ShpInst_TextSlantUp 172
120#define ESCHER_ShpInst_HostControl 201
121#define ESCHER_ShpInst_TextBox 202
122#define ESCHER_ShpInst_COUNT 203
123#define ESCHER_ShpInst_Max 0x0FFF
124#define ESCHER_ShpInst_Nil ESCHER_ShpInst_Max
125
127{ // GEL provided types...
128 ERROR = 0, // An error occurred during loading
129 UNKNOWN, // An unknown blip type
130 EMF, // Windows Enhanced Metafile
131 WMF, // Windows Metafile
132 PICT, // Macintosh PICT
133 PEG, // JFIF
134 PNG, // PNG
135 DIB, // Windows DIB
136 FirstClient = 32, // First client defined blip type
137 LastClient = 255 // Last client defined blip type
139
140
142{
143 ESCHER_FillSolid, // Fill with a solid color
144 ESCHER_FillPattern, // Fill with a pattern (bitmap)
145 ESCHER_FillTexture, // A texture (pattern with its own color map)
146 ESCHER_FillPicture, // Center a picture in the shape
147 ESCHER_FillShade, // Shade from start to end points
148 ESCHER_FillShadeCenter, // Shade from bounding rectangle to end point
149 ESCHER_FillShadeShape, // Shade from shape outline to end point
154
156{
157 ESCHER_wColor, // only used for predefined shades
158 ESCHER_wAutomatic, // depends on object type
159 ESCHER_wGrayScale, // shades of gray only
160 ESCHER_wLightGrayScale, // shades of light gray only
161 ESCHER_wInverseGray, // dark gray mapped to light gray, etc.
162 ESCHER_wGrayOutline, // pure gray and white
163 ESCHER_wBlackTextLine, // black text and lines, all else grayscale
164 ESCHER_wHighContrast, // pure black and white mode (no grays)
165 ESCHER_wBlack, // solid black msobwWhite, // solid white
166 ESCHER_wDontShow, // object not drawn
167 ESCHER_wNumModes // number of Black and white modes
169
170
172{
173 ESCHER_ShapeLines, // A line of straight segments
174 ESCHER_ShapeLinesClosed, // A closed polygonal object
175 ESCHER_ShapeCurves, // A line of Bezier curve segments
176 ESCHER_ShapeCurvesClosed, // A closed shape with curved edges
177 ESCHER_ShapeComplex // pSegmentInfo must be non-empty
179
180
182{
189
190
192{
193 ESCHER_bwColor, // only used for predefined shades
194 ESCHER_bwAutomatic, // depends on object type
195 ESCHER_bwGrayScale, // shades of gray only
196 ESCHER_bwLightGrayScale, // shades of light gray only
197 ESCHER_bwInverseGray, // dark gray mapped to light gray, etc.
198 ESCHER_bwGrayOutline, // pure gray and white
199 ESCHER_bwBlackTextLine, // black text and lines, all else grayscale
200 ESCHER_bwHighContrast, // pure black and white mode (no grays)
201 ESCHER_bwBlack, // solid black
202 ESCHER_bwWhite, // solid white
203 ESCHER_bwDontShow, // object not drawn
204 ESCHER_bwNumModes // number of Black and white modes
206
207
209{
221
222// connector style
224{
230
231// text flow
233{
234 ESCHER_txflHorzN, // Horizontal non-@
235 ESCHER_txflTtoBA, // Top to Bottom @-font
236 ESCHER_txflBtoT, // Bottom to Top non-@
237 ESCHER_txflTtoBN, // Top to Bottom non-@
238 ESCHER_txflHorzA, // Horizontal @-font
239 ESCHER_txflVertN // Vertical, non-@
241
242
243// flags for pictures
245{
247 ESCHER_BlipFlagComment = 0, // Blip name is a comment
248 ESCHER_BlipFlagFile, // Blip name is a file name
249 ESCHER_BlipFlagURL, // Blip name is a full URL
250 ESCHER_BlipFlagType = 3, // Mask to extract type
251 /* Or the following flags with any of the above. */
255
256// dashed line style
258{
259 ESCHER_LineSolid, // Solid (continuous) pen
260 ESCHER_LineDashSys, // PS_DASH system dash style
261 ESCHER_LineDotSys, // PS_DOT system dash style
262 ESCHER_LineDashDotSys, // PS_DASHDOT system dash style
263 ESCHER_LineDashDotDotSys, // PS_DASHDOTDOT system dash style
264 ESCHER_LineDotGEL, // square dot style
265 ESCHER_LineDashGEL, // dash style
266 ESCHER_LineLongDashGEL, // long dash style
267 ESCHER_LineDashDotGEL, // dash short dash
268 ESCHER_LineLongDashDotGEL, // long dash short dash
269 ESCHER_LineLongDashDotDotGEL // long dash short dash short dash
271
272// line end effect
274{
282
283// size of arrowhead
285{
290
291// size of arrowhead
293{
298
299// line join style.
301{
302 ESCHER_LineJoinBevel, // Join edges by a straight line
303 ESCHER_LineJoinMiter, // Extend edges until they join
304 ESCHER_LineJoinRound // Draw an arc between the two edges
306
307// line cap style (applies to ends of dash segments too).
309{
310 ESCHER_LineEndCapRound, // Rounded ends - the default
311 ESCHER_LineEndCapSquare, // Square protrudes by half line width
312 ESCHER_LineEndCapFlat // Line ends at end point
314
316{
317 msopathLineTo, // Draw a straight line (one point)
318 msopathCurveTo, // Draw a cubic Bezier curve (three points)
319 msopathMoveTo, // Move to a new point (one point)
320 msopathClose, // Close a sub - path (no points)
321 msopathEnd, // End a path (no points)
322 msopathEscape, // Escape code
323 msopathClientEscape, // Escape code interpreted by the client
324 msopathInvalid // Invalid - should never be found
326
327// Shape Properties
328// 1pt = 12700 EMU (English Metric Units)
329// 1pt = 20 Twip = 20/1440" = 1/72"
330// 1twip=635 EMU
331// 1" = 12700*72 = 914400 EMU
332// 1" = 25.4mm
333// 1mm = 36000 EMU
334// Transform
335#define ESCHER_Prop_Rotation 4 /* Fixed Point 16.16 degrees */
336// Protection
337#define ESCHER_Prop_LockAgainstGrouping 127 /* bool Do not group this shape */
338// Text
339#define ESCHER_Prop_lTxid 128 /* LONG id for the text, value determined by the host */
340#define ESCHER_Prop_dxTextLeft 129 /* LONG margins relative to shape's inscribed */
341#define ESCHER_Prop_dyTextTop 130 /* LONG text rectangle (in EMUs) */
342#define ESCHER_Prop_dxTextRight 131 /* LONG */
343#define ESCHER_Prop_dyTextBottom 132 /* LONG */
344#define ESCHER_Prop_WrapText 133 /* MSOWRAPMODE Wrap text at shape margins */
345#define ESCHER_Prop_AnchorText 135 /* ESCHER_AnchorText How to anchor the text */
346#define ESCHER_Prop_txflTextFlow 136 /* MSOTXFL Text flow */
347#define ESCHER_Prop_hspNext 138 /* MSOHSP ID of the next shape (used by Word for linked textboxes) */
348#define ESCHER_Prop_FitTextToShape 191 /* bool Size text to fit shape size */
349// GeoText
350#define ESCHER_Prop_gtextUNICODE 192 /* WCHAR* UNICODE text string */
351#define ESCHER_Prop_gtextSize 195 /* LONG default point size */
352#define ESCHER_Prop_gtextFont 197 /* WCHAR* font family name */
353// Blip
354#define ESCHER_Prop_cropFromTop 256 /* LONG 16.16 fraction times total */
355#define ESCHER_Prop_cropFromBottom 257 /* LONG image width or height, */
356#define ESCHER_Prop_cropFromLeft 258 /* LONG as appropriate. */
357#define ESCHER_Prop_cropFromRight 259 /* LONG */
358#define ESCHER_Prop_pib 260 /* IMsoBlip* Blip to display */
359#define ESCHER_Prop_pibName 261 /* WCHAR* Blip file name */
360#define ESCHER_Prop_pibFlags 262 /* MSOBLIPFLAGS Blip flags */
361#define ESCHER_Prop_pictureContrast 264 /* LONG contrast setting */
362#define ESCHER_Prop_pictureBrightness 265 /* LONG brightness setting */
363#define ESCHER_Prop_pictureId 267 /* LONG Host-defined ID for OLE objects (usually a pointer) */
364#define ESCHER_Prop_pictureActive 319 /* bool Server is active (OLE objects only) */
365// Geometry
366#define ESCHER_Prop_geoLeft 320 /* LONG Defines the G (geometry) coordinate space. */
367#define ESCHER_Prop_geoTop 321 /* LONG */
368#define ESCHER_Prop_geoRight 322 /* LONG */
369#define ESCHER_Prop_geoBottom 323 /* LONG */
370#define ESCHER_Prop_shapePath 324 /* MSOSHAPEPATH */
371#define ESCHER_Prop_pVertices 325 /* IMsoArray An array of points, in G units. */
372#define ESCHER_Prop_pSegmentInfo 326 /* IMsoArray */
373#define ESCHER_Prop_adjustValue 327 /* LONG Adjustment values corresponding to */
374#define ESCHER_Prop_adjust2Value 328 /* LONG the positions of the adjust handles */
375#define ESCHER_Prop_fFillOK 383 /* bool OK to fill the shape through the UI or VBA? */
376// FillStyle
377#define ESCHER_Prop_fillType 384 /* ESCHER_FillStyle Type of fill */
378#define ESCHER_Prop_fillColor 385 /* MSOCLR Foreground color */
379#define ESCHER_Prop_fillOpacity 386 /* LONG Fixed 16.16 */
380#define ESCHER_Prop_fillBackColor 387 /* MSOCLR Background color */
381#define ESCHER_Prop_fillBackOpacity 388 /* LONG Shades only */
382#define ESCHER_Prop_fillBlip 390 /* IMsoBlip* Pattern/texture */
383#define ESCHER_Prop_fillAngle 395 /* LONG Fade angle - degrees in 16.16 */
384#define ESCHER_Prop_fillFocus 396 /* LONG Linear shaded fill focus percent */
385#define ESCHER_Prop_fillToLeft 397 /* LONG Fraction 16.16 */
386#define ESCHER_Prop_fillToTop 398 /* LONG Fraction 16.16 */
387#define ESCHER_Prop_fillToRight 399 /* LONG Fraction 16.16 */
388#define ESCHER_Prop_fillToBottom 400 /* LONG Fraction 16.16 */
389#define ESCHER_Prop_fillRectRight 403 /* LONG define how large the fade is going to be. */
390#define ESCHER_Prop_fillRectBottom 404 /* LONG */
391#define ESCHER_Prop_fNoFillHitTest 447 /* bool Hit test a shape as though filled */
392// LineStyle
393#define ESCHER_Prop_lineColor 448 /* MSOCLR Color of line */
394#define ESCHER_Prop_lineOpacity 449 /* LONG Not implemented */
395#define ESCHER_Prop_lineBackColor 450 /* MSOCLR Background color */
396#define ESCHER_Prop_lineWidth 459 /* LONG A units; 1pt == 12700 EMUs */
397#define ESCHER_Prop_lineStyle 461 /* MSOLINESTYLE Draw parallel lines? */
398#define ESCHER_Prop_lineDashing 462 /* MSOLINEDASHING Can be overridden by: */
399#define ESCHER_Prop_lineStartArrowhead 464 /* MSOLINEEND Arrow at start */
400#define ESCHER_Prop_lineEndArrowhead 465 /* MSOLINEEND Arrow at end */
401#define ESCHER_Prop_lineStartArrowWidth 466 /* MSOLINEENDWIDTH Arrow at start */
402#define ESCHER_Prop_lineStartArrowLength 467 /* MSOLINEENDLENGTH Arrow at end */
403#define ESCHER_Prop_lineEndArrowWidth 468 /* MSOLINEENDWIDTH Arrow at start */
404#define ESCHER_Prop_lineEndArrowLength 469 /* MSOLINEENDLENGTH Arrow at end */
405#define ESCHER_Prop_lineJoinStyle 470 /* MSOLINEJOIN How to join lines */
406#define ESCHER_Prop_lineEndCapStyle 471 /* MSOLINECAP How to end lines */
407#define ESCHER_Prop_fNoLineDrawDash 511 /* bool Draw a dashed line if no line */
408// ShadowStyle
409#define ESCHER_Prop_shadowColor 513 /* MSOCLR Foreground color */
410#define ESCHER_Prop_shadowOpacity 516 /* LONG Fixed 16.16 */
411#define ESCHER_Prop_shadowOffsetX 517 /* LONG Offset shadow */
412#define ESCHER_Prop_shadowOffsetY 518 /* LONG Offset shadow */
413#define ESCHER_Prop_fshadowObscured 575 /* bool Excel5-style shadow */
414// 3D Object
415#define ESCHER_Prop_fc3DLightFace 703 /* bool */
416// Shape
417#define ESCHER_Prop_hspMaster 769 /* MSOHSP master shape */
418#define ESCHER_Prop_cxstyle 771 /* MSOCXSTYLE Type of connector */
419#define ESCHER_Prop_bWMode 772 /* ESCHERwMode Settings for modifications to */
420#define ESCHER_Prop_fBackground 831 /* bool If sal_True, this is the background shape. */
421// GroupShape
422#define ESCHER_Prop_wzName 896 /* WCHAR* Shape Name (present only if explicitly set) */
423#define ESCHER_Prop_wzDescription 897 /* WCHAR* alternate text */
424#define ESCHER_Prop_pihlShape 898 /* IHlink* The hyperlink in the shape. */
425#define ESCHER_Prop_dxWrapDistLeft 900 /* LONG Left wrapping distance from text (Word) */
426#define ESCHER_Prop_dyWrapDistTop 901 /* LONG Top wrapping distance from text (Word) */
427#define ESCHER_Prop_dxWrapDistRight 902 /* LONG Right wrapping distance from text (Word) */
428#define ESCHER_Prop_dyWrapDistBottom 903 /* LONG Bottom wrapping distance from text (Word) */
429#define ESCHER_Prop_tableProperties 927
430#define ESCHER_Prop_tableRowProperties 928
431#define ESCHER_Prop_fHidden 958 /* bool Do not display */
432#define ESCHER_Prop_fPrint 959 /* bool Print this shape */
433
434
435#define ESCHER_Persist_PrivateEntry 0x80000000
436#define ESCHER_Persist_Dgg 0x00010000
437#define ESCHER_Persist_Dg 0x00020000
438#define ESCHER_Persist_CurrentPosition 0x00040000
439#define ESCHER_Persist_Grouping_Snap 0x00050000
440#define ESCHER_Persist_Grouping_Logic 0x00060000
441
442const sal_uInt32 DFF_DGG_CLUSTER_SIZE = 0x00000400;
443
444namespace com::sun::star {
445 namespace awt {
446 struct Gradient;
447 }
448 namespace drawing {
449 struct EnhancedCustomShapeAdjustmentValue;
450 class XShape;
451 class XShapes;
452 }
453}
454
456{
457 css::uno::Reference< css::drawing::XShape > mXConnector;
458 css::awt::Point maPointA;
459 css::uno::Reference< css::drawing::XShape > mXConnectToA;
460 css::awt::Point maPointB;
461 css::uno::Reference< css::drawing::XShape > mXConnectToB;
462
463 sal_uInt32 GetConnectorRule( bool bFirst );
464
465 EscherConnectorListEntry( css::uno::Reference< css::drawing::XShape > xC,
466 const css::awt::Point& rPA,
467 css::uno::Reference< css::drawing::XShape > xSA ,
468 const css::awt::Point& rPB,
469 css::uno::Reference< css::drawing::XShape > xSB ) :
470 mXConnector (std::move( xC )),
471 maPointA ( rPA ),
472 mXConnectToA(std::move( xSA )),
473 maPointB ( rPB ),
474 mXConnectToB(std::move( xSB )) {}
475
476 static sal_uInt32 GetClosestPoint( const tools::Polygon& rPoly, const css::awt::Point& rP );
477};
478
480{
481private:
482 sal_uInt32 nContPos;
484public:
485 EscherExContainer( SvStream& rSt, const sal_uInt16 nRecType, const sal_uInt16 nInstance = 0 );
487};
488
490{
491private:
492 sal_uInt32 nContPos;
494public:
495 EscherExAtom( SvStream& rSt, const sal_uInt16 nRecType, const sal_uInt16 nInstance = 0, const sal_uInt8 nVersion = 0 );
497};
498
500{
501 static bool GetPropertyValue(
502 css::uno::Any& rAny,
503 const css::uno::Reference< css::beans::XPropertySet > &,
504 const OUString& rPropertyName,
505 bool bTestPropertyAvailability = false
506 );
507
508 static css::beans::PropertyState GetPropertyState(
509 const css::uno::Reference < css::beans::XPropertySet > &,
510 const OUString& rPropertyName
511 );
512};
513
514
516{
517 sal_uInt32 mnID;
518 sal_uInt32 mnOffset;
519
520 EscherPersistEntry( sal_uInt32 nId, sal_uInt32 nOffset ) { mnID = nId; mnOffset = nOffset; };
521
522};
523
524
526{
528 friend class EscherEx;
529
532
533 sal_uInt32 mnIdentifier[ 4 ];
534 sal_uInt32 mnPictureOffset; // offset to the graphic in PictureStreams
535 sal_uInt32 mnSize; // size of real graphic
536
537 sal_uInt32 mnRefCount; // !! reference count
538 sal_uInt32 mnSizeExtra; // !! size of preceding header
539
541
544
545public:
546
548 sal_uInt32 nPictureOffset,
549 const GraphicObject& rObj,
550 const OString& rId,
551 const GraphicAttr* pAttr
552 );
553
555
556 void WriteBlibEntry( SvStream& rSt, bool bWritePictureOffset, sal_uInt32 nResize = 0 );
557 bool IsEmpty() const { return mbIsEmpty; };
558
559 bool operator==( const EscherBlibEntry& ) const;
560};
561
562
564 NONE = 0,
565 UseInstances = 1,
566};
567namespace o3tl {
568 template<> struct typed_flags<EscherGraphicProviderFlags> : is_typed_flags<EscherGraphicProviderFlags, 0x01> {};
569}
570
572{
575 std::vector<std::unique_ptr<EscherBlibEntry>>
577 OUString maBaseURI;
578
579protected:
580
581 sal_uInt32 ImplInsertBlib( EscherBlibEntry* p_EscherBlibEntry );
582
583public:
584
585 sal_uInt32 GetBlibStoreContainerSize( SvStream const * pMergePicStreamBSE = nullptr ) const;
586 void WriteBlibStoreContainer( SvStream& rStrm, SvStream* pMergePicStreamBSE = nullptr );
587 void WriteBlibStoreEntry(SvStream& rStrm, sal_uInt32 nBlipId, sal_uInt32 nResize);
588 sal_uInt32 GetBlibID(
589 SvStream& rPicOutStream,
590 GraphicObject const & pGraphicObject,
591 const css::awt::Rectangle* pVisArea = nullptr,
592 const GraphicAttr* pGrafikAttr = nullptr,
593 const bool ooxmlExport = false
594 );
595 bool HasGraphics() const { return !mvBlibEntrys.empty(); };
596
597 void SetNewBlipStreamOffset( sal_Int32 nOffset );
598
599 bool GetPrefSize( const sal_uInt32 nBlibId, Size& rSize, MapMode& rMapMode );
600
601 void SetBaseURI( const OUString& rBaseURI ) { maBaseURI = rBaseURI; };
602 const OUString& GetBaseURI() const { return maBaseURI; };
603
605 virtual ~EscherGraphicProvider();
606
607 EscherGraphicProvider& operator=( EscherGraphicProvider const & ) = delete; // MSVC2015 workaround
608 EscherGraphicProvider( EscherGraphicProvider const & ) = delete; // MSVC2015 workaround
609};
610
612
614{
615 ::std::vector< std::unique_ptr<EscherShapeListEntry> > maShapeList;
616 ::std::vector< std::unique_ptr<EscherConnectorListEntry> > maConnectorList;
617
618public:
619
620 sal_uInt32 GetShapeId(
621 const css::uno::Reference< css::drawing::XShape > & rShape
622 ) const;
623
624 void AddShape(
625 const css::uno::Reference< css::drawing::XShape > &,
626 sal_uInt32 nId
627 );
628
629 void AddConnector(
630 const css::uno::Reference< css::drawing::XShape > &,
631 const css::awt::Point& rA,
632 css::uno::Reference< css::drawing::XShape > const &,
633 const css::awt::Point& rB,
634 css::uno::Reference< css::drawing::XShape > const & rConB
635 );
636
637 void WriteSolver( SvStream& );
638
641
642 EscherSolverContainer& operator=( EscherSolverContainer const & ) = delete; // MSVC2015 workaround
643 EscherSolverContainer( EscherSolverContainer const & ) = delete; // MSVC2015 workaround
644};
645
646
647#define ESCHER_CREATEPOLYGON_LINE 1
648#define ESCHER_CREATEPOLYGON_POLYLINE 2
649#define ESCHER_CREATEPOLYGON_POLYPOLYGON 4
650
652
654{
655 std::vector<sal_uInt8> nProp;
656 sal_uInt32 nPropValue;
657 sal_uInt16 nPropId;
658};
659
660typedef std::vector< EscherPropSortStruct > EscherProperties;
661
663{
667
668 sal_uInt32 nCountCount;
669 sal_uInt32 nCountSize;
670
671 std::vector<EscherPropSortStruct>
673
675
676
677 static sal_uInt32 ImplGetColor( const sal_uInt32 rColor, bool bSwap = true );
678 void ImplCreateGraphicAttributes(
679 const css::uno::Reference< css::beans::XPropertySet > & rXPropSet,
680 sal_uInt32 nBlibId,
681 bool bCreateCroppingAttributes
682 );
683 bool ImplCreateEmbeddedBmp(GraphicObject const & rGraphicObject);
684
685 SAL_DLLPRIVATE explicit EscherPropertyContainer(
686 EscherGraphicProvider * pGraphProv, SvStream * pPiOutStrm,
687 tools::Rectangle * pBoundRect);
688
689public:
690
693 EscherGraphicProvider& rGraphicProvider, // the PropertyContainer needs to know
694 SvStream* pPicOutStrm, // the GraphicProvider to be able to write
695 tools::Rectangle& rShapeBoundRect // FillBitmaps or GraphicObjects.
696 ); // under some circumstances the ShapeBoundRect
697 // is adjusted this will happen when rotated
698 // GraphicObjects are saved to PowerPoint
700
701 void AddOpt(
702 sal_uInt16 nPropID,
703 bool bBlib,
704 sal_uInt32 nSizeReduction,
705 SvMemoryStream& rStream);
706
707 void AddOpt(
708 sal_uInt16 nPropertyID,
709 std::u16string_view rString);
710
711 void AddOpt(
712 sal_uInt16 nPropertyID,
713 sal_uInt32 nPropValue,
714 bool bBlib = false);
715
716 void AddOpt(
717 sal_uInt16 nPropertyID,
718 bool bBlib,
719 sal_uInt32 nPropValue,
720 const std::vector<sal_uInt8>& rProp);
721
722 bool GetOpt( sal_uInt16 nPropertyID, sal_uInt32& rPropValue ) const;
723
724 bool GetOpt( sal_uInt16 nPropertyID, EscherPropSortStruct& rPropValue ) const;
725
726 const EscherProperties & GetOpts() const;
727
728 void Commit( SvStream& rSt, sal_uInt16 nVersion = 3, sal_uInt16 nRecType = ESCHER_OPT );
729
730 void CreateShapeProperties(
731 const css::uno::Reference< css::drawing::XShape > & rXShape
732 );
733 bool CreateOLEGraphicProperties(
734 const css::uno::Reference< css::drawing::XShape > & rXOleObject
735 );
737 const css::uno::Reference< css::drawing::XShape > & rXShape,
738 const GraphicObject& rGraphicObj
739 );
740 bool CreateMediaGraphicProperties(
741 const css::uno::Reference< css::drawing::XShape > & rXMediaObject
742 );
743
745 void CreateEmbeddedBitmapProperties(
746 css::uno::Reference<css::awt::XBitmap> const & rxBitmap,
747 css::drawing::BitmapMode eBitmapMode
748 );
750 void CreateEmbeddedHatchProperties(
751 const css::drawing::Hatch& rHatch,
752 const Color& rBackColor,
753 bool bFillBackground
754 );
755
756 // the GraphicProperties will only be created if a GraphicProvider and PicOutStrm is known
757 // DR: #99897# if no GraphicProvider is present, a complex ESCHER_Prop_fillBlip
758 // will be created, containing the BLIP directly (e.g. for Excel charts).
760 const css::uno::Reference< css::beans::XPropertySet > & rXPropSet,
761 const OUString& rSource,
762 const bool bCreateFillBitmap,
763 const bool bCreateCroppingAttributes = false,
764 const bool bFillBitmapModeAllowed = true,
765 const bool bOOxmlExport = false
766 );
767
768 bool CreateBlipPropertiesforOLEControl( const css::uno::Reference< css::beans::XPropertySet > & rXPropSet, const css::uno::Reference< css::drawing::XShape > & rXShape);
769
770 bool CreatePolygonProperties(
771 const css::uno::Reference< css::beans::XPropertySet > & rXPropSet,
772 sal_uInt32 nFlags,
773 bool bBezier,
774 css::awt::Rectangle& rGeoRect,
775 tools::Polygon const * pPolygon = nullptr
776 );
777
778 static sal_uInt32 GetGradientColor(
779 const css::awt::Gradient* pGradient,
780 sal_uInt32 nStartColor
781 );
782
783 void CreateGradientProperties( const css::awt::Gradient & rGradient );
785 const css::uno::Reference< css::beans::XPropertySet > &,
786 bool bTransparentGradient = false
787 );
788
789 void CreateLineProperties(
790 const css::uno::Reference< css::beans::XPropertySet > &,
791 bool bEdge
792 );
794 const css::uno::Reference< css::beans::XPropertySet > &,
795 bool bEdge,
796 bool bTransparentGradient = false );
798 const css::uno::Reference< css::beans::XPropertySet > &,
799 bool bEdge,
800 const css::uno::Reference< css::drawing::XShape > & rXShape );
801 void CreateTextProperties(
802 const css::uno::Reference< css::beans::XPropertySet > &,
803 sal_uInt32 nText,
804 const bool bIsCustomShape = false,
805 const bool bIsTextFrame = true
806 );
807
808 bool CreateConnectorProperties(
809 const css::uno::Reference< css::drawing::XShape > & rXShape,
810 EscherSolverContainer& rSolver,
811 css::awt::Rectangle& rGeoRect,
812 sal_uInt16& rShapeType,
813 ShapeFlag& rShapeFlags
814 );
815
816 // Because shadow properties depends to the line and fillstyle, the CreateShadowProperties method should be called at last.
817 // It's active only when at least a FillStyle or LineStyle is set.
818 void CreateShadowProperties(
819 const css::uno::Reference< css::beans::XPropertySet > &
820 );
821
822 sal_Int32 GetValueForEnhancedCustomShapeParameter( const css::drawing::EnhancedCustomShapeParameter& rParameter,
823 const std::vector< sal_Int32 >& rEquationOrder, bool bAdjustTrans = false );
824 // creates all necessary CustomShape properties, this includes also Text-, Shadow-, Fill-, and LineProperties
825 void CreateCustomShapeProperties(
826 const MSO_SPT eShapeType,
827 const css::uno::Reference< css::drawing::XShape > &
828 );
829 bool IsFontWork() const;
830
831 // helper functions which are also used by the escher import
833 const css::uno::Reference< css::drawing::XShape > & rXShape
834 );
835 static tools::PolyPolygon GetPolyPolygon( const css::uno::Any& rSource );
836 static MSO_SPT GetCustomShapeType(
837 const css::uno::Reference< css::drawing::XShape > & rXShape,
838 ShapeFlag& nMirrorFlags,
839 OUString& rShapeType,
840 bool bOOXML = false
841 );
842
843 // helper functions which are also used in ooxml export
844 static bool GetLineArrow(
845 const bool bLineStart,
846 const css::uno::Reference< css::beans::XPropertySet > & rXPropSet,
847 ESCHER_LineEnd& reLineEnd,
848 sal_Int32& rnArrowLength,
849 sal_Int32& rnArrowWidth
850 );
851
852 static bool IsDefaultObject(
853 const SdrObjCustomShape& rSdrObjCustomShape,
854 const MSO_SPT eShapeType);
855
856 static void LookForPolarHandles(
857 const MSO_SPT eShapeType,
858 sal_Int32& nAdjustmentsWhichNeedsToBeConverted
859 );
860 static bool GetAdjustmentValue( const css::drawing::EnhancedCustomShapeAdjustmentValue & rkProp, sal_Int32 nIndex, sal_Int32 nAdjustmentsWhichNeedsToBeConverted, sal_Int32& nValue );
861};
862
863
865{
866
867public:
868 ::std::vector< std::unique_ptr<EscherPersistEntry> > maPersistTable;
869
870 bool PtIsID( sal_uInt32 nID );
871 void PtInsert( sal_uInt32 nID, sal_uInt32 nOfs );
872 void PtDelete( sal_uInt32 nID );
873 sal_uInt32 PtGetOffsetByID( sal_uInt32 nID );
874 void PtReplace( sal_uInt32 nID, sal_uInt32 nOfs );
875 void PtReplaceOrInsert( sal_uInt32 nID, sal_uInt32 nOfs );
876
878 virtual ~EscherPersistTable();
879
880 EscherPersistTable& operator=( EscherPersistTable const & ) = delete; // MSVC2015 workaround
881 EscherPersistTable( EscherPersistTable const & ) = delete; // MSVC2015 workaround
882};
883
884
885class EscherEx;
886
889{
890public:
892
896 virtual void WriteData( EscherEx& rEx ) const = 0;
897};
898
899
902{
903public:
905
909 virtual void WriteData( EscherEx& rEx,
910 const tools::Rectangle& rRect ) = 0;
911};
912
914{
915 std::unique_ptr<SvMemoryStream> mpHyperlinkRecord;
916
917public:
919 {
920 mpHyperlinkRecord.reset( pStream );
921 }
922 const std::unique_ptr< SvMemoryStream >& getHyperlinkRecord() const { return mpHyperlinkRecord; }
923};
924
926{
927private:
932 // ignore single shape if entire pages are written
934
935public:
937 pClientTextbox(nullptr), pInteractionInfo(nullptr), bDontWriteShape(false)
938 {}
939
941 { pInteractionInfo = p; }
943 { pClientAnchor = p; }
945 { pClientData = p; }
947 { pClientTextbox = p; }
948 void SetDontWriteShape( bool b )
949 { bDontWriteShape = b; }
951 { return pInteractionInfo; }
953 { return pClientAnchor; }
955 { return pClientTextbox; }
956
957 void WriteClientAnchor( EscherEx& rEx, const tools::Rectangle& rRect )
958 { if( pClientAnchor ) pClientAnchor->WriteData( rEx, rRect ); }
960 { if( pClientData ) pClientData->WriteData( rEx ); }
962 { if( pClientTextbox ) pClientTextbox->WriteData( rEx ); }
963
964 bool DontWriteShape() const { return bDontWriteShape; }
965};
966
967
970{
971public:
972 explicit EscherExGlobal();
973 virtual ~EscherExGlobal() override;
974
976 sal_uInt32 GenerateDrawingId();
981 sal_uInt32 GenerateShapeId( sal_uInt32 nDrawingId, bool bIsInSpgr );
984 sal_uInt32 GetDrawingShapeCount( sal_uInt32 nDrawingId ) const;
987 sal_uInt32 GetLastShapeId( sal_uInt32 nDrawingId ) const;
988
990 void SetDggContainer() { mbHasDggCont = true; }
992 bool HasDggContainer() const { return mbHasDggCont; }
994 sal_uInt32 GetDggAtomSize() const;
996 void WriteDggAtom( SvStream& rStrm ) const;
997
1005 SvStream* QueryPictureStream();
1006
1008 SvStream* GetPictureStream() { return mpPicStrm; }
1009
1010private:
1019 virtual SvStream* ImplQueryPictureStream();
1020
1021private:
1023 {
1024 sal_uInt32 mnDrawingId;
1025 sal_uInt32 mnNextShapeId;
1026 explicit ClusterEntry( sal_uInt32 nDrawingId ) : mnDrawingId( nDrawingId ), mnNextShapeId( 0 ) {}
1027 };
1028
1030 {
1031 sal_uInt32 mnClusterId;
1032 sal_uInt32 mnShapeCount;
1033 sal_uInt32 mnLastShapeId;
1034 explicit DrawingInfo( sal_uInt32 nClusterId ) : mnClusterId( nClusterId ), mnShapeCount( 0 ), mnLastShapeId( 0 ) {}
1035 };
1036 typedef ::std::vector< DrawingInfo > DrawingInfoVector;
1037
1038 std::vector< ClusterEntry > maClusterTable;
1043};
1044
1045class SdrObject;
1046class SdrPage;
1047class ImplEESdrWriter;
1048
1050{
1051 protected:
1052 std::shared_ptr<EscherExGlobal> mxGlobal;
1053 std::unique_ptr<ImplEESdrWriter> mpImplEESdrWriter;
1054 std::unique_ptr<SvStream> mxOwnStrm;
1056 sal_uInt32 mnStrmStartOfs;
1057 std::vector< sal_uInt32 > mOffsets;
1058 std::vector< sal_uInt16 > mRecTypes;
1059
1060 sal_uInt32 mnCurrentDg;
1061 sal_uInt32 mnCountOfs;
1062
1063 sal_uInt32 mnGroupLevel;
1065
1069 OUString mEditAs;
1070
1071
1072 bool DoSeek( sal_uInt32 nKey );
1073
1074public:
1075 explicit EscherEx( std::shared_ptr<EscherExGlobal> xGlobal, SvStream* pOutStrm, bool bOOXML = false );
1076 virtual ~EscherEx() override;
1077
1080 virtual sal_uInt32 GenerateShapeId() { return mxGlobal->GenerateShapeId( mnCurrentDg, mbEscherSpgr ); }
1081
1086
1090 SvStream* QueryPictureStream() { return mxGlobal->QueryPictureStream(); }
1091
1097 void Flush( SvStream* pPicStreamMergeBSE = nullptr );
1098
1115 void InsertAtCurrentPos( sal_uInt32 nBytes );
1116
1117 void InsertPersistOffset( sal_uInt32 nKey, sal_uInt32 nOffset ); // It is not being checked if this key is already in the PersistantTable
1118 void ReplacePersistOffset( sal_uInt32 nKey, sal_uInt32 nOffset );
1119 sal_uInt32 GetPersistOffset( sal_uInt32 nKey );
1120 bool SeekToPersistOffset( sal_uInt32 nKey );
1121 void InsertAtPersistOffset( sal_uInt32 nKey, sal_uInt32 nValue ); // nValue is being inserted into the Stream where it's appropriate (overwrite mode), without that the
1122 // current StreamPosition changes
1123 void SetEditAs( const OUString& rEditAs );
1124 const OUString& GetEditAs() const { return mEditAs; }
1125 SvStream& GetStream() const { return *mpOutStrm; }
1126 sal_uInt64 GetStreamPos() const { return mpOutStrm->Tell(); }
1127
1128 // features during the creation of the following Containers:
1129
1130 // ESCHER_DggContainer: an EscherDgg Atom is automatically being created and managed
1131 // ESCHER_DgContainer: an EscherDg Atom is automatically being created and managed
1132 // ESCHER_SpgrContainer:
1133 // ESCHER_SpContainer:
1134
1135 virtual void OpenContainer( sal_uInt16 nEscherContainer, int nRecInstance = 0 );
1136 virtual void CloseContainer();
1137
1138 void BeginAtom();
1139 void EndAtom( sal_uInt16 nRecType, int nRecVersion = 0, int nRecInstance = 0 );
1140 void AddAtom( sal_uInt32 nAtomSitze, sal_uInt16 nRecType, int nRecVersion = 0, int nRecInstance = 0 );
1141 void AddChildAnchor( const tools::Rectangle& rRectangle );
1142 void AddClientAnchor( const tools::Rectangle& rRectangle );
1143
1144 virtual sal_uInt32 EnterGroup( const OUString& rShapeName, const tools::Rectangle* pBoundRect );
1145 sal_uInt32 EnterGroup( const tools::Rectangle* pBoundRect = nullptr );
1146 sal_uInt32 GetGroupLevel() const { return mnGroupLevel; };
1147 void SetGroupSnapRect( sal_uInt32 nGroupLevel, const tools::Rectangle& rRect );
1148 void SetGroupLogicRect( sal_uInt32 nGroupLevel, const tools::Rectangle& rRect );
1149 virtual void LeaveGroup();
1150
1151 // a ESCHER_Sp is being written ( a ESCHER_DgContainer has to be opened for this purpose!)
1152 virtual void AddShape( sal_uInt32 nShpInstance, ShapeFlag nFlagIds, sal_uInt32 nShapeID = 0 );
1153
1154 virtual void Commit( EscherPropertyContainer& rProps, const tools::Rectangle& rRect);
1155
1156 static sal_uInt32 GetColor( const sal_uInt32 nColor );
1157 static sal_uInt32 GetColor( const Color& rColor );
1158
1159 // ...Sdr... implemented in eschesdo.cxx
1160
1161 void AddSdrPage( const SdrPage& rPage, bool ooxmlExport = false );
1162 void AddUnoShapes( const css::uno::Reference< css::drawing::XShapes >& rxShapes, bool ooxmlExport = false );
1163
1165 sal_uInt32 AddSdrObject(const SdrObject& rObj, bool ooxmlExport = false, sal_uInt32 nId = 0);
1166 virtual void AddSdrObjectVMLObject( const SdrObject& /*rObj*/)
1167 {
1168 // Required for Exporting VML shape
1169 }
1170
1174 void EndSdrObjectPage();
1175
1179 virtual EscherExHostAppData* StartShape(
1180 const css::uno::Reference< css::drawing::XShape >& rShape,
1181 const tools::Rectangle* pChildAnchor );
1182
1185 virtual void EndShape( sal_uInt16 nShapeType, sal_uInt32 nShapeID );
1186
1203 virtual EscherExHostAppData* EnterAdditionalTextGroup();
1204
1206 virtual sal_uInt32 QueryTextID( const css::uno::Reference< css::drawing::XShape >&, sal_uInt32 nShapeId );
1207 // add a dummy rectangle shape into the escher stream
1208 sal_uInt32 AddDummyShape();
1209
1210 static const SdrObject* GetSdrObject( const css::uno::Reference< css::drawing::XShape >& rXShape );
1211
1212 void SetHellLayerId( SdrLayerID nId ) { mnHellLayerId = nId; }
1213 SdrLayerID GetHellLayerId() const { return mnHellLayerId; }
1214
1215private:
1216 EscherEx( const EscherEx& ) = delete;
1217 EscherEx& operator=( const EscherEx& ) = delete;
1218};
1219
1220
1221#endif
1222
1223/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
struct _ADOGroup Group
sal_uInt32 mnSize
Definition: escherex.hxx:535
sal_uInt32 mnRefCount
Definition: escherex.hxx:537
MapMode maPrefMapMode
Definition: escherex.hxx:530
EscherBlibEntry(sal_uInt32 nPictureOffset, const GraphicObject &rObj, const OString &rId, const GraphicAttr *pAttr)
Definition: escherex.cxx:3896
sal_uInt32 mnPictureOffset
Definition: escherex.hxx:534
bool mbIsNativeGraphicPossible
Definition: escherex.hxx:543
sal_uInt32 mnIdentifier[4]
Definition: escherex.hxx:533
void WriteBlibEntry(SvStream &rSt, bool bWritePictureOffset, sal_uInt32 nResize=0)
Definition: escherex.cxx:3964
bool operator==(const EscherBlibEntry &) const
Definition: escherex.cxx:3994
sal_uInt32 mnSizeExtra
Definition: escherex.hxx:538
bool IsEmpty() const
Definition: escherex.hxx:557
ESCHER_BlibType meBlibType
Definition: escherex.hxx:540
abstract base class for ESCHER_ClientAnchor
Definition: escherex.hxx:902
virtual void WriteData(EscherEx &rEx, const tools::Rectangle &rRect)=0
Application writes the record header using rEx.AddAtom(...) followed by record data written to rEx....
abstract base class for ESCHER_ClientTextbox, ESCHER_ClientData
Definition: escherex.hxx:889
virtual void WriteData(EscherEx &rEx) const =0
Application writes the record header using rEx.AddAtom(...) followed by record data written to rEx....
Instance for global DFF data, shared through various instances of EscherEx.
Definition: escherex.hxx:970
bool mbPicStrmQueried
True = the DGGCONTAINER has been initialized.
Definition: escherex.hxx:1042
::std::vector< DrawingInfo > DrawingInfoVector
Definition: escherex.hxx:1036
DrawingInfoVector maDrawingInfos
List with cluster IDs (used object IDs in drawings).
Definition: escherex.hxx:1039
SvStream * mpPicStrm
Data about all used drawings.
Definition: escherex.hxx:1040
void SetDggContainer()
Sets the flag indicating that the DGGCONTAINER exists.
Definition: escherex.hxx:990
SvStream * GetPictureStream()
Returns the picture stream if existing (queried), otherwise null.
Definition: escherex.hxx:1008
bool mbHasDggCont
Cached result of ImplQueryPictureStream().
Definition: escherex.hxx:1041
bool HasDggContainer() const
Sets the flag indicating that the DGGCONTAINER exists.
Definition: escherex.hxx:992
std::vector< ClusterEntry > maClusterTable
Definition: escherex.hxx:1038
EscherExClientAnchor_Base * pClientAnchor
Definition: escherex.hxx:928
void SetInteractionInfo(InteractionInfo *p)
Definition: escherex.hxx:940
EscherExClientRecord_Base * pClientData
Definition: escherex.hxx:929
EscherExClientAnchor_Base * GetClientAnchor() const
Definition: escherex.hxx:952
bool DontWriteShape() const
Definition: escherex.hxx:964
void SetDontWriteShape(bool b)
Definition: escherex.hxx:948
EscherExClientRecord_Base * pClientTextbox
Definition: escherex.hxx:930
void SetClientAnchor(EscherExClientAnchor_Base *p)
Definition: escherex.hxx:942
void WriteClientAnchor(EscherEx &rEx, const tools::Rectangle &rRect)
Definition: escherex.hxx:957
void WriteClientTextbox(EscherEx &rEx)
Definition: escherex.hxx:961
InteractionInfo * pInteractionInfo
Definition: escherex.hxx:931
InteractionInfo * GetInteractionInfo() const
Definition: escherex.hxx:950
void SetClientTextbox(EscherExClientRecord_Base *p)
Definition: escherex.hxx:946
void SetClientData(EscherExClientRecord_Base *p)
Definition: escherex.hxx:944
EscherExClientRecord_Base * GetClientTextbox() const
Definition: escherex.hxx:954
void WriteClientData(EscherEx &rEx)
Definition: escherex.hxx:959
sal_uInt32 mnGroupLevel
Definition: escherex.hxx:1063
bool mbOOXML
Definition: escherex.hxx:1068
bool mbEscherSpgr
Definition: escherex.hxx:1066
sal_uInt32 mnCurrentDg
Definition: escherex.hxx:1060
bool mbEscherDg
Definition: escherex.hxx:1067
SdrLayerID GetHellLayerId() const
Definition: escherex.hxx:1213
sal_uInt32 mnCountOfs
Definition: escherex.hxx:1061
void SetHellLayerId(SdrLayerID nId)
Definition: escherex.hxx:1212
SvStream * mpOutStrm
Definition: escherex.hxx:1055
virtual sal_uInt32 GenerateShapeId()
Creates and returns a new shape identifier, updates the internal shape counters and registers the ide...
Definition: escherex.hxx:1080
sal_uInt32 mnStrmStartOfs
Definition: escherex.hxx:1056
std::shared_ptr< EscherExGlobal > mxGlobal
Definition: escherex.hxx:1052
std::unique_ptr< ImplEESdrWriter > mpImplEESdrWriter
Definition: escherex.hxx:1053
const OUString & GetEditAs() const
Definition: escherex.hxx:1124
virtual void AddSdrObjectVMLObject(const SdrObject &)
Definition: escherex.hxx:1166
sal_uInt64 GetStreamPos() const
Definition: escherex.hxx:1126
EscherEx(const EscherEx &)=delete
OUString mEditAs
Definition: escherex.hxx:1069
SvStream & GetStream() const
Definition: escherex.hxx:1125
std::vector< sal_uInt32 > mOffsets
Definition: escherex.hxx:1057
EscherGraphicProvider & GetGraphicProvider()
Returns the graphic provider from the global object that has been passed to the constructor.
Definition: escherex.hxx:1085
EscherEx & operator=(const EscherEx &)=delete
SvStream * QueryPictureStream()
Called if a picture shall be written and no picture stream is set at class ImplEESdrWriter.
Definition: escherex.hxx:1090
std::unique_ptr< SvStream > mxOwnStrm
Definition: escherex.hxx:1054
std::vector< sal_uInt16 > mRecTypes
Definition: escherex.hxx:1058
SdrLayerID mnHellLayerId
Definition: escherex.hxx:1064
sal_uInt32 GetGroupLevel() const
Definition: escherex.hxx:1146
EscherGraphicProvider(EscherGraphicProvider const &)=delete
void SetBaseURI(const OUString &rBaseURI)
Definition: escherex.hxx:601
const OUString & GetBaseURI() const
Definition: escherex.hxx:602
bool HasGraphics() const
Definition: escherex.hxx:595
EscherGraphicProviderFlags mnFlags
Definition: escherex.hxx:574
std::vector< std::unique_ptr< EscherBlibEntry > > mvBlibEntrys
Definition: escherex.hxx:576
EscherGraphicProvider & operator=(EscherGraphicProvider const &)=delete
EscherPersistTable(EscherPersistTable const &)=delete
EscherPersistTable & operator=(EscherPersistTable const &)=delete
::std::vector< std::unique_ptr< EscherPersistEntry > > maPersistTable
Definition: escherex.hxx:868
bool CreateGraphicProperties(const css::uno::Reference< css::beans::XPropertySet > &rXPropSet, const OUString &rSource, const bool bCreateFillBitmap, const bool bCreateCroppingAttributes=false, const bool bFillBitmapModeAllowed=true, const bool bOOxmlExport=false)
bool CreateGraphicProperties(const css::uno::Reference< css::drawing::XShape > &rXShape, const GraphicObject &rGraphicObj)
void CreateFillProperties(const css::uno::Reference< css::beans::XPropertySet > &, bool bEdge, const css::uno::Reference< css::drawing::XShape > &rXShape)
tools::Rectangle * pShapeBoundRect
Definition: escherex.hxx:666
void CreateGradientProperties(const css::uno::Reference< css::beans::XPropertySet > &, bool bTransparentGradient=false)
std::vector< EscherPropSortStruct > pSortStruct
Definition: escherex.hxx:672
void CreateGradientProperties(const css::awt::Gradient &rGradient)
static tools::PolyPolygon GetPolyPolygon(const css::uno::Reference< css::drawing::XShape > &rXShape)
EscherGraphicProvider * pGraphicProvider
Definition: escherex.hxx:664
static tools::PolyPolygon GetPolyPolygon(const css::uno::Any &rSource)
void CreateFillProperties(const css::uno::Reference< css::beans::XPropertySet > &, bool bEdge, bool bTransparentGradient=false)
::std::vector< std::unique_ptr< EscherConnectorListEntry > > maConnectorList
Definition: escherex.hxx:616
::std::vector< std::unique_ptr< EscherShapeListEntry > > maShapeList
Definition: escherex.hxx:615
EscherSolverContainer & operator=(EscherSolverContainer const &)=delete
EscherSolverContainer(EscherSolverContainer const &)=delete
std::unique_ptr< SvMemoryStream > mpHyperlinkRecord
Definition: escherex.hxx:915
InteractionInfo(SvMemoryStream *pStream)
Definition: escherex.hxx:918
const std::unique_ptr< SvMemoryStream > & getHyperlinkRecord() const
Definition: escherex.hxx:922
sal_uInt64 Tell() const
ESCHER_ShapePath
Definition: escherex.hxx:172
@ ESCHER_ShapeCurvesClosed
Definition: escherex.hxx:176
@ ESCHER_ShapeCurves
Definition: escherex.hxx:175
@ ESCHER_ShapeLines
Definition: escherex.hxx:173
@ ESCHER_ShapeComplex
Definition: escherex.hxx:177
@ ESCHER_ShapeLinesClosed
Definition: escherex.hxx:174
ESCHER_FillStyle
Definition: escherex.hxx:142
@ ESCHER_FillPicture
Definition: escherex.hxx:146
@ ESCHER_FillShade
Definition: escherex.hxx:147
@ ESCHER_FillTexture
Definition: escherex.hxx:145
@ ESCHER_FillShadeShape
Definition: escherex.hxx:149
@ ESCHER_FillPattern
Definition: escherex.hxx:144
@ ESCHER_FillSolid
Definition: escherex.hxx:143
@ ESCHER_FillShadeCenter
Definition: escherex.hxx:148
@ ESCHER_FillShadeScale
Definition: escherex.hxx:150
@ ESCHER_FillShadeTitle
Definition: escherex.hxx:151
@ ESCHER_FillBackground
Definition: escherex.hxx:152
ESCHER_AnchorText
Definition: escherex.hxx:209
@ ESCHER_AnchorTopBaseline
Definition: escherex.hxx:216
@ ESCHER_AnchorMiddleCentered
Definition: escherex.hxx:214
@ ESCHER_AnchorBottom
Definition: escherex.hxx:212
@ ESCHER_AnchorBottomBaseline
Definition: escherex.hxx:217
@ ESCHER_AnchorTopCenteredBaseline
Definition: escherex.hxx:218
@ ESCHER_AnchorTopCentered
Definition: escherex.hxx:213
@ ESCHER_AnchorBottomCenteredBaseline
Definition: escherex.hxx:219
@ ESCHER_AnchorBottomCentered
Definition: escherex.hxx:215
@ ESCHER_AnchorMiddle
Definition: escherex.hxx:211
@ ESCHER_AnchorTop
Definition: escherex.hxx:210
std::vector< EscherPropSortStruct > EscherProperties
Definition: escherex.hxx:660
ESCHER_LineJoin
Definition: escherex.hxx:301
@ ESCHER_LineJoinMiter
Definition: escherex.hxx:303
@ ESCHER_LineJoinRound
Definition: escherex.hxx:304
@ ESCHER_LineJoinBevel
Definition: escherex.hxx:302
ESCHER_WrapMode
Definition: escherex.hxx:182
@ ESCHER_WrapNone
Definition: escherex.hxx:185
@ ESCHER_WrapByPoints
Definition: escherex.hxx:184
@ ESCHER_WrapSquare
Definition: escherex.hxx:183
@ ESCHER_WrapThrough
Definition: escherex.hxx:187
@ ESCHER_WrapTopBottom
Definition: escherex.hxx:186
ESCHER_bwMode
Definition: escherex.hxx:192
@ ESCHER_bwLightGrayScale
Definition: escherex.hxx:196
@ ESCHER_bwDontShow
Definition: escherex.hxx:203
@ ESCHER_bwGrayOutline
Definition: escherex.hxx:198
@ ESCHER_bwHighContrast
Definition: escherex.hxx:200
@ ESCHER_bwBlack
Definition: escherex.hxx:201
@ ESCHER_bwInverseGray
Definition: escherex.hxx:197
@ ESCHER_bwWhite
Definition: escherex.hxx:202
@ ESCHER_bwBlackTextLine
Definition: escherex.hxx:199
@ ESCHER_bwAutomatic
Definition: escherex.hxx:194
@ ESCHER_bwNumModes
Definition: escherex.hxx:204
@ ESCHER_bwColor
Definition: escherex.hxx:193
@ ESCHER_bwGrayScale
Definition: escherex.hxx:195
ESCHER_LineCap
Definition: escherex.hxx:309
@ ESCHER_LineEndCapSquare
Definition: escherex.hxx:311
@ ESCHER_LineEndCapFlat
Definition: escherex.hxx:312
@ ESCHER_LineEndCapRound
Definition: escherex.hxx:310
#define ESCHER_OPT
Definition: escherex.hxx:63
ESCHER_txfl
Definition: escherex.hxx:233
@ ESCHER_txflBtoT
Definition: escherex.hxx:236
@ ESCHER_txflVertN
Definition: escherex.hxx:239
@ ESCHER_txflTtoBA
Definition: escherex.hxx:235
@ ESCHER_txflHorzN
Definition: escherex.hxx:234
@ ESCHER_txflTtoBN
Definition: escherex.hxx:237
@ ESCHER_txflHorzA
Definition: escherex.hxx:238
ESCHER_wMode
Definition: escherex.hxx:156
@ ESCHER_wGrayScale
Definition: escherex.hxx:159
@ ESCHER_wGrayOutline
Definition: escherex.hxx:162
@ ESCHER_wNumModes
Definition: escherex.hxx:167
@ ESCHER_wHighContrast
Definition: escherex.hxx:164
@ ESCHER_wAutomatic
Definition: escherex.hxx:158
@ ESCHER_wDontShow
Definition: escherex.hxx:166
@ ESCHER_wBlackTextLine
Definition: escherex.hxx:163
@ ESCHER_wInverseGray
Definition: escherex.hxx:161
@ ESCHER_wBlack
Definition: escherex.hxx:165
@ ESCHER_wLightGrayScale
Definition: escherex.hxx:160
@ ESCHER_wColor
Definition: escherex.hxx:157
ESCHER_LineWidth
Definition: escherex.hxx:285
@ ESCHER_LineMediumWidthArrow
Definition: escherex.hxx:287
@ ESCHER_LineWideArrow
Definition: escherex.hxx:288
@ ESCHER_LineNarrowArrow
Definition: escherex.hxx:286
ESCHER_BlipFlags
Definition: escherex.hxx:245
@ ESCHER_BlipFlagURL
Definition: escherex.hxx:249
@ ESCHER_BlipFlagLinkToFile
Definition: escherex.hxx:253
@ ESCHER_BlipFlagFile
Definition: escherex.hxx:248
@ ESCHER_BlipFlagDefault
Definition: escherex.hxx:246
@ ESCHER_BlipFlagType
Definition: escherex.hxx:250
@ ESCHER_BlipFlagDoNotSave
Definition: escherex.hxx:252
@ ESCHER_BlipFlagComment
Definition: escherex.hxx:247
ESCHER_LineEndLength
Definition: escherex.hxx:293
@ ESCHER_LineLongArrow
Definition: escherex.hxx:296
@ ESCHER_LineMediumLenArrow
Definition: escherex.hxx:295
@ ESCHER_LineShortArrow
Definition: escherex.hxx:294
const sal_uInt32 DFF_DGG_CLUSTER_SIZE
Definition: escherex.hxx:442
ESCHER_cxSTYLE
Definition: escherex.hxx:224
@ ESCHER_cxstyleCurved
Definition: escherex.hxx:227
@ ESCHER_cxstyleStraight
Definition: escherex.hxx:225
@ ESCHER_cxstyleBent
Definition: escherex.hxx:226
@ ESCHER_cxstyleNone
Definition: escherex.hxx:228
ESCHER_LineDashing
Definition: escherex.hxx:258
@ ESCHER_LineDashSys
Definition: escherex.hxx:260
@ ESCHER_LineLongDashDotDotGEL
Definition: escherex.hxx:269
@ ESCHER_LineDotGEL
Definition: escherex.hxx:264
@ ESCHER_LineDashGEL
Definition: escherex.hxx:265
@ ESCHER_LineDashDotSys
Definition: escherex.hxx:262
@ ESCHER_LineDashDotDotSys
Definition: escherex.hxx:263
@ ESCHER_LineDotSys
Definition: escherex.hxx:261
@ ESCHER_LineLongDashGEL
Definition: escherex.hxx:266
@ ESCHER_LineDashDotGEL
Definition: escherex.hxx:267
@ ESCHER_LineSolid
Definition: escherex.hxx:259
@ ESCHER_LineLongDashDotGEL
Definition: escherex.hxx:268
MSOPATHTYPE
Definition: escherex.hxx:316
@ msopathLineTo
Definition: escherex.hxx:317
@ msopathCurveTo
Definition: escherex.hxx:318
@ msopathInvalid
Definition: escherex.hxx:324
@ msopathClientEscape
Definition: escherex.hxx:323
@ msopathClose
Definition: escherex.hxx:320
@ msopathMoveTo
Definition: escherex.hxx:319
@ msopathEscape
Definition: escherex.hxx:322
@ msopathEnd
Definition: escherex.hxx:321
EscherGraphicProviderFlags
Definition: escherex.hxx:563
ESCHER_BlibType
Definition: escherex.hxx:127
@ ERROR
Definition: escherex.hxx:128
@ EMF
Definition: escherex.hxx:130
@ PICT
Definition: escherex.hxx:132
@ WMF
Definition: escherex.hxx:131
@ LastClient
Definition: escherex.hxx:137
@ UNKNOWN
Definition: escherex.hxx:129
@ PNG
Definition: escherex.hxx:134
@ FirstClient
Definition: escherex.hxx:136
@ DIB
Definition: escherex.hxx:135
@ PEG
Definition: escherex.hxx:133
ShapeFlag
Definition: escherex.hxx:85
@ HaveShapeProperty
ESCHER_LineEnd
Definition: escherex.hxx:274
@ ESCHER_LineArrowOvalEnd
Definition: escherex.hxx:279
@ ESCHER_LineArrowStealthEnd
Definition: escherex.hxx:277
@ ESCHER_LineArrowOpenEnd
Definition: escherex.hxx:280
@ ESCHER_LineArrowDiamondEnd
Definition: escherex.hxx:278
@ ESCHER_LineNoEnd
Definition: escherex.hxx:275
@ ESCHER_LineArrowEnd
Definition: escherex.hxx:276
void * p
MSO_SPT
static basegfx::B2DPolyPolygon GetLineArrow(const sal_Int32 nLineWidth, const sal_uInt32 eLineEnd, const sal_uInt32 eLineWidth, const sal_uInt32 eLineLength, sal_Int32 &rnArrowWidth, bool &rbArrowCenter, OUString &rsArrowName, bool bScaleArrow)
Definition: msdffimp.cxx:799
#define MSFILTER_DLLPUBLIC
NONE
class SAL_NO_VTABLE XPropertySet
Shape IDs per cluster in DGG atom.
sal_Int16 nId
css::awt::Point maPointB
Definition: escherex.hxx:460
css::awt::Point maPointA
Definition: escherex.hxx:458
css::uno::Reference< css::drawing::XShape > mXConnectToB
Definition: escherex.hxx:461
css::uno::Reference< css::drawing::XShape > mXConnectToA
Definition: escherex.hxx:459
EscherConnectorListEntry(css::uno::Reference< css::drawing::XShape > xC, const css::awt::Point &rPA, css::uno::Reference< css::drawing::XShape > xSA, const css::awt::Point &rPB, css::uno::Reference< css::drawing::XShape > xSB)
Definition: escherex.hxx:465
css::uno::Reference< css::drawing::XShape > mXConnector
Definition: escherex.hxx:457
SvStream & rStrm
Definition: escherex.hxx:493
sal_uInt32 nContPos
Definition: escherex.hxx:492
SvStream & rStrm
Definition: escherex.hxx:483
sal_uInt32 nContPos
Definition: escherex.hxx:482
sal_uInt32 mnNextShapeId
Identifier of drawing this cluster belongs to (one-based index into maDrawingInfos).
Definition: escherex.hxx:1025
ClusterEntry(sal_uInt32 nDrawingId)
Next free shape identifier in this cluster.
Definition: escherex.hxx:1026
DrawingInfo(sal_uInt32 nClusterId)
Last shape identifier generated for this drawing.
Definition: escherex.hxx:1034
sal_uInt32 mnShapeCount
Currently used cluster (one-based index into maClusterTable).
Definition: escherex.hxx:1032
sal_uInt32 mnLastShapeId
Current number of shapes in this drawing.
Definition: escherex.hxx:1033
sal_uInt32 mnOffset
Definition: escherex.hxx:518
EscherPersistEntry(sal_uInt32 nId, sal_uInt32 nOffset)
Definition: escherex.hxx:520
sal_uInt32 mnID
Definition: escherex.hxx:517
sal_uInt16 nPropId
Definition: escherex.hxx:657
sal_uInt32 nPropValue
Definition: escherex.hxx:656
std::vector< sal_uInt8 > nProp
Definition: escherex.hxx:655
static css::beans::PropertyState GetPropertyState(const css::uno::Reference< css::beans::XPropertySet > &, const OUString &rPropertyName)
Definition: escherex.cxx:3878
static bool GetPropertyValue(css::uno::Any &rAny, const css::uno::Reference< css::beans::XPropertySet > &, const OUString &rPropertyName, bool bTestPropertyAvailability=false)
Definition: escherex.cxx:3840
unsigned char sal_uInt8