LibreOffice Module filter (master) 1
eschesdo.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#pragma once
21#include <o3tl/any.hxx>
22
23
24// fractions of Draw PPTWriter etc.
25
26class ImplEESdrWriter;
27class SdrObject;
28class SdrPage;
29
31{
32 css::uno::Reference< css::drawing::XShape > mXShape;
33 css::uno::Any mAny;
35 OUString mType;
36 sal_uInt32 mnShapeId;
37 sal_uInt32 mnTextSize;
38 sal_Int32 mnAngle;
39 bool mbValid : 1;
40 bool mbPresObj : 1;
42 bool mbOOXML;
43
44 void Init();
45public:
46 css::uno::Reference< css::beans::XPropertySet > mXPropSet;
47
48 ImplEESdrObject(ImplEESdrWriter& rEx, const SdrObject& rObj, bool bOOXML, sal_uInt32 nId = 0);
49 ImplEESdrObject( const css::uno::Reference< css::drawing::XShape >& rShape );
51
52 bool ImplGetPropertyValue( const OUString& rString );
53
54 sal_Int32 ImplGetInt32PropertyValue( const OUString& rStr )
55 { return ImplGetPropertyValue( rStr ) ? *o3tl::doAccess<sal_Int32>(mAny) : 0; }
56
57 const css::uno::Reference< css::drawing::XShape >& GetShapeRef() const { return mXShape; }
58 const css::uno::Any& GetUsrAny() const { return mAny; }
59 const OUString& GetType() const { return mType; }
60 void SetType( const OUString& rS ) { mType = rS; }
61
62 const tools::Rectangle& GetRect() const { return maRect; }
63 void SetRect( const Point& rPos, const Size& rSz );
64 void SetRect( const tools::Rectangle& rRect )
65 { maRect = rRect; }
66
67 sal_Int32 GetAngle() const { return mnAngle; }
68 void SetAngle( sal_Int32 nVal ) { mnAngle = nVal; }
69
70 bool IsValid() const { return mbValid; }
71
72 bool IsEmptyPresObj() const { return mbEmptyPresObj; }
73 sal_uInt32 GetShapeId() const { return mnShapeId; }
74 void SetShapeId( sal_uInt32 nVal ) { mnShapeId = nVal; }
75
76 const SdrObject* GetSdrObject() const;
77
78 sal_uInt32 ImplGetText();
79 bool ImplHasText() const;
80 bool GetOOXML() const { return mbOOXML;}
81 void SetOOXML(bool bOOXML);
82};
83
84
85// fractions of the Draw PPTWriter
86
87class EscherEx;
88namespace com::sun::star {
89 namespace drawing {
90 class XDrawPage;
91 class XShape;
92 }
93 namespace task {
94 class XStatusIndicator;
95 }
96}
98
100{
102 css::uno::Reference< css::drawing::XDrawPage > mXDrawPage;
103 css::uno::Reference< css::drawing::XShapes > mXShapes;
105 // own extensions
109 std::unique_ptr<EscherSolverContainer> mpSolverContainer;
110
111 void ImplInitPageValues();
112 void ImplWritePage( EscherSolverContainer& rSolver, bool ooxmlExport );
113 sal_uInt32 ImplWriteShape( ImplEESdrObject& rObj,
114 EscherSolverContainer& rSolver,
115 const bool bOOxmlExport = false ); // returns ShapeID
116 static void ImplFlipBoundingBox( ImplEESdrObject& rObj, EscherPropertyContainer& rPropOpt );
118 ImplEESdrObject& rObj );
120 const css::uno::Reference< css::drawing::XShape >& rShape,
121 const tools::Rectangle* pBoundRect );
123
124public:
125 explicit ImplEESdrWriter( EscherEx& rEx );
127 static Point ImplMapPoint( const Point& rPoint );
128 static Size ImplMapSize( const Size& rSize );
130 bool ImplInitPage( const SdrPage& rPage );
131 bool ImplInitUnoShapes( const css::uno::Reference< css::drawing::XShapes >& rxShapes );
132 void ImplWriteCurrentPage( bool ooxmlExport );
133 sal_uInt32 ImplWriteTheShape( ImplEESdrObject& rObj, bool ooxmlExport );
134 void ImplExitPage();
135};
136
137
138/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void SetAngle(sal_Int32 nVal)
Definition: eschesdo.hxx:68
sal_Int32 mnAngle
Definition: eschesdo.hxx:38
css::uno::Any mAny
Definition: eschesdo.hxx:33
css::uno::Reference< css::beans::XPropertySet > mXPropSet
Definition: eschesdo.hxx:46
void SetShapeId(sal_uInt32 nVal)
Definition: eschesdo.hxx:74
sal_Int32 GetAngle() const
Definition: eschesdo.hxx:67
const css::uno::Reference< css::drawing::XShape > & GetShapeRef() const
Definition: eschesdo.hxx:57
bool GetOOXML() const
Definition: eschesdo.hxx:80
void SetOOXML(bool bOOXML)
Definition: eschesdo.cxx:1237
void SetType(const OUString &rS)
Definition: eschesdo.hxx:60
bool ImplHasText() const
Definition: eschesdo.cxx:1230
ImplEESdrObject(const css::uno::Reference< css::drawing::XShape > &rShape)
void SetRect(const Point &rPos, const Size &rSz)
Definition: eschesdo.cxx:1201
const SdrObject * GetSdrObject() const
Definition: eschesdo.cxx:1206
bool mbEmptyPresObj
Definition: eschesdo.hxx:41
void SetRect(const tools::Rectangle &rRect)
Definition: eschesdo.hxx:64
bool IsEmptyPresObj() const
Definition: eschesdo.hxx:72
OUString mType
Definition: eschesdo.hxx:35
ImplEESdrObject(ImplEESdrWriter &rEx, const SdrObject &rObj, bool bOOXML, sal_uInt32 nId=0)
Definition: eschesdo.cxx:1001
sal_uInt32 ImplGetText()
Definition: eschesdo.cxx:1212
bool IsValid() const
Definition: eschesdo.hxx:70
sal_Int32 ImplGetInt32PropertyValue(const OUString &rStr)
Definition: eschesdo.hxx:54
bool ImplGetPropertyValue(const OUString &rString)
Definition: eschesdo.cxx:1182
sal_uInt32 GetShapeId() const
Definition: eschesdo.hxx:73
const OUString & GetType() const
Definition: eschesdo.hxx:59
const tools::Rectangle & GetRect() const
Definition: eschesdo.hxx:62
sal_uInt32 mnShapeId
Definition: eschesdo.hxx:36
css::uno::Reference< css::drawing::XShape > mXShape
Definition: eschesdo.hxx:32
tools::Rectangle maRect
Definition: eschesdo.hxx:34
sal_uInt32 mnTextSize
Definition: eschesdo.hxx:37
const css::uno::Any & GetUsrAny() const
Definition: eschesdo.hxx:58
bool ImplInitUnoShapes(const css::uno::Reference< css::drawing::XShapes > &rxShapes)
Definition: eschesdo.cxx:890
EscherExHostAppData * ImplGetHostData()
Definition: eschesdo.hxx:129
static void ImplFlipBoundingBox(ImplEESdrObject &rObj, EscherPropertyContainer &rPropOpt)
Definition: eschesdo.cxx:79
EscherEx * mpEscherEx
Definition: eschesdo.hxx:101
static Point ImplMapPoint(const Point &rPoint)
Definition: eschesdo.cxx:63
static Size ImplMapSize(const Size &rSize)
Definition: eschesdo.cxx:68
std::unique_ptr< EscherSolverContainer > mpSolverContainer
Definition: eschesdo.hxx:109
css::uno::Reference< css::drawing::XDrawPage > mXDrawPage
Definition: eschesdo.hxx:102
EscherExHostAppData * mpHostAppData
Definition: eschesdo.hxx:106
ImplEESdrWriter(EscherEx &rEx)
Definition: eschesdo.cxx:52
void ImplExitPage()
Definition: eschesdo.cxx:908
bool ImplInitPage(const SdrPage &rPage)
Definition: eschesdo.cxx:863
SvStream * mpPicStrm
Definition: eschesdo.hxx:104
const SdrPage * mpSdrPage
Definition: eschesdo.hxx:108
void ImplWriteCurrentPage(bool ooxmlExport)
Definition: eschesdo.cxx:928
void ImplFlushSolverContainer()
Definition: eschesdo.cxx:919
void ImplWritePage(EscherSolverContainer &rSolver, bool ooxmlExport)
Definition: eschesdo.cxx:837
sal_uInt32 ImplWriteShape(ImplEESdrObject &rObj, EscherSolverContainer &rSolver, const bool bOOxmlExport=false)
Definition: eschesdo.cxx:128
void ImplInitPageValues()
Definition: eschesdo.cxx:832
void ImplWriteAdditionalText(ImplEESdrObject &rObj)
Definition: eschesdo.cxx:721
bool mbIsTitlePossible
Definition: eschesdo.hxx:107
sal_uInt32 ImplEnterAdditionalTextGroup(const css::uno::Reference< css::drawing::XShape > &rShape, const tools::Rectangle *pBoundRect)
Definition: eschesdo.cxx:822
sal_uInt32 ImplWriteTheShape(ImplEESdrObject &rObj, bool ooxmlExport)
Definition: eschesdo.cxx:935
css::uno::Reference< css::drawing::XShapes > mXShapes
Definition: eschesdo.hxx:103
Shape IDs per cluster in DGG atom.