LibreOffice Module svx (master)  1
itemwin.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 <com/sun/star/drawing/FillStyle.hpp>
21 #include <com/sun/star/frame/XDispatchProvider.hpp>
22 #include <com/sun/star/frame/XFrame.hpp>
23 
24 #include <sfx2/dispatch.hxx>
25 #include <sfx2/objsh.hxx>
26 #include <sfx2/viewsh.hxx>
27 #include <sfx2/module.hxx>
28 #include <tools/urlobj.hxx>
29 
30 #include <vcl/event.hxx>
31 #include <vcl/svapp.hxx>
32 #include <vcl/settings.hxx>
33 #include <vcl/builderfactory.hxx>
34 
35 #include <svx/svxids.hrc>
36 
37 #define DELAY_TIMEOUT 100
38 
39 #include <svx/xlnclit.hxx>
40 #include <svx/xlnwtit.hxx>
41 #include <svx/xlineit0.hxx>
42 #include <svx/xlndsit.hxx>
43 #include <svx/xtable.hxx>
44 #include <svx/drawitem.hxx>
45 #include <svx/dlgutil.hxx>
46 #include <svx/itemwin.hxx>
47 #include <svx/linectrl.hxx>
48 #include <svtools/colorcfg.hxx>
49 #include <svtools/unitconv.hxx>
50 
51 #include <boost/property_tree/json_parser.hpp>
52 
53 using namespace ::com::sun::star;
54 using namespace ::com::sun::star::uno;
55 using namespace ::com::sun::star::frame;
56 using namespace ::com::sun::star::lang;
57 using namespace ::com::sun::star::beans;
58 
59 SvxLineBox::SvxLineBox( vcl::Window* pParent, const Reference< XFrame >& rFrame ) :
61  nCurPos ( 0 ),
62  aLogicalSize(40,140),
63  bRelease ( true ),
64  mpSh ( nullptr ),
65  mxFrame ( rFrame )
66 {
67  SetSizePixel(LogicToPixel(aLogicalSize, MapMode(MapUnit::MapAppFont)));
68  Show();
69 
71  aDelayTimer.SetInvokeHandler( LINK( this, SvxLineBox, DelayHdl_Impl ) );
73 }
74 
75 
76 // Fills the listbox (provisional) with strings
77 
78 void SvxLineBox::Fill( const XDashListRef &pList )
79 {
80  Clear();
81 
82  if( !pList.is() )
83  return;
84 
85  // entry for 'none'
86  InsertEntry(pList->GetStringForUiNoLine());
87 
88  // entry for solid line
89  InsertEntry(pList->GetStringForUiSolidLine(),
90  Image(pList->GetBitmapForUISolidLine()));
91 
92  // entries for dashed lines
93 
94  long nCount = pList->Count();
95  SetUpdateMode( false );
96 
97  for( long i = 0; i < nCount; i++ )
98  {
99  const XDashEntry* pEntry = pList->GetDash(i);
100  const BitmapEx aBitmap = pList->GetUiBitmap( i );
101  if( !aBitmap.IsEmpty() )
102  {
103  InsertEntry(pEntry->GetName(), Image(aBitmap));
104  }
105  else
106  InsertEntry( pEntry->GetName() );
107  }
108 
110  SetUpdateMode( true );
111 }
112 
113 IMPL_LINK_NOARG(SvxLineBox, DelayHdl_Impl, Timer *, void)
114 {
115  if ( GetEntryCount() == 0 )
116  {
117  mpSh = SfxObjectShell::Current();
118  FillControl();
119  }
120 }
121 
122 
124 {
125  // Call the parent's Select() member to trigger accessibility events.
126  ListBox::Select();
127 
128  if ( IsTravelSelect() )
129  return;
130 
131  drawing::LineStyle eXLS;
132  sal_Int32 nPos = GetSelectedEntryPos();
133 
134  switch ( nPos )
135  {
136  case 0:
137  eXLS = drawing::LineStyle_NONE;
138  break;
139 
140  case 1:
141  eXLS = drawing::LineStyle_SOLID;
142  break;
143 
144  default:
145  {
146  eXLS = drawing::LineStyle_DASH;
147 
148  if ( nPos != LISTBOX_ENTRY_NOTFOUND &&
150  SfxObjectShell::Current()->GetItem( SID_DASH_LIST ) )
151  {
152  // LineDashItem will only be sent if it also has a dash.
153  // Notify cares!
154  SvxDashListItem const * pItem = SfxObjectShell::Current()->GetItem( SID_DASH_LIST );
155  XLineDashItem aLineDashItem( GetSelectedEntry(),
156  pItem->GetDashList()->GetDash( nPos - 2 )->GetDash() );
157 
158  Any a;
159  Sequence< PropertyValue > aArgs( 1 );
160  aArgs[0].Name = "LineDash";
161  aLineDashItem.QueryValue ( a );
162  aArgs[0].Value = a;
163  SfxToolBoxControl::Dispatch( Reference< XDispatchProvider >( mxFrame->getController(), UNO_QUERY ),
164  ".uno:LineDash",
165  aArgs );
166  }
167  }
168  break;
169  }
170 
171  XLineStyleItem aLineStyleItem( eXLS );
172  Any a;
173  Sequence< PropertyValue > aArgs( 1 );
174  aArgs[0].Name = "XLineStyle";
175  aLineStyleItem.QueryValue ( a );
176  aArgs[0].Value = a;
177  SfxToolBoxControl::Dispatch( Reference< XDispatchProvider >( mxFrame->getController(), UNO_QUERY ),
178  ".uno:XLineStyle",
179  aArgs );
180 
183 }
184 
185 
187 {
188  MouseNotifyEvent nType = rNEvt.GetType();
189 
190  switch(nType)
191  {
192  case MouseNotifyEvent::MOUSEBUTTONDOWN:
193  case MouseNotifyEvent::GETFOCUS:
195  break;
196  case MouseNotifyEvent::LOSEFOCUS:
198  break;
199  case MouseNotifyEvent::KEYINPUT:
200  {
201  const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
202  if( pKEvt->GetKeyCode().GetCode() == KEY_TAB)
203  {
204  bRelease = false;
205  Select();
206  }
207  }
208  break;
209  default:
210  break;
211  }
212  return ListBox::PreNotify( rNEvt );
213 }
214 
215 
217 {
218  bool bHandled = ListBox::EventNotify( rNEvt );
219 
220  if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
221  {
222  const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
223 
224  switch ( pKEvt->GetKeyCode().GetCode() )
225  {
226  case KEY_RETURN:
227  Select();
228  bHandled = true;
229  break;
230 
231  case KEY_ESCAPE:
234  bHandled = true;
235  break;
236  }
237  }
238  return bHandled;
239 }
240 
241 
243 {
244  if(!bRelease)
245  {
246  bRelease = true;
247  return;
248  }
249 
250  if( SfxViewShell::Current() )
251  {
252  vcl::Window* pShellWnd = SfxViewShell::Current()->GetWindow();
253 
254  if ( pShellWnd )
255  pShellWnd->GrabFocus();
256  }
257 }
258 
260 {
261  if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) &&
262  (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) )
263  {
264  SetSizePixel(LogicToPixel(aLogicalSize, MapMode(MapUnit::MapAppFont)));
265  }
266 
267  ListBox::DataChanged( rDCEvt );
268 }
269 
271 {
272  // FillStyles();
273  if ( !mpSh )
275 
276  if( mpSh )
277  {
278  const SvxDashListItem* pItem = mpSh->GetItem( SID_DASH_LIST );
279  if ( pItem )
280  Fill( pItem->GetDashList() );
281  }
282 }
283 
285  vcl::Window* pParent, const Reference< XFrame >& rFrame )
286  : MetricField(pParent, WB_BORDER | WB_SPIN | WB_REPEAT)
287  , aCurTxt()
288  , ePoolUnit(MapUnit::MapCM)
289  , mxFrame(rFrame)
290 {
291  Size aSize( CalcMinimumSize() );
292  SetSizePixel( aSize );
293  aLogicalSize = PixelToLogic(aSize, MapMode(MapUnit::MapAppFont));
294  SetUnit( FieldUnit::MM );
295  SetDecimalDigits( 2 );
296  SetMax( 5000 );
297  SetMin( 0 );
298  SetLast( 5000 );
299  SetFirst( 0 );
300 
302  SetFieldUnit( *this, eDlgUnit );
303  Show();
304 }
305 
306 
308 {
309  if ( pItem )
310  {
311  if ( pItem->GetValue() != GetCoreValue( *this, ePoolUnit ) )
312  SetMetricValue( *this, pItem->GetValue(), ePoolUnit );
313  }
314  else
315  SetText( "" );
316 }
317 
318 
320 {
322  long nTmp = GetCoreValue( *this, ePoolUnit );
323  XLineWidthItem aLineWidthItem( nTmp );
324 
325  Any a;
326  Sequence< PropertyValue > aArgs( 1 );
327  aArgs[0].Name = "LineWidth";
328  aLineWidthItem.QueryValue( a );
329  aArgs[0].Value = a;
330  SfxToolBoxControl::Dispatch( Reference< XDispatchProvider >( mxFrame->getController(), UNO_QUERY ),
331  ".uno:LineWidth",
332  aArgs );
333 }
334 
335 
337 {
338  if( SfxViewShell::Current() )
339  {
340  vcl::Window* pShellWnd = SfxViewShell::Current()->GetWindow();
341  if ( pShellWnd )
342  pShellWnd->GrabFocus();
343  }
344 }
345 
347 {
348  ePoolUnit = eUnit;
349 }
350 
352 {
354  if ( eDlgUnit != eTmpUnit )
355  {
356  eDlgUnit = eTmpUnit;
357  SetFieldUnit( *this, eDlgUnit );
358  }
359 }
360 
362 {
363  MouseNotifyEvent nType = rNEvt.GetType();
364 
365  if ( MouseNotifyEvent::MOUSEBUTTONDOWN == nType || MouseNotifyEvent::GETFOCUS == nType )
366  aCurTxt = GetText();
367 
368  return MetricField::PreNotify( rNEvt );
369 }
370 
371 
373 {
374  bool bHandled = MetricField::EventNotify( rNEvt );
375 
376  if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
377  {
378  const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
379  const vcl::KeyCode& rKey = pKEvt->GetKeyCode();
381 
382  if ( rKey.GetModifier() && rKey.GetGroup() != KEYGROUP_CURSOR && pSh )
383  (void)pSh->KeyInput( *pKEvt );
384  else
385  {
386  bool bHandledInside = false;
387 
388  switch ( rKey.GetCode() )
389  {
390  case KEY_RETURN:
391  Reformat();
392  bHandledInside = true;
393  break;
394 
395  case KEY_ESCAPE:
396  SetText( aCurTxt );
397  bHandled = true;
398  break;
399  }
400 
401  if ( bHandledInside )
402  {
403  bHandled = true;
404  Modify();
406  }
407  }
408  }
409  return bHandled;
410 }
411 
413 {
414  if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) &&
415  (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) )
416  {
417  SetSizePixel(LogicToPixel(aLogicalSize, MapMode(MapUnit::MapAppFont)));
418  }
419 
420  MetricField::DataChanged( rDCEvt );
421 }
422 
425  nCurPos ( 0 ),
426  bSelect ( false )
427 {
428  Fill();
430  SelectEntryPos( sal_Int32(drawing::FillStyle_SOLID) );
431  Show();
432 }
433 
435 
436 bool SvxFillTypeBox::PreNotify( NotifyEvent& rNEvt )
437 {
438  MouseNotifyEvent nType = rNEvt.GetType();
439 
440  if (!isDisposed())
441  {
442  if ( MouseNotifyEvent::MOUSEBUTTONDOWN == nType || MouseNotifyEvent::GETFOCUS == nType )
443  nCurPos = GetSelectedEntryPos();
444  else if ( MouseNotifyEvent::LOSEFOCUS == nType
446  && !IsWindowOrChild( Application::GetFocusWindow(), true ) )
447  {
448  if ( !bSelect )
449  SelectEntryPos( nCurPos );
450  else
451  bSelect = false;
452  }
453  }
454 
455  return FillTypeLB::PreNotify( rNEvt );
456 }
457 
458 
460 {
461  bool bHandled = FillTypeLB::EventNotify( rNEvt );
462 
463  if (isDisposed())
464  return false;
465 
466  if ( !bHandled && rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
467  {
468  const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
469  switch ( pKEvt->GetKeyCode().GetCode() )
470  {
471  case KEY_RETURN:
472  bHandled = true;
473  GetSelectHdl().Call( *this );
474  break;
475 
476  case KEY_TAB:
477  GetSelectHdl().Call( *this );
478  break;
479 
480  case KEY_ESCAPE:
483  bHandled = true;
484  break;
485  }
486  }
487  return bHandled;
488 }
489 
490 
492 {
493  if( SfxViewShell::Current() )
494  {
495  vcl::Window* pShellWnd = SfxViewShell::Current()->GetWindow();
496 
497  if ( pShellWnd )
498  pShellWnd->GrabFocus();
499  }
500 }
501 
502 boost::property_tree::ptree SvxFillTypeBox::DumpAsPropertyTree()
503 {
504  boost::property_tree::ptree aTree = FillTypeLB::DumpAsPropertyTree();
505  aTree.put("command", ".uno:FillStyle");
506  return aTree;
507 }
508 
511  nCurPos( 0 )
512 {
513  SetPosPixel( Point( 90, 0 ) );
514  SetSizePixel(LogicToPixel(Size(50, 80), MapMode(MapUnit::MapAppFont)));
515  Show();
516 }
517 
519 
520 bool SvxFillAttrBox::PreNotify( NotifyEvent& rNEvt )
521 {
522  MouseNotifyEvent nType = rNEvt.GetType();
523 
524  if ( MouseNotifyEvent::MOUSEBUTTONDOWN == nType || MouseNotifyEvent::GETFOCUS == nType )
525  nCurPos = GetSelectedEntryPos();
526 
527  return ListBox::PreNotify( rNEvt );
528 }
529 
530 
532 {
533  bool bHandled = ListBox::EventNotify( rNEvt );
534 
535  if ( !bHandled && rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
536  {
537  const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
538 
539  switch ( pKEvt->GetKeyCode().GetCode() )
540  {
541  case KEY_RETURN:
542  GetSelectHdl().Call( *this );
543  bHandled = true;
544  break;
545  case KEY_TAB:
546  GetSelectHdl().Call( *this );
547  break;
548  case KEY_ESCAPE:
551  bHandled = true;
552  break;
553  }
554  }
555  return bHandled;
556 }
557 
558 
560 {
561  if( SfxViewShell::Current() )
562  {
563  vcl::Window* pShellWnd = SfxViewShell::Current()->GetWindow();
564 
565  if ( pShellWnd )
566  pShellWnd->GrabFocus();
567  }
568 }
569 
570 // Fills the listbox (provisional) with strings
571 
573 {
574  long nCount = pList->Count();
575  ListBox::SetUpdateMode( false );
576 
577  for( long i = 0; i < nCount; i++ )
578  {
579  const XHatchEntry* pEntry = pList->GetHatch(i);
580  const BitmapEx aBitmap = pList->GetUiBitmap( i );
581  if( !aBitmap.IsEmpty() )
582  ListBox::InsertEntry(pEntry->GetName(), Image(aBitmap));
583  else
584  InsertEntry( pEntry->GetName() );
585  }
586 
588  ListBox::SetUpdateMode( true );
589 }
590 
591 // Fills the listbox (provisional) with strings
592 
594 {
595  long nCount = pList->Count();
596  ListBox::SetUpdateMode( false );
597 
598  for( long i = 0; i < nCount; i++ )
599  {
600  const XGradientEntry* pEntry = pList->GetGradient(i);
601  const BitmapEx aBitmap = pList->GetUiBitmap( i );
602  if( !aBitmap.IsEmpty() )
603  ListBox::InsertEntry(pEntry->GetName(), Image(aBitmap));
604  else
605  InsertEntry( pEntry->GetName() );
606  }
607 
609  ListBox::SetUpdateMode( true );
610 }
611 
612 namespace
613 {
614  void formatBitmapExToSize(BitmapEx& rBitmapEx, const Size& rSize)
615  {
616  if(!rBitmapEx.IsEmpty() && rSize.Width() > 0 && rSize.Height() > 0)
617  {
619  pVirtualDevice->SetOutputSizePixel(rSize);
620 
621  if(rBitmapEx.IsTransparent())
622  {
623  const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
624 
625  if(rStyleSettings.GetPreviewUsesCheckeredBackground())
626  {
627  const Point aNull(0, 0);
628  static const sal_uInt32 nLen(8);
629  static const Color aW(COL_WHITE);
630  static const Color aG(0xef, 0xef, 0xef);
631 
632  pVirtualDevice->DrawCheckered(aNull, rSize, nLen, aW, aG);
633  }
634  else
635  {
636  pVirtualDevice->SetBackground(rStyleSettings.GetFieldColor());
637  pVirtualDevice->Erase();
638  }
639  }
640 
641  if(rBitmapEx.GetSizePixel().Width() >= rSize.Width() && rBitmapEx.GetSizePixel().Height() >= rSize.Height())
642  {
643  rBitmapEx.Scale(rSize);
644  pVirtualDevice->DrawBitmapEx(Point(0, 0), rBitmapEx);
645  }
646  else
647  {
648  const Size aBitmapSize(rBitmapEx.GetSizePixel());
649 
650  for(long y(0); y < rSize.Height(); y += aBitmapSize.Height())
651  {
652  for(long x(0); x < rSize.Width(); x += aBitmapSize.Width())
653  {
654  pVirtualDevice->DrawBitmapEx(
655  Point(x, y),
656  rBitmapEx);
657  }
658  }
659  }
660 
661  rBitmapEx = pVirtualDevice->GetBitmapEx(Point(0, 0), rSize);
662  }
663  }
664 } // end of anonymous namespace
665 
667 {
668  const long nCount(pList->Count());
669  const XBitmapEntry* pEntry;
670  const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
671  const Size aSize(rStyleSettings.GetListBoxPreviewDefaultPixelSize());
672 
673  ListBox::SetUpdateMode(false);
674 
675  for(long i(0); i < nCount; i++)
676  {
677  pEntry = pList->GetBitmap( i );
678  maBitmapEx = pEntry->GetGraphicObject().GetGraphic().GetBitmapEx();
679  formatBitmapExToSize(maBitmapEx, aSize);
680  ListBox::InsertEntry(pEntry->GetName(), Image(maBitmapEx));
681  }
682 
685 }
686 
688 {
689  const long nCount(pList->Count());
690  const XBitmapEntry* pEntry;
691  const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
692  const Size aSize(rStyleSettings.GetListBoxPreviewDefaultPixelSize());
693 
694  ListBox::SetUpdateMode(false);
695 
696  for(long i(0); i < nCount; i++)
697  {
698  pEntry = pList->GetBitmap( i );
699  maBitmapEx = pEntry->GetGraphicObject().GetGraphic().GetBitmapEx();
700  formatBitmapExToSize(maBitmapEx, aSize);
701  ListBox::InsertEntry(pEntry->GetName(), Image(maBitmapEx));
702  }
703 
706 }
707 
708 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
long Width() const
Size const aLogicalSize
Definition: itemwin.hxx:34
void SetFieldUnit(weld::MetricSpinButton &rField, FieldUnit eUnit, bool bAll)
sal_Int32 GetValue() const
virtual void Select() override
Definition: itemwin.cxx:123
virtual bool EventNotify(NotifyEvent &rNEvt) override
Definition: itemwin.cxx:531
FieldUnit eDlgUnit
Definition: itemwin.hxx:65
static void ReleaseFocus_Impl()
Definition: itemwin.cxx:491
FieldUnit
OUString GetSelectedEntry(sal_Int32 nSelIndex=0) const
#define KEYGROUP_CURSOR
bool bRelease
Definition: itemwin.hxx:35
SvxMetricField(vcl::Window *pParent, const css::uno::Reference< css::frame::XFrame > &rFrame)
Definition: itemwin.cxx:284
sal_Int32 GetSelectedEntryPos(sal_Int32 nSelIndex=0) const
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
Definition: itemwin.cxx:412
virtual void Reformat() override
#define KEY_TAB
long Height() const
void SetMin(sal_Int64 nNewMin, FieldUnit eInUnit)
bool Scale(const Size &rNewSize, BmpScaleFlag nScaleFlag=BmpScaleFlag::Default)
const SfxPoolItem * GetItem(const SwTextAttr &rAttr, sal_uInt16 nWhich)
void SetFirst(sal_Int64 nNewFirst, FieldUnit eInUnit)
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
virtual void Select()
virtual void SetSizePixel(const Size &rNewSize)
static void ReleaseFocus_Impl()
Definition: itemwin.cxx:336
sal_uInt16 GetGroup() const
sal_uInt16 GetCode() const
bool GetPreviewUsesCheckeredBackground() const
DataChangedEventType GetType() const
const KeyEvent * GetKeyEvent() const
void SetMax(sal_Int64 nNewMax, FieldUnit eInUnit)
static SfxObjectShell * Current()
void Fill(const XDashListRef &pList)
Definition: itemwin.cxx:78
void Clear()
sal_uInt16 nCurPos
Definition: itemwin.hxx:119
sal_uInt16 nCurPos
Definition: itemwin.hxx:99
virtual bool EventNotify(NotifyEvent &rNEvt) override
Definition: itemwin.cxx:459
IMPL_LINK_NOARG(SvxLineBox, DelayHdl_Impl, Timer *, void)
Definition: itemwin.cxx:113
float x
const Size & GetListBoxPreviewDefaultPixelSize() const
virtual bool EventNotify(NotifyEvent &rNEvt) override
Definition: itemwin.cxx:216
virtual bool PreNotify(NotifyEvent &rNEvt) override
Definition: itemwin.cxx:361
virtual bool EventNotify(NotifyEvent &rNEvt) override
Definition: itemwin.cxx:372
#define LISTBOX_ENTRY_NOTFOUND
SvxFillTypeBox(vcl::Window *pParent)
Definition: itemwin.cxx:423
void FillControl()
Definition: itemwin.cxx:270
VCL_BUILDER_FACTORY(PageNumberListBox)
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
void Fill(const XHatchListRef &pList)
Definition: itemwin.cxx:572
int nCount
AllSettingsFlags GetFlags() const
virtual boost::property_tree::ptree DumpAsPropertyTree() override
static SfxViewShell * Current()
virtual boost::property_tree::ptree DumpAsPropertyTree() override
Definition: itemwin.cxx:502
sal_uInt16 GetModifier() const
#define DELAY_TIMEOUT
Definition: itemwin.cxx:37
SfxObjectShell * mpSh
Definition: itemwin.hxx:36
virtual void Modify() override
css::uno::Reference< css::frame::XFrame > mxFrame
Definition: itemwin.hxx:67
float y
void Update()
virtual Size CalcMinimumSize() const override
const OUString & GetName() const
static FieldUnit GetModuleFieldUnit(css::uno::Reference< css::frame::XFrame > const &i_frame)
const SfxPoolItem * GetItem(sal_uInt16 nSlotId) const
bool IsEmpty() const
const XDashListRef & GetDashList() const
Definition: drawitem.hxx:171
virtual bool PreNotify(NotifyEvent &rNEvt) override
Definition: itemwin.cxx:186
void Fill()
Definition: dlgctrl.cxx:903
uno_Any a
MapUnit ePoolUnit
Definition: itemwin.hxx:64
OUString aCurTxt
Definition: itemwin.hxx:63
void SelectEntryPos(sal_Int32 nPos, bool bSelect=true)
int i
QPRO_FUNC_TYPE const nType
#define KEY_ESCAPE
bool IsTravelSelect() const
void SetUpdateMode(bool bUpdate)
int GetCoreValue(const weld::MetricSpinButton &rField, MapUnit eUnit)
virtual OUString GetText() const override
const Color & GetFieldColor() const
virtual void Start() override
Size get_preferred_size() const
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
Definition: xattr.cxx:382
sal_Int32 InsertEntry(const OUString &rStr, sal_Int32 nPos=LISTBOX_APPEND)
MouseNotifyEvent GetType() const
void ReleaseFocus_Impl()
Definition: itemwin.cxx:242
WinBits const WB_DROPDOWN
bool IsTransparent() const
void SetCoreUnit(MapUnit eUnit)
Definition: itemwin.cxx:346
void SetMetricValue(weld::MetricSpinButton &rField, int nCoreValue, MapUnit eUnit)
void SetTimeout(sal_uInt64 nTimeoutMs)
sal_uInt16 nCurPos
Definition: itemwin.hxx:32
SvxLineBox(vcl::Window *pParent, const css::uno::Reference< css::frame::XFrame > &rFrame)
Definition: itemwin.cxx:59
void GrabFocus()
WinBits const WB_REPEAT
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
Definition: itemwin.cxx:259
void SetLast(sal_Int64 nNewLast, FieldUnit eInUnit)
virtual bool EventNotify(NotifyEvent &rNEvt) override
virtual bool PreNotify(NotifyEvent &rNEvt) override
virtual bool PreNotify(NotifyEvent &rNEvt) override
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
Definition: xattr.cxx:926
Point PixelToLogic(const Point &rDevicePt) const
Point LogicToPixel(const Point &rLogicPt) const
void RefreshDlgUnit()
Definition: itemwin.cxx:351
#define KEY_RETURN
virtual void SetUnit(FieldUnit meUnit) override
SvxFillAttrBox(vcl::Window *pParent)
Definition: itemwin.cxx:509
const vcl::KeyCode & GetKeyCode() const
static vcl::Window * GetFocusWindow()
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
css::uno::Reference< css::frame::XFrame > mxFrame
Definition: itemwin.hxx:37
WinBits const WB_BORDER
Timer aDelayTimer
Definition: itemwin.hxx:33
void SetDecimalDigits(sal_uInt16 nDigits)
void SetInvokeHandler(const Link< Timer *, void > &rLink)
vcl::Window * GetWindow() const
WinBits const WB_AUTOHSCROLL
Size aLogicalSize
Definition: itemwin.hxx:66
WinBits const WB_TABSTOP
BitmapEx maBitmapEx
Definition: itemwin.hxx:120
static void ReleaseFocus_Impl()
Definition: itemwin.cxx:559
virtual bool KeyInput(const KeyEvent &rKeyEvent)
const Link< ListBox &, void > & GetSelectHdl() const
MapUnit
virtual void Modify() override
Definition: itemwin.cxx:319
void AdaptDropDownLineCountToMaximum()
virtual void SetText(const OUString &rStr) override
const Size & GetSizePixel() const
WinBits const WB_SPIN
MouseNotifyEvent
virtual void SetPosPixel(const Point &rNewPos)
bool isDisposed() const
void Dispatch(const OUString &aCommand, css::uno::Sequence< css::beans::PropertyValue > const &aArgs)
sal_uInt16 nPos
virtual bool EventNotify(NotifyEvent &rNEvt) override
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)