1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: drviewsj.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_sd.hxx"
34 #include "DrawViewShell.hxx"
35 #include <com/sun/star/embed/EmbedMisc.hpp>
36 #include <svtools/aeitem.hxx>
37 #ifndef _SVXIDS_HRC //autogen
38 #include <svx/svxids.hrc>
40 #ifndef _GLOBL3D_HXX //autogen
41 #include <svx/globl3d.hxx>
43 #include <svx/eeitem.hxx>
45 #include <svx/flditem.hxx>
47 #include <svx/svdogrp.hxx>
48 #include <svx/svdograf.hxx>
49 #include <svx/svdoole2.hxx>
50 #include <svx/sxelditm.hxx>
51 #include <sfx2/dispatch.hxx>
52 #include <sfx2/request.hxx>
53 #include <svx/svdopath.hxx>
54 #include <svx/polysc3d.hxx>
55 #include <svx/obj3d.hxx>
56 #include <sfx2/event.hxx>
57 #include <sfx2/docfile.hxx>
58 #include <rtl/ustrbuf.hxx>
63 #include "Outliner.hxx"
67 #include "drawdoc.hxx"
68 #include "DrawDocShell.hxx"
69 #include "drawview.hxx"
70 #include "optsitem.hxx"
72 using namespace com::sun::star
;
76 /*************************************************************************
78 |* Status (Enabled/Disabled) von Menue-SfxSlots setzen
80 \************************************************************************/
82 void DrawViewShell::GetMenuStateSel( SfxItemSet
&rSet
)
84 // Status der Menueintraege, bzw. Buttons
87 const SdrMarkList
& rMarkList
= mpDrawView
->GetMarkedObjectList();
88 ULONG nMarkCount
= rMarkList
.GetMarkCount();
90 if ( nMarkCount
== 1 )
92 if( SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_BEZIER_EDIT
) ||
93 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_UNGROUP
) ||
94 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_ENTER_GROUP
) ||
95 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_NAME_GROUP
) ||
98 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_OBJECT_TITLE_DESCRIPTION
) ||
100 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_ATTR_FILL_STYLE
) ||
101 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_CHANGEBEZIER
) ||
102 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_CHANGEPOLYGON
) ||
103 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_LINEEND_POLYGON
) ||
104 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( OBJ_TITLETEXT
) ||
105 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( OBJ_OUTLINETEXT
) ||
106 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_MEASURE_DLG
) ||
107 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_CONNECTION_DLG
) ||
108 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_CONNECTION_NEW_ROUTING
) ||
109 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_3D_LATHE ) ||
110 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_3D_LATHE_FAST ) ||
111 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_OBJECT_SHEAR
) ||
112 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_CONVERT_TO_1BIT_THRESHOLD
) ||
113 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_CONVERT_TO_1BIT_MATRIX
) ||
114 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_CONVERT_TO_4BIT_GRAYS
) ||
115 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_CONVERT_TO_4BIT_COLORS
) ||
116 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_CONVERT_TO_8BIT_GRAYS
) ||
117 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_CONVERT_TO_8BIT_COLORS
) ||
118 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_CONVERT_TO_24BIT
) ||
119 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_OBJECT_ALIGN_LEFT
) ||
120 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_OBJECT_ALIGN_CENTER
) ||
121 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_OBJECT_ALIGN_RIGHT
) ||
122 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_OBJECT_ALIGN_UP
) ||
123 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_OBJECT_ALIGN_MIDDLE
) ||
124 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_OBJECT_ALIGN_DOWN
) ||
125 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_FRAME_TO_TOP
) ||
126 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_MOREFRONT
) ||
127 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_MOREBACK
) ||
128 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_FRAME_TO_BOTTOM
) ||
129 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_BEFORE_OBJ
) ||
130 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_BEHIND_OBJ
) ||
131 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_REVERSE_ORDER
) ||
132 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_ORIGINAL_SIZE
) ||
133 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_SAVEGRAPHIC
) ||
134 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_TEXTATTR_DLG
) )
136 const SdrObject
* pObj
= rMarkList
.GetMark(0)->GetMarkedSdrObj();
137 UINT32 nInv
= pObj
->GetObjInventor();
138 UINT16 nId
= pObj
->GetObjIdentifier();
139 SdrObjTransformInfoRec aInfoRec
;
140 pObj
->TakeObjInfo( aInfoRec
);
143 // #91929#; don't show original size entry if not possible
144 if ( pObj
->ISA( SdrOle2Obj
) )
146 SdrOle2Obj
* pOleObj
= PTR_CAST(SdrOle2Obj
, pObj
);
147 if (pOleObj
->GetObjRef().is() &&
148 ((pOleObj
->GetObjRef()->getStatus( pOleObj
->GetAspect() ) & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE
) ) )
149 rSet
.DisableItem(SID_ORIGINAL_SIZE
);
152 if ( !( pObj
->ISA( SdrGrafObj
) ) )
154 rSet
.DisableItem(SID_SAVEGRAPHIC
);
157 // Wenn es sich um kein Gruppenobjekt oder 3D-Objekt handelt
158 // wird "Gruppe betreten" disabled
159 if( !( ( pObj
->ISA( SdrObjGroup
) && nInv
== SdrInventor
) ||
160 (pObj
->ISA (E3dPolyScene
) || pObj
->ISA (E3dScene
) /*|| pObj->ISA (E3dCompoundObject) */) ) )
162 rSet
.DisableItem( SID_ENTER_GROUP
);
165 // Wenn es sich um kein Gruppenobjekt handelt
166 // wird "Gruppierung aufheben" disabled
167 if (!(pObj
->ISA(SdrObjGroup
) && nInv
== SdrInventor
))
169 rSet
.DisableItem(SID_UNGROUP
);
172 if (!pObj->ISA(SdrObjGroup) && !pObj->ISA(SdrGrafObj) && !pObj->ISA(SdrOle2Obj))
174 rSet.DisableItem( SID_NAME_GROUP );
177 if (!pObj
->ISA(SdrGrafObj
) ||
178 ((SdrGrafObj
*) pObj
)->GetGraphicType() != GRAPHIC_BITMAP
||
179 ((SdrGrafObj
*) pObj
)->IsLinkedGraphic())
181 rSet
.DisableItem(SID_CONVERT_TO_1BIT_THRESHOLD
);
182 rSet
.DisableItem(SID_CONVERT_TO_1BIT_MATRIX
);
183 rSet
.DisableItem(SID_CONVERT_TO_4BIT_GRAYS
);
184 rSet
.DisableItem(SID_CONVERT_TO_4BIT_COLORS
);
185 rSet
.DisableItem(SID_CONVERT_TO_8BIT_GRAYS
);
186 rSet
.DisableItem(SID_CONVERT_TO_8BIT_COLORS
);
187 rSet
.DisableItem(SID_CONVERT_TO_24BIT
);
190 if( nInv
== SdrInventor
&&
193 nId
== OBJ_PATHLINE
||
194 nId
== OBJ_FREELINE
))
196 //rSet.DisableItem( SID_ATTRIBUTES_AREA ); // wieder raus!
197 rSet
.DisableItem( SID_ATTR_FILL_STYLE
);
199 if( (!pObj
->ISA( SdrPathObj
) && !aInfoRec
.bCanConvToPath
) || pObj
->ISA( SdrObjGroup
) ) // Solange es JOE fehlerhaft behandelt!
200 { // JOE: Ein Gruppenobjekt kann eben u.U. in ein PathObj gewandelt werden
201 rSet
.DisableItem( SID_LINEEND_POLYGON
);
203 if(nInv
== SdrInventor
&&
204 (nId
== OBJ_PATHFILL
|| nId
== OBJ_PATHLINE
|| !aInfoRec
.bCanConvToPath
))
205 rSet
.DisableItem( SID_CHANGEBEZIER
);
207 if( nInv
== SdrInventor
&&
208 ( nId
== OBJ_POLY
|| nId
== OBJ_PLIN
|| !aInfoRec
.bCanConvToPoly
) &&
209 !GetView()->IsVectorizeAllowed() )
211 rSet
.DisableItem( SID_CHANGEPOLYGON
);
214 if(nInv
== SdrInventor
&& nId
== OBJ_TABLE
)
216 rSet
.DisableItem( SID_TEXTATTR_DLG
);
219 if( nInv
!= SdrInventor
|| nId
!= OBJ_MEASURE
)
220 rSet
.DisableItem( SID_MEASURE_DLG
);
222 if( nInv
!= SdrInventor
|| nId
!= OBJ_EDGE
)
223 rSet
.DisableItem( SID_CONNECTION_DLG
);
226 BOOL bDisable
= TRUE
;
227 SfxItemSet
aAttrSet( GetDoc()->GetPool() );
228 GetView()->GetAttributes( aAttrSet
);
230 if( aAttrSet
.GetItemState( SDRATTR_EDGELINE1DELTA
) >= SFX_ITEM_AVAILABLE
&&
231 aAttrSet
.GetItemState( SDRATTR_EDGELINE2DELTA
) >= SFX_ITEM_AVAILABLE
&&
232 aAttrSet
.GetItemState( SDRATTR_EDGELINE3DELTA
) >= SFX_ITEM_AVAILABLE
)
234 long nVal1
= ( ( const SdrEdgeLine1DeltaItem
& ) aAttrSet
.Get( SDRATTR_EDGELINE1DELTA
) ).GetValue();
235 long nVal2
= ( ( const SdrEdgeLine2DeltaItem
& ) aAttrSet
.Get( SDRATTR_EDGELINE2DELTA
) ).GetValue();
236 long nVal3
= ( ( const SdrEdgeLine3DeltaItem
& ) aAttrSet
.Get( SDRATTR_EDGELINE3DELTA
) ).GetValue();
238 if( nVal1
!= 0 || nVal2
!= 0 || nVal3
!= 0 )
243 rSet
.DisableItem( SID_CONNECTION_NEW_ROUTING
);
246 if ( nInv
== E3dInventor
||
247 (!mpDrawView
->IsConvertToPathObjPossible(FALSE
) &&
248 !mpDrawView
->IsShearAllowed() &&
249 !mpDrawView
->IsDistortAllowed()) )
251 rSet
.DisableItem( SID_OBJECT_SHEAR
);
254 if(pObj
->ISA(E3dCompoundObject
))
256 rSet
.DisableItem( SID_OBJECT_ALIGN_LEFT
);
257 rSet
.DisableItem( SID_OBJECT_ALIGN_CENTER
);
258 rSet
.DisableItem( SID_OBJECT_ALIGN_RIGHT
);
259 rSet
.DisableItem( SID_OBJECT_ALIGN_UP
);
260 rSet
.DisableItem( SID_OBJECT_ALIGN_MIDDLE
);
261 rSet
.DisableItem( SID_OBJECT_ALIGN_DOWN
);
262 rSet
.DisableItem( SID_FRAME_TO_TOP
);
263 rSet
.DisableItem( SID_MOREFRONT
);
264 rSet
.DisableItem( SID_MOREBACK
);
265 rSet
.DisableItem( SID_FRAME_TO_BOTTOM
);
266 rSet
.DisableItem( SID_BEFORE_OBJ
);
267 rSet
.DisableItem( SID_BEHIND_OBJ
);
268 rSet
.DisableItem( SID_REVERSE_ORDER
);
272 if( SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_DISMANTLE
) ||
273 SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_BREAK
) )
275 if ( !mpDrawView
->IsDismantlePossible(FALSE
) )
277 rSet
.DisableItem( SID_DISMANTLE
);
280 if ( !mpDrawView
->IsDismantlePossible(TRUE
) &&
281 !mpDrawView
->IsImportMtfPossible() &&
282 !mpDrawView
->IsBreak3DObjPossible() )
284 rSet
.DisableItem( SID_BREAK
);
287 if( SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_MODIFY_FIELD
) )
289 OutlinerView
* pOLV
= mpDrawView
->GetTextEditOutlinerView();
293 const SvxFieldItem
* pFldItem
= pOLV
->GetFieldAtSelection();
295 if( !( pFldItem
&& (pFldItem
->GetField()->ISA( SvxDateField
) ||
296 pFldItem
->GetField()->ISA( SvxAuthorField
) ||
297 pFldItem
->GetField()->ISA( SvxExtFileField
) ||
298 pFldItem
->GetField()->ISA( SvxExtTimeField
) ) ) )
300 rSet
.DisableItem( SID_MODIFY_FIELD
);
304 rSet
.DisableItem( SID_MODIFY_FIELD
);
306 if( SFX_ITEM_AVAILABLE
== rSet
.GetItemState( SID_OUTLINE_TEXT_AUTOFIT
) )
309 const SdrMarkList
& rMarkList
= mpDrawView
->GetMarkedObjectList();
310 if( rMarkList
.GetMarkCount() == 1 )
312 SdrObject
* pObj
= rMarkList
.GetMark(0)->GetMarkedSdrObj();
313 bSet
= ((const SdrTextFitToSizeTypeItem
*)pObj
->GetMergedItemSet().GetItem(SDRATTR_TEXT_FITTOSIZE
))->GetValue() != SDRTEXTFIT_NONE
;
315 rSet
.Put(SfxBoolItem(SID_OUTLINE_TEXT_AUTOFIT
, bSet
));
318 rSet
.DisableItem( SID_GROUP
);
319 rSet
.DisableItem( SID_COMBINE
);
320 rSet
.DisableItem(SID_DISTRIBUTE_DLG
);
321 rSet
.DisableItem(SID_POLY_MERGE
);
322 rSet
.DisableItem(SID_POLY_SUBSTRACT
);
323 rSet
.DisableItem(SID_POLY_INTERSECT
);
324 rSet
.DisableItem( SID_CONNECT
);
327 else if( nMarkCount
> 1 )
329 // distribure dialog for 3+n objects
331 rSet
.DisableItem(SID_DISTRIBUTE_DLG
);
333 // rSet.ClearItem( SID_BEZIER_EDIT );
334 // rSet.DisableItem( SID_BEZIER_EDIT );
335 rSet
.DisableItem( SID_LINEEND_POLYGON
);
336 rSet
.DisableItem( SID_ENTER_GROUP
);
337 // Jetzt (28.10.96) muessen Namen fuer Objekte eindeutig sein
338 rSet
.DisableItem( SID_NAME_GROUP
);
340 rSet
.DisableItem( SID_OBJECT_TITLE_DESCRIPTION
);
341 rSet
.DisableItem( SID_MODIFY_FIELD
);
344 // if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ATTR_FILL_STYLE ) ||
345 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_UNGROUP ) ||
346 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_MEASURE_DLG ) ||
347 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONNECTION_DLG ) ||
348 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_COMBINE ) ||
349 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_SHEAR ) ||
350 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_TEXTATTR_DLG ) ||
351 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_3D_LATHE ) ||
352 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_3D_LATHE_FAST ) ||
353 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_LEFT ) ||
354 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_CENTER ) ||
355 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_RIGHT ) ||
356 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_UP ) ||
357 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_MIDDLE ) ||
358 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_DOWN ) )
364 BOOL bDrawObj
= FALSE
;
367 BOOL bMeasureObj
= FALSE
;
368 BOOL bEdgeObj
= FALSE
; // Connector
369 BOOL bE3dCompoundObject
= FALSE
;
372 i
< nMarkCount
&& !bText
&& i
< 50;
375 SdrObject
* pObj
= rMarkList
.GetMark(i
)->GetMarkedSdrObj();
376 UINT32 nInv
= pObj
->GetObjInventor();
377 UINT16 nId
= pObj
->GetObjIdentifier();
379 if (nInv
== SdrInventor
)
383 case OBJ_TEXT
: bText
= TRUE
; break;
385 case OBJ_LINE
: bLine
= TRUE
; break;
387 case OBJ_EDGE
: bEdgeObj
= TRUE
; break;
389 case OBJ_MEASURE
: bMeasureObj
= TRUE
; break;
399 case OBJ_CCUT
: bDrawObj
= TRUE
; break;
401 case OBJ_GRUP
: bGroup
= TRUE
; break;
403 case OBJ_GRAF
: bGraf
= TRUE
; break;
405 case OBJ_TABLE
: bTable
= true; break;
408 else if (nInv
== E3dInventor
)
410 if(pObj
->ISA(E3dScene
))
412 else if(pObj
->ISA(E3dCompoundObject
))
413 bE3dCompoundObject
= TRUE
;
416 /* Kann wohl raus, da jedes(?) Objekt Text enthalten kann
419 rSet.DisableItem( SID_CHAR_DLG );
420 rSet.DisableItem( SID_PARA_DLG );
421 rSet.DisableItem( SID_CHARMAP );
424 if( bLine
&& !bText
&& !bDrawObj
&&!b3dObj
)
426 //rSet.DisableItem( SID_ATTRIBUTES_AREA );
427 rSet
.DisableItem( SID_ATTR_FILL_STYLE
);
430 rSet
.DisableItem( SID_CONNECTION_DLG
);
434 rSet
.DisableItem( SID_COMBINE
);
435 rSet
.DisableItem(SID_POLY_MERGE
);
436 rSet
.DisableItem(SID_POLY_SUBSTRACT
);
437 rSet
.DisableItem(SID_POLY_INTERSECT
);
441 (!mpDrawView
->IsConvertToPathObjPossible(FALSE
) &&
442 !mpDrawView
->IsShearAllowed() &&
443 !mpDrawView
->IsDistortAllowed()) )
445 rSet
.DisableItem( SID_OBJECT_SHEAR
);
450 rSet
.DisableItem( SID_UNGROUP
);
453 rSet
.DisableItem( SID_TEXTATTR_DLG
);
456 rSet
.DisableItem( SID_MEASURE_DLG
);
460 rSet
.DisableItem(SID_CONVERT_TO_1BIT_THRESHOLD
);
461 rSet
.DisableItem(SID_CONVERT_TO_1BIT_MATRIX
);
462 rSet
.DisableItem(SID_CONVERT_TO_4BIT_GRAYS
);
463 rSet
.DisableItem(SID_CONVERT_TO_4BIT_COLORS
);
464 rSet
.DisableItem(SID_CONVERT_TO_8BIT_GRAYS
);
465 rSet
.DisableItem(SID_CONVERT_TO_8BIT_COLORS
);
466 rSet
.DisableItem(SID_CONVERT_TO_24BIT
);
469 if(bE3dCompoundObject
)
471 rSet
.DisableItem( SID_OBJECT_ALIGN_LEFT
);
472 rSet
.DisableItem( SID_OBJECT_ALIGN_CENTER
);
473 rSet
.DisableItem( SID_OBJECT_ALIGN_RIGHT
);
474 rSet
.DisableItem( SID_OBJECT_ALIGN_UP
);
475 rSet
.DisableItem( SID_OBJECT_ALIGN_MIDDLE
);
476 rSet
.DisableItem( SID_OBJECT_ALIGN_DOWN
);
477 rSet
.DisableItem( SID_FRAME_TO_TOP
);
478 rSet
.DisableItem( SID_MOREFRONT
);
479 rSet
.DisableItem( SID_MOREBACK
);
480 rSet
.DisableItem( SID_FRAME_TO_BOTTOM
);
481 rSet
.DisableItem( SID_BEFORE_OBJ
);
482 rSet
.DisableItem( SID_BEHIND_OBJ
);
483 rSet
.DisableItem( SID_REVERSE_ORDER
);
487 if ( !mpDrawView
->IsDismantlePossible(FALSE
) )
489 rSet
.DisableItem( SID_DISMANTLE
);
491 if ( !mpDrawView
->IsDismantlePossible(TRUE
) &&
492 !mpDrawView
->IsImportMtfPossible() &&
493 !mpDrawView
->IsBreak3DObjPossible() )
495 rSet
.DisableItem( SID_BREAK
);
497 if ( !mpDrawView
->IsCombinePossible(FALSE
) )
499 rSet
.DisableItem( SID_COMBINE
);
500 rSet
.DisableItem(SID_POLY_MERGE
);
501 rSet
.DisableItem(SID_POLY_SUBSTRACT
);
502 rSet
.DisableItem(SID_POLY_INTERSECT
);
504 if ( !mpDrawView
->IsCombinePossible(TRUE
) )
506 rSet
.DisableItem( SID_CONNECT
);
508 if ( !mpDrawView
->IsGroupPossible() )
510 rSet
.DisableItem( SID_GROUP
);
512 if ( !mpDrawView
->IsUnGroupPossible() )
514 rSet
.DisableItem( SID_UNGROUP
);
517 // kein Objekt selektiert
520 // rSet.ClearItem( SID_BEZIER_EDIT );
522 rSet
.DisableItem( SID_ENTER_GROUP
);
523 rSet
.DisableItem( SID_CUT
);
524 rSet
.DisableItem( SID_COPY
);
525 rSet
.DisableItem( SID_DELETE
);
526 rSet
.DisableItem( SID_ATTR_TRANSFORM
);
528 rSet
.DisableItem( SID_OBJECT_ALIGN_LEFT
);
529 rSet
.DisableItem( SID_OBJECT_ALIGN_CENTER
);
530 rSet
.DisableItem( SID_OBJECT_ALIGN_RIGHT
);
531 rSet
.DisableItem( SID_OBJECT_ALIGN_UP
);
532 rSet
.DisableItem( SID_OBJECT_ALIGN_MIDDLE
);
533 rSet
.DisableItem( SID_OBJECT_ALIGN_DOWN
);
535 rSet
.DisableItem( SID_FRAME_TO_TOP
);
536 rSet
.DisableItem( SID_MOREFRONT
);
537 rSet
.DisableItem( SID_MOREBACK
);
538 rSet
.DisableItem( SID_FRAME_TO_BOTTOM
);
539 rSet
.DisableItem( SID_BEFORE_OBJ
);
540 rSet
.DisableItem( SID_BEHIND_OBJ
);
541 rSet
.DisableItem( SID_CONVERT
);
543 // rSet.DisableItem( SID_BEZIER_EDIT );
544 rSet
.DisableItem( SID_SIZE_OPTIMAL
);
545 rSet
.DisableItem( SID_LINEEND_POLYGON
);
546 rSet
.DisableItem( SID_COPYOBJECTS
);
547 rSet
.DisableItem( SID_HORIZONTAL
);
548 rSet
.DisableItem( SID_VERTICAL
);
549 rSet
.DisableItem( SID_GROUP
);
550 rSet
.DisableItem( SID_UNGROUP
);
551 rSet
.DisableItem( SID_NAME_GROUP
);
554 rSet
.DisableItem( SID_OBJECT_TITLE_DESCRIPTION
);
556 rSet
.DisableItem( SID_DISMANTLE
);
557 rSet
.DisableItem( SID_BREAK
);
558 rSet
.DisableItem( SID_COMBINE
);
559 rSet
.DisableItem(SID_DISTRIBUTE_DLG
);
560 rSet
.DisableItem(SID_POLY_MERGE
);
561 rSet
.DisableItem(SID_POLY_SUBSTRACT
);
562 rSet
.DisableItem(SID_POLY_INTERSECT
);
563 rSet
.DisableItem( SID_CONNECT
);
564 rSet
.DisableItem( SID_ANIMATION_EFFECTS
);
565 rSet
.DisableItem( SID_MODIFY_FIELD
);
566 rSet
.DisableItem (SID_OBJECT_SHEAR
);
572 } // end of namespace sd