9 #ifndef MsiChart_FormatManager_h 10 #define MsiChart_FormatManager_h 20 #include "../Common.h" 69 static const int MaxWebMajorGraphTypes = 25;
71 static const int GraphTypeMappingTable[MaxWebMajorGraphTypes][2] =
155 class BaseFormatting;
156 struct ChartAdvFormat;
171 FormatManager(ICDSSTemplate* ipTemplate, ICDSSRWIterator* ipIterator);
183 FormatInfo::Ptr GetFormat(
void* ipGridCell,
bool iIsPassToGridCell =
false);
190 void SetUseGraphProperties(
bool iIsUseGraphProperties);
196 Int32 GetRowHeight();
217 void GetCurrentIndex(
Int32& orRowIndex,
Int32& orColIndex);
232 Int32 MapNameToUnitIndex(std::string iName,
bool iIsInRow);
245 Int32 GetGraphSubType();
246 Int32 GetMaxColumns();
250 Int32 GetSeriesCount();
251 bool GetSeriesByColumn();
252 bool GetSubTotalsEnabled();
266 bool MaptoCustomGroupElementAndCellType(
FORMAT_CATEGORY& orCellType, std::vector<DSSBaseElementProxy*>& orElementVector);
269 bool GetChartAdvFormatForOneCell(
Int32 iDataCellRowIndex,
Int32 iDataCellColIndex,
ChartAdvFormat& orChartAdvFormat,
bool iConsiderThresholds);
272 bool IsNumberFormatExclusive();
275 bool SubtotalIsCount();
278 void SetGraphType(
short iGraphType);
281 Int32 DistanceToDataOrigion(
bool iIsAlongRow);
284 bool GetGUIDForCellLevelData(
GUID& iorGUID,
const void* ipRawData);
287 void* GetCurrentGridCell();
288 void SetCurrentGridCell(
void* ipCurrentGridCell);
289 const void* GetCurrentCellData();
292 bool HasBanding()
const;
300 bool CoordinateConvertion(
int iRow,
int iCol,
int& oAxis,
int& oDepth,
int& oOrdinal,
FORMAT_CATEGORY& oCellType);
301 bool GetCoordinateIntoDataArea(
int& iorIndex,
bool iIsForRow);
304 Int32 GetDssFormatCount();
314 Int32 GetMemoryUsageEstimation();
317 bool IsShowRowHeader();
318 void SetShowRowHeader(
bool iShowRowHeader);
320 bool IsShowColHeader();
321 void SetShowColHeader(
bool iShowColHeader);
323 bool IsColHeaderEmpty();
324 bool IsRowHeaderEmpty();
325 bool HasDerivedElementOnRow();
326 bool HasDerivedElementOnCol();
327 bool HasExtraColumn();
328 bool HasCustomGroup();
330 bool HasConsolidationOnRow();
331 bool HasConsolidationOnColumn();
332 bool HasCellLevelFormat();
333 void GetRegularDrillableUnit(std::set<std::pair<Int32, Int32> > &orRegularDrillableUnits);
334 void GetLinkedDrillableUnit(std::set<std::pair<Int32, Int32> > &orLinkedDrillableUnits);
335 Int32 GetAbsColDataGridOrigin();
336 Int32 GetAbsRowDataGridOrigin();
337 void GetRowIndexToUnitIndex(std::map<Int32, Int32> &orRowIndexToUnitIndex);
338 void GetUnitIndexToRowStartOrdinal(std::map<Int32, Int32> &orUnitIndexToRowStartOrdinal);
339 Int32 GetColHeaderStartIndex();
340 Int32 GetColSubtotalMatrixSize();
341 Int32 GetRowSubtotalMatrixSize();
345 void GetLinkedDrillableUnitSet();
346 void GetRegularDrillableUnitSet();
353 Int32 hBuildBandingBuckets(
Int32 iUnitElementIndex,
bool iIsInRow);
355 Int32 hMapUnitIndexToOrdianlOnAxis(
Int32 iUnitIndex,
bool iIsInRow);
360 bool hIsInEmptyZone(
Int32 iRowIndex,
Int32 iColIndex);
361 void hGetSubtotalMatrix(
bool iIsForRow,
SubTotalMap& orSubtotalMatrix);
367 void hGetIndexMap(
bool iIsForRow);
369 void hCheckLayerSignals(
bool iIsForRow);
388 bool hGetConsolidationElementFromRow(
Int32 iRowIndex,
Int32 iColIndex, std::vector<DSSConsolidationElement*>& orElement,
FORMAT_CATEGORY& orCellType);
389 bool hGetConsolidationElementFromColumn(
Int32 iRowIndex,
Int32 iColIndex, std::vector<DSSConsolidationElement*>& orElement,
FORMAT_CATEGORY& orCellType);
390 bool hGetConsolidationElementFromDataArea(
Int32 iRowIndex,
Int32 iColIndex, std::vector<DSSConsolidationElement*>& orElement,
FORMAT_CATEGORY& orCellType);
394 bool hSetExtraCloumnFlag();
396 void hSetDataGridOrigin();
402 void hDumpTotalNumberFormat();
406 void hInit(ICDSSTemplate* ipTemplate, ICDSSRWIterator* ipIterator);
414 void hMapByProperty(
Int32& iSeriesId,
Int32& iObjectId,
Int32& iPropertyId);
415 void hConvertFromRGBtoBGR(
Int32& inVal);
421 Int32 hGetAxisAutoFitProperty(
Int32 inObjectId);
422 Int32 hGetAxisVisibilityProperty(
Int32 inObjectId);
424 Int32 hGetAxisScaleProperty(
Int32 inObjectId);
426 Int32 hGetAxisGridLineProperty(
Int32 inObjectId);
427 Int32 hGetAxisGridLineProperty2(
Int32 inObjectId);
428 Int32 hGetAxisScaleEndProperty(
Int32 inObjectId);
429 Int32 hGetAxisAdvFormatTextProperty(
Int32 inObjectId);
430 Int32 hGetAxisDirectionProperty(
Int32 inObjectId);
432 Int32 hGetAxisOffScaleProperty(
Int32 inObjectId);
433 Int32 hGetAxisLabelLocationProperty(
Int32 inObjectId);
434 Int32 hGetAxisStaggerProperty(
Int32 inObjectId);
435 Int32 hGetAxisScaleFreqProperty(
Int32 inObjectId);
437 void hMapWebGraphTypeToAgent(
Int32 iMajorType,
Int32 iMinorType,
Int32 &oType);
443 ICDSSTemplate* mpTemplate;
444 ICDSSRWIterator* mpIterator;
445 ICDSSGraphStyle* mpGraphStyle;
452 bool mHasExtraColumn;
454 bool mIsRowHeaderEmpty;
455 bool mIsColHeaderEmpty;
457 bool mIsShowRowHeader;
458 bool mIsShowColHeader;
459 bool mIsLayersInited;
460 bool mIsNumberformatExclusive;
461 bool mParseThresholds;
462 bool mAbsoluteCoordinates;
465 bool mHasCustomGroup;
466 bool mHasConsolidationOnRow;
467 bool mHasConsolidationOnColumn;
468 bool mHasDerivedElementOnRow;
469 bool mHasDerivedElementOnCol;
471 bool mHasCellLevelFormat;
472 void* mpCurrentGridCell;
473 const void* mpCurrentCellData;
475 Int32 mRowHeaderStartIndex;
476 Int32 mColHeaderStartIndex;
478 Int32 mRowHeaderWidth;
479 Int32 mColHeaderHeight;
481 Int32 mCurrentRowIndex;
482 Int32 mCurrentColIndex;
484 Int32 mRowDataGridOrigin;
485 Int32 mColDataGridOrigin;
487 Int32 mAbsRowDataGridOrigin;
488 Int32 mAbsColDataGridOrigin;
490 Int32 mDssFormatTotal;
492 std::map<Int32, Int32> mRowIndexToUnitIndex;
493 std::map<Int32, Int32> mColIndexToUnitIndex;
495 std::map<Int32, Int32> mRowIndexToRowDepthIndex;
496 std::map<Int32, Int32> mColIndexToColDepthIndex;
498 std::map<Int32, GUID> mRowUnitIndexToID;
499 std::map<Int32, GUID> mColUnitIndexToID;
501 std::map<Int32, Int32> mUnitIndexToRowStartOrdinal;
502 std::map<Int32, Int32> mUnitIndexToColStartOrdinal;
504 std::map<Int32, GUID> mOrdinalToMetricID;
506 std::map<GUID, DSSTemplateUnit*> mIDToUnit;
511 std::vector<Int32> mBandingBuckets;
513 Int32 mUniformElementsSpan;
518 std::map<Int32, EnumDSSMetricType> mRowOrdianlToSubtotalType;
519 std::map<Int32, EnumDSSMetricType> mColOrdianlToSubtotalType;
521 std::set<Int32> mDrillableColumns;
523 std::vector<BaseFormatting*> mFormattingLayers;
525 GUID mAssociatedGUID;
528 std::map<std::string, int> mAxisInfoMap[2];
543 bool mIsUseGraphProperties;
547 std::vector<std::pair<DSSBaseElementProxy*, Int32> > mAssociatedCGElementSetOnCol;
548 std::vector<std::pair<DSSBaseElementProxy*, Int32> > mAssociatedCGElementSetOnRow;
549 std::vector<std::pair<DSSConsolidationElement*, Int32> > mAssociatedConsolElementSetOnRow;
550 std::vector<std::pair<DSSConsolidationElement*, Int32> > mAssociatedConsolElementSetOnCol;
552 std::set<std::pair<Int32, Int32> > mRegularDrillableUnits;
553 std::set<std::pair<Int32, Int32> > mLinkedDrillableUnits;
554 bool mIsLinkedDrillableUnitSetReady;
555 bool mIsRegularDrillableUnitSetReady;
559 bool GetConsolidationStatus(
bool iIsOnRow);
562 std::vector<std::pair<DSSConsolidationElement*, Int32> >* GetAssociateConsolidationElementSet(
bool iIsForRow);
563 std::vector<std::pair<DSSBaseElementProxy*, Int32> >* GetAssociateCustomGroupElementSet(
bool iIsForRow);
570 mGraphType = iGraphType;
577 return mpCurrentCellData;
583 return mpCurrentGridCell;
587 mpCurrentGridCell = ipCurrentGridCell;
617 mpDataset = ipDatasetPtr;
623 orRowIndex = mCurrentRowIndex;
624 orColIndex = mCurrentColIndex;
639 return mDssFormatTotal;
670 return mIsShowRowHeader;
674 mIsShowRowHeader = iShowRowHeader;
678 return mIsShowColHeader;
682 mIsShowColHeader = iShowColHeader;
686 return mIsColHeaderEmpty;
690 return mIsRowHeaderEmpty;
694 return mHasExtraColumn;
698 orRegularDrillableUnits = mRegularDrillableUnits;
702 orLinkedDrillableUnits = mLinkedDrillableUnits;
706 return mAbsColDataGridOrigin;
710 return mAbsRowDataGridOrigin;
718 orRowIndexToUnitIndex = mRowIndexToUnitIndex;
722 orUnitIndexToRowStartOrdinal = mUnitIndexToRowStartOrdinal;
726 return mColHeaderStartIndex;
731 return (
Int32)mColSubtotalMatrix.size();
735 return (
Int32)mRowSubtotalMatrix.size();
739 return mHasDerivedElementOnRow;
743 return mHasDerivedElementOnCol;
747 return mHasCustomGroup;
751 return mHasConsolidationOnRow;
755 return mHasConsolidationOnColumn;
759 return mHasCellLevelFormat;
764 if (ipFormattingLayer !=
NULL) {
765 mFormattingLayers.push_back(ipFormattingLayer);
Definition: FormatManager.h:52
Definition: DSSIPhoneEnums.h:2490
Definition: DSSIPhoneEnums.h:2530
Definition: FormatManager.h:66
FORMAT_LAYER_INDEX
Definition: FormatManagerHelper.h:28
bool mIsValid
Definition: DatasetHelper.h:480
Definition: DSSGraphProperties.h:20
Int32 mObjectId
Definition: FormatManager.h:104
bool operator==(GraphPropertyKey &lRight)
Definition: FormatManager.h:117
Definition: FormatManager.h:65
Definition: FormatManager.h:56
Definition: DSSIPhoneEnums.h:2543
Definition: DSSBaseElementProxy.h:16
Definition: DSSIPhoneEnums.h:2494
Definition: FormatManager.h:55
Definition: FormatManager.h:53
Definition: DSSIPhoneEnums.h:2513
Definition: FormatManager.h:39
Definition: DSSIPhoneEnums.h:2434
GraphPropertyKey(Int32 iPropertyId, Int32 iObjectId, Int32 iSeriesId, Int32 iGroupId)
Definition: FormatManager.h:108
Definition: Base/Base/GUID.h:365
Definition: FormatManager.h:134
Definition: DSSIPhoneEnums.h:2488
Definition: DSSTemplateUnit.h:19
#define CHARTENGINE_API
Definition: Dataset.h:22
Definition: DSSRWGridIterator.h:68
CHARTENGINE_API FormatManager::Ptr CreateFormatManager(DSSRWGridIterator *ipIterator)
Definition: DatasetHelper.h:573
Definition: DSSTemplate.h:29
Definition: Dataset.h:198
GraphPropertyKey(Int32 iPropertyId, TripleId &iTripleId)
Definition: FormatManager.h:112
Definition: FormatManager.h:41
Definition: DSSIPhoneEnums.h:2522
EnumFormatRenderType
Definition: FormatManager.h:62
Definition: DSSIPhoneEnums.h:2496
Definition: DSSIPhoneEnums.h:2511
#define Int32
Definition: BasicTypes.h:20
Definition: FormatManager.h:47
Definition: DSSIPhoneEnums.h:2507
Definition: FormatManager.h:45
Definition: FormatManager.h:42
Definition: FormatManager.h:101
Definition: FormatManager.h:64
Definition: FormatManager.h:44
Int32 mSeriesId
Definition: FormatManager.h:105
Definition: DSSIPhoneEnums.h:2455
Definition: FormatManager.h:43
Definition: DSSIPhoneEnums.h:2516
Definition: FormatManagerHelper.h:31
Int32 mPropertyId
Definition: FormatManager.h:103
Definition: FormatManager.h:63
std::basic_string< WCHAR, std::char_traits< WCHAR >, Allocator< WCHAR > > String
Definition: BaseString.h:26
Int32 mGroupId
Definition: FormatManager.h:106
Definition: DSSIPhoneEnums.h:2448
Definition: DSSIPhoneEnums.h:2532
GRID_AREA
Definition: FormatManager.h:36
Definition: DSSIPhoneEnums.h:2484
Definition: DSSIPhoneEnums.h:2504
Definition: FormatManager.h:40
Definition: DSSIPhoneEnums.h:2519
Definition: DSSIPhoneEnums.h:2441
EnumAxisShowProperty
Definition: FormatManager.h:50
Definition: Msi_ccomvariant.h:24
Definition: FormatManager.h:58
bool BelongTo(GraphPropertyKey &lRight) const
Definition: FormatManager.h:126
Definition: DSSIPhoneEnums.h:2476
Definition: DatasetHelper.h:490
_ThemeType
Definition: Enums.h:660
Definition: FormatManager.h:38
enum _ThemeType ThemeType
#define NULL
Definition: Null.h:10
Definition: FormatManager.h:54
Definition: DSSIPhoneEnums.h:2497
bool operator()(const GraphPropertyKey &lLeft, const GraphPropertyKey &lRight) const
Definition: FormatManager.h:136
Definition: FormatManager.h:57
Definition: DSSIPhoneEnums.h:2529
Definition: FormatManager.h:46
Definition: DSSIPhoneEnums.h:2462
Definition: DSSIPhoneEnums.h:2528
Definition: Base/Base/GUID.h:32
Definition: DSSIPhoneEnums.h:2469
FORMAT_CATEGORY
Definition: FormatManagerHelper.h:9