1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: modeldata.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _SCH_MODELDATA_HXX
31 #define _SCH_MODELDATA_HXX
33 #include "chtmodel.hxx"
36 /** This class contains all members of the ChartModel, that can be stored for
37 later for a complete undo. Some members were omitted, that cannot be copied
38 or must not be applied later.
40 The original ChartModel from which is copied must stay alive until ApplyTo()
41 is called, because the SfxItemSets use its pool.
46 SchModelData( const ChartModel
& );
48 /// sets the stored ChartModel members at the given ChartModel
49 void ApplyTo( ChartModel
& );
52 ChartBarDescriptor aBarY1
;
53 ChartBarDescriptor aBarY2
;
55 DescrList aXDescrList
;
56 DescrList aYDescrList
;
57 DescrList aZDescrList
;
60 // BOOL bNewOrLoadCompleted;
61 // SfxObjectShell* pDocShell;
62 // BOOL bAttrAutoStorage;
64 // SchMemChart* pChartDataBuffered; // save data in buffer while editing chart #61907#
66 // OutputDevice* pChartRefOutDev;
69 // Window* pAutoPilot; // #46895#
71 // SdrObjList* pSdrObjList;
72 // Matrix4D aSceneMatrix;
76 // SvNumberFormatter* pOwnNumFormatter;
77 // SvNumberFormatter* pNumFormatter; // points either to pOwnNumFormatter or calc's number formatter
79 ::com::sun::star::uno::Reference
< ::com::sun::star::util::XRefreshable
> mxChartAddIn
;
81 long nBarPercentWidth
; // #50116#
82 long nNumLinesInColChart
;
83 long m_nDefaultColorSet
; // #50037#
85 // SchDataLogBook* pLogBook;
89 // SchItemPool* pChItemPool;
90 // ChartScene* pScene;
92 // Vector3D* aLightVec;
94 ::std::auto_ptr
< SchMemChart
> m_apChartData
;
98 double fAmbientIntensity
;
100 double fSpotIntensity
;
102 SvxChartStyle eChartStyle
;
103 SvxChartStyle eOldChartStyle
;
104 // int eChartLinePoints[ LINE_POINT_COUNT ];
106 // List* pDefaultColors;
112 SvxChartKindError eErrorKind
;
113 SvxChartIndicate eIndicate
;
114 SvxChartRegress eRegression
;
115 double fIndicatePercent
;
116 double fIndicateBigError
;
117 double fIndicatePlus
;
118 double fIndicateMinus
;
122 /** This member is a temporary storage. I don't understand the comment, so
123 I can't translate it into english, so I leave it in german, maybe an important hint someday:
125 FG: Reiner Zwischenspeicher, wird in chtmod3d.cxx gesetzt und im selben
126 File in Position3DAxisTitles im selben File abgefragt, weil die
127 ChartScene::FitInSnapRect das nicht als Parameter bekommen kann, da
128 diese von der Polyscene gerufen wird. */
129 BOOL bSwitch3DColRow
;
143 BOOL bShowXAxisTitle
;
144 BOOL bShowYAxisTitle
;
145 BOOL bShowZAxisTitle
;
160 BOOL bShowDataDescr
; // show description for all series (esp. important for auto pilot)
162 ::std::auto_ptr
< SfxItemSet
> m_apTitleAttr
;
163 ::std::auto_ptr
< SfxItemSet
> m_apMainTitleAttr
;
164 ::std::auto_ptr
< SfxItemSet
> m_apSubTitleAttr
;
165 ::std::auto_ptr
< SfxItemSet
> m_apXAxisTitleAttr
;
166 ::std::auto_ptr
< SfxItemSet
> m_apYAxisTitleAttr
;
167 ::std::auto_ptr
< SfxItemSet
> m_apZAxisTitleAttr
;
168 ::std::auto_ptr
< SfxItemSet
> m_apAxisAttr
;
170 // ChartAxis* pChartXAxis;
171 // ChartAxis* pChartYAxis;
172 // ChartAxis* pChartZAxis;
173 // ChartAxis* pChartAAxis; // secondary x axis
174 // ChartAxis* pChartBAxis; // secondary y axis
176 ::std::auto_ptr
< SfxItemSet
> m_apGridAttr
;
177 ::std::auto_ptr
< SfxItemSet
> m_apXGridMainAttr
;
178 ::std::auto_ptr
< SfxItemSet
> m_apYGridMainAttr
;
179 ::std::auto_ptr
< SfxItemSet
> m_apZGridMainAttr
;
180 ::std::auto_ptr
< SfxItemSet
> m_apXGridHelpAttr
;
181 ::std::auto_ptr
< SfxItemSet
> m_apYGridHelpAttr
;
182 ::std::auto_ptr
< SfxItemSet
> m_apZGridHelpAttr
;
183 ::std::auto_ptr
< SfxItemSet
> m_apDiagramAreaAttr
;
184 ::std::auto_ptr
< SfxItemSet
> m_apDiagramWallAttr
;
185 ::std::auto_ptr
< SfxItemSet
> m_apDiagramFloorAttr
;
186 ::std::auto_ptr
< SfxItemSet
> m_apLegendAttr
;
187 ::std::auto_ptr
< SfxItemSet
> m_apDummyAttr
;
189 ::std::auto_ptr
< SfxItemSet
> m_apStockLineAttr
;
190 ::std::auto_ptr
< SfxItemSet
> m_apStockLossAttr
;
191 ::std::auto_ptr
< SfxItemSet
> m_apStockPlusAttr
;
193 // SfxItemSet* pTmpXItems;
194 // SfxItemSet* pTmpYItems;
195 // SfxItemSet* pTmpZItems;
197 ::std::auto_ptr
< SfxItemSet
> m_apChartAttr
;
199 ItemSetList aDataRowAttrList
;
200 ItemSetList aDataPointAttrList
;
201 ItemSetList aSwitchDataPointAttrList
;
202 ItemSetList aRegressAttrList
;
203 ItemSetList aAverageAttrList
;
204 ItemSetList aErrorAttrList
;
206 // this is for 'old 3d storage' (whatever that is ;-)
207 // ItemSetList aTmpDataRowAttrList;
208 // ItemSetList aTmpDataPointAttrList;
209 // ItemSetList aTmpSwitchDataPointAttrList;
212 SvxChartDataDescr eDataDescr
;
216 BOOL bNoBuildChart
; // BuildChart does nothing if this is true
217 BOOL bShouldBuildChart
; // This is set when BuildChart was called and bNoBuildChart was TRUE
219 BOOL mbIsInitialized
;
221 // SdrOutliner* pOutliner;
223 /// short: textbreak enabled
224 BOOL bFormatXAxisTextInMultipleLinesIfNecessary
;
225 BOOL bFormatYAxisTextInMultipleLinesIfNecessary
;
226 BOOL bFormatZAxisTextInMultipleLinesIfNecessary
;
227 BOOL bFormatLegendTextInMultipleLinesIfNecessary
;
229 /// maximum number of lines for textbreak
230 int nXAxisTextMaximumNumberOfLines
;
231 int nYAxisTextMaximumNumberOfLines
;
232 int nZAxisTextMaximumNumberOfLines
;
234 long nWidthOfFirstXAxisText
;
235 long nWidthOfLastXAxisText
;
237 // positions of chart objects
238 Point aTitleTopCenter
;
239 Point aSubTitleTopCenter
;
240 Rectangle aDiagramRectangle
;
241 Rectangle aLastDiagramRectangle
; // ?
242 Point aLegendTopLeft
;
244 Point aTitleXAxisPosition
;
245 Point aTitleYAxisPosition
;
246 Point aTitleZAxisPosition
;
248 ChartAdjust eAdjustXAxesTitle
;
249 ChartAdjust eAdjustYAxesTitle
;
250 ChartAdjust eAdjustZAxesTitle
;
252 // FG: Falls dieser gesetzt ist so wird bei einem Resize (eigentlich bei jedem Buildchart)
253 // die relative Position der Gruppenobjekte zur Seite beachtet.
254 // Je nach Objekt bleibt die linke obere Ecke oder das Zentrum an der gleichen Stelle.
256 /** On resize objects remember their position relatively to the page if
257 this member is TRUE. For some objects the upper left corner is
258 preserved for others the center position */
259 BOOL bUseRelativePositionsForChartGroups
;
261 /// on manual move of chart objects the calculation of space left has to be changed
262 BOOL bAdjustMarginsForLegend
;
263 BOOL bAdjustMarginsForMainTitle
;
264 BOOL bAdjustMarginsForSubTitle
;
265 BOOL bAdjustMarginsForXAxisTitle
;
266 BOOL bAdjustMarginsForYAxisTitle
;
267 BOOL bAdjustMarginsForZAxisTitle
;
269 /// keep track if objects have manually been repositioned
270 BOOL bDiagramHasBeenMovedOrResized
;
271 BOOL bMainTitleHasBeenMoved
;
272 BOOL bSubTitleHasBeenMoved
;
273 BOOL bLegendHasBeenMoved
;
274 BOOL bXAxisTitleHasBeenMoved
;
275 BOOL bYAxisTitleHasBeenMoved
;
276 BOOL bZAxisTitleHasBeenMoved
;
278 Size aInitialSizefor3d
;
280 /** test object for calculating the height of two rows
281 @see GetHeightOfnRows */
282 // SdrRectObj* pTestTextObj;
288 /// document languages
289 LanguageType eLanguage
;
290 LanguageType eLanguageCJK
;
291 LanguageType eLanguageCTL
;
293 ProjectionType eProjection
;
295 /// for late loading of graphics
296 // mutable SotStorage* mpDocStor;
297 // mutable SotStorageRef mxPictureStorage;
298 // mutable SotStorageStreamRef mxDocStream;
301 // _SCH_MODELDATA_HXX
302 } //namespace binfilter