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 const SdrGrafObj* pSdrGrafObj = dynamic_cast< const SdrGrafObj* >(pObj); 131 const SdrOle2Obj* pSdrOle2Obj = dynamic_cast< const SdrOle2Obj* >(pObj); 132 sal_uInt32 nInv = pObj->GetObjInventor(); 133 sal_uInt16 nId = pObj->GetObjIdentifier(); 134 SdrObjTransformInfoRec aInfoRec; 135 pObj->TakeObjInfo( aInfoRec ); 136 137 // #91929#; don't show original size entry if not possible 138 if(pSdrOle2Obj) 139 { 140 if (pSdrOle2Obj->GetObjRef().is() && 141 ((pSdrOle2Obj->GetObjRef()->getStatus( pSdrOle2Obj->GetAspect() ) & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) ) ) 142 rSet.DisableItem(SID_ORIGINAL_SIZE); 143 } 144 145 if(!pSdrGrafObj) 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(!pSdrGrafObj || 171 pSdrGrafObj->GetGraphicType() != GRAPHIC_BITMAP || 172 pSdrGrafObj->IsLinkedGraphic() || 173 pSdrGrafObj->isEmbeddedSvg()) 174 { 175 rSet.DisableItem(SID_CONVERT_TO_1BIT_THRESHOLD); 176 rSet.DisableItem(SID_CONVERT_TO_1BIT_MATRIX); 177 rSet.DisableItem(SID_CONVERT_TO_4BIT_GRAYS); 178 rSet.DisableItem(SID_CONVERT_TO_4BIT_COLORS); 179 rSet.DisableItem(SID_CONVERT_TO_8BIT_GRAYS); 180 rSet.DisableItem(SID_CONVERT_TO_8BIT_COLORS); 181 rSet.DisableItem(SID_CONVERT_TO_24BIT); 182 } 183 184 if( nInv == SdrInventor && 185 (nId == OBJ_LINE || 186 nId == OBJ_PLIN || 187 nId == OBJ_PATHLINE || 188 nId == OBJ_FREELINE )) 189 { 190 //rSet.DisableItem( SID_ATTRIBUTES_AREA ); // wieder raus! 191 rSet.DisableItem( SID_ATTR_FILL_STYLE ); 192 } 193 if( (!pObj->ISA( SdrPathObj ) && !aInfoRec.bCanConvToPath) || pObj->ISA( SdrObjGroup ) ) // Solange es JOE fehlerhaft behandelt! 194 { // JOE: Ein Gruppenobjekt kann eben u.U. in ein PathObj gewandelt werden 195 rSet.DisableItem( SID_LINEEND_POLYGON ); 196 } 197 if(nInv == SdrInventor && 198 (nId == OBJ_PATHFILL || nId == OBJ_PATHLINE || !aInfoRec.bCanConvToPath)) 199 rSet.DisableItem( SID_CHANGEBEZIER ); 200 201 if( nInv == SdrInventor && 202 ( nId == OBJ_POLY || nId == OBJ_PLIN || !aInfoRec.bCanConvToPoly ) && 203 !GetView()->IsVectorizeAllowed() ) 204 { 205 rSet.DisableItem( SID_CHANGEPOLYGON ); 206 } 207 208 if(nInv == SdrInventor && nId == OBJ_TABLE ) 209 { 210 rSet.DisableItem( SID_TEXTATTR_DLG ); 211 } 212 213 if( nInv != SdrInventor || nId != OBJ_MEASURE ) 214 rSet.DisableItem( SID_MEASURE_DLG ); 215 216 if( nInv != SdrInventor || nId != OBJ_EDGE ) 217 rSet.DisableItem( SID_CONNECTION_DLG ); 218 else 219 { 220 sal_Bool bDisable = sal_True; 221 SfxItemSet aAttrSet( GetDoc()->GetPool() ); 222 GetView()->GetAttributes( aAttrSet ); 223 224 if( aAttrSet.GetItemState( SDRATTR_EDGELINE1DELTA ) >= SFX_ITEM_AVAILABLE && 225 aAttrSet.GetItemState( SDRATTR_EDGELINE2DELTA ) >= SFX_ITEM_AVAILABLE && 226 aAttrSet.GetItemState( SDRATTR_EDGELINE3DELTA ) >= SFX_ITEM_AVAILABLE ) 227 { 228 long nVal1 = ( ( const SdrEdgeLine1DeltaItem& ) aAttrSet.Get( SDRATTR_EDGELINE1DELTA ) ).GetValue(); 229 long nVal2 = ( ( const SdrEdgeLine2DeltaItem& ) aAttrSet.Get( SDRATTR_EDGELINE2DELTA ) ).GetValue(); 230 long nVal3 = ( ( const SdrEdgeLine3DeltaItem& ) aAttrSet.Get( SDRATTR_EDGELINE3DELTA ) ).GetValue(); 231 { 232 if( nVal1 != 0 || nVal2 != 0 || nVal3 != 0 ) 233 bDisable = sal_False; 234 } 235 } 236 if( bDisable ) 237 rSet.DisableItem( SID_CONNECTION_NEW_ROUTING ); 238 } 239 240 if ( nInv == E3dInventor || 241 (!mpDrawView->IsConvertToPathObjPossible(sal_False) && 242 !mpDrawView->IsShearAllowed() && 243 !mpDrawView->IsDistortAllowed()) ) 244 { 245 rSet.DisableItem( SID_OBJECT_SHEAR ); 246 } 247 248 if(pObj->ISA(E3dCompoundObject)) 249 { 250 rSet.DisableItem( SID_OBJECT_ALIGN_LEFT ); 251 rSet.DisableItem( SID_OBJECT_ALIGN_CENTER ); 252 rSet.DisableItem( SID_OBJECT_ALIGN_RIGHT ); 253 rSet.DisableItem( SID_OBJECT_ALIGN_UP ); 254 rSet.DisableItem( SID_OBJECT_ALIGN_MIDDLE ); 255 rSet.DisableItem( SID_OBJECT_ALIGN_DOWN ); 256 rSet.DisableItem( SID_FRAME_TO_TOP ); 257 rSet.DisableItem( SID_MOREFRONT ); 258 rSet.DisableItem( SID_MOREBACK ); 259 rSet.DisableItem( SID_FRAME_TO_BOTTOM ); 260 rSet.DisableItem( SID_BEFORE_OBJ ); 261 rSet.DisableItem( SID_BEHIND_OBJ ); 262 rSet.DisableItem( SID_REVERSE_ORDER ); 263 } 264 } 265 266 if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_DISMANTLE ) || 267 SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_BREAK ) ) 268 { 269 if ( !mpDrawView->IsDismantlePossible(sal_False) ) 270 { 271 rSet.DisableItem( SID_DISMANTLE ); 272 } 273 274 if ( !mpDrawView->IsDismantlePossible(sal_True) && 275 !mpDrawView->IsImportMtfPossible() && 276 !mpDrawView->IsBreak3DObjPossible() ) 277 { 278 rSet.DisableItem( SID_BREAK ); 279 } 280 } 281 if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_MODIFY_FIELD ) ) 282 { 283 OutlinerView* pOLV = mpDrawView->GetTextEditOutlinerView(); 284 285 if( pOLV ) 286 { 287 const SvxFieldItem* pFldItem = pOLV->GetFieldAtSelection(); 288 289 if( !( pFldItem && (pFldItem->GetField()->ISA( SvxDateField ) || 290 pFldItem->GetField()->ISA( SvxAuthorField ) || 291 pFldItem->GetField()->ISA( SvxExtFileField ) || 292 pFldItem->GetField()->ISA( SvxExtTimeField ) ) ) ) 293 { 294 rSet.DisableItem( SID_MODIFY_FIELD ); 295 } 296 } 297 else 298 rSet.DisableItem( SID_MODIFY_FIELD ); 299 } 300 301 rSet.DisableItem( SID_GROUP ); 302 rSet.DisableItem( SID_COMBINE ); 303 rSet.DisableItem(SID_DISTRIBUTE_DLG); 304 rSet.DisableItem(SID_POLY_MERGE); 305 rSet.DisableItem(SID_POLY_SUBSTRACT); 306 rSet.DisableItem(SID_POLY_INTERSECT); 307 rSet.DisableItem( SID_CONNECT ); 308 } 309 // Mehrfachselektion 310 else if( nMarkCount > 1 ) 311 { 312 // distribure dialog for 3+n objects 313 if(nMarkCount <= 2) 314 rSet.DisableItem(SID_DISTRIBUTE_DLG); 315 316 // rSet.ClearItem( SID_BEZIER_EDIT ); 317 // rSet.DisableItem( SID_BEZIER_EDIT ); 318 rSet.DisableItem( SID_LINEEND_POLYGON ); 319 rSet.DisableItem( SID_ENTER_GROUP ); 320 // Jetzt (28.10.96) muessen Namen fuer Objekte eindeutig sein 321 rSet.DisableItem( SID_NAME_GROUP ); 322 // #i68101# 323 rSet.DisableItem( SID_OBJECT_TITLE_DESCRIPTION ); 324 rSet.DisableItem( SID_MODIFY_FIELD ); 325 326 if( 1 ) 327 // if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ATTR_FILL_STYLE ) || 328 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_UNGROUP ) || 329 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_MEASURE_DLG ) || 330 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONNECTION_DLG ) || 331 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_COMBINE ) || 332 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_SHEAR ) || 333 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_TEXTATTR_DLG ) || 334 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_3D_LATHE ) || 335 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_3D_LATHE_FAST ) || 336 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_LEFT ) || 337 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_CENTER ) || 338 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_RIGHT ) || 339 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_UP ) || 340 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_MIDDLE ) || 341 // SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_DOWN ) ) 342 { 343 sal_Bool bText = sal_False; 344 sal_Bool bLine = sal_False; 345 sal_Bool bGroup = sal_False; 346 sal_Bool bGraf = sal_False; 347 sal_Bool bDrawObj = sal_False; 348 sal_Bool b3dObj = sal_False; 349 sal_Bool bTitOutText = sal_False; 350 bool bTable = false; 351 sal_Bool bMeasureObj = sal_False; 352 sal_Bool bEdgeObj = sal_False; // Connector 353 sal_Bool bE3dCompoundObject = sal_False; 354 355 for( sal_uLong i = 0; 356 i < nMarkCount && !bText && i < 50; 357 i++ ) 358 { 359 SdrObject* pObj = rMarkList.GetMark(i)->GetMarkedSdrObj(); 360 sal_uInt32 nInv = pObj->GetObjInventor(); 361 sal_uInt16 nId = pObj->GetObjIdentifier(); 362 363 if (nInv == SdrInventor) 364 { 365 switch (nId) 366 { 367 case OBJ_TEXT: bText = sal_True; break; 368 369 case OBJ_LINE: bLine = sal_True; break; 370 371 case OBJ_EDGE: bEdgeObj = sal_True; break; 372 373 case OBJ_MEASURE: bMeasureObj = sal_True; break; 374 375 case OBJ_RECT: 376 case OBJ_CIRC: 377 case OBJ_FREELINE: 378 case OBJ_FREEFILL: 379 case OBJ_PATHFILL: 380 case OBJ_PATHLINE: 381 case OBJ_SECT: 382 case OBJ_CARC: 383 case OBJ_CCUT: bDrawObj = sal_True; break; 384 385 case OBJ_GRUP: bGroup = sal_True; break; 386 387 case OBJ_GRAF: bGraf = sal_True; break; 388 389 case OBJ_TITLETEXT: 390 case OBJ_OUTLINETEXT: bTitOutText = sal_True; break; 391 case OBJ_TABLE: bTable = true; break; 392 } 393 } 394 else if (nInv == E3dInventor) 395 { 396 if(pObj->ISA(E3dScene)) 397 b3dObj = sal_True; 398 else if(pObj->ISA(E3dCompoundObject)) 399 bE3dCompoundObject = sal_True; 400 } 401 } 402 /* Kann wohl raus, da jedes(?) Objekt Text enthalten kann 403 if( !bText ) 404 { 405 rSet.DisableItem( SID_CHAR_DLG ); 406 rSet.DisableItem( SID_PARA_DLG ); 407 rSet.DisableItem( SID_CHARMAP ); 408 } 409 */ 410 if( bLine && !bText && !bDrawObj &&!b3dObj) 411 { 412 //rSet.DisableItem( SID_ATTRIBUTES_AREA ); 413 rSet.DisableItem( SID_ATTR_FILL_STYLE ); 414 } 415 if( !bEdgeObj ) 416 rSet.DisableItem( SID_CONNECTION_DLG ); 417 418 if (b3dObj) 419 { 420 rSet.DisableItem( SID_COMBINE ); 421 rSet.DisableItem(SID_POLY_MERGE); 422 rSet.DisableItem(SID_POLY_SUBSTRACT); 423 rSet.DisableItem(SID_POLY_INTERSECT); 424 } 425 426 if (b3dObj || 427 (!mpDrawView->IsConvertToPathObjPossible(sal_False) && 428 !mpDrawView->IsShearAllowed() && 429 !mpDrawView->IsDistortAllowed()) ) 430 { 431 rSet.DisableItem( SID_OBJECT_SHEAR ); 432 } 433 434 if( !bGroup ) 435 { 436 rSet.DisableItem( SID_UNGROUP ); 437 } 438 if( bTable ) 439 rSet.DisableItem( SID_TEXTATTR_DLG ); 440 441 if( !bMeasureObj ) 442 rSet.DisableItem( SID_MEASURE_DLG ); 443 444 if (!bGraf) 445 { 446 rSet.DisableItem(SID_CONVERT_TO_1BIT_THRESHOLD); 447 rSet.DisableItem(SID_CONVERT_TO_1BIT_MATRIX); 448 rSet.DisableItem(SID_CONVERT_TO_4BIT_GRAYS); 449 rSet.DisableItem(SID_CONVERT_TO_4BIT_COLORS); 450 rSet.DisableItem(SID_CONVERT_TO_8BIT_GRAYS); 451 rSet.DisableItem(SID_CONVERT_TO_8BIT_COLORS); 452 rSet.DisableItem(SID_CONVERT_TO_24BIT); 453 } 454 455 if(bE3dCompoundObject) 456 { 457 rSet.DisableItem( SID_OBJECT_ALIGN_LEFT ); 458 rSet.DisableItem( SID_OBJECT_ALIGN_CENTER ); 459 rSet.DisableItem( SID_OBJECT_ALIGN_RIGHT ); 460 rSet.DisableItem( SID_OBJECT_ALIGN_UP ); 461 rSet.DisableItem( SID_OBJECT_ALIGN_MIDDLE ); 462 rSet.DisableItem( SID_OBJECT_ALIGN_DOWN ); 463 rSet.DisableItem( SID_FRAME_TO_TOP ); 464 rSet.DisableItem( SID_MOREFRONT ); 465 rSet.DisableItem( SID_MOREBACK ); 466 rSet.DisableItem( SID_FRAME_TO_BOTTOM ); 467 rSet.DisableItem( SID_BEFORE_OBJ ); 468 rSet.DisableItem( SID_BEHIND_OBJ ); 469 rSet.DisableItem( SID_REVERSE_ORDER ); 470 } 471 } 472 473 if ( !mpDrawView->IsDismantlePossible(sal_False) ) 474 { 475 rSet.DisableItem( SID_DISMANTLE ); 476 } 477 if ( !mpDrawView->IsDismantlePossible(sal_True) && 478 !mpDrawView->IsImportMtfPossible() && 479 !mpDrawView->IsBreak3DObjPossible() ) 480 { 481 rSet.DisableItem( SID_BREAK ); 482 } 483 if ( !mpDrawView->IsCombinePossible(sal_False) ) 484 { 485 rSet.DisableItem( SID_COMBINE ); 486 rSet.DisableItem(SID_POLY_MERGE); 487 rSet.DisableItem(SID_POLY_SUBSTRACT); 488 rSet.DisableItem(SID_POLY_INTERSECT); 489 } 490 if ( !mpDrawView->IsCombinePossible(sal_True) ) 491 { 492 rSet.DisableItem( SID_CONNECT ); 493 } 494 if ( !mpDrawView->IsGroupPossible() ) 495 { 496 rSet.DisableItem( SID_GROUP ); 497 } 498 if ( !mpDrawView->IsUnGroupPossible() ) 499 { 500 rSet.DisableItem( SID_UNGROUP ); 501 } 502 } 503 // kein Objekt selektiert 504 else 505 { 506 // rSet.ClearItem( SID_BEZIER_EDIT ); 507 508 rSet.DisableItem( SID_ENTER_GROUP ); 509 rSet.DisableItem( SID_CUT ); 510 rSet.DisableItem( SID_COPY ); 511 rSet.DisableItem( SID_DELETE ); 512 rSet.DisableItem( SID_ATTR_TRANSFORM ); 513 514 rSet.DisableItem( SID_OBJECT_ALIGN_LEFT ); 515 rSet.DisableItem( SID_OBJECT_ALIGN_CENTER ); 516 rSet.DisableItem( SID_OBJECT_ALIGN_RIGHT ); 517 rSet.DisableItem( SID_OBJECT_ALIGN_UP ); 518 rSet.DisableItem( SID_OBJECT_ALIGN_MIDDLE ); 519 rSet.DisableItem( SID_OBJECT_ALIGN_DOWN ); 520 521 rSet.DisableItem( SID_FRAME_TO_TOP ); 522 rSet.DisableItem( SID_MOREFRONT ); 523 rSet.DisableItem( SID_MOREBACK ); 524 rSet.DisableItem( SID_FRAME_TO_BOTTOM ); 525 rSet.DisableItem( SID_BEFORE_OBJ ); 526 rSet.DisableItem( SID_BEHIND_OBJ ); 527 rSet.DisableItem( SID_CONVERT ); 528 529 // rSet.DisableItem( SID_BEZIER_EDIT ); 530 rSet.DisableItem( SID_SIZE_OPTIMAL ); 531 rSet.DisableItem( SID_LINEEND_POLYGON ); 532 rSet.DisableItem( SID_COPYOBJECTS ); 533 rSet.DisableItem( SID_HORIZONTAL ); 534 rSet.DisableItem( SID_VERTICAL ); 535 rSet.DisableItem( SID_GROUP ); 536 rSet.DisableItem( SID_UNGROUP ); 537 rSet.DisableItem( SID_NAME_GROUP ); 538 539 // #i68101# 540 rSet.DisableItem( SID_OBJECT_TITLE_DESCRIPTION ); 541 542 rSet.DisableItem( SID_DISMANTLE ); 543 rSet.DisableItem( SID_BREAK ); 544 rSet.DisableItem( SID_COMBINE ); 545 rSet.DisableItem(SID_DISTRIBUTE_DLG); 546 rSet.DisableItem(SID_POLY_MERGE); 547 rSet.DisableItem(SID_POLY_SUBSTRACT); 548 rSet.DisableItem(SID_POLY_INTERSECT); 549 rSet.DisableItem( SID_CONNECT ); 550 rSet.DisableItem( SID_ANIMATION_EFFECTS ); 551 rSet.DisableItem( SID_MODIFY_FIELD ); 552 rSet.DisableItem (SID_OBJECT_SHEAR); 553 } 554 555 } 556 557 558 } // end of namespace sd 559