bump product version to 6.3.0.0.beta1
[LibreOffice.git] / svl / source / items / poolitem.cxx
bloba5501dc907d8a5ea44eb052446a13a9ead9b154a
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
21 #include <svl/poolitem.hxx>
22 #include <tools/stream.hxx>
23 #include <unotools/intlwrapper.hxx>
24 #include <unotools/syslocale.hxx>
25 #include <osl/diagnose.h>
26 #include <libxml/xmlwriter.h>
27 #include <typeinfo>
29 //////////////////////////////////////////////////////////////////////////////
30 // list of classes derived from SfxPoolItem
31 // will not be kept up-to-date, but give a good overview for right now
32 //////////////////////////////////////////////////////////////////////////////
34 // class SbxItem : public SfxPoolItem
35 // class SvxChartColorTableItem : public SfxPoolItem
36 // class DriverPoolingSettingsItem final : public SfxPoolItem
37 // class DatabaseMapItem final : public SfxPoolItem
38 // class DbuTypeCollectionItem : public SfxPoolItem
39 // class OptionalBoolItem : public SfxPoolItem
40 // class OStringListItem : public SfxPoolItem
41 // class MediaItem : public SfxPoolItem
42 // class SvxBoxItem : public SfxPoolItem
43 // class SvxBoxInfoItem : public SfxPoolItem
44 // class SvxBrushItem : public SfxPoolItem
45 // class SvxBulletItem : public SfxPoolItem
46 // class SvxColorItem : public SfxPoolItem
47 // class SvxBackgroundColorItem : public SvxColorItem
48 // class SvxFontHeightItem : public SfxPoolItem
49 // class SvxFieldItem : public SfxPoolItem
50 // class SvxFontListItem : public SfxPoolItem
51 // class SvxFontItem : public SfxPoolItem
52 // class SvxHyphenZoneItem : public SfxPoolItem
53 // class SvxLineItem : public SfxPoolItem
54 // class SvxLRSpaceItem : public SfxPoolItem
55 // class SvxNumBulletItem : public SfxPoolItem
56 // class SfxHyphenRegionItem: public SfxPoolItem
57 // class SvxProtectItem : public SfxPoolItem
58 // class SvxSizeItem : public SfxPoolItem
59 // class SwFormatFrameSize: public SvxSizeItem
60 // class SvxTabStopItem : public SfxPoolItem
61 // class SvxTwoLinesItem : public SfxPoolItem
62 // class SvxULSpaceItem : public SfxPoolItem
63 // class SvXMLAttrContainerItem: public SfxPoolItem
64 // class SfxLinkItem : public SfxPoolItem
65 // class SfxEventNamesItem : public SfxPoolItem
66 // class SfxFrameItem: public SfxPoolItem
67 // class SfxUnoAnyItem : public SfxPoolItem
68 // class SfxUnoFrameItem : public SfxPoolItem
69 // class SfxMacroInfoItem: public SfxPoolItem
70 // class SfxObjectItem: public SfxPoolItem
71 // class SfxObjectShellItem: public SfxPoolItem
72 // class SfxViewFrameItem: public SfxPoolItem
73 // class SfxWatermarkItem: public SfxPoolItem
74 // class SfxEnumItemInterface: public SfxPoolItem
75 // class SvxAdjustItem : public SfxEnumItemInterface
76 // class SvxEscapementItem : public SfxEnumItemInterface
77 // class SvxLineSpacingItem : public SfxEnumItemInterface
78 // class SvxShadowItem : public SfxEnumItemInterface
79 // class SfxEnumItem : public SfxEnumItemInterface
80 // class SvxCharReliefItem : public SfxEnumItem<FontRelief>
81 // class SvxCaseMapItem : public SfxEnumItem<SvxCaseMap>
82 // class SvxCrossedOutItem : public SfxEnumItem<FontStrikeout>
83 // class SvxFormatBreakItem : public SfxEnumItem<SvxBreak>
84 // class SvxFrameDirectionItem : public SfxEnumItem<SvxFrameDirection>
85 // class SvxHorJustifyItem: public SfxEnumItem<SvxCellHorJustify>
86 // class SvxVerJustifyItem: public SfxEnumItem<SvxCellVerJustify>
87 // class SvxJustifyMethodItem: public SfxEnumItem<SvxCellJustifyMethod>
88 // class SvxLanguageItem_Base: public SfxEnumItem<LanguageType>
89 // class SvxLanguageItem : public SvxLanguageItem_Base
90 // class SvxPostureItem : public SfxEnumItem<FontItalic>
91 // class SvxTextLineItem : public SfxEnumItem<FontLineStyle>
92 // class SvxUnderlineItem : public SvxTextLineItem
93 // class SvxOverlineItem : public SvxTextLineItem
94 // class SvxWeightItem : public SfxEnumItem<FontWeight>
95 // class SfxAllEnumItem_Base: public SfxEnumItem<sal_uInt16>
96 // class SfxAllEnumItem: public SfxAllEnumItem_Base
97 // class SvxOrientationItem: public SfxEnumItem<SvxCellOrientation>
98 // class SvxChartRegressItem : public SfxEnumItem<SvxChartRegress>
99 // class SvxChartTextOrderItem : public SfxEnumItem<SvxChartTextOrder>
100 // class SvxChartKindErrorItem : public SfxEnumItem<SvxChartKindError>
101 // class SvxChartIndicateItem : public SfxEnumItem<SvxChartIndicate>
102 // class SvxRotateModeItem: public SfxEnumItem<SvxRotateMode>
103 // class SdrGrafModeItem_Base: public SfxEnumItem<GraphicDrawMode>
104 // class SdrGrafModeItem : public SdrGrafModeItem_Base
105 // class SdrTextAniDirectionItem: public SfxEnumItem<SdrTextAniDirection>
106 // class SdrTextVertAdjustItem: public SfxEnumItem<SdrTextVertAdjust>
107 // class SdrTextHorzAdjustItem: public SfxEnumItem<SdrTextHorzAdjust>
108 // class SdrTextAniKindItem: public SfxEnumItem<SdrTextAniKind>
109 // class SdrTextFitToSizeTypeItem : public SfxEnumItem<css::drawing::TextFitToSizeType>
110 // class SdrCaptionEscDirItem: public SfxEnumItem<SdrCaptionEscDir>
111 // class SdrCaptionTypeItem: public SfxEnumItem<SdrCaptionType>
112 // class SdrEdgeKindItem: public SfxEnumItem<SdrEdgeKind>
113 // class SdrMeasureTextHPosItem: public SfxEnumItem<css::drawing::MeasureTextHorzPos>
114 // class SdrMeasureTextVPosItem: public SfxEnumItem<css::drawing::MeasureTextVertPos>
115 // class SdrMeasureUnitItem: public SfxEnumItem<FieldUnit>
116 // class XFillStyleItem : public SfxEnumItem<css::drawing::FillStyle>
117 // class XFillBmpPosItem : public SfxEnumItem<RectPoint>
118 // class XFormTextAdjustItem : public SfxEnumItem<XFormTextAdjust>
119 // class XFormTextShadowItem : public SfxEnumItem<XFormTextShadow>
120 // class XLineStyleItem : public SfxEnumItem<css::drawing::LineStyle>
121 // class XLineJointItem : public SfxEnumItem<css::drawing::LineJoint>
122 // class XLineCapItem : public SfxEnumItem<css::drawing::LineCap>
123 // class XFormTextStyleItem : public SfxEnumItem<XFormTextStyle>
124 // class ScViewObjectModeItem: public SfxEnumItem<ScVObjMode>
125 // class SdrCircKindItem: public SfxEnumItem<SdrCircKind>
126 // class SdrMeasureKindItem: public SfxEnumItem<SdrMeasureKind>
127 // class SwFormatFillOrder: public SfxEnumItem<SwFillOrder>
128 // class SwFormatFootnoteEndAtTextEnd : public SfxEnumItem<SwFootnoteEndPosEnum>
129 // class SwFormatFootnoteAtTextEnd : public SwFormatFootnoteEndAtTextEnd
130 // class SwFormatEndAtTextEnd : public SwFormatFootnoteEndAtTextEnd
131 // class SwFormatSurround: public SfxEnumItem<css::text::WrapTextMode>
132 // class SwMirrorGrf : public SfxEnumItem<MirrorGraph>
133 // class SwDrawModeGrf_Base: public SfxEnumItem<GraphicDrawMode>
134 // class SwDrawModeGrf : public SwDrawModeGrf_Base
135 //class CntByteItem: public SfxPoolItem
136 // class SfxByteItem: public CntByteItem
137 // class SvxOrphansItem: public SfxByteItem
138 // class SvxPaperBinItem : public SfxByteItem
139 // class SvxWidowsItem: public SfxByteItem
140 // class SwTransparencyGrf : public SfxByteItem
141 //class CntUInt16Item: public SfxPoolItem
142 // class SfxUInt16Item: public CntUInt16Item
143 // class SvxTextRotateItem : public SfxUInt16Item
144 // class SvxCharRotateItem : public SvxTextRotateItem
145 // class SvxCharScaleWidthItem : public SfxUInt16Item
146 // class SvxEmphasisMarkItem : public SfxUInt16Item
147 // class SvxParaVertAlignItem : public SfxUInt16Item
148 // class SvxWritingModeItem : public SfxUInt16Item
149 // class SvxZoomItem: public SfxUInt16Item
150 // class SdrPercentItem : public SfxUInt16Item
151 // class SdrGrafTransparenceItem : public SdrPercentItem
152 // class SdrTextAniCountItem: public SfxUInt16Item
153 // class SdrTextAniDelayItem: public SfxUInt16Item
154 // class Svx3DNormalsKindItem : public SfxUInt16Item
155 // class Svx3DTextureProjectionXItem : public SfxUInt16Item
156 // class Svx3DTextureProjectionYItem : public SfxUInt16Item
157 // class Svx3DTextureKindItem : public SfxUInt16Item
158 // class Svx3DTextureModeItem : public SfxUInt16Item
159 // class Svx3DPerspectiveItem : public SfxUInt16Item
160 // class Svx3DShadeModeItem : public SfxUInt16Item
161 // class SdrEdgeLineDeltaCountItem: public SfxUInt16Item
162 // class SvxViewLayoutItem: public SfxUInt16Item
163 // class XFillBmpPosOffsetXItem : public SfxUInt16Item
164 // class XFillBmpPosOffsetYItem : public SfxUInt16Item
165 // class XFillBmpTileOffsetXItem : public SfxUInt16Item
166 // class XFillBmpTileOffsetYItem : public SfxUInt16Item
167 // class XFillTransparenceItem: public SfxUInt16Item
168 // class XFormTextShadowTranspItem: public SfxUInt16Item
169 // class XGradientStepCountItem: public SfxUInt16Item
170 // class XLineTransparenceItem: public SfxUInt16Item
171 // class SvxZoomSliderItem: public SfxUInt16Item
172 // class SdrLayerIdItem: public SfxUInt16Item
173 // class SwRotationGrf : public SfxUInt16Item
174 //class CntInt32Item: public SfxPoolItem
175 // class SfxInt32Item: public CntInt32Item
176 // class SfxMetricItem: public SfxInt32Item
177 // class XFillBmpSizeXItem : public SfxMetricItem
178 // class XFillBmpSizeYItem : public SfxMetricItem
179 // class XFormTextDistanceItem : public SfxMetricItem
180 // class XFormTextShadowXValItem : public SfxMetricItem
181 // class XFormTextShadowYValItem : public SfxMetricItem
182 // class XFormTextStartItem : public SfxMetricItem
183 // class XLineEndWidthItem : public SfxMetricItem
184 // class XLineStartWidthItem : public SfxMetricItem
185 // class XLineWidthItem : public SfxMetricItem
186 // class SdrAngleItem: public SfxInt32Item
188 // class SdrCaptionAngleItem: public SdrAngleItem
189 // class SdrMeasureTextFixedAngleItem: public SdrAngleItem
190 // class SdrMeasureTextAutoAngleViewItem: public SdrAngleItem
191 // class SdrRotateAllItem: public SdrAngleItem
192 // class SdrRotateOneItem: public SdrAngleItem
193 // class SdrShearAngleItem: public SdrAngleItem
194 // class SdrHorzShearAllItem: public SdrAngleItem
195 // class SdrVertShearAllItem: public SdrAngleItem
196 // class SdrHorzShearOneItem: public SdrAngleItem
197 // class SdrVertShearOneItem: public SdrAngleItem
198 // class SdrMetricItem: public SfxInt32Item
199 // class SdrCaptionEscAbsItem: public SdrMetricItem
200 // class SdrCaptionGapItem: public SdrMetricItem
201 // class SdrCaptionLineLenItem: public SdrMetricItem
202 // class SdrEdgeNode1HorzDistItem: public SdrMetricItem
203 // class SdrEdgeNode1VertDistItem: public SdrMetricItem
204 // class SdrEdgeNode2HorzDistItem: public SdrMetricItem
205 // class SdrEdgeNode2VertDistItem: public SdrMetricItem
206 // class SdrEdgeNode1GlueDistItem: public SdrMetricItem
207 // class SdrEdgeNode2GlueDistItem: public SdrMetricItem
208 // class SdrAllPositionXItem: public SdrMetricItem
209 // class SdrAllPositionYItem: public SdrMetricItem
210 // class SdrAllSizeWidthItem: public SdrMetricItem
211 // class SdrAllSizeHeightItem: public SdrMetricItem
212 // class SdrLogicSizeWidthItem: public SdrMetricItem
213 // class SdrLogicSizeHeightItem: public SdrMetricItem
214 // class SdrMeasureOverhangItem: public SdrMetricItem
215 // class SdrMoveXItem: public SdrMetricItem
216 // class SdrMoveYItem: public SdrMetricItem
217 // class SdrOnePositionXItem: public SdrMetricItem
218 // class SdrOnePositionYItem: public SdrMetricItem
219 // class SdrOneSizeWidthItem: public SdrMetricItem
220 // class SdrOneSizeHeightItem: public SdrMetricItem
221 // class SdrTransformRef1XItem: public SdrMetricItem
222 // class SdrTransformRef1YItem: public SdrMetricItem
223 // class SdrTransformRef2XItem: public SdrMetricItem
224 // class SdrTransformRef2YItem: public SdrMetricItem
225 // class SdrCaptionEscRelItem: public SfxInt32Item
226 //class CntUInt32Item: public SfxPoolItem
227 // class SfxUInt32Item: public CntUInt32Item
228 // class SvxRsidItem : public SfxUInt32Item
229 // class SdrGrafGamma100Item : public SfxUInt32Item
230 // class SwTableBoxNumFormat : public SfxUInt32Item
231 //class CntUnencodedStringItem: public SfxPoolItem
232 // class SfxStringItem: public CntUnencodedStringItem
233 // class SvxPageModelItem : public SfxStringItem
234 // class SfxDocumentInfoItem : public SfxStringItem
235 // class SvxPostItAuthorItem: public SfxStringItem
236 // class SvxPostItDateItem: public SfxStringItem
237 // class SvxPostItTextItem: public SfxStringItem
238 // class SvxPostItIdItem: public SfxStringItem
239 // class SdrMeasureFormatStringItem: public SfxStringItem
240 // class NameOrIndex : public SfxStringItem
241 // class XFillBitmapItem : public NameOrIndex
242 // class XColorItem : public NameOrIndex
243 // class XFillColorItem : public XColorItem
244 // class XFormTextShadowColorItem : public XColorItem
245 // class XLineColorItem : public XColorItem
246 // class XSecondaryFillColorItem : public XColorItem
247 // class XFillGradientItem : public NameOrIndex
248 // class XFillFloatTransparenceItem : public XFillGradientItem
249 // class XFillHatchItem : public NameOrIndex
250 // class XLineDashItem : public NameOrIndex
251 // class XLineEndItem : public NameOrIndex
252 // class XLineStartItem : public NameOrIndex
253 // class SfxScriptOrganizerItem : public SfxStringItem
254 // class SdrLayerNameItem: public SfxStringItem
255 // class SwNumRuleItem : public SfxStringItem
256 //class SfxBoolItem : public SfxPoolItem
257 // class SvxAutoKernItem : public SfxBoolItem
258 // class SvxBlinkItem : public SfxBoolItem
259 // class SvxCharHiddenItem : public SfxBoolItem
260 // class SvxContourItem : public SfxBoolItem
261 // class SvxForbiddenRuleItem : public SfxBoolItem
262 // class SvxHangingPunctuationItem : public SfxBoolItem
263 // class SvxFormatKeepItem : public SfxBoolItem
264 // class SvxNoHyphenItem : public SfxBoolItem
265 // class SvxOpaqueItem : public SfxBoolItem
266 // class SvxParaGridItem : public SfxBoolItem
267 // class SvxPrintItem : public SfxBoolItem
268 // class SvxScriptSpaceItem : public SfxBoolItem
269 // class SvxShadowedItem : public SfxBoolItem
270 // class SvxFormatSplitItem : public SfxBoolItem
271 // class SvxWordLineModeItem : public SfxBoolItem
272 // class SdrOnOffItem: public SfxBoolItem
273 // class SdrGrafInvertItem : public SdrOnOffItem
274 // class SdrTextFixedCellHeightItem : public SfxBoolItem
275 // class SdrYesNoItem: public SfxBoolItem
276 // class SdrTextAniStartInsideItem: public SdrYesNoItem
277 // class SdrTextAniStopInsideItem: public SdrYesNoItem
278 // class SdrCaptionEscIsRelItem: public SdrYesNoItem
279 // class SdrCaptionFitLineLenItem: public SdrYesNoItem
280 // class SdrMeasureBelowRefEdgeItem: public SdrYesNoItem
281 // class SdrMeasureTextIsFixedAngleItem: public SdrYesNoItem
282 // class SdrMeasureTextRota90Item: public SdrYesNoItem
283 // class SdrMeasureTextUpsideDownItem: public SdrYesNoItem
284 // class SdrMeasureTextAutoAngleItem: public SdrYesNoItem
285 // class SdrObjPrintableItem: public SdrYesNoItem
286 // class SdrObjVisibleItem: public SdrYesNoItem
287 // class Svx3DReducedLineGeometryItem : public SfxBoolItem
288 // class Svx3DSmoothNormalsItem : public SfxBoolItem
289 // class Svx3DSmoothLidsItem : public SfxBoolItem
290 // class Svx3DCharacterModeItem : public SfxBoolItem
291 // class Svx3DCloseFrontItem : public SfxBoolItem
292 // class Svx3DCloseBackItem : public SfxBoolItem
293 // class XFillBackgroundItem : public SfxBoolItem
294 // class XFillBmpSizeLogItem : public SfxBoolItem
295 // class XFillBmpTileItem : public SfxBoolItem
296 // class XFillBmpStretchItem : public SfxBoolItem
297 // class XFormTextMirrorItem : public SfxBoolItem
298 // class XFormTextOutlineItem : public SfxBoolItem
299 // class XLineEndCenterItem : public SfxBoolItem
300 // class XLineStartCenterItem : public SfxBoolItem
301 // class XFormTextHideFormItem : public SfxBoolItem
302 // class SwFormatNoBalancedColumns : public SfxBoolItem
303 // class SwFormatEditInReadonly : public SfxBoolItem
304 // class SwFormatFollowTextFlow : public SfxBoolItem
305 // class SwFormatLayoutSplit : public SfxBoolItem
306 // class SwFormatRowSplit : public SfxBoolItem
307 // class SwInvertGrf: public SfxBoolItem
308 // class SwHeaderAndFooterEatSpacingItem : public SfxBoolItem
309 // class SwRegisterItem : public SfxBoolItem
310 // class SwParaConnectBorderItem : public SfxBoolItem
311 // class SfxFlagItem: public SfxPoolItem
312 // class SfxTemplateItem: public SfxFlagItem
313 // class SfxGlobalNameItem: public SfxPoolItem
314 // class SfxGrabBagItem : public SfxPoolItem
315 // class SfxIntegerListItem : public SfxPoolItem
316 // class SfxInt64Item : public SfxPoolItem
317 // class SfxInt16Item: public SfxPoolItem
318 // class SvxKerningItem : public SfxInt16Item
319 // class SfxImageItem : public SfxInt16Item
320 // class SdrSignedPercentItem : public SfxInt16Item
321 // class SdrGrafRedItem : public SdrSignedPercentItem
322 // class SdrGrafGreenItem : public SdrSignedPercentItem
323 // class SdrGrafBlueItem : public SdrSignedPercentItem
324 // class SdrGrafLuminanceItem : public SdrSignedPercentItem
325 // class SdrGrafContrastItem : public SdrSignedPercentItem
326 // class SdrTextAniAmountItem: public SfxInt16Item
327 // class SdrMeasureDecimalPlacesItem: public SfxInt16Item
328 // class ScMergeFlagAttr: public SfxInt16Item
329 // class SwLuminanceGrf : public SfxInt16Item
330 // class SwContrastGrf : public SfxInt16Item
331 // class SwChannelGrf : public SfxInt16Item
332 // class SfxLockBytesItem : public SfxPoolItem
333 // class SvxMacroItem: public SfxPoolItem
334 // class SfxVoidItem final: public SfxPoolItem
335 // class SfxSetItem: public SfxPoolItem
336 // class SvxScriptSetItem : public SfxSetItem
337 // class SfxTabDialogItem: public SfxSetItem
338 // class SvxSetItem: public SfxSetItem
339 // class XFillAttrSetItem : public SfxSetItem
340 // class XLineAttrSetItem : public SfxSetItem
341 // class ScPatternAttr: public SfxSetItem
342 // class SfxPointItem: public SfxPoolItem
343 // class SfxRectangleItem: public SfxPoolItem
344 // class SfxRangeItem : public SfxPoolItem
345 // class SfxStringListItem : public SfxPoolItem
346 // class SvxSearchItem : public SfxPoolItem
347 // class SfxVisibilityItem: public SfxPoolItem
348 // class AffineMatrixItem : public SfxPoolItem
349 // class SvxMarginItem: public SfxPoolItem
350 // class SvxDoubleItem : public SfxPoolItem
351 // class SvxClipboardFormatItem : public SfxPoolItem
352 // class SvxColorListItem: public SfxPoolItem
353 // class SvxGradientListItem : public SfxPoolItem
354 // class SvxHatchListItem : public SfxPoolItem
355 // class SvxBitmapListItem : public SfxPoolItem
356 // class SvxPatternListItem : public SfxPoolItem
357 // class SvxDashListItem : public SfxPoolItem
358 // class SvxLineEndListItem : public SfxPoolItem
359 // class SvxB3DVectorItem : public SfxPoolItem
360 // class SvxGalleryItem : public SfxPoolItem
361 // class SvxGrfCrop : public SfxPoolItem
362 // class SdrGrafCropItem : public SvxGrfCrop
363 // class SwCropGrf : public SvxGrfCrop
364 // class SvxHyperlinkItem : public SfxPoolItem
365 // class SvxNumberInfoItem : public SfxPoolItem
366 // class OfaPtrItem : public SfxPoolItem
367 // class OfaRefItem : public SfxPoolItem
368 // class SvxGridItem : public SvxOptionsGrid, public SfxPoolItem
369 // class SdOptionsGridItem : public SvxGridItem
370 // class SvxPageItem: public SfxPoolItem
371 // class SvxLongLRSpaceItem : public SfxPoolItem
372 // class SvxLongULSpaceItem : public SfxPoolItem
373 // class SvxPagePosSizeItem : public SfxPoolItem
374 // class SvxColumnItem : public SfxPoolItem
375 // class SvxObjectItem : public SfxPoolItem
376 // class SdrCustomShapeGeometryItem : public SfxPoolItem
377 // class SvxSmartTagItem : public SfxPoolItem
378 // class SvxGraphicItem: public SfxPoolItem
379 // class SdrFractionItem: public SfxPoolItem
380 // class SdrScaleItem: public SdrFractionItem
381 // class SdrMeasureScaleItem: public SdrScaleItem
382 // class SdrResizeXAllItem: public SdrFractionItem
383 // class SdrResizeYAllItem: public SdrFractionItem
384 // class SdrResizeXOneItem: public SdrFractionItem
385 // class SdrResizeYOneItem: public SdrFractionItem
386 // class ScMergeAttr: public SfxPoolItem
387 // class ScProtectionAttr: public SfxPoolItem
388 // class ScPageHFItem : public SfxPoolItem
389 // class ScPageScaleToItem : public SfxPoolItem
390 // class ScCondFormatItem : public SfxPoolItem
391 // class ScTpDefaultsItem : public SfxPoolItem
392 // class ScTpCalcItem : public SfxPoolItem
393 // class ScTpFormulaItem : public SfxPoolItem
394 // class ScTpPrintItem : public SfxPoolItem
395 // class ScTpViewItem : public SfxPoolItem
396 // class ScCondFormatDlgItem : public SfxPoolItem
397 // class ScInputStatusItem : public SfxPoolItem
398 // class ScSortItem : public SfxPoolItem
399 // class ScQueryItem : public SfxPoolItem
400 // class ScSubTotalItem : public SfxPoolItem
401 // class cUserListItem : public SfxPoolItem
402 // class ScConsolidateItem : public SfxPoolItem
403 // class ScPivotItem : public SfxPoolItem
404 // class ScSolveItem : public SfxPoolItem
405 // class ScTabOpItem : public SfxPoolItem
406 // class SdOptionsLayoutItem : public SfxPoolItem
407 // class SdOptionsMiscItem : public SfxPoolItem
408 // class SdOptionsSnapItem : public SfxPoolItem
409 // class SdOptionsPrintItem : public SfxPoolItem
410 // class SwCondCollItem : public SfxPoolItem
411 // class SwTableBoxFormula : public SfxPoolItem, public SwTableFormula
412 // class SwTableBoxValue : public SfxPoolItem
413 // class SwFormatCharFormat: public SfxPoolItem, public SwClient
414 // class SwFormatAnchor: public SfxPoolItem
415 // class SwFormatAutoFormat: public SfxPoolItem
416 // class SwFormatCol : public SfxPoolItem
417 // class SwFormatChain: public SfxPoolItem
418 // class SwFormatContent: public SfxPoolItem
419 // class SwFormatFlyCnt : public SfxPoolItem
420 // class SwFormatField : public SfxPoolItem
421 // class SwFormatFootnote : public SfxPoolItem
422 // class SwFormatHeader: public SfxPoolItem, public SwClient
423 // class SwFormatFooter: public SfxPoolItem, public SwClient
424 // class SwFormatINetFormat : public SfxPoolItem
425 // class SwFormatLineNumber: public SfxPoolItem
426 // class SwFormatMeta : public SfxPoolItem
427 // class SwFormatVertOrient: public SfxPoolItem
428 // class SwFormatHoriOrient: public SfxPoolItem
429 // class SwFormatPageDesc : public SfxPoolItem, public SwClient
430 // class SwFormatRefMark : public SfxPoolItem
431 // class SwFormatRuby : public SfxPoolItem
432 // class SwFormatURL: public SfxPoolItem
433 // class SwFormatWrapInfluenceOnObjPos: public SfxPoolItem
434 // class SwGammaGrf : public SfxPoolItem
435 // class SwMsgPoolItem : public SfxPoolItem
436 // class SwPtrMsgPoolItem : public SwMsgPoolItem
437 // class SwFormatChg: public SwMsgPoolItem
438 // class SwInsText: public SwMsgPoolItem
439 // class SwDelChr: public SwMsgPoolItem
440 // class SwDelText: public SwMsgPoolItem
441 // class SwUpdateAttr : public SwMsgPoolItem
442 // class SwRefMarkFieldUpdate : public SwMsgPoolItem
443 // class SwDocPosUpdate : public SwMsgPoolItem
444 // class SwTableFormulaUpdate : public SwMsgPoolItem
445 // class SwAutoFormatGetDocNode: public SwMsgPoolItem
446 // class SwAttrSetChg: public SwMsgPoolItem
447 // class SwCondCollCondChg: public SwMsgPoolItem
448 // class SwVirtPageNumInfo: public SwMsgPoolItem
449 // class SwFindNearestNode : public SwMsgPoolItem
450 // class SwStringMsgPoolItem : public SwMsgPoolItem
451 // class SwFormatDrop: public SfxPoolItem, public SwClient
452 // class SwTextGridItem : public SfxPoolItem
453 // class SwTOXMark : public SfxPoolItem
454 // class SwFltAnchor : public SfxPoolItem
455 // class SwFltRedline : public SfxPoolItem
456 // class SwFltBookmark : public SfxPoolItem
457 // class SwFltRDFMark : public SfxPoolItem
458 // class SwFltTOX : public SfxPoolItem
459 // class SwDocDisplayItem : public SfxPoolItem
460 // class SwElemItem : public SfxPoolItem
461 // class SwAddPrinterItem : public SfxPoolItem, public SwPrintData
462 // class SwShadowCursorItem : public SfxPoolItem
463 // class SwTestItem : public SfxPoolItem
464 // class SwEnvItem : public SfxPoolItem
465 // class SwLabItem : public SfxPoolItem
466 // class SwWrtShellItem: public SfxPoolItem
467 // class SwPageFootnoteInfoItem : public SfxPoolItem
468 // class SwPtrItem : public SfxPoolItem
469 // class SwUINumRuleItem : public SfxPoolItem
470 // class SwPaMItem : public SfxPoolItem
471 //////////////////////////////////////////////////////////////////////////////
473 SfxPoolItem::SfxPoolItem(sal_uInt16 const nWhich)
474 : m_nRefCount(0)
475 , m_nWhich(nWhich)
476 , m_nKind(SfxItemKind::NONE)
478 assert(nWhich <= SHRT_MAX);
482 SfxPoolItem::~SfxPoolItem()
484 assert((m_nRefCount == 0 || m_nRefCount > SFX_ITEMS_MAXREF)
485 && "destroying item in use");
489 bool SfxPoolItem::operator==( const SfxPoolItem& rCmp ) const
491 return typeid(rCmp) == typeid(*this);
496 * This virtual method allows to get a textual representation of the value
497 * for the SfxPoolItem subclasses. It should be overridden by all UI-relevant
498 * SfxPoolItem subclasses.
500 * Because the unit of measure of the value in the SfxItemPool is only
501 * queryable via @see SfxItemPool::GetMetric(sal_uInt16) const (and not
502 * via the SfxPoolItem instance or subclass, the own unit of measure is
503 * passed to 'eCoreMetric'.
505 * The corresponding unit of measure is passed as 'ePresentationMetric'.
508 * @return SfxItemPresentation SfxItemPresentation::Nameless
509 * A textual representation (if applicable
510 * with a unit of measure) could be created,
511 * but it doesn't contain any semantic meaning
513 * SfxItemPresentation::Complete
514 * A complete textual representation could be
515 * created with semantic meaning (if applicable
516 * with unit of measure)
518 * Example:
520 * pSvxFontItem->GetPresentation( SFX_PRESENTATION_NAMELESS, ... )
521 * "12pt" with return SfxItemPresentation::Nameless
523 * pSvxColorItem->GetPresentation( SFX_PRESENTATION_COMPLETE, ... )
524 * "red" with return SfxItemPresentation::Nameless
525 * Because the SvxColorItem does not know which color it represents
526 * it cannot provide a name, which is communicated by the return value
528 * pSvxBorderItem->GetPresentation( SFX_PRESENTATION_COMPLETE, ... )
529 * "1cm top border, 2cm left border, 0.2cm bottom border, ..."
531 bool SfxPoolItem::GetPresentation
533 SfxItemPresentation /*ePresentation*/, // IN: how we should format
534 MapUnit /*eCoreMetric*/, // IN: current metric of the SfxPoolItems
535 MapUnit /*ePresentationMetric*/, // IN: target metric of the presentation
536 OUString& /*rText*/, // OUT: textual representation
537 const IntlWrapper&
538 ) const
540 return false;
543 void SfxPoolItem::dumpAsXml(xmlTextWriterPtr pWriter) const
545 xmlTextWriterStartElement(pWriter, BAD_CAST("SfxPoolItem"));
546 xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
547 xmlTextWriterWriteAttribute(pWriter, BAD_CAST("typeName"), BAD_CAST(typeid(*this).name()));
548 OUString rText;
549 IntlWrapper aIntlWrapper(SvtSysLocale().GetUILanguageTag());
550 if (GetPresentation( SfxItemPresentation::Complete, MapUnit::Map100thMM, MapUnit::Map100thMM, rText, aIntlWrapper))
551 xmlTextWriterWriteAttribute(pWriter, BAD_CAST("presentation"), BAD_CAST(rText.getStr()));
552 xmlTextWriterEndElement(pWriter);
555 std::unique_ptr<SfxPoolItem> SfxPoolItem::CloneSetWhich( sal_uInt16 nNewWhich ) const
557 std::unique_ptr<SfxPoolItem> pItem(Clone());
558 pItem->SetWhich(nNewWhich);
559 return pItem;
562 bool SfxPoolItem::IsVoidItem() const
564 return false;
567 SfxPoolItem* SfxVoidItem::CreateDefault()
569 return new SfxVoidItem(0);
572 SfxVoidItem::SfxVoidItem( sal_uInt16 which ):
573 SfxPoolItem(which)
577 bool SfxVoidItem::operator==( const SfxPoolItem& rCmp ) const
579 assert(SfxPoolItem::operator==(rCmp));
580 (void) rCmp;
581 return true;
585 bool SfxVoidItem::GetPresentation
587 SfxItemPresentation /*ePresentation*/,
588 MapUnit /*eCoreMetric*/,
589 MapUnit /*ePresentationMetric*/,
590 OUString& rText,
591 const IntlWrapper&
592 ) const
594 rText = "Void";
595 return true;
598 void SfxVoidItem::dumpAsXml(xmlTextWriterPtr pWriter) const
600 xmlTextWriterStartElement(pWriter, BAD_CAST("SfxVoidItem"));
601 xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
602 xmlTextWriterEndElement(pWriter);
605 SfxPoolItem* SfxVoidItem::Clone(SfxItemPool *) const
607 return new SfxVoidItem(*this);
610 bool SfxVoidItem::IsVoidItem() const
612 return true;
615 void SfxPoolItem::ScaleMetrics( long /*lMult*/, long /*lDiv*/ )
620 bool SfxPoolItem::HasMetrics() const
622 return false;
626 bool SfxPoolItem::QueryValue( css::uno::Any&, sal_uInt8 ) const
628 OSL_FAIL("There is no implementation for QueryValue for this item!");
629 return false;
633 bool SfxPoolItem::PutValue( const css::uno::Any&, sal_uInt8 )
635 OSL_FAIL("There is no implementation for PutValue for this item!");
636 return false;
639 SfxVoidItem::~SfxVoidItem()
643 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */