LibreOffice Module svx (master)  1
grafctrl.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 <string>
21 
22 #include <i18nutil/unicode.hxx>
23 #include <vcl/toolbox.hxx>
24 #include <vcl/field.hxx>
25 #include <vcl/fixed.hxx>
26 #include <vcl/idle.hxx>
27 #include <vcl/svapp.hxx>
28 #include <svl/intitem.hxx>
29 #include <svl/eitem.hxx>
30 #include <svl/whiter.hxx>
31 #include <sfx2/app.hxx>
32 #include <sfx2/dispatch.hxx>
33 #include <sfx2/objsh.hxx>
34 #include <sfx2/viewsh.hxx>
35 #include <sfx2/request.hxx>
36 #include <sfx2/basedlgs.hxx>
37 #include <tools/urlobj.hxx>
38 
39 #include <svx/dialogs.hrc>
40 #include <svx/svxids.hrc>
41 #include <svx/strings.hrc>
42 #include <editeng/brushitem.hxx>
43 #include <editeng/sizeitem.hxx>
44 #include <svx/sdgcpitm.hxx>
45 
46 #include <svx/itemwin.hxx>
47 #include <svx/dialmgr.hxx>
48 #include <svx/svdview.hxx>
49 #include <svx/svdmodel.hxx>
50 #include <svx/svdograf.hxx>
51 #include <svx/svdundo.hxx>
52 #include <svx/svdtrans.hxx>
53 #include <svx/grafctrl.hxx>
54 #include <svx/tbxcolor.hxx>
55 #include <svx/sdgcoitm.hxx>
56 #include <svx/sdggaitm.hxx>
57 #include <svx/sdgluitm.hxx>
58 #include <svx/sdgmoitm.hxx>
59 #include <svx/sdgtritm.hxx>
60 #include <bitmaps.hlst>
61 
62 #include <com/sun/star/frame/XDispatchProvider.hpp>
63 
64 #include <comphelper/lok.hxx>
65 #include <LibreOfficeKit/LibreOfficeKitEnums.h>
66 
67 using namespace ::com::sun::star::uno;
68 using namespace ::com::sun::star::frame;
69 using namespace ::com::sun::star::util;
70 using namespace ::com::sun::star::beans;
71 using namespace ::com::sun::star::lang;
72 
73 #include <svx/svxdlg.hxx>
74 
75 #define SYMBOL_TO_FIELD_OFFSET 4
76 #define TOOLBOX_NAME "colorbar"
77 #define RID_SVXSTR_UNDO_GRAFCROP RID_SVXSTR_GRAFCROP
78 
79 namespace {
80 
81 class ImplGrafMetricField : public MetricField
82 {
83  using Window::Update;
84 
85 private:
86  Idle maIdle;
87  OUString const maCommand;
88  Reference< XFrame > mxFrame;
89 
90  DECL_LINK(ImplModifyHdl, Timer *, void);
91 
92 protected:
93 
94  virtual void Modify() override;
95 
96 public:
97  ImplGrafMetricField( vcl::Window* pParent, const OUString& aCmd, const Reference< XFrame >& rFrame );
98 
99  void Update( const SfxPoolItem* pItem );
100 };
101 
102 }
103 
104 ImplGrafMetricField::ImplGrafMetricField( vcl::Window* pParent, const OUString& rCmd, const Reference< XFrame >& rFrame ) :
105  MetricField( pParent, WB_BORDER | WB_SPIN | WB_REPEAT | WB_3DLOOK ),
106  maCommand( rCmd ),
107  mxFrame( rFrame )
108 {
109  Size aSize(CalcMinimumSizeForText(unicode::formatPercent(-100, Application::GetSettings().GetUILanguageTag())));
110  SetSizePixel(aSize);
111 
112  if ( maCommand == ".uno:GrafGamma" )
113  {
114  SetDecimalDigits( 2 );
115 
116  SetMin( 10 );
117  SetFirst( 10 );
118  SetMax( 1000 );
119  SetLast( 1000 );
120  SetSpinSize( 10 );
121  }
122  else
123  {
124  const long nMinVal = maCommand == ".uno:GrafTransparence" ? 0 : -100;
125 
126  SetUnit(FieldUnit::PERCENT);
127  SetDecimalDigits( 0 );
128 
129  SetMin( nMinVal );
130  SetFirst( nMinVal );
131  SetMax( 100 );
132  SetLast( 100 );
133  SetSpinSize( 1 );
134  }
135 
136  maIdle.SetInvokeHandler( LINK( this, ImplGrafMetricField, ImplModifyHdl ) );
137 }
138 
139 void ImplGrafMetricField::Modify()
140 {
141  maIdle.Start();
142 }
143 
144 IMPL_LINK_NOARG(ImplGrafMetricField, ImplModifyHdl, Timer *, void)
145 {
146  const sal_Int64 nVal = GetValue();
147 
148  // Convert value to an any to be usable with dispatch API
149  Any a;
150  if ( maCommand == ".uno:GrafRed" ||
151  maCommand == ".uno:GrafGreen" ||
152  maCommand == ".uno:GrafBlue" ||
153  maCommand == ".uno:GrafLuminance" ||
154  maCommand == ".uno:GrafContrast" )
155  a <<= sal_Int16( nVal );
156  else if ( maCommand == ".uno:GrafGamma" ||
157  maCommand == ".uno:GrafTransparence" )
158  a <<= sal_Int32( nVal );
159 
160  if ( a.hasValue() )
161  {
162  INetURLObject aObj( maCommand );
163 
164  Sequence< PropertyValue > aArgs( 1 );
165  aArgs[0].Name = aObj.GetURLPath();
166  aArgs[0].Value = a;
167 
169  Reference< XDispatchProvider >( mxFrame->getController(), UNO_QUERY ),
170  maCommand,
171  aArgs );
172  }
173 }
174 
175 void ImplGrafMetricField::Update( const SfxPoolItem* pItem )
176 {
177  if( pItem )
178  {
179  long nValue;
180 
181  if ( maCommand == ".uno:GrafTransparence" )
182  nValue = static_cast<const SfxUInt16Item*>( pItem )->GetValue();
183  else if ( maCommand == ".uno:GrafGamma" )
184  nValue = static_cast<const SfxUInt32Item*>( pItem )->GetValue();
185  else
186  nValue = static_cast<const SfxInt16Item*>( pItem )->GetValue();
187 
188  SetValue( nValue );
189  }
190  else
191  SetText( OUString() );
192 }
193 
194 namespace {
195 
196 struct CommandToRID
197 {
198  const char* pCommand;
199  const char* sResId;
200 };
201 
202 }
203 
204 static OUString ImplGetRID( const OUString& aCommand )
205 {
206  static const CommandToRID aImplCommandToResMap[] =
207  {
208  { ".uno:GrafRed", RID_SVXBMP_GRAF_RED },
209  { ".uno:GrafGreen", RID_SVXBMP_GRAF_GREEN },
210  { ".uno:GrafBlue", RID_SVXBMP_GRAF_BLUE },
211  { ".uno:GrafLuminance", RID_SVXBMP_GRAF_LUMINANCE },
212  { ".uno:GrafContrast", RID_SVXBMP_GRAF_CONTRAST },
213  { ".uno:GrafGamma", RID_SVXBMP_GRAF_GAMMA },
214  { ".uno:GrafTransparence", RID_SVXBMP_GRAF_TRANSPARENCE },
215  { nullptr, "" }
216  };
217 
218  OUString sRID;
219 
220  sal_Int32 i( 0 );
221  while ( aImplCommandToResMap[ i ].pCommand )
222  {
223  if ( aCommand.equalsAscii( aImplCommandToResMap[ i ].pCommand ))
224  {
225  sRID = OUString::createFromAscii(aImplCommandToResMap[i].sResId);
226  break;
227  }
228  ++i;
229  }
230 
231  return sRID;
232 }
233 
234 namespace {
235 
236 class ImplGrafControl : public Control
237 {
238  using Window::Update;
239 private:
240  VclPtr<FixedImage> maImage;
242 
243 protected:
244 
245  virtual void GetFocus() override;
246 
247 public:
248 
249  ImplGrafControl( vcl::Window* pParent, const OUString& rCmd, const Reference< XFrame >& rFrame );
250  virtual ~ImplGrafControl() override;
251  virtual void dispose() override;
252 
253  void Update( const SfxPoolItem* pItem ) { maField->Update( pItem ); }
254  void SetText( const OUString& rStr ) override { maField->SetText( rStr ); }
255  virtual void Resize() override;
256 };
257 
258 }
259 
260 ImplGrafControl::ImplGrafControl(
261  vcl::Window* pParent,
262  const OUString& rCmd,
263  const Reference< XFrame >& rFrame
264 ) : Control( pParent, WB_TABSTOP )
265  , maImage( VclPtr<FixedImage>::Create(this) )
266  , maField( VclPtr<ImplGrafMetricField>::Create(this, rCmd, rFrame) )
267 {
268  OUString sResId(ImplGetRID(rCmd));
269  BitmapEx aBitmapEx(sResId);
270 
271  Size aImgSize(aBitmapEx.GetSizePixel());
272  Size aFldSize(maField->GetSizePixel());
273  long nFldY, nImgY;
274 
275  maImage->SetImage(Image(aBitmapEx));
276  maImage->SetSizePixel( aImgSize );
277  // we want to see the background of the toolbox, not of the FixedImage or Control
278  maImage->SetBackground( Wallpaper( COL_TRANSPARENT ) );
279  SetBackground( Wallpaper( COL_TRANSPARENT ) );
280 
281  if( aImgSize.Height() > aFldSize.Height() )
282  {
283  nImgY = 0;
284  nFldY = ( aImgSize.Height() - aFldSize.Height() ) >> 1;
285  }
286  else
287  {
288  nFldY = 0;
289  nImgY = ( aFldSize.Height() - aImgSize.Height() ) >> 1;
290  }
291 
292  long nOffset = SYMBOL_TO_FIELD_OFFSET / 2;
293  maImage->SetPosPixel( Point( nOffset, nImgY ) );
294  maField->SetPosPixel( Point( aImgSize.Width() + SYMBOL_TO_FIELD_OFFSET, nFldY ) );
295  SetSizePixel( Size( aImgSize.Width() + aFldSize.Width() + SYMBOL_TO_FIELD_OFFSET + nOffset,
296  std::max( aImgSize.Height(), aFldSize.Height() ) ) );
297 
298  SetBackground( Wallpaper() ); // transparent background
299 
300  maImage->Show();
301 
302  maField->SetHelpId( OUStringToOString( rCmd, RTL_TEXTENCODING_UTF8 ) );
303  maField->Show();
304 }
305 
306 ImplGrafControl::~ImplGrafControl()
307 {
308  disposeOnce();
309 }
310 
311 void ImplGrafControl::dispose()
312 {
313  maImage.disposeAndClear();
314  maField.disposeAndClear();
316 }
317 
318 void ImplGrafControl::GetFocus()
319 {
320  if (maField)
321  maField->GrabFocus();
322 }
323 
324 void ImplGrafControl::Resize()
325 {
326  Size aFldSize(maField->GetSizePixel());
327  aFldSize.setWidth( GetSizePixel().Width() - SYMBOL_TO_FIELD_OFFSET - maImage->GetSizePixel().Width() );
328  maField->SetSizePixel(aFldSize);
329 
330  Control::Resize();
331 }
332 
333 namespace {
334 
335 class ImplGrafModeControl : public ListBox
336 {
337  using Window::Update;
338 private:
339  sal_uInt16 mnCurPos;
340  Reference< XFrame > mxFrame;
341 
342  virtual void Select() override;
343  virtual bool PreNotify( NotifyEvent& rNEvt ) override;
344  virtual bool EventNotify( NotifyEvent& rNEvt ) override;
345  static void ImplReleaseFocus();
346 
347 public:
348  ImplGrafModeControl( vcl::Window* pParent, const Reference< XFrame >& rFrame );
349 
350  void Update( const SfxPoolItem* pItem );
351 };
352 
353 }
354 
355 ImplGrafModeControl::ImplGrafModeControl( vcl::Window* pParent, const Reference< XFrame >& rFrame ) :
357  mnCurPos( 0 ),
358  mxFrame( rFrame )
359 {
360  SetSizePixel( Size( 100, 260 ) );
361 
362  InsertEntry( SvxResId( RID_SVXSTR_GRAFMODE_STANDARD ) );
363  InsertEntry( SvxResId( RID_SVXSTR_GRAFMODE_GREYS ) );
364  InsertEntry( SvxResId( RID_SVXSTR_GRAFMODE_MONO ) );
365  InsertEntry( SvxResId( RID_SVXSTR_GRAFMODE_WATERMARK ) );
366 
367  Show();
368 }
369 
370 void ImplGrafModeControl::Select()
371 {
372  if ( !IsTravelSelect() )
373  {
374  Sequence< PropertyValue > aArgs( 1 );
375  aArgs[0].Name = "GrafMode";
376  aArgs[0].Value <<= sal_Int16( GetSelectedEntryPos() );
377 
378  /* #i33380# DR 2004-09-03 Moved the following line above the Dispatch() call.
379  This instance may be deleted in the meantime (i.e. when a dialog is opened
380  while in Dispatch()), accessing members will crash in this case. */
381  ImplReleaseFocus();
382 
384  Reference< XDispatchProvider >( mxFrame->getController(), UNO_QUERY ),
385  ".uno:GrafMode",
386  aArgs );
387  }
388 }
389 
390 bool ImplGrafModeControl::PreNotify( NotifyEvent& rNEvt )
391 {
392  MouseNotifyEvent nType = rNEvt.GetType();
393 
394  if( MouseNotifyEvent::MOUSEBUTTONDOWN == nType || MouseNotifyEvent::GETFOCUS == nType )
395  mnCurPos = GetSelectedEntryPos();
396 
397  return ListBox::PreNotify( rNEvt );
398 }
399 
400 bool ImplGrafModeControl::EventNotify( NotifyEvent& rNEvt )
401 {
402  bool bHandled = ListBox::EventNotify( rNEvt );
403 
404  if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
405  {
406  const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
407 
408  switch( pKEvt->GetKeyCode().GetCode() )
409  {
410  case KEY_RETURN:
411  {
412  Select();
413  bHandled = true;
414  }
415  break;
416 
417  case KEY_ESCAPE:
418  {
419  SelectEntryPos( mnCurPos );
420  ImplReleaseFocus();
421  bHandled = true;
422  }
423  break;
424  }
425  }
426 
427  return bHandled;
428 }
429 
430 void ImplGrafModeControl::ImplReleaseFocus()
431 {
432  if( SfxViewShell::Current() )
433  {
434  vcl::Window* pShellWnd = SfxViewShell::Current()->GetWindow();
435 
436  if( pShellWnd )
437  pShellWnd->GrabFocus();
438  }
439 }
440 
441 void ImplGrafModeControl::Update( const SfxPoolItem* pItem )
442 {
443  if( pItem )
444  SelectEntryPos( static_cast<const SfxUInt16Item*>(pItem)->GetValue() );
445  else
446  SetNoSelection();
447 }
448 
449 SvxGrafToolBoxControl::SvxGrafToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx) :
450  SfxToolBoxControl( nSlotId, nId, rTbx )
451 {
452  rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWN | rTbx.GetItemBits( nId ) );
453  rTbx.Invalidate();
454 }
455 
457 {
458 }
459 
460 void SvxGrafToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* pState )
461 
462 {
463  ImplGrafControl* pCtrl = static_cast<ImplGrafControl*>( GetToolBox().GetItemWindow( GetId() ) );
464  DBG_ASSERT( pCtrl, "Control not found" );
465 
466  if( eState == SfxItemState::DISABLED )
467  {
468  pCtrl->Disable();
469  pCtrl->SetText( OUString() );
470  }
471  else
472  {
473  pCtrl->Enable();
474 
475  if( eState == SfxItemState::DEFAULT )
476  pCtrl->Update( pState );
477  else
478  pCtrl->Update( nullptr );
479  }
480 }
481 
483 {
484  return VclPtr<ImplGrafControl>::Create( pParent, m_aCommandURL, m_xFrame ).get();
485 }
486 
488 
489 SvxGrafRedToolBoxControl::SvxGrafRedToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) :
490  SvxGrafToolBoxControl( nSlotId, nId, rTbx )
491 {
492 }
493 
495 
496 SvxGrafGreenToolBoxControl::SvxGrafGreenToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) :
497  SvxGrafToolBoxControl( nSlotId, nId, rTbx )
498 {
499 }
500 
502 
503 SvxGrafBlueToolBoxControl::SvxGrafBlueToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) :
504  SvxGrafToolBoxControl( nSlotId, nId, rTbx )
505 {
506 }
507 
509 
510 SvxGrafLuminanceToolBoxControl::SvxGrafLuminanceToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) :
511  SvxGrafToolBoxControl( nSlotId, nId, rTbx )
512 {
513 }
514 
516 
517 SvxGrafContrastToolBoxControl::SvxGrafContrastToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) :
518  SvxGrafToolBoxControl( nSlotId, nId, rTbx )
519 {
520 }
521 
523 
524 SvxGrafGammaToolBoxControl::SvxGrafGammaToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) :
525  SvxGrafToolBoxControl( nSlotId, nId, rTbx )
526 {
527 }
528 
530 
532  SvxGrafToolBoxControl( nSlotId, nId, rTbx )
533 {
534 }
535 
537 
538 SvxGrafModeToolBoxControl::SvxGrafModeToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) :
539  SfxToolBoxControl( nSlotId, nId, rTbx )
540 {
541 }
542 
544 {
545 }
546 
547 void SvxGrafModeToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* pState )
548 
549 {
550  ImplGrafModeControl* pCtrl = static_cast<ImplGrafModeControl*>( GetToolBox().GetItemWindow( GetId() ) );
551  DBG_ASSERT( pCtrl, "Control not found" );
552 
553  if( eState == SfxItemState::DISABLED )
554  {
555  pCtrl->Disable();
556  pCtrl->SetText( OUString() );
557  }
558  else
559  {
560  pCtrl->Enable();
561 
562  if( eState == SfxItemState::DEFAULT )
563  pCtrl->Update( pState );
564  else
565  pCtrl->Update( nullptr );
566  }
567 }
568 
570 {
571  return VclPtr<ImplGrafModeControl>::Create( pParent, m_xFrame ).get();
572 }
573 
575 {
576  SfxItemPool& rPool = rView.GetModel()->GetItemPool();
578  OUString aUndoStr;
579  const bool bUndo = rView.IsUndoEnabled();
580 
581  if( bUndo )
582  {
583  aUndoStr = rView.GetDescriptionOfMarkedObjects() + " ";
584  }
585 
586  const SfxItemSet* pArgs = rReq.GetArgs();
587  const SfxPoolItem* pItem;
588  sal_uInt16 nSlot = rReq.GetSlot();
589 
590  if( !pArgs || SfxItemState::SET != pArgs->GetItemState( nSlot, false, &pItem ))
591  pItem = nullptr;
592 
593  switch( nSlot )
594  {
595  case SID_ATTR_GRAF_RED:
596  {
597  if( pItem )
598  {
599  aSet.Put( SdrGrafRedItem( static_cast<const SfxInt16Item*>(pItem)->GetValue() ));
600  if( bUndo )
601  aUndoStr += SvxResId( RID_SVXSTR_UNDO_GRAFRED );
602  }
603  }
604  break;
605 
606  case SID_ATTR_GRAF_GREEN:
607  {
608  if( pItem )
609  {
610  aSet.Put( SdrGrafGreenItem( static_cast<const SfxInt16Item*>(pItem)->GetValue() ));
611  if( bUndo )
612  aUndoStr += SvxResId( RID_SVXSTR_UNDO_GRAFGREEN );
613  }
614  }
615  break;
616 
617  case SID_ATTR_GRAF_BLUE:
618  {
619  if( pItem )
620  {
621  aSet.Put( SdrGrafBlueItem( static_cast<const SfxInt16Item*>(pItem)->GetValue() ));
622  if( bUndo )
623  aUndoStr += SvxResId( RID_SVXSTR_UNDO_GRAFBLUE );
624  }
625  }
626  break;
627 
628  case SID_ATTR_GRAF_LUMINANCE:
629  {
630  if( pItem )
631  {
632  aSet.Put( SdrGrafLuminanceItem( static_cast<const SfxInt16Item*>(pItem)->GetValue() ));
633  if( bUndo )
634  aUndoStr += SvxResId( RID_SVXSTR_UNDO_GRAFLUMINANCE );
635  }
636  }
637  break;
638 
639  case SID_ATTR_GRAF_CONTRAST:
640  {
641  if( pItem )
642  {
643  aSet.Put( SdrGrafContrastItem( static_cast<const SfxInt16Item*>(pItem)->GetValue() ));
644  if( bUndo )
645  aUndoStr += SvxResId( RID_SVXSTR_UNDO_GRAFCONTRAST );
646  }
647  }
648  break;
649 
650  case SID_ATTR_GRAF_GAMMA:
651  {
652  if( pItem )
653  {
654  aSet.Put( SdrGrafGamma100Item( static_cast<const SfxUInt32Item*>(pItem)->GetValue() ));
655  if( bUndo )
656  aUndoStr += SvxResId( RID_SVXSTR_UNDO_GRAFGAMMA );
657  }
658  }
659  break;
660 
661  case SID_ATTR_GRAF_TRANSPARENCE:
662  {
663  if( pItem )
664  {
665  aSet.Put( SdrGrafTransparenceItem( static_cast<const SfxUInt16Item*>(pItem)->GetValue() ));
666  if( bUndo )
667  aUndoStr += SvxResId( RID_SVXSTR_UNDO_GRAFTRANSPARENCY );
668  }
669  }
670  break;
671 
672  case SID_ATTR_GRAF_MODE:
673  {
674  if( pItem )
675  {
676  aSet.Put( SdrGrafModeItem( static_cast<GraphicDrawMode>(static_cast<const SfxUInt16Item*>(pItem)->GetValue()) ));
677  if( bUndo )
678  aUndoStr += SvxResId( RID_SVXSTR_UNDO_GRAFMODE );
679  }
680  }
681  break;
682 
683  case SID_ATTR_GRAF_CROP:
684  {
685  const SdrMarkList& rMarkList = rView.GetMarkedObjectList();
686 
687  if( 0 < rMarkList.GetMarkCount() )
688  {
689  SdrGrafObj* pObj = static_cast<SdrGrafObj*>( rMarkList.GetMark( 0 )->GetMarkedSdrObj() );
690 
691  if( ( pObj->GetGraphicType() != GraphicType::NONE ) &&
692  ( pObj->GetGraphicType() != GraphicType::Default ) )
693  {
695  const MapUnit eOldMetric = rPool.GetMetric( 0 );
696  const MapMode aMap100( MapUnit::Map100thMM );
697  const MapMode aMapTwip( MapUnit::MapTwip );
698 
699  aGrfAttr.Put(pObj->GetMergedItemSet());
700  rPool.SetDefaultMetric( MapUnit::MapTwip );
701 
702  SfxItemSet aCropDlgAttr(
703  rPool,
704  svl::Items<
706  SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE,
707  SID_ATTR_GRAF_CROP, SID_ATTR_GRAF_FRMSIZE,
708  SID_ATTR_GRAF_GRAPHIC, SID_ATTR_GRAF_GRAPHIC>{});
709 
710  aCropDlgAttr.Put( SvxBrushItem( pObj->GetGraphic(), GPOS_MM, SID_ATTR_GRAF_GRAPHIC ) );
711  aCropDlgAttr.Put( SvxSizeItem( SID_ATTR_PAGE_SIZE,
713  Size( 200000, 200000 ), aMap100, aMapTwip ) ) );
714  aCropDlgAttr.Put( SvxSizeItem( SID_ATTR_GRAF_FRMSIZE, OutputDevice::LogicToLogic(
715  pObj->GetLogicRect().GetSize(), aMap100, aMapTwip ) ) );
716 
717  const SdrGrafCropItem& rCrop = aGrfAttr.Get( SDRATTR_GRAFCROP );
719  Size( rCrop.GetLeft(), rCrop.GetTop() ), aMap100, aMapTwip ) );
721  Size( rCrop.GetRight(), rCrop.GetBottom() ), aMap100, aMapTwip ) );
722 
723  aCropDlgAttr.Put( SdrGrafCropItem( aLTSize.Width(), aLTSize.Height(),
724  aRBSize.Width(), aRBSize.Height() ) );
725 
726  vcl::Window* pParent(SfxViewShell::Current() ? SfxViewShell::Current()->GetWindow() : nullptr);
727  SfxSingleTabDialogController aCropDialog(pParent ? pParent->GetFrameWeld() : nullptr,
728  &aCropDlgAttr);
729  const OUString aCropStr(SvxResId(RID_SVXSTR_GRAFCROP));
730 
732  ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_GRFCROP );
733  std::unique_ptr<SfxTabPage> xTabPage = (*fnCreatePage)(aCropDialog.get_content_area(), &aCropDialog, &aCropDlgAttr);
734  xTabPage->SetPageTitle(aCropStr);
735  aCropDialog.SetTabPage(std::move(xTabPage));
736 
737  if (aCropDialog.run() == RET_OK)
738  {
739  const SfxItemSet* pOutAttr = aCropDialog.GetOutputItemSet();
740 
741  if( pOutAttr )
742  {
743  aUndoStr += SvxResId( RID_SVXSTR_UNDO_GRAFCROP );
744 
745  // set crop attributes
746  if( SfxItemState::SET <= pOutAttr->GetItemState( SDRATTR_GRAFCROP ) )
747  {
748  const SdrGrafCropItem& rNewCrop = pOutAttr->Get( SDRATTR_GRAFCROP );
749 
750  aLTSize = OutputDevice::LogicToLogic( Size( rNewCrop.GetLeft(), rNewCrop.GetTop() ), aMapTwip, aMap100 );
751  aRBSize = OutputDevice::LogicToLogic( Size( rNewCrop.GetRight(), rNewCrop.GetBottom() ), aMapTwip, aMap100 );
752  aSet.Put( SdrGrafCropItem( aLTSize.Width(), aLTSize.Height(), aRBSize.Width(), aRBSize.Height() ) );
753  }
754 
755  // set new logic rect
756  if( SfxItemState::SET <= pOutAttr->GetItemState( SID_ATTR_GRAF_FRMSIZE ) )
757  {
758  Point aNewOrigin( pObj->GetLogicRect().TopLeft() );
759  const Size& rGrfSize = static_cast<const SvxSizeItem&>( pOutAttr->Get( SID_ATTR_GRAF_FRMSIZE ) ).GetSize();
760  Size aNewGrfSize( OutputDevice::LogicToLogic( rGrfSize, aMapTwip, aMap100 ) );
761  Size aOldGrfSize( pObj->GetLogicRect().GetSize() );
762 
763  tools::Rectangle aNewRect( aNewOrigin, aNewGrfSize );
764  Point aOffset( (aNewGrfSize.Width() - aOldGrfSize.Width()) >> 1,
765  (aNewGrfSize.Height() - aOldGrfSize.Height()) >> 1 );
766 
767  // #106181# rotate snap rect before setting it
768  const GeoStat& aGeo = pObj->GetGeoStat();
769 
770  if (aGeo.nRotationAngle!=0 || aGeo.nShearAngle!=0)
771  {
772  tools::Polygon aPol(aNewRect);
773 
774  // also transform origin offset
775  if (aGeo.nShearAngle!=0)
776  {
777  ShearPoly(aPol,
778  aNewRect.TopLeft(),
779  aGeo.nTan);
780  ShearPoint(aOffset, Point(0,0), aGeo.nTan);
781  }
782  if (aGeo.nRotationAngle!=0)
783  {
784  RotatePoly(aPol,
785  aNewRect.TopLeft(),
786  aGeo.nSin,aGeo.nCos);
787  RotatePoint(aOffset, Point(0,0), aGeo.nSin,aGeo.nCos);
788  }
789 
790  // apply offset
791  aPol.Move( -aOffset.X(), -aOffset.Y() );
792  aNewRect=aPol.GetBoundRect();
793  }
794  else
795  {
796  aNewRect.Move( -aOffset.X(), -aOffset.Y() );
797  }
798 
799  if( !aSet.Count() )
800  rView.SetMarkedObjRect( aNewRect );
801  else
802  {
803  if( bUndo )
804  {
805  rView.BegUndo( aUndoStr );
806  rView.AddUndo( rView.GetModel()->GetSdrUndoFactory().CreateUndoGeoObject( *pObj ) );
807  }
808  pObj->SetSnapRect( aNewRect );
809  rView.SetAttributes( aSet );
810 
811  if( bUndo )
812  rView.EndUndo();
813  aSet.ClearItem();
814  }
815  }
816  }
817  }
818 
819  rPool.SetDefaultMetric( eOldMetric );
820  }
821  }
822  }
823  break;
824 
825  case SID_COLOR_SETTINGS:
826  {
827  svx::ToolboxAccess aToolboxAccess( TOOLBOX_NAME );
828  aToolboxAccess.toggleToolbox();
829  rReq.Done();
830  break;
831  }
832 
833  default:
834  break;
835  }
836 
837  if( aSet.Count() )
838  {
839  if( bUndo )
840  rView.BegUndo( aUndoStr );
841 
842  rView.SetAttributes( aSet );
843 
844  if( bUndo )
845  rView.EndUndo();
846  }
847 }
848 
850 {
851  SfxItemPool& rPool = rView.GetModel()->GetItemPool();
852  SfxItemSet aAttrSet( rPool );
853  SfxWhichIter aIter( rSet );
854  sal_uInt16 nWhich = aIter.FirstWhich();
855  const SdrMarkList& rMarkList = rView.GetMarkedObjectList();
856  bool bEnableColors = true;
857  bool bEnableTransparency = true;
858  bool bEnableCrop = ( 1 == rMarkList.GetMarkCount() );
859 
860  for( size_t i = 0, nCount = rMarkList.GetMarkCount(); i < nCount; ++i )
861  {
862  SdrGrafObj* pGrafObj = dynamic_cast< SdrGrafObj* >( rMarkList.GetMark( i )->GetMarkedSdrObj() );
863 
864  if( !pGrafObj ||
865  ( pGrafObj->GetGraphicType() == GraphicType::NONE ) ||
866  ( pGrafObj->GetGraphicType() == GraphicType::Default ))
867  {
868  bEnableColors = bEnableTransparency = bEnableCrop = false;
869  break;
870  }
871  else if( bEnableTransparency && ( pGrafObj->HasGDIMetaFile() || pGrafObj->IsAnimated() ) )
872  {
873  bEnableTransparency = false;
874  }
875  }
876 
877  rView.GetAttributes( aAttrSet );
878 
879  while( nWhich )
880  {
881  sal_uInt16 nSlotId = SfxItemPool::IsWhich( nWhich ) ? rPool.GetSlotId( nWhich ) : nWhich;
882 
883  switch( nSlotId )
884  {
885  case SID_ATTR_GRAF_MODE:
886  {
887  if( SfxItemState::DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFMODE ) )
888  {
889  if( bEnableColors )
890  {
891  rSet.Put( SfxUInt16Item( nSlotId,
892  sal::static_int_cast< sal_uInt16 >( aAttrSet.Get(SDRATTR_GRAFMODE).GetValue() ) ) );
893  }
894  else
895  {
896  rSet.DisableItem( SID_ATTR_GRAF_MODE );
897  }
898  }
899  }
900  break;
901 
902  case SID_ATTR_GRAF_RED:
903  {
904  if( SfxItemState::DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFRED ) )
905  {
906  if( bEnableColors )
907  {
908  rSet.Put( SfxInt16Item( nSlotId, aAttrSet.Get(SDRATTR_GRAFRED).GetValue() ) );
909  }
910  else
911  {
912  rSet.DisableItem( SID_ATTR_GRAF_RED );
913  }
914  }
915  }
916  break;
917 
918  case SID_ATTR_GRAF_GREEN:
919  {
920  if( SfxItemState::DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFGREEN ) )
921  {
922  if( bEnableColors )
923  {
924  rSet.Put( SfxInt16Item( nSlotId, aAttrSet.Get(SDRATTR_GRAFGREEN).GetValue()) );
925  }
926  else
927  {
928  rSet.DisableItem( SID_ATTR_GRAF_GREEN );
929  }
930  }
931  }
932  break;
933 
934  case SID_ATTR_GRAF_BLUE:
935  {
936  if( SfxItemState::DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFBLUE ) )
937  {
938  if( bEnableColors )
939  {
940  rSet.Put( SfxInt16Item( nSlotId, aAttrSet.Get(SDRATTR_GRAFBLUE).GetValue()) );
941  }
942  else
943  {
944  rSet.DisableItem( SID_ATTR_GRAF_BLUE );
945  }
946  }
947  }
948  break;
949 
950  case SID_ATTR_GRAF_LUMINANCE:
951  {
952  if( SfxItemState::DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFLUMINANCE ) )
953  {
954  if( bEnableColors )
955  {
956  rSet.Put( SfxInt16Item( nSlotId, aAttrSet.Get(SDRATTR_GRAFLUMINANCE).GetValue()) );
957  }
958  else
959  {
960  rSet.DisableItem( SID_ATTR_GRAF_LUMINANCE );
961  }
962  }
963  }
964  break;
965 
966  case SID_ATTR_GRAF_CONTRAST:
967  {
968  if( SfxItemState::DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFCONTRAST ) )
969  {
970  if( bEnableColors )
971  {
972  rSet.Put( SfxInt16Item( nSlotId,
973  aAttrSet.Get(SDRATTR_GRAFCONTRAST).GetValue()) );
974  }
975  else
976  {
977  rSet.DisableItem( SID_ATTR_GRAF_CONTRAST );
978  }
979  }
980  }
981  break;
982 
983  case SID_ATTR_GRAF_GAMMA:
984  {
985  if( SfxItemState::DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFGAMMA ) )
986  {
987  if( bEnableColors )
988  {
989  rSet.Put( SfxUInt32Item( nSlotId,
990  aAttrSet.Get(SDRATTR_GRAFGAMMA).GetValue() ) );
991  }
992  else
993  {
994  rSet.DisableItem( SID_ATTR_GRAF_GAMMA );
995  }
996  }
997  }
998  break;
999 
1000  case SID_ATTR_GRAF_TRANSPARENCE:
1001  {
1002  if( SfxItemState::DEFAULT <= aAttrSet.GetItemState( SDRATTR_GRAFTRANSPARENCE ) )
1003  {
1004  if( bEnableTransparency )
1005  {
1006  rSet.Put( SfxUInt16Item( nSlotId,
1007  aAttrSet.Get(SDRATTR_GRAFTRANSPARENCE).GetValue() ) );
1008  }
1009  else
1010  {
1011  rSet.DisableItem( SID_ATTR_GRAF_TRANSPARENCE );
1012  }
1013  }
1014  }
1015  break;
1016 
1017  case SID_ATTR_GRAF_CROP:
1018  {
1019  if( !bEnableCrop )
1020  rSet.DisableItem( nSlotId );
1021  }
1022  break;
1023 
1024  case SID_COLOR_SETTINGS :
1025  {
1026  svx::ToolboxAccess aToolboxAccess( TOOLBOX_NAME );
1027  rSet.Put( SfxBoolItem( nWhich, aToolboxAccess.isToolboxVisible() ) );
1028  break;
1029  }
1030 
1031  default:
1032  break;
1033  }
1034 
1035  nWhich = aIter.NextWhich();
1036  }
1037 
1038  SfxViewShell* pViewShell = SfxViewShell::Current();
1039  if (pViewShell && comphelper::LibreOfficeKit::isActive())
1040  pViewShell->sendUnoStatus( &rSet );
1041 }
1042 
1043 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define SDRATTR_GRAFRED
Definition: svddef.hxx:308
Point TopLeft() const
long Width() const
size_t GetMarkCount() const
Definition: svdmark.hxx:179
sal_Int32 GetLeft() const
Definition: grfcrop.hxx:61
#define TOOLBOX_NAME
Definition: grafctrl.cxx:76
void ShearPoint(Point &rPnt, const Point &rRef, double tn, bool bVShear=false)
Definition: svdtrans.hxx:122
static SfxAbstractDialogFactory * Create()
std::string GetValue
Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
#define SDRATTR_GRAFMODE
Definition: svddef.hxx:316
ToolBox & GetToolBox() const
long Height() const
double nSin
Definition: svdtrans.hxx:219
OUString GetURLPath(DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
#define SDRATTR_GRAFGAMMA
Definition: svddef.hxx:313
bool IsUndoEnabled() const
Definition: svdedtv.cxx:1031
ToolBoxItemBits GetItemBits(sal_uInt16 nItemId) const
void toggleToolbox() const
toggles the toolbox
Definition: tbxcolor.cxx:63
static const AllSettings & GetSettings()
virtual void Select()
long nRotationAngle
Definition: svdtrans.hxx:216
css::uno::Reference< css::lang::XComponent > m_xFrame
virtual Size GetSizePixel() const
virtual void SetSizePixel(const Size &rNewSize)
void BegUndo()
Definition: svdedtv.hxx:179
sal_uInt16 FirstWhich()
sal_uInt16 GetCode() const
bool isToolboxVisible() const
determines whether the toolbox is currently visible
Definition: tbxcolor.cxx:90
void RotatePoly(tools::Polygon &rPoly, const Point &rRef, double sn, double cs)
Definition: svdtrans.cxx:79
const KeyEvent * GetKeyEvent() const
void Done(bool bRemove=false)
SvxGrafModeToolBoxControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx)
Definition: grafctrl.cxx:538
SdrMark * GetMark(size_t nNum) const
Definition: svdmark.cxx:234
const SfxItemSet * GetArgs() const
#define SDRATTR_GRAFGREEN
Definition: svddef.hxx:309
virtual VclPtr< vcl::Window > CreateItemWindow(vcl::Window *pParent) override
Definition: grafctrl.cxx:569
GraphicType GetGraphicType() const
Definition: svdograf.cxx:365
virtual void sendUnoStatus(const SfxItemSet *pSet) const override
sal_uInt16 NextWhich()
void Move(long nHorzMoveDelta, long nVertMoveDelta)
void ShearPoly(tools::Polygon &rPoly, const Point &rRef, double tn)
Definition: svdtrans.cxx:145
virtual MapUnit GetMetric(sal_uInt16 nWhich) const
weld::Window * GetFrameWeld() const
IMPL_LINK_NOARG(ImplGrafMetricField, ImplModifyHdl, Timer *, void)
Definition: grafctrl.cxx:144
void SetBackground()
virtual CreateTabPage GetTabPageCreatorFunc(sal_uInt16 nId)=0
OUString SvxResId(const char *pId)
Definition: dialmgr.cxx:28
static void GetGrafAttrState(SfxItemSet &rSet, SdrView const &rView)
Definition: grafctrl.cxx:849
The transformation of a rectangle into a polygon, by using angle parameters from GeoStat.
Definition: svdtrans.hxx:214
int nCount
sal_Int16 const nValue
Definition: fmsrccfg.cxx:82
static SfxViewShell * Current()
virtual VclPtr< vcl::Window > CreateItemWindow(vcl::Window *pParent) override
Definition: grafctrl.cxx:482
const GeoStat & GetGeoStat() const
Definition: svdotext.hxx:399
virtual void Modify() override
void EndUndo()
Definition: svdedtv.cxx:278
void Update()
SvxGrafTransparenceToolBoxControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx)
Definition: grafctrl.cxx:531
SdrObject * GetMarkedSdrObj() const
Definition: svdmark.hxx:67
SvxGrafBlueToolBoxControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx)
Definition: grafctrl.cxx:503
void Move(long nHorzMove, long nVertMove)
void AddUndo(std::unique_ptr< SdrUndoAction > pUndo)
Definition: svdedtv.hxx:183
bool IsAnimated() const
Definition: svdograf.cxx:405
double nCos
Definition: svdtrans.hxx:220
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
#define DBG_ASSERT(sCon, aError)
SvxGrafRedToolBoxControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx)
Definition: grafctrl.cxx:489
uno_Any a
#define SDRATTR_GRAFCROP
Definition: svddef.hxx:317
const Graphic & GetGraphic() const
Definition: svdograf.cxx:344
OUString const & GetDescriptionOfMarkedObjects() const
Definition: svdmrkv.hxx:252
virtual void SetText(const OUString &rStr) override
virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem *pState) override
Definition: grafctrl.cxx:460
int i
QPRO_FUNC_TYPE const nType
#define KEY_ESCAPE
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
const SdrMarkList & GetMarkedObjectList() const
Definition: svdmrkv.hxx:243
void SetItemBits(sal_uInt16 nItemId, ToolBoxItemBits nBits)
void Create(SvxOrientationItem &rItem, SvStream &rStrm, sal_uInt16)
Definition: legacyitem.cxx:34
bool SetAttributes(const SfxItemSet &rSet, bool bReplaceAll=false)
Definition: svdview.hxx:193
double nTan
Definition: svdtrans.hxx:218
GPOS_MM
MouseNotifyEvent GetType() const
vcl::Window * GetItemWindow(sal_uInt16 nItemId) const
virtual void dispose() override
WinBits const WB_DROPDOWN
SvxGrafGammaToolBoxControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx)
Definition: grafctrl.cxx:524
void SetImage(const Image &rImage)
sal_uInt16 GetSlotId(sal_uInt16 nWhich) const
This class represents an embedded or linked bitmap graphic object.
Definition: svdograf.hxx:79
void GrabFocus()
#define SDRATTR_GRAFBLUE
Definition: svddef.hxx:310
long X() const
SdrUndoFactory & GetSdrUndoFactory() const
returns the models undo factory.
Definition: svdmodel.cxx:1974
Size GetSize() const
long nShearAngle
Definition: svdtrans.hxx:217
WinBits const WB_REPEAT
SvxGrafGreenToolBoxControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx)
Definition: grafctrl.cxx:496
virtual bool PreNotify(NotifyEvent &rNEvt) override
virtual ~SvxGrafModeToolBoxControl() override
Definition: grafctrl.cxx:543
virtual std::unique_ptr< SdrUndoAction > CreateUndoGeoObject(SdrObject &rObject)
Definition: svdundo.cxx:1649
#define RID_SVXSTR_UNDO_GRAFCROP
Definition: grafctrl.cxx:77
OString OUStringToOString(const OUString &str, ConnectionSettings const *settings)
sal_Int32 GetBottom() const
Definition: grfcrop.hxx:64
#define KEY_RETURN
WinBits const WB_3DLOOK
sal_Int32 GetTop() const
Definition: grfcrop.hxx:63
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const vcl::KeyCode & GetKeyCode() const
sal_uInt16 GetSlot() const
void RotatePoint(Point &rPnt, const Point &rRef, double sn, double cs)
Definition: svdtrans.hxx:114
#define SYMBOL_TO_FIELD_OFFSET
Definition: grafctrl.cxx:75
virtual ~SvxGrafToolBoxControl() override
Definition: grafctrl.cxx:456
void SetDefaultMetric(MapUnit eNewMetric)
SFX_IMPL_TOOLBOX_CONTROL(SvxGrafRedToolBoxControl, SfxInt16Item)
SvxGrafContrastToolBoxControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx)
Definition: grafctrl.cxx:517
static OUString formatPercent(double dNumber, const LanguageTag &rLangTag)
virtual void Resize() override
SfxItemState
void DisableItem(sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
virtual void GetFocus()
WinBits const WB_BORDER
static void ExecuteGrafAttr(SfxRequest &rReq, SdrView &rView)
Definition: grafctrl.cxx:574
#define SDRATTR_GRAFLUMINANCE
Definition: svddef.hxx:311
unsigned short GetId() const
const SfxItemSet & GetMergedItemSet() const
Definition: svdobj.cxx:1911
void GetAttributes(SfxItemSet &rTargetSet, bool bOnlyHardAttr=false) const
Definition: svdview.cxx:251
bool HasGDIMetaFile() const
Definition: svdograf.cxx:848
RET_OK
static VclPtr< reference_type > Create(Arg &&...arg)
#define SDRATTR_GRAFTRANSPARENCE
Definition: svddef.hxx:314
SvxGrafToolBoxControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx)
Definition: grafctrl.cxx:449
vcl::Window * GetWindow() const
WinBits const WB_AUTOHSCROLL
WinBits const WB_TABSTOP
SvxGrafLuminanceToolBoxControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx)
Definition: grafctrl.cxx:510
sal_Int32 GetRight() const
Definition: grfcrop.hxx:62
virtual void SetSnapRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1649
MapUnit
#define SDRATTR_GRAFCONTRAST
Definition: svddef.hxx:312
const SfxItemPool & GetItemPool() const
Definition: svdmodel.hxx:314
tools::Rectangle GetBoundRect() const
void SetMarkedObjRect(const tools::Rectangle &rRect)
Definition: svdedtv1.cxx:81
WinBits const WB_SPIN
void setWidth(long nWidth)
SdrModel * GetModel() const
Definition: svdpntv.hxx:271
MouseNotifyEvent
virtual void SetPosPixel(const Point &rNewPos)
void Dispatch(const OUString &aCommand, css::uno::Sequence< css::beans::PropertyValue > const &aArgs)
static OUString ImplGetRID(const OUString &aCommand)
Definition: grafctrl.cxx:204
static bool IsWhich(sal_uInt16 nId)
virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem *pState) override
Definition: grafctrl.cxx:547
long Y() const
virtual const tools::Rectangle & GetLogicRect() const override
Definition: svdotxtr.cxx:73
virtual bool EventNotify(NotifyEvent &rNEvt) override
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)