fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / chart2 / source / controller / itemsetwrapper / TextLabelItemConverter.cxx
blobfe94df3f3dc22ea895aff9cb52591b376c9d7dee
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 .
20 #include <TextLabelItemConverter.hxx>
21 #include <CharacterPropertyItemConverter.hxx>
22 #include <ChartModelHelper.hxx>
23 #include <ChartTypeHelper.hxx>
24 #include <DataSeriesHelper.hxx>
25 #include <DiagramHelper.hxx>
26 #include <ItemPropertyMap.hxx>
27 #include <SchWhichPairs.hxx>
28 #include <macros.hxx>
29 #include <unonames.hxx>
31 #include <editeng/brushitem.hxx>
32 #include <editeng/sizeitem.hxx>
33 #include <svl/ilstitem.hxx>
34 #include <svl/intitem.hxx>
35 #include <svl/stritem.hxx>
36 #include <svx/tabline.hxx>
38 #include <com/sun/star/chart2/DataPointLabel.hpp>
39 #include <com/sun/star/chart2/Symbol.hpp>
41 using namespace com::sun::star;
42 using namespace com::sun::star::chart2;
43 using com::sun::star::uno::Reference;
45 namespace chart { namespace wrapper {
47 namespace {
49 const ItemPropertyMapType& getTextLabelPropertyMap()
51 static ItemPropertyMapType aMap(
52 MakeItemPropertyMap
53 IPM_MAP_ENTRY(XATTR_LINESTYLE, CHART_UNONAME_LABEL_BORDER_STYLE, 0)
54 IPM_MAP_ENTRY(XATTR_LINEWIDTH, CHART_UNONAME_LABEL_BORDER_WIDTH, 0)
55 IPM_MAP_ENTRY(XATTR_LINEDASH, CHART_UNONAME_LABEL_BORDER_DASH, 0)
56 IPM_MAP_ENTRY(XATTR_LINECOLOR, CHART_UNONAME_LABEL_BORDER_COLOR, 0)
57 IPM_MAP_ENTRY(XATTR_LINETRANSPARENCE, CHART_UNONAME_LABEL_BORDER_TRANS, 0)
60 return aMap;
63 sal_Int32 getSymbolStyleForSymbol( const chart2::Symbol& rSymbol )
65 sal_Int32 nStyle = SVX_SYMBOLTYPE_UNKNOWN;
66 switch (rSymbol.Style)
68 case chart2::SymbolStyle_NONE:
69 nStyle = SVX_SYMBOLTYPE_NONE;
70 break;
71 case chart2::SymbolStyle_AUTO:
72 nStyle = SVX_SYMBOLTYPE_AUTO;
73 break;
74 case chart2::SymbolStyle_GRAPHIC:
75 nStyle = SVX_SYMBOLTYPE_BRUSHITEM;
76 break;
77 case chart2::SymbolStyle_STANDARD:
78 nStyle = rSymbol.StandardSymbol;
79 break;
80 case chart2::SymbolStyle_POLYGON:
81 default:
84 return nStyle;
87 bool numberFormatFromItemToPropertySet(
88 sal_uInt16 nWhichId, const SfxItemSet& rItemSet, const uno::Reference<beans::XPropertySet>& xPropertySet,
89 bool bOverwriteDataPoints )
91 bool bChanged = false;
92 if (!xPropertySet.is())
93 return bChanged;
95 OUString aPropertyName = (SID_ATTR_NUMBERFORMAT_VALUE == nWhichId) ? OUString(CHART_UNONAME_NUMFMT) : OUString("PercentageNumberFormat");
96 sal_uInt16 nSourceWhich = (SID_ATTR_NUMBERFORMAT_VALUE == nWhichId) ? SID_ATTR_NUMBERFORMAT_SOURCE : SCHATTR_PERCENT_NUMBERFORMAT_SOURCE;
98 if (SfxItemState::SET != rItemSet.GetItemState(nSourceWhich))
99 return bChanged;
101 uno::Any aValue;
102 bool bUseSourceFormat = (static_cast<const SfxBoolItem&>(rItemSet.Get(nSourceWhich)).GetValue());
103 if (!bUseSourceFormat)
105 SfxItemState aState = rItemSet.GetItemState(nWhichId);
106 if (aState == SfxItemState::SET)
108 sal_Int32 nFmt = static_cast<sal_Int32>(
109 static_cast<const SfxUInt32Item&>(
110 rItemSet.Get(nWhichId)).GetValue());
111 aValue = uno::makeAny(nFmt);
113 else
114 return bChanged;
117 uno::Any aOldValue = xPropertySet->getPropertyValue(aPropertyName);
118 if (bOverwriteDataPoints)
120 Reference<chart2::XDataSeries> xSeries(xPropertySet, uno::UNO_QUERY);
121 if (aValue != aOldValue ||
122 ::chart::DataSeriesHelper::hasAttributedDataPointDifferentValue(xSeries, aPropertyName, aOldValue))
124 ::chart::DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints(xSeries, aPropertyName, aValue);
125 bChanged = true;
128 else if (aOldValue != aValue)
130 xPropertySet->setPropertyValue(aPropertyName, aValue);
131 bChanged = true;
133 return bChanged;
136 bool useSourceFormatFromItemToPropertySet(
137 sal_uInt16 nWhichId, const SfxItemSet& rItemSet, const uno::Reference<beans::XPropertySet>& xPropertySet,
138 bool bOverwriteDataPoints )
140 bool bChanged = false;
141 if (!xPropertySet.is())
142 return bChanged;
143 OUString aPropertyName = (SID_ATTR_NUMBERFORMAT_SOURCE == nWhichId) ? OUString(CHART_UNONAME_NUMFMT) : OUString("PercentageNumberFormat");
144 sal_uInt16 nFormatWhich = (SID_ATTR_NUMBERFORMAT_SOURCE == nWhichId) ? SID_ATTR_NUMBERFORMAT_VALUE : SCHATTR_PERCENT_NUMBERFORMAT_VALUE;
146 if (SfxItemState::SET != rItemSet.GetItemState(nWhichId))
147 return bChanged;
149 uno::Any aNewValue;
150 bool bUseSourceFormat = (static_cast<const SfxBoolItem&>(
151 rItemSet.Get(nWhichId)).GetValue());
152 if (!bUseSourceFormat)
154 SfxItemState aState = rItemSet.GetItemState(nFormatWhich);
155 if (aState == SfxItemState::SET)
157 sal_Int32 nFormatKey = static_cast<sal_Int32>(
158 static_cast<const SfxUInt32Item&>(
159 rItemSet.Get(nFormatWhich)).GetValue());
160 aNewValue <<= nFormatKey;
162 else
163 return bChanged;
166 uno::Any aOldValue(xPropertySet->getPropertyValue(aPropertyName));
167 if (bOverwriteDataPoints)
169 Reference<chart2::XDataSeries> xSeries(xPropertySet, uno::UNO_QUERY);
170 if (aNewValue != aOldValue ||
171 ::chart::DataSeriesHelper::hasAttributedDataPointDifferentValue(xSeries, aPropertyName, aOldValue))
173 ::chart::DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints(xSeries, aPropertyName, aNewValue);
174 bChanged = true;
177 else if (aOldValue != aNewValue)
179 xPropertySet->setPropertyValue(aPropertyName, aNewValue);
180 bChanged = true;
183 return bChanged;
186 } // anonymous namespace
188 TextLabelItemConverter::TextLabelItemConverter(
189 const uno::Reference<frame::XModel>& xChartModel,
190 const uno::Reference<beans::XPropertySet>& rPropertySet,
191 const uno::Reference<XDataSeries>& xSeries,
192 SfxItemPool& rItemPool, const awt::Size* pRefSize,
193 bool bDataSeries, sal_Int32 nNumberFormat, sal_Int32 nPercentNumberFormat ) :
194 ItemConverter(rPropertySet, rItemPool),
195 mnNumberFormat(nNumberFormat),
196 mnPercentNumberFormat(nPercentNumberFormat),
197 mbDataSeries(bDataSeries),
198 mbForbidPercentValue(true)
200 maConverters.push_back(new CharacterPropertyItemConverter(rPropertySet, rItemPool, pRefSize, "ReferencePageSize"));
202 uno::Reference<XDiagram> xDiagram(ChartModelHelper::findDiagram(xChartModel));
203 uno::Reference<XChartType> xChartType(DiagramHelper::getChartTypeOfSeries(xDiagram, xSeries));
204 bool bFound = false;
205 bool bAmbiguous = false;
206 bool bSwapXAndY = DiagramHelper::getVertical(xDiagram, bFound, bAmbiguous);
207 maAvailableLabelPlacements = ChartTypeHelper::getSupportedLabelPlacements(xChartType, DiagramHelper::getDimension(xDiagram), bSwapXAndY, xSeries);
209 mbForbidPercentValue = AxisType::CATEGORY != ChartTypeHelper::getAxisType(xChartType, 0);
212 TextLabelItemConverter::~TextLabelItemConverter()
214 std::for_each(maConverters.begin(), maConverters.end(), boost::checked_deleter<ItemConverter>());
217 void TextLabelItemConverter::FillItemSet( SfxItemSet& rOutItemSet ) const
219 std::for_each(maConverters.begin(), maConverters.end(),
220 FillItemSetFunc(rOutItemSet));
222 // own items
223 ItemConverter::FillItemSet(rOutItemSet);
226 bool TextLabelItemConverter::ApplyItemSet( const SfxItemSet& rItemSet )
228 bool bResult = false;
230 std::for_each(maConverters.begin(), maConverters.end(),
231 ApplyItemSetFunc(rItemSet, bResult));
233 // own items
234 return ItemConverter::ApplyItemSet(rItemSet) || bResult;
237 const sal_uInt16* TextLabelItemConverter::GetWhichPairs() const
239 // must span all used items!
240 return nTextLabelWhichPairs;
243 bool TextLabelItemConverter::GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId& rOutProperty ) const
245 const ItemPropertyMapType& rMap = getTextLabelPropertyMap();
246 ItemPropertyMapType::const_iterator it = rMap.find(nWhichId);
248 if (it == rMap.end())
249 return false;
251 rOutProperty = it->second;
252 return true;
255 bool TextLabelItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet& rItemSet )
256 throw (uno::Exception)
258 bool bChanged = false;
260 switch (nWhichId)
262 case SCHATTR_DATADESCR_SHOW_NUMBER:
263 case SCHATTR_DATADESCR_SHOW_PERCENTAGE:
264 case SCHATTR_DATADESCR_SHOW_CATEGORY:
265 case SCHATTR_DATADESCR_SHOW_SYMBOL:
267 const SfxBoolItem& rItem = static_cast<const SfxBoolItem&>(rItemSet.Get(nWhichId));
269 uno::Any aOldValue = GetPropertySet()->getPropertyValue(CHART_UNONAME_LABEL);
270 chart2::DataPointLabel aLabel;
271 if (aOldValue >>= aLabel)
273 sal_Bool& rValue = (SCHATTR_DATADESCR_SHOW_NUMBER == nWhichId) ? aLabel.ShowNumber : (
274 (SCHATTR_DATADESCR_SHOW_PERCENTAGE == nWhichId) ? aLabel.ShowNumberInPercent : (
275 (SCHATTR_DATADESCR_SHOW_CATEGORY == nWhichId) ? aLabel.ShowCategoryName : aLabel.ShowLegendSymbol));
276 bool bOldValue = rValue;
277 rValue = rItem.GetValue();
278 if (mbDataSeries)
280 Reference<chart2::XDataSeries> xSeries(GetPropertySet(), uno::UNO_QUERY);
281 if (bOldValue != bool(rValue) ||
282 DataSeriesHelper::hasAttributedDataPointDifferentValue(xSeries, CHART_UNONAME_LABEL, aOldValue))
284 DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints(xSeries, CHART_UNONAME_LABEL, uno::makeAny(aLabel));
285 bChanged = true;
288 else if (bOldValue != bool(rValue))
290 GetPropertySet()->setPropertyValue(CHART_UNONAME_LABEL, uno::makeAny(aLabel));
291 bChanged = true;
295 break;
296 case SID_ATTR_NUMBERFORMAT_VALUE:
297 case SCHATTR_PERCENT_NUMBERFORMAT_VALUE: //fall through intended
299 bChanged = numberFormatFromItemToPropertySet(nWhichId, rItemSet, GetPropertySet(), mbDataSeries);
301 break;
302 case SID_ATTR_NUMBERFORMAT_SOURCE:
303 case SCHATTR_PERCENT_NUMBERFORMAT_SOURCE: //fall through intended
305 bChanged = useSourceFormatFromItemToPropertySet(nWhichId, rItemSet, GetPropertySet(), mbDataSeries);
307 break;
308 case SCHATTR_DATADESCR_SEPARATOR:
310 OUString aNewValue = static_cast<const SfxStringItem&>(rItemSet.Get(nWhichId)).GetValue();
311 OUString aOldValue;
314 GetPropertySet()->getPropertyValue("LabelSeparator") >>= aOldValue;
315 if (mbDataSeries)
317 Reference<chart2::XDataSeries> xSeries(GetPropertySet(), uno::UNO_QUERY);
318 if (!aOldValue.equals(aNewValue) ||
319 DataSeriesHelper::hasAttributedDataPointDifferentValue(xSeries, "LabelSeparator", uno::makeAny(aOldValue)))
321 DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints(xSeries, "LabelSeparator", uno::makeAny(aNewValue));
322 bChanged = true;
325 else if (!aOldValue.equals(aNewValue))
327 GetPropertySet()->setPropertyValue("LabelSeparator", uno::makeAny(aNewValue));
328 bChanged = true;
331 catch (const uno::Exception& e)
333 ASSERT_EXCEPTION(e);
336 break;
337 case SCHATTR_DATADESCR_PLACEMENT:
341 sal_Int32 nNew = static_cast<const SfxInt32Item&>(rItemSet.Get(nWhichId)).GetValue();
342 sal_Int32 nOld = 0;
343 if (!(GetPropertySet()->getPropertyValue("LabelPlacement") >>= nOld))
345 if (maAvailableLabelPlacements.getLength())
346 nOld = maAvailableLabelPlacements[0];
348 if (mbDataSeries)
350 Reference<chart2::XDataSeries> xSeries(GetPropertySet(), uno::UNO_QUERY);
351 if (nOld != nNew ||
352 DataSeriesHelper::hasAttributedDataPointDifferentValue(xSeries, "LabelPlacement", uno::makeAny(nOld)))
354 DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints(xSeries, "LabelPlacement", uno::makeAny(nNew));
355 bChanged = true;
358 else if (nOld != nNew)
360 GetPropertySet()->setPropertyValue("LabelPlacement", uno::makeAny(nNew));
361 bChanged = true;
364 catch (const uno::Exception& e)
366 ASSERT_EXCEPTION(e);
369 break;
370 case SCHATTR_STYLE_SYMBOL:
372 sal_Int32 nStyle =
373 static_cast<const SfxInt32Item&>(
374 rItemSet.Get(nWhichId)).GetValue();
375 chart2::Symbol aSymbol;
377 GetPropertySet()->getPropertyValue("Symbol") >>= aSymbol;
378 sal_Int32 nOldStyle = getSymbolStyleForSymbol(aSymbol);
380 if (nStyle != nOldStyle)
382 bool bDeleteSymbol = false;
383 switch (nStyle)
385 case SVX_SYMBOLTYPE_NONE:
386 aSymbol.Style = chart2::SymbolStyle_NONE;
387 break;
388 case SVX_SYMBOLTYPE_AUTO:
389 aSymbol.Style = chart2::SymbolStyle_AUTO;
390 break;
391 case SVX_SYMBOLTYPE_BRUSHITEM:
392 aSymbol.Style = chart2::SymbolStyle_GRAPHIC;
393 break;
394 case SVX_SYMBOLTYPE_UNKNOWN:
395 bDeleteSymbol = true;
396 break;
398 default:
399 aSymbol.Style = chart2::SymbolStyle_STANDARD;
400 aSymbol.StandardSymbol = nStyle;
403 if (bDeleteSymbol)
404 GetPropertySet()->setPropertyValue("Symbol", uno::Any());
405 else
406 GetPropertySet()->setPropertyValue("Symbol", uno::makeAny(aSymbol));
407 bChanged = true;
410 break;
411 case SCHATTR_SYMBOL_SIZE:
413 Size aSize = static_cast<const SvxSizeItem&>(
414 rItemSet.Get(nWhichId)).GetSize();
415 chart2::Symbol aSymbol;
417 GetPropertySet()->getPropertyValue("Symbol") >>= aSymbol;
418 if (aSize.getWidth() != aSymbol.Size.Width ||
419 aSize.getHeight() != aSymbol.Size.Height)
421 aSymbol.Size.Width = aSize.getWidth();
422 aSymbol.Size.Height = aSize.getHeight();
424 GetPropertySet()->setPropertyValue("Symbol", uno::makeAny(aSymbol));
425 bChanged = true;
428 break;
429 case SCHATTR_SYMBOL_BRUSH:
431 const SvxBrushItem& rBrshItem(static_cast<const SvxBrushItem&>(
432 rItemSet.Get(nWhichId)));
433 uno::Any aXGraphicAny;
434 const Graphic* pGraphic(rBrshItem.GetGraphic());
435 if (pGraphic)
437 uno::Reference<graphic::XGraphic> xGraphic(pGraphic->GetXGraphic());
438 if (xGraphic.is())
440 aXGraphicAny <<= xGraphic;
441 chart2::Symbol aSymbol;
442 GetPropertySet()->getPropertyValue("Symbol") >>= aSymbol;
443 if (aSymbol.Graphic != xGraphic)
445 aSymbol.Graphic = xGraphic;
446 GetPropertySet()->setPropertyValue("Symbol", uno::makeAny(aSymbol));
447 bChanged = true;
452 break;
453 case SCHATTR_TEXT_DEGREES:
455 double fValue = static_cast<double>(
456 static_cast<const SfxInt32Item&>(
457 rItemSet.Get(nWhichId)).GetValue()) / 100.0;
458 double fOldValue = 0.0;
459 bool bPropExisted =
460 (GetPropertySet()->getPropertyValue("TextRotation") >>= fOldValue);
462 if (!bPropExisted ||
463 (bPropExisted && fOldValue != fValue))
465 GetPropertySet()->setPropertyValue("TextRotation", uno::makeAny(fValue));
466 bChanged = true;
469 break;
472 return bChanged;
475 void TextLabelItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet& rOutItemSet ) const
476 throw (uno::Exception)
478 switch (nWhichId)
480 case SCHATTR_DATADESCR_SHOW_NUMBER:
481 case SCHATTR_DATADESCR_SHOW_PERCENTAGE:
482 case SCHATTR_DATADESCR_SHOW_CATEGORY:
483 case SCHATTR_DATADESCR_SHOW_SYMBOL:
485 chart2::DataPointLabel aLabel;
486 if (GetPropertySet()->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabel)
488 bool bValue = (SCHATTR_DATADESCR_SHOW_NUMBER == nWhichId) ? aLabel.ShowNumber : (
489 (SCHATTR_DATADESCR_SHOW_PERCENTAGE == nWhichId) ? aLabel.ShowNumberInPercent : (
490 (SCHATTR_DATADESCR_SHOW_CATEGORY == nWhichId) ? aLabel.ShowCategoryName : aLabel.ShowLegendSymbol));
492 rOutItemSet.Put(SfxBoolItem(nWhichId, bValue));
494 if (mbDataSeries)
496 if (DataSeriesHelper::hasAttributedDataPointDifferentValue(
497 Reference<chart2::XDataSeries>(GetPropertySet(), uno::UNO_QUERY), CHART_UNONAME_LABEL, uno::makeAny(aLabel)))
499 rOutItemSet.InvalidateItem(nWhichId);
504 break;
505 case SID_ATTR_NUMBERFORMAT_VALUE:
507 sal_Int32 nKey = 0;
508 if (!(GetPropertySet()->getPropertyValue(CHART_UNONAME_NUMFMT) >>= nKey))
509 nKey = mnNumberFormat;
510 rOutItemSet.Put(SfxUInt32Item(nWhichId, nKey));
512 break;
513 case SCHATTR_PERCENT_NUMBERFORMAT_VALUE:
515 sal_Int32 nKey = 0;
516 if (!(GetPropertySet()->getPropertyValue("PercentageNumberFormat") >>= nKey))
517 nKey = mnPercentNumberFormat;
518 rOutItemSet.Put(SfxUInt32Item(nWhichId, nKey));
520 break;
521 case SID_ATTR_NUMBERFORMAT_SOURCE:
523 bool bNumberFormatIsSet = GetPropertySet()->getPropertyValue(CHART_UNONAME_NUMFMT).hasValue();
524 rOutItemSet.Put(SfxBoolItem(nWhichId, !bNumberFormatIsSet));
526 break;
527 case SCHATTR_PERCENT_NUMBERFORMAT_SOURCE:
529 bool bNumberFormatIsSet = (GetPropertySet()->getPropertyValue("PercentageNumberFormat").hasValue());
530 rOutItemSet.Put(SfxBoolItem(nWhichId, !bNumberFormatIsSet));
532 break;
533 case SCHATTR_DATADESCR_SEPARATOR:
535 OUString aValue;
538 GetPropertySet()->getPropertyValue("LabelSeparator") >>= aValue;
539 rOutItemSet.Put(SfxStringItem(nWhichId, aValue));
541 catch (const uno::Exception& e)
543 ASSERT_EXCEPTION(e);
546 break;
547 case SCHATTR_DATADESCR_PLACEMENT:
551 sal_Int32 nPlacement = 0;
552 if (GetPropertySet()->getPropertyValue("LabelPlacement") >>= nPlacement)
553 rOutItemSet.Put(SfxInt32Item(nWhichId, nPlacement));
554 else if (maAvailableLabelPlacements.getLength())
555 rOutItemSet.Put(SfxInt32Item(nWhichId, maAvailableLabelPlacements[0]));
557 catch (const uno::Exception& e)
559 ASSERT_EXCEPTION(e);
562 break;
563 case SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS:
565 rOutItemSet.Put(SfxIntegerListItem(nWhichId, maAvailableLabelPlacements));
567 break;
568 case SCHATTR_DATADESCR_NO_PERCENTVALUE:
570 rOutItemSet.Put(SfxBoolItem(nWhichId, mbForbidPercentValue));
572 break;
573 case SCHATTR_STYLE_SYMBOL:
575 chart2::Symbol aSymbol;
576 if (GetPropertySet()->getPropertyValue("Symbol") >>= aSymbol)
577 rOutItemSet.Put(SfxInt32Item(nWhichId, getSymbolStyleForSymbol(aSymbol)));
579 break;
580 case SCHATTR_SYMBOL_SIZE:
582 chart2::Symbol aSymbol;
583 if (GetPropertySet()->getPropertyValue("Symbol") >>= aSymbol)
584 rOutItemSet.Put(
585 SvxSizeItem(nWhichId, Size(aSymbol.Size.Width, aSymbol.Size.Height)));
587 break;
588 case SCHATTR_SYMBOL_BRUSH:
590 chart2::Symbol aSymbol;
591 if ((GetPropertySet()->getPropertyValue("Symbol") >>= aSymbol)
592 && aSymbol.Graphic.is())
594 rOutItemSet.Put(
595 SvxBrushItem(Graphic(aSymbol.Graphic), GPOS_MM, SCHATTR_SYMBOL_BRUSH));
598 break;
599 case SCHATTR_TEXT_DEGREES:
601 double fValue = 0;
603 if (GetPropertySet()->getPropertyValue("TextRotation") >>= fValue)
605 rOutItemSet.Put(
606 SfxInt32Item(nWhichId, static_cast<sal_Int32>(rtl::math::round(fValue * 100.0))));
609 break;
615 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */