LibreOffice Module filter (master) 1
outact.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#pragma once
21
22#include <com/sun/star/awt/Gradient.hpp>
23#include <com/sun/star/document/XActionLockable.hpp>
24#include <com/sun/star/drawing/XDrawPages.hpp>
25#include <com/sun/star/drawing/XDrawPage.hpp>
26#include <com/sun/star/drawing/XShape.hpp>
27#include <com/sun/star/lang/XMultiServiceFactory.hpp>
28#include <com/sun/star/beans/XPropertySet.hpp>
29
30
31#define CGM_OUTACT_MAX_GROUP_LEVEL 64
32
33#include "cgm.hxx"
34#include <tools/poly.hxx>
35#include <array>
36#include <memory>
37
38class CGM;
40
42{
43 sal_uInt16 mnCurrentPage; // defaulted to zero
44
45 sal_uInt32 mnGroupActCount; // grouping
46 sal_uInt32 mnGroupLevel;
47 std::array<sal_uInt32, CGM_OUTACT_MAX_GROUP_LEVEL>
49
50 std::vector<PolyFlags> maFlags;
51 std::vector<Point> maPoints;
53 std::unique_ptr<css::awt::Gradient>
55
57
58 css::uno::Reference< css::drawing::XDrawPages > maXDrawPages;
59 css::uno::Reference< css::drawing::XDrawPage > maXDrawPage;
60
61 css::uno::Reference< css::lang::XMultiServiceFactory > maXMultiServiceFactory;
62 css::uno::Reference< css::drawing::XShape > maXShape;
63
64 css::uno::Reference< css::beans::XPropertySet > maXPropSet;
65 css::uno::Reference< css::drawing::XShapes > maXShapes;
66 std::vector<css::uno::Reference<css::document::XActionLockable>> maLockedNewXShapes;
67
68 sal_uInt32 nFinalTextCount;
69
70 bool ImplCreateShape( const OUString& rType );
71 bool ImplInitPage();
72 void ImplSetOrientation( FloatPoint const & RefPoint, double Orientation );
73 void ImplSetLineBundle();
74 void ImplSetFillBundle();
75 void ImplSetTextBundle( const css::uno::Reference< css::beans::XPropertySet > & );
76public:
77 CGMImpressOutAct( CGM&, const css::uno::Reference< css::frame::XModel > & );
79 void InsertPage();
80 void BeginGroup();
81 void EndGroup();
82 void EndGrouping();
83 void DrawRectangle( FloatRect const & );
84 void DrawEllipse( FloatPoint const & center, FloatPoint const &, double& Orientation );
85 void DrawEllipticalArc( FloatPoint const & center, FloatPoint const & size, double& orientation,
86 sal_uInt32 etype, double& startangle, double& endangle );
91 void DrawPolyPolygon( tools::PolyPolygon const & );
92 void DrawText(css::awt::Point const & TextRectPos, css::awt::Size const & TextRectSize, const OUString& rString, FinalFlag);
93 void AppendText( const char* String );
94
95 void FirstOutPut() { mpCGM->mbFirstOutPut = false; } ;
96 void BeginFigure();
97 void CloseRegion();
98 void NewRegion();
99 void EndFigure();
100 void RegPolyLine( tools::Polygon const &, bool bReverse = false );
101 void SetGradientOffset( tools::Long nHorzOfs, tools::Long nVertOfs );
102 void SetGradientAngle( tools::Long nAngle );
103 void SetGradientDescriptor( sal_uInt32 nColorFrom, sal_uInt32 nColorTo );
104 void SetGradientStyle( sal_uInt32 nStyle );
105};
106
107
108/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
FinalFlag
Definition: cgmtypes.hxx:106
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 FirstOutPut()
Definition: outact.hxx:95
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
bool mbFirstOutPut
Definition: cgm.hxx:61
orientation
long Long
Orientation