diff options
Diffstat (limited to 'include/svl/poolitem.hxx')
-rw-r--r-- | include/svl/poolitem.hxx | 318 |
1 files changed, 316 insertions, 2 deletions
diff --git a/include/svl/poolitem.hxx b/include/svl/poolitem.hxx index af993096e655..22eee419ba49 100644 --- a/include/svl/poolitem.hxx +++ b/include/svl/poolitem.hxx @@ -97,6 +97,316 @@ enum class SfxItemState { SET = 0x0040 }; +enum class SfxItemType : sal_uInt16 { + SfxPoolItemType, + AffineMatrixItemType, + CntByteItemType, + CntInt32ItemType, + CntUInt16ItemType, + CntUInt32ItemType, + CntUnencodedStringItemType, + DatabaseMapItemType, + DbuTypeCollectionItemType, + DriverPoolingSettingsItemType, + InvalidOrDisabledItemType, + MediaItemType, + NameOrIndexType, + OStringListItemType, + OfaPtrItemType, + OfaXColorListItemType, + OptionalBoolItemType, + RectangleAlignmentType, + SbxItemType, + ScCondFormatItemType, + ScCondFormatDlgItemType, + ScConsolidateItemType, + ScInputStatusItemType, + ScMergeAttrType, + ScPageHFItemType, + ScPageScaleToItemType, + ScPivotItemType, + ScProtectionAttrType, + ScQueryItemType, + ScSolveItemType, + ScSortItemType, + ScSubTotalItemType, + ScTabOpItemType, + ScTpCalcItemType, + ScTpDefaultsItemType, + ScTpFormulaItemType, + ScTpPrintItemType, + ScTpViewItemType, + ScUserListItemType, + ScViewObjectModeItemType, + SdOptionsMiscItemType, + SdOptionsPrintItemType, + SdOptionsSnapItemType, + SdOptionsLayoutItemType, + SdrAngleItemType, + SdrCaptionEscDirItemType, + SdrCaptionTypeItem, + SdrCaptionTypeItemType, + SdrCircKindItemType, + SdrCustomShapeGeometryItemType, + SdrEdgeKindItemType, + SdrFractionItemType, + SdrGrafModeItem_Base, + SdrLayerIdItemType, + SdrLayerNameItemType, + SdrMeasureFormatStringItemType, + SdrMeasureKindItemType, + SdrMeasureScaleItemType, + SdrMeasureTextAutoAngleItemType, + SdrMeasureTextAutoAngleViewItemType, + SdrMeasureTextHPosItemType, + SdrMeasureTextVPosItemType, + SdrMeasureUnitItemType, + SdrResizeXAllItemType, + SdrResizeXOneItemType, + SdrResizeYAllItemType, + SdrResizeYOneItemType, + SdrScaleItemType, + SdrTextAniDirectionItemType, + SdrTextAniKindItemType, + SdrTextFitToSizeTypeItemType, + SdrTextHorzAdjustType, + SdrTextVertAdjustType, + SdrYesNoItemType, + SfxBoolItemType, + SfxByteItemType, + SfxDocumentInfoItemType, + SfxEnumItemInterface, + SfxEventNamesItemType, + SfxFlagItemType, + SfxFrameItemType, + SfxGlobalNameItemType, + SfxGrabBagItemType, + SfxHyphenRegionItemType, + SfxImageItemType, + SfxInt16ItemType, + SfxInt32ItemType, + SfxInt64ItemType, + SfxIntegerListItemType, + SfxLinkItemType, + SfxLockBytesItemType, + SfxMacroInfoItemType, + SfxMetricItemType, + SfxObjectItemType, + SfxObjectShellItemType, + SfxPointItemType, + SfxRangeItemType, + SfxRectangleItemType, + SfxRegionItemType, + SfxSetItemType, + SfxStringItemType, + SfxStringListItemType, + SfxTemplateItemType, + SfxUInt16ItemType, + SfxUnoAnyItemType, + SfxUnoFrameItemType, + SfxViewFrameItemType, + SfxVisibilityItemType, + SfxVoidItemType, + SfxWatermarkItemType, + SfxZoomItemType, + SvXMLAttrContainerItemType, + SvxAdjustItemType, + SvxAutoKernItemType, + SvxB3DVectorItemType, + SvxBitmapListItemType, + SvxBlinkItemType, + SvxBoxInfoItemType, + SvxBoxItemType, + SvxBrushItemType, + SvxBulletItemType, + SvxCaseMapItemType, + SvxCharHiddenItemType, + SvxCharReliefItemType, + SvxCharScaleWidthItem, + SvxChartColorTableItemType, + SvxChartIndicateItemType, + SvxChartKindErrorItemType, + SvxChartRegressItemType, + SvxChartTextOrderItemType, + SvxClipboardFormatItemType, + SvxColorItemType, + SvxColorListItemType, + SvxColumnItemType, + SvxContourItemType, + SvxCrossedOutItemType, + SvxDashListItemType, + SvxDoubleItemType, + SvxEmphasisMarkItemType, + SvxEscapementItemType, + SvxFieldItemType, + SvxFirstLineIndentItemType, + SvxFontHeightItemType, + SvxFontItemType, + SvxFontListItemType, + SvxForbiddenRuleItemType, + SvxFormatBreakItemType, + SvxFrameDirectionItemType, + SvxGalleryItemType, + SvxGradientListItemType, + SvxGraphicItemType, + SvxGrfCrop, + SvxGrfCropType, + SvxGridItem, + SvxGridItemType, + SvxGutterLeftMarginItemType, + SvxGutterRightMarginItemType, + SvxHangingPunctuationItemType, + SvxHatchListItemType, + SvxHorJustifyItemType, + SvxHyperlinkItemType, + SvxHyphenZoneItem, + SvxHyphenZoneItemType, + SvxJustifyMethodItemType, + SvxKerningItemType, + SvxLRSpaceItemType, + SvxLanguageItemType, + SvxLeftMarginItemType, + SvxLineEndListItemType, + SvxLineItemType, + SvxLineSpacingItemType, + SvxLongLRSpaceItemType, + SvxLongULSpaceItemType, + SvxMacroItemType, + SvxMarginItemType, + SvxNoHyphenItemType, + SvxNumBulletItemType, + SvxNumberInfoItemType, + SvxObjectItemType, + SvxOrientationItemType, + SvxOrphansItemType, + SvxPageItemType, + SvxPagePosSizeItemType, + SvxParaGridItemType, + SvxParaVertAlignItemType, + SvxPatternListItemType, + SvxPostureItemType, + SvxProtectItemType, + SvxRightMarginItemType, + SvxRotateModeItemType, + SvxScriptSetItemType, + SvxScriptSpaceItemType, + SvxSearchItemType, + SvxShadowItemType, + SvxShadowedItemType, + SvxSizeItem , + SvxSizeItemType, + SvxSmartTagItemType, + SvxTabStopItemType, + SvxTextLeftMarginItemType, + SvxTextLineItemType, + SvxTextRotateItemType, + SvxTwoLinesItemType, + SvxULSpaceItemType, + SvxVerJustifyItemType, + SvxWeightItemType, + SvxWidowsItemType, + SvxWordLineItemType, + SvxWritingModeItemType, + SwAddPrinterItemType, + SwCondCollItemType, + SwCropGrfType, + SwDocDisplayItemType, + SwDrawModeGrf_BaseType, + SwElemItemType, + SwEnvItemType, + SwFltAnchorType, + SwFltBookmarkType, + SwFltRDFMarkType, + SwFltRedlineType, + SwFltTOXType, + SwFmtAidsAutoComplItemType, + SwFormatAnchorType, + SwFormatAutoFormatType, + SwFormatChainType, + SwFormatCharFormatType, + SwFormatColType, + SwFormatContentControlType, + SwFormatContentType, + SwFormatDropType, + SwFormatFieldType, + SwFormatFillOrderType, + SwFormatFlyCntType, + SwFormatFooterType, + SwFormatFootnoteEndAtTextEndType, + SwFormatFootnoteType, + SwFormatHeaderType, + SwFormatHoriOrientType, + SwFormatINetFormatType, + SwFormatLineNumberType, + SwFormatLinebreakType, + SwFormatMetaType, + SwFormatPageDescType, + SwFormatRefMarkType, + SwFormatRubyType, + SwFormatSurroundType, + SwFormatURLType, + SwFormatVertOrientType, + SwFormatWrapInfluenceOnOjPosType, + SwGammaGrfType, + SwInvertGrfType, + SwLabItemType, + SwMirrorGrfType, + SwMsgPoolItemType, + SwPaMItemType, + SwPageFootnoteInfoItemType, + SwPtrItemType, + SwRotationGrfType, + SwShadowCursorItemType, + SwTOXMarkType, + SwTableBoxValueType, + SwTableFormulaType, + SwTextGridItemType, + SwTransparencyGrfType, + SwUINumRuleItemType, + SwWrtShellItemType, + XFillAttrSetItemType, + XFillBackgroundItemType, + XFillBmpPosItemType, + XFillBmpPosOffsetXItemType, + XFillBmpPosOffsetYItemType, + XFillBmpSizeLogItemType, + XFillBmpSizeXItemType, + XFillBmpSizeYItemType, + XFillBmpStretchItemType, + XFillBmpTileItemType, + XFillBmpTileOffsetXItemType, + XFillBmpTileOffsetYItemType, + XFillStyleItemType, + XFillTransparenceItemType, + XFillUseSlideBackgroundItemType, + XFormTextAdjustItemType, + XFormTextDistanceItemType, + XFormTextHideFormItemType, + XFormTextMirrorItem, + XFormTextOutlineItemType, + XFormTextShadowItemType, + XFormTextShadowTranspItemType, + XFormTextShadowXValItemType, + XFormTextShadowYValItemType, + XFormTextStartItemType, + XFormTextStyleItemType, + XGradientStepCountItemType, + XLineAttrSetItemType, + XLineCapItemType, + XLineEndCenterItemType, + XLineEndWidthItemType, + XLineJointItemType, + XLineStartCenterItem, + XLineStartWidthItemType, + XLineStyleItemType, + XLineTransparenceItemType, + XLineWidthItemType +#ifdef DBG_UTIL + , SwTestItemType +#endif +}; + + #ifdef DBG_UTIL SVL_DLLPUBLIC size_t getAllocatedSfxPoolItemCount(); SVL_DLLPUBLIC size_t getUsedSfxPoolItemCount(); @@ -119,6 +429,7 @@ class SVL_DLLPUBLIC SfxPoolItem mutable sal_uInt32 m_nRefCount; sal_uInt16 m_nWhich; + SfxItemType m_eItemType; #ifdef DBG_UTIL // for debugging add a serial number, will be set in the constructor @@ -193,9 +504,10 @@ private: } protected: - explicit SfxPoolItem( sal_uInt16 nWhich = 0 ); + + explicit SfxPoolItem( sal_uInt16 nWhich, SfxItemType ); SfxPoolItem( const SfxPoolItem& rCopy) - : SfxPoolItem(rCopy.m_nWhich) {} + : SfxPoolItem(rCopy.m_nWhich, rCopy.m_eItemType) {} public: virtual ~SfxPoolItem(); @@ -207,6 +519,8 @@ public: m_nWhich = nId; } sal_uInt16 Which() const { return m_nWhich; } + SfxItemType ItemType() const { return m_eItemType;} + // StaticWhichCast asserts if the TypedWhichId is not matching its type, otherwise it returns a reference. // You can use StaticWhichCast when you are sure about the type at compile time -- like a static_cast. template<class T> T& StaticWhichCast(TypedWhichId<T> nId) |