fontwork.cxx (97e8a929) fontwork.cxx (1e9c32af)
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

--- 104 unchanged lines hidden (view full) ---

113 case SID_FORMTEXT_MIRROR:
114 {
115 const XFormTextMirrorItem* pStateItem =
116 PTR_CAST(XFormTextMirrorItem, pItem);
117 DBG_ASSERT(pStateItem || pItem == 0, "XFormTextMirrorItem erwartet");
118 rFontWorkDlg.SetMirror_Impl(pStateItem);
119 break;
120 }
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

--- 104 unchanged lines hidden (view full) ---

113 case SID_FORMTEXT_MIRROR:
114 {
115 const XFormTextMirrorItem* pStateItem =
116 PTR_CAST(XFormTextMirrorItem, pItem);
117 DBG_ASSERT(pStateItem || pItem == 0, "XFormTextMirrorItem erwartet");
118 rFontWorkDlg.SetMirror_Impl(pStateItem);
119 break;
120 }
121 case SID_FORMTEXT_STDFORM:
122 {
123 const XFormTextStdFormItem* pStateItem =
124 PTR_CAST(XFormTextStdFormItem, pItem);
125 DBG_ASSERT(pStateItem || pItem == 0, "XFormTextStdFormItem erwartet");
126 rFontWorkDlg.SetStdForm_Impl(pStateItem);
127 break;
128 }
129 case SID_FORMTEXT_HIDEFORM:
130 {
131 const XFormTextHideFormItem* pStateItem =
132 PTR_CAST(XFormTextHideFormItem, pItem);
133 DBG_ASSERT(pStateItem || pItem == 0, "XFormTextHideFormItem erwartet");
134 rFontWorkDlg.SetShowForm_Impl(pStateItem);
135 break;
136 }

--- 73 unchanged lines hidden (view full) ---

210\************************************************************************/
211
212SvxFontWorkDialog::SvxFontWorkDialog( SfxBindings *pBindinx,
213 SfxChildWindow *pCW,
214 Window* _pParent,
215 const ResId& rResId ) :
216 SfxDockingWindow( pBindinx, pCW, _pParent, rResId ),
217
121 case SID_FORMTEXT_HIDEFORM:
122 {
123 const XFormTextHideFormItem* pStateItem =
124 PTR_CAST(XFormTextHideFormItem, pItem);
125 DBG_ASSERT(pStateItem || pItem == 0, "XFormTextHideFormItem erwartet");
126 rFontWorkDlg.SetShowForm_Impl(pStateItem);
127 break;
128 }

--- 73 unchanged lines hidden (view full) ---

202\************************************************************************/
203
204SvxFontWorkDialog::SvxFontWorkDialog( SfxBindings *pBindinx,
205 SfxChildWindow *pCW,
206 Window* _pParent,
207 const ResId& rResId ) :
208 SfxDockingWindow( pBindinx, pCW, _pParent, rResId ),
209
218 aFormSet (this, ResId(VS_FORMS,*rResId.GetResMgr())),
219
220 aTbxStyle (this, ResId(TBX_STYLE,*rResId.GetResMgr())),
221 aTbxAdjust (this, ResId(TBX_ADJUST,*rResId.GetResMgr())),
222
223 aFbDistance (this, ResId(FB_DISTANCE,*rResId.GetResMgr())),
224 aMtrFldDistance (this, ResId(MTR_FLD_DISTANCE,*rResId.GetResMgr())),
225 aFbTextStart (this, ResId(FB_TEXTSTART,*rResId.GetResMgr())),
226 aMtrFldTextStart(this, ResId(MTR_FLD_TEXTSTART,*rResId.GetResMgr())),
227

--- 24 unchanged lines hidden (view full) ---

252
253 ApplyImageList();
254
255 pCtrlItems[0] = new SvxFontWorkControllerItem(SID_FORMTEXT_STYLE, *this, rBindings);
256 pCtrlItems[1] = new SvxFontWorkControllerItem(SID_FORMTEXT_ADJUST, *this, rBindings);
257 pCtrlItems[2] = new SvxFontWorkControllerItem(SID_FORMTEXT_DISTANCE, *this, rBindings);
258 pCtrlItems[3] = new SvxFontWorkControllerItem(SID_FORMTEXT_START, *this, rBindings);
259 pCtrlItems[4] = new SvxFontWorkControllerItem(SID_FORMTEXT_MIRROR, *this, rBindings);
210 aTbxStyle (this, ResId(TBX_STYLE,*rResId.GetResMgr())),
211 aTbxAdjust (this, ResId(TBX_ADJUST,*rResId.GetResMgr())),
212
213 aFbDistance (this, ResId(FB_DISTANCE,*rResId.GetResMgr())),
214 aMtrFldDistance (this, ResId(MTR_FLD_DISTANCE,*rResId.GetResMgr())),
215 aFbTextStart (this, ResId(FB_TEXTSTART,*rResId.GetResMgr())),
216 aMtrFldTextStart(this, ResId(MTR_FLD_TEXTSTART,*rResId.GetResMgr())),
217

--- 24 unchanged lines hidden (view full) ---

242
243 ApplyImageList();
244
245 pCtrlItems[0] = new SvxFontWorkControllerItem(SID_FORMTEXT_STYLE, *this, rBindings);
246 pCtrlItems[1] = new SvxFontWorkControllerItem(SID_FORMTEXT_ADJUST, *this, rBindings);
247 pCtrlItems[2] = new SvxFontWorkControllerItem(SID_FORMTEXT_DISTANCE, *this, rBindings);
248 pCtrlItems[3] = new SvxFontWorkControllerItem(SID_FORMTEXT_START, *this, rBindings);
249 pCtrlItems[4] = new SvxFontWorkControllerItem(SID_FORMTEXT_MIRROR, *this, rBindings);
260 pCtrlItems[5] = new SvxFontWorkControllerItem(SID_FORMTEXT_STDFORM, *this, rBindings);
261 pCtrlItems[6] = new SvxFontWorkControllerItem(SID_FORMTEXT_HIDEFORM, *this, rBindings);
262 pCtrlItems[7] = new SvxFontWorkControllerItem(SID_FORMTEXT_OUTLINE, *this, rBindings);
263 pCtrlItems[8] = new SvxFontWorkControllerItem(SID_FORMTEXT_SHADOW, *this, rBindings);
264 pCtrlItems[9] = new SvxFontWorkControllerItem(SID_FORMTEXT_SHDWCOLOR, *this, rBindings);
265 pCtrlItems[10] = new SvxFontWorkControllerItem(SID_FORMTEXT_SHDWXVAL, *this, rBindings);
266 pCtrlItems[11] = new SvxFontWorkControllerItem(SID_FORMTEXT_SHDWYVAL, *this, rBindings);
250 pCtrlItems[5] = new SvxFontWorkControllerItem(SID_FORMTEXT_HIDEFORM, *this, rBindings);
251 pCtrlItems[6] = new SvxFontWorkControllerItem(SID_FORMTEXT_OUTLINE, *this, rBindings);
252 pCtrlItems[7] = new SvxFontWorkControllerItem(SID_FORMTEXT_SHADOW, *this, rBindings);
253 pCtrlItems[8] = new SvxFontWorkControllerItem(SID_FORMTEXT_SHDWCOLOR, *this, rBindings);
254 pCtrlItems[9] = new SvxFontWorkControllerItem(SID_FORMTEXT_SHDWXVAL, *this, rBindings);
255 pCtrlItems[10] = new SvxFontWorkControllerItem(SID_FORMTEXT_SHDWYVAL, *this, rBindings);
267
256
268 WinBits aNewStyle = ( aFormSet.GetStyle() | WB_VSCROLL | WB_ITEMBORDER | WB_DOUBLEBORDER );
269 aFormSet.SetStyle( aNewStyle );
270
271 Size aSize = aTbxStyle.CalcWindowSizePixel();
272 aTbxStyle.SetSizePixel(aSize);
273 aTbxStyle.SetSelectHdl( LINK(this, SvxFontWorkDialog, SelectStyleHdl_Impl) );
274
275 aTbxAdjust.SetSizePixel(aSize);
276 aTbxAdjust.SetSelectHdl( LINK(this, SvxFontWorkDialog, SelectAdjustHdl_Impl) );
277
278 aTbxShadow.SetSizePixel(aSize);
279 aTbxShadow.SetSelectHdl( LINK(this, SvxFontWorkDialog, SelectShadowHdl_Impl) );
280
257 Size aSize = aTbxStyle.CalcWindowSizePixel();
258 aTbxStyle.SetSizePixel(aSize);
259 aTbxStyle.SetSelectHdl( LINK(this, SvxFontWorkDialog, SelectStyleHdl_Impl) );
260
261 aTbxAdjust.SetSizePixel(aSize);
262 aTbxAdjust.SetSelectHdl( LINK(this, SvxFontWorkDialog, SelectAdjustHdl_Impl) );
263
264 aTbxShadow.SetSizePixel(aSize);
265 aTbxShadow.SetSelectHdl( LINK(this, SvxFontWorkDialog, SelectShadowHdl_Impl) );
266
281// aFbShadowX.SetBitmap(Bitmap(FW_RESID(RID_SVXBMP_SHADOW_XDIST)));
282// aFbShadowY.SetBitmap(Bitmap(FW_RESID(RID_SVXBMP_SHADOW_YDIST)));
283
284 Link aLink = LINK(this, SvxFontWorkDialog, ModifyInputHdl_Impl);
285 aMtrFldDistance.SetModifyHdl( aLink );
286 aMtrFldTextStart.SetModifyHdl( aLink );
287 aMtrFldShadowX.SetModifyHdl( aLink );
288 aMtrFldShadowY.SetModifyHdl( aLink );
289
290 // System-Metrik setzen
291 const FieldUnit eDlgUnit = rBindings.GetDispatcher()->GetModule()->GetFieldUnit();

--- 15 unchanged lines hidden (view full) ---

307 aMtrFldShadowX.SetSpinSize( 10 );
308 aMtrFldShadowY.SetSpinSize( 10 );
309 }
310
311 aShadowColorLB.SetSelectHdl( LINK(this, SvxFontWorkDialog, ColorSelectHdl_Impl) );
312
313 aInputTimer.SetTimeout(500);
314 aInputTimer.SetTimeoutHdl(LINK(this, SvxFontWorkDialog, InputTimoutHdl_Impl));
267 Link aLink = LINK(this, SvxFontWorkDialog, ModifyInputHdl_Impl);
268 aMtrFldDistance.SetModifyHdl( aLink );
269 aMtrFldTextStart.SetModifyHdl( aLink );
270 aMtrFldShadowX.SetModifyHdl( aLink );
271 aMtrFldShadowY.SetModifyHdl( aLink );
272
273 // System-Metrik setzen
274 const FieldUnit eDlgUnit = rBindings.GetDispatcher()->GetModule()->GetFieldUnit();

--- 15 unchanged lines hidden (view full) ---

290 aMtrFldShadowX.SetSpinSize( 10 );
291 aMtrFldShadowY.SetSpinSize( 10 );
292 }
293
294 aShadowColorLB.SetSelectHdl( LINK(this, SvxFontWorkDialog, ColorSelectHdl_Impl) );
295
296 aInputTimer.SetTimeout(500);
297 aInputTimer.SetTimeoutHdl(LINK(this, SvxFontWorkDialog, InputTimoutHdl_Impl));
315
316 aFormSet.SetSelectHdl( LINK(this, SvxFontWorkDialog, FormSelectHdl_Impl) );
317 aFormSet.SetColCount(4);
318 aFormSet.SetLineCount(2);
319
320 Bitmap aBmp(SVX_RES(RID_SVXBMP_FONTWORK_FORM1));
321 aSize.Height() = aFormSet.CalcWindowSizePixel(aBmp.GetSizePixel()).Height() + 2;
322 aFormSet.SetSizePixel(aSize);
323}
324
325/*************************************************************************
326|*
327|* Destruktor
328|*
329\************************************************************************/
330

--- 184 unchanged lines hidden (view full) ---

515void SvxFontWorkDialog::SetMirror_Impl(const XFormTextMirrorItem* pItem)
516{
517 if ( pItem )
518 aTbxAdjust.CheckItem(TBI_ADJUST_MIRROR, pItem->GetValue());
519}
520
521/*************************************************************************
522|*
298}
299
300/*************************************************************************
301|*
302|* Destruktor
303|*
304\************************************************************************/
305

--- 184 unchanged lines hidden (view full) ---

490void SvxFontWorkDialog::SetMirror_Impl(const XFormTextMirrorItem* pItem)
491{
492 if ( pItem )
493 aTbxAdjust.CheckItem(TBI_ADJUST_MIRROR, pItem->GetValue());
494}
495
496/*************************************************************************
497|*
523|* Standardform im ValueSet anzeigen
524|*
525\************************************************************************/
526
527void SvxFontWorkDialog::SetStdForm_Impl(const XFormTextStdFormItem* pItem)
528{
529 if ( pItem )
530 {
531 aFormSet.Enable();
532 aFormSet.SetNoSelection();
533
534 if ( pItem->GetValue() != XFTFORM_NONE )
535 aFormSet.SelectItem(
536 sal::static_int_cast< sal_uInt16 >(pItem->GetValue()));
537 }
538 else
539 aFormSet.Disable();
540}
541
542/*************************************************************************
543|*
544|* Button fuer Konturanzeige setzen
545|*
546\************************************************************************/
547
548void SvxFontWorkDialog::SetShowForm_Impl(const XFormTextHideFormItem* pItem)
549{
550 if ( pItem )
551 aTbxShadow.CheckItem(TBI_SHOWFORM, !pItem->GetValue());

--- 377 unchanged lines hidden (view full) ---

929 &aStartItem, &aShadowXItem, &aShadowYItem, 0L );
930 return 0;
931}
932
933/*************************************************************************
934|*
935\************************************************************************/
936
498|* Button fuer Konturanzeige setzen
499|*
500\************************************************************************/
501
502void SvxFontWorkDialog::SetShowForm_Impl(const XFormTextHideFormItem* pItem)
503{
504 if ( pItem )
505 aTbxShadow.CheckItem(TBI_SHOWFORM, !pItem->GetValue());

--- 377 unchanged lines hidden (view full) ---

883 &aStartItem, &aShadowXItem, &aShadowYItem, 0L );
884 return 0;
885}
886
887/*************************************************************************
888|*
889\************************************************************************/
890
937IMPL_LINK( SvxFontWorkDialog, FormSelectHdl_Impl, void *, EMPTYARG )
938{
939 XFormTextStdFormItem aItem;
940
941 if ( aFormSet.IsNoSelection() )
942 aItem.SetValue(XFTFORM_NONE);
943 else
944 aItem.SetValue(aFormSet.GetSelectItemId());
945 GetBindings().GetDispatcher()->Execute( SID_FORMTEXT_STDFORM, SFX_CALLMODE_RECORD, &aItem, 0L );
946 aFormSet.SetNoSelection();
947 return 0;
948}
949
950/*************************************************************************
951|*
952\************************************************************************/
953
954IMPL_LINK( SvxFontWorkDialog, ColorSelectHdl_Impl, void *, EMPTYARG )
955{
956// Changed by obo. Linux-Compiler can't parse commented lines
957 XFormTextShadowColorItem aItem( (const String &) String(),
958 (const Color &) aShadowColorLB.GetSelectEntryColor() );
959// XFormTextShadowColorItem aItem( String(),
960// aShadowColorLB.GetSelectEntryColor() );
961 GetBindings().GetDispatcher()->Execute( SID_FORMTEXT_SHDWCOLOR, SFX_CALLMODE_RECORD, &aItem, 0L );
962 return 0;
963}
964
965/*************************************************************************
966|*
967\************************************************************************/
968
891IMPL_LINK( SvxFontWorkDialog, ColorSelectHdl_Impl, void *, EMPTYARG )
892{
893// Changed by obo. Linux-Compiler can't parse commented lines
894 XFormTextShadowColorItem aItem( (const String &) String(),
895 (const Color &) aShadowColorLB.GetSelectEntryColor() );
896// XFormTextShadowColorItem aItem( String(),
897// aShadowColorLB.GetSelectEntryColor() );
898 GetBindings().GetDispatcher()->Execute( SID_FORMTEXT_SHDWCOLOR, SFX_CALLMODE_RECORD, &aItem, 0L );
899 return 0;
900}
901
902/*************************************************************************
903|*
904\************************************************************************/
905
969void SvxFontWorkDialog::SetColorTable(const XColorList* pTable)
906void SvxFontWorkDialog::SetColorTable(const XColorTable* pTable)
970{
971 if ( pTable && pTable != pColorTable )
972 {
973 pColorTable = pTable;
974 aShadowColorLB.Clear();
975 aShadowColorLB.Fill(pColorTable);
976 }
977}
978
979/*************************************************************************
980|*
981\************************************************************************/
982
983void SvxFontWorkDialog::SetActive(sal_Bool /*bActivate*/)
984{
985}
986
907{
908 if ( pTable && pTable != pColorTable )
909 {
910 pColorTable = pTable;
911 aShadowColorLB.Clear();
912 aShadowColorLB.Fill(pColorTable);
913 }
914}
915
916/*************************************************************************
917|*
918\************************************************************************/
919
920void SvxFontWorkDialog::SetActive(sal_Bool /*bActivate*/)
921{
922}
923
987/*************************************************************************
988|*
989|* Standard-FontWork-Objekt erzeugen
990|*
991\************************************************************************/
992
993void SvxFontWorkDialog::CreateStdFormObj(SdrView& rView, SdrPageView& rPV,
994 const SfxItemSet& rAttr,
995 SdrObject& rOldObj,
996 XFormTextStdForm eForm)
997{
998 SfxItemSet aAttr(*rAttr.GetPool(), XATTR_FORMTXTSTYLE,
999 XATTR_FORMTXTHIDEFORM);
1000 SdrObject* pNewObj = NULL;
1001 Rectangle aRect;
1002 XFormTextAdjust eAdjust = XFT_AUTOSIZE;
1003
1004//-/ rOldObj.TakeAttributes(aAttr, sal_True, sal_False);
1005 aAttr.Put(rOldObj.GetMergedItemSet());
1006
1007 const XFormTextStdFormItem& rOldForm = (const XFormTextStdFormItem&)
1008 aAttr.Get(XATTR_FORMTXTSTDFORM);
1009
1010 aRect = rOldObj.GetSnapRect();
1011
1012 if ( !rOldObj.ISA(SdrPathObj) )
1013 {
1014 Point aPos = aRect.TopLeft();
1015 aRect = rOldObj.GetLogicRect();
1016 aRect.SetPos(aPos);
1017 }
1018
1019 aAttr.Put(rAttr);
1020
1021 if ( rOldForm.GetValue() == XFTFORM_NONE )
1022 {
1023 long nW = aRect.GetWidth();
1024 aRect.SetSize(Size(nW, nW));
1025 aAttr.Put(XFormTextStyleItem(XFT_ROTATE));
1026 }
1027
1028 Point aCenter = aRect.Center();
1029
1030 switch ( eForm )
1031 {
1032 case XFTFORM_TOPCIRC:
1033 case XFTFORM_BOTCIRC:
1034 case XFTFORM_LFTCIRC:
1035 case XFTFORM_RGTCIRC:
1036 case XFTFORM_TOPARC:
1037 case XFTFORM_BOTARC:
1038 case XFTFORM_LFTARC:
1039 case XFTFORM_RGTARC:
1040 {
1041 long nBeg, nEnd;
1042
1043 switch ( eForm )
1044 {
1045 default: ; //prevent warning
1046 case XFTFORM_TOPCIRC:
1047 nBeg = 0;
1048 nEnd = 18000;
1049 break;
1050 case XFTFORM_BOTCIRC:
1051 nBeg = 18000;
1052 nEnd = 36000;
1053 break;
1054 case XFTFORM_LFTCIRC:
1055 nBeg = 9000;
1056 nEnd = 27000;
1057 break;
1058 case XFTFORM_RGTCIRC:
1059 nBeg = 27000;
1060 nEnd = 9000;
1061 break;
1062 case XFTFORM_TOPARC:
1063 nBeg = 4500;
1064 nEnd = 13500;
1065 break;
1066 case XFTFORM_BOTARC:
1067 nBeg = 22500;
1068 nEnd = 31500;
1069 break;
1070 case XFTFORM_LFTARC:
1071 nBeg = 13500;
1072 nEnd = 22500;
1073 break;
1074 case XFTFORM_RGTARC:
1075 nBeg = 31500;
1076 nEnd = 4500;
1077 break;
1078 }
1079 pNewObj = new SdrCircObj(OBJ_CARC, aRect, nBeg, nEnd);
1080 break;
1081 }
1082 case XFTFORM_BUTTON1:
1083 {
1084 basegfx::B2DPolyPolygon aPolyPolygon;
1085 basegfx::B2DPolygon aLine;
1086 long nR = aRect.GetWidth() / 2;
1087 basegfx::B2DPolygon aTopArc(XPolygon(aCenter, -nR, nR, 50, 1750, sal_False).getB2DPolygon());
1088 basegfx::B2DPolygon aBottomArc(XPolygon(aCenter, -nR, nR, 1850, 3550, sal_False).getB2DPolygon());
1089
1090 // Polygone schliessen
1091 aTopArc.setClosed(true);
1092 aBottomArc.setClosed(true);
1093 aPolyPolygon.append(aTopArc);
1094
1095 aLine.append(aBottomArc.getB2DPoint(aBottomArc.count() - 1L));
1096 aLine.append(aBottomArc.getB2DPoint(0L));
1097 aLine.setClosed(true);
1098
1099 aPolyPolygon.append(aLine);
1100 aPolyPolygon.append(aBottomArc);
1101
1102 pNewObj = new SdrPathObj(OBJ_PATHFILL, aPolyPolygon);
1103 eAdjust = XFT_CENTER;
1104 break;
1105 }
1106 case XFTFORM_BUTTON2:
1107 case XFTFORM_BUTTON3:
1108 case XFTFORM_BUTTON4:
1109 {
1110 basegfx::B2DPolyPolygon aPolyPolygon;
1111 basegfx::B2DPolygon aLine;
1112 long nR = aRect.GetWidth() / 2;
1113 long nWDiff = nR / 5;
1114 long nHDiff;
1115
1116 if ( eForm == XFTFORM_BUTTON4 )
1117 {
1118 basegfx::B2DPolygon aNewArc(XPolygon(aCenter, -nR, nR, 950, 2650, sal_False).getB2DPolygon());
1119 aNewArc.setClosed(true);
1120 aPolyPolygon.append(aNewArc);
1121 eAdjust = XFT_CENTER;
1122 }
1123 else
1124 {
1125 basegfx::B2DPolygon aNewArc(XPolygon(aCenter, -nR, nR, 2700, 2700).getB2DPolygon());
1126 aPolyPolygon.append(aNewArc);
1127 }
1128
1129 if ( eForm == XFTFORM_BUTTON3 )
1130 nHDiff = -aRect.GetHeight() / 10;
1131 else
1132 nHDiff = aRect.GetHeight() / 20;
1133
1134 aLine.append(basegfx::B2DPoint(aRect.Left() + nWDiff, aRect.Center().Y() + nHDiff));
1135 aLine.append(basegfx::B2DPoint(aRect.Right() - nWDiff, aRect.Center().Y() + nHDiff));
1136 aLine.setClosed(true);
1137 aPolyPolygon.append(aLine);
1138
1139 if ( eForm == XFTFORM_BUTTON4 )
1140 {
1141 basegfx::B2DPolygon aNewArc(XPolygon(aCenter, -nR, nR, 2750, 850, sal_False).getB2DPolygon());
1142 aNewArc.setClosed(true);
1143 aPolyPolygon.append(aNewArc);
1144 }
1145
1146 if ( eForm == XFTFORM_BUTTON3 )
1147 {
1148 nHDiff += nHDiff;
1149 aLine.setB2DPoint(0L, basegfx::B2DPoint(aLine.getB2DPoint(0L).getX(), aLine.getB2DPoint(0L).getY() - nHDiff));
1150 aLine.setB2DPoint(1L, basegfx::B2DPoint(aLine.getB2DPoint(1L).getX(), aLine.getB2DPoint(1L).getY() - nHDiff));
1151 aPolyPolygon.append(aLine);
1152 }
1153
1154 pNewObj = new SdrPathObj(OBJ_PATHFILL, aPolyPolygon);
1155 break;
1156 }
1157 default: ; //prevent warning
1158 }
1159 if ( pNewObj )
1160 {
1161 // #78478# due to DLs changes in Outliner the object needs
1162 // a model to get an outliner for later calls to
1163 // pNewObj->SetOutlinerParaObject(pPara) (see below).
1164 pNewObj->SetModel(rOldObj.GetModel());
1165
1166 Size aSize;
1167 Rectangle aSnap = pNewObj->GetSnapRect();
1168
1169 aSize.Width() = aRect.Left() - aSnap.Left();
1170 aSize.Height() = aRect.Top() - aSnap.Top();
1171 pNewObj->NbcMove(aSize);
1172
1173 rView.BegUndo( SVX_RESSTR( RID_SVXSTR_FONTWORK_UNDOCREATE ) );
1174 OutlinerParaObject* pPara = rOldObj.GetOutlinerParaObject();
1175 sal_Bool bHide = sal_True;
1176
1177 if ( pPara != NULL )
1178 {
1179 pPara = new OutlinerParaObject(*pPara);
1180 pNewObj->SetOutlinerParaObject(pPara);
1181 }
1182 else
1183 bHide = sal_False;
1184
1185 rView.ReplaceObjectAtView(&rOldObj, rPV, pNewObj, sal_True);
1186 pNewObj->SetLayer(rOldObj.GetLayer());
1187 aAttr.Put(XFormTextHideFormItem(bHide));
1188 aAttr.Put(XFormTextAdjustItem(eAdjust));
1189
1190 XFormTextShadow eShadow = XFTSHADOW_NONE;
1191
1192 if ( nLastShadowTbxId == TBI_SHADOW_NORMAL )
1193 {
1194 eShadow = XFTSHADOW_NORMAL;
1195 aAttr.Put(XFormTextShadowXValItem(nSaveShadowX));
1196 aAttr.Put(XFormTextShadowYValItem(nSaveShadowY));
1197 }
1198 else if ( nLastShadowTbxId == TBI_SHADOW_SLANT )
1199 {
1200 eShadow = XFTSHADOW_SLANT;
1201 aAttr.Put(XFormTextShadowXValItem(nSaveShadowAngle));
1202 aAttr.Put(XFormTextShadowYValItem(nSaveShadowSize));
1203 }
1204
1205 aAttr.Put(XFormTextShadowItem(eShadow));
1206
1207 rView.SetAttributes(aAttr);
1208 rView.EndUndo();
1209 }
1210}
1211
1212void SvxFontWorkDialog::DataChanged( const DataChangedEvent& rDCEvt )
1213{
1214 if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) )
1215 ApplyImageList();
1216
1217 SfxDockingWindow::DataChanged( rDCEvt );
1218}
1219/* -----------------------------08.05.2002 14:28------------------------------
1220
1221 ---------------------------------------------------------------------------*/
1222void SvxFontWorkDialog::ApplyImageList()
1223{
1224 bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
1225
924void SvxFontWorkDialog::DataChanged( const DataChangedEvent& rDCEvt )
925{
926 if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) )
927 ApplyImageList();
928
929 SfxDockingWindow::DataChanged( rDCEvt );
930}
931/* -----------------------------08.05.2002 14:28------------------------------
932
933 ---------------------------------------------------------------------------*/
934void SvxFontWorkDialog::ApplyImageList()
935{
936 bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
937
1226 ResMgr* _pMgr = &DIALOG_MGR();
1227
1228 sal_uInt16 nBitmapResId = bHighContrast ? RID_SVXBMP_FONTWORK_FORM1_H : RID_SVXBMP_FONTWORK_FORM1;
1229 sal_uInt16 nTextResId = RID_SVXSTR_FONTWORK_FORM1;
1230
1231 bool bInit = aFormSet.GetItemCount() == 0;
1232
1233 if( bInit )
1234 {
1235/*
1236 Size aSize( aTbxStyle.CalcWindowSizePixel() );
1237 Bitmap aBmp(ResId(RID_SVXBMP_FONTWORK_FORM1,_pMgr));
1238 aSize.Height() = aFormSet.CalcWindowSizePixel(aBmp.GetSizePixel()).Height() + 2;
1239 aFormSet.SetSizePixel(aSize);
1240*/
1241 }
1242
1243 sal_uInt16 i;
1244 for( i = 1; i < 13; i++, nTextResId++, nBitmapResId++ )
1245 {
1246 if( bInit )
1247 {
1248 aFormSet.InsertItem( i, Bitmap(ResId(nBitmapResId,*_pMgr)),
1249 String(ResId(nTextResId,*_pMgr)));
1250 }
1251 else
1252 {
1253 aFormSet.SetItemImage( i, Bitmap(ResId(nBitmapResId,*_pMgr)) );
1254 }
1255 }
1256
1257 ImageList& rImgLst = bHighContrast ? maImageListH : maImageList;
1258
1259 aTbxStyle.SetImageList( rImgLst );
1260 aTbxAdjust.SetImageList( rImgLst );
1261 aTbxShadow.SetImageList( rImgLst );
1262
1263 switch( nLastShadowTbxId )
1264 {

--- 15 unchanged lines hidden ---
938 ImageList& rImgLst = bHighContrast ? maImageListH : maImageList;
939
940 aTbxStyle.SetImageList( rImgLst );
941 aTbxAdjust.SetImageList( rImgLst );
942 aTbxShadow.SetImageList( rImgLst );
943
944 switch( nLastShadowTbxId )
945 {

--- 15 unchanged lines hidden ---