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 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 // MARKER(update_precomp.py): autogen include statement, do not remove 25 #include "precompiled_sd.hxx" 26 27 #include "DrawViewShell.hxx" 28 #include <com/sun/star/embed/EmbedMisc.hpp> 29 #include <svl/aeitem.hxx> 30 #ifndef _SVXIDS_HRC //autogen 31 #include <svx/svxids.hrc> 32 #endif 33 #ifndef _GLOBL3D_HXX //autogen 34 #include <svx/globl3d.hxx> 35 #endif 36 #include <editeng/eeitem.hxx> 37 #ifndef _FLDITEM_HXX 38 #include <editeng/flditem.hxx> 39 #endif 40 #include <svx/svdogrp.hxx> 41 #include <svx/svdograf.hxx> 42 #include <svx/svdoole2.hxx> 43 #include <svx/sxelditm.hxx> 44 #include <sfx2/dispatch.hxx> 45 #include <sfx2/request.hxx> 46 #include <svx/svdopath.hxx> 47 #include <svx/polysc3d.hxx> 48 #include <svx/obj3d.hxx> 49 #include <sfx2/event.hxx> 50 #include <sfx2/docfile.hxx> 51 #include <rtl/ustrbuf.hxx> 52 53 54 #include "app.hrc" 55 56 #include "Outliner.hxx" 57 #include "sdpage.hxx" 58 #include "fupoor.hxx" 59 #include "fusel.hxx" 60 #include "drawdoc.hxx" 61 #include "DrawDocShell.hxx" 62 #include "drawview.hxx" 63 #include "optsitem.hxx" 64 65 using namespace com::sun::star; 66 67 namespace sd { 68 69 /************************************************************************* 70 |* 71 |* Status (Enabled/Disabled) von Menue-SfxSlots setzen 72 |* 73 \************************************************************************/ 74 75 void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet ) 76 { 77 // Status der Menueintraege, bzw. Buttons 78 // Einfachselektion 79 80 const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList(); 81 sal_uLong nMarkCount = rMarkList.GetMarkCount(); 82 83 if ( nMarkCount == 1 ) 84 { 85 if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_BEZIER_EDIT ) || 86 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_UNGROUP ) || 87 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ENTER_GROUP ) || 88 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_NAME_GROUP ) || 89 90 // #i68101# 91 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_TITLE_DESCRIPTION ) || 92 93 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ATTR_FILL_STYLE ) || 94 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CHANGEBEZIER ) || 95 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CHANGEPOLYGON ) || 96 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_LINEEND_POLYGON ) || 97 SFX_ITEM_AVAILABLE == rSet.GetItemState( OBJ_TITLETEXT ) || 98 SFX_ITEM_AVAILABLE == rSet.GetItemState( OBJ_OUTLINETEXT ) || 99 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_MEASURE_DLG ) || 100 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONNECTION_DLG ) || 101 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONNECTION_NEW_ROUTING ) || 102 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_3D_LATHE ) || 103 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_3D_LATHE_FAST ) || 104 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_SHEAR ) || 105 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_1BIT_THRESHOLD ) || 106 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_1BIT_MATRIX ) || 107 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_4BIT_GRAYS ) || 108 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_4BIT_COLORS ) || 109 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_8BIT_GRAYS ) || 110 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_8BIT_COLORS ) || 111 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_24BIT ) || 112 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_LEFT ) || 113 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_CENTER ) || 114 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_RIGHT ) || 115 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_UP ) || 116 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_MIDDLE ) || 117 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_DOWN ) || 118 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_FRAME_TO_TOP ) || 119 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_MOREFRONT ) || 120 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_MOREBACK ) || 121 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_FRAME_TO_BOTTOM ) || 122 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_BEFORE_OBJ ) || 123 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_BEHIND_OBJ ) || 124 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_REVERSE_ORDER ) || 125 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ORIGINAL_SIZE ) || 126 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_SAVEGRAPHIC ) || 127 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_TEXTATTR_DLG ) ) 128 { 129 const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); 130 sal_uInt32 nInv = pObj->GetObjInventor(); 131 sal_uInt16 nId = pObj->GetObjIdentifier(); 132 SdrObjTransformInfoRec aInfoRec; 133 pObj->TakeObjInfo( aInfoRec ); 134 135 136 // #91929#; don't show original size entry if not possible 137 if ( pObj->ISA( SdrOle2Obj ) ) 138 { 139 SdrOle2Obj* pOleObj = PTR_CAST(SdrOle2Obj, pObj); 140 if (pOleObj->GetObjRef().is() && 141 ((pOleObj->GetObjRef()->getStatus( pOleObj->GetAspect() ) & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) ) ) 142 rSet.DisableItem(SID_ORIGINAL_SIZE); 143 } 144 145 if ( !( pObj->ISA( SdrGrafObj ) ) ) 146 { 147 rSet.DisableItem(SID_SAVEGRAPHIC); 148 } 149 150 // Wenn es sich um kein Gruppenobjekt oder 3D-Objekt handelt 151 // wird "Gruppe betreten" disabled 152 if( !( ( pObj->ISA( SdrObjGroup ) && nInv == SdrInventor ) || 153 (pObj->ISA (E3dPolyScene) || pObj->ISA (E3dScene) /*|| pObj->ISA (E3dCompoundObject) */) ) ) 154 { 155 rSet.DisableItem( SID_ENTER_GROUP ); 156 } 157 158 // Wenn es sich um kein Gruppenobjekt handelt 159 // wird "Gruppierung aufheben" disabled 160 if (!(pObj->ISA(SdrObjGroup) && nInv == SdrInventor)) 161 { 162 rSet.DisableItem(SID_UNGROUP); 163 } 164 /* 165 if (!pObj->ISA(SdrObjGroup) && !pObj->ISA(SdrGrafObj) && !pObj->ISA(SdrOle2Obj)) 166 { 167 rSet.DisableItem( SID_NAME_GROUP ); 168 } 169 */ 170 if (!pObj->ISA(SdrGrafObj) || 171 ((SdrGrafObj*) pObj)->GetGraphicType() != GRAPHIC_BITMAP || 172 ((SdrGrafObj*) pObj)->IsLinkedGraphic()) 173 { 174 rSet.DisableItem(SID_CONVERT_TO_1BIT_THRESHOLD); 175 rSet.DisableItem(SID_CONVERT_TO_1BIT_MATRIX); 176 rSet.DisableItem(SID_CONVERT_TO_4BIT_GRAYS); 177 rSet.DisableItem(SID_CONVERT_TO_4BIT_COLORS); 178 rSet.DisableItem(SID_CONVERT_TO_8BIT_GRAYS); 179 rSet.DisableItem(SID_CONVERT_TO_8BIT_COLORS); 180 rSet.DisableItem(SID_CONVERT_TO_24BIT); 181 } 182 183 if( nInv == SdrInventor && 184 (nId == OBJ_LINE || 185 nId == OBJ_PLIN || 186 nId == OBJ_PATHLINE || 187 nId == OBJ_FREELINE )) 188 { 189 //rSet.DisableItem( SID_ATTRIBUTES_AREA ); // wieder raus! 190 rSet.DisableItem( SID_ATTR_FILL_STYLE ); 191 } 192 if( (!pObj->ISA( SdrPathObj ) && !aInfoRec.bCanConvToPath) || pObj->ISA( SdrObjGroup ) ) // Solange es JOE fehlerhaft behandelt! 193 { // JOE: Ein Gruppenobjekt kann eben u.U. in ein PathObj gewandelt werden 194 rSet.DisableItem( SID_LINEEND_POLYGON ); 195 } 196 if(nInv == SdrInventor && 197 (nId == OBJ_PATHFILL || nId == OBJ_PATHLINE || !aInfoRec.bCanConvToPath)) 198 rSet.DisableItem( SID_CHANGEBEZIER ); 199 200 if( nInv == SdrInventor && 201 ( nId == OBJ_POLY || nId == OBJ_PLIN || !aInfoRec.bCanConvToPoly ) && 202 !GetView()->IsVectorizeAllowed() ) 203 { 204 rSet.DisableItem( SID_CHANGEPOLYGON ); 205 } 206 207 if(nInv == SdrInventor && nId == OBJ_TABLE ) 208 { 209 rSet.DisableItem( SID_TEXTATTR_DLG ); 210 } 211 212 if( nInv != SdrInventor || nId != OBJ_MEASURE ) 213 rSet.DisableItem( SID_MEASURE_DLG ); 214 215 if( nInv != SdrInventor || nId != OBJ_EDGE ) 216 rSet.DisableItem( SID_CONNECTION_DLG ); 217 else 218 { 219 sal_Bool bDisable = sal_True; 220 SfxItemSet aAttrSet( GetDoc()->GetPool() ); 221 GetView()->GetAttributes( aAttrSet ); 222 223 if( aAttrSet.GetItemState( SDRATTR_EDGELINE1DELTA ) >= SFX_ITEM_AVAILABLE && 224 aAttrSet.GetItemState( SDRATTR_EDGELINE2DELTA ) >= SFX_ITEM_AVAILABLE && 225 aAttrSet.GetItemState( SDRATTR_EDGELINE3DELTA ) >= SFX_ITEM_AVAILABLE ) 226 { 227 long nVal1 = ( ( const SdrEdgeLine1DeltaItem& ) aAttrSet.Get( SDRATTR_EDGELINE1DELTA ) ).GetValue(); 228 long nVal2 = ( ( const SdrEdgeLine2DeltaItem& ) aAttrSet.Get( SDRATTR_EDGELINE2DELTA ) ).GetValue(); 229 long nVal3 = ( ( const SdrEdgeLine3DeltaItem& ) aAttrSet.Get( SDRATTR_EDGELINE3DELTA ) ).GetValue(); 230 { 231 if( nVal1 != 0 || nVal2 != 0 || nVal3 != 0 ) 232 bDisable = sal_False; 233 } 234 } 235 if( bDisable ) 236 rSet.DisableItem( SID_CONNECTION_NEW_ROUTING ); 237 } 238 239 if ( nInv == E3dInventor || 240 (!mpDrawView->IsConvertToPathObjPossible(sal_False) && 241 !mpDrawView->IsShearAllowed() && 242 !mpDrawView->IsDistortAllowed()) ) 243 { 244 rSet.DisableItem( SID_OBJECT_SHEAR ); 245 } 246 247 if(pObj->ISA(E3dCompoundObject)) 248 { 249 rSet.DisableItem( SID_OBJECT_ALIGN_LEFT ); 250 rSet.DisableItem( SID_OBJECT_ALIGN_CENTER ); 251 rSet.DisableItem( SID_OBJECT_ALIGN_RIGHT ); 252 rSet.DisableItem( SID_OBJECT_ALIGN_UP ); 253 rSet.DisableItem( SID_OBJECT_ALIGN_MIDDLE ); 254 rSet.DisableItem( SID_OBJECT_ALIGN_DOWN ); 255 rSet.DisableItem( SID_FRAME_TO_TOP ); 256 rSet.DisableItem( SID_MOREFRONT ); 257 rSet.DisableItem( SID_MOREBACK ); 258 rSet.DisableItem( SID_FRAME_TO_BOTTOM ); 259 rSet.DisableItem( SID_BEFORE_OBJ ); 260 rSet.DisableItem( SID_BEHIND_OBJ ); 261 rSet.DisableItem( SID_REVERSE_ORDER ); 262 } 263 } 264 265 if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_DISMANTLE ) || 266 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_BREAK ) ) 267 { 268 if ( !mpDrawView->IsDismantlePossible(sal_False) ) 269 { 270 rSet.DisableItem( SID_DISMANTLE ); 271 } 272 273 if ( !mpDrawView->IsDismantlePossible(sal_True) && 274 !mpDrawView->IsImportMtfPossible() && 275 !mpDrawView->IsBreak3DObjPossible() ) 276 { 277 rSet.DisableItem( SID_BREAK ); 278 } 279 } 280 if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_MODIFY_FIELD ) ) 281 { 282 OutlinerView* pOLV = mpDrawView->GetTextEditOutlinerView(); 283 284 if( pOLV ) 285 { 286 const SvxFieldItem* pFldItem = pOLV->GetFieldAtSelection(); 287 288 if( !( pFldItem && (pFldItem->GetField()->ISA( SvxDateField ) || 289 pFldItem->GetField()->ISA( SvxAuthorField ) || 290 pFldItem->GetField()->ISA( SvxExtFileField ) || 291 pFldItem->GetField()->ISA( SvxExtTimeField ) ) ) ) 292 { 293 rSet.DisableItem( SID_MODIFY_FIELD ); 294 } 295 } 296 else 297 rSet.DisableItem( SID_MODIFY_FIELD ); 298 } 299 300 rSet.DisableItem( SID_GROUP ); 301 rSet.DisableItem( SID_COMBINE ); 302 rSet.DisableItem(SID_DISTRIBUTE_DLG); 303 rSet.DisableItem(SID_POLY_MERGE); 304 rSet.DisableItem(SID_POLY_SUBSTRACT); 305 rSet.DisableItem(SID_POLY_INTERSECT); 306 rSet.DisableItem( SID_CONNECT ); 307 } 308 // Mehrfachselektion 309 else if( nMarkCount > 1 ) 310 { 311 // distribure dialog for 3+n objects 312 if(nMarkCount <= 2) 313 rSet.DisableItem(SID_DISTRIBUTE_DLG); 314 315 // rSet.ClearItem( SID_BEZIER_EDIT ); 316 // rSet.DisableItem( SID_BEZIER_EDIT ); 317 rSet.DisableItem( SID_LINEEND_POLYGON ); 318 rSet.DisableItem( SID_ENTER_GROUP ); 319 // Jetzt (28.10.96) muessen Namen fuer Objekte eindeutig sein 320 rSet.DisableItem( SID_NAME_GROUP ); 321 // #i68101# 322 rSet.DisableItem( SID_OBJECT_TITLE_DESCRIPTION ); 323 rSet.DisableItem( SID_MODIFY_FIELD ); 324 325 if( 1 ) 326 // if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ATTR_FILL_STYLE ) || 327 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_UNGROUP ) || 328 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_MEASURE_DLG ) || 329 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONNECTION_DLG ) || 330 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_COMBINE ) || 331 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_SHEAR ) || 332 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_TEXTATTR_DLG ) || 333 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_3D_LATHE ) || 334 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_3D_LATHE_FAST ) || 335 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_LEFT ) || 336 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_CENTER ) || 337 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_RIGHT ) || 338 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_UP ) || 339 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_MIDDLE ) || 340 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_DOWN ) ) 341 { 342 sal_Bool bText = sal_False; 343 sal_Bool bLine = sal_False; 344 sal_Bool bGroup = sal_False; 345 sal_Bool bGraf = sal_False; 346 sal_Bool bDrawObj = sal_False; 347 sal_Bool b3dObj = sal_False; 348 sal_Bool bTitOutText = sal_False; 349 bool bTable = false; 350 sal_Bool bMeasureObj = sal_False; 351 sal_Bool bEdgeObj = sal_False; // Connector 352 sal_Bool bE3dCompoundObject = sal_False; 353 354 for( sal_uLong i = 0; 355 i < nMarkCount && !bText && i < 50; 356 i++ ) 357 { 358 SdrObject* pObj = rMarkList.GetMark(i)->GetMarkedSdrObj(); 359 sal_uInt32 nInv = pObj->GetObjInventor(); 360 sal_uInt16 nId = pObj->GetObjIdentifier(); 361 362 if (nInv == SdrInventor) 363 { 364 switch (nId) 365 { 366 case OBJ_TEXT: bText = sal_True; break; 367 368 case OBJ_LINE: bLine = sal_True; break; 369 370 case OBJ_EDGE: bEdgeObj = sal_True; break; 371 372 case OBJ_MEASURE: bMeasureObj = sal_True; break; 373 374 case OBJ_RECT: 375 case OBJ_CIRC: 376 case OBJ_FREELINE: 377 case OBJ_FREEFILL: 378 case OBJ_PATHFILL: 379 case OBJ_PATHLINE: 380 case OBJ_SECT: 381 case OBJ_CARC: 382 case OBJ_CCUT: bDrawObj = sal_True; break; 383 384 case OBJ_GRUP: bGroup = sal_True; break; 385 386 case OBJ_GRAF: bGraf = sal_True; break; 387 388 case OBJ_TITLETEXT: 389 case OBJ_OUTLINETEXT: bTitOutText = sal_True; break; 390 case OBJ_TABLE: bTable = true; break; 391 } 392 } 393 else if (nInv == E3dInventor) 394 { 395 if(pObj->ISA(E3dScene)) 396 b3dObj = sal_True; 397 else if(pObj->ISA(E3dCompoundObject)) 398 bE3dCompoundObject = sal_True; 399 } 400 } 401 /* Kann wohl raus, da jedes(?) Objekt Text enthalten kann 402 if( !bText ) 403 { 404 rSet.DisableItem( SID_CHAR_DLG ); 405 rSet.DisableItem( SID_PARA_DLG ); 406 rSet.DisableItem( SID_CHARMAP ); 407 } 408 */ 409 if( bLine && !bText && !bDrawObj &&!b3dObj) 410 { 411 //rSet.DisableItem( SID_ATTRIBUTES_AREA ); 412 rSet.DisableItem( SID_ATTR_FILL_STYLE ); 413 } 414 if( !bEdgeObj ) 415 rSet.DisableItem( SID_CONNECTION_DLG ); 416 417 if (b3dObj) 418 { 419 rSet.DisableItem( SID_COMBINE ); 420 rSet.DisableItem(SID_POLY_MERGE); 421 rSet.DisableItem(SID_POLY_SUBSTRACT); 422 rSet.DisableItem(SID_POLY_INTERSECT); 423 } 424 425 if (b3dObj || 426 (!mpDrawView->IsConvertToPathObjPossible(sal_False) && 427 !mpDrawView->IsShearAllowed() && 428 !mpDrawView->IsDistortAllowed()) ) 429 { 430 rSet.DisableItem( SID_OBJECT_SHEAR ); 431 } 432 433 if( !bGroup ) 434 { 435 rSet.DisableItem( SID_UNGROUP ); 436 } 437 if( bTable ) 438 rSet.DisableItem( SID_TEXTATTR_DLG ); 439 440 if( !bMeasureObj ) 441 rSet.DisableItem( SID_MEASURE_DLG ); 442 443 if (!bGraf) 444 { 445 rSet.DisableItem(SID_CONVERT_TO_1BIT_THRESHOLD); 446 rSet.DisableItem(SID_CONVERT_TO_1BIT_MATRIX); 447 rSet.DisableItem(SID_CONVERT_TO_4BIT_GRAYS); 448 rSet.DisableItem(SID_CONVERT_TO_4BIT_COLORS); 449 rSet.DisableItem(SID_CONVERT_TO_8BIT_GRAYS); 450 rSet.DisableItem(SID_CONVERT_TO_8BIT_COLORS); 451 rSet.DisableItem(SID_CONVERT_TO_24BIT); 452 } 453 454 if(bE3dCompoundObject) 455 { 456 rSet.DisableItem( SID_OBJECT_ALIGN_LEFT ); 457 rSet.DisableItem( SID_OBJECT_ALIGN_CENTER ); 458 rSet.DisableItem( SID_OBJECT_ALIGN_RIGHT ); 459 rSet.DisableItem( SID_OBJECT_ALIGN_UP ); 460 rSet.DisableItem( SID_OBJECT_ALIGN_MIDDLE ); 461 rSet.DisableItem( SID_OBJECT_ALIGN_DOWN ); 462 rSet.DisableItem( SID_FRAME_TO_TOP ); 463 rSet.DisableItem( SID_MOREFRONT ); 464 rSet.DisableItem( SID_MOREBACK ); 465 rSet.DisableItem( SID_FRAME_TO_BOTTOM ); 466 rSet.DisableItem( SID_BEFORE_OBJ ); 467 rSet.DisableItem( SID_BEHIND_OBJ ); 468 rSet.DisableItem( SID_REVERSE_ORDER ); 469 } 470 } 471 472 if ( !mpDrawView->IsDismantlePossible(sal_False) ) 473 { 474 rSet.DisableItem( SID_DISMANTLE ); 475 } 476 if ( !mpDrawView->IsDismantlePossible(sal_True) && 477 !mpDrawView->IsImportMtfPossible() && 478 !mpDrawView->IsBreak3DObjPossible() ) 479 { 480 rSet.DisableItem( SID_BREAK ); 481 } 482 if ( !mpDrawView->IsCombinePossible(sal_False) ) 483 { 484 rSet.DisableItem( SID_COMBINE ); 485 rSet.DisableItem(SID_POLY_MERGE); 486 rSet.DisableItem(SID_POLY_SUBSTRACT); 487 rSet.DisableItem(SID_POLY_INTERSECT); 488 } 489 if ( !mpDrawView->IsCombinePossible(sal_True) ) 490 { 491 rSet.DisableItem( SID_CONNECT ); 492 } 493 if ( !mpDrawView->IsGroupPossible() ) 494 { 495 rSet.DisableItem( SID_GROUP ); 496 } 497 if ( !mpDrawView->IsUnGroupPossible() ) 498 { 499 rSet.DisableItem( SID_UNGROUP ); 500 } 501 } 502 // kein Objekt selektiert 503 else 504 { 505 // rSet.ClearItem( SID_BEZIER_EDIT ); 506 507 rSet.DisableItem( SID_ENTER_GROUP ); 508 rSet.DisableItem( SID_CUT ); 509 rSet.DisableItem( SID_COPY ); 510 rSet.DisableItem( SID_DELETE ); 511 rSet.DisableItem( SID_ATTR_TRANSFORM ); 512 513 rSet.DisableItem( SID_OBJECT_ALIGN_LEFT ); 514 rSet.DisableItem( SID_OBJECT_ALIGN_CENTER ); 515 rSet.DisableItem( SID_OBJECT_ALIGN_RIGHT ); 516 rSet.DisableItem( SID_OBJECT_ALIGN_UP ); 517 rSet.DisableItem( SID_OBJECT_ALIGN_MIDDLE ); 518 rSet.DisableItem( SID_OBJECT_ALIGN_DOWN ); 519 520 rSet.DisableItem( SID_FRAME_TO_TOP ); 521 rSet.DisableItem( SID_MOREFRONT ); 522 rSet.DisableItem( SID_MOREBACK ); 523 rSet.DisableItem( SID_FRAME_TO_BOTTOM ); 524 rSet.DisableItem( SID_BEFORE_OBJ ); 525 rSet.DisableItem( SID_BEHIND_OBJ ); 526 rSet.DisableItem( SID_CONVERT ); 527 528 // rSet.DisableItem( SID_BEZIER_EDIT ); 529 rSet.DisableItem( SID_SIZE_OPTIMAL ); 530 rSet.DisableItem( SID_LINEEND_POLYGON ); 531 rSet.DisableItem( SID_COPYOBJECTS ); 532 rSet.DisableItem( SID_HORIZONTAL ); 533 rSet.DisableItem( SID_VERTICAL ); 534 rSet.DisableItem( SID_GROUP ); 535 rSet.DisableItem( SID_UNGROUP ); 536 rSet.DisableItem( SID_NAME_GROUP ); 537 538 // #i68101# 539 rSet.DisableItem( SID_OBJECT_TITLE_DESCRIPTION ); 540 541 rSet.DisableItem( SID_DISMANTLE ); 542 rSet.DisableItem( SID_BREAK ); 543 rSet.DisableItem( SID_COMBINE ); 544 rSet.DisableItem(SID_DISTRIBUTE_DLG); 545 rSet.DisableItem(SID_POLY_MERGE); 546 rSet.DisableItem(SID_POLY_SUBSTRACT); 547 rSet.DisableItem(SID_POLY_INTERSECT); 548 rSet.DisableItem( SID_CONNECT ); 549 rSet.DisableItem( SID_ANIMATION_EFFECTS ); 550 rSet.DisableItem( SID_MODIFY_FIELD ); 551 rSet.DisableItem (SID_OBJECT_SHEAR); 552 } 553 554 } 555 556 557 } // end of namespace sd 558