svdattr.cxx (c0739476) | svdattr.cxx (26734c99) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 11 unchanged lines hidden (view full) --- 20 *************************************************************/ 21 22 23 24// MARKER(update_precomp.py): autogen include statement, do not remove 25#include "precompiled_svx.hxx" 26 27 | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 11 unchanged lines hidden (view full) --- 20 *************************************************************/ 21 22 23 24// MARKER(update_precomp.py): autogen include statement, do not remove 25#include "precompiled_svx.hxx" 26 27 |
28#include <com/sun/star/drawing/TextFitToSizeType.hpp> |
|
28#include <com/sun/star/drawing/TextHorizontalAdjust.hpp> 29#include <com/sun/star/drawing/TextVerticalAdjust.hpp> 30#include <com/sun/star/drawing/TextAnimationKind.hpp> 31#include <com/sun/star/uno/Any.hxx> 32#include <com/sun/star/drawing/TextAnimationDirection.hpp> 33#include <com/sun/star/drawing/ConnectorType.hpp> 34#include <com/sun/star/drawing/MeasureKind.hpp> 35#include <com/sun/star/drawing/MeasureTextHorzPos.hpp> --- 1052 unchanged lines hidden (view full) --- 1088 return ePres; 1089} 1090 1091//////////////////////////////////////////////////////////////////////////////// 1092// MiscItems 1093//////////////////////////////////////////////////////////////////////////////// 1094 1095// FitToSize | 29#include <com/sun/star/drawing/TextHorizontalAdjust.hpp> 30#include <com/sun/star/drawing/TextVerticalAdjust.hpp> 31#include <com/sun/star/drawing/TextAnimationKind.hpp> 32#include <com/sun/star/uno/Any.hxx> 33#include <com/sun/star/drawing/TextAnimationDirection.hpp> 34#include <com/sun/star/drawing/ConnectorType.hpp> 35#include <com/sun/star/drawing/MeasureKind.hpp> 36#include <com/sun/star/drawing/MeasureTextHorzPos.hpp> --- 1052 unchanged lines hidden (view full) --- 1089 return ePres; 1090} 1091 1092//////////////////////////////////////////////////////////////////////////////// 1093// MiscItems 1094//////////////////////////////////////////////////////////////////////////////// 1095 1096// FitToSize |
1096TYPEINIT1_AUTOFACTORY(SdrTextFitToSizeTypeItem,SfxBoolItem); | 1097TYPEINIT1_AUTOFACTORY(SdrTextFitToSizeTypeItem,SfxEnumItem); |
1097 | 1098 |
1098SfxPoolItem* __EXPORT SdrTextFitToSizeTypeItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrTextFitToSizeTypeItem(*this); } | 1099SfxPoolItem* __EXPORT SdrTextFitToSizeTypeItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrTextFitToSizeTypeItem(*this); } |
1099 1100SfxPoolItem* __EXPORT SdrTextFitToSizeTypeItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new SdrTextFitToSizeTypeItem(rIn); } 1101 | 1100 1101SfxPoolItem* __EXPORT SdrTextFitToSizeTypeItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new SdrTextFitToSizeTypeItem(rIn); } 1102 |
1102XubString __EXPORT SdrTextFitToSizeTypeItem::GetValueTextByVal(sal_Bool bVal) const | 1103sal_uInt16 __EXPORT SdrTextFitToSizeTypeItem::GetValueCount() const { return 4; } 1104 1105XubString __EXPORT SdrTextFitToSizeTypeItem::GetValueTextByPos(sal_uInt16 nPos) const |
1103{ | 1106{ |
1104 if (bVal) return ImpGetResStr(STR_ItemValFITTOSIZEPROP); 1105 else return ImpGetResStr(STR_ItemValFITTOSIZENONE); | 1107 return ImpGetResStr(STR_ItemValFITTOSIZENONE+nPos); |
1106} 1107 1108SfxItemPresentation __EXPORT SdrTextFitToSizeTypeItem::GetPresentation(SfxItemPresentation ePres, | 1108} 1109 1110SfxItemPresentation __EXPORT SdrTextFitToSizeTypeItem::GetPresentation(SfxItemPresentation ePres, |
1109 SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const | 1111 SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const |
1110{ | 1112{ |
1111 rText=GetValueTextByVal(GetValue()); | 1113 rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue())); |
1112 if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) { 1113 String aStr; 1114 1115 SdrItemPool::TakeItemName(Which(), aStr); 1116 aStr += sal_Unicode(' '); 1117 rText.Insert(aStr, 0); 1118 } 1119 return ePres; 1120} 1121 | 1114 if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) { 1115 String aStr; 1116 1117 SdrItemPool::TakeItemName(Which(), aStr); 1118 aStr += sal_Unicode(' '); 1119 rText.Insert(aStr, 0); 1120 } 1121 return ePres; 1122} 1123 |
1124int __EXPORT SdrTextFitToSizeTypeItem::HasBoolValue() const { return sal_True; } 1125 1126sal_Bool __EXPORT SdrTextFitToSizeTypeItem::GetBoolValue() const { return GetValue()!=SDRTEXTFIT_NONE; } 1127 1128void __EXPORT SdrTextFitToSizeTypeItem::SetBoolValue(sal_Bool bVal) { SetValue(sal::static_int_cast< sal_uInt16 >(bVal ? SDRTEXTFIT_PROPORTIONAL : SDRTEXTFIT_NONE)); } 1129 1130sal_Bool SdrTextFitToSizeTypeItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const 1131{ 1132 drawing::TextFitToSizeType eFS = (drawing::TextFitToSizeType)GetValue(); 1133 rVal <<= eFS; 1134 1135 return sal_True; 1136} 1137 1138sal_Bool SdrTextFitToSizeTypeItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/) 1139{ 1140 drawing::TextFitToSizeType eFS; 1141 if(!(rVal >>= eFS)) 1142 { 1143 sal_Int32 nEnum = 0; 1144 if(!(rVal >>= nEnum)) 1145 return sal_False; 1146 1147 eFS = (drawing::TextFitToSizeType) nEnum; 1148 } 1149 1150 SetValue( sal::static_int_cast< sal_uInt16 >( (SdrFitToSizeType)eFS ) ); 1151 1152 return sal_True; 1153} 1154 |
|
1122TYPEINIT1_AUTOFACTORY(SdrTextVertAdjustItem,SfxEnumItem); 1123 1124SfxPoolItem* __EXPORT SdrTextVertAdjustItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrTextVertAdjustItem(*this); } 1125 1126SfxPoolItem* __EXPORT SdrTextVertAdjustItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new SdrTextVertAdjustItem(rIn); } 1127 1128sal_uInt16 __EXPORT SdrTextVertAdjustItem::GetValueCount() const { return 5; } 1129 --- 1263 unchanged lines hidden --- | 1155TYPEINIT1_AUTOFACTORY(SdrTextVertAdjustItem,SfxEnumItem); 1156 1157SfxPoolItem* __EXPORT SdrTextVertAdjustItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrTextVertAdjustItem(*this); } 1158 1159SfxPoolItem* __EXPORT SdrTextVertAdjustItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new SdrTextVertAdjustItem(rIn); } 1160 1161sal_uInt16 __EXPORT SdrTextVertAdjustItem::GetValueCount() const { return 5; } 1162 --- 1263 unchanged lines hidden --- |