LCOV - code coverage report
Current view: top level - sd/source/ui/view - drviewsj.cxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 299 0.0 %
Date: 2014-04-14 Functions: 0 3 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       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/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      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 .
      18             :  */
      19             : 
      20             : #include "DrawViewShell.hxx"
      21             : #include <com/sun/star/embed/EmbedMisc.hpp>
      22             : #include <svl/aeitem.hxx>
      23             : #include <svx/svxids.hrc>
      24             : #include <svx/globl3d.hxx>
      25             : #include <editeng/eeitem.hxx>
      26             : #include <editeng/flditem.hxx>
      27             : #include <svx/svdogrp.hxx>
      28             : #include <svx/svdograf.hxx>
      29             : #include <svx/svdoole2.hxx>
      30             : #include <svx/sxelditm.hxx>
      31             : #include <sfx2/dispatch.hxx>
      32             : #include <sfx2/request.hxx>
      33             : #include <svx/svdopath.hxx>
      34             : #include <svx/polysc3d.hxx>
      35             : #include <svx/obj3d.hxx>
      36             : #include <sfx2/event.hxx>
      37             : #include <sfx2/docfile.hxx>
      38             : #include <rtl/ustrbuf.hxx>
      39             : 
      40             : 
      41             : #include "app.hrc"
      42             : 
      43             : #include "Outliner.hxx"
      44             : #include "sdpage.hxx"
      45             : #include "fupoor.hxx"
      46             : #include "fusel.hxx"
      47             : #include "drawdoc.hxx"
      48             : #include "DrawDocShell.hxx"
      49             : #include "drawview.hxx"
      50             : #include "optsitem.hxx"
      51             : 
      52             : using namespace com::sun::star;
      53             : 
      54             : namespace sd {
      55             : 
      56             : /**
      57             :  * Set state (Enabled/Disabled) of Menu-SfxSlots
      58             :  */
      59           0 : void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
      60             : {
      61             :     // Status of menu entries (Buttons,...)
      62             : 
      63             :     // Single selection
      64           0 :     const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
      65           0 :     sal_uLong nMarkCount = rMarkList.GetMarkCount();
      66             : 
      67           0 :     if ( nMarkCount == 1 )
      68             :     {
      69           0 :         if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_BEZIER_EDIT ) ||
      70           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_UNGROUP ) ||
      71           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ENTER_GROUP ) ||
      72           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_NAME_GROUP ) ||
      73             : 
      74             :             // #i68101#
      75           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_TITLE_DESCRIPTION ) ||
      76             : 
      77           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ATTR_FILL_STYLE ) ||
      78           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ATTR_FILL_TRANSPARENCE ) ||
      79           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ATTR_FILL_FLOATTRANSPARENCE ) ||
      80           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CHANGEBEZIER ) ||
      81           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CHANGEPOLYGON ) ||
      82           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_LINEEND_POLYGON ) ||
      83           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( OBJ_TITLETEXT ) ||
      84           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( OBJ_OUTLINETEXT ) ||
      85           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_MEASURE_DLG ) ||
      86           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONNECTION_DLG ) ||
      87           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONNECTION_NEW_ROUTING ) ||
      88           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_SHEAR ) ||
      89           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_1BIT_THRESHOLD ) ||
      90           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_1BIT_MATRIX ) ||
      91           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_4BIT_GRAYS ) ||
      92           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_4BIT_COLORS ) ||
      93           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_8BIT_GRAYS ) ||
      94           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_8BIT_COLORS ) ||
      95           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_24BIT ) ||
      96           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_LEFT ) ||
      97           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_CENTER ) ||
      98           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_RIGHT ) ||
      99           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_UP ) ||
     100           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_MIDDLE ) ||
     101           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_DOWN ) ||
     102           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_FRAME_TO_TOP ) ||
     103           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_MOREFRONT ) ||
     104           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_MOREBACK ) ||
     105           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_FRAME_TO_BOTTOM ) ||
     106           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_BEFORE_OBJ ) ||
     107           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_BEHIND_OBJ ) ||
     108           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_REVERSE_ORDER ) ||
     109           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ORIGINAL_SIZE ) ||
     110           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_SAVE_GRAPHIC ) ||
     111           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_COMPRESS_GRAPHIC ) ||
     112           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_TEXTATTR_DLG ) )
     113             :         {
     114           0 :             const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
     115           0 :             const SdrGrafObj* pSdrGrafObj = dynamic_cast< const SdrGrafObj* >(pObj);
     116           0 :             const SdrOle2Obj* pSdrOle2Obj = dynamic_cast< const SdrOle2Obj* >(pObj);
     117           0 :             sal_uInt32 nInv = pObj->GetObjInventor();
     118           0 :             sal_uInt16 nId = pObj->GetObjIdentifier();
     119           0 :             SdrObjTransformInfoRec aInfoRec;
     120           0 :             pObj->TakeObjInfo( aInfoRec );
     121             : 
     122             :             // don't show original size entry if not possible
     123           0 :             if(pSdrOle2Obj)
     124             :             {
     125           0 :                 if (pSdrOle2Obj->GetObjRef().is() &&
     126           0 :                     ((pSdrOle2Obj->GetObjRef()->getStatus( pSdrOle2Obj->GetAspect() ) & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) ) )
     127           0 :                     rSet.DisableItem(SID_ORIGINAL_SIZE);
     128             :             }
     129             : 
     130           0 :             if(!pSdrGrafObj)
     131             :             {
     132           0 :                 rSet.DisableItem(SID_SAVE_GRAPHIC);
     133           0 :                 rSet.DisableItem(SID_COMPRESS_GRAPHIC);
     134             :             }
     135             : 
     136             :             /* If it is not a group object or 3D object, we disable "enter
     137             :                group". */
     138           0 :             if( !( ( pObj->ISA( SdrObjGroup ) && nInv == SdrInventor ) ||
     139           0 :                 (pObj->ISA (E3dPolyScene) || pObj->ISA (E3dScene) /*|| pObj->ISA (E3dCompoundObject) */) ) )
     140             :             {
     141           0 :                 rSet.DisableItem( SID_ENTER_GROUP );
     142             :             }
     143             : 
     144             :             // If it is not a group object, we disable "ungroup"
     145           0 :             if (!(pObj->ISA(SdrObjGroup) && nInv == SdrInventor))
     146             :             {
     147           0 :                 rSet.DisableItem(SID_UNGROUP);
     148             :             }
     149           0 :             if(!pSdrGrafObj ||
     150           0 :                 pSdrGrafObj->GetGraphicType() != GRAPHIC_BITMAP ||
     151           0 :                 pSdrGrafObj->IsLinkedGraphic() ||
     152           0 :                 pSdrGrafObj->isEmbeddedSvg())
     153             :             {
     154           0 :                 rSet.DisableItem(SID_CONVERT_TO_1BIT_THRESHOLD);
     155           0 :                 rSet.DisableItem(SID_CONVERT_TO_1BIT_MATRIX);
     156           0 :                 rSet.DisableItem(SID_CONVERT_TO_4BIT_GRAYS);
     157           0 :                 rSet.DisableItem(SID_CONVERT_TO_4BIT_COLORS);
     158           0 :                 rSet.DisableItem(SID_CONVERT_TO_8BIT_GRAYS);
     159           0 :                 rSet.DisableItem(SID_CONVERT_TO_8BIT_COLORS);
     160           0 :                 rSet.DisableItem(SID_CONVERT_TO_24BIT);
     161             :             }
     162             : 
     163           0 :             if( nInv == SdrInventor &&
     164           0 :                (nId == OBJ_LINE ||
     165           0 :                 nId == OBJ_PLIN ||
     166           0 :                 nId == OBJ_PATHLINE ||
     167             :                 nId == OBJ_FREELINE ))
     168             :             {
     169             :                 //rSet.DisableItem( SID_ATTRIBUTES_AREA ); // remove again!
     170           0 :                 rSet.DisableItem( SID_ATTR_FILL_STYLE );
     171           0 :                 rSet.DisableItem( SID_ATTR_FILL_TRANSPARENCE );
     172           0 :                 rSet.DisableItem( SID_ATTR_FILL_FLOATTRANSPARENCE );
     173             :             }
     174           0 :             if( (!pObj->ISA( SdrPathObj ) && !aInfoRec.bCanConvToPath) || pObj->ISA( SdrObjGroup ) ) // As long as JOE handles it incorrectly!
     175             :             { // JOE: a group object may can be converted into a PathObj
     176           0 :                 rSet.DisableItem( SID_LINEEND_POLYGON );
     177             :             }
     178           0 :             if(nInv == SdrInventor &&
     179           0 :                (nId == OBJ_PATHFILL || nId == OBJ_PATHLINE || !aInfoRec.bCanConvToPath))
     180           0 :                 rSet.DisableItem( SID_CHANGEBEZIER );
     181             : 
     182           0 :             if( nInv == SdrInventor &&
     183           0 :                 ( nId == OBJ_POLY || nId == OBJ_PLIN || !aInfoRec.bCanConvToPoly ) &&
     184           0 :                 !GetView()->IsVectorizeAllowed() )
     185             :             {
     186           0 :                 rSet.DisableItem( SID_CHANGEPOLYGON );
     187             :             }
     188             : 
     189           0 :             if(nInv == SdrInventor && nId == OBJ_TABLE )
     190             :             {
     191           0 :                 rSet.DisableItem( SID_TEXTATTR_DLG );
     192             :             }
     193             : 
     194           0 :             if( nInv != SdrInventor || nId != OBJ_MEASURE )
     195           0 :                 rSet.DisableItem( SID_MEASURE_DLG );
     196             : 
     197           0 :             if( nInv != SdrInventor || nId != OBJ_EDGE )
     198           0 :                 rSet.DisableItem( SID_CONNECTION_DLG );
     199             :             else
     200             :             {
     201           0 :                 sal_Bool bDisable = sal_True;
     202           0 :                 SfxItemSet aAttrSet( GetDoc()->GetPool() );
     203           0 :                 GetView()->GetAttributes( aAttrSet );
     204             : 
     205           0 :                 if( aAttrSet.GetItemState( SDRATTR_EDGELINE1DELTA ) >= SFX_ITEM_AVAILABLE &&
     206           0 :                     aAttrSet.GetItemState( SDRATTR_EDGELINE2DELTA ) >= SFX_ITEM_AVAILABLE &&
     207           0 :                     aAttrSet.GetItemState( SDRATTR_EDGELINE3DELTA ) >= SFX_ITEM_AVAILABLE )
     208             :                 {
     209           0 :                     long nVal1 = ( ( const SdrEdgeLine1DeltaItem& ) aAttrSet.Get( SDRATTR_EDGELINE1DELTA ) ).GetValue();
     210           0 :                     long nVal2 = ( ( const SdrEdgeLine2DeltaItem& ) aAttrSet.Get( SDRATTR_EDGELINE2DELTA ) ).GetValue();
     211           0 :                     long nVal3 = ( ( const SdrEdgeLine3DeltaItem& ) aAttrSet.Get( SDRATTR_EDGELINE3DELTA ) ).GetValue();
     212             :                     {
     213           0 :                         if( nVal1 != 0 || nVal2 != 0 || nVal3 != 0 )
     214           0 :                             bDisable = sal_False;
     215             :                     }
     216             :                 }
     217           0 :                 if( bDisable )
     218           0 :                     rSet.DisableItem( SID_CONNECTION_NEW_ROUTING );
     219             :             }
     220             : 
     221           0 :             if ( nInv == E3dInventor                          ||
     222           0 :                  (!mpDrawView->IsConvertToPathObjPossible(false) &&
     223           0 :                   !mpDrawView->IsShearAllowed()                  &&
     224           0 :                   !mpDrawView->IsDistortAllowed()) )
     225             :             {
     226           0 :                 rSet.DisableItem( SID_OBJECT_SHEAR );
     227             :             }
     228             : 
     229           0 :             if(pObj->ISA(E3dCompoundObject))
     230             :             {
     231           0 :                 rSet.DisableItem( SID_OBJECT_ALIGN_LEFT );
     232           0 :                 rSet.DisableItem( SID_OBJECT_ALIGN_CENTER );
     233           0 :                 rSet.DisableItem( SID_OBJECT_ALIGN_RIGHT );
     234           0 :                 rSet.DisableItem( SID_OBJECT_ALIGN_UP );
     235           0 :                 rSet.DisableItem( SID_OBJECT_ALIGN_MIDDLE );
     236           0 :                 rSet.DisableItem( SID_OBJECT_ALIGN_DOWN );
     237           0 :                 rSet.DisableItem( SID_FRAME_TO_TOP );
     238           0 :                 rSet.DisableItem( SID_MOREFRONT );
     239           0 :                 rSet.DisableItem( SID_MOREBACK );
     240           0 :                 rSet.DisableItem( SID_FRAME_TO_BOTTOM );
     241           0 :                 rSet.DisableItem( SID_BEFORE_OBJ );
     242           0 :                 rSet.DisableItem( SID_BEHIND_OBJ );
     243           0 :                 rSet.DisableItem( SID_REVERSE_ORDER );
     244             :             }
     245             :         }
     246             : 
     247           0 :         if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_DISMANTLE ) ||
     248           0 :             SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_BREAK ) )
     249             :         {
     250           0 :             if ( !mpDrawView->IsDismantlePossible(false) )
     251             :             {
     252           0 :                 rSet.DisableItem( SID_DISMANTLE );
     253             :             }
     254             : 
     255           0 :             if ( !mpDrawView->IsDismantlePossible(true) &&
     256           0 :                  !mpDrawView->IsImportMtfPossible()     &&
     257           0 :                  !mpDrawView->IsBreak3DObjPossible() )
     258             :             {
     259           0 :                 rSet.DisableItem( SID_BREAK );
     260             :             }
     261             :         }
     262           0 :         if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_MODIFY_FIELD ) )
     263             :         {
     264           0 :             OutlinerView* pOLV = mpDrawView->GetTextEditOutlinerView();
     265             : 
     266           0 :             if( pOLV )
     267             :             {
     268           0 :                 const SvxFieldItem* pFldItem = pOLV->GetFieldAtSelection();
     269             : 
     270           0 :                 if( !( pFldItem && (pFldItem->GetField()->ISA( SvxDateField ) ||
     271           0 :                                  pFldItem->GetField()->ISA( SvxAuthorField ) ||
     272           0 :                                  pFldItem->GetField()->ISA( SvxExtFileField ) ||
     273           0 :                                  pFldItem->GetField()->ISA( SvxExtTimeField ) ) ) )
     274             :                 {
     275           0 :                     rSet.DisableItem( SID_MODIFY_FIELD );
     276             :                 }
     277             :             }
     278             :             else
     279           0 :                 rSet.DisableItem( SID_MODIFY_FIELD );
     280             :         }
     281           0 :         if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OUTLINE_TEXT_AUTOFIT ) )
     282             :         {
     283           0 :             const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
     284           0 :             const bool bSet = ((const SdrTextFitToSizeTypeItem*)pObj->GetMergedItemSet().GetItem(SDRATTR_TEXT_FITTOSIZE))->GetValue() != SDRTEXTFIT_NONE;
     285           0 :             rSet.Put(SfxBoolItem(SID_OUTLINE_TEXT_AUTOFIT, bSet));
     286             :         }
     287             : 
     288           0 :         rSet.DisableItem( SID_GROUP );
     289           0 :         rSet.DisableItem( SID_COMBINE );
     290           0 :         rSet.DisableItem(SID_DISTRIBUTE_DLG);
     291           0 :         rSet.DisableItem(SID_POLY_MERGE);
     292           0 :         rSet.DisableItem(SID_POLY_SUBSTRACT);
     293           0 :         rSet.DisableItem(SID_POLY_INTERSECT);
     294           0 :         rSet.DisableItem( SID_CONNECT );
     295             :     }
     296             :     // multi-selection
     297           0 :     else if( nMarkCount > 1 )
     298             :     {
     299             :         // distribure dialog for 3+n objects
     300           0 :         if(nMarkCount <= 2)
     301           0 :             rSet.DisableItem(SID_DISTRIBUTE_DLG);
     302             : 
     303           0 :         rSet.DisableItem( SID_LINEEND_POLYGON );
     304           0 :         rSet.DisableItem( SID_ENTER_GROUP );
     305             :         // Now names for objects have to be unique
     306           0 :         rSet.DisableItem( SID_NAME_GROUP );
     307             :         // #i68101#
     308           0 :         rSet.DisableItem( SID_OBJECT_TITLE_DESCRIPTION );
     309           0 :         rSet.DisableItem( SID_MODIFY_FIELD );
     310             : 
     311             :         {
     312           0 :             sal_Bool bText = sal_False;
     313           0 :             sal_Bool bLine = sal_False;
     314           0 :             sal_Bool bGroup = sal_False;
     315           0 :             sal_Bool bGraf = sal_False;
     316           0 :             sal_Bool bDrawObj = sal_False;
     317           0 :             sal_Bool b3dObj = sal_False;
     318           0 :             bool bTable = false;
     319           0 :             sal_Bool bMeasureObj = sal_False;
     320           0 :             sal_Bool bEdgeObj = sal_False; // Connector
     321           0 :             sal_Bool bE3dCompoundObject = sal_False;
     322             : 
     323           0 :             for( sal_uLong i = 0;
     324           0 :                  i < nMarkCount && !bText && i < 50;
     325             :                  i++ )
     326             :             {
     327           0 :                 SdrObject* pObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
     328           0 :                 sal_uInt32 nInv = pObj->GetObjInventor();
     329           0 :                 sal_uInt16 nId = pObj->GetObjIdentifier();
     330             : 
     331           0 :                 if (nInv == SdrInventor)
     332             :                 {
     333           0 :                     switch (nId)
     334             :                     {
     335           0 :                         case OBJ_TEXT: bText = sal_True; break;
     336             : 
     337           0 :                         case OBJ_LINE: bLine = sal_True; break;
     338             : 
     339           0 :                         case OBJ_EDGE: bEdgeObj = sal_True; break;
     340             : 
     341           0 :                         case OBJ_MEASURE: bMeasureObj = sal_True; break;
     342             : 
     343             :                         case OBJ_RECT:
     344             :                         case OBJ_CIRC:
     345             :                         case OBJ_FREELINE:
     346             :                         case OBJ_FREEFILL:
     347             :                         case OBJ_PATHFILL:
     348             :                         case OBJ_PATHLINE:
     349             :                         case OBJ_SECT:
     350             :                         case OBJ_CARC:
     351           0 :                         case OBJ_CCUT: bDrawObj = sal_True; break;
     352             : 
     353           0 :                         case OBJ_GRUP: bGroup = sal_True; break;
     354             : 
     355           0 :                         case OBJ_GRAF: bGraf = sal_True; break;
     356             : 
     357           0 :                         case OBJ_TABLE: bTable = true; break;
     358             :                     }
     359             :                 }
     360           0 :                 else if (nInv == E3dInventor)
     361             :                 {
     362           0 :                     if(pObj->ISA(E3dScene))
     363           0 :                         b3dObj = sal_True;
     364           0 :                     else if(pObj->ISA(E3dCompoundObject))
     365           0 :                         bE3dCompoundObject = sal_True;
     366             :                 }
     367             :             }
     368           0 :             if( bLine && !bText && !bDrawObj &&!b3dObj)
     369             :             {
     370           0 :                 rSet.DisableItem( SID_ATTR_FILL_STYLE );
     371           0 :                 rSet.DisableItem( SID_ATTR_FILL_TRANSPARENCE );
     372           0 :                 rSet.DisableItem( SID_ATTR_FILL_FLOATTRANSPARENCE );
     373             :             }
     374           0 :             if( !bEdgeObj )
     375           0 :                 rSet.DisableItem( SID_CONNECTION_DLG );
     376             : 
     377           0 :             if (b3dObj)
     378             :             {
     379           0 :                 rSet.DisableItem( SID_COMBINE );
     380           0 :                 rSet.DisableItem(SID_POLY_MERGE);
     381           0 :                 rSet.DisableItem(SID_POLY_SUBSTRACT);
     382           0 :                 rSet.DisableItem(SID_POLY_INTERSECT);
     383             :             }
     384             : 
     385           0 :             if (b3dObj                                        ||
     386           0 :                  (!mpDrawView->IsConvertToPathObjPossible(false) &&
     387           0 :                   !mpDrawView->IsShearAllowed()                  &&
     388           0 :                   !mpDrawView->IsDistortAllowed()) )
     389             :             {
     390           0 :                 rSet.DisableItem( SID_OBJECT_SHEAR );
     391             :             }
     392             : 
     393           0 :             if( !bGroup )
     394             :             {
     395           0 :                 rSet.DisableItem( SID_UNGROUP );
     396             :             }
     397           0 :             if( bTable )
     398           0 :                 rSet.DisableItem( SID_TEXTATTR_DLG );
     399             : 
     400           0 :             if( !bMeasureObj )
     401           0 :                 rSet.DisableItem( SID_MEASURE_DLG );
     402             : 
     403           0 :             if (!bGraf)
     404             :             {
     405           0 :                 rSet.DisableItem(SID_CONVERT_TO_1BIT_THRESHOLD);
     406           0 :                 rSet.DisableItem(SID_CONVERT_TO_1BIT_MATRIX);
     407           0 :                 rSet.DisableItem(SID_CONVERT_TO_4BIT_GRAYS);
     408           0 :                 rSet.DisableItem(SID_CONVERT_TO_4BIT_COLORS);
     409           0 :                 rSet.DisableItem(SID_CONVERT_TO_8BIT_GRAYS);
     410           0 :                 rSet.DisableItem(SID_CONVERT_TO_8BIT_COLORS);
     411           0 :                 rSet.DisableItem(SID_CONVERT_TO_24BIT);
     412             :             }
     413             : 
     414           0 :             if(bE3dCompoundObject)
     415             :             {
     416           0 :                 rSet.DisableItem( SID_OBJECT_ALIGN_LEFT );
     417           0 :                 rSet.DisableItem( SID_OBJECT_ALIGN_CENTER );
     418           0 :                 rSet.DisableItem( SID_OBJECT_ALIGN_RIGHT );
     419           0 :                 rSet.DisableItem( SID_OBJECT_ALIGN_UP );
     420           0 :                 rSet.DisableItem( SID_OBJECT_ALIGN_MIDDLE );
     421           0 :                 rSet.DisableItem( SID_OBJECT_ALIGN_DOWN );
     422           0 :                 rSet.DisableItem( SID_FRAME_TO_TOP );
     423           0 :                 rSet.DisableItem( SID_MOREFRONT );
     424           0 :                 rSet.DisableItem( SID_MOREBACK );
     425           0 :                 rSet.DisableItem( SID_FRAME_TO_BOTTOM );
     426           0 :                 rSet.DisableItem( SID_BEFORE_OBJ );
     427           0 :                 rSet.DisableItem( SID_BEHIND_OBJ );
     428           0 :                 rSet.DisableItem( SID_REVERSE_ORDER );
     429             :             }
     430             :         }
     431             : 
     432           0 :         if ( !mpDrawView->IsDismantlePossible(false) )
     433             :         {
     434           0 :             rSet.DisableItem( SID_DISMANTLE );
     435             :         }
     436           0 :         if ( !mpDrawView->IsDismantlePossible(true) &&
     437           0 :              !mpDrawView->IsImportMtfPossible()     &&
     438           0 :              !mpDrawView->IsBreak3DObjPossible() )
     439             :         {
     440           0 :             rSet.DisableItem( SID_BREAK );
     441             :         }
     442           0 :         if ( !mpDrawView->IsCombinePossible(false) )
     443             :         {
     444           0 :             rSet.DisableItem( SID_COMBINE );
     445           0 :             rSet.DisableItem(SID_POLY_MERGE);
     446           0 :             rSet.DisableItem(SID_POLY_SUBSTRACT);
     447           0 :             rSet.DisableItem(SID_POLY_INTERSECT);
     448             :         }
     449           0 :         if ( !mpDrawView->IsCombinePossible(true) )
     450             :         {
     451           0 :             rSet.DisableItem( SID_CONNECT );
     452             :         }
     453           0 :         if ( !mpDrawView->IsGroupPossible() )
     454             :         {
     455           0 :             rSet.DisableItem( SID_GROUP );
     456             :         }
     457           0 :         if ( !mpDrawView->IsUnGroupPossible() )
     458             :         {
     459           0 :             rSet.DisableItem( SID_UNGROUP );
     460             :         }
     461             :     }
     462             :     // select no object
     463             :     else
     464             :     {
     465           0 :         rSet.DisableItem( SID_ENTER_GROUP );
     466           0 :         rSet.DisableItem( SID_CUT );
     467           0 :         rSet.DisableItem( SID_COPY );
     468           0 :         rSet.DisableItem( SID_DELETE );
     469           0 :         rSet.DisableItem( SID_ATTR_TRANSFORM );
     470             : 
     471           0 :         rSet.DisableItem( SID_OBJECT_ALIGN_LEFT );
     472           0 :         rSet.DisableItem( SID_OBJECT_ALIGN_CENTER );
     473           0 :         rSet.DisableItem( SID_OBJECT_ALIGN_RIGHT );
     474           0 :         rSet.DisableItem( SID_OBJECT_ALIGN_UP );
     475           0 :         rSet.DisableItem( SID_OBJECT_ALIGN_MIDDLE );
     476           0 :         rSet.DisableItem( SID_OBJECT_ALIGN_DOWN );
     477             : 
     478           0 :         rSet.DisableItem( SID_FRAME_TO_TOP );
     479           0 :         rSet.DisableItem( SID_MOREFRONT );
     480           0 :         rSet.DisableItem( SID_MOREBACK );
     481           0 :         rSet.DisableItem( SID_FRAME_TO_BOTTOM );
     482           0 :         rSet.DisableItem( SID_BEFORE_OBJ );
     483           0 :         rSet.DisableItem( SID_BEHIND_OBJ );
     484           0 :         rSet.DisableItem( SID_CONVERT );
     485             : 
     486           0 :         rSet.DisableItem( SID_SIZE_OPTIMAL );
     487           0 :         rSet.DisableItem( SID_LINEEND_POLYGON );
     488           0 :         rSet.DisableItem( SID_COPYOBJECTS );
     489           0 :         rSet.DisableItem( SID_HORIZONTAL );
     490           0 :         rSet.DisableItem( SID_VERTICAL );
     491           0 :         rSet.DisableItem( SID_FLIP_HORIZONTAL );
     492           0 :         rSet.DisableItem( SID_FLIP_VERTICAL );
     493           0 :         rSet.DisableItem( SID_GROUP );
     494           0 :         rSet.DisableItem( SID_UNGROUP );
     495           0 :         rSet.DisableItem( SID_NAME_GROUP );
     496             : 
     497             :         // #i68101#
     498           0 :         rSet.DisableItem( SID_OBJECT_TITLE_DESCRIPTION );
     499             : 
     500           0 :         rSet.DisableItem( SID_DISMANTLE );
     501           0 :         rSet.DisableItem( SID_BREAK );
     502           0 :         rSet.DisableItem( SID_COMBINE );
     503           0 :         rSet.DisableItem(SID_DISTRIBUTE_DLG);
     504           0 :         rSet.DisableItem(SID_POLY_MERGE);
     505           0 :         rSet.DisableItem(SID_POLY_SUBSTRACT);
     506           0 :         rSet.DisableItem(SID_POLY_INTERSECT);
     507           0 :         rSet.DisableItem( SID_CONNECT );
     508           0 :         rSet.DisableItem( SID_ANIMATION_EFFECTS );
     509           0 :         rSet.DisableItem( SID_MODIFY_FIELD );
     510           0 :         rSet.DisableItem (SID_OBJECT_SHEAR);
     511             :     }
     512             : 
     513           0 : }
     514             : 
     515             : 
     516           0 : } // end of namespace sd
     517             : 
     518             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10