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 <DrawViewShell.hxx>
21 #include <com/sun/star/embed/EmbedMisc.hpp>
22 #include <com/sun/star/embed/XEmbeddedObject.hpp>
23 #include <com/sun/star/presentation/ClickAction.hpp>
24 #include <sfx2/objsh.hxx>
25 #include <svx/svxids.hrc>
26 #include <svx/sdmetitm.hxx>
27 #include <editeng/flditem.hxx>
28 #include <svx/svdogrp.hxx>
29 #include <svx/svdograf.hxx>
30 #include <svx/svdoole2.hxx>
31 #include <svx/sdtfsitm.hxx>
32 #include <svx/svdopath.hxx>
33 #include <svx/obj3d.hxx>
34 #include <svx/scene3d.hxx>
38 #include <anminfo.hxx>
39 #include <drawdoc.hxx>
40 #include <drawview.hxx>
42 using namespace com::sun::star
;
47 * Set state (Enabled/Disabled) of Menu-SfxSlots
49 void DrawViewShell::GetMenuStateSel( SfxItemSet
&rSet
)
51 // Status of menu entries (Buttons,...)
54 const SdrMarkList
& rMarkList
= mpDrawView
->GetMarkedObjectList();
55 const size_t nMarkCount
= rMarkList
.GetMarkCount();
57 if ( nMarkCount
== 1 )
59 if( SfxItemState::DEFAULT
== rSet
.GetItemState( SID_BEZIER_EDIT
) ||
60 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_UNGROUP
) ||
61 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_ENTER_GROUP
) ||
62 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_NAME_GROUP
) ||
65 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_OBJECT_TITLE_DESCRIPTION
) ||
67 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_ATTR_FILL_STYLE
) ||
68 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_ATTR_FILL_USE_SLIDE_BACKGROUND
) ||
69 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_ATTR_FILL_TRANSPARENCE
) ||
70 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_ATTR_FILL_FLOATTRANSPARENCE
) ||
71 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_CHANGEBEZIER
) ||
72 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_CHANGEPOLYGON
) ||
73 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_LINEEND_POLYGON
) ||
74 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_MEASURE_DLG
) ||
75 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_CONNECTION_DLG
) ||
76 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_CONNECTION_NEW_ROUTING
) ||
77 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_OBJECT_SHEAR
) ||
78 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_OBJECT_ALIGN_LEFT
) ||
79 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_OBJECT_ALIGN_CENTER
) ||
80 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_OBJECT_ALIGN_RIGHT
) ||
81 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_OBJECT_ALIGN_UP
) ||
82 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_OBJECT_ALIGN_MIDDLE
) ||
83 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_OBJECT_ALIGN_DOWN
) ||
84 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_FRAME_TO_TOP
) ||
85 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_MOREFRONT
) ||
86 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_FRAME_UP
) ||
87 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_MOREBACK
) ||
88 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_FRAME_DOWN
) ||
89 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_FRAME_TO_BOTTOM
) ||
90 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_BEFORE_OBJ
) ||
91 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_BEHIND_OBJ
) ||
92 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_REVERSE_ORDER
) ||
93 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_ORIGINAL_SIZE
) ||
94 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_SAVE_GRAPHIC
) ||
95 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_COMPRESS_GRAPHIC
) ||
96 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_TEXTATTR_DLG
) ||
97 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_EXECUTE_ANIMATION_EFFECT
))
99 const SdrObject
* pObj
= rMarkList
.GetMark(0)->GetMarkedSdrObj();
100 const SdrGrafObj
* pSdrGrafObj
= dynamic_cast< const SdrGrafObj
* >(pObj
);
101 const SdrOle2Obj
* pSdrOle2Obj
= dynamic_cast< const SdrOle2Obj
* >(pObj
);
102 const SdAnimationInfo
* pAnimationInfo
103 = SdDrawDocument::GetAnimationInfo(rMarkList
.GetMark(0)->GetMarkedSdrObj());
104 SdrInventor nInv
= pObj
->GetObjInventor();
105 SdrObjKind nId
= pObj
->GetObjIdentifier();
106 SdrObjTransformInfoRec aInfoRec
;
107 pObj
->TakeObjInfo( aInfoRec
);
109 // don't show original size entry if not possible
112 if (pSdrOle2Obj
->GetObjRef().is() &&
113 (pSdrOle2Obj
->GetObjRef()->getStatus( pSdrOle2Obj
->GetAspect() ) & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE
) )
114 rSet
.DisableItem(SID_ORIGINAL_SIZE
);
119 rSet
.DisableItem(SID_SAVE_GRAPHIC
);
120 rSet
.DisableItem(SID_COMPRESS_GRAPHIC
);
124 || pAnimationInfo
->meClickAction
== presentation::ClickAction::ClickAction_NONE
125 // Sound does not work in edit mode
126 || pAnimationInfo
->meClickAction
== presentation::ClickAction::ClickAction_SOUND
127 // No point in exiting the presentation in edit mode
128 || pAnimationInfo
->meClickAction
129 == presentation::ClickAction::ClickAction_STOPPRESENTATION
)
131 rSet
.DisableItem(SID_EXECUTE_ANIMATION_EFFECT
);
134 /* If it is not a group object or 3D object, we disable "enter
136 const auto* pSdrObjGroup
= dynamic_cast<const SdrObjGroup
*>(pObj
);
138 if( !( ( pSdrObjGroup
!= nullptr && nInv
== SdrInventor::Default
) ||
139 DynCastE3dScene(pObj
) ) )
141 rSet
.DisableItem( SID_ENTER_GROUP
);
144 // Don't allow enter Diagrams
145 if(nullptr != pSdrObjGroup
&& pSdrObjGroup
->isDiagram())
147 rSet
.DisableItem( SID_ENTER_GROUP
);
150 // If it is not a group object, we disable "ungroup"
151 if(pSdrObjGroup
== nullptr || nInv
!= SdrInventor::Default
)
153 rSet
.DisableItem(SID_UNGROUP
);
156 // Support advanced DiagramHelper
157 if(!pSdrObjGroup
|| !pSdrObjGroup
->isDiagram())
159 rSet
.DisableItem( SID_REGENERATE_DIAGRAM
);
160 rSet
.DisableItem( SID_EDIT_DIAGRAM
);
163 if( nInv
== SdrInventor::Default
&&
164 (nId
== SdrObjKind::Line
||
165 nId
== SdrObjKind::PolyLine
||
166 nId
== SdrObjKind::PathLine
||
167 nId
== SdrObjKind::FreehandLine
))
169 //rSet.DisableItem( SID_ATTRIBUTES_AREA ); // remove again!
170 rSet
.DisableItem( SID_ATTR_FILL_STYLE
);
171 rSet
.DisableItem( SID_ATTR_FILL_USE_SLIDE_BACKGROUND
);
172 rSet
.DisableItem( SID_ATTR_FILL_TRANSPARENCE
);
173 rSet
.DisableItem( SID_ATTR_FILL_FLOATTRANSPARENCE
);
175 if( (dynamic_cast< const SdrPathObj
*>( pObj
) == nullptr&& !aInfoRec
.bCanConvToPath
) || dynamic_cast< const SdrObjGroup
*>( pObj
) != nullptr ) // As long as JOE handles it incorrectly!
176 { // JOE: a group object may can be converted into a PathObj
177 rSet
.DisableItem( SID_LINEEND_POLYGON
);
179 if(nInv
== SdrInventor::Default
&&
180 (nId
== SdrObjKind::PathFill
|| nId
== SdrObjKind::PathLine
|| !aInfoRec
.bCanConvToPath
))
181 rSet
.DisableItem( SID_CHANGEBEZIER
);
183 if( nInv
== SdrInventor::Default
&&
184 ( nId
== SdrObjKind::Polygon
|| nId
== SdrObjKind::PolyLine
|| !aInfoRec
.bCanConvToPoly
) &&
185 !GetView()->IsVectorizeAllowed() )
187 rSet
.DisableItem( SID_CHANGEPOLYGON
);
190 if(nInv
== SdrInventor::Default
&& nId
== SdrObjKind::Table
)
192 rSet
.DisableItem( SID_TEXTATTR_DLG
);
195 if( nInv
!= SdrInventor::Default
|| nId
!= SdrObjKind::Measure
)
196 rSet
.DisableItem( SID_MEASURE_DLG
);
198 if( nInv
!= SdrInventor::Default
|| nId
!= SdrObjKind::Edge
)
199 rSet
.DisableItem( SID_CONNECTION_DLG
);
202 bool bDisable
= true;
203 SfxItemSet
aAttrSet( GetDoc()->GetPool() );
204 GetView()->GetAttributes( aAttrSet
);
206 if( aAttrSet
.GetItemState( SDRATTR_EDGELINE1DELTA
) >= SfxItemState::DEFAULT
&&
207 aAttrSet
.GetItemState( SDRATTR_EDGELINE2DELTA
) >= SfxItemState::DEFAULT
&&
208 aAttrSet
.GetItemState( SDRATTR_EDGELINE3DELTA
) >= SfxItemState::DEFAULT
)
210 ::tools::Long nVal1
= aAttrSet
.Get( SDRATTR_EDGELINE1DELTA
).GetValue();
211 ::tools::Long nVal2
= aAttrSet
.Get( SDRATTR_EDGELINE2DELTA
).GetValue();
212 ::tools::Long nVal3
= aAttrSet
.Get( SDRATTR_EDGELINE3DELTA
).GetValue();
214 if( nVal1
!= 0 || nVal2
!= 0 || nVal3
!= 0 )
219 rSet
.DisableItem( SID_CONNECTION_NEW_ROUTING
);
222 if ( nInv
== SdrInventor::E3d
||
223 (!mpDrawView
->IsConvertToPathObjPossible() &&
224 !mpDrawView
->IsShearAllowed() &&
225 !mpDrawView
->IsDistortAllowed()) )
227 rSet
.DisableItem( SID_OBJECT_SHEAR
);
230 if(dynamic_cast< const E3dCompoundObject
*>( pObj
) != nullptr)
232 rSet
.DisableItem( SID_OBJECT_ALIGN
);
233 rSet
.DisableItem( SID_OBJECT_ALIGN_LEFT
);
234 rSet
.DisableItem( SID_OBJECT_ALIGN_CENTER
);
235 rSet
.DisableItem( SID_OBJECT_ALIGN_RIGHT
);
236 rSet
.DisableItem( SID_OBJECT_ALIGN_UP
);
237 rSet
.DisableItem( SID_OBJECT_ALIGN_MIDDLE
);
238 rSet
.DisableItem( SID_OBJECT_ALIGN_DOWN
);
239 rSet
.DisableItem( SID_FRAME_TO_TOP
);
240 rSet
.DisableItem( SID_MOREFRONT
);
241 rSet
.DisableItem( SID_FRAME_UP
);
242 rSet
.DisableItem( SID_MOREBACK
);
243 rSet
.DisableItem( SID_FRAME_DOWN
);
244 rSet
.DisableItem( SID_FRAME_TO_BOTTOM
);
245 rSet
.DisableItem( SID_BEFORE_OBJ
);
246 rSet
.DisableItem( SID_BEHIND_OBJ
);
247 rSet
.DisableItem( SID_REVERSE_ORDER
);
248 rSet
.DisableItem( SID_POSITION
);
252 if( SfxItemState::DEFAULT
== rSet
.GetItemState( SID_DISMANTLE
) ||
253 SfxItemState::DEFAULT
== rSet
.GetItemState( SID_BREAK
) )
255 if ( !mpDrawView
->IsDismantlePossible() )
257 rSet
.DisableItem( SID_DISMANTLE
);
260 if ( !mpDrawView
->IsDismantlePossible(true) &&
261 !mpDrawView
->IsImportMtfPossible() &&
262 !mpDrawView
->IsBreak3DObjPossible() )
264 rSet
.DisableItem( SID_BREAK
);
267 if( SfxItemState::DEFAULT
== rSet
.GetItemState( SID_MODIFY_FIELD
) )
269 OutlinerView
* pOLV
= mpDrawView
->GetTextEditOutlinerView();
273 const SvxFieldItem
* pFldItem
= pOLV
->GetFieldAtSelection();
275 if( !( pFldItem
&& (nullptr != dynamic_cast< const SvxDateField
*>( pFldItem
->GetField() ) ||
276 nullptr != dynamic_cast< const SvxAuthorField
*>( pFldItem
->GetField() ) ||
277 nullptr != dynamic_cast< const SvxExtFileField
*>( pFldItem
->GetField() ) ||
278 nullptr != dynamic_cast< const SvxExtTimeField
*>( pFldItem
->GetField() ) ) ) )
280 rSet
.DisableItem( SID_MODIFY_FIELD
);
284 rSet
.DisableItem( SID_MODIFY_FIELD
);
286 if( SfxItemState::DEFAULT
== rSet
.GetItemState( SID_OUTLINE_TEXT_AUTOFIT
) )
288 const SdrObject
* pObj
= rMarkList
.GetMark(0)->GetMarkedSdrObj();
289 const SdrTextFitToSizeTypeItem
* pItem
= pObj
->GetMergedItemSet().GetItem
<SdrTextFitToSizeTypeItem
>(SDRATTR_TEXT_FITTOSIZE
);
290 const bool bSet
= pItem
&& pItem
->GetValue() != drawing::TextFitToSizeType_NONE
;
291 rSet
.Put(SfxBoolItem(SID_OUTLINE_TEXT_AUTOFIT
, bSet
));
294 rSet
.DisableItem(SID_GROUP
);
295 rSet
.DisableItem(SID_TEXT_COMBINE
);
296 rSet
.DisableItem(SID_COMBINE
);
297 rSet
.DisableItem(SID_DISTRIBUTE_HLEFT
);
298 rSet
.DisableItem(SID_DISTRIBUTE_HCENTER
);
299 rSet
.DisableItem(SID_DISTRIBUTE_HDISTANCE
);
300 rSet
.DisableItem(SID_DISTRIBUTE_HRIGHT
);
301 rSet
.DisableItem(SID_DISTRIBUTE_VTOP
);
302 rSet
.DisableItem(SID_DISTRIBUTE_VCENTER
);
303 rSet
.DisableItem(SID_DISTRIBUTE_VDISTANCE
);
304 rSet
.DisableItem(SID_DISTRIBUTE_VBOTTOM
);
305 rSet
.DisableItem(SID_POLY_MERGE
);
306 rSet
.DisableItem(SID_POLY_SUBSTRACT
);
307 rSet
.DisableItem(SID_POLY_INTERSECT
);
308 rSet
.DisableItem(SID_EQUALIZEWIDTH
);
309 rSet
.DisableItem(SID_EQUALIZEHEIGHT
);
310 rSet
.DisableItem(SID_CONNECT
);
313 else if( nMarkCount
> 1 )
315 // distribute dialog for 3+n objects
318 rSet
.DisableItem(SID_DISTRIBUTE_HLEFT
);
319 rSet
.DisableItem(SID_DISTRIBUTE_HCENTER
);
320 rSet
.DisableItem(SID_DISTRIBUTE_HDISTANCE
);
321 rSet
.DisableItem(SID_DISTRIBUTE_HRIGHT
);
322 rSet
.DisableItem(SID_DISTRIBUTE_VTOP
);
323 rSet
.DisableItem(SID_DISTRIBUTE_VCENTER
);
324 rSet
.DisableItem(SID_DISTRIBUTE_VDISTANCE
);
325 rSet
.DisableItem(SID_DISTRIBUTE_VBOTTOM
);
328 rSet
.DisableItem( SID_LINEEND_POLYGON
);
329 rSet
.DisableItem( SID_ENTER_GROUP
);
330 // Now names for objects have to be unique
331 rSet
.DisableItem( SID_NAME_GROUP
);
333 rSet
.DisableItem( SID_OBJECT_TITLE_DESCRIPTION
);
334 rSet
.DisableItem( SID_MODIFY_FIELD
);
340 bool bDrawObj
= false;
343 bool bMeasureObj
= false;
344 bool bEdgeObj
= false; // Connector
345 bool bE3dCompoundObject
= false;
347 for( size_t i
= 0; i
< nMarkCount
&& !bText
&& i
< 50; ++i
)
349 SdrObject
* pObj
= rMarkList
.GetMark(i
)->GetMarkedSdrObj();
350 SdrInventor nInv
= pObj
->GetObjInventor();
351 SdrObjKind nId
= pObj
->GetObjIdentifier();
353 if (nInv
== SdrInventor::Default
)
357 case SdrObjKind::Text
: bText
= true; break;
359 case SdrObjKind::Line
: bLine
= true; break;
361 case SdrObjKind::Edge
: bEdgeObj
= true; break;
363 case SdrObjKind::Measure
: bMeasureObj
= true; break;
365 case SdrObjKind::Rectangle
:
366 case SdrObjKind::CircleOrEllipse
:
367 case SdrObjKind::FreehandLine
:
368 case SdrObjKind::FreehandFill
:
369 case SdrObjKind::PathFill
:
370 case SdrObjKind::PathLine
:
371 case SdrObjKind::CircleSection
:
372 case SdrObjKind::CircleArc
:
373 case SdrObjKind::CircleCut
: bDrawObj
= true; break;
375 case SdrObjKind::Group
: bGroup
= true; break;
377 case SdrObjKind::Graphic
: break;
379 case SdrObjKind::Table
: bTable
= true; break;
383 else if (nInv
== SdrInventor::E3d
)
385 if(DynCastE3dScene(pObj
))
387 else if(dynamic_cast< const E3dCompoundObject
* >(pObj
) != nullptr)
388 bE3dCompoundObject
= true;
391 if( bLine
&& !bText
&& !bDrawObj
&&!b3dObj
)
393 rSet
.DisableItem( SID_ATTR_FILL_STYLE
);
394 rSet
.DisableItem( SID_ATTR_FILL_USE_SLIDE_BACKGROUND
);
395 rSet
.DisableItem( SID_ATTR_FILL_TRANSPARENCE
);
396 rSet
.DisableItem( SID_ATTR_FILL_FLOATTRANSPARENCE
);
399 rSet
.DisableItem( SID_CONNECTION_DLG
);
403 rSet
.DisableItem( SID_COMBINE
);
404 rSet
.DisableItem(SID_POLY_MERGE
);
405 rSet
.DisableItem(SID_POLY_SUBSTRACT
);
406 rSet
.DisableItem(SID_POLY_INTERSECT
);
407 rSet
.DisableItem(SID_EQUALIZEWIDTH
);
408 rSet
.DisableItem(SID_EQUALIZEHEIGHT
);
412 (!mpDrawView
->IsConvertToPathObjPossible() &&
413 !mpDrawView
->IsShearAllowed() &&
414 !mpDrawView
->IsDistortAllowed()) )
416 rSet
.DisableItem( SID_OBJECT_SHEAR
);
421 rSet
.DisableItem( SID_UNGROUP
);
424 rSet
.DisableItem( SID_TEXTATTR_DLG
);
427 rSet
.DisableItem( SID_MEASURE_DLG
);
429 if(bE3dCompoundObject
)
431 rSet
.DisableItem( SID_OBJECT_ALIGN
);
432 rSet
.DisableItem( SID_OBJECT_ALIGN_LEFT
);
433 rSet
.DisableItem( SID_OBJECT_ALIGN_CENTER
);
434 rSet
.DisableItem( SID_OBJECT_ALIGN_RIGHT
);
435 rSet
.DisableItem( SID_OBJECT_ALIGN_UP
);
436 rSet
.DisableItem( SID_OBJECT_ALIGN_MIDDLE
);
437 rSet
.DisableItem( SID_OBJECT_ALIGN_DOWN
);
438 rSet
.DisableItem( SID_FRAME_TO_TOP
);
439 rSet
.DisableItem( SID_MOREFRONT
);
440 rSet
.DisableItem( SID_FRAME_UP
);
441 rSet
.DisableItem( SID_MOREBACK
);
442 rSet
.DisableItem( SID_FRAME_DOWN
);
443 rSet
.DisableItem( SID_FRAME_TO_BOTTOM
);
444 rSet
.DisableItem( SID_BEFORE_OBJ
);
445 rSet
.DisableItem( SID_BEHIND_OBJ
);
446 rSet
.DisableItem( SID_REVERSE_ORDER
);
447 rSet
.DisableItem( SID_POSITION
);
451 if ( !mpDrawView
->IsDismantlePossible() )
453 rSet
.DisableItem( SID_DISMANTLE
);
455 if ( !mpDrawView
->IsDismantlePossible(true) &&
456 !mpDrawView
->IsImportMtfPossible() &&
457 !mpDrawView
->IsBreak3DObjPossible() )
459 rSet
.DisableItem( SID_BREAK
);
461 if ( !mpDrawView
->IsCombinePossible() )
463 rSet
.DisableItem(SID_COMBINE
);
464 rSet
.DisableItem(SID_POLY_MERGE
);
465 rSet
.DisableItem(SID_POLY_SUBSTRACT
);
466 rSet
.DisableItem(SID_POLY_INTERSECT
);
467 rSet
.DisableItem(SID_EQUALIZEWIDTH
);
468 rSet
.DisableItem(SID_EQUALIZEHEIGHT
);
470 if ( !mpDrawView
->IsCombinePossible(true) )
472 rSet
.DisableItem( SID_CONNECT
);
474 if ( !mpDrawView
->IsGroupPossible() )
476 rSet
.DisableItem( SID_GROUP
);
478 if ( !mpDrawView
->IsUnGroupPossible() )
480 rSet
.DisableItem( SID_UNGROUP
);
486 rSet
.DisableItem( SID_ENTER_GROUP
);
487 rSet
.DisableItem( SID_CUT
);
488 rSet
.DisableItem( SID_COPY
);
489 rSet
.DisableItem( SID_DELETE
);
490 rSet
.DisableItem( SID_ATTR_TRANSFORM
);
492 rSet
.DisableItem( SID_OBJECT_ALIGN
);
493 rSet
.DisableItem( SID_OBJECT_ALIGN_LEFT
);
494 rSet
.DisableItem( SID_OBJECT_ALIGN_CENTER
);
495 rSet
.DisableItem( SID_OBJECT_ALIGN_RIGHT
);
496 rSet
.DisableItem( SID_OBJECT_ALIGN_UP
);
497 rSet
.DisableItem( SID_OBJECT_ALIGN_MIDDLE
);
498 rSet
.DisableItem( SID_OBJECT_ALIGN_DOWN
);
500 rSet
.DisableItem( SID_FRAME_TO_TOP
);
501 rSet
.DisableItem( SID_MOREFRONT
);
502 rSet
.DisableItem( SID_FRAME_UP
);
503 rSet
.DisableItem( SID_MOREBACK
);
504 rSet
.DisableItem( SID_FRAME_DOWN
);
505 rSet
.DisableItem( SID_FRAME_TO_BOTTOM
);
506 rSet
.DisableItem( SID_BEFORE_OBJ
);
507 rSet
.DisableItem( SID_BEHIND_OBJ
);
508 rSet
.DisableItem( SID_POSITION
);
510 rSet
.DisableItem( SID_SIZE_OPTIMAL
);
511 rSet
.DisableItem( SID_LINEEND_POLYGON
);
512 rSet
.DisableItem( SID_COPYOBJECTS
);
513 rSet
.DisableItem( SID_HORIZONTAL
);
514 rSet
.DisableItem( SID_VERTICAL
);
515 rSet
.DisableItem( SID_FLIP_HORIZONTAL
);
516 rSet
.DisableItem( SID_FLIP_VERTICAL
);
517 rSet
.DisableItem( SID_GROUP
);
518 rSet
.DisableItem( SID_UNGROUP
);
519 rSet
.DisableItem( SID_NAME_GROUP
);
522 rSet
.DisableItem( SID_OBJECT_TITLE_DESCRIPTION
);
524 rSet
.DisableItem( SID_DISMANTLE
);
525 rSet
.DisableItem( SID_BREAK
);
526 rSet
.DisableItem( SID_TEXT_COMBINE
);
527 rSet
.DisableItem( SID_COMBINE
);
528 rSet
.DisableItem(SID_DISTRIBUTE_DLG
);
529 rSet
.DisableItem(SID_DISTRIBUTE_HLEFT
);
530 rSet
.DisableItem(SID_DISTRIBUTE_HCENTER
);
531 rSet
.DisableItem(SID_DISTRIBUTE_HDISTANCE
);
532 rSet
.DisableItem(SID_DISTRIBUTE_HRIGHT
);
533 rSet
.DisableItem(SID_DISTRIBUTE_VTOP
);
534 rSet
.DisableItem(SID_DISTRIBUTE_VCENTER
);
535 rSet
.DisableItem(SID_DISTRIBUTE_VDISTANCE
);
536 rSet
.DisableItem(SID_DISTRIBUTE_VBOTTOM
);
537 rSet
.DisableItem(SID_POLY_MERGE
);
538 rSet
.DisableItem(SID_POLY_SUBSTRACT
);
539 rSet
.DisableItem(SID_POLY_INTERSECT
);
540 rSet
.DisableItem(SID_EQUALIZEWIDTH
);
541 rSet
.DisableItem(SID_EQUALIZEHEIGHT
);
542 rSet
.DisableItem( SID_CONNECT
);
543 rSet
.DisableItem( SID_ANIMATION_EFFECTS
);
544 rSet
.DisableItem( SID_EXECUTE_ANIMATION_EFFECT
);
545 rSet
.DisableItem( SID_MODIFY_FIELD
);
546 rSet
.DisableItem (SID_OBJECT_SHEAR
);
549 if (GetObjectShell()->isContentExtractionLocked())
551 rSet
.DisableItem(SID_COPY
);
552 rSet
.DisableItem(SID_CUT
);
554 if(GetObjectShell()->isExportLocked())
556 rSet
.DisableItem(SID_SAVE_GRAPHIC
);
557 rSet
.DisableItem(SID_EXTERNAL_EDIT
);
559 if (GetDoc()->getImagePreferredDPI() <= 0)
561 rSet
.DisableItem(SID_GRAPHIC_SIZE_CHECK
);
565 } // end of namespace sd
567 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */