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