1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 <svx/svdundo.hxx>
21 #include <sfx2/app.hxx>
22 #include <sfx2/request.hxx>
23 #include <sfx2/objface.hxx>
24 #include <sfx2/viewsh.hxx>
25 #include "svx/unoapi.hxx"
26 #include <com/sun/star/drawing/XShape.hpp>
27 #include <com/sun/star/drawing/XEnhancedCustomShapeDefaulter.hpp>
28 #include <svx/dialmgr.hxx>
29 #include <svx/svdoashp.hxx>
30 #include <svx/dialogs.hrc>
31 #include <svx/svdview.hxx>
32 #include <svx/sdasitm.hxx>
33 #include <com/sun/star/drawing/EnhancedCustomShapeAdjustmentValue.hpp>
34 #include <sfx2/bindings.hxx>
35 #include <editeng/eeitem.hxx>
36 #include <editeng/charscaleitem.hxx>
37 #include <editeng/kernitem.hxx>
38 #include <svx/sdrpaintwindow.hxx>
40 #include <svx/svxids.hrc>
41 #include <svx/fontworkbar.hxx>
42 #include "svx/fontworkgallery.hxx"
45 using namespace ::svx
;
46 using namespace ::cppu
;
47 using namespace ::com::sun::star
;
48 using namespace ::com::sun::star::beans
;
49 using namespace ::com::sun::star::uno
;
51 void SetAlignmentState( SdrView
* pSdrView
, SfxItemSet
& rSet
)
53 const SdrMarkList
& rMarkList
= pSdrView
->GetMarkedObjectList();
54 sal_uIntPtr nCount
= rMarkList
.GetMarkCount(), i
;
56 sal_Int32 nAlignment
= -1;
57 for( i
= 0; i
< nCount
; i
++ )
59 SdrObject
* pObj
= rMarkList
.GetMark( i
)->GetMarkedSdrObj();
60 if( pObj
->ISA(SdrObjCustomShape
) )
62 sal_Int32 nOldAlignment
= nAlignment
;
63 SdrTextHorzAdjustItem
& rTextHorzAdjustItem
= (SdrTextHorzAdjustItem
&)pObj
->GetMergedItem( SDRATTR_TEXT_HORZADJUST
);
64 SdrTextFitToSizeTypeItem
& rTextFitToSizeTypeItem
= (SdrTextFitToSizeTypeItem
&)pObj
->GetMergedItem( SDRATTR_TEXT_FITTOSIZE
);
65 switch ( rTextHorzAdjustItem
.GetValue() )
67 case SDRTEXTHORZADJUST_LEFT
: nAlignment
= 0; break;
68 case SDRTEXTHORZADJUST_CENTER
: nAlignment
= 1; break;
69 case SDRTEXTHORZADJUST_RIGHT
: nAlignment
= 2; break;
70 case SDRTEXTHORZADJUST_BLOCK
:
72 if ( rTextFitToSizeTypeItem
.GetValue() == SDRTEXTFIT_NONE
)
74 else if ( rTextFitToSizeTypeItem
.GetValue() == SDRTEXTFIT_ALLLINES
)
78 if ( ( nOldAlignment
!= -1 ) && ( nOldAlignment
!= nAlignment
) )
85 rSet
.Put( SfxInt32Item( SID_FONTWORK_ALIGNMENT
, nAlignment
) );
88 void SetCharacterSpacingState( SdrView
* pSdrView
, SfxItemSet
& rSet
)
90 const SdrMarkList
& rMarkList
= pSdrView
->GetMarkedObjectList();
91 sal_uIntPtr nCount
= rMarkList
.GetMarkCount(), i
;
93 sal_Int32 nCharacterSpacing
= -1;
94 for( i
= 0; i
< nCount
; i
++ )
96 SdrObject
* pObj
= rMarkList
.GetMark( i
)->GetMarkedSdrObj();
97 if( pObj
->ISA(SdrObjCustomShape
) )
99 sal_Int32 nOldCharacterSpacing
= nCharacterSpacing
;
100 SvxCharScaleWidthItem
& rCharScaleWidthItem
= (SvxCharScaleWidthItem
&)pObj
->GetMergedItem( EE_CHAR_FONTWIDTH
);
101 nCharacterSpacing
= rCharScaleWidthItem
.GetValue();
102 if ( ( nOldCharacterSpacing
!= -1 ) && ( nOldCharacterSpacing
!= nCharacterSpacing
) )
104 nCharacterSpacing
= -1;
109 rSet
.Put( SfxInt32Item( SID_FONTWORK_CHARACTER_SPACING
, nCharacterSpacing
) );
113 void SetKernCharacterPairsState( SdrView
* pSdrView
, SfxItemSet
& rSet
)
115 const SdrMarkList
& rMarkList
= pSdrView
->GetMarkedObjectList();
116 sal_uIntPtr nCount
= rMarkList
.GetMarkCount(), i
;
118 sal_Bool bChecked
= sal_False
;
119 for( i
= 0; i
< nCount
; i
++ )
121 SdrObject
* pObj
= rMarkList
.GetMark( i
)->GetMarkedSdrObj();
122 if( pObj
->ISA(SdrObjCustomShape
) )
124 SvxKerningItem
& rKerningItem
= (SvxKerningItem
&)pObj
->GetMergedItem( EE_CHAR_KERNING
);
125 if ( rKerningItem
.GetValue() )
129 rSet
.Put( SfxBoolItem( SID_FONTWORK_KERN_CHARACTER_PAIRS
, bChecked
) );
132 void SetFontWorkShapeTypeState( SdrView
* pSdrView
, SfxItemSet
& rSet
)
134 const SdrMarkList
& rMarkList
= pSdrView
->GetMarkedObjectList();
135 sal_uIntPtr nCount
= rMarkList
.GetMarkCount(), i
;
137 OUString aFontWorkShapeType
;
139 for( i
= 0; i
< nCount
; i
++ )
141 SdrObject
* pObj
= rMarkList
.GetMark( i
)->GetMarkedSdrObj();
142 if( pObj
->ISA( SdrObjCustomShape
) )
144 const OUString
sType( "Type" );
145 SdrCustomShapeGeometryItem
aGeometryItem( (SdrCustomShapeGeometryItem
&)pObj
->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY
) );
146 Any
* pAny
= aGeometryItem
.GetPropertyValueByName( sType
);
150 if ( *pAny
>>= aType
)
152 if ( !aFontWorkShapeType
.isEmpty() )
154 if ( !aFontWorkShapeType
.equals( aType
) ) // different FontWorkShapeTypes selected ?
156 aFontWorkShapeType
= OUString();
160 aFontWorkShapeType
= aType
;
165 rSet
.Put( SfxStringItem( SID_FONTWORK_SHAPE_TYPE
, aFontWorkShapeType
) );
168 /*************************************************************************
170 |* Standardinterface deklarieren (Die Slotmap darf nicht leer sein, also
171 |* tragen wir etwas ein, was hier (hoffentlich) nie vorkommt).
173 \************************************************************************/
175 SFX_SLOTMAP(FontworkBar
)
177 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
180 SFX_IMPL_INTERFACE(FontworkBar
, SfxShell
, SVX_RES(RID_SVX_FONTWORK_BAR
))
182 SFX_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_OBJECT
, SVX_RES(RID_SVX_FONTWORK_BAR
) );
185 TYPEINIT1( FontworkBar
, SfxShell
);
188 /*************************************************************************
190 |* Standard-Konstruktor
192 \************************************************************************/
194 FontworkBar::FontworkBar(SfxViewShell
* pViewShell
)
195 : SfxShell(pViewShell
)
197 DBG_ASSERT( pViewShell
, "svx::FontworkBar::FontworkBar(), I need a viewshell!" );
199 SetPool(&pViewShell
->GetPool());
201 SetHelpId( SVX_INTERFACE_FONTWORK_BAR
);
202 SetName( String( SVX_RES( RID_SVX_FONTWORK_BAR
) ));
206 /*************************************************************************
210 \************************************************************************/
212 FontworkBar::~FontworkBar()
214 SetRepeatTarget(NULL
);
217 static Window
* ImpGetViewWin(SdrView
* pView
)
221 const sal_uInt32
nAnz(pView
->PaintWindowCount());
222 for(sal_uInt32
nNum(0L); nNum
< nAnz
; nNum
++)
224 OutputDevice
* pOut
= &(pView
->GetPaintWindow(nNum
)->GetOutputDevice());
226 if(OUTDEV_WINDOW
== pOut
->GetOutDevType())
228 return (Window
*)pOut
;
237 bool checkForSelectedFontWork( SdrView
* pSdrView
, sal_uInt32
& nCheckStatus
)
239 if ( nCheckStatus
& 2 )
240 return ( nCheckStatus
& 1 ) != 0;
242 static const OUString
sTextPath( "TextPath" );
244 const SdrMarkList
& rMarkList
= pSdrView
->GetMarkedObjectList();
245 sal_uIntPtr nCount
= rMarkList
.GetMarkCount(), i
;
246 sal_Bool bFound
= sal_False
;
247 for(i
=0;(i
<nCount
) && !bFound
; i
++)
249 SdrObject
* pObj
= rMarkList
.GetMark(i
)->GetMarkedSdrObj();
250 if( pObj
->ISA(SdrObjCustomShape
) )
252 SdrCustomShapeGeometryItem
aGeometryItem( (SdrCustomShapeGeometryItem
&)pObj
->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY
) );
253 Any
* pAny
= aGeometryItem
.GetPropertyValueByName( sTextPath
, sTextPath
);
265 static void impl_execute( SdrView
*, SfxRequest
& rReq
, SdrCustomShapeGeometryItem
& rGeometryItem
, SdrObject
* pObj
)
267 static const OUString
sTextPath( "TextPath" );
268 static const OUString
sSameLetterHeights( "SameLetterHeights" );
270 sal_uInt16 nSID
= rReq
.GetSlot();
273 case SID_FONTWORK_SAME_LETTER_HEIGHTS
:
275 com::sun::star::uno::Any
* pAny
= rGeometryItem
.GetPropertyValueByName( sTextPath
, sSameLetterHeights
);
286 case SID_FONTWORK_ALIGNMENT
:
288 if( rReq
.GetArgs() && rReq
.GetArgs()->GetItemState( SID_FONTWORK_ALIGNMENT
) == SFX_ITEM_SET
)
290 sal_Int32 nValue
= ((const SfxInt32Item
*)rReq
.GetArgs()->GetItem(SID_FONTWORK_ALIGNMENT
))->GetValue();
291 if ( ( nValue
>= 0 ) && ( nValue
< 5 ) )
293 SdrFitToSizeType eFTS
= SDRTEXTFIT_NONE
;
294 SdrTextHorzAdjust eHorzAdjust
;
297 case 4 : eFTS
= SDRTEXTFIT_ALLLINES
; // passthrough
298 case 3 : eHorzAdjust
= SDRTEXTHORZADJUST_BLOCK
; break;
300 case 0 : eHorzAdjust
= SDRTEXTHORZADJUST_LEFT
; break;
301 case 1 : eHorzAdjust
= SDRTEXTHORZADJUST_CENTER
; break;
302 case 2 : eHorzAdjust
= SDRTEXTHORZADJUST_RIGHT
; break;
304 pObj
->SetMergedItem( SdrTextHorzAdjustItem( eHorzAdjust
) );
305 pObj
->SetMergedItem( SdrTextFitToSizeTypeItem( eFTS
) );
306 pObj
->BroadcastObjectChange();
312 case SID_FONTWORK_CHARACTER_SPACING
:
314 if( rReq
.GetArgs() && ( rReq
.GetArgs()->GetItemState( SID_FONTWORK_CHARACTER_SPACING
) == SFX_ITEM_SET
) )
316 sal_Int32 nCharSpacing
= ((const SfxInt32Item
*)rReq
.GetArgs()->GetItem(SID_FONTWORK_CHARACTER_SPACING
))->GetValue();
317 pObj
->SetMergedItem( SvxCharScaleWidthItem( (sal_uInt16
)nCharSpacing
, EE_CHAR_FONTWIDTH
) );
318 pObj
->BroadcastObjectChange();
323 case SID_FONTWORK_KERN_CHARACTER_PAIRS
:
325 if( rReq
.GetArgs() && ( rReq
.GetArgs()->GetItemState( SID_FONTWORK_KERN_CHARACTER_PAIRS
) == SFX_ITEM_SET
) )
327 // sal_Bool bKernCharacterPairs = ((const SfxBoolItem*)rReq.GetArgs()->GetItem(SID_FONTWORK_KERN_CHARACTER_PAIRS))->GetValue();
328 //TODO: pObj->SetMergedItem( SvxCharScaleWidthItem( (sal_uInt16)nCharSpacing, EE_CHAR_FONTWIDTH ) );
329 pObj
->BroadcastObjectChange();
336 #include "svx/gallery.hxx"
337 #include <svx/fmmodel.hxx>
338 #include <svx/fmpage.hxx>
339 #include <svl/itempool.hxx>
341 void GetGeometryForCustomShape( SdrCustomShapeGeometryItem
& rGeometryItem
, const OUString rCustomShape
)
343 const OUString
sType( "Type" );
345 com::sun::star::beans::PropertyValue aPropVal
;
346 aPropVal
.Name
= sType
;
347 aPropVal
.Value
<<= rCustomShape
;
348 rGeometryItem
.SetPropertyValue( aPropVal
);
350 const OUString
sAdjustmentValues( "AdjustmentValues" );
351 const OUString
sCoordinateOrigin( "CoordinateOrigin" );
352 const OUString
sCoordinateSize( "CoordinateSize" );
353 const OUString
sEquations( "Equations" );
354 const OUString
sHandles( "Handles" );
355 const OUString
sPath( "Path" );
356 rGeometryItem
.ClearPropertyValue( sAdjustmentValues
);
357 rGeometryItem
.ClearPropertyValue( sCoordinateOrigin
);
358 rGeometryItem
.ClearPropertyValue( sCoordinateSize
);
359 rGeometryItem
.ClearPropertyValue( sEquations
);
360 rGeometryItem
.ClearPropertyValue( sHandles
);
361 rGeometryItem
.ClearPropertyValue( sPath
);
363 /* SJ: CustomShapes that are available in the gallery are having the highest
364 priority, so we will take a look there before taking the internal default */
366 if ( GalleryExplorer::GetSdrObjCount( GALLERY_THEME_POWERPOINT
) )
368 std::vector
< OUString
> aObjList
;
369 if ( GalleryExplorer::FillObjListTitle( GALLERY_THEME_POWERPOINT
, aObjList
) )
372 for ( i
= 0; i
< aObjList
.size(); i
++ )
374 if ( aObjList
[ i
].equalsIgnoreAsciiCase( rCustomShape
) )
376 FmFormModel aFormModel
;
377 SfxItemPool
& rPool
= aFormModel
.GetItemPool();
378 rPool
.FreezeIdRanges();
379 if ( GalleryExplorer::GetSdrObj( GALLERY_THEME_POWERPOINT
, i
, &aFormModel
) )
381 const SdrObject
* pSourceObj
= aFormModel
.GetPage( 0 )->GetObj( 0 );
384 PropertyValue aPropVal_
;
385 SdrCustomShapeGeometryItem
& rSourceGeometry
= (SdrCustomShapeGeometryItem
&)pSourceObj
->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY
);
386 com::sun::star::uno::Any
* pAny
= rSourceGeometry
.GetPropertyValueByName( sType
);
389 aPropVal_
.Name
= sType
;
390 aPropVal_
.Value
= *pAny
;
391 rGeometryItem
.SetPropertyValue( aPropVal_
);
393 pAny
= rSourceGeometry
.GetPropertyValueByName( sAdjustmentValues
);
396 aPropVal_
.Name
= sAdjustmentValues
;
397 aPropVal_
.Value
= *pAny
;
398 rGeometryItem
.SetPropertyValue( aPropVal_
);
400 pAny
= rSourceGeometry
.GetPropertyValueByName( sCoordinateOrigin
);
403 aPropVal_
.Name
= sCoordinateOrigin
;
404 aPropVal_
.Value
= *pAny
;
405 rGeometryItem
.SetPropertyValue( aPropVal_
);
407 pAny
= rSourceGeometry
.GetPropertyValueByName( sCoordinateSize
);
410 aPropVal_
.Name
= sCoordinateSize
;
411 aPropVal_
.Value
= *pAny
;
412 rGeometryItem
.SetPropertyValue( aPropVal_
);
414 pAny
= rSourceGeometry
.GetPropertyValueByName( sEquations
);
417 aPropVal_
.Name
= sEquations
;
418 aPropVal_
.Value
= *pAny
;
419 rGeometryItem
.SetPropertyValue( aPropVal_
);
421 pAny
= rSourceGeometry
.GetPropertyValueByName( sHandles
);
424 aPropVal_
.Name
= sHandles
;
425 aPropVal_
.Value
= *pAny
;
426 rGeometryItem
.SetPropertyValue( aPropVal_
);
428 pAny
= rSourceGeometry
.GetPropertyValueByName( sPath
);
431 aPropVal_
.Name
= sPath
;
432 aPropVal_
.Value
= *pAny
;
433 rGeometryItem
.SetPropertyValue( aPropVal_
);
444 void FontworkBar::execute( SdrView
* pSdrView
, SfxRequest
& rReq
, SfxBindings
& rBindings
)
446 sal_uInt16 nStrResId
= 0;
448 sal_uInt16 nSID
= rReq
.GetSlot();
451 case SID_FONTWORK_GALLERY_FLOATER
:
453 FontWorkGalleryDialog
aDlg( pSdrView
, ImpGetViewWin(pSdrView
), nSID
);
458 case SID_FONTWORK_SHAPE_TYPE
:
460 OUString aCustomShape
;
461 const SfxItemSet
* pArgs
= rReq
.GetArgs();
464 const SfxStringItem
& rItm
= (const SfxStringItem
&)pArgs
->Get( rReq
.GetSlot() );
465 aCustomShape
= rItm
.GetValue();
467 if ( !aCustomShape
.isEmpty() )
469 const SdrMarkList
& rMarkList
= pSdrView
->GetMarkedObjectList();
470 sal_uInt32 nCount
= rMarkList
.GetMarkCount(), i
;
471 for( i
= 0; i
< nCount
; i
++ )
473 SdrObject
* pObj
= rMarkList
.GetMark( i
)->GetMarkedSdrObj();
474 if( pObj
->ISA(SdrObjCustomShape
) )
476 const bool bUndo
= pSdrView
->IsUndoEnabled();
480 String
aStr( SVX_RES( RID_SVXSTR_UNDO_APPLY_FONTWORK_SHAPE
) );
481 pSdrView
->BegUndo( aStr
);
482 pSdrView
->AddUndo( pSdrView
->GetModel()->GetSdrUndoFactory().CreateUndoAttrObject( *pObj
) );
484 SdrCustomShapeGeometryItem
aGeometryItem( (SdrCustomShapeGeometryItem
&)pObj
->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY
) );
485 GetGeometryForCustomShape( aGeometryItem
, aCustomShape
);
486 pObj
->SetMergedItem( aGeometryItem
);
488 Reference
< drawing::XShape
> aXShape
= GetXShapeForSdrObject( (SdrObjCustomShape
*)pObj
);
491 Reference
< drawing::XEnhancedCustomShapeDefaulter
> xDefaulter( aXShape
, UNO_QUERY
);
492 if( xDefaulter
.is() )
493 xDefaulter
->createCustomShapeDefaults( aCustomShape
);
496 pObj
->BroadcastObjectChange();
499 pSdrView
->AdjustMarkHdl(); //HMH sal_True );
500 rBindings
.Invalidate( SID_FONTWORK_SHAPE_TYPE
);
507 case SID_FONTWORK_CHARACTER_SPACING_DIALOG
:
509 if( rReq
.GetArgs() && ( rReq
.GetArgs()->GetItemState( SID_FONTWORK_CHARACTER_SPACING
) == SFX_ITEM_SET
) )
511 sal_Int32 nCharSpacing
= ((const SfxInt32Item
*)rReq
.GetArgs()->GetItem(SID_FONTWORK_CHARACTER_SPACING
))->GetValue();
512 FontworkCharacterSpacingDialog
aDlg( 0L, nCharSpacing
);
513 sal_uInt16 nRet
= aDlg
.Execute();
516 SfxInt32Item
aItem( SID_FONTWORK_CHARACTER_SPACING
, aDlg
.getScale() );
517 SfxPoolItem
* aItems
[] = { &aItem
, 0 };
518 rBindings
.Execute( SID_FONTWORK_CHARACTER_SPACING
, (const SfxPoolItem
**)aItems
);
524 case SID_FONTWORK_SHAPE
:
525 case SID_FONTWORK_ALIGNMENT
:
528 nStrResId
= RID_SVXSTR_UNDO_APPLY_FONTWORK_ALIGNMENT
;
530 case SID_FONTWORK_CHARACTER_SPACING
:
533 nStrResId
= RID_SVXSTR_UNDO_APPLY_FONTWORK_CHARACTER_SPACING
;
535 case SID_FONTWORK_KERN_CHARACTER_PAIRS
:
538 nStrResId
= RID_SVXSTR_UNDO_APPLY_FONTWORK_CHARACTER_SPACING
;
540 case SID_FONTWORK_SAME_LETTER_HEIGHTS
:
543 nStrResId
= RID_SVXSTR_UNDO_APPLY_FONTWORK_SAME_LETTER_HEIGHT
;
545 const SdrMarkList
& rMarkList
= pSdrView
->GetMarkedObjectList();
546 sal_uIntPtr nCount
= rMarkList
.GetMarkCount(), i
;
547 for( i
= 0; i
< nCount
; i
++ )
549 SdrObject
* pObj
= rMarkList
.GetMark(i
)->GetMarkedSdrObj();
550 if( pObj
->ISA(SdrObjCustomShape
) )
552 const bool bUndo
= pSdrView
->IsUndoEnabled();
555 String
aStr( SVX_RES( nStrResId
) );
556 pSdrView
->BegUndo( aStr
);
557 pSdrView
->AddUndo( pSdrView
->GetModel()->GetSdrUndoFactory().CreateUndoAttrObject( *pObj
) );
559 SdrCustomShapeGeometryItem
aGeometryItem( (SdrCustomShapeGeometryItem
&)pObj
->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY
) );
560 impl_execute( pSdrView
, rReq
, aGeometryItem
, pObj
);
561 pObj
->SetMergedItem( aGeometryItem
);
562 pObj
->BroadcastObjectChange();
572 void FontworkBar::getState( SdrView
* pSdrView
, SfxItemSet
& rSet
)
574 sal_uInt32 nCheckStatus
= 0;
576 if ( rSet
.GetItemState( SID_FONTWORK_ALIGNMENT_FLOATER
) != SFX_ITEM_UNKNOWN
)
578 if ( !checkForSelectedFontWork( pSdrView
, nCheckStatus
) )
579 rSet
.DisableItem( SID_FONTWORK_ALIGNMENT_FLOATER
);
581 if ( rSet
.GetItemState( SID_FONTWORK_ALIGNMENT
) != SFX_ITEM_UNKNOWN
)
583 if ( !checkForSelectedFontWork( pSdrView
, nCheckStatus
) )
584 rSet
.DisableItem( SID_FONTWORK_ALIGNMENT
);
586 SetAlignmentState( pSdrView
, rSet
);
588 if ( rSet
.GetItemState( SID_FONTWORK_CHARACTER_SPACING_FLOATER
) != SFX_ITEM_UNKNOWN
)
590 if ( !checkForSelectedFontWork( pSdrView
, nCheckStatus
) )
591 rSet
.DisableItem( SID_FONTWORK_CHARACTER_SPACING_FLOATER
);
593 if ( rSet
.GetItemState( SID_FONTWORK_CHARACTER_SPACING
) != SFX_ITEM_UNKNOWN
)
595 if ( !checkForSelectedFontWork( pSdrView
, nCheckStatus
) )
596 rSet
.DisableItem( SID_FONTWORK_CHARACTER_SPACING
);
598 SetCharacterSpacingState( pSdrView
, rSet
);
600 if ( rSet
.GetItemState( SID_FONTWORK_KERN_CHARACTER_PAIRS
) != SFX_ITEM_UNKNOWN
)
602 if ( !checkForSelectedFontWork( pSdrView
, nCheckStatus
) )
603 rSet
.DisableItem( SID_FONTWORK_KERN_CHARACTER_PAIRS
);
605 SetKernCharacterPairsState( pSdrView
, rSet
);
607 if ( rSet
.GetItemState( SID_FONTWORK_SAME_LETTER_HEIGHTS
) != SFX_ITEM_UNKNOWN
)
609 if ( !checkForSelectedFontWork( pSdrView
, nCheckStatus
) )
610 rSet
.DisableItem( SID_FONTWORK_SAME_LETTER_HEIGHTS
);
612 if ( rSet
.GetItemState( SID_FONTWORK_SHAPE_TYPE
) != SFX_ITEM_UNKNOWN
)
614 if ( !checkForSelectedFontWork( pSdrView
, nCheckStatus
) )
615 rSet
.DisableItem( SID_FONTWORK_SHAPE_TYPE
);
617 SetFontWorkShapeTypeState( pSdrView
, rSet
);
621 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */