LibreOffice Module filter (master) 1
actimpr.cxx
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#include <sal/config.h>
21#include <sal/log.hxx>
22
23#include <o3tl/any.hxx>
24#include <o3tl/safeint.hxx>
25#include <vcl/bitmapex.hxx>
26#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
27#include <com/sun/star/drawing/LineStyle.hpp>
28#include <com/sun/star/drawing/LineDash.hpp>
29#include <com/sun/star/drawing/FillStyle.hpp>
30#include <com/sun/star/drawing/Hatch.hpp>
31#include <com/sun/star/awt/FontDescriptor.hpp>
32#include <com/sun/star/awt/FontWeight.hpp>
33#include <com/sun/star/awt/FontUnderline.hpp>
34#include <com/sun/star/drawing/XShapeGrouper.hpp>
35#include <com/sun/star/drawing/CircleKind.hpp>
36#include <com/sun/star/awt/XBitmap.hpp>
37#include <com/sun/star/drawing/PointSequenceSequence.hpp>
38#include <com/sun/star/drawing/PointSequence.hpp>
39#include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
40#include <com/sun/star/drawing/FlagSequence.hpp>
41#include <com/sun/star/drawing/ShapeCollection.hpp>
42#include <com/sun/star/drawing/TextAdjust.hpp>
43#include <com/sun/star/text/XText.hpp>
44#include <com/sun/star/text/XTextRange.hpp>
45#include <com/sun/star/style/HorizontalAlignment.hpp>
46
49#include <tools/helpers.hxx>
51
52#include "bitmap.hxx"
53#include "elements.hxx"
54#include "outact.hxx"
55
56#define MAX_PAGES_FOR_FUZZING 2048
57
58using namespace ::com::sun::star;
59
60CGMImpressOutAct::CGMImpressOutAct(CGM& rCGM, const uno::Reference< frame::XModel > & rModel)
61 : mnCurrentPage(0)
62 , mnGroupActCount(0)
63 , mnGroupLevel(0)
64 , maGroupLevel()
65 , mpCGM(&rCGM)
66 , nFinalTextCount(0)
67{
68 if ( !mpCGM->mbStatus )
69 return;
70
71 bool bStatRet = false;
72
73 uno::Reference< drawing::XDrawPagesSupplier > aDrawPageSup( rModel, uno::UNO_QUERY );
74 if( aDrawPageSup.is() )
75 {
76 maXDrawPages = aDrawPageSup->getDrawPages();
77 if ( maXDrawPages.is() )
78 {
79 maXMultiServiceFactory.set( rModel, uno::UNO_QUERY);
80 if( maXMultiServiceFactory.is() )
81 {
82 maXDrawPage = *o3tl::doAccess<uno::Reference<drawing::XDrawPage>>(maXDrawPages->getByIndex( 0 ));
83 if ( ImplInitPage() )
84 bStatRet = true;
85 }
86 }
87 }
88 mpCGM->mbStatus = bStatRet;
89}
90
92{
93 for (auto &a : maLockedNewXShapes)
94 a->removeActionLock();
95}
96
98{
99 bool bStatRet = false;
100 if( maXDrawPage.is() )
101 {
103 if ( maXShapes.is() )
104 {
105 bStatRet = true;
106 }
107 }
108 return bStatRet;
109}
110
111bool CGMImpressOutAct::ImplCreateShape( const OUString& rType )
112{
114 return false;
115 uno::Reference< uno::XInterface > xNewShape( maXMultiServiceFactory->createInstance( rType ) );
116 maXShape.set( xNewShape, uno::UNO_QUERY );
117 maXPropSet.set( xNewShape, uno::UNO_QUERY );
118 if ( maXShape.is() && maXPropSet.is() )
119 {
120 maXShapes->add( maXShape );
121 uno::Reference<document::XActionLockable> xLockable(maXShape, uno::UNO_QUERY);
122 if (xLockable)
123 {
124 xLockable->addActionLock();
125 maLockedNewXShapes.push_back(xLockable);
126 }
127 return true;
128 }
129 return false;
130}
131
132void CGMImpressOutAct::ImplSetOrientation( FloatPoint const & rRefPoint, double rOrientation )
133{
134 maXPropSet->setPropertyValue( "RotationPointX", uno::Any(static_cast<sal_Int32>(rRefPoint.X)) );
135 maXPropSet->setPropertyValue( "RotationPointY", uno::Any(static_cast<sal_Int32>(rRefPoint.Y)) );
136 maXPropSet->setPropertyValue( "RotateAngle", uno::Any(static_cast<sal_Int32>( rOrientation * 100.0 )) );
137}
138
139
141{
142 drawing::LineStyle eLS;
143
144 sal_uInt32 nLineColor;
145 LineType eLineType;
146 double fLineWidth;
147
148 if ( mpCGM->pElement->nAspectSourceFlags & ASF_LINECOLOR )
149 nLineColor = mpCGM->pElement->pLineBundle->GetColor();
150 else
151 nLineColor = mpCGM->pElement->aLineBundle.GetColor();
152 if ( mpCGM->pElement->nAspectSourceFlags & ASF_LINETYPE )
153 eLineType = mpCGM->pElement->pLineBundle->eLineType;
154 else
155 eLineType = mpCGM->pElement->aLineBundle.eLineType;
156 if ( mpCGM->pElement->nAspectSourceFlags & ASF_LINEWIDTH )
157 fLineWidth = mpCGM->pElement->pLineBundle->nLineWidth;
158 else
159 fLineWidth = mpCGM->pElement->aLineBundle.nLineWidth;
160
161 maXPropSet->setPropertyValue( "LineColor", uno::Any(static_cast<sal_Int32>(nLineColor)) );
162
163 maXPropSet->setPropertyValue( "LineWidth", uno::Any(static_cast<sal_Int32>(fLineWidth)) );
164
165 switch( eLineType )
166 {
167 case LT_NONE :
168 eLS = drawing::LineStyle_NONE;
169 break;
170 case LT_DASH :
171 case LT_DOT :
172 case LT_DASHDOT :
173 case LT_DOTDOTSPACE :
174 case LT_LONGDASH :
175 case LT_DASHDASHDOT :
176 eLS = drawing::LineStyle_DASH;
177 break;
178 case LT_SOLID :
179 default:
180 eLS = drawing::LineStyle_SOLID;
181 break;
182 }
183 maXPropSet->setPropertyValue( "LineStyle", uno::Any(eLS) );
184 if ( eLS == drawing::LineStyle_DASH )
185 {
186 drawing::LineDash aLineDash( drawing::DashStyle_RECTRELATIVE, 1, 50, 3, 33, 100 );
187 maXPropSet->setPropertyValue( "LineDash", uno::Any(aLineDash) );
188 }
189}
190
192{
193 drawing::LineStyle eLS;
194 drawing::FillStyle eFS;
195
196 sal_uInt32 nEdgeColor = 0;
197 EdgeType eEdgeType;
198 double fEdgeWidth = 0;
199
200 sal_uInt32 nFillColor;
201 FillInteriorStyle eFillStyle;
202 sal_uInt32 nHatchIndex;
203
204 if ( mpCGM->pElement->eEdgeVisibility == EV_ON )
205 {
206 if ( mpCGM->pElement->nAspectSourceFlags & ASF_EDGETYPE )
207 eEdgeType = mpCGM->pElement->pEdgeBundle->eEdgeType;
208 else
209 eEdgeType = mpCGM->pElement->aEdgeBundle.eEdgeType;
210 if ( mpCGM->pElement->nAspectSourceFlags & ASF_EDGEWIDTH )
211 fEdgeWidth = mpCGM->pElement->pEdgeBundle->nEdgeWidth;
212 else
213 fEdgeWidth = mpCGM->pElement->aEdgeBundle.nEdgeWidth;
214 if ( mpCGM->pElement->nAspectSourceFlags & ASF_EDGECOLOR )
215 nEdgeColor = mpCGM->pElement->pEdgeBundle->GetColor();
216 else
217 nEdgeColor = mpCGM->pElement->aEdgeBundle.GetColor();
218 }
219 else
220 eEdgeType = ET_NONE;
221
222 if ( mpCGM->pElement->nAspectSourceFlags & ASF_FILLINTERIORSTYLE )
223 eFillStyle = mpCGM->pElement->pFillBundle->eFillInteriorStyle;
224 else
225 eFillStyle = mpCGM->pElement->aFillBundle.eFillInteriorStyle;
226 if ( mpCGM->pElement->nAspectSourceFlags & ASF_FILLCOLOR )
227 nFillColor = mpCGM->pElement->pFillBundle->GetColor();
228 else
229 nFillColor = mpCGM->pElement->aFillBundle.GetColor();
230 if ( mpCGM->pElement->nAspectSourceFlags & ASF_HATCHINDEX )
231 nHatchIndex = static_cast<sal_uInt32>(mpCGM->pElement->pFillBundle->nFillHatchIndex);
232 else
233 nHatchIndex = static_cast<sal_uInt32>(mpCGM->pElement->aFillBundle.nFillHatchIndex);
234
235 maXPropSet->setPropertyValue( "FillColor", uno::Any(static_cast<sal_Int32>(nFillColor)) );
236
237 switch ( eFillStyle )
238 {
239 case FIS_HATCH :
240 {
241 if ( nHatchIndex == 0 )
242 eFS = drawing::FillStyle_NONE;
243 else
244 eFS = drawing::FillStyle_HATCH;
245 }
246 break;
247 case FIS_PATTERN :
248 case FIS_SOLID :
249 {
250 eFS = drawing::FillStyle_SOLID;
251 }
252 break;
253
254 case FIS_GEOPATTERN :
255 {
256 if ( mpCGM->pElement->eTransparency == T_ON )
257 nFillColor = mpCGM->pElement->nAuxiliaryColor;
258 eFS = drawing::FillStyle_NONE;
259 }
260 break;
261
262 case FIS_INTERPOLATED :
263 case FIS_GRADIENT :
264 {
265 eFS = drawing::FillStyle_GRADIENT;
266 }
267 break;
268
269 case FIS_HOLLOW :
270 case FIS_EMPTY :
271 default:
272 {
273 eFS = drawing::FillStyle_NONE;
274 }
275 }
276
278 eFS = drawing::FillStyle_GRADIENT;
279
280 if ( eFS == drawing::FillStyle_GRADIENT )
281 {
282 maXPropSet->setPropertyValue( "FillGradient", uno::Any(*mpGradient) );
283 }
284 maXPropSet->setPropertyValue( "FillStyle", uno::Any(eFS) );
285
286 eLS = drawing::LineStyle_NONE;
287 if ( eFillStyle == FIS_HOLLOW )
288 {
289 eLS = drawing::LineStyle_SOLID;
290 maXPropSet->setPropertyValue( "LineColor", uno::Any(static_cast<sal_Int32>(nFillColor)) );
291 maXPropSet->setPropertyValue( "LineWidth", uno::Any(sal_Int32(0)) );
292 }
293 else if ( eEdgeType != ET_NONE )
294 {
295 maXPropSet->setPropertyValue( "LineColor", uno::Any(static_cast<sal_Int32>(nEdgeColor)) );
296
297 maXPropSet->setPropertyValue( "LineWidth", uno::Any(static_cast<sal_Int32>(fEdgeWidth)) );
298
299 switch( eEdgeType )
300 {
301 case ET_DASH :
302 case ET_DOT :
303 case ET_DASHDOT :
304 case ET_DASHDOTDOT :
305 case ET_DOTDOTSPACE :
306 case ET_LONGDASH :
307 case ET_DASHDASHDOT :
308 default: // case ET_SOLID :
309 {
310 eLS = drawing::LineStyle_SOLID;
311 }
312 break;
313 }
314 }
315
316 maXPropSet->setPropertyValue( "LineStyle", uno::Any(eLS) );
317
318 if ( eFS != drawing::FillStyle_HATCH )
319 return;
320
321 drawing::Hatch aHatch;
322
323 aHatch.Color = nFillColor;
324 if ( mpCGM->pElement->maHatchMap.find( nHatchIndex ) != mpCGM->pElement->maHatchMap.end() )
325 {
326 HatchEntry& rHatchEntry = mpCGM->pElement->maHatchMap[ nHatchIndex ];
327 switch ( rHatchEntry.HatchStyle )
328 {
329 case 0 : aHatch.Style = drawing::HatchStyle_SINGLE; break;
330 case 1 : aHatch.Style = drawing::HatchStyle_DOUBLE; break;
331 case 2 : aHatch.Style = drawing::HatchStyle_TRIPLE; break;
332 }
333 aHatch.Distance = rHatchEntry.HatchDistance;
334 aHatch.Angle = rHatchEntry.HatchAngle;
335 }
336 else
337 {
338 aHatch.Style = drawing::HatchStyle_TRIPLE;
339 aHatch.Distance = 10 * ( nHatchIndex & 0x1f ) | 100;
340 aHatch.Angle = 15 * ( ( nHatchIndex & 0x1f ) - 5 );
341 }
342 maXPropSet->setPropertyValue( "FillHatch", uno::Any(aHatch) );
343}
344
345void CGMImpressOutAct::ImplSetTextBundle( const uno::Reference< beans::XPropertySet > & rProperty )
346{
347 sal_uInt32 nTextFontIndex;
348 sal_uInt32 nTextColor;
349
350 if ( mpCGM->pElement->nAspectSourceFlags & ASF_TEXTFONTINDEX )
351 nTextFontIndex = mpCGM->pElement->pTextBundle->nTextFontIndex;
352 else
353 nTextFontIndex = mpCGM->pElement->aTextBundle.nTextFontIndex;
354 if ( mpCGM->pElement->nAspectSourceFlags & ASF_TEXTCOLOR )
355 nTextColor = mpCGM->pElement->pTextBundle->GetColor();
356 else
357 nTextColor = mpCGM->pElement->aTextBundle.GetColor();
358
359 rProperty->setPropertyValue( "CharColor", uno::Any(static_cast<sal_Int32>(nTextColor)) );
360
361 sal_uInt32 nFontType = 0;
362 awt::FontDescriptor aFontDescriptor;
363 FontEntry* pFontEntry = mpCGM->pElement->aFontList.GetFontEntry( nTextFontIndex );
364 if ( pFontEntry )
365 {
366 nFontType = pFontEntry->nFontType;
367 aFontDescriptor.Name = OUString(reinterpret_cast<char*>(pFontEntry->aFontName.data()),
368 pFontEntry->aFontName.size(),
369 RTL_TEXTENCODING_ASCII_US);
370 }
371 aFontDescriptor.Height = sal_Int16( mpCGM->pElement->nCharacterHeight * 1.50 );
372 if ( nFontType & 1 )
373 aFontDescriptor.Slant = awt::FontSlant_ITALIC;
374 if ( nFontType & 2 )
375 aFontDescriptor.Weight = awt::FontWeight::BOLD;
376 else
377 aFontDescriptor.Weight = awt::FontWeight::NORMAL;
378
379 if ( mpCGM->pElement->eUnderlineMode != UM_OFF )
380 {
381 aFontDescriptor.Underline = awt::FontUnderline::SINGLE;
382 }
383 rProperty->setPropertyValue( "FontDescriptor", uno::Any(aFontDescriptor) );
384}
385
387{
388 if ( mnCurrentPage ) // one side is always existing, therefore the first side will be left out
389 {
390 uno::Reference< drawing::XDrawPage > xPage = maXDrawPages->insertNewByIndex( 0xffff );
391 maXDrawPage = xPage;
392 if ( !ImplInitPage() )
393 mpCGM->mbStatus = false;
395 {
396 // ofz#21753 that's enough pages for fuzzing, we're not doing anything productive now
397 mpCGM->mbStatus = false;
398 }
399 }
401}
402
404{
406 {
407 maGroupLevel[mnGroupLevel] = maXShapes->getCount();
408 }
409 ++mnGroupLevel;
411}
412
414{
415 if (!mnGroupLevel)
416 return;
417 --mnGroupLevel;
419 return;
420
421 sal_uInt32 nFirstIndex = maGroupLevel[mnGroupLevel];
422 if ( nFirstIndex == 0xffffffff )
423 nFirstIndex = 0;
424 sal_uInt32 nCurrentCount = maXShapes->getCount();
425 if ( ( nCurrentCount - nFirstIndex ) <= 1 )
426 return;
427
428 uno::Reference< drawing::XShapeGrouper > aXShapeGrouper;
429 aXShapeGrouper.set( maXDrawPage, uno::UNO_QUERY );
430 if( !aXShapeGrouper.is() )
431 return;
432
433 uno::Reference< drawing::XShapes > aXShapes = drawing::ShapeCollection::create(comphelper::getProcessComponentContext());
434 for ( sal_uInt32 i = nFirstIndex; i < nCurrentCount; i++ )
435 {
436 uno::Reference< drawing::XShape > aXShape = *o3tl::doAccess<uno::Reference<drawing::XShape>>(maXShapes->getByIndex( i ));
437 if (aXShape.is() )
438 {
439 aXShapes->add( aXShape );
440 }
441 }
442 aXShapeGrouper->group( aXShapes );
443}
444
446{
447 while ( mnGroupLevel )
448 {
449 EndGroup();
450 }
451}
452
454{
455 if (mnGroupActCount == (mpCGM->mnActCount - 1)) // POWERPOINT HACK !!!
456 return;
457 if (useless(rFloatRect.Left))
458 {
459 SAL_WARN("filter.icgm", "bad left: " << rFloatRect.Left);
460 return;
461 }
462 if (useless(rFloatRect.Top))
463 {
464 SAL_WARN("filter.icgm", "bad top: " << rFloatRect.Top);
465 return;
466 }
467 double fWidth = rFloatRect.Right - rFloatRect.Left;
468 if (useless(fWidth))
469 {
470 SAL_WARN("filter.icgm", "bad width: " << fWidth);
471 return;
472 }
473 double fHeight = rFloatRect.Bottom - rFloatRect.Top;
474 if (useless(fHeight))
475 {
476 SAL_WARN("filter.icgm", "bad height: " << fHeight);
477 return;
478 }
479 if (!ImplCreateShape( "com.sun.star.drawing.RectangleShape"))
480 return;
481 maXShape->setSize(awt::Size(fWidth, fHeight));
482 maXShape->setPosition(awt::Point(rFloatRect.Left, rFloatRect.Top));
484}
485
486void CGMImpressOutAct::DrawEllipse( FloatPoint const & rCenter, FloatPoint const & rSize, double& rOrientation )
487{
488 if ( !ImplCreateShape( "com.sun.star.drawing.EllipseShape" ) )
489 return;
490
491 drawing::CircleKind eCircleKind = drawing::CircleKind_FULL;
493 maXPropSet->setPropertyValue( "CircleKind", aAny );
494
495 tools::Long nXSize = static_cast<tools::Long>( rSize.X * 2.0 ); // strange behaviour with an awt::Size of 0
496 tools::Long nYSize = static_cast<tools::Long>( rSize.Y * 2.0 );
497 if ( nXSize < 1 )
498 nXSize = 1;
499 if ( nYSize < 1 )
500 nYSize = 1;
501 maXShape->setSize( awt::Size( nXSize, nYSize ) );
502 maXShape->setPosition( awt::Point( static_cast<tools::Long>( rCenter.X - rSize.X ), static_cast<tools::Long>( rCenter.Y - rSize.Y ) ) );
503
504 if ( rOrientation != 0 )
505 {
506 ImplSetOrientation( rCenter, rOrientation );
507 }
509}
510
511void CGMImpressOutAct::DrawEllipticalArc( FloatPoint const & rCenter, FloatPoint const & rSize, double& rOrientation,
512 sal_uInt32 nType, double& fStartAngle, double& fEndAngle )
513{
514 if ( !ImplCreateShape( "com.sun.star.drawing.EllipseShape" ) )
515 return;
516
517 uno::Any aAny;
518 drawing::CircleKind eCircleKind;
519
520
521 tools::Long nXSize = static_cast<tools::Long>( rSize.X * 2.0 ); // strange behaviour with an awt::Size of 0
522 tools::Long nYSize = static_cast<tools::Long>( rSize.Y * 2.0 );
523 if ( nXSize < 1 )
524 nXSize = 1;
525 if ( nYSize < 1 )
526 nYSize = 1;
527
528 maXShape->setSize( awt::Size ( nXSize, nYSize ) );
529
530 if ( rOrientation != 0 )
531 {
532 fStartAngle = NormAngle360(fStartAngle + rOrientation);
533 fEndAngle = NormAngle360(fEndAngle + rOrientation);
534 }
535 switch( nType )
536 {
537 case 0 : eCircleKind = drawing::CircleKind_SECTION; break;
538 case 1 : eCircleKind = drawing::CircleKind_CUT; break;
539 case 2 : eCircleKind = drawing::CircleKind_ARC; break;
540 default : eCircleKind = drawing::CircleKind_FULL; break;
541 }
542 if ( static_cast<tools::Long>(fStartAngle) == static_cast<tools::Long>(fEndAngle) )
543 {
544 eCircleKind = drawing::CircleKind_FULL;
545 maXPropSet->setPropertyValue( "CircleKind", uno::Any(eCircleKind) );
546 }
547 else
548 {
549 maXPropSet->setPropertyValue( "CircleKind", uno::Any(eCircleKind) );
550 maXPropSet->setPropertyValue( "CircleStartAngle", uno::Any(static_cast<sal_Int32>( fStartAngle * 100 )) );
551 maXPropSet->setPropertyValue( "CircleEndAngle", uno::Any(static_cast<sal_Int32>( fEndAngle * 100 )) );
552 }
553 maXShape->setPosition( awt::Point( static_cast<tools::Long>( rCenter.X - rSize.X ), static_cast<tools::Long>( rCenter.Y - rSize.Y ) ) );
554 if ( rOrientation != 0 )
555 {
556 ImplSetOrientation( rCenter, rOrientation );
557 }
558 if ( eCircleKind == drawing::CircleKind_ARC )
559 {
561 }
562 else
563 {
565 if ( nType == 2 )
566 {
568 aAny <<= drawing::FillStyle_NONE;
569 maXPropSet->setPropertyValue( "FillStyle", aAny );
570 }
571 }
572}
573
575{
576 if ( !pBmpDesc->mbStatus || pBmpDesc->mxBitmap.IsEmpty() )
577 return;
578
579 FloatPoint aOrigin = pBmpDesc->mnOrigin;
580 double fdx = pBmpDesc->mndx;
581 double fdy = pBmpDesc->mndy;
582
583 BmpMirrorFlags nMirr = BmpMirrorFlags::NONE;
584 if ( pBmpDesc->mbVMirror )
585 nMirr |= BmpMirrorFlags::Vertical;
586 if ( nMirr != BmpMirrorFlags::NONE )
587 pBmpDesc->mxBitmap.Mirror( nMirr );
588
589 mpCGM->ImplMapPoint( aOrigin );
590 mpCGM->ImplMapX( fdx );
591 mpCGM->ImplMapY( fdy );
592
593 if ( !ImplCreateShape( "com.sun.star.drawing.GraphicObjectShape" ) )
594 return;
595
596 maXShape->setSize( awt::Size( static_cast<tools::Long>(fdx), static_cast<tools::Long>(fdy) ) );
597 maXShape->setPosition( awt::Point( static_cast<tools::Long>(aOrigin.X), static_cast<tools::Long>(aOrigin.Y) ) );
598
599 if ( pBmpDesc->mnOrientation != 0 )
600 {
601 ImplSetOrientation( aOrigin, pBmpDesc->mnOrientation );
602 }
603
604 uno::Reference< awt::XBitmap > xBitmap( VCLUnoHelper::CreateBitmap( pBmpDesc->mxBitmap ) );
605 maXPropSet->setPropertyValue( "GraphicObjectFillBitmap", uno::Any(xBitmap) );
606}
607
609{
610 sal_uInt16 nPoints = rPoly.GetSize();
611
612 if ( !(( nPoints > 1 ) && ImplCreateShape( "com.sun.star.drawing.PolyPolygonShape" )) )
613 return;
614
615 drawing::PointSequenceSequence aRetval;
616
617 // prepare inside polygons
618 aRetval.realloc( 1 );
619
620 // get pointer to outside arrays
621 drawing::PointSequence* pOuterSequence = aRetval.getArray();
622
623 // make room in arrays
624 pOuterSequence->realloc(static_cast<sal_Int32>(nPoints));
625
626 // get pointer to arrays
627 awt::Point* pInnerSequence = pOuterSequence->getArray();
628
629 for( sal_uInt16 n = 0; n < nPoints; n++ )
630 *pInnerSequence++ = awt::Point( rPoly[ n ].X(), rPoly[n].Y() );
631
632 uno::Any aParam;
633 aParam <<= aRetval;
634 maXPropSet->setPropertyValue( "PolyPolygon", aParam );
636}
637
639{
640 sal_uInt16 nPoints = rPoly.GetSize();
641
642 if ( !(( nPoints > 1 ) && ImplCreateShape( "com.sun.star.drawing.PolyLineShape" )) )
643 return;
644
645 drawing::PointSequenceSequence aRetval;
646
647 // prepare inside polygons
648 aRetval.realloc( 1 );
649
650 // get pointer to outside arrays
651 drawing::PointSequence* pOuterSequence = aRetval.getArray();
652
653 // make room in arrays
654 pOuterSequence->realloc(static_cast<sal_Int32>(nPoints));
655
656 // get pointer to arrays
657 awt::Point* pInnerSequence = pOuterSequence->getArray();
658
659 for( sal_uInt16 n = 0; n < nPoints; n++ )
660 *pInnerSequence++ = awt::Point( rPoly[ n ].X(), rPoly[n].Y() );
661
662 uno::Any aParam;
663 aParam <<= aRetval;
664 maXPropSet->setPropertyValue( "PolyPolygon", aParam );
666}
667
669{
670 sal_uInt16 nPoints = rPolygon.GetSize();
671 if ( !(( nPoints > 1 ) && ImplCreateShape( "com.sun.star.drawing.OpenBezierShape" )) )
672 return;
673
674 drawing::PolyPolygonBezierCoords aRetval;
675
676 aRetval.Coordinates.realloc( 1 );
677 aRetval.Flags.realloc( 1 );
678
679 // get pointer to outside arrays
680 drawing::PointSequence* pOuterSequence = aRetval.Coordinates.getArray();
681 drawing::FlagSequence* pOuterFlags = aRetval.Flags.getArray();
682
683 // make room in arrays
684 pOuterSequence->realloc( nPoints );
685 pOuterFlags->realloc( nPoints );
686
687 awt::Point* pInnerSequence = pOuterSequence->getArray();
688 drawing::PolygonFlags* pInnerFlags = pOuterFlags->getArray();
689
690 for( sal_uInt16 i = 0; i < nPoints; i++ )
691 {
692 *pInnerSequence++ = awt::Point( rPolygon[ i ].X(), rPolygon[ i ].Y() );
693 *pInnerFlags++ = static_cast<drawing::PolygonFlags>(rPolygon.GetFlags( i ));
694 }
695 uno::Any aParam;
696 aParam <<= aRetval;
697 maXPropSet->setPropertyValue( "PolyPolygonBezier", aParam );
699}
700
702{
703 sal_uInt32 nNumPolys = rPolyPolygon.Count();
704 if ( !(nNumPolys && ImplCreateShape( "com.sun.star.drawing.ClosedBezierShape" )) )
705 return;
706
707 drawing::PolyPolygonBezierCoords aRetval;
708
709 // prepare inside polygons
710 aRetval.Coordinates.realloc(static_cast<sal_Int32>(nNumPolys));
711 aRetval.Flags.realloc(static_cast<sal_Int32>(nNumPolys));
712
713 // get pointer to outside arrays
714 drawing::PointSequence* pOuterSequence = aRetval.Coordinates.getArray();
715 drawing::FlagSequence* pOuterFlags = aRetval.Flags.getArray();
716
717 for( sal_uInt32 a = 0; a < nNumPolys; a++ )
718 {
719 const tools::Polygon& aPolygon( rPolyPolygon.GetObject( a ) );
720 sal_uInt32 nNumPoints = aPolygon.GetSize();
721
722 // make room in arrays
723 pOuterSequence->realloc(static_cast<sal_Int32>(nNumPoints));
724 pOuterFlags->realloc(static_cast<sal_Int32>(nNumPoints));
725
726 // get pointer to arrays
727 awt::Point* pInnerSequence = pOuterSequence->getArray();
728 drawing::PolygonFlags* pInnerFlags = pOuterFlags->getArray();
729
730 for( sal_uInt32 b = 0; b < nNumPoints; b++ )
731 {
732 *pInnerSequence++ = awt::Point( aPolygon.GetPoint( b ).X(), aPolygon.GetPoint( b ).Y() ) ;
733 *pInnerFlags++ = static_cast<drawing::PolygonFlags>(aPolygon.GetFlags( b ));
734 }
735 pOuterSequence++;
736 pOuterFlags++;
737 }
738 uno::Any aParam;
739 aParam <<= aRetval;
740 maXPropSet->setPropertyValue( "PolyPolygonBezier", aParam);
742}
743
744void CGMImpressOutAct::DrawText(awt::Point const & rTextPos, awt::Size const & rTextSize, const OUString& rString, FinalFlag eFlag)
745{
746 if ( !ImplCreateShape( "com.sun.star.drawing.TextShape" ) )
747 return;
748
749 uno::Any aAny;
750 tools::Long nWidth = rTextSize.Width;
751 tools::Long nHeight = rTextSize.Height;
752
753 awt::Point aTextPos( rTextPos );
754 switch ( mpCGM->pElement->eTextAlignmentV )
755 {
756 case TAV_HALF :
757 {
758 aTextPos.Y = o3tl::saturating_add(aTextPos.X, static_cast<sal_Int32>((mpCGM->pElement->nCharacterHeight * -1.5) / 2));
759 }
760 break;
761
762 case TAV_BASE :
763 case TAV_BOTTOM :
764 case TAV_NORMAL :
765 aTextPos.Y = o3tl::saturating_add(aTextPos.Y, static_cast<sal_Int32>(mpCGM->pElement->nCharacterHeight * -1.5));
766 break;
767 case TAV_TOP :
768 break;
769 case TAV_CAP:
770 case TAV_CONT:
771 break; // -Wall these two were not here.
772 }
773
774 if ( nWidth < 0 )
775 {
776 nWidth = -nWidth;
777 }
778 else if ( nWidth == 0 )
779 {
780 nWidth = -1;
781 }
782 if ( nHeight < 0 )
783 {
784 nHeight = -nHeight;
785 }
786 else if ( nHeight == 0 )
787 {
788 nHeight = -1;
789 }
790 maXShape->setPosition( aTextPos );
791 maXShape->setSize( awt::Size( nWidth, nHeight ) );
792 double nX = mpCGM->pElement->nCharacterOrientation[ 2 ];
793 double nY = mpCGM->pElement->nCharacterOrientation[ 3 ];
794 double fSqrt = std::hypot(nX, nY);
795 double nOrientation = fSqrt != 0.0 ? basegfx::rad2deg(acos(nX / fSqrt)) : 0.0;
796 if ( nY < 0 )
797 nOrientation = 360 - nOrientation;
798
799 if ( nOrientation )
800 {
801 maXPropSet->setPropertyValue( "RotationPointX", uno::Any(aTextPos.X) );
802 maXPropSet->setPropertyValue( "RotationPointY", uno::Any(static_cast<sal_Int32>( aTextPos.Y + nHeight )) );
803 maXPropSet->setPropertyValue( "RotateAngle", uno::Any(static_cast<sal_Int32>( nOrientation * 100 )) );
804 }
805 if ( nWidth == -1 )
806 {
807 aAny <<= true;
808 maXPropSet->setPropertyValue( "TextAutoGrowWidth", aAny );
809
810 drawing::TextAdjust eTextAdjust;
811 switch ( mpCGM->pElement->eTextAlignmentH )
812 {
813 case TAH_RIGHT :
814 eTextAdjust = drawing::TextAdjust_RIGHT;
815 break;
816 case TAH_LEFT :
817 case TAH_CONT :
818 case TAH_NORMAL :
819 eTextAdjust = drawing::TextAdjust_LEFT;
820 break;
821 case TAH_CENTER :
822 eTextAdjust = drawing::TextAdjust_CENTER;
823 break;
824 }
825 maXPropSet->setPropertyValue( "TextHorizontalAdjust", uno::Any(eTextAdjust) );
826 }
827 if ( nHeight == -1 )
828 {
829 maXPropSet->setPropertyValue( "TextAutoGrowHeight", uno::Any(true) );
830 }
831 uno::Reference< text::XText > xText;
832 uno::Any aFirstQuery( maXShape->queryInterface( cppu::UnoType<text::XText>::get()));
833 if( aFirstQuery >>= xText )
834 {
835 uno::Reference< text::XTextCursor > aXTextCursor( xText->createTextCursor() );
836 {
837 aXTextCursor->gotoEnd( false );
838 uno::Reference< text::XTextRange > aCursorText;
839 uno::Any aSecondQuery( aXTextCursor->queryInterface( cppu::UnoType<text::XTextRange>::get()));
840 if ( aSecondQuery >>= aCursorText )
841 {
842 uno::Reference< beans::XPropertySet > aCursorPropSet;
843
844 uno::Any aQuery( aCursorText->queryInterface( cppu::UnoType<beans::XPropertySet>::get()));
845 if( aQuery >>= aCursorPropSet )
846 {
847 if ( nWidth != -1 ) // paragraph adjusting in a valid textbox ?
848 {
849 switch ( mpCGM->pElement->eTextAlignmentH )
850 {
851 case TAH_RIGHT :
852 aAny <<= sal_Int16(style::HorizontalAlignment_RIGHT);
853 break;
854 case TAH_LEFT :
855 case TAH_CONT :
856 case TAH_NORMAL :
857 aAny <<= sal_Int16(style::HorizontalAlignment_LEFT);
858 break;
859 case TAH_CENTER :
860 aAny <<= sal_Int16(style::HorizontalAlignment_CENTER);
861 break;
862 }
863 aCursorPropSet->setPropertyValue( "ParaAdjust", aAny );
864 }
865 if ( nWidth > 0 && nHeight > 0 ) // restricted text
866 {
867 aAny <<= true;
868 maXPropSet->setPropertyValue( "TextFitToSize", aAny );
869 }
870 aCursorText->setString(rString);
871 aXTextCursor->gotoEnd( true );
872 ImplSetTextBundle( aCursorPropSet );
873 }
874 }
875 }
876 }
877 if ( eFlag == FF_NOT_FINAL )
878 {
879 nFinalTextCount = maXShapes->getCount();
880 }
881}
882
883void CGMImpressOutAct::AppendText( const char* pString )
884{
885 if ( !nFinalTextCount )
886 return;
887
888 uno::Reference< drawing::XShape > aShape = *o3tl::doAccess<uno::Reference<drawing::XShape>>(maXShapes->getByIndex( nFinalTextCount - 1 ));
889 if ( !aShape.is() )
890 return;
891
892 uno::Reference< text::XText > xText;
893 uno::Any aFirstQuery( aShape->queryInterface( cppu::UnoType<text::XText>::get()) );
894 if( !(aFirstQuery >>= xText) )
895 return;
896
897 OUString aStr(pString, strlen(pString), RTL_TEXTENCODING_ASCII_US);
898
899 uno::Reference< text::XTextCursor > aXTextCursor( xText->createTextCursor() );
900 if ( !aXTextCursor.is() )
901 return;
902
903 aXTextCursor->gotoEnd( false );
904 uno::Reference< text::XTextRange > aCursorText;
905 uno::Any aSecondQuery(aXTextCursor->queryInterface( cppu::UnoType<text::XTextRange>::get()));
906 if ( aSecondQuery >>= aCursorText )
907 {
908 uno::Reference< beans::XPropertySet > aPropSet;
909 uno::Any aQuery(aCursorText->queryInterface( cppu::UnoType<beans::XPropertySet>::get()));
910 if( aQuery >>= aPropSet )
911 {
912 aCursorText->setString( aStr );
913 aXTextCursor->gotoEnd( true );
914 ImplSetTextBundle( aPropSet );
915 }
916 }
917}
918
919
921{
922 if (!maPoints.empty())
923 EndFigure();
924
925 BeginGroup();
926 maPoints.clear();
927 maFlags.clear();
928}
929
931{
932 if (maPoints.size() > 2)
933 {
934 NewRegion();
937 }
938}
939
941{
942 if (maPoints.size() > 2)
943 {
944 tools::Polygon aPolygon(maPoints.size(), maPoints.data(), maFlags.data());
945 maPolyPolygon.Insert( aPolygon );
946 }
947 maPoints.clear();
948 maFlags.clear();
949}
950
952{
953 NewRegion();
956 EndGroup();
957 maPoints.clear();
958 maFlags.clear();
959}
960
961void CGMImpressOutAct::RegPolyLine( tools::Polygon const & rPolygon, bool bReverse )
962{
963 sal_uInt16 nPoints = rPolygon.GetSize();
964 if ( !nPoints )
965 return;
966
967 if ( bReverse )
968 {
969 for ( sal_uInt16 i = 0; i < nPoints; i++ )
970 {
971 maPoints.push_back(rPolygon.GetPoint(nPoints - i - 1));
972 maFlags.push_back(rPolygon.GetFlags(nPoints - i - 1));
973 }
974 }
975 else
976 {
977 for ( sal_uInt16 i = 0; i < nPoints; i++ )
978 {
979 maPoints.push_back(rPolygon.GetPoint(i));
980 maFlags.push_back(rPolygon.GetFlags(i));
981 }
982 }
983}
984
986{
987 if ( !mpGradient )
988 mpGradient.reset( new awt::Gradient );
989 mpGradient->XOffset = ( static_cast<sal_uInt16>(nHorzOfs) & 0x7f );
990 mpGradient->YOffset = ( static_cast<sal_uInt16>(nVertOfs) & 0x7f );
991}
992
994{
995 if ( !mpGradient )
996 mpGradient.reset( new awt::Gradient );
997 mpGradient->Angle = sal::static_int_cast< sal_Int16 >(nAngle);
998}
999
1000void CGMImpressOutAct::SetGradientDescriptor( sal_uInt32 nColorFrom, sal_uInt32 nColorTo )
1001{
1002 if ( !mpGradient )
1003 mpGradient.reset( new awt::Gradient );
1004 mpGradient->StartColor = nColorFrom;
1005 mpGradient->EndColor = nColorTo;
1006}
1007
1008void CGMImpressOutAct::SetGradientStyle( sal_uInt32 nStyle )
1009{
1010 if ( !mpGradient )
1011 mpGradient.reset( new awt::Gradient );
1012 switch ( nStyle )
1013 {
1014 case 0xff :
1015 {
1016 mpGradient->Style = awt::GradientStyle_AXIAL;
1017 }
1018 break;
1019 case 4 :
1020 {
1021 mpGradient->Style = awt::GradientStyle_RADIAL; // CONICAL
1022 }
1023 break;
1024 case 3 :
1025 {
1026 mpGradient->Style = awt::GradientStyle_RECT;
1027 }
1028 break;
1029 case 2 :
1030 {
1031 mpGradient->Style = awt::GradientStyle_ELLIPTICAL;
1032 }
1033 break;
1034 default :
1035 {
1036 mpGradient->Style = awt::GradientStyle_LINEAR;
1037 }
1038 }
1039}
1040
1041/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define MAX_PAGES_FOR_FUZZING
Definition: actimpr.cxx:56
bool useless(double value)
Definition: cgm.hxx:142
#define ASF_EDGEWIDTH
Definition: cgmtypes.hxx:75
#define ASF_FILLINTERIORSTYLE
Definition: cgmtypes.hxx:69
@ T_ON
Definition: cgmtypes.hxx:121
#define ASF_HATCHINDEX
Definition: cgmtypes.hxx:70
#define ASF_LINEWIDTH
Definition: cgmtypes.hxx:64
FinalFlag
Definition: cgmtypes.hxx:106
@ FF_NOT_FINAL
Definition: cgmtypes.hxx:106
EdgeType
Definition: cgmtypes.hxx:115
@ ET_NONE
Definition: cgmtypes.hxx:116
@ ET_DASHDOT
Definition: cgmtypes.hxx:115
@ ET_LONGDASH
Definition: cgmtypes.hxx:116
@ ET_DOT
Definition: cgmtypes.hxx:115
@ ET_DASHDOTDOT
Definition: cgmtypes.hxx:115
@ ET_DOTDOTSPACE
Definition: cgmtypes.hxx:116
@ ET_DASHDASHDOT
Definition: cgmtypes.hxx:116
@ ET_DASH
Definition: cgmtypes.hxx:115
@ EV_ON
Definition: cgmtypes.hxx:117
#define ASF_EDGETYPE
Definition: cgmtypes.hxx:74
#define ASF_LINECOLOR
Definition: cgmtypes.hxx:65
#define ASF_EDGECOLOR
Definition: cgmtypes.hxx:76
@ TAH_NORMAL
Definition: cgmtypes.hxx:103
@ TAH_RIGHT
Definition: cgmtypes.hxx:103
@ TAH_CENTER
Definition: cgmtypes.hxx:103
@ TAH_CONT
Definition: cgmtypes.hxx:103
@ TAH_LEFT
Definition: cgmtypes.hxx:103
@ TAV_BASE
Definition: cgmtypes.hxx:104
@ TAV_CAP
Definition: cgmtypes.hxx:104
@ TAV_BOTTOM
Definition: cgmtypes.hxx:104
@ TAV_NORMAL
Definition: cgmtypes.hxx:104
@ TAV_TOP
Definition: cgmtypes.hxx:104
@ TAV_CONT
Definition: cgmtypes.hxx:104
@ TAV_HALF
Definition: cgmtypes.hxx:104
FillInteriorStyle
Definition: cgmtypes.hxx:123
@ FIS_SOLID
Definition: cgmtypes.hxx:123
@ FIS_EMPTY
Definition: cgmtypes.hxx:123
@ FIS_GRADIENT
Definition: cgmtypes.hxx:124
@ FIS_INTERPOLATED
Definition: cgmtypes.hxx:124
@ FIS_HOLLOW
Definition: cgmtypes.hxx:123
@ FIS_PATTERN
Definition: cgmtypes.hxx:123
@ FIS_GEOPATTERN
Definition: cgmtypes.hxx:123
@ FIS_HATCH
Definition: cgmtypes.hxx:123
#define ACT4_GRADIENT_ACTION
Definition: cgmtypes.hxx:83
@ UM_OFF
Definition: cgmtypes.hxx:105
#define ASF_TEXTFONTINDEX
Definition: cgmtypes.hxx:77
#define ASF_TEXTCOLOR
Definition: cgmtypes.hxx:81
#define ASF_LINETYPE
Definition: cgmtypes.hxx:63
@ LT_DASH
Definition: cgmtypes.hxx:108
@ LT_LONGDASH
Definition: cgmtypes.hxx:109
@ LT_DOTDOTSPACE
Definition: cgmtypes.hxx:109
@ LT_DASHDOT
Definition: cgmtypes.hxx:108
@ LT_DASHDASHDOT
Definition: cgmtypes.hxx:109
@ LT_SOLID
Definition: cgmtypes.hxx:108
@ LT_NONE
Definition: cgmtypes.hxx:109
@ LT_DOT
Definition: cgmtypes.hxx:108
#define ASF_FILLCOLOR
Definition: cgmtypes.hxx:73
bool IsEmpty() const
bool Mirror(BmpMirrorFlags nMirrorFlags)
BitmapEx mxBitmap
Definition: bitmap.hxx:33
FloatPoint mnOrigin
Definition: bitmap.hxx:40
double mnOrientation
Definition: bitmap.hxx:42
CGMImpressOutAct(CGM &, const css::uno::Reference< css::frame::XModel > &)
Definition: actimpr.cxx:60
void DrawRectangle(FloatRect const &)
Definition: actimpr.cxx:453
sal_uInt16 mnCurrentPage
Definition: outact.hxx:43
void ImplSetTextBundle(const css::uno::Reference< css::beans::XPropertySet > &)
Definition: actimpr.cxx:345
css::uno::Reference< css::drawing::XDrawPages > maXDrawPages
Definition: outact.hxx:58
void DrawText(css::awt::Point const &TextRectPos, css::awt::Size const &TextRectSize, const OUString &rString, FinalFlag)
Definition: actimpr.cxx:744
void ImplSetOrientation(FloatPoint const &RefPoint, double Orientation)
Definition: actimpr.cxx:132
bool ImplCreateShape(const OUString &rType)
Definition: actimpr.cxx:111
void ImplSetFillBundle()
Definition: actimpr.cxx:191
sal_uInt32 nFinalTextCount
Definition: outact.hxx:68
std::vector< css::uno::Reference< css::document::XActionLockable > > maLockedNewXShapes
Definition: outact.hxx:66
void BeginFigure()
Definition: actimpr.cxx:920
void DrawEllipse(FloatPoint const &center, FloatPoint const &, double &Orientation)
Definition: actimpr.cxx:486
void EndFigure()
Definition: actimpr.cxx:951
css::uno::Reference< css::drawing::XShape > maXShape
Definition: outact.hxx:62
sal_uInt32 mnGroupLevel
Definition: outact.hxx:46
std::vector< PolyFlags > maFlags
Definition: outact.hxx:50
void CloseRegion()
Definition: actimpr.cxx:930
void SetGradientDescriptor(sal_uInt32 nColorFrom, sal_uInt32 nColorTo)
Definition: actimpr.cxx:1000
void SetGradientAngle(tools::Long nAngle)
Definition: actimpr.cxx:993
std::vector< Point > maPoints
Definition: outact.hxx:51
bool ImplInitPage()
Definition: actimpr.cxx:97
css::uno::Reference< css::lang::XMultiServiceFactory > maXMultiServiceFactory
Definition: outact.hxx:61
void SetGradientOffset(tools::Long nHorzOfs, tools::Long nVertOfs)
Definition: actimpr.cxx:985
void DrawPolybezier(tools::Polygon &)
Definition: actimpr.cxx:668
void DrawPolygon(tools::Polygon &)
Definition: actimpr.cxx:608
css::uno::Reference< css::beans::XPropertySet > maXPropSet
Definition: outact.hxx:64
css::uno::Reference< css::drawing::XDrawPage > maXDrawPage
Definition: outact.hxx:59
css::uno::Reference< css::drawing::XShapes > maXShapes
Definition: outact.hxx:65
void RegPolyLine(tools::Polygon const &, bool bReverse=false)
Definition: actimpr.cxx:961
void DrawBitmap(CGMBitmapDescriptor *)
Definition: actimpr.cxx:574
std::array< sal_uInt32, CGM_OUTACT_MAX_GROUP_LEVEL > maGroupLevel
Definition: outact.hxx:48
void BeginGroup()
Definition: actimpr.cxx:403
sal_uInt32 mnGroupActCount
Definition: outact.hxx:45
tools::PolyPolygon maPolyPolygon
Definition: outact.hxx:52
void DrawPolyPolygon(tools::PolyPolygon const &)
Definition: actimpr.cxx:701
void SetGradientStyle(sal_uInt32 nStyle)
Definition: actimpr.cxx:1008
void EndGrouping()
Definition: actimpr.cxx:445
void DrawEllipticalArc(FloatPoint const &center, FloatPoint const &size, double &orientation, sal_uInt32 etype, double &startangle, double &endangle)
Definition: actimpr.cxx:511
void NewRegion()
Definition: actimpr.cxx:940
void AppendText(const char *String)
Definition: actimpr.cxx:883
void InsertPage()
Definition: actimpr.cxx:386
void DrawPolyLine(tools::Polygon &)
Definition: actimpr.cxx:638
void ImplSetLineBundle()
Definition: actimpr.cxx:140
std::unique_ptr< css::awt::Gradient > mpGradient
Definition: outact.hxx:54
Definition: cgm.hxx:39
sal_uInt32 mnActCount
Definition: cgm.hxx:79
void ImplMapX(double &)
Definition: cgm.cxx:455
void ImplMapPoint(FloatPoint &)
Definition: cgm.cxx:526
bool mbStatus
Definition: cgm.hxx:55
void ImplMapY(double &)
Definition: cgm.cxx:490
std::unique_ptr< CGMElements > pElement
Definition: cgm.hxx:69
sal_uInt32 mnAct4PostReset
Definition: cgm.hxx:63
constexpr tools::Long Y() const
constexpr tools::Long X() const
static css::uno::Reference< css::awt::XBitmap > CreateBitmap(const BitmapEx &rBitmap)
sal_uInt16 Count() const
void Insert(const tools::Polygon &rPoly, sal_uInt16 nPos=POLYPOLY_APPEND)
const tools::Polygon & GetObject(sal_uInt16 nPos) const
PolyFlags GetFlags(sal_uInt16 nPos) const
sal_uInt16 GetSize() const
const Point & GetPoint(sal_uInt16 nPos) const
static bool IsFuzzing()
T NormAngle360(T angle)
BmpMirrorFlags
sal_Int64 n
uno_Any a
#define SAL_WARN(area, stream)
aStr
constexpr double rad2deg(double v)
Shape IDs per cluster in DGG atom.
Reference< XComponentContext > getProcessComponentContext()
int i
Definition: gentoken.py:48
constexpr T saturating_add(T a, T b)
long Long
#define CGM_OUTACT_MAX_GROUP_LEVEL
Definition: outact.hxx:31
#define Y
QPRO_FUNC_TYPE nType
LineType
double Y
Definition: cgmtypes.hxx:27
double X
Definition: cgmtypes.hxx:26
double Left
Definition: cgmtypes.hxx:33
double Right
Definition: cgmtypes.hxx:35
double Bottom
Definition: cgmtypes.hxx:36
double Top
Definition: cgmtypes.hxx:34
std::vector< sal_Int8 > aFontName
Definition: bundles.hxx:142
sal_uInt32 nFontType
Definition: bundles.hxx:144
tools::Long HatchAngle
Definition: cgmtypes.hxx:60
int HatchStyle
Definition: cgmtypes.hxx:58
tools::Long HatchDistance
Definition: cgmtypes.hxx:59