LibreOffice Module sd (master) 1
drviewsj.cxx
Go to the documentation of this file.
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 <com/sun/star/embed/XEmbeddedObject.hpp>
23#include <com/sun/star/presentation/ClickAction.hpp>
24#include <sfx2/objsh.hxx>
25#include <svx/svxids.hrc>
26#include <svx/sdmetitm.hxx>
27#include <editeng/flditem.hxx>
28#include <svx/svdogrp.hxx>
29#include <svx/svdograf.hxx>
30#include <svx/svdoole2.hxx>
31#include <svx/sdtfsitm.hxx>
32#include <svx/svdopath.hxx>
33#include <svx/obj3d.hxx>
34#include <svx/scene3d.hxx>
35
36#include <app.hrc>
37
38#include <anminfo.hxx>
39#include <drawdoc.hxx>
40#include <drawview.hxx>
41
42using namespace com::sun::star;
43
44namespace sd {
45
50{
51 // Status of menu entries (Buttons,...)
52
53 // Single selection
54 const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
55 const size_t nMarkCount = rMarkList.GetMarkCount();
56
57 if ( nMarkCount == 1 )
58 {
59 if( SfxItemState::DEFAULT == rSet.GetItemState( SID_BEZIER_EDIT ) ||
60 SfxItemState::DEFAULT == rSet.GetItemState( SID_UNGROUP ) ||
61 SfxItemState::DEFAULT == rSet.GetItemState( SID_ENTER_GROUP ) ||
62 SfxItemState::DEFAULT == rSet.GetItemState( SID_NAME_GROUP ) ||
63
64 // #i68101#
65 SfxItemState::DEFAULT == rSet.GetItemState( SID_OBJECT_TITLE_DESCRIPTION ) ||
66
67 SfxItemState::DEFAULT == rSet.GetItemState( SID_ATTR_FILL_STYLE ) ||
68 SfxItemState::DEFAULT == rSet.GetItemState( SID_ATTR_FILL_USE_SLIDE_BACKGROUND ) ||
69 SfxItemState::DEFAULT == rSet.GetItemState( SID_ATTR_FILL_TRANSPARENCE ) ||
70 SfxItemState::DEFAULT == rSet.GetItemState( SID_ATTR_FILL_FLOATTRANSPARENCE ) ||
71 SfxItemState::DEFAULT == rSet.GetItemState( SID_CHANGEBEZIER ) ||
72 SfxItemState::DEFAULT == rSet.GetItemState( SID_CHANGEPOLYGON ) ||
73 SfxItemState::DEFAULT == rSet.GetItemState( SID_LINEEND_POLYGON ) ||
74 SfxItemState::DEFAULT == rSet.GetItemState( SID_MEASURE_DLG ) ||
75 SfxItemState::DEFAULT == rSet.GetItemState( SID_CONNECTION_DLG ) ||
76 SfxItemState::DEFAULT == rSet.GetItemState( SID_CONNECTION_NEW_ROUTING ) ||
77 SfxItemState::DEFAULT == rSet.GetItemState( SID_OBJECT_SHEAR ) ||
78 SfxItemState::DEFAULT == rSet.GetItemState( SID_OBJECT_ALIGN_LEFT ) ||
79 SfxItemState::DEFAULT == rSet.GetItemState( SID_OBJECT_ALIGN_CENTER ) ||
80 SfxItemState::DEFAULT == rSet.GetItemState( SID_OBJECT_ALIGN_RIGHT ) ||
81 SfxItemState::DEFAULT == rSet.GetItemState( SID_OBJECT_ALIGN_UP ) ||
82 SfxItemState::DEFAULT == rSet.GetItemState( SID_OBJECT_ALIGN_MIDDLE ) ||
83 SfxItemState::DEFAULT == rSet.GetItemState( SID_OBJECT_ALIGN_DOWN ) ||
84 SfxItemState::DEFAULT == rSet.GetItemState( SID_FRAME_TO_TOP ) ||
85 SfxItemState::DEFAULT == rSet.GetItemState( SID_MOREFRONT ) ||
86 SfxItemState::DEFAULT == rSet.GetItemState( SID_FRAME_UP ) ||
87 SfxItemState::DEFAULT == rSet.GetItemState( SID_MOREBACK ) ||
88 SfxItemState::DEFAULT == rSet.GetItemState( SID_FRAME_DOWN ) ||
89 SfxItemState::DEFAULT == rSet.GetItemState( SID_FRAME_TO_BOTTOM ) ||
90 SfxItemState::DEFAULT == rSet.GetItemState( SID_BEFORE_OBJ ) ||
91 SfxItemState::DEFAULT == rSet.GetItemState( SID_BEHIND_OBJ ) ||
92 SfxItemState::DEFAULT == rSet.GetItemState( SID_REVERSE_ORDER ) ||
93 SfxItemState::DEFAULT == rSet.GetItemState( SID_ORIGINAL_SIZE ) ||
94 SfxItemState::DEFAULT == rSet.GetItemState( SID_SAVE_GRAPHIC ) ||
95 SfxItemState::DEFAULT == rSet.GetItemState( SID_COMPRESS_GRAPHIC ) ||
96 SfxItemState::DEFAULT == rSet.GetItemState( SID_TEXTATTR_DLG ) ||
97 SfxItemState::DEFAULT == rSet.GetItemState( SID_EXECUTE_ANIMATION_EFFECT ))
98 {
99 const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
100 const SdrGrafObj* pSdrGrafObj = dynamic_cast< const SdrGrafObj* >(pObj);
101 const SdrOle2Obj* pSdrOle2Obj = dynamic_cast< const SdrOle2Obj* >(pObj);
102 const SdAnimationInfo* pAnimationInfo
104 SdrInventor nInv = pObj->GetObjInventor();
106 SdrObjTransformInfoRec aInfoRec;
107 pObj->TakeObjInfo( aInfoRec );
108
109 // don't show original size entry if not possible
110 if(pSdrOle2Obj)
111 {
112 if (pSdrOle2Obj->GetObjRef().is() &&
113 (pSdrOle2Obj->GetObjRef()->getStatus( pSdrOle2Obj->GetAspect() ) & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) )
114 rSet.DisableItem(SID_ORIGINAL_SIZE);
115 }
116
117 if(!pSdrGrafObj)
118 {
119 rSet.DisableItem(SID_SAVE_GRAPHIC);
120 rSet.DisableItem(SID_COMPRESS_GRAPHIC);
121 }
122
123 if (!pAnimationInfo
124 || pAnimationInfo->meClickAction == presentation::ClickAction::ClickAction_NONE
125 // Sound does not work in edit mode
126 || pAnimationInfo->meClickAction == presentation::ClickAction::ClickAction_SOUND
127 // No point in exiting the presentation in edit mode
128 || pAnimationInfo->meClickAction
129 == presentation::ClickAction::ClickAction_STOPPRESENTATION)
130 {
131 rSet.DisableItem(SID_EXECUTE_ANIMATION_EFFECT);
132 }
133
134 /* If it is not a group object or 3D object, we disable "enter
135 group". */
136 const auto* pSdrObjGroup = dynamic_cast<const SdrObjGroup*>(pObj);
137
138 if( !( ( pSdrObjGroup != nullptr && nInv == SdrInventor::Default ) ||
139 DynCastE3dScene(pObj) ) )
140 {
141 rSet.DisableItem( SID_ENTER_GROUP );
142 }
143
144 // Don't allow enter Diagrams
145 if(nullptr != pSdrObjGroup && pSdrObjGroup->isDiagram())
146 {
147 rSet.DisableItem( SID_ENTER_GROUP );
148 }
149
150 // If it is not a group object, we disable "ungroup"
151 if(pSdrObjGroup == nullptr || nInv != SdrInventor::Default)
152 {
153 rSet.DisableItem(SID_UNGROUP);
154 }
155
156 // Support advanced DiagramHelper
157 if(!pSdrObjGroup || !pSdrObjGroup->isDiagram())
158 {
159 rSet.DisableItem( SID_REGENERATE_DIAGRAM );
160 rSet.DisableItem( SID_EDIT_DIAGRAM );
161 }
162
163 if( nInv == SdrInventor::Default &&
164 (nId == SdrObjKind::Line ||
165 nId == SdrObjKind::PolyLine ||
166 nId == SdrObjKind::PathLine ||
167 nId == SdrObjKind::FreehandLine ))
168 {
169 //rSet.DisableItem( SID_ATTRIBUTES_AREA ); // remove again!
170 rSet.DisableItem( SID_ATTR_FILL_STYLE );
171 rSet.DisableItem( SID_ATTR_FILL_USE_SLIDE_BACKGROUND );
172 rSet.DisableItem( SID_ATTR_FILL_TRANSPARENCE );
173 rSet.DisableItem( SID_ATTR_FILL_FLOATTRANSPARENCE );
174 }
175 if( (dynamic_cast< const SdrPathObj *>( pObj ) == nullptr&& !aInfoRec.bCanConvToPath) || dynamic_cast< const SdrObjGroup *>( pObj ) != nullptr ) // As long as JOE handles it incorrectly!
176 { // JOE: a group object may can be converted into a PathObj
177 rSet.DisableItem( SID_LINEEND_POLYGON );
178 }
179 if(nInv == SdrInventor::Default &&
180 (nId == SdrObjKind::PathFill || nId == SdrObjKind::PathLine || !aInfoRec.bCanConvToPath))
181 rSet.DisableItem( SID_CHANGEBEZIER );
182
183 if( nInv == SdrInventor::Default &&
184 ( nId == SdrObjKind::Polygon || nId == SdrObjKind::PolyLine || !aInfoRec.bCanConvToPoly ) &&
186 {
187 rSet.DisableItem( SID_CHANGEPOLYGON );
188 }
189
190 if(nInv == SdrInventor::Default && nId == SdrObjKind::Table )
191 {
192 rSet.DisableItem( SID_TEXTATTR_DLG );
193 }
194
195 if( nInv != SdrInventor::Default || nId != SdrObjKind::Measure )
196 rSet.DisableItem( SID_MEASURE_DLG );
197
198 if( nInv != SdrInventor::Default || nId != SdrObjKind::Edge )
199 rSet.DisableItem( SID_CONNECTION_DLG );
200 else
201 {
202 bool bDisable = true;
203 SfxItemSet aAttrSet( GetDoc()->GetPool() );
204 GetView()->GetAttributes( aAttrSet );
205
206 if( aAttrSet.GetItemState( SDRATTR_EDGELINE1DELTA ) >= SfxItemState::DEFAULT &&
207 aAttrSet.GetItemState( SDRATTR_EDGELINE2DELTA ) >= SfxItemState::DEFAULT &&
208 aAttrSet.GetItemState( SDRATTR_EDGELINE3DELTA ) >= SfxItemState::DEFAULT )
209 {
210 ::tools::Long nVal1 = aAttrSet.Get( SDRATTR_EDGELINE1DELTA ).GetValue();
211 ::tools::Long nVal2 = aAttrSet.Get( SDRATTR_EDGELINE2DELTA ).GetValue();
212 ::tools::Long nVal3 = aAttrSet.Get( SDRATTR_EDGELINE3DELTA ).GetValue();
213 {
214 if( nVal1 != 0 || nVal2 != 0 || nVal3 != 0 )
215 bDisable = false;
216 }
217 }
218 if( bDisable )
219 rSet.DisableItem( SID_CONNECTION_NEW_ROUTING );
220 }
221
222 if ( nInv == SdrInventor::E3d ||
223 (!mpDrawView->IsConvertToPathObjPossible() &&
224 !mpDrawView->IsShearAllowed() &&
225 !mpDrawView->IsDistortAllowed()) )
226 {
227 rSet.DisableItem( SID_OBJECT_SHEAR );
228 }
229
230 if(dynamic_cast< const E3dCompoundObject *>( pObj ) != nullptr)
231 {
232 rSet.DisableItem( SID_OBJECT_ALIGN );
233 rSet.DisableItem( SID_OBJECT_ALIGN_LEFT );
234 rSet.DisableItem( SID_OBJECT_ALIGN_CENTER );
235 rSet.DisableItem( SID_OBJECT_ALIGN_RIGHT );
236 rSet.DisableItem( SID_OBJECT_ALIGN_UP );
237 rSet.DisableItem( SID_OBJECT_ALIGN_MIDDLE );
238 rSet.DisableItem( SID_OBJECT_ALIGN_DOWN );
239 rSet.DisableItem( SID_FRAME_TO_TOP );
240 rSet.DisableItem( SID_MOREFRONT );
241 rSet.DisableItem( SID_FRAME_UP );
242 rSet.DisableItem( SID_MOREBACK );
243 rSet.DisableItem( SID_FRAME_DOWN );
244 rSet.DisableItem( SID_FRAME_TO_BOTTOM );
245 rSet.DisableItem( SID_BEFORE_OBJ );
246 rSet.DisableItem( SID_BEHIND_OBJ );
247 rSet.DisableItem( SID_REVERSE_ORDER );
248 rSet.DisableItem( SID_POSITION );
249 }
250 }
251
252 if( SfxItemState::DEFAULT == rSet.GetItemState( SID_DISMANTLE ) ||
253 SfxItemState::DEFAULT == rSet.GetItemState( SID_BREAK ) )
254 {
255 if ( !mpDrawView->IsDismantlePossible() )
256 {
257 rSet.DisableItem( SID_DISMANTLE );
258 }
259
260 if ( !mpDrawView->IsDismantlePossible(true) &&
261 !mpDrawView->IsImportMtfPossible() &&
262 !mpDrawView->IsBreak3DObjPossible() )
263 {
264 rSet.DisableItem( SID_BREAK );
265 }
266 }
267 if( SfxItemState::DEFAULT == rSet.GetItemState( SID_MODIFY_FIELD ) )
268 {
269 OutlinerView* pOLV = mpDrawView->GetTextEditOutlinerView();
270
271 if( pOLV )
272 {
273 const SvxFieldItem* pFldItem = pOLV->GetFieldAtSelection();
274
275 if( !( pFldItem && (nullptr != dynamic_cast< const SvxDateField *>( pFldItem->GetField() ) ||
276 nullptr != dynamic_cast< const SvxAuthorField *>( pFldItem->GetField() ) ||
277 nullptr != dynamic_cast< const SvxExtFileField *>( pFldItem->GetField() ) ||
278 nullptr != dynamic_cast< const SvxExtTimeField *>( pFldItem->GetField() ) ) ) )
279 {
280 rSet.DisableItem( SID_MODIFY_FIELD );
281 }
282 }
283 else
284 rSet.DisableItem( SID_MODIFY_FIELD );
285 }
286 if( SfxItemState::DEFAULT == rSet.GetItemState( SID_OUTLINE_TEXT_AUTOFIT ) )
287 {
288 const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
290 const bool bSet = pItem && pItem->GetValue() != drawing::TextFitToSizeType_NONE;
291 rSet.Put(SfxBoolItem(SID_OUTLINE_TEXT_AUTOFIT, bSet));
292 }
293
294 rSet.DisableItem(SID_GROUP);
295 rSet.DisableItem(SID_TEXT_COMBINE);
296 rSet.DisableItem(SID_COMBINE);
297 rSet.DisableItem(SID_DISTRIBUTE_HLEFT);
298 rSet.DisableItem(SID_DISTRIBUTE_HCENTER);
299 rSet.DisableItem(SID_DISTRIBUTE_HDISTANCE);
300 rSet.DisableItem(SID_DISTRIBUTE_HRIGHT);
301 rSet.DisableItem(SID_DISTRIBUTE_VTOP);
302 rSet.DisableItem(SID_DISTRIBUTE_VCENTER);
303 rSet.DisableItem(SID_DISTRIBUTE_VDISTANCE);
304 rSet.DisableItem(SID_DISTRIBUTE_VBOTTOM);
305 rSet.DisableItem(SID_POLY_MERGE);
306 rSet.DisableItem(SID_POLY_SUBSTRACT);
307 rSet.DisableItem(SID_POLY_INTERSECT);
308 rSet.DisableItem(SID_EQUALIZEWIDTH);
309 rSet.DisableItem(SID_EQUALIZEHEIGHT);
310 rSet.DisableItem(SID_CONNECT);
311 }
312 // multi-selection
313 else if( nMarkCount > 1 )
314 {
315 // distribute dialog for 3+n objects
316 if(nMarkCount <= 2)
317 {
318 rSet.DisableItem(SID_DISTRIBUTE_HLEFT);
319 rSet.DisableItem(SID_DISTRIBUTE_HCENTER);
320 rSet.DisableItem(SID_DISTRIBUTE_HDISTANCE);
321 rSet.DisableItem(SID_DISTRIBUTE_HRIGHT);
322 rSet.DisableItem(SID_DISTRIBUTE_VTOP);
323 rSet.DisableItem(SID_DISTRIBUTE_VCENTER);
324 rSet.DisableItem(SID_DISTRIBUTE_VDISTANCE);
325 rSet.DisableItem(SID_DISTRIBUTE_VBOTTOM);
326 }
327
328 rSet.DisableItem( SID_LINEEND_POLYGON );
329 rSet.DisableItem( SID_ENTER_GROUP );
330 // Now names for objects have to be unique
331 rSet.DisableItem( SID_NAME_GROUP );
332 // #i68101#
333 rSet.DisableItem( SID_OBJECT_TITLE_DESCRIPTION );
334 rSet.DisableItem( SID_MODIFY_FIELD );
335
336 {
337 bool bText = false;
338 bool bLine = false;
339 bool bGroup = false;
340 bool bDrawObj = false;
341 bool b3dObj = false;
342 bool bTable = false;
343 bool bMeasureObj = false;
344 bool bEdgeObj = false; // Connector
345 bool bE3dCompoundObject = false;
346
347 for( size_t i = 0; i < nMarkCount && !bText && i < 50; ++i )
348 {
349 SdrObject* pObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
350 SdrInventor nInv = pObj->GetObjInventor();
352
353 if (nInv == SdrInventor::Default)
354 {
355 switch (nId)
356 {
357 case SdrObjKind::Text: bText = true; break;
358
359 case SdrObjKind::Line: bLine = true; break;
360
361 case SdrObjKind::Edge: bEdgeObj = true; break;
362
363 case SdrObjKind::Measure: bMeasureObj = true; break;
364
365 case SdrObjKind::Rectangle:
366 case SdrObjKind::CircleOrEllipse:
367 case SdrObjKind::FreehandLine:
368 case SdrObjKind::FreehandFill:
369 case SdrObjKind::PathFill:
370 case SdrObjKind::PathLine:
371 case SdrObjKind::CircleSection:
372 case SdrObjKind::CircleArc:
373 case SdrObjKind::CircleCut: bDrawObj = true; break;
374
375 case SdrObjKind::Group: bGroup = true; break;
376
377 case SdrObjKind::Graphic: break;
378
379 case SdrObjKind::Table: bTable = true; break;
380 default: ;
381 }
382 }
383 else if (nInv == SdrInventor::E3d)
384 {
385 if(DynCastE3dScene(pObj))
386 b3dObj = true;
387 else if(dynamic_cast< const E3dCompoundObject* >(pObj) != nullptr)
388 bE3dCompoundObject = true;
389 }
390 }
391 if( bLine && !bText && !bDrawObj &&!b3dObj)
392 {
393 rSet.DisableItem( SID_ATTR_FILL_STYLE );
394 rSet.DisableItem( SID_ATTR_FILL_USE_SLIDE_BACKGROUND );
395 rSet.DisableItem( SID_ATTR_FILL_TRANSPARENCE );
396 rSet.DisableItem( SID_ATTR_FILL_FLOATTRANSPARENCE );
397 }
398 if( !bEdgeObj )
399 rSet.DisableItem( SID_CONNECTION_DLG );
400
401 if (b3dObj)
402 {
403 rSet.DisableItem( SID_COMBINE );
404 rSet.DisableItem(SID_POLY_MERGE);
405 rSet.DisableItem(SID_POLY_SUBSTRACT);
406 rSet.DisableItem(SID_POLY_INTERSECT);
407 rSet.DisableItem(SID_EQUALIZEWIDTH);
408 rSet.DisableItem(SID_EQUALIZEHEIGHT);
409 }
410
411 if (b3dObj ||
412 (!mpDrawView->IsConvertToPathObjPossible() &&
413 !mpDrawView->IsShearAllowed() &&
414 !mpDrawView->IsDistortAllowed()) )
415 {
416 rSet.DisableItem( SID_OBJECT_SHEAR );
417 }
418
419 if( !bGroup )
420 {
421 rSet.DisableItem( SID_UNGROUP );
422 }
423 if( bTable )
424 rSet.DisableItem( SID_TEXTATTR_DLG );
425
426 if( !bMeasureObj )
427 rSet.DisableItem( SID_MEASURE_DLG );
428
429 if(bE3dCompoundObject)
430 {
431 rSet.DisableItem( SID_OBJECT_ALIGN );
432 rSet.DisableItem( SID_OBJECT_ALIGN_LEFT );
433 rSet.DisableItem( SID_OBJECT_ALIGN_CENTER );
434 rSet.DisableItem( SID_OBJECT_ALIGN_RIGHT );
435 rSet.DisableItem( SID_OBJECT_ALIGN_UP );
436 rSet.DisableItem( SID_OBJECT_ALIGN_MIDDLE );
437 rSet.DisableItem( SID_OBJECT_ALIGN_DOWN );
438 rSet.DisableItem( SID_FRAME_TO_TOP );
439 rSet.DisableItem( SID_MOREFRONT );
440 rSet.DisableItem( SID_FRAME_UP );
441 rSet.DisableItem( SID_MOREBACK );
442 rSet.DisableItem( SID_FRAME_DOWN );
443 rSet.DisableItem( SID_FRAME_TO_BOTTOM );
444 rSet.DisableItem( SID_BEFORE_OBJ );
445 rSet.DisableItem( SID_BEHIND_OBJ );
446 rSet.DisableItem( SID_REVERSE_ORDER );
447 rSet.DisableItem( SID_POSITION );
448 }
449 }
450
451 if ( !mpDrawView->IsDismantlePossible() )
452 {
453 rSet.DisableItem( SID_DISMANTLE );
454 }
455 if ( !mpDrawView->IsDismantlePossible(true) &&
456 !mpDrawView->IsImportMtfPossible() &&
457 !mpDrawView->IsBreak3DObjPossible() )
458 {
459 rSet.DisableItem( SID_BREAK );
460 }
461 if ( !mpDrawView->IsCombinePossible() )
462 {
463 rSet.DisableItem(SID_COMBINE);
464 rSet.DisableItem(SID_POLY_MERGE);
465 rSet.DisableItem(SID_POLY_SUBSTRACT);
466 rSet.DisableItem(SID_POLY_INTERSECT);
467 rSet.DisableItem(SID_EQUALIZEWIDTH);
468 rSet.DisableItem(SID_EQUALIZEHEIGHT);
469 }
470 if ( !mpDrawView->IsCombinePossible(true) )
471 {
472 rSet.DisableItem( SID_CONNECT );
473 }
474 if ( !mpDrawView->IsGroupPossible() )
475 {
476 rSet.DisableItem( SID_GROUP );
477 }
478 if ( !mpDrawView->IsUnGroupPossible() )
479 {
480 rSet.DisableItem( SID_UNGROUP );
481 }
482 }
483 // select no object
484 else
485 {
486 rSet.DisableItem( SID_ENTER_GROUP );
487 rSet.DisableItem( SID_CUT );
488 rSet.DisableItem( SID_COPY );
489 rSet.DisableItem( SID_DELETE );
490 rSet.DisableItem( SID_ATTR_TRANSFORM );
491
492 rSet.DisableItem( SID_OBJECT_ALIGN );
493 rSet.DisableItem( SID_OBJECT_ALIGN_LEFT );
494 rSet.DisableItem( SID_OBJECT_ALIGN_CENTER );
495 rSet.DisableItem( SID_OBJECT_ALIGN_RIGHT );
496 rSet.DisableItem( SID_OBJECT_ALIGN_UP );
497 rSet.DisableItem( SID_OBJECT_ALIGN_MIDDLE );
498 rSet.DisableItem( SID_OBJECT_ALIGN_DOWN );
499
500 rSet.DisableItem( SID_FRAME_TO_TOP );
501 rSet.DisableItem( SID_MOREFRONT );
502 rSet.DisableItem( SID_FRAME_UP );
503 rSet.DisableItem( SID_MOREBACK );
504 rSet.DisableItem( SID_FRAME_DOWN );
505 rSet.DisableItem( SID_FRAME_TO_BOTTOM );
506 rSet.DisableItem( SID_BEFORE_OBJ );
507 rSet.DisableItem( SID_BEHIND_OBJ );
508 rSet.DisableItem( SID_POSITION );
509
510 rSet.DisableItem( SID_SIZE_OPTIMAL );
511 rSet.DisableItem( SID_LINEEND_POLYGON );
512 rSet.DisableItem( SID_COPYOBJECTS );
513 rSet.DisableItem( SID_HORIZONTAL );
514 rSet.DisableItem( SID_VERTICAL );
515 rSet.DisableItem( SID_FLIP_HORIZONTAL );
516 rSet.DisableItem( SID_FLIP_VERTICAL );
517 rSet.DisableItem( SID_GROUP );
518 rSet.DisableItem( SID_UNGROUP );
519 rSet.DisableItem( SID_NAME_GROUP );
520
521 // #i68101#
522 rSet.DisableItem( SID_OBJECT_TITLE_DESCRIPTION );
523
524 rSet.DisableItem( SID_DISMANTLE );
525 rSet.DisableItem( SID_BREAK );
526 rSet.DisableItem( SID_TEXT_COMBINE );
527 rSet.DisableItem( SID_COMBINE );
528 rSet.DisableItem(SID_DISTRIBUTE_DLG);
529 rSet.DisableItem(SID_DISTRIBUTE_HLEFT);
530 rSet.DisableItem(SID_DISTRIBUTE_HCENTER);
531 rSet.DisableItem(SID_DISTRIBUTE_HDISTANCE);
532 rSet.DisableItem(SID_DISTRIBUTE_HRIGHT);
533 rSet.DisableItem(SID_DISTRIBUTE_VTOP);
534 rSet.DisableItem(SID_DISTRIBUTE_VCENTER);
535 rSet.DisableItem(SID_DISTRIBUTE_VDISTANCE);
536 rSet.DisableItem(SID_DISTRIBUTE_VBOTTOM);
537 rSet.DisableItem(SID_POLY_MERGE);
538 rSet.DisableItem(SID_POLY_SUBSTRACT);
539 rSet.DisableItem(SID_POLY_INTERSECT);
540 rSet.DisableItem(SID_EQUALIZEWIDTH);
541 rSet.DisableItem(SID_EQUALIZEHEIGHT);
542 rSet.DisableItem( SID_CONNECT );
543 rSet.DisableItem( SID_ANIMATION_EFFECTS );
544 rSet.DisableItem( SID_EXECUTE_ANIMATION_EFFECT );
545 rSet.DisableItem( SID_MODIFY_FIELD );
546 rSet.DisableItem (SID_OBJECT_SHEAR);
547 }
548
550 {
551 rSet.DisableItem(SID_COPY);
552 rSet.DisableItem(SID_CUT);
553 }
555 {
556 rSet.DisableItem(SID_SAVE_GRAPHIC);
557 rSet.DisableItem(SID_EXTERNAL_EDIT);
558 }
559 if (GetDoc()->getImagePreferredDPI() <= 0)
560 {
561 rSet.DisableItem(SID_GRAPHIC_SIZE_CHECK);
562 }
563}
564
565} // end of namespace sd
566
567/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const SvxFieldItem * GetFieldAtSelection() const
css::presentation::ClickAction meClickAction
Action at mouse click.
Definition: anminfo.hxx:48
static SAL_DLLPRIVATE SdAnimationInfo * GetAnimationInfo(SdrObject *pObject)
deprecated
Definition: drawdoc2.cxx:950
sal_Int32 getImagePreferredDPI() const override
Definition: drawdoc.hxx:621
size_t GetMarkCount() const
SdrMark * GetMark(size_t nNum) const
SdrObject * GetMarkedSdrObj() const
virtual SdrInventor GetObjInventor() const
virtual SdrObjKind GetObjIdentifier() const
const SfxItemSet & GetMergedItemSet() const
virtual void TakeObjInfo(SdrObjTransformInfoRec &rInfo) const
sal_Int64 GetAspect() const
css::uno::Reference< css::embed::XEmbeddedObject > const & GetObjRef() const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
void DisableItem(sal_uInt16 nWhich)
bool isContentExtractionLocked() const
bool isExportLocked() const
SfxItemPool & GetPool() const
virtual SfxObjectShell * GetObjectShell()
const SvxFieldData * GetField() const
std::unique_ptr< DrawView > mpDrawView
void GetMenuStateSel(SfxItemSet &rSet)
Set state (Enabled/Disabled) of Menu-SfxSlots.
Definition: drviewsj.cxx:49
SdDrawDocument * GetDoc() const
Definition: viewshel.cxx:1412
::sd::View * GetView() const
Definition: ViewShell.hxx:144
virtual void GetAttributes(SfxItemSet &rTargetSet, bool bOnlyHardAttr=false) const
Definition: sdview.cxx:515
bool IsVectorizeAllowed() const
Definition: sdview.cxx:1015
int i
long Long
sal_Int16 nId
static SfxItemSet & rSet
constexpr TypedWhichId< SdrTextFitToSizeTypeItem > SDRATTR_TEXT_FITTOSIZE(SDRATTR_MISC_FIRST+3)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_EDGELINE2DELTA(SDRATTR_EDGE_FIRST+9)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_EDGELINE3DELTA(SDRATTR_EDGE_FIRST+10)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_EDGELINE1DELTA(SDRATTR_EDGE_FIRST+8)
SdrInventor
SVXCORE_DLLPUBLIC E3dScene * DynCastE3dScene(SdrObject *)
SdrObjKind