LibreOffice Module sw (master)  1
workctrl.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 <sal/config.h>
21 
22 #include <string_view>
23 
24 #include <i18nutil/unicode.hxx>
26 #include <sfx2/dispatch.hxx>
27 #include <sfx2/bindings.hxx>
28 #include <swmodule.hxx>
29 #include <view.hxx>
30 #include <initui.hxx>
31 #include <docsh.hxx>
32 #include <gloshdl.hxx>
33 #include <gloslst.hxx>
34 #include <workctrl.hxx>
35 #include <strings.hrc>
36 #include <cmdid.h>
37 #include <helpids.h>
38 #include <wrtsh.hxx>
41 #include <vcl/event.hxx>
42 #include <vcl/menu.hxx>
43 #include <vcl/settings.hxx>
44 #include <rtl/ustring.hxx>
45 #include <swabstdlg.hxx>
46 #include <sfx2/zoomitem.hxx>
47 #include <vcl/svapp.hxx>
48 #include <vcl/weldutils.hxx>
49 #include <svx/dialmgr.hxx>
50 #include <svx/strings.hrc>
51 #include <bitmaps.hlst>
53 #include <svx/srchdlg.hxx>
54 #include <com/sun/star/frame/XDispatchProvider.hpp>
55 #include <com/sun/star/frame/XFrame.hpp>
56 #include <com/sun/star/lang/XServiceInfo.hpp>
57 #include <com/sun/star/util/XURLTransformer.hpp>
58 
59 #include <sfx2/viewfrm.hxx>
60 
61 // Size check
62 #define NAVI_ENTRIES 19
63 
64 using namespace ::com::sun::star;
65 using namespace ::com::sun::star::uno;
66 using namespace ::com::sun::star::beans;
67 using namespace ::com::sun::star::frame;
68 
70 
72  sal_uInt16 nSlotId,
73  sal_uInt16 nId,
74  ToolBox& rTbx ) :
75  SfxToolBoxControl( nSlotId, nId, rTbx )
76 {
77  rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWN | rTbx.GetItemBits( nId ) );
78 }
79 
81 {
82 }
83 
85 {
86  SwView* pView = ::GetActiveView();
87  if(pView && !pView->GetDocShell()->IsReadOnly() &&
88  !pView->GetWrtShell().HasReadonlySel() )
89  {
90  Link<Menu*,bool> aLnk = LINK(this, SwTbxAutoTextCtrl, PopupHdl);
91 
94  const size_t nGroupCount = pGlossaryList->GetGroupCount();
95  for(size_t i = 1; i <= nGroupCount; ++i)
96  {
97  OUString sTitle = pGlossaryList->GetGroupTitle(i - 1);
98  const sal_uInt16 nBlockCount = pGlossaryList->GetBlockCount(i -1);
99  if(nBlockCount)
100  {
101  sal_uInt16 nIndex = static_cast<sal_uInt16>(100*i);
102  // but insert without extension
103  pPopup->InsertItem( i, sTitle);
105  pSub->SetSelectHdl(aLnk);
106  pPopup->SetPopupMenu(i, pSub);
107  for(sal_uInt16 j = 0; j < nBlockCount; j++)
108  {
109  OUString sLongName(pGlossaryList->GetBlockLongName(i - 1, j));
110  OUString sShortName(pGlossaryList->GetBlockShortName(i - 1, j));
111 
112  OUString sEntry = sShortName + " - " + sLongName;
113  pSub->InsertItem(++nIndex, sEntry);
114  }
115  }
116  }
117 
118  ToolBox* pToolBox = &GetToolBox();
119  sal_uInt16 nId = GetId();
120  pToolBox->SetItemDown( nId, true );
121 
122  pPopup->Execute( pToolBox, pToolBox->GetItemRect( nId ),
123  (pToolBox->GetAlign() == WindowAlign::Top || pToolBox->GetAlign() == WindowAlign::Bottom) ?
124  PopupMenuFlags::ExecuteDown : PopupMenuFlags::ExecuteRight );
125 
126  pToolBox->SetItemDown( nId, false );
127  }
129 }
130 
132  SfxItemState,
133  const SfxPoolItem* pState )
134 {
135  GetToolBox().EnableItem( GetId(), (GetItemState(pState) != SfxItemState::DISABLED) );
136 }
137 
138 IMPL_STATIC_LINK(SwTbxAutoTextCtrl, PopupHdl, Menu*, pMenu, bool)
139 {
140  sal_uInt16 nId = pMenu->GetCurItemId();
141 
142  sal_uInt16 nBlock = nId / 100;
143 
145  OUString sGroup = pGlossaryList->GetGroupName(nBlock - 1);
146  OUString sShortName =
147  pGlossaryList->GetBlockShortName(nBlock - 1, nId - (100 * nBlock) - 1);
148 
149  SwGlossaryHdl* pGlosHdl = ::GetActiveView()->GetGlosHdl();
151  ::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc();
152  if ( fnSetActGroup )
153  (*fnSetActGroup)( sGroup );
154  pGlosHdl->SetCurGroup(sGroup, true);
155  pGlosHdl->InsertGlossary(sShortName);
156 
157  return false;
158 }
159 
160 // Navigation-Popup
161 // determine the order of the toolbox items
162 static sal_uInt16 aNavigationInsertIds[ NAVI_ENTRIES ] =
163 {
164  NID_TBL,
165  NID_FRM,
166  NID_GRF,
167  NID_OLE,
168  NID_PGE,
169  NID_OUTL,
170  NID_MARK,
171  NID_DRW,
172  NID_CTRL,
173  NID_REG,
174  NID_BKM,
175  NID_SEL,
176  NID_FTN,
177  NID_POSTIT,
178  NID_SRCH_REP,
183 };
184 
185 std::u16string_view const aNavigationImgIds[ NAVI_ENTRIES ] =
186 {
187  u"" RID_BMP_RIBBAR_TBL,
188  u"" RID_BMP_RIBBAR_FRM,
189  u"" RID_BMP_RIBBAR_GRF,
190  u"" RID_BMP_RIBBAR_OLE,
191  u"" RID_BMP_RIBBAR_PGE,
192  u"" RID_BMP_RIBBAR_OUTL,
193  u"" RID_BMP_RIBBAR_MARK,
194  u"" RID_BMP_RIBBAR_DRW,
195  u"" RID_BMP_RIBBAR_CTRL,
196  u"" RID_BMP_RIBBAR_REG,
197  u"" RID_BMP_RIBBAR_BKM,
198  u"" RID_BMP_RIBBAR_SEL,
199  u"" RID_BMP_RIBBAR_FTN,
200  u"" RID_BMP_RIBBAR_POSTIT,
201  u"" RID_BMP_RIBBAR_REP,
202  u"" RID_BMP_RIBBAR_ENTRY,
203  u"" RID_BMP_RIBBAR_FORMULA,
204  u"" RID_BMP_RIBBAR_ERROR,
205  u"" RID_BMP_RIBBAR_RECENCY
206 };
207 
208 static const char* aNavigationStrIds[ NAVI_ENTRIES ] =
209 {
210  ST_TBL,
211  ST_FRM,
212  ST_GRF,
213  ST_OLE,
214  ST_PGE,
215  ST_OUTL,
216  ST_MARK,
217  ST_DRW,
218  ST_CTRL,
219  ST_REG,
220  ST_BKM,
221  ST_SEL,
222  ST_FTN,
223  ST_POSTIT,
224  ST_SRCH_REP,
225  ST_INDEX_ENTRY,
226  ST_TABLE_FORMULA,
227  ST_TABLE_FORMULA_ERROR,
228  ST_RECENCY
229 };
230 
231 // these are global strings
232 static const char* STR_IMGBTN_ARY[] =
233 {
234  STR_IMGBTN_TBL_DOWN,
235  STR_IMGBTN_FRM_DOWN,
236  STR_IMGBTN_PGE_DOWN,
237  STR_IMGBTN_DRW_DOWN,
238  STR_IMGBTN_CTRL_DOWN,
239  STR_IMGBTN_REG_DOWN,
240  STR_IMGBTN_BKM_DOWN,
241  STR_IMGBTN_GRF_DOWN,
242  STR_IMGBTN_OLE_DOWN,
243  STR_IMGBTN_OUTL_DOWN,
244  STR_IMGBTN_SEL_DOWN,
245  STR_IMGBTN_FTN_DOWN,
246  STR_IMGBTN_MARK_DOWN,
247  STR_IMGBTN_POSTIT_DOWN,
248  STR_IMGBTN_SRCH_REP_DOWN,
249  STR_IMGBTN_INDEX_ENTRY_DOWN,
250  STR_IMGBTN_TBLFML_DOWN,
251  STR_IMGBTN_TBLFML_ERR_DOWN,
252  STR_IMGBTN_RECENCY_DOWN,
253  STR_IMGBTN_TBL_UP,
254  STR_IMGBTN_FRM_UP,
255  STR_IMGBTN_PGE_UP,
256  STR_IMGBTN_DRW_UP,
257  STR_IMGBTN_CTRL_UP,
258  STR_IMGBTN_REG_UP,
259  STR_IMGBTN_BKM_UP,
260  STR_IMGBTN_GRF_UP,
261  STR_IMGBTN_OLE_UP,
262  STR_IMGBTN_OUTL_UP,
263  STR_IMGBTN_SEL_UP,
264  STR_IMGBTN_FTN_UP,
265  STR_IMGBTN_MARK_UP,
266  STR_IMGBTN_POSTIT_UP,
267  STR_IMGBTN_SRCH_REP_UP,
268  STR_IMGBTN_INDEX_ENTRY_UP,
269  STR_IMGBTN_TBLFML_UP,
270  STR_IMGBTN_TBLFML_ERR_UP,
271  STR_IMGBTN_RECENCY_UP
272 };
273 
274 static OUString lcl_GetScrollToolTip(bool bNext)
275 {
276  sal_uInt16 nResId = SwView::GetMoveType();
277  if (!bNext)
278  nResId += NID_COUNT;
279  const char* id = STR_IMGBTN_ARY[nResId - NID_START];
280  return id ? SwResId(id): OUString();
281 }
282 
283 namespace {
284 
285 class SwZoomBox_Impl final : public InterimItemWindow
286 {
287  std::unique_ptr<weld::ComboBox> m_xWidget;
288  sal_uInt16 nSlotId;
289  bool bRelease;
290 
291  DECL_LINK(SelectHdl, weld::ComboBox&, void);
292  DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
293  DECL_LINK(ActivateHdl, weld::ComboBox&, bool);
294  DECL_LINK(FocusOutHdl, weld::Widget&, void);
295 
296  void Select();
297 
298  void ReleaseFocus();
299 
300 public:
301  SwZoomBox_Impl(vcl::Window* pParent, sal_uInt16 nSlot);
302 
303  virtual void dispose() override
304  {
305  m_xWidget.reset();
307  }
308 
309  void save_value()
310  {
311  m_xWidget->save_value();
312  }
313 
314  void set_entry_text(const OUString& rText)
315  {
316  m_xWidget->set_entry_text(rText);
317  }
318 
319  virtual ~SwZoomBox_Impl() override
320  {
321  disposeOnce();
322  }
323 };
324 
325 }
326 
327 SwZoomBox_Impl::SwZoomBox_Impl(vcl::Window* pParent, sal_uInt16 nSlot)
328  : InterimItemWindow(pParent, "modules/swriter/ui/zoombox.ui", "ZoomBox")
329  , m_xWidget(m_xBuilder->weld_combo_box("zoom"))
330  , nSlotId(nSlot)
331  , bRelease(true)
332 {
333  InitControlBase(m_xWidget.get());
334 
335  m_xWidget->set_help_id(HID_PVIEW_ZOOM_LB);
336  m_xWidget->set_entry_completion(false);
337  m_xWidget->connect_changed(LINK(this, SwZoomBox_Impl, SelectHdl));
338  m_xWidget->connect_key_press(LINK(this, SwZoomBox_Impl, KeyInputHdl));
339  m_xWidget->connect_entry_activate(LINK(this, SwZoomBox_Impl, ActivateHdl));
340  m_xWidget->connect_focus_out(LINK(this, SwZoomBox_Impl, FocusOutHdl));
341 
342  const char* const aZoomValues[] =
343  { RID_SVXSTR_ZOOM_25 , RID_SVXSTR_ZOOM_50 ,
344  RID_SVXSTR_ZOOM_75 , RID_SVXSTR_ZOOM_100 ,
345  RID_SVXSTR_ZOOM_150 , RID_SVXSTR_ZOOM_200 ,
346  RID_SVXSTR_ZOOM_WHOLE_PAGE, RID_SVXSTR_ZOOM_PAGE_WIDTH ,
347  RID_SVXSTR_ZOOM_OPTIMAL_VIEW };
348  for(const char* pZoomValue : aZoomValues)
349  {
350  OUString sEntry = SvxResId(pZoomValue);
351  m_xWidget->append_text(sEntry);
352  }
353 
354  int nWidth = m_xWidget->get_pixel_size(SvxResId(RID_SVXSTR_ZOOM_200)).Width();
355  m_xWidget->set_entry_width_chars(std::ceil(nWidth / m_xWidget->get_approximate_digit_width()));
356 
357  SetSizePixel(m_xWidget->get_preferred_size());
358 }
359 
360 IMPL_LINK(SwZoomBox_Impl, SelectHdl, weld::ComboBox&, rComboBox, void)
361 {
362  if (rComboBox.changed_by_direct_pick()) // only when picked from the list
363  Select();
364 }
365 
366 IMPL_LINK_NOARG(SwZoomBox_Impl, ActivateHdl, weld::ComboBox&, bool)
367 {
368  Select();
369  return true;
370 }
371 
372 void SwZoomBox_Impl::Select()
373 {
374  if( FN_PREVIEW_ZOOM == nSlotId )
375  {
376  bool bNonNumeric = true;
377 
378  OUString sEntry = m_xWidget->get_active_text().replaceAll("%", "");
379  SvxZoomItem aZoom(SvxZoomType::PERCENT,100);
380  if(sEntry == SvxResId( RID_SVXSTR_ZOOM_PAGE_WIDTH ) )
381  aZoom.SetType(SvxZoomType::PAGEWIDTH);
382  else if(sEntry == SvxResId( RID_SVXSTR_ZOOM_OPTIMAL_VIEW ) )
383  aZoom.SetType(SvxZoomType::OPTIMAL);
384  else if(sEntry == SvxResId( RID_SVXSTR_ZOOM_WHOLE_PAGE) )
385  aZoom.SetType(SvxZoomType::WHOLEPAGE);
386  else
387  {
388  bNonNumeric = false;
389 
390  sal_uInt16 nZoom = static_cast<sal_uInt16>(sEntry.toInt32());
391  if(nZoom < MINZOOM)
392  nZoom = MINZOOM;
393  if(nZoom > MAXZOOM)
394  nZoom = MAXZOOM;
395  aZoom.SetValue(nZoom);
396  }
397 
398  if (bNonNumeric)
399  {
400  // put old value back, in case its effectively the same
401  // as the picked option and no update to number comes
402  // back from writer
403  m_xWidget->set_entry_text(m_xWidget->get_saved_value());
404  }
405 
406  SfxObjectShell* pCurrentShell = SfxObjectShell::Current();
407 
408  pCurrentShell->GetDispatcher()->ExecuteList(SID_ATTR_ZOOM,
409  SfxCallMode::ASYNCHRON, { &aZoom });
410  }
411  ReleaseFocus();
412 }
413 
414 IMPL_LINK(SwZoomBox_Impl, KeyInputHdl, const KeyEvent&, rKEvt, bool)
415 {
416  bool bHandled = false;
417 
418  sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
419 
420  switch (nCode)
421  {
422  case KEY_TAB:
423  bRelease = false;
424  Select();
425  break;
426 
427  case KEY_ESCAPE:
428  m_xWidget->set_entry_text(m_xWidget->get_saved_value());
429  ReleaseFocus();
430  bHandled = true;
431  break;
432  }
433 
434  return bHandled || ChildKeyInput(rKEvt);
435 }
436 
437 IMPL_LINK_NOARG(SwZoomBox_Impl, FocusOutHdl, weld::Widget&, void)
438 {
439  if (!m_xWidget->has_focus()) // a combobox can be comprised of different subwidget so double-check if none of those has focus
440  m_xWidget->set_entry_text(m_xWidget->get_saved_value());
441 }
442 
443 void SwZoomBox_Impl::ReleaseFocus()
444 {
445  if ( !bRelease )
446  {
447  bRelease = true;
448  return;
449  }
451 
452  if ( pCurSh )
453  {
454  vcl::Window* pShellWnd = pCurSh->GetWindow();
455 
456  if ( pShellWnd )
457  pShellWnd->GrabFocus();
458  }
459 }
460 
462 
464  sal_uInt16 nSlotId,
465  sal_uInt16 nId,
466  ToolBox& rTbx) :
467  SfxToolBoxControl( nSlotId, nId, rTbx )
468 {
469 }
470 
472 {
473 }
474 
475 void SwPreviewZoomControl::StateChanged( sal_uInt16 /*nSID*/,
476  SfxItemState eState,
477  const SfxPoolItem* pState )
478 {
479  sal_uInt16 nId = GetId();
480  GetToolBox().EnableItem( nId, (GetItemState(pState) != SfxItemState::DISABLED) );
481  SwZoomBox_Impl* pBox = static_cast<SwZoomBox_Impl*>(GetToolBox().GetItemWindow( GetId() ));
482  if(SfxItemState::DEFAULT <= eState)
483  {
484  OUString sZoom(unicode::formatPercent(static_cast<const SfxUInt16Item*>(pState)->GetValue(),
485  Application::GetSettings().GetUILanguageTag()));
486  pBox->set_entry_text(sZoom);
487  pBox->save_value();
488  }
489 }
490 
492 {
493  VclPtrInstance<SwZoomBox_Impl> pRet( pParent, GetSlotId() );
494  return pRet.get();
495 }
496 
497 namespace {
498 
499 class SwJumpToSpecificBox_Impl final : public InterimItemWindow
500 {
501  std::unique_ptr<weld::Entry> m_xWidget;
502 
503  sal_uInt16 nSlotId;
504 
505  DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
506  DECL_LINK(SelectHdl, weld::Entry&, bool);
507 public:
508  SwJumpToSpecificBox_Impl(vcl::Window* pParent, sal_uInt16 nSlot);
509  virtual void dispose() override
510  {
511  m_xWidget.reset();
513  }
514  virtual ~SwJumpToSpecificBox_Impl() override
515  {
516  disposeOnce();
517  }
518 };
519 
520 }
521 
522 IMPL_LINK(SwJumpToSpecificBox_Impl, KeyInputHdl, const KeyEvent&, rKEvt, bool)
523 {
524  return ChildKeyInput(rKEvt);
525 }
526 
527 SwJumpToSpecificBox_Impl::SwJumpToSpecificBox_Impl(vcl::Window* pParent, sal_uInt16 nSlot)
528  : InterimItemWindow(pParent, "modules/swriter/ui/jumpposbox.ui", "JumpPosBox")
529  , m_xWidget(m_xBuilder->weld_entry("jumppos"))
530  , nSlotId(nSlot)
531 {
532  InitControlBase(m_xWidget.get());
533 
534  m_xWidget->connect_key_press(LINK(this, SwJumpToSpecificBox_Impl, KeyInputHdl));
535  m_xWidget->connect_activate(LINK(this, SwJumpToSpecificBox_Impl, SelectHdl));
536 
537  SetSizePixel(m_xWidget->get_preferred_size());
538 }
539 
540 IMPL_LINK_NOARG(SwJumpToSpecificBox_Impl, SelectHdl, weld::Entry&, bool)
541 {
542  OUString sEntry(m_xWidget->get_text());
543  SfxUInt16Item aPageNum(nSlotId);
544  aPageNum.SetValue(static_cast<sal_uInt16>(sEntry.toInt32()));
545  SfxObjectShell* pCurrentShell = SfxObjectShell::Current();
546  pCurrentShell->GetDispatcher()->ExecuteList(nSlotId, SfxCallMode::ASYNCHRON,
547  { &aPageNum });
548  return true;
549 }
550 
552 
554  sal_uInt16 nSlotId,
555  sal_uInt16 nId,
556  ToolBox& rTbx) :
557  SfxToolBoxControl( nSlotId, nId, rTbx )
558 {}
559 
561 {}
562 
564 {
566  return pRet.get();
567 }
568 
569 namespace {
570 
571 class NavElementBox_Base;
572 class NavElementBox_Impl;
573 
574 class NavElementToolBoxControl : public svt::ToolboxController,
575  public lang::XServiceInfo
576 {
577  public:
578  explicit NavElementToolBoxControl(
579  const css::uno::Reference< css::uno::XComponentContext >& rServiceManager );
580 
581  // XInterface
582  virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override;
583  virtual void SAL_CALL acquire() throw () override;
584  virtual void SAL_CALL release() throw () override;
585 
586  // XServiceInfo
587  virtual OUString SAL_CALL getImplementationName() override;
588  virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
589  virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
590 
591  // XComponent
592  virtual void SAL_CALL dispose() override;
593 
594  // XStatusListener
595  virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& Event ) override;
596 
597  // XToolbarController
598  virtual void SAL_CALL execute( sal_Int16 KeyModifier ) override;
599  virtual void SAL_CALL click() override;
600  virtual void SAL_CALL doubleClick() override;
601  virtual css::uno::Reference< css::awt::XWindow > SAL_CALL createPopupWindow() override;
602  virtual css::uno::Reference< css::awt::XWindow > SAL_CALL createItemWindow( const css::uno::Reference< css::awt::XWindow >& Parent ) override;
603 
604  void dispatchCommand( const css::uno::Sequence< css::beans::PropertyValue >& rArgs );
605  using svt::ToolboxController::dispatchCommand;
606 
607  private:
608  VclPtr<NavElementBox_Impl> m_xVclBox;
609  std::unique_ptr<NavElementBox_Base> m_xWeldBox;
610  NavElementBox_Base* m_pBox;
611 };
612 
613 class NavElementBox_Base
614 {
615 public:
616  NavElementBox_Base(std::unique_ptr<weld::ComboBox> xWidget,
617  const uno::Reference<frame::XFrame>& _xFrame,
618  NavElementToolBoxControl& rCtrl);
619 
620  virtual ~NavElementBox_Base()
621  {
622  }
623 
624  void set_sensitive(bool bSensitive)
625  {
626  m_xWidget->set_sensitive(bSensitive);
627  }
628 
629  void UpdateBox();
630 
631 protected:
632  std::unique_ptr<weld::ComboBox> m_xWidget;
633  NavElementToolBoxControl* m_pCtrl;
634  bool m_bRelease;
635  uno::Reference< frame::XFrame > m_xFrame;
636 
637  virtual bool DoKeyInput(const KeyEvent& rKEvt);
638 
639  DECL_LINK(SelectHdl, weld::ComboBox&, void);
640  DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
641 
642  void ReleaseFocus_Impl();
643 };
644 
645 
646 class NavElementBox_Impl final : public InterimItemWindow
647  , public NavElementBox_Base
648 {
649 public:
650  NavElementBox_Impl(vcl::Window* pParent,
651  const uno::Reference<frame::XFrame>& _xFrame,
652  NavElementToolBoxControl& rCtrl);
653 
654  virtual void dispose() override
655  {
656  m_xWidget.reset();
658  }
659 
660  virtual void GetFocus() override
661  {
662  if (m_xWidget)
663  m_xWidget->grab_focus();
665  }
666 
667  virtual bool DoKeyInput(const KeyEvent& rKEvt) override;
668 
669  virtual ~NavElementBox_Impl() override
670  {
671  disposeOnce();
672  }
673 };
674 
675 }
676 
677 NavElementBox_Base::NavElementBox_Base(
678  std::unique_ptr<weld::ComboBox> xWidget,
679  const uno::Reference< frame::XFrame >& _xFrame,
680  NavElementToolBoxControl& _rCtrl )
681  : m_xWidget(std::move(xWidget))
682  , m_pCtrl(&_rCtrl)
683  , m_bRelease(true)
684  , m_xFrame(_xFrame)
685 {
686  m_xWidget->set_size_request(150, -1);
687 
688  m_xWidget->make_sorted();
689  m_xWidget->freeze();
690  for (sal_uInt16 i = 0; i < NID_COUNT; i++)
691  m_xWidget->append(OUString::number(aNavigationInsertIds[i]), SwResId(aNavigationStrIds[i]), OUString(aNavigationImgIds[i]));
692  m_xWidget->thaw();
693 
694  m_xWidget->connect_changed(LINK(this, NavElementBox_Base, SelectHdl));
695  m_xWidget->connect_key_press(LINK(this, NavElementBox_Base, KeyInputHdl));
696 }
697 
698 NavElementBox_Impl::NavElementBox_Impl(
699  vcl::Window* _pParent,
700  const uno::Reference< frame::XFrame >& _xFrame,
701  NavElementToolBoxControl& _rCtrl )
702  : InterimItemWindow(_pParent, "modules/swriter/ui/combobox.ui", "ComboBox")
703  , NavElementBox_Base(m_xBuilder->weld_combo_box("combobox"), _xFrame, _rCtrl)
704 {
705  SetSizePixel(m_xContainer->get_preferred_size());
706 }
707 
708 void NavElementBox_Base::ReleaseFocus_Impl()
709 {
710  if ( !m_bRelease )
711  {
712  m_bRelease = true;
713  return;
714  }
715 
716  if ( m_xFrame.is() && m_xFrame->getContainerWindow().is() )
717  m_xFrame->getContainerWindow()->setFocus();
718 }
719 
720 IMPL_LINK(NavElementBox_Base, SelectHdl, weld::ComboBox&, rComboBox, void)
721 {
722  if (!rComboBox.changed_by_direct_pick()) // only when picked from the list
723  return;
724 
725  SvxSearchDialogWrapper::SetSearchLabel( SearchLabel::Empty );
726 
727  sal_uInt16 nMoveType = rComboBox.get_active_id().toUInt32();
728  SwView::SetMoveType( nMoveType );
729 
730  css::uno::Sequence< css::beans::PropertyValue > aArgs;
731  m_pCtrl->dispatchCommand( aArgs );
732 }
733 
734 void NavElementBox_Base::UpdateBox()
735 {
736  sal_uInt16 nMoveType = SwView::GetMoveType();
737  for ( size_t i = 0; i < SAL_N_ELEMENTS( aNavigationInsertIds ); ++i )
738  {
739  if ( nMoveType == aNavigationInsertIds[i] )
740  {
741  const char* id = aNavigationStrIds[i];
742  OUString sText = SwResId( id );
743  m_xWidget->set_active_text(sText);
744  break;
745  }
746  }
747 }
748 
749 IMPL_LINK(NavElementBox_Base, KeyInputHdl, const KeyEvent&, rKEvt, bool)
750 {
751  return DoKeyInput(rKEvt);
752 }
753 
754 bool NavElementBox_Base::DoKeyInput(const KeyEvent& rKEvt)
755 {
756  bool bHandled = false;
757 
758  vcl::KeyCode aKeyCode = rKEvt.GetKeyCode();
759  sal_uInt16 nCode = aKeyCode.GetCode();
760 
761  switch ( nCode )
762  {
763  case KEY_TAB:
764  {
765  m_bRelease = false;
766  SelectHdl(*m_xWidget);
767  break;
768  }
769  case KEY_RETURN:
770  {
771  m_bRelease = false;
772  SelectHdl(*m_xWidget);
773  break;
774  }
775  }
776 
777  return bHandled;
778 }
779 
780 bool NavElementBox_Impl::DoKeyInput(const KeyEvent& rKEvt)
781 {
782  if (KEY_ESCAPE == rKEvt.GetKeyCode().GetCode())
783  {
784  ReleaseFocus_Impl();
785  return true;
786  }
787  return NavElementBox_Base::DoKeyInput(rKEvt) || ChildKeyInput(rKEvt);
788 }
789 
790 
791 NavElementToolBoxControl::NavElementToolBoxControl( const uno::Reference< uno::XComponentContext >& rxContext )
792  : svt::ToolboxController( rxContext,
793  uno::Reference< frame::XFrame >(),
794  ".uno:NavElement" ),
795  m_pBox( nullptr )
796 {
797 }
798 
799 // XInterface
800 css::uno::Any SAL_CALL NavElementToolBoxControl::queryInterface( const css::uno::Type& aType )
801 {
802  uno::Any a = ToolboxController::queryInterface( aType );
803  if ( a.hasValue() )
804  return a;
805 
806  return ::cppu::queryInterface( aType, static_cast< lang::XServiceInfo* >( this ) );
807 }
808 
809 void SAL_CALL NavElementToolBoxControl::acquire() throw ()
810 {
811  ToolboxController::acquire();
812 }
813 
814 void SAL_CALL NavElementToolBoxControl::release() throw ()
815 {
816  ToolboxController::release();
817 }
818 
819 // XServiceInfo
820 sal_Bool SAL_CALL NavElementToolBoxControl::supportsService( const OUString& ServiceName )
821 {
822  return cppu::supportsService( this, ServiceName );
823 }
824 
825 OUString SAL_CALL NavElementToolBoxControl::getImplementationName()
826 {
827  return "lo.writer.NavElementToolBoxController";
828 }
829 
830 uno::Sequence< OUString > SAL_CALL NavElementToolBoxControl::getSupportedServiceNames()
831 {
832  return { "com.sun.star.frame.ToolbarController" };
833 }
834 
835 // XComponent
836 void SAL_CALL NavElementToolBoxControl::dispose()
837 {
839 
840  SolarMutexGuard aSolarMutexGuard;
841  m_xVclBox.disposeAndClear();
842  m_xWeldBox.reset();
843  m_pBox = nullptr;
844 }
845 
846 // XStatusListener
847 void SAL_CALL NavElementToolBoxControl::statusChanged( const frame::FeatureStateEvent& rEvent )
848 {
849  if (!m_pBox)
850  return;
851 
852  SolarMutexGuard aSolarMutexGuard;
853  if ( rEvent.FeatureURL.Path == "NavElement" )
854  {
855  if ( rEvent.IsEnabled )
856  {
857  m_pBox->set_sensitive(true);
858  m_pBox->UpdateBox();
859  }
860  else
861  m_pBox->set_sensitive(true);
862 
863  SwView* pView = GetActiveView();
864  if (pView && pView->GetViewFrame())
865  {
868  }
869  }
870 }
871 
872 // XToolbarController
873 void SAL_CALL NavElementToolBoxControl::execute( sal_Int16 /*KeyModifier*/ )
874 {
875 }
876 
877 void SAL_CALL NavElementToolBoxControl::click()
878 {
879 }
880 
881 void SAL_CALL NavElementToolBoxControl::doubleClick()
882 {
883 }
884 
885 uno::Reference< awt::XWindow > SAL_CALL NavElementToolBoxControl::createPopupWindow()
886 {
887  return uno::Reference< awt::XWindow >();
888 }
889 
890 uno::Reference< awt::XWindow > SAL_CALL NavElementToolBoxControl::createItemWindow(
891  const uno::Reference< awt::XWindow >& xParent )
892 {
893  uno::Reference< awt::XWindow > xItemWindow;
894 
895  if (m_pBuilder)
896  {
897  SolarMutexGuard aSolarMutexGuard;
898 
899  std::unique_ptr<weld::ComboBox> xWidget(m_pBuilder->weld_combo_box("NavElementWidget"));
900 
901  xItemWindow = css::uno::Reference<css::awt::XWindow>(new weld::TransportAsXWindow(xWidget.get()));
902 
903  m_xWeldBox.reset(new NavElementBox_Base(std::move(xWidget), m_xFrame, *this));
904  m_pBox = m_xWeldBox.get();
905  }
906  else
907  {
908  VclPtr<vcl::Window> pParent = VCLUnoHelper::GetWindow( xParent );
909  if ( pParent )
910  {
911  SolarMutexGuard aSolarMutexGuard;
912  m_xVclBox = VclPtr<NavElementBox_Impl>::Create( pParent, m_xFrame, *this );
913  m_pBox = m_xVclBox.get();
914  xItemWindow = VCLUnoHelper::GetInterface(m_xVclBox);
915  }
916  }
917 
918  return xItemWindow;
919 }
920 
921 void NavElementToolBoxControl::dispatchCommand(
922  const uno::Sequence< beans::PropertyValue >& rArgs )
923 {
924  uno::Reference< frame::XDispatchProvider > xDispatchProvider( m_xFrame, uno::UNO_QUERY );
925  if ( xDispatchProvider.is() )
926  {
927  util::URL aURL;
928  uno::Reference< frame::XDispatch > xDispatch;
929  uno::Reference< util::XURLTransformer > xURLTransformer = getURLTransformer();
930 
931  aURL.Complete = ".uno:NavElement";
932  xURLTransformer->parseStrict( aURL );
933  xDispatch = xDispatchProvider->queryDispatch( aURL, OUString(), 0 );
934  if ( xDispatch.is() )
935  xDispatch->dispatch( aURL, rArgs );
936  }
937 }
938 
939 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
941  css::uno::XComponentContext *rxContext,
942  css::uno::Sequence<css::uno::Any> const &)
943 {
944  return cppu::acquire( new NavElementToolBoxControl( rxContext ) );
945 }
946 
947 namespace {
948 
949 class PrevNextScrollToolboxController : public svt::ToolboxController,
950  public css::lang::XServiceInfo
951 {
952 public:
953  enum Type { PREVIOUS, NEXT };
954 
955  PrevNextScrollToolboxController( const css::uno::Reference< css::uno::XComponentContext >& rxContext, Type eType );
956 
957  // XInterface
958  virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override;
959  virtual void SAL_CALL acquire() throw () override;
960  virtual void SAL_CALL release() throw () override;
961 
962  // XServiceInfo
963  virtual OUString SAL_CALL getImplementationName() override;
964  virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
965  virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
966 
967  // XComponent
968  virtual void SAL_CALL dispose() override;
969 
970  // XStatusListener
971  virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& rEvent ) override;
972 
973 private:
974  Type meType;
975 };
976 
977 }
978 
979 PrevNextScrollToolboxController::PrevNextScrollToolboxController( const css::uno::Reference< css::uno::XComponentContext > & rxContext, Type eType )
980  : svt::ToolboxController( rxContext,
981  css::uno::Reference< css::frame::XFrame >(),
982  (eType == PREVIOUS) ? OUString( ".uno:ScrollToPrevious" ): OUString( ".uno:ScrollToNext" ) ),
983  meType( eType )
984 {
985  addStatusListener(".uno:NavElement");
986 }
987 
988 // XInterface
989 css::uno::Any SAL_CALL PrevNextScrollToolboxController::queryInterface( const css::uno::Type& aType )
990 {
991  css::uno::Any a = ToolboxController::queryInterface( aType );
992  if ( a.hasValue() )
993  return a;
994 
995  return ::cppu::queryInterface( aType, static_cast< css::lang::XServiceInfo* >( this ) );
996 }
997 
998 void SAL_CALL PrevNextScrollToolboxController::acquire() throw ()
999 {
1001 }
1002 
1003 void SAL_CALL PrevNextScrollToolboxController::release() throw ()
1004 {
1006 }
1007 
1008 // XServiceInfo
1009 OUString SAL_CALL PrevNextScrollToolboxController::getImplementationName()
1010 {
1011  return meType == PrevNextScrollToolboxController::PREVIOUS?
1012  OUString( "lo.writer.PreviousScrollToolboxController" ) :
1013  OUString( "lo.writer.NextScrollToolboxController" );
1014 }
1015 
1016 sal_Bool SAL_CALL PrevNextScrollToolboxController::supportsService( const OUString& ServiceName )
1017 {
1018  return cppu::supportsService(this, ServiceName);
1019 }
1020 
1021 css::uno::Sequence< OUString > SAL_CALL PrevNextScrollToolboxController::getSupportedServiceNames()
1022 {
1023  return { "com.sun.star.frame.ToolbarController" };
1024 }
1025 
1026 // XComponent
1028 {
1029  SolarMutexGuard aSolarMutexGuard;
1030 
1032 }
1033 
1034 // XStatusListener
1035 void SAL_CALL PrevNextScrollToolboxController::statusChanged( const css::frame::FeatureStateEvent& rEvent )
1036 {
1037  if (rEvent.FeatureURL.Path == "NavElement")
1038  {
1039  if (m_pToolbar)
1040  m_pToolbar->set_item_tooltip_text(m_aCommandURL.toUtf8(), lcl_GetScrollToolTip(meType != PrevNextScrollToolboxController::PREVIOUS));
1041  else
1042  {
1043  ToolBox* pToolBox = nullptr;
1044  sal_uInt16 nId = 0;
1045  if (getToolboxId(nId, &pToolBox))
1046  pToolBox->SetQuickHelpText(nId, lcl_GetScrollToolTip(meType != PrevNextScrollToolboxController::PREVIOUS));
1047  }
1048  }
1049  else if (rEvent.FeatureURL.Path == "ScrollToPrevious" || rEvent.FeatureURL.Path == "ScrollToNext")
1050  {
1051  if (m_pToolbar)
1052  m_pToolbar->set_item_sensitive(m_aCommandURL.toUtf8(), rEvent.IsEnabled);
1053  else
1054  {
1055  ToolBox* pToolBox = nullptr;
1056  sal_uInt16 nId = 0;
1057  if (getToolboxId(nId, &pToolBox))
1058  pToolBox->EnableItem(nId, rEvent.IsEnabled);
1059  }
1060  }
1061 }
1062 
1063 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
1065  css::uno::XComponentContext *context,
1066  css::uno::Sequence<css::uno::Any> const &)
1067 {
1068  return cppu::acquire( new PrevNextScrollToolboxController( context, PrevNextScrollToolboxController::PREVIOUS ) );
1069 }
1070 
1071 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
1073  css::uno::XComponentContext *context,
1074  css::uno::Sequence<css::uno::Any> const &)
1075 {
1076  return cppu::acquire( new PrevNextScrollToolboxController( context, PrevNextScrollToolboxController::NEXT ) );
1077 }
1078 
1079 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxViewFrame * GetViewFrame() const
#define MAXZOOM
Definition: view.hxx:81
Type
const SfxPoolItem * ExecuteList(sal_uInt16 nSlot, SfxCallMode nCall, std::initializer_list< SfxPoolItem const * > args, std::initializer_list< SfxPoolItem const * > internalargs=std::initializer_list< SfxPoolItem const * >())
#define MINZOOM
Definition: view.hxx:80
URL aURL
sal_uInt16 GetBlockCount(size_t nGroup)
Definition: gloslst.cxx:197
bool hasValue()
sal_Int32 nIndex
void SetQuickHelpText(sal_uInt16 nItemId, const OUString &rText)
#define NID_GRF
Definition: workctrl.hxx:38
#define NID_POSTIT
Definition: workctrl.hxx:44
static sal_uInt16 GetMoveType()
Definition: viewmdi.cxx:665
#define HID_PVIEW_ZOOM_LB
Definition: helpids.h:122
virtual void SAL_CALL dispose() override
virtual ~SwTbxAutoTextCtrl() override
Definition: workctrl.cxx:80
SwView * GetActiveView()
Definition: swmodul1.cxx:115
#define NID_BKM
Definition: workctrl.hxx:37
#define FN_PREVIEW_ZOOM
Definition: cmdid.h:173
std::string GetValue
#define NID_MARK
Definition: workctrl.hxx:43
ToolBox & GetToolBox() const
void(* GlossarySetActGroup)(const OUString &rNewGroup)
Definition: swabstdlg.hxx:87
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * lo_writer_NextScrollToolboxController_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)
Definition: workctrl.cxx:1072
#define NID_SEL
Definition: workctrl.hxx:41
ToolBoxItemBits GetItemBits(sal_uInt16 nItemId) const
static const AllSettings & GetSettings()
css::uno::Reference< css::lang::XComponent > m_xFrame
#define NID_TABLE_FORMULA
Definition: workctrl.hxx:47
Reference
sal_Int16 nId
#define NID_OUTL
Definition: workctrl.hxx:40
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &aType) override
sal_uInt16 GetCode() const
size_t GetGroupCount()
Definition: gloslst.cxx:167
sal_uInt16 Execute(vcl::Window *pWindow, const Point &rPopupPos)
static SfxObjectShell * Current()
void Invalidate(sal_uInt16 nId)
virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem *pState) override
Definition: workctrl.cxx:475
IMPL_STATIC_LINK(SwTbxAutoTextCtrl, PopupHdl, Menu *, pMenu, bool)
Definition: workctrl.cxx:138
SwWrtShell & GetWrtShell() const
Definition: view.hxx:400
#define NID_SRCH_REP
Definition: workctrl.hxx:45
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * lo_writer_NavElementToolBoxController_get_implementation(css::uno::XComponentContext *rxContext, css::uno::Sequence< css::uno::Any > const &)
Definition: workctrl.cxx:940
virtual ~SwJumpToSpecificPageControl() override
Definition: workctrl.cxx:560
Reference< XNameAccess > m_xContainer
virtual void CreatePopupWindow() override
Definition: workctrl.cxx:84
OUString SvxResId(const char *pId)
exports com.sun.star. frame
PREVIOUS
virtual void SAL_CALL acquire() override
static vcl::Window * GetWindow(const css::uno::Reference< css::awt::XWindow > &rxWindow)
virtual void GetFocus() override
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
static SfxViewShell * Current()
SwTbxAutoTextCtrl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx)
Definition: workctrl.cxx:71
void SetCurGroup(const OUString &aGrp, bool bApi=false, bool bAlwaysCreateNew=false)
Definition: gloshdl.cxx:92
OUString GetBlockLongName(size_t nGroup, sal_uInt16 nBlock)
Definition: gloslst.cxx:208
OUString GetGroupName(size_t nPos)
Definition: gloslst.cxx:174
OUString GetBlockShortName(size_t nGroup, sal_uInt16 nBlock)
Definition: gloslst.cxx:219
void EnableItem(sal_uInt16 nItemId, bool bEnable=true)
void addStatusListener(const OUString &aCommandURL)
sal_uInt16 nCode
#define NAVI_ENTRIES
Definition: workctrl.cxx:62
tools::Rectangle GetItemRect(sal_uInt16 nItemId)
void SetPopupMenu(sal_uInt16 nItemId, PopupMenu *pMenu)
#define SAL_N_ELEMENTS(arr)
std::u16string_view const aNavigationImgIds[NAVI_ENTRIES]
Definition: workctrl.cxx:185
virtual void SAL_CALL release() override
static sal_uInt16 aNavigationInsertIds[NAVI_ENTRIES]
Definition: workctrl.cxx:162
void SetSelectHdl(const Link< Menu *, bool > &rLink)
void EndSelection()
SfxDispatcher * GetDispatcher() const
int i
#define NID_INDEX_ENTRY
Definition: workctrl.hxx:46
#define NID_START
Definition: workctrl.hxx:30
uno_Any a
OUString GetGroupTitle(size_t nPos)
Definition: gloslst.cxx:186
DECL_LINK(DoLayout, Timer *, void)
static OUString lcl_GetScrollToolTip(bool bNext)
Definition: workctrl.cxx:274
static SwGlossaryList * pGlossaryList
Definition: initui.cxx:39
virtual ~SwPreviewZoomControl() override
Definition: workctrl.cxx:471
bool getToolboxId(sal_uInt16 &rItemId, ToolBox **ppToolBox)
SfxBindings & GetBindings()
static const char * aNavigationStrIds[NAVI_ENTRIES]
Definition: workctrl.cxx:208
static const char * STR_IMGBTN_ARY[]
Definition: workctrl.cxx:232
void SetItemBits(sal_uInt16 nItemId, ToolBoxItemBits nBits)
float u
unsigned char sal_Bool
#define FN_SCROLL_NEXT
Definition: cmdid.h:181
#define NID_REG
Definition: workctrl.hxx:36
#define NID_TABLE_FORMULA_ERROR
Definition: workctrl.hxx:48
static SwAbstractDialogFactory * Create()
Definition: swabstdlg.cxx:36
#define FN_SCROLL_PREV
Definition: cmdid.h:180
vcl::Window * GetItemWindow(sal_uInt16 nItemId) const
#define NID_FTN
Definition: workctrl.hxx:42
OUString SwResId(const char *pId)
Definition: swmodule.cxx:166
static void SetMoveType(sal_uInt16 nSet)
Definition: viewmdi.cxx:670
#define NID_RECENCY
Definition: workctrl.hxx:49
bool HasReadonlySel() const
Definition: crsrsh.cxx:3349
void GrabFocus()
void SetItemDown(sal_uInt16 nItemId, bool bDown)
static void SetSearchLabel(const SearchLabel &rSL)
virtual VclPtr< InterimItemWindow > CreateItemWindow(vcl::Window *pParent) override
Definition: workctrl.cxx:563
#define NID_DRW
Definition: workctrl.hxx:34
SwDocShell * GetDocShell()
Definition: view.cxx:1110
virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem *pState) override
Definition: workctrl.cxx:131
SFX_IMPL_TOOLBOX_CONTROL(SwTbxAutoTextCtrl, SfxVoidItem)
bool IsReadOnly() const
constexpr sal_uInt16 KEY_RETURN
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * lo_writer_PreviousScrollToolboxController_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)
Definition: workctrl.cxx:1064
static SfxItemState GetItemState(const SfxPoolItem *pState)
SwPreviewZoomControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx)
Definition: workctrl.cxx:463
NEXT
#define NID_OLE
Definition: workctrl.hxx:39
void InsertItem(sal_uInt16 nItemId, const OUString &rStr, MenuItemBits nItemBits=MenuItemBits::NONE, const OString &rIdent=OString(), sal_uInt16 nPos=MENU_APPEND)
bool InsertGlossary(const OUString &rName)
Definition: gloshdl.cxx:487
const vcl::KeyCode & GetKeyCode() const
#define NID_PGE
Definition: workctrl.hxx:33
#define NID_CTRL
Definition: workctrl.hxx:35
Reference< XDispatch > xDispatch
static OUString formatPercent(double dNumber, const LanguageTag &rLangTag)
SfxItemState
#define NID_TBL
Definition: workctrl.hxx:31
IMPL_LINK_NOARG(SwZoomBox_Impl, ActivateHdl, weld::ComboBox &, bool)
Definition: workctrl.cxx:366
constexpr sal_uInt16 KEY_ESCAPE
virtual void dispose() override
unsigned short GetId() const
WindowAlign GetAlign() const
static VclPtr< reference_type > Create(Arg &&...arg)
unsigned short GetSlotId() const
vcl::Window * GetWindow() const
css::uno::Reference< css::frame::XFrame > m_xFrame
SwGlossaryHdl * GetGlosHdl()
Definition: view.cxx:1607
reference_type * get() const
virtual VclPtr< InterimItemWindow > CreateItemWindow(vcl::Window *pParent) override
Definition: workctrl.cxx:491
std::unique_ptr< weld::Image > m_xWidget
static css::uno::Reference< css::awt::XWindow > GetInterface(vcl::Window *pWindow)
virtual GlossarySetActGroup SetGlossaryActGroupFunc()=0
#define NID_FRM
Definition: workctrl.hxx:32
#define NID_COUNT
Definition: workctrl.hxx:50
RedlineType meType
Definition: view.hxx:144
SwJumpToSpecificPageControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx)
Definition: workctrl.cxx:553
constexpr sal_uInt16 KEY_TAB
IMPL_LINK(SwZoomBox_Impl, SelectHdl, weld::ComboBox &, rComboBox, void)
Definition: workctrl.cxx:360
SwGlossaryList * GetGlossaryList()
Definition: initui.cxx:172