LibreOffice Module sw (master)  1
basesh.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 <config_features.h>
21 
22 #include <sal/config.h>
23 
24 #include <hintids.hxx>
25 #include <svl/urihelper.hxx>
26 #include <svl/languageoptions.hxx>
27 #include <svx/svxids.hrc>
28 #include <sfx2/linkmgr.hxx>
29 #include <sfx2/htmlmode.hxx>
30 #include <svx/imapdlg.hxx>
31 #include <sfx2/dispatch.hxx>
32 #include <sfx2/docfile.hxx>
33 #include <sfx2/viewfrm.hxx>
34 #include <sfx2/request.hxx>
35 #include <svl/whiter.hxx>
36 #include <svl/visitem.hxx>
37 #include <sfx2/objitem.hxx>
38 #include <vcl/graphicfilter.hxx>
39 #include <svx/gallery.hxx>
40 #include <editeng/langitem.hxx>
41 #include <svx/clipfmtitem.hxx>
42 #include <svx/contdlg.hxx>
43 #include <vcl/graph.hxx>
44 #include <vcl/inputctx.hxx>
45 #include <svl/slstitm.hxx>
46 #include <svl/ptitem.hxx>
47 #include <svl/itemiter.hxx>
48 #include <svl/stritem.hxx>
49 #include <editeng/colritem.hxx>
50 #include <editeng/shaditem.hxx>
51 #include <editeng/boxitem.hxx>
52 #include <svl/srchitem.hxx>
53 #include <editeng/ulspitem.hxx>
54 #include <editeng/lrspitem.hxx>
55 #include <editeng/brushitem.hxx>
56 #include <editeng/opaqitem.hxx>
57 #include <editeng/sizeitem.hxx>
58 #include <svx/flagsdef.hxx>
59 #include <svx/xflclit.hxx>
61 #include <sfx2/objface.hxx>
62 #include <fmturl.hxx>
63 #include <fmthdft.hxx>
64 #include <fmtclds.hxx>
65 #include <docsh.hxx>
66 #include <wrtsh.hxx>
67 #include <view.hxx>
68 #include <swmodule.hxx>
69 #include <swundo.hxx>
70 #include <fldbas.hxx>
71 #include <uitool.hxx>
72 #include <basesh.hxx>
73 #include <viewopt.hxx>
74 #include <fontcfg.hxx>
75 #include <docstat.hxx>
76 #include <usrfld.hxx>
77 #include <expfld.hxx>
78 #include <fldmgr.hxx>
79 #include <frmmgr.hxx>
80 #include <tablemgr.hxx>
81 #include <mdiexp.hxx>
82 #include <swdtflvr.hxx>
83 #include <pagedesc.hxx>
84 #include <convert.hxx>
85 #include <fmtcol.hxx>
86 #include <edtwin.hxx>
87 #include <tblafmt.hxx>
88 #include <caption.hxx>
89 #include <swwait.hxx>
90 #include <cmdid.h>
91 #include <globals.hrc>
92 #include <strings.hrc>
93 #include <globals.h>
94 #include <unotxdoc.hxx>
95 #include <fmtinfmt.hxx>
96 #include <doc.hxx>
98 #include <IDocumentUndoRedo.hxx>
99 #include <swabstdlg.hxx>
100 #include <modcfg.hxx>
101 #include <instable.hxx>
102 #include <svx/fmshell.hxx>
103 #include <SwRewriter.hxx>
104 #include <unomid.h>
105 #include <svx/galleryitem.hxx>
106 #include <com/sun/star/gallery/GalleryItemType.hpp>
107 #include <memory>
108 
110 #include <comphelper/scopeguard.hxx>
111 
112 #include <SwStyleNameMapper.hxx>
113 #include <poolfmt.hxx>
114 #include <shellres.hxx>
115 
117 
118 // These variables keep the state of Gallery (slot SID_GALLERY_BG_BRUSH)
119 // detected by GetGalleryState() for the subsequent ExecuteGallery() call.
120 
131 
132 #define ShellClass_SwBaseShell
133 #include <sfx2/msg.hxx>
134 #include <swslots.hxx>
135 
136 namespace
137 {
138  SvxContourDlg* GetContourDlg(SwView const &rView)
139  {
140  SfxChildWindow *pWnd = rView.GetViewFrame()->GetChildWindow(SvxContourDlgChildWindow::GetChildWindowId());
141  return pWnd ? static_cast<SvxContourDlg*>(pWnd->GetController().get()) : nullptr;
142  }
143 
144  SvxIMapDlg* GetIMapDlg(SwView const &rView)
145  {
146  SfxChildWindow* pWnd = rView.GetViewFrame()->GetChildWindow(SvxIMapDlgChildWindow::GetChildWindowId());
147  return pWnd ? static_cast<SvxIMapDlg*>(pWnd->GetController().get()) : nullptr;
148  }
149 }
150 
151 using namespace ::com::sun::star;
152 using namespace ::com::sun::star::uno;
153 using namespace ::com::sun::star::frame;
154 using namespace ::com::sun::star::lang;
155 
157 
158 void SwBaseShell::InitInterface_Impl()
159 {
160  GetStaticInterface()->RegisterChildWindow(SvxIMapDlgChildWindow::GetChildWindowId());
161  GetStaticInterface()->RegisterChildWindow(SvxContourDlgChildWindow::GetChildWindowId());
162 }
163 
164 
165 static void lcl_UpdateIMapDlg( SwWrtShell& rSh )
166 {
167  Graphic aGrf( rSh.GetIMapGraphic() );
168  GraphicType nGrfType = aGrf.GetType();
169  void* pEditObj = GraphicType::NONE != nGrfType && GraphicType::Default != nGrfType
170  ? rSh.GetIMapInventor() : nullptr;
171  std::unique_ptr<TargetList> pList(new TargetList);
173 
175  rSh.GetFlyFrameAttr( aSet );
176  const SwFormatURL &rURL = aSet.Get( RES_URL );
178  aGrf, rURL.GetMap(), pList.get(), pEditObj );
179 }
180 
182 {
183  Graphic aGraf( rSh.GetIMapGraphic() );
184  GraphicType nGrfType = aGraf.GetType();
185  bool bRet = GraphicType::NONE != nGrfType && GraphicType::Default != nGrfType;
186  if( bRet )
187  {
188  OUString aGrfName;
189  if ( nSel & SelectionType::Graphic )
190  rSh.GetGrfNms( &aGrfName, nullptr );
191 
192  SvxContourDlg *pDlg = GetContourDlg(rSh.GetView());
193  if (pDlg)
194  {
195  pDlg->Update(aGraf, !aGrfName.isEmpty(),
196  rSh.GetGraphicPolygon(), rSh.GetIMapInventor());
197  }
198  }
199  return bRet;
200 }
201 
203 {
204  SwWrtShell &rSh = GetShell();
205  SwEditWin& rTmpEditWin = GetView().GetEditWin();
206  switch(rReq.GetSlot())
207  {
208  case SID_DELETE:
209  rSh.DelRight();
210  break;
211 
212  case FN_BACKSPACE:
213 
214  if( rSh.IsNoNum() )
215  {
216  rSh.SttCursorMove();
217  bool bLeft = rSh.Left( CRSR_SKIP_CHARS, true, 1, false );
218  if( bLeft )
219  {
220  rSh.DelLeft();
221  }
222  else
223  // JP 15.07.96: If it no longer goes forward, cancel
224  // the numbering. For example at the beginning
225  // of a doc, frame, table or an area.
226  rSh.DelNumRules();
227 
228  rSh.EndCursorMove();
229  break;
230  }
231 
232  [[fallthrough]]; // otherwise call DelLeft
233  case FN_SHIFT_BACKSPACE:
234  rSh.DelLeft();
235  break;
236  default:
237  OSL_FAIL("wrong Dispatcher");
238  return;
239  }
240  rReq.Done();
241 
242  //#i42732# - notify the edit window that from now on we do not use the input language
243  rTmpEditWin.SetUseInputLanguage( false );
244 }
245 
247 {
248  // Attention: At risk of suicide!
249  // After paste, paste special the shell can be destroy.
250 
251  SwWrtShell &rSh = GetShell();
252  sal_uInt16 nId = rReq.GetSlot();
253  bool bIgnore = false;
254  switch( nId )
255  {
256  case SID_CUT:
257  case SID_COPY:
259  if ( rSh.HasSelection() )
260  {
261  rtl::Reference<SwTransferable> pTransfer = new SwTransferable( rSh );
262 
264  pTransfer->Cut();
265  else
266  {
267  const bool bLockedView = rSh.IsViewLocked();
268  rSh.LockView( true ); //lock visible section
269  pTransfer->Copy();
270  rSh.LockView( bLockedView );
271  }
272  break;
273  }
274  return;
275 
276  case SID_PASTE:
277  {
278  TransferableDataHelper aDataHelper(
280  if( aDataHelper.GetXTransferable().is()
281  && SwTransferable::IsPaste( rSh, aDataHelper ) )
282  {
283  // Temporary variables, because the shell could already be
284  // destroyed after the paste.
285  SwView* pView = &rView;
286 
287  RndStdIds nAnchorType = RndStdIds::FLY_AT_PARA;
288  const SfxUInt16Item* pAnchorType = rReq.GetArg<SfxUInt16Item>(FN_PARAM_1);
289  if (pAnchorType)
290  nAnchorType = static_cast<RndStdIds>(pAnchorType->GetValue());
291  bool bIgnoreComments = false;
292  const SfxBoolItem* pIgnoreComments = rReq.GetArg<SfxBoolItem>(FN_PARAM_2);
293  if (pIgnoreComments)
294  bIgnoreComments = pIgnoreComments->GetValue();
295  SwTransferable::Paste(rSh, aDataHelper, nAnchorType, bIgnoreComments);
296 
297  if( rSh.IsFrameSelected() || rSh.IsObjSelected() )
298  rSh.EnterSelFrameMode();
299  pView->AttrChangedNotify( &rSh );
300  }
301  else
302  return;
303  }
304  break;
305 
306  case SID_CLIPBOARD_FORMAT_ITEMS:
307  {
308  const SfxItemSet* pArgs = rReq.GetArgs();
309  const SfxPoolItem* pFormat;
310  if( pArgs && SfxItemState::SET == pArgs->GetItemState( nId, false, &pFormat ) )
311  {
312  TransferableDataHelper aDataHelper(
314  &rSh.GetView().GetEditWin()) );
315  if( aDataHelper.GetXTransferable().is()
316  /*&& SwTransferable::IsPaste( rSh, aDataHelper )*/ )
317  {
318  // Temporary variables, because the shell could already be
319  // destroyed after the paste.
320  SwView* pView = &rView;
321 
322  SwTransferable::PasteFormat( rSh, aDataHelper,
323  static_cast<SotClipboardFormatId>(static_cast<const SfxUInt32Item*>(pFormat)->GetValue()) );
324 
325  //Done() has to be called before the shell has been removed
326  rReq.Done();
327  bIgnore = true;
328  if( rSh.IsFrameSelected() || rSh.IsObjSelected())
329  rSh.EnterSelFrameMode();
330  pView->AttrChangedNotify( &rSh );
331  }
332  }
333  }
334  break;
335 
336  case SID_PASTE_UNFORMATTED:
337  {
338  TransferableDataHelper aDataHelper(
340  if( aDataHelper.GetXTransferable().is()
341  && SwTransferable::IsPaste( rSh, aDataHelper ) )
342  {
343  // Temporary variables, because the shell could already be
344  // destroyed after the paste.
345  SwView* pView = &rView;
346  rReq.Ignore();
347  bIgnore = true;
348  if(SwTransferable::PasteUnformatted( rSh, aDataHelper ))
349  {
350  SfxViewFrame* pViewFrame = pView->GetViewFrame();
351  uno::Reference< frame::XDispatchRecorder > xRecorder =
352  pViewFrame->GetBindings().GetRecorder();
353  if(xRecorder.is()) {
354  SfxRequest aReq( pViewFrame, SID_CLIPBOARD_FORMAT_ITEMS );
355  aReq.AppendItem( SfxUInt32Item( SID_CLIPBOARD_FORMAT_ITEMS, static_cast<sal_uInt32>(SotClipboardFormatId::STRING) ) );
356  aReq.Done();
357  }
358  }
359 
360  if (rSh.IsFrameSelected() || rSh.IsObjSelected())
361  rSh.EnterSelFrameMode();
362  pView->AttrChangedNotify( &rSh );
363  }
364  else
365  return;
366  }
367  break;
368 
369  case SID_PASTE_SPECIAL:
370  {
371  TransferableDataHelper aDataHelper(
373  if( aDataHelper.GetXTransferable().is()
374  && SwTransferable::IsPaste( rSh, aDataHelper )
375  && !rSh.CursorInsideInputField() )
376  {
377  // Temporary variables, because the shell could already be
378  // destroyed after the paste.
379  SwView* pView = &rView;
380  SotClipboardFormatId nFormatId = SotClipboardFormatId::NONE;
381  rReq.Ignore();
382  bIgnore = true;
383  if(SwTransferable::PasteSpecial( rSh, aDataHelper, nFormatId ))
384  {
385  SfxViewFrame* pViewFrame = pView->GetViewFrame();
386  uno::Reference< frame::XDispatchRecorder > xRecorder =
387  pViewFrame->GetBindings().GetRecorder();
388  if(xRecorder.is()) {
389  SfxRequest aReq( pViewFrame, SID_CLIPBOARD_FORMAT_ITEMS );
390  aReq.AppendItem( SfxUInt32Item( SID_CLIPBOARD_FORMAT_ITEMS, static_cast<sal_uInt32>(nFormatId) ) );
391  aReq.Done();
392  }
393  }
394 
395  if (rSh.IsFrameSelected() || rSh.IsObjSelected())
396  rSh.EnterSelFrameMode();
397  pView->AttrChangedNotify( &rSh );
398  }
399  else
400  return;
401  }
402  break;
403 
404  default:
405  OSL_FAIL("wrong Dispatcher");
406  return;
407  }
408  if(!bIgnore)
409  rReq.Done();
410 }
411 
412 // ClipBoard state
413 
415 {
416  SwWrtShell &rSh = GetShell();
417  SfxWhichIter aIter(rSet);
418 
419  const bool bCopy = rSh.HasSelection();
420 
421  sal_uInt16 nWhich = aIter.FirstWhich();
422 
423  while(nWhich)
424  {
425  switch(nWhich)
426  {
427  case SID_CUT:
429  {
430  rSet.DisableItem( nWhich );
431  break;
432  }
433  [[fallthrough]];
434  case SID_COPY:
435  if( !bCopy )
436  rSet.DisableItem( nWhich );
437  break;
438 
439  case SID_PASTE:
440  if( !GetView().IsPasteAllowed() )
441  {
442  rSet.DisableItem( nWhich );
443  }
444  break;
445 
446  case SID_PASTE_SPECIAL:
447  if( !GetView().IsPasteSpecialAllowed()
448  || rSh.CursorInsideInputField() )
449  {
450  rSet.DisableItem( nWhich );
451  }
452  break;
453 
454  case SID_PASTE_UNFORMATTED:
455  if( !GetView().IsPasteSpecialAllowed() )
456  {
457  rSet.DisableItem( nWhich );
458  }
459  break;
460 
461  case SID_CLIPBOARD_FORMAT_ITEMS:
462  {
463  TransferableDataHelper aDataHelper(
465  &rSh.GetView().GetEditWin()) );
466 
467  SvxClipboardFormatItem aFormatItem( nWhich );
468  SwTransferable::FillClipFormatItem( rSh, aDataHelper, aFormatItem );
469  rSet.Put( aFormatItem );
470  }
471  break;
472  }
473  nWhich = aIter.NextWhich();
474  }
475 }
476 
477 // Perform undo
478 
480 {
481  SwWrtShell &rWrtShell = GetShell();
482 
483  SwUndoId nUndoId(SwUndoId::EMPTY);
484  sal_uInt16 nId = rReq.GetSlot(), nCnt = 1;
485  const SfxItemSet* pArgs = rReq.GetArgs();
486  const SfxPoolItem* pItem;
487  if( pArgs && SfxItemState::SET == pArgs->GetItemState( nId, false, &pItem ))
488  nCnt = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
489 
490  // Repair mode: allow undo/redo of all undo actions, even if access would
491  // be limited based on the view shell ID.
492  bool bRepair = false;
493  if (pArgs && pArgs->GetItemState(SID_REPAIRPACKAGE, false, &pItem) == SfxItemState::SET)
494  bRepair = static_cast<const SfxBoolItem*>(pItem)->GetValue();
495 
496  // #i106349#: save pointer: undo/redo may delete the shell, i.e., this!
497  SfxViewFrame *const pViewFrame( GetView().GetViewFrame() );
498 
499  IDocumentUndoRedo& rUndoRedo = rWrtShell.GetIDocumentUndoRedo();
500  bool bWasRepair = rUndoRedo.DoesRepair();
501  rUndoRedo.DoRepair(bRepair);
502  comphelper::ScopeGuard aGuard([&rUndoRedo, bWasRepair]()
503  {
504  rUndoRedo.DoRepair(bWasRepair);
505  });
506 
507  switch( nId )
508  {
509  case SID_UNDO:
510  if (rUndoRedo.GetLastUndoInfo(nullptr, &nUndoId, &rWrtShell.GetView()))
511  {
512  for (SwViewShell& rShell : rWrtShell.GetRingContainer())
513  rShell.LockPaint();
514  rWrtShell.Do( SwWrtShell::UNDO, nCnt );
515  for (SwViewShell& rShell : rWrtShell.GetRingContainer())
516  rShell.UnlockPaint();
517  }
518  break;
519 
520  case SID_REDO:
521  if (rUndoRedo.GetFirstRedoInfo(nullptr, &nUndoId, &rWrtShell.GetView()))
522  {
523  for (SwViewShell& rShell : rWrtShell.GetRingContainer())
524  rShell.LockPaint();
525  rWrtShell.Do( SwWrtShell::REDO, nCnt );
526  for (SwViewShell& rShell : rWrtShell.GetRingContainer())
527  rShell.UnlockPaint();
528  }
529  break;
530 
531  case SID_REPEAT:
532  rWrtShell.Do( SwWrtShell::REPEAT );
533  break;
534  default:
535  OSL_FAIL("wrong Dispatcher");
536  }
537 
538  if (nUndoId == SwUndoId::CONFLICT)
539  {
540  rReq.SetReturnValue( SfxUInt32Item(nId, static_cast<sal_uInt32>(SID_REPAIRPACKAGE)) );
541  }
542 
543  if (pViewFrame) { pViewFrame->GetBindings().InvalidateAll(false); }
544 }
545 
546 // State of undo
547 
549 {
550  SwUndoId nUndoId(SwUndoId::EMPTY);
551  SwWrtShell &rSh = GetShell();
552  SfxWhichIter aIter(rSet);
553  sal_uInt16 nWhich = aIter.FirstWhich();
554  while(nWhich)
555  {
556  switch(nWhich)
557  {
558  case SID_UNDO:
559  {
560  if (rSh.GetLastUndoInfo(nullptr, &nUndoId, &rSh.GetView()))
561  {
562  rSet.Put( SfxStringItem(nWhich,
564  }
565  else if (nUndoId == SwUndoId::CONFLICT)
566  {
567  rSet.Put( SfxUInt32Item(nWhich, static_cast<sal_uInt32>(SID_REPAIRPACKAGE)) );
568  }
569  else
570  rSet.DisableItem(nWhich);
571 
572  break;
573  }
574  case SID_REDO:
575  {
576  if (rSh.GetFirstRedoInfo(nullptr, &nUndoId, &rSh.GetView()))
577  {
578  rSet.Put(SfxStringItem(nWhich,
580  }
581  else if (nUndoId == SwUndoId::CONFLICT)
582  {
583  rSet.Put( SfxInt32Item(nWhich, static_cast<sal_uInt32>(SID_REPAIRPACKAGE)) );
584  }
585  else
586  rSet.DisableItem(nWhich);
587  break;
588  }
589  case SID_REPEAT:
590  { // Repeat is only possible if no REDO is possible - UI-Restriction
591  if ((!rSh.GetFirstRedoInfo(nullptr, nullptr)) &&
592  !rSh.IsSelFrameMode() &&
593  (SwUndoId::EMPTY != rSh.GetRepeatInfo(nullptr)))
594  {
595  rSet.Put(SfxStringItem(nWhich, rSh.GetRepeatString()));
596  }
597  else
598  rSet.DisableItem(nWhich);
599  break;
600  }
601 
602  case SID_GETUNDOSTRINGS:
603  if (rSh.GetLastUndoInfo(nullptr, nullptr))
604  {
605  SfxStringListItem aStrLst( nWhich );
606  rSh.GetDoStrings( SwWrtShell::UNDO, aStrLst );
607  rSet.Put( aStrLst );
608  }
609  else
610  rSet.DisableItem( nWhich );
611  break;
612 
613  case SID_GETREDOSTRINGS:
614  if (rSh.GetFirstRedoInfo(nullptr, nullptr))
615  {
616  SfxStringListItem aStrLst( nWhich );
617  rSh.GetDoStrings( SwWrtShell::REDO, aStrLst );
618  rSet.Put( aStrLst );
619  }
620  else
621  rSet.DisableItem( nWhich );
622  break;
623  }
624  nWhich = aIter.NextWhich();
625  }
626 }
627 
628 // Evaluate respectively dispatching the slot Id
629 
631 {
632  const SfxPoolItem *pItem;
633  SwWrtShell &rSh = GetShell();
634  const SfxItemSet* pArgs = rReq.GetArgs();
635  bool bMore = false;
636 
637  sal_uInt16 nSlot = rReq.GetSlot();
638  switch(nSlot)
639  {
640  case FN_REPAGINATE:
641  {
642  Reference < XModel > xModel = GetView().GetDocShell()->GetModel();
643  Reference < XUnoTunnel > xDocTunnel ( xModel, UNO_QUERY );
644  SwXTextDocument *pDoc = reinterpret_cast < SwXTextDocument * > ( xDocTunnel->getSomething ( SwXTextDocument::getUnoTunnelId() ) );
645  pDoc->NotifyRefreshListeners();
646  rSh.CalcLayout();
647  }
648  break;
649  case FN_UPDATE_FIELDS:
650  {
651  rSh.UpdateDocStat();
652  rSh.EndAllTableBoxEdit();
653  rSh.SwViewShell::UpdateFields(true);
654 
655  if( rSh.IsCursorInTable() )
656  {
657  if( !rSh.IsTableComplexForChart() )
658  SwTableFUNC( &rSh ).UpdateChart();
659  rSh.ClearTableBoxContent();
660  rSh.SaveTableBoxContent();
661  }
662  }
663  break;
664  case FN_UPDATE_CHARTS:
665  {
666  SwWait aWait( *rView.GetDocShell(), true );
667  rSh.UpdateAllCharts();
668  }
669  break;
670 
671  case FN_UPDATE_ALL:
672  {
673  SwView& rTempView = GetView();
674  rSh.EnterStdMode();
675  if( !rSh.GetLinkManager().GetLinks().empty() )
676  {
677  rSh.StartAllAction();
678  rSh.GetLinkManager().UpdateAllLinks( false, true, nullptr );
679  rSh.EndAllAction();
680  }
681  SfxDispatcher &rDis = *rTempView.GetViewFrame()->GetDispatcher();
682  rDis.Execute( FN_UPDATE_FIELDS );
683  rDis.Execute( FN_UPDATE_TOX );
684  rDis.Execute( FN_UPDATE_CHARTS );
685  rSh.CalcLayout();
686  }
687  break;
688 
690  rSh.UpdateInputFields();
691  break;
692 
693  case FN_PREV_BOOKMARK:
694  rReq.SetReturnValue(SfxBoolItem( nSlot, rSh.GoPrevBookmark()));
695  break;
696  case FN_NEXT_BOOKMARK:
697  rReq.SetReturnValue(SfxBoolItem( nSlot, rSh.GoNextBookmark()));
698  break;
699 
700  case FN_GOTO_NEXT_MARK:
701  case FN_GOTO_PREV_MARK:
702  {
703  SwFieldMgr aFieldMgr;
704  SwFieldType* pFieldType = aFieldMgr.GetFieldType(SwFieldIds::JumpEdit);
705 
706  if (pFieldType)
707  {
708  if (rSh.IsSelFrameMode())
709  {
710  rSh.UnSelectFrame();
711  rSh.LeaveSelFrameMode();
712  }
713 
714  if (rSh.HasMark())
715  {
716  SwMvContext aMvContext(&rSh);
717  if (rSh.IsCursorPtAtEnd())
718  rSh.SwapPam();
719  rSh.ClearMark();
720  rSh.EndSelect();
721  }
722  bool bRet = rSh.MoveFieldType( pFieldType, nSlot == FN_GOTO_NEXT_MARK );
723  SwField* pCurField = bRet ? rSh.GetCurField() : nullptr;
724  if (pCurField)
725  rSh.ClickToField(*pCurField);
726  rReq.SetReturnValue(SfxBoolItem( nSlot, bRet));
727  }
728  }
729  break;
730 
731  case FN_START_DOC_DIRECT:
732  case FN_END_DOC_DIRECT:
733  {
734  if (rSh.IsSelFrameMode())
735  {
736  rSh.UnSelectFrame();
737  rSh.LeaveSelFrameMode();
738  }
739  rSh.EnterStdMode();
740  nSlot == FN_START_DOC_DIRECT ?
741  rSh.SttEndDoc(true) :
742  rSh.SttEndDoc(false);
743  }
744  break;
745  case FN_GOTO_PREV_OBJ:
746  case FN_GOTO_NEXT_OBJ:
747  {
748  bool bSuccess = rSh.GotoObj( nSlot == FN_GOTO_NEXT_OBJ );
749  rReq.SetReturnValue(SfxBoolItem(nSlot, bSuccess));
750  if (bSuccess && !rSh.IsSelFrameMode())
751  {
752  rSh.HideCursor();
753  rSh.EnterSelFrameMode();
754  GetView().AttrChangedNotify( &rSh );
755  }
756  }
757  break;
758  case SID_GALLERY_FORMATS:
759  {
760  const SvxGalleryItem* pGalleryItem = SfxItemSet::GetItem<SvxGalleryItem>(pArgs, SID_GALLERY_FORMATS, false);
761  if ( !pGalleryItem )
762  break;
763 
764  const SelectionType nSelType = rSh.GetSelectionType();
765  sal_Int8 nGalleryItemType( pGalleryItem->GetType() );
766 
767  if ( (!rSh.IsSelFrameMode() || nSelType & SelectionType::Graphic) &&
768  nGalleryItemType == css::gallery::GalleryItemType::GRAPHIC )
769  {
770  SwWait aWait( *rView.GetDocShell(), true );
771 
772  OUString aGrfName, aFltName;
773  const Graphic aGrf( pGalleryItem->GetGraphic() );
774 
775  if ( nSelType & SelectionType::Graphic )
776  rSh.ReRead( aGrfName, aFltName, &aGrf );
777  else
778  rSh.Insert( aGrfName, aFltName, aGrf );
779 
781  }
782  else if(!rSh.IsSelFrameMode() &&
783  nGalleryItemType == css::gallery::GalleryItemType::MEDIA )
784  {
785  const SfxStringItem aMediaURLItem( SID_INSERT_AVMEDIA, pGalleryItem->GetURL() );
787  SID_INSERT_AVMEDIA, SfxCallMode::SYNCHRON,
788  { &aMediaURLItem });
789  }
790  }
791  break;
793  {
794  if (pArgs)
795  {
796  // Determine the current PageDescriptor and fill the set with that.
797  const size_t nCurIdx = rSh.GetCurPageDesc();
798  SwPageDesc aPageDesc(rSh.GetPageDesc(nCurIdx));
799 
800  SwFrameFormat &rFormat = aPageDesc.GetMaster();
801 
802  SwFormatCol aFormatCol = rFormat.GetCol();
803 
804  sal_uInt16 nCount;
805  if(SfxItemState::SET == pArgs->GetItemState(nSlot))
806  nCount = static_cast<const SfxUInt16Item &>(pArgs->Get(nSlot)).GetValue();
807  else
808  nCount = pArgs->Get(SID_ATTR_COLUMNS).GetValue();
809  sal_uInt16 nGutterWidth = DEF_GUTTER_WIDTH;
810 
811  aFormatCol.Init(nCount ? nCount : 1, nGutterWidth, USHRT_MAX);
812  aFormatCol.SetWishWidth(USHRT_MAX);
813  aFormatCol.SetGutterWidth(nGutterWidth, USHRT_MAX);
814 
815  rFormat.SetFormatAttr(aFormatCol);
816 
817  rSh.ChgPageDesc(nCurIdx, aPageDesc);
818  }
819  else
821  }
822  break;
826  {
827  sal_Unicode cDelim = 0;
828  bool bToTable = false;
829  if( nSlot == FN_CONVERT_TEXT_TO_TABLE ||
830  ( nSlot == FN_CONVERT_TEXT_TABLE && nullptr == rSh.GetTableFormat() ))
831  bToTable = true;
832  SwInsertTableOptions aInsTableOpts( SwInsertTableFlags::All, 1 );
833  SwTableAutoFormat const* pTAFormat = nullptr;
834  std::unique_ptr<SwTableAutoFormatTable> pAutoFormatTable;
835  bool bDeleteFormat = true;
836  if(pArgs && SfxItemState::SET == pArgs->GetItemState( FN_PARAM_1, true, &pItem))
837  {
838  aInsTableOpts.mnInsMode = SwInsertTableFlags::NONE;
839  // Delimiter
840  OUString sDelim = static_cast< const SfxStringItem* >(pItem)->GetValue();
841  if(!sDelim.isEmpty())
842  cDelim = sDelim[0];
843  // AutoFormat
844  if(SfxItemState::SET == pArgs->GetItemState( FN_PARAM_2, true, &pItem))
845  {
846  OUString sAutoFormat = static_cast< const SfxStringItem* >(pItem)->GetValue();
847 
848  pAutoFormatTable.reset(new SwTableAutoFormatTable);
849  pAutoFormatTable->Load();
850 
851  for( sal_uInt16 i = 0, nCount = pAutoFormatTable->size(); i < nCount; i++ )
852  {
853  SwTableAutoFormat const*const pFormat = &(*pAutoFormatTable)[ i ];
854  if( pFormat->GetName() == sAutoFormat )
855  {
856  pTAFormat = pFormat;
857  bDeleteFormat = false;
858  break;
859  }
860  }
861  }
862  //WithHeader
863  if(SfxItemState::SET == pArgs->GetItemState( FN_PARAM_3, true, &pItem) &&
864  static_cast< const SfxBoolItem* >(pItem)->GetValue())
865  aInsTableOpts.mnInsMode |= SwInsertTableFlags::Headline;
866  // RepeatHeaderLines
867  if(SfxItemState::SET == pArgs->GetItemState( FN_PARAM_4, true, &pItem))
868  aInsTableOpts.mnRowsToRepeat =
869  static_cast<sal_uInt16>(static_cast< const SfxInt16Item* >(pItem)->GetValue());
870  //WithBorder
871  if(SfxItemState::SET == pArgs->GetItemState( FN_PARAM_5, true, &pItem) &&
872  static_cast< const SfxBoolItem* >(pItem)->GetValue())
874  //DontSplitTable
875  if(SfxItemState::SET == pArgs->GetItemState( FN_PARAM_6, true, &pItem) &&
876  !static_cast< const SfxBoolItem* >(pItem)->GetValue() )
878  }
879  else
880  {
883  if( RET_OK == pDlg->Execute() )
884  {
885  pDlg->GetValues( cDelim, aInsTableOpts, pTAFormat );
886 
887  }
888  }
889 
890  if( cDelim )
891  {
892  //Shell change!
893  SwView& rSaveView = rView;
894  bool bInserted = false;
895  //recording:
896  SfxViewFrame* pViewFrame = GetView().GetViewFrame();
897  if( SfxRequest::HasMacroRecorder(pViewFrame) )
898  {
899  SfxRequest aReq( pViewFrame, nSlot);
900  aReq.AppendItem( SfxStringItem( FN_PARAM_1, OUString(cDelim) ));
901  if(bToTable)
902  {
903  if(pTAFormat)
904  aReq.AppendItem( SfxStringItem( FN_PARAM_2, pTAFormat->GetName()));
905  aReq.AppendItem( SfxBoolItem ( FN_PARAM_3, bool(aInsTableOpts.mnInsMode & SwInsertTableFlags::Headline)));
906  aReq.AppendItem( SfxInt16Item( FN_PARAM_4, static_cast<short>(aInsTableOpts.mnRowsToRepeat) ));
907  aReq.AppendItem( SfxBoolItem ( FN_PARAM_5, bool(aInsTableOpts.mnInsMode & SwInsertTableFlags::DefaultBorder) ));
908  aReq.AppendItem( SfxBoolItem ( FN_PARAM_6, !(aInsTableOpts.mnInsMode & SwInsertTableFlags::SplitLayout)));
909  }
910  aReq.Done();
911  }
912 
913  if( !bToTable )
914  rSh.TableToText( cDelim );
915  else
916  {
917  bInserted = rSh.TextToTable( aInsTableOpts, cDelim, pTAFormat );
918  }
919  rSh.EnterStdMode();
920 
921  if( bInserted )
922  rSaveView.AutoCaption( TABLE_CAP );
923  }
924  if(bDeleteFormat)
925  delete pTAFormat;
926  }
927  break;
928  case SID_STYLE_WATERCAN:
929  case SID_STYLE_UPDATE_BY_EXAMPLE:
930  case SID_STYLE_NEW_BY_EXAMPLE:
931  case SID_STYLE_APPLY:
932  {
933  ShellMode eMode = GetView().GetShellMode();
934  if ( ShellMode::Draw != eMode &&
935  ShellMode::DrawForm != eMode &&
936  ShellMode::DrawText != eMode &&
937  ShellMode::Bezier != eMode )
938  {
939  // oj #107754#
940  if ( SID_STYLE_WATERCAN == nSlot )
941  {
942  const bool bLockedView = rSh.IsViewLocked();
943  rSh.LockView( true ); //lock visible section
944 
946 
947  rSh.LockView( bLockedView );
948  }
949  else
950  // Will be recorded from the DocShell
952  }
953  }
954  break;
955  case SID_CLASSIFICATION_APPLY:
956  {
957  GetView().GetDocShell()->Execute(rReq);
958  }
959  break;
960  case SID_CLASSIFICATION_DIALOG:
961  {
962  GetView().GetDocShell()->Execute(rReq);
963  }
964  break;
965  case SID_PARAGRAPH_SIGN_CLASSIFY_DLG:
966  {
967  GetView().GetDocShell()->Execute(rReq);
968  }
969  break;
970  case SID_WATERMARK:
971  {
972  GetView().GetDocShell()->Execute(rReq);
973  }
974  break;
975  case FN_ESCAPE:
976  GetView().ExecuteSlot(rReq);
977  break;
978  case SID_IMAP:
979  {
980  sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId();
981 
982  SfxViewFrame* pVFrame = GetView().GetViewFrame();
983  pVFrame->ToggleChildWindow( nId );
984  pVFrame->GetBindings().Invalidate( SID_IMAP );
985 
986  if ( pVFrame->HasChildWindow( nId ) && rSh.IsFrameSelected() )
987  lcl_UpdateIMapDlg( rSh );
988  }
989  break;
990  case SID_IMAP_EXEC:
991  {
992  SvxIMapDlg* pDlg = GetIMapDlg(GetView());
993 
994  // Check, if the allocation is useful or allowed at all.
995  if ( rSh.IsFrameSelected() &&
996  pDlg->GetEditingObject() == rSh.GetIMapInventor() )
997  {
999  rSh.GetFlyFrameAttr( aSet );
1000  SwFormatURL aURL( aSet.Get( RES_URL ) );
1001  aURL.SetMap( &pDlg->GetImageMap() );
1002  aSet.Put( aURL );
1003  rSh.SetFlyFrameAttr( aSet );
1004  }
1005  }
1006  break;
1007  case SID_CONTOUR_DLG:
1008  {
1009  sal_uInt16 nId = SvxContourDlgChildWindow::GetChildWindowId();
1010 
1011  SfxViewFrame* pVFrame = GetView().GetViewFrame();
1012  pVFrame->ToggleChildWindow( nId );
1013  pVFrame->GetBindings().Invalidate( SID_CONTOUR_DLG );
1014 
1015  SelectionType nSel = rSh.GetSelectionType();
1016  if ( pVFrame->HasChildWindow( nId ) &&
1018  {
1019  lcl_UpdateContourDlg( rSh, nSel );
1020  }
1021  }
1022  break;
1023  case SID_CONTOUR_EXEC:
1024  {
1025  SvxContourDlg *pDlg = GetContourDlg(GetView());
1026  // Check, if the allocation is useful or allowed at all.
1027  SelectionType nSel = rSh.GetSelectionType();
1029  {
1030  if (pDlg && pDlg->GetEditingObject() == rSh.GetIMapInventor())
1031  {
1032  rSh.StartAction();
1034  rSh.GetFlyFrameAttr( aSet );
1035  SwFormatSurround aSur( aSet.Get( RES_SURROUND ) );
1036  if ( !aSur.IsContour() )
1037  {
1038  aSur.SetContour( true );
1039  if ( aSur.GetSurround() == css::text::WrapTextMode_NONE )
1040  aSur.SetSurround( css::text::WrapTextMode_PARALLEL );
1041  aSet.Put( aSur );
1042  rSh.SetFlyFrameAttr( aSet );
1043  }
1044  const tools::PolyPolygon aPoly( pDlg->GetPolyPolygon() );
1045  rSh.SetGraphicPolygon( &aPoly );
1046  if ( pDlg->IsGraphicChanged() )
1047  rSh.ReRead( OUString(), OUString(), &pDlg->GetGraphic());
1048  rSh.EndAction();
1049  }
1050  }
1051  }
1052  break;
1053  case FN_FRAME_TO_ANCHOR:
1054  {
1055  rSh.GotoFlyAnchor();
1056  rSh.EnterStdMode();
1057  rSh.CallChgLnk();
1058  }
1059  break;
1060  case FN_TOOL_ANCHOR_PAGE:
1062  case FN_TOOL_ANCHOR_CHAR:
1064  case FN_TOOL_ANCHOR_FRAME:
1065  {
1066  RndStdIds eSet = nSlot == FN_TOOL_ANCHOR_PAGE
1067  ? RndStdIds::FLY_AT_PAGE
1068  : nSlot == FN_TOOL_ANCHOR_PARAGRAPH
1069  ? RndStdIds::FLY_AT_PARA
1070  : nSlot == FN_TOOL_ANCHOR_FRAME
1071  ? RndStdIds::FLY_AT_FLY
1072  : nSlot == FN_TOOL_ANCHOR_CHAR
1073  ? RndStdIds::FLY_AS_CHAR
1074  : RndStdIds::FLY_AT_CHAR;
1075  rSh.StartUndo();
1076  if (rSh.IsObjSelected())
1077  rSh.ChgAnchor(eSet);
1078  else if (rSh.IsFrameSelected())
1079  {
1080  SwFormatAnchor aAnc(eSet, rSh.GetPhyPageNum());
1082  rSh.SetFlyFrameAttr(aSet);
1083  }
1084  // if new anchor is 'as char' and it is a Math object and the usual
1085  // pre-conditions are met then align the formula to the baseline of the text
1086  const uno::Reference < embed::XEmbeddedObject > xObj( rSh.GetOleRef() );
1087  const bool bDoMathBaselineAlignment = xObj.is() && SotExchange::IsMath( xObj->getClassID() )
1088  && RndStdIds::FLY_AS_CHAR == eSet && rSh.GetDoc()->getIDocumentSettingAccess().get( DocumentSettingId::MATH_BASELINE_ALIGNMENT );
1089  if (bDoMathBaselineAlignment)
1090  rSh.AlignFormulaToBaseline( xObj );
1091 
1092  sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
1093  if( nHtmlMode )
1094  {
1096  rSh.GetFlyFrameAttr(aSet);
1097 
1098  const SwFormatSurround& rSurround = aSet.Get(RES_SURROUND);
1099  const SwFormatVertOrient& rVert = aSet.Get(RES_VERT_ORIENT);
1100  const SwFormatHoriOrient& rHori = aSet.Get(RES_HORI_ORIENT);
1101  sal_Int16 eVOrient = rVert.GetVertOrient();
1102  sal_Int16 eHOrient = rHori.GetHoriOrient();
1103  css::text::WrapTextMode eSurround = rSurround.GetSurround();
1104 
1105  switch( eSet )
1106  {
1107  case RndStdIds::FLY_AT_FLY:
1108  case RndStdIds::FLY_AT_PAGE:
1109  //Wrap through, left or from left, top, from top
1110  if(eSurround != css::text::WrapTextMode_THROUGH)
1111  aSet.Put(SwFormatSurround(css::text::WrapTextMode_THROUGH));
1112 
1113  if( eVOrient != text::VertOrientation::TOP && eVOrient != text::VertOrientation::NONE)
1115 
1116  if (eHOrient != text::HoriOrientation::NONE && eHOrient != text::HoriOrientation::LEFT)
1118  break;
1119 
1120  case RndStdIds::FLY_AT_PARA:
1121  // left, from left, right, top, no wrap, wrap left and right
1122  if (eSurround != css::text::WrapTextMode_LEFT && eSurround != css::text::WrapTextMode_RIGHT)
1123  aSet.Put(SwFormatSurround(css::text::WrapTextMode_LEFT));
1124 
1125  if( eVOrient != text::VertOrientation::TOP)
1127 
1128  if (eHOrient != text::HoriOrientation::NONE && eHOrient != text::HoriOrientation::LEFT && eHOrient != text::HoriOrientation::RIGHT)
1130  break;
1131 
1132  case RndStdIds::FLY_AT_CHAR:
1133  // left, from left, right, top, wrap through
1134  if(eSurround != css::text::WrapTextMode_THROUGH)
1135  aSet.Put(SwFormatSurround(css::text::WrapTextMode_THROUGH));
1136 
1137  if( eVOrient != text::VertOrientation::TOP)
1139 
1140  if (eHOrient != text::HoriOrientation::NONE && eHOrient != text::HoriOrientation::LEFT && eHOrient != text::HoriOrientation::RIGHT)
1142  break;
1143 
1144  default:
1145  ;
1146  }
1147 
1148  if( aSet.Count() )
1149  rSh.SetFlyFrameAttr( aSet );
1150  }
1151  rSh.EndUndo();
1152 
1153  GetView().GetViewFrame()->GetBindings().Invalidate( SID_ANCHOR_MENU );
1154  }
1155  break;
1156 
1157  case FN_FRAME_NOWRAP:
1158  case FN_FRAME_WRAP:
1159  case FN_FRAME_WRAP_IDEAL:
1160  case FN_FRAME_WRAPTHRU:
1163  case FN_FRAME_WRAP_CONTOUR:
1164  case FN_WRAP_ANCHOR_ONLY:
1165  case FN_FRAME_WRAP_LEFT:
1166  case FN_FRAME_WRAP_RIGHT:
1167  SetWrapMode( nSlot );
1168  break;
1169 
1170  case FN_UPDATE_ALL_LINKS:
1171  {
1172  if( !rSh.GetLinkManager().GetLinks().empty() )
1173  {
1174  rSh.EnterStdMode();
1175  rSh.StartAllAction();
1176  rSh.GetLinkManager().UpdateAllLinks( false, false, nullptr );
1177  rSh.EndAllAction();
1178  }
1179  }
1180  break;
1181 
1182  case FN_XFORMS_DESIGN_MODE:
1183  if (pArgs && pArgs->GetItemState(nSlot, true, &pItem) == SfxItemState::SET)
1184  {
1185  if (const SfxBoolItem* pBoolItem = dynamic_cast<const SfxBoolItem*>(pItem))
1186  {
1187  bool bDesignMode = pBoolItem->GetValue();
1188 
1189  // set form design mode
1190  OSL_ENSURE( GetView().GetFormShell() != nullptr, "form shell?" );
1191  SfxRequest aReq( GetView().GetViewFrame(), SID_FM_DESIGN_MODE );
1192  aReq.AppendItem( SfxBoolItem( SID_FM_DESIGN_MODE, bDesignMode ) );
1193  GetView().GetFormShell()->Execute( aReq );
1194  aReq.Done();
1195 
1196  // also set suitable view options
1197  SwViewOption aViewOption = *rSh.GetViewOptions();
1198  aViewOption.SetFormView( ! bDesignMode );
1199  rSh.ApplyViewOptions( aViewOption );
1200  }
1201  }
1202  break;
1203 
1204  default:
1205  bMore = true;
1206  }
1207  if(bMore && pArgs)
1208  {
1209  pItem = nullptr;
1210  pArgs->GetItemState(GetPool().GetWhich(nSlot), false, &pItem);
1211  if(pItem)
1212  switch(nSlot)
1213  {
1214  case SID_ATTR_BRUSH:
1215  case SID_ATTR_BORDER_SHADOW:
1216  case RES_SHADOW:
1217  {
1218  rSh.StartAllAction();
1219  // Tabele cell(s) selected?
1220  if ( rSh.IsTableMode() )
1221  {
1222  SwFrameFormat *pFormat = rSh.GetTableFormat();
1223  pFormat->SetFormatAttr( *pItem );
1224  }
1225  else if ( rSh.IsFrameSelected() )
1226  {
1227  // Set border attributes via Frame-Manager.
1228  SwFlyFrameAttrMgr aMgr( false, &rSh, Frmmgr_Type::NONE );
1229  aMgr.SetAttrSet( *pArgs );
1230  aMgr.UpdateFlyFrame();
1231  }
1232  else
1233  {
1234  rSh.SetAttrSet( *pArgs );
1235  }
1236  rSh.EndAllAction();
1237  }
1238  break;
1244  {
1245  OSL_FAIL("not implemented");
1246  }
1247  break;
1248 
1249  case SID_ATTR_BORDER_OUTER:
1250  {
1251  // Tabele cell(s) selected?
1252  if ( rSh.IsTableMode() )
1253  {
1254  // Set border attributes Get/SetTabBorders()
1255  rSh.SetTabBorders(*pArgs);
1256  }
1257  else if ( rSh.IsFrameSelected() )
1258  {
1259  // Set border attributes via Frame-Manager.
1260  SwFlyFrameAttrMgr aMgr( false, &rSh, Frmmgr_Type::NONE );
1261  aMgr.SetAttrSet(*pArgs);
1262  aMgr.UpdateFlyFrame();
1263  }
1264  else
1265  {
1266  // Set border attributes via shell quite normally.
1267  rSh.SetAttrItem( *pItem );
1268  }
1269  }
1270  break;
1271  default:
1272  OSL_FAIL("wrong Dispatcher");
1273  }
1274 
1275  }
1276 }
1277 
1278 // Here the state fpr SID_IMAP / SID_CONTOUR will be handled
1279 // until the swapping of the graphic is finished.
1280 
1281 IMPL_LINK_NOARG(SwBaseShell, GraphicArrivedHdl, SwCursorShell&, void)
1282 {
1283  SwWrtShell &rSh = GetShell();
1284  if (CNT_GRF != rSh.SwEditShell::GetCntType())
1285  return;
1286  GraphicType const nGrfType(rSh.GetGraphicType());
1287  if (GraphicType::NONE != nGrfType &&
1288  !aGrfUpdateSlots.empty() )
1289  {
1291  SfxViewFrame* pVFrame = GetView().GetViewFrame();
1292  for( const auto nSlot : aGrfUpdateSlots )
1293  {
1294  bool bSetState = false;
1295  bool bState = false;
1296  switch( nSlot )
1297  {
1298  case SID_IMAP:
1299  case SID_IMAP_EXEC:
1300  {
1301  sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId();
1302  SfxChildWindow *pChildWindow = pVFrame->HasChildWindow(nId) ?
1303  pVFrame->GetChildWindow(nId) : nullptr;
1304  SvxIMapDlg *pDlg = pChildWindow ?
1305  static_cast<SvxIMapDlg*>(pChildWindow->GetController().get()) : nullptr;
1306 
1307  if( pDlg && ( SID_IMAP_EXEC == nSlot ||
1308  ( SID_IMAP == nSlot && !bProtect)) &&
1309  pDlg->GetEditingObject() != rSh.GetIMapInventor())
1310  lcl_UpdateIMapDlg( rSh );
1311 
1312  if( !bProtect && SID_IMAP == nSlot )
1313  {
1314  bSetState = true;
1315  bState = nullptr != pDlg;
1316  }
1317  }
1318  break;
1319 
1320  case SID_CONTOUR_DLG:
1321  if( !bProtect )
1322  {
1323  sal_uInt16 nId = SvxContourDlgChildWindow::GetChildWindowId();
1324  SfxChildWindow *pChildWindow = pVFrame->HasChildWindow(nId) ?
1325  pVFrame->GetChildWindow(nId) : nullptr;
1326  SvxIMapDlg *pDlg = pChildWindow ?
1327  static_cast<SvxIMapDlg*>(pChildWindow->GetController().get()) : nullptr;
1328  if( pDlg && pDlg->GetEditingObject() !=
1329  rSh.GetIMapInventor() )
1331 
1332  bSetState = true;
1333  bState = nullptr != pDlg;
1334  }
1335  break;
1336 
1337  case FN_FRAME_WRAP_CONTOUR:
1338  if( !bProtect )
1339  {
1341  rSh.GetFlyFrameAttr(aSet);
1342  const SwFormatSurround& rWrap = aSet.Get(RES_SURROUND);
1343  bSetState = true;
1344  bState = rWrap.IsContour();
1345  }
1346  break;
1347 
1348  case SID_GRFFILTER:
1349  case SID_GRFFILTER_INVERT:
1350  case SID_GRFFILTER_SMOOTH:
1351  case SID_GRFFILTER_SHARPEN:
1352  case SID_GRFFILTER_REMOVENOISE:
1353  case SID_GRFFILTER_SOBEL:
1354  case SID_GRFFILTER_MOSAIC:
1355  case SID_GRFFILTER_EMBOSS:
1356  case SID_GRFFILTER_POSTER:
1357  case SID_GRFFILTER_POPART:
1358  case SID_GRFFILTER_SEPIA:
1359  case SID_GRFFILTER_SOLARIZE:
1360  bSetState = bState = GraphicType::Bitmap == nGrfType;
1361  break;
1362  }
1363 
1364  if( bSetState )
1365  {
1366  SfxBoolItem aBool( nSlot, bState );
1367  if( pGetStateSet )
1368  pGetStateSet->Put( aBool );
1369  else
1370  pVFrame->GetBindings().SetState( aBool );
1371  }
1372  }
1373  aGrfUpdateSlots.clear();
1374  }
1375 }
1376 
1378 {
1379  SwWrtShell &rSh = GetShell();
1380  SfxViewFrame* pVFrame = GetView().GetViewFrame();
1381  SfxWhichIter aIter( rSet );
1382  sal_uInt16 nWhich = aIter.FirstWhich();
1383  pGetStateSet = &rSet;
1384  while ( nWhich )
1385  {
1386  switch ( nWhich )
1387  {
1388  case SID_GALLERY_FORMATS:
1389  if ( rSh.IsObjSelected() ||
1390  (rSh.IsSelFrameMode() &&
1392  rSet.DisableItem( nWhich );
1393  break;
1394  case SID_GALLERY_ENABLE_ADDCOPY:
1395  // #108230# allow copy from gallery in Writer AND Writer/Web!
1396  rSet.Put( SfxBoolItem( SID_GALLERY_ENABLE_ADDCOPY, true ) );
1397  break;
1398  case FN_EDIT_REGION:
1399  if( !rSh.IsAnySectionInDoc() )
1400  rSet.DisableItem(nWhich);
1401  break;
1402 
1404  //tdf#112808 if cursor is in an index, don't show the edit section.
1405  if( !rSh.GetCurrSection() ||
1406  (rSh.GetCurrSection()->GetType() != CONTENT_SECTION &&
1408  {
1409  rSet.DisableItem(nWhich);
1410  }
1411  break;
1412 
1413  case FN_INSERT_REGION:
1414  if( rSh.CursorInsideInputField()
1415  || rSh.IsSelFrameMode()
1416  || !rSh.IsInsRegionAvailable() )
1417  {
1418  rSet.DisableItem( nWhich );
1419  }
1420  break;
1421 
1423  {
1424  FrameTypeFlags eFrameType = rSh.GetFrameType(nullptr,true);
1425  if( (eFrameType & FrameTypeFlags::FOOTNOTE) ||
1426  !rSh.GetTableFormat() )
1427  rSet.DisableItem( nWhich );
1428  }
1429  break;
1431  {
1432  FrameTypeFlags eFrameType = rSh.GetFrameType(nullptr,true);
1433  if( (eFrameType & FrameTypeFlags::FOOTNOTE) ||
1434  !rSh.IsTextToTableAvailable() )
1435  rSet.DisableItem( nWhich );
1436  }
1437  break;
1438  case FN_CONVERT_TEXT_TABLE:
1439  {
1440  FrameTypeFlags eFrameType = rSh.GetFrameType(nullptr,true);
1441  if( (eFrameType & FrameTypeFlags::FOOTNOTE) ||
1442  (!rSh.GetTableFormat() && !rSh.IsTextToTableAvailable() ) )
1443  rSet.DisableItem( nWhich );
1444  }
1445  break;
1446  case RES_SHADOW:
1447  {
1448  SfxItemSet aSet( rSh.GetAttrPool(),
1450 
1451  // Table cell(s) selected?
1452  if ( rSh.IsTableMode() )
1453  {
1454  SwFrameFormat *pFormat = rSh.GetTableFormat();
1455  aSet.Put(pFormat->GetFormatAttr( nWhich ));
1456  }
1457  else if( rSh.IsFrameSelected() )
1458  {
1459  SwFlyFrameAttrMgr aMgr( false, &rSh, Frmmgr_Type::NONE );
1460  aSet.Put( aMgr.GetAttrSet() );
1461  }
1462  else
1463  rSh.GetCurAttr( aSet );
1464 
1465  const SvxShadowItem& rShItem = static_cast<const SvxShadowItem&>(aSet.Get(nWhich));
1466  rSet.Put(rShItem);
1467  }
1468  break;
1469  case SID_IMAP:
1470  {
1471  // #i59688#
1472  // Improve efficiency:
1473  // If selected object is protected, item has to disabled.
1475  if ( bProtect )
1476  {
1477  rSet.DisableItem( nWhich );
1478  }
1479  else
1480  {
1481  const sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId();
1482  const bool bHas = pVFrame->HasChildWindow( nId );
1483  const bool bFrameSel = rSh.IsFrameSelected();
1484  const bool bIsGraphicSelection =
1486 
1487  // #i59688#
1488  // Avoid unnecessary loading of selected graphic.
1489  // The graphic is only needed, if the dialog is open.
1490  // If the swapping of the graphic is finished, the status
1491  // must be determined asynchronously, until this the slot
1492  // will be disabled.
1493  if ( bHas && bIsGraphicSelection && rSh.IsLinkedGrfSwapOut() )
1494  {
1495  if( AddGrfUpdateSlot( nWhich ))
1496  rSh.GetGraphic(false); // start the loading
1497  }
1498  else
1499  {
1500  if ( !bHas &&
1501  ( !bFrameSel ||
1502  ( bIsGraphicSelection &&
1503  rSh.GetGraphicType() == GraphicType::NONE ) ) )
1504  {
1505  rSet.DisableItem( nWhich );
1506  }
1507  else
1508  {
1509  SfxBoolItem aBool(nWhich, bHas);
1510  if ( bHas && bFrameSel )
1511  lcl_UpdateIMapDlg( rSh );
1512  rSet.Put(aBool);
1513  }
1514  }
1515  }
1516  }
1517  break;
1518  case SID_IMAP_EXEC:
1519  {
1520  bool bDisable = false;
1521  if( !rSh.IsFrameSelected())
1522  bDisable = true;
1523  sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId();
1524  if(!bDisable && pVFrame->HasChildWindow( nId ))
1525  {
1527  && rSh.IsLinkedGrfSwapOut())
1528  {
1529  if( AddGrfUpdateSlot( nWhich ))
1530  rSh.GetGraphic(false); // start the loading
1531  }
1532  else
1533  {
1534  SvxIMapDlg *pDlg = GetIMapDlg(GetView());
1535  if (pDlg && pDlg->GetEditingObject() != rSh.GetIMapInventor())
1536  lcl_UpdateIMapDlg( rSh );
1537  }
1538  }
1539  rSet.Put(SfxBoolItem(nWhich, bDisable));
1540  }
1541  break;
1542 
1543  case FN_BACKSPACE:
1544  case SID_DELETE:
1545  if ( ( rSh.HasReadonlySel() && !rSh.CursorInsideInputField() )
1547  {
1548  rSet.DisableItem( nWhich );
1549  }
1550  break;
1551 
1552  case SID_CONTOUR_DLG:
1553  {
1555 
1556  if( bParentCntProt || 0 != (HTMLMODE_ON & ::GetHtmlMode(
1557  GetView().GetDocShell() )) )
1558  rSet.DisableItem( nWhich );
1559  else
1560  {
1561  sal_uInt16 nId = SvxContourDlgChildWindow::GetChildWindowId();
1562  bool bHas = GetView().GetViewFrame()->HasChildWindow( nId );
1563  SelectionType nSel = rSh.GetSelectionType();
1564  bool bOk(nSel & (SelectionType::Graphic|SelectionType::Ole));
1565 
1566  bool bDisable = false;
1567  if( !bHas && !bOk )
1568  bDisable = true;
1569  // #i59688#
1570  // Avoid unnecessary loading of selected graphic.
1571  // The graphic is only needed, if the dialog is open.
1572  // If the swapping of the graphic is finished, the status
1573  // must be determined asynchronously, until this the slot
1574  // will be disabled.
1575  else if ( bHas && (nSel & SelectionType::Graphic) &&
1576  rSh.IsLinkedGrfSwapOut() )
1577  {
1578  if( AddGrfUpdateSlot( nWhich ))
1579  rSh.GetGraphic(false); // start the loading
1580  // #i75481#
1581  bDisable = true;
1582  }
1583  else if( bHas && bOk )
1584  bDisable = !lcl_UpdateContourDlg( rSh, nSel );
1585  else if( bOk )
1586  {
1587  // #i75481#
1588  // apply fix #i59688# only for selected graphics
1589  if ( nSel & SelectionType::Graphic )
1590  bDisable = GraphicType::NONE == rSh.GetGraphicType();
1591  else
1592  bDisable = GraphicType::NONE == rSh.GetIMapGraphic().GetType();
1593  }
1594 
1595  if( bDisable )
1596  rSet.DisableItem( nWhich );
1597  else
1598  rSet.Put( SfxBoolItem(nWhich, bHas) );
1599  }
1600  }
1601  break;
1602  case SID_CONTOUR_EXEC:
1603  {
1604  bool bDisable = false;
1605  SelectionType nSel = rSh.GetSelectionType();
1606  if( !(nSel & (SelectionType::Graphic|SelectionType::Ole)) )
1607  bDisable = true;
1608  sal_uInt16 nId = SvxContourDlgChildWindow::GetChildWindowId();
1609  if( !bDisable && GetView().GetViewFrame()->HasChildWindow( nId ))
1610  {
1611  SvxContourDlg *pDlg = GetContourDlg(GetView());
1612  if (pDlg && pDlg->GetEditingObject() != rSh.GetIMapInventor())
1613  bDisable = true;
1614  }
1615  rSet.Put(SfxBoolItem(nWhich, bDisable));
1616  }
1617  break;
1618 
1619  case SID_ANCHOR_MENU:
1620  case FN_TOOL_ANCHOR_PAGE:
1622  case FN_TOOL_ANCHOR_CHAR:
1624  case FN_TOOL_ANCHOR_FRAME:
1625  {
1626  bool bObj = 0 != rSh.IsObjSelected();
1628 
1629  if( !bParentCntProt && (bObj || rSh.IsFrameSelected()))
1630  {
1632  if(bObj)
1633  rSh.GetObjAttr(aSet);
1634  else
1635  rSh.GetFlyFrameAttr(aSet);
1636  RndStdIds eSet = aSet.Get(RES_ANCHOR).GetAnchorId();
1637  const bool bSet =
1638  ((nWhich == FN_TOOL_ANCHOR_PAGE) &&
1639  (eSet == RndStdIds::FLY_AT_PAGE))
1640  || ((nWhich == FN_TOOL_ANCHOR_PARAGRAPH) &&
1641  (eSet == RndStdIds::FLY_AT_PARA))
1642  || ((nWhich == FN_TOOL_ANCHOR_FRAME) &&
1643  (eSet == RndStdIds::FLY_AT_FLY))
1644  || ((nWhich == FN_TOOL_ANCHOR_AT_CHAR) &&
1645  (eSet == RndStdIds::FLY_AT_CHAR))
1646  || ((nWhich == FN_TOOL_ANCHOR_CHAR) &&
1647  (eSet == RndStdIds::FLY_AS_CHAR));
1648 
1649  if( nWhich == FN_TOOL_ANCHOR_FRAME && !rSh.IsFlyInFly() )
1650  rSet.DisableItem(nWhich);
1651  else if(nWhich != SID_ANCHOR_MENU)
1652  rSet.Put(SfxBoolItem(nWhich, bSet));
1653  }
1654  else
1655  rSet.DisableItem( nWhich );
1656  }
1657  break;
1658  case FN_FRAME_NOWRAP:
1659  case FN_FRAME_WRAP:
1660  case FN_FRAME_WRAP_IDEAL:
1661  case FN_FRAME_WRAPTHRU:
1664  case FN_FRAME_WRAP_CONTOUR:
1665  case FN_WRAP_ANCHOR_ONLY:
1666  case FN_FRAME_WRAP_LEFT:
1667  case FN_FRAME_WRAP_RIGHT:
1668  {
1669  bool bObj = 0 != rSh.IsObjSelected();
1671 
1672  if( !bParentCntProt && (bObj || rSh.IsFrameSelected()))
1673  {
1675  RndStdIds nAnchorType;
1676  if(bObj)
1677  {
1678  rSh.GetObjAttr(aSet);
1679  nAnchorType = rSh.GetAnchorId();
1680  }
1681  else
1682  {
1683  rSh.GetFlyFrameAttr(aSet);
1684  nAnchorType = aSet.Get(RES_ANCHOR).GetAnchorId();
1685  }
1686  const SwFormatSurround& rWrap = aSet.Get(RES_SURROUND);
1687 
1688  const SvxOpaqueItem& rOpaque = aSet.Get(RES_OPAQUE);
1689  bool bOpaque = rOpaque.GetValue();
1690  css::text::WrapTextMode nSurround = rWrap.GetSurround();
1691  bool bSet = false;
1692 
1693  bool bDisable =
1694  (nAnchorType == RndStdIds::UNKNOWN) || (nAnchorType == RndStdIds::FLY_AS_CHAR);
1695  const bool bHtmlMode =
1696  0 != ::GetHtmlMode(GetView().GetDocShell());
1697 
1698  switch( nWhich )
1699  {
1700  case FN_FRAME_NOWRAP:
1701  bDisable |=
1702  ( (nAnchorType != RndStdIds::FLY_AT_PARA)
1703  && (nAnchorType != RndStdIds::FLY_AT_CHAR)
1704  && (nAnchorType != RndStdIds::FLY_AT_PAGE));
1705  bSet = nSurround == css::text::WrapTextMode_NONE;
1706  break;
1707  case FN_FRAME_WRAP:
1708  bDisable |= bHtmlMode;
1709  bSet = nSurround == css::text::WrapTextMode_PARALLEL;
1710  break;
1711  case FN_FRAME_WRAP_IDEAL:
1712  bDisable |= bHtmlMode;
1713  bSet = nSurround == css::text::WrapTextMode_DYNAMIC;
1714  break;
1715  case FN_FRAME_WRAPTHRU:
1716  bDisable |= (bHtmlMode ||
1717  ( (nAnchorType != RndStdIds::FLY_AT_PARA)
1718  && (nAnchorType != RndStdIds::FLY_AT_CHAR)
1719  && (nAnchorType != RndStdIds::FLY_AT_PAGE)));
1720  if(bObj)
1721  bSet = nSurround == css::text::WrapTextMode_THROUGH && rSh.GetLayerId();
1722  else
1723  bSet = nSurround == css::text::WrapTextMode_THROUGH && bOpaque;
1724  break;
1727  bDisable |= bHtmlMode;
1728  if(bObj)
1729  bSet = nSurround == css::text::WrapTextMode_THROUGH && !rSh.GetLayerId();
1730  else
1731  bSet = nSurround == css::text::WrapTextMode_THROUGH && !bOpaque;
1732  break;
1733  case FN_FRAME_WRAP_CONTOUR:
1734  bDisable |= bHtmlMode;
1735  //no contour available whenn no wrap or wrap through is set
1736  bDisable |= (nSurround == css::text::WrapTextMode_NONE || nSurround == css::text::WrapTextMode_THROUGH);
1737  if( !bDisable )
1738  {
1739  SelectionType nSel = rSh.GetSelectionType();
1740  if( (nSel & SelectionType::Graphic) &&
1741  rSh.IsLinkedGrfSwapOut())
1742  {
1743  if( AddGrfUpdateSlot( nWhich ))
1744  rSh.GetGraphic(false); // start the loading
1745  }
1746  else if( rSh.IsFrameSelected() )
1747  {
1748  // #i102253# applied patch from OD (see task)
1749  bDisable =
1750  nSel & SelectionType::Frame ||
1751  GraphicType::NONE == rSh.GetIMapGraphic().GetType();
1752  }
1753  }
1754  bSet = !bDisable && rWrap.IsContour();
1755 
1756  break;
1757  case FN_WRAP_ANCHOR_ONLY:
1758  bDisable |= (bHtmlMode ||
1759  (nAnchorType != RndStdIds::FLY_AT_PARA));
1760  bSet = rWrap.IsAnchorOnly();
1761  break;
1762  case FN_FRAME_WRAP_LEFT:
1763  bSet = nSurround == css::text::WrapTextMode_LEFT;
1764  break;
1765  case FN_FRAME_WRAP_RIGHT:
1766  bSet = nSurround == css::text::WrapTextMode_RIGHT;
1767  break;
1768  }
1769 
1770  if(bDisable)
1771  rSet.DisableItem(nWhich);
1772  else
1773  rSet.Put(SfxBoolItem(nWhich, bSet));
1774  }
1775  else
1776  rSet.DisableItem(nWhich);
1777  }
1778  break;
1779  case FN_UPDATE_CHARTS:
1780  if( !rSh.HasCharts() )
1781  rSet.DisableItem( nWhich );
1782  break;
1783  case FN_UPDATE_ALL_LINKS:
1784  if ( rSh.GetLinkManager().GetLinks().empty() )
1785  rSet.DisableItem(nWhich);
1786  break;
1787  case FN_XFORMS_DESIGN_MODE:
1788  // enable if in XForms document
1789  if( rSh.GetDoc()->isXForms() )
1790  {
1791  // determine current state from view options
1792  bool bValue = ! rSh.GetViewOptions()->IsFormView();
1793  rSet.Put( SfxBoolItem( nWhich, bValue ) );
1794  }
1795  else
1796  rSet.Put( SfxVisibilityItem( nWhich, false ) );
1797  break;
1798  }
1799  nWhich = aIter.NextWhich();
1800  }
1801  pGetStateSet = nullptr;
1802 }
1803 
1804 // Disable the slots with this status method
1805 
1807 {
1808  SfxWhichIter aIter(rSet);
1809  sal_uInt16 nWhich = aIter.FirstWhich();
1810 
1811  while (nWhich)
1812  {
1813  rSet.DisableItem( nWhich );
1814  nWhich = aIter.NextWhich();
1815  }
1816 }
1817 
1818 // Disable the slots with this status method
1819 
1821 {
1823  ShellMode eMode = GetView().GetShellMode();
1824 
1825  if ( bParentCntProt ||
1826  ShellMode::Draw == eMode ||
1827  ShellMode::DrawForm == eMode ||
1828  ShellMode::DrawText == eMode ||
1829  ShellMode::Bezier == eMode )
1830  {
1831  SfxWhichIter aIter( rSet );
1832  sal_uInt16 nWhich = aIter.FirstWhich();
1833  while ( nWhich )
1834  {
1835  rSet.DisableItem( nWhich );
1836  nWhich = aIter.NextWhich();
1837  }
1838  }
1839  else
1841 }
1842 
1843 void SwBaseShell::SetWrapMode( sal_uInt16 nSlot )
1844 {
1845  SwWrtShell &rSh = GetShell();
1846  bool bObj = 0 != rSh.IsObjSelected();
1847  if( !bObj && !rSh.IsFrameSelected())
1848  return;
1849 
1851  if(bObj)
1852  rSh.GetObjAttr(aSet);
1853  else
1854  rSh.GetFlyFrameAttr(aSet);
1855  SwFormatSurround aWrap( aSet.Get(RES_SURROUND) );
1856  css::text::WrapTextMode nOldSurround(aWrap.GetSurround());
1857  css::text::WrapTextMode nSurround = css::text::WrapTextMode_PARALLEL;
1858 
1859  switch (nSlot)
1860  {
1861  case FN_FRAME_NOWRAP:
1862  nSurround = css::text::WrapTextMode_NONE;
1863  if (aWrap.IsContour())
1864  aWrap.SetContour(false);
1865  break;
1866  case FN_FRAME_WRAP_IDEAL:
1867  nSurround = css::text::WrapTextMode_DYNAMIC;
1868  break;
1869  case FN_WRAP_ANCHOR_ONLY:
1870  aWrap.SetAnchorOnly(!aWrap.IsAnchorOnly());
1871 
1872  // keep previous wrapping
1873 
1874  // switch to wrap css::text::WrapTextMode_PARALLEL, if previous wrap is css::text::WrapTextMode_NONE
1875  if ( nOldSurround != css::text::WrapTextMode_NONE )
1876  {
1877  nSurround = nOldSurround;
1878  }
1879  break;
1880  case FN_FRAME_WRAP_CONTOUR:
1881  aWrap.SetContour(!aWrap.IsContour());
1882  break;
1885  if (aWrap.IsContour())
1886  aWrap.SetContour(false);
1887  [[fallthrough]];
1888  case FN_FRAME_WRAPTHRU:
1889  nSurround = css::text::WrapTextMode_THROUGH;
1890  break;
1891 
1892  case FN_FRAME_WRAP_LEFT:
1893  nSurround = css::text::WrapTextMode_LEFT;
1894  break;
1895 
1896  case FN_FRAME_WRAP_RIGHT:
1897  nSurround = css::text::WrapTextMode_RIGHT;
1898  break;
1899 
1900  default:
1901  break;
1902  }
1903  aWrap.SetSurround(nSurround);
1904 
1905  if (nSlot != FN_FRAME_WRAP_CONTOUR)
1906  {
1907  // Defaulting the contour wrap on draw objects.
1908  if (bObj && nOldSurround != nSurround &&
1909  (nOldSurround == css::text::WrapTextMode_NONE || nOldSurround == css::text::WrapTextMode_THROUGH))
1910  {
1911  aWrap.SetContour(true);
1912  }
1913  }
1914 
1915  aSet.Put( aWrap );
1916 
1917  bool bOpaque = nSlot != FN_FRAME_WRAPTHRU_TRANSP && nSlot != FN_FRAME_WRAPTHRU_TOGGLE;
1918  if( nSlot == FN_FRAME_WRAPTHRU_TOGGLE )
1919  {
1920  if( bObj )
1921  bOpaque = !rSh.GetLayerId();
1922  else
1923  {
1924  const SvxOpaqueItem& aOpaque( aSet.Get(RES_OPAQUE) );
1925  bOpaque = !aOpaque.GetValue();
1926  }
1927  }
1928  aSet.Put(SvxOpaqueItem(RES_OPAQUE, bOpaque ));
1929 
1930  if(bObj)
1931  {
1932  rSh.SetObjAttr(aSet);
1933  if ( bOpaque )
1934  rSh.SelectionToHeaven();
1935  else
1936  rSh.SelectionToHell();
1937  }
1938  else
1939  rSh.SetFlyFrameAttr(aSet);
1940 
1941 }
1942 
1943 //Force update of the status line
1944 
1946 {
1947  eFrameMode = eMode;
1948  SfxBindings &rBnd = pSh->GetView().GetViewFrame()->GetBindings();
1949 
1950  if( eMode == FLY_DRAG || pSh->IsFrameSelected() || pSh->IsObjSelected() )
1951  {
1952  const SfxPointItem aTmp1( SID_ATTR_POSITION, pSh->GetAnchorObjDiff());
1953  const SvxSizeItem aTmp2( SID_ATTR_SIZE, pSh->GetObjSize());
1954  rBnd.SetState( aTmp1 );
1955  rBnd.SetState( aTmp2 );
1956  }
1957  else if( eMode == FLY_DRAG_END )
1958  {
1959  static sal_uInt16 aInval[] =
1960  {
1961  SID_ATTR_POSITION, SID_ATTR_SIZE, 0
1962  };
1963  rBnd.Invalidate(aInval);
1964  }
1965 }
1966 
1968  SfxShell( &rVw ),
1969  rView(rVw),
1970  pGetStateSet(nullptr)
1971 {
1972  SwWrtShell& rWrtSh = rView.GetWrtShell();
1973 
1974  SetPool(&rWrtSh.GetAttrPool());
1975  SetName("Base");
1976  rWrtSh.SetGrfArrivedLnk( LINK( this, SwBaseShell, GraphicArrivedHdl));
1977 }
1978 
1980 {
1981  if( rView.GetCurShell() == this )
1982  rView.ResetSubShell();
1983 
1984  Link<SwCursorShell&,void> aTmp( LINK( this, SwBaseShell, GraphicArrivedHdl));
1985  if( aTmp == rView.GetWrtShell().GetGrfArrivedLnk() )
1987 }
1988 
1990 {
1991  const SfxItemSet *pArgs = rReq.GetArgs();
1992 
1993  if( pArgs)
1994  {
1995  SwWrtShell &rSh = GetShell();
1996  std::unique_ptr<SvxScriptSetItem> pSSetItem;
1997  sal_uInt16 nSlot = rReq.GetSlot();
1998  SfxItemPool& rPool = rSh.GetAttrPool();
1999  sal_uInt16 nWhich = rPool.GetWhich( nSlot );
2000  SvtScriptType nScripts = SvtScriptType::LATIN | SvtScriptType::ASIAN | SvtScriptType::COMPLEX;
2004 
2005  switch( nSlot )
2006  {
2007  case SID_ATTR_CHAR_FONT:
2008  {
2009  nScripts = rSh.GetScriptType();
2010  // #i42732# input language should be preferred over
2011  // current cursor position to detect script type
2012  if(!rSh.HasSelection())
2013  {
2014  LanguageType nInputLang = GetView().GetEditWin().GetInputLanguage();
2015  if(nInputLang != LANGUAGE_DONTKNOW && nInputLang != LANGUAGE_SYSTEM)
2016  nScripts = SvtLanguageOptions::GetScriptTypeOfLanguage( nInputLang );
2017  }
2018  [[fallthrough]];
2019  }
2020  case SID_ATTR_CHAR_POSTURE:
2021  case SID_ATTR_CHAR_WEIGHT:
2022  {
2023  pSSetItem.reset(new SvxScriptSetItem( nSlot, rPool ));
2024  pSSetItem->PutItemForScriptType( nScripts, pArgs->Get( nWhich ));
2025  pArgs = &pSSetItem->GetItemSet();
2026  }
2027  break;
2028  case SID_ATTR_CHAR_FONTHEIGHT:
2029  {
2030  if(rSh.HasSelection())
2031  {
2032  pSSetItem.reset(new SvxScriptSetItem( nSlot, rPool ));
2033  pSSetItem->PutItemForScriptType( nScripts, pArgs->Get( nWhich ));
2034  pArgs = &pSSetItem->GetItemSet();
2035  }
2036  else
2037  {
2038  nScripts = rSh.GetScriptType();
2039  LanguageType nInputLang = GetView().GetEditWin().GetInputLanguage();
2040  if(nInputLang != LANGUAGE_DONTKNOW && nInputLang != LANGUAGE_SYSTEM)
2041  nScripts = SvtLanguageOptions::GetScriptTypeOfLanguage( nInputLang );
2042  sal_uInt32 nHeight = static_cast< const SvxFontHeightItem& >(pArgs->Get( nWhich )).GetHeight();
2043  SwStdFontConfig* pStdFont = SW_MOD()->GetStdFontConfig();
2044 
2048  rSh.GetCurAttr( aLangSet );
2049 
2050  sal_Int32 nWesternSize =
2052  aLangSet.Get( RES_CHRATR_LANGUAGE).GetLanguage());
2053  sal_Int32 nCJKSize =
2055  aLangSet.Get( RES_CHRATR_CJK_LANGUAGE).GetLanguage());
2056  sal_Int32 nCTLSize =
2058  aLangSet.Get( RES_CHRATR_CTL_LANGUAGE).GetLanguage());
2059 
2060  switch(nScripts)
2061  {
2062  case SvtScriptType::LATIN:
2063  nCJKSize = nHeight * nCJKSize / nWesternSize;
2064  nCTLSize = nHeight * nCTLSize / nWesternSize;
2065  nWesternSize = static_cast<sal_Int32>(nHeight);
2066  break;
2067  case SvtScriptType::ASIAN:
2068  nCTLSize = nHeight* nCTLSize / nCJKSize;
2069  nWesternSize = nHeight * nWesternSize / nCJKSize;
2070  nCJKSize = static_cast<sal_Int32>(nHeight);
2071  break;
2072  case SvtScriptType::COMPLEX:
2073  nCJKSize = nHeight * nCJKSize / nCTLSize;
2074  nWesternSize = nHeight * nWesternSize / nCTLSize;
2075  nCTLSize = static_cast<sal_Int32>(nHeight);
2076  break;
2077  default: break;
2078  }
2079  aHeightSet.Put( SvxFontHeightItem( static_cast<sal_uInt32>(nWesternSize), 100, RES_CHRATR_FONTSIZE ));
2080  aHeightSet.Put( SvxFontHeightItem( static_cast<sal_uInt32>(nCJKSize), 100, RES_CHRATR_CJK_FONTSIZE ));
2081  aHeightSet.Put( SvxFontHeightItem( static_cast<sal_uInt32>(nCTLSize), 100, RES_CHRATR_CTL_FONTSIZE ));
2082  pArgs = &aHeightSet;
2083  }
2084  }
2085  break;
2086  }
2087 
2088  if( pArgs )
2089  {
2090  bool bAuto = false;
2091  if ( !isCHRATR(nWhich) ||
2092  ( rSh.HasSelection() && rSh.IsSelFullPara() ) )
2093  {
2094  SwTextFormatColl * pColl = rSh.GetCurTextFormatColl();
2095  if ( pColl && pColl->IsAutoUpdateFormat() )
2096  {
2097  rSh.AutoUpdatePara( pColl, *pArgs );
2098  bAuto = true;
2099  }
2100  }
2101 
2102  if (!bAuto)
2103  {
2104  rSh.SetAttrSet( *pArgs );
2105  }
2106  }
2107  }
2108  else
2109  GetView().GetViewFrame()->GetDispatcher()->Execute( SID_CHAR_DLG );
2110  rReq.Done();
2111 }
2112 
2114 {
2115  SwWrtShell &rSh = GetShell();
2116  rSh.GetCurAttr( rSet );
2117 }
2118 
2120 {
2121  SwWrtShell &rSh = GetShell();
2122  bool bFirst = true;
2123  std::unique_ptr<SfxItemSet> pFntCoreSet;
2124  SvtScriptType nScriptType = SvtScriptType::LATIN;
2125  SfxWhichIter aIter( rSet );
2126  sal_uInt16 nWhich = aIter.FirstWhich();
2127  while( nWhich )
2128  {
2129  switch( nWhich )
2130  {
2131  case RES_CHRATR_FONT:
2132  case RES_CHRATR_FONTSIZE:
2133  case RES_CHRATR_WEIGHT:
2134  case RES_CHRATR_POSTURE:
2135  {
2136  if( !pFntCoreSet )
2137  {
2138  pFntCoreSet.reset(new SfxItemSet( *rSet.GetPool(),
2140  rSh.GetCurAttr( *pFntCoreSet );
2141  nScriptType = rSh.GetScriptType();
2142  // #i42732# input language should be preferred over
2143  // current cursor position to detect script type
2144  SwEditWin& rEditWin = GetView().GetEditWin();
2145  if( rEditWin.IsUseInputLanguage() )
2146  {
2147  if(!rSh.HasSelection() && (
2148  nWhich == RES_CHRATR_FONT ||
2149  nWhich == RES_CHRATR_FONTSIZE ))
2150  {
2151  LanguageType nInputLang = rEditWin.GetInputLanguage();
2152  if(nInputLang != LANGUAGE_DONTKNOW && nInputLang != LANGUAGE_SYSTEM)
2153  nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( nInputLang );
2154  }
2155  }
2156  }
2157  SfxItemPool& rPool = *rSet.GetPool();
2158  SvxScriptSetItem aSetItem( rPool.GetSlotId( nWhich ), rPool );
2159  aSetItem.GetItemSet().Put( *pFntCoreSet, false );
2160  const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScriptType );
2161  if( pI )
2162  {
2163  rSet.Put( pI->CloneSetWhich(nWhich) );
2164  }
2165  else
2166  rSet.InvalidateItem( nWhich );
2167  // Set input context of the SwEditWin according to the selected font and script type
2168  if(RES_CHRATR_FONT == nWhich)
2169  {
2170  vcl::Font aFont;
2171  if (const SvxFontItem* pFontItem = dynamic_cast<const SvxFontItem*>(pI))
2172  {
2173  aFont.SetFamilyName(pFontItem->GetFamilyName());
2174  aFont.SetStyleName(pFontItem->GetStyleName());
2175  aFont.SetFamily(pFontItem->GetFamily());
2176  aFont.SetPitch(pFontItem->GetPitch());
2177  aFont.SetCharSet(pFontItem->GetCharSet());
2178  }
2179 
2180  bool bVertical = rSh.IsInVerticalText();
2181  aFont.SetOrientation(bVertical ? 2700 : 0);
2182  aFont.SetVertical(bVertical);
2183  GetView().GetEditWin().SetInputContext( InputContext( aFont, InputContextFlags::Text |
2184  InputContextFlags::ExtText ) );
2185  }
2186  }
2187  break;
2188 
2189  default:
2190  if( bFirst )
2191  {
2192  rSh.GetCurAttr( rSet );
2193  bFirst = false;
2194  }
2195  }
2196  nWhich = aIter.NextWhich();
2197  }
2198 }
2199 
2201 {
2202  SwWrtShell &rSh = GetShell();
2203  SfxWhichIter aIter(rSet);
2204  sal_uInt16 nWhich(aIter.FirstWhich());
2205  SelectionType nSelType(rSh.GetSelectionType());
2206  std::shared_ptr<SvxBrushItem> aBrushItem(std::make_shared<SvxBrushItem>(RES_BACKGROUND));
2207 
2208  if( nWhich == SID_TABLE_CELL_BACKGROUND_COLOR )
2209  {
2210  rSh.GetBoxBackground( aBrushItem );
2211  }
2212  else
2213  {
2214  // Adapt to new DrawingLayer FillStyle; use a parent which has XFILL_NONE set
2216 
2217  aCoreSet.SetParent(&GetView().GetDocShell()->GetDoc()->GetDfltFrameFormat()->GetAttrSet());
2218 
2219  if(nSelType & SelectionType::Graphic || SelectionType::Frame & nSelType)
2220  {
2221  rSh.GetFlyFrameAttr(aCoreSet);
2222  }
2223  else
2224  {
2225  rSh.GetCurAttr(aCoreSet);
2226  }
2227 
2228  aBrushItem = getSvxBrushItemFromSourceSet(aCoreSet, RES_BACKGROUND);
2229  }
2230 
2231  while(nWhich)
2232  {
2233  switch(nWhich)
2234  {
2235  case SID_BACKGROUND_COLOR:
2236  case SID_TABLE_CELL_BACKGROUND_COLOR:
2237  {
2238  SvxColorItem aColorItem(aBrushItem->GetColor(),SID_BACKGROUND_COLOR);
2239  rSet.Put(aColorItem);
2240  break;
2241  }
2242  case SID_ATTR_BRUSH:
2243  case RES_BACKGROUND:
2244  {
2245  // if this was intended to have a independent copy of the Item to be set
2246  // this is not needed due to the ItemSet/Pool cloning Items which get set anyways.
2247  // Keeping code as reference - it may have had other reasons I do notz see (?!?)
2248  // std::unique_ptr<SfxPoolItem> pNewItem(aBrushItem.CloneSetWhich(GetPool().GetWhich(nWhich)));
2249  rSet.Put(*aBrushItem);
2250  break;
2251  }
2252  }
2253 
2254  nWhich = aIter.NextWhich();
2255  }
2256 }
2257 
2259 {
2260  SwWrtShell &rSh = GetShell();
2261  SelectionType nSelType(rSh.GetSelectionType());
2262  const SfxItemSet* pArgs = rReq.GetArgs();
2263  sal_uInt16 nSlot(rReq.GetSlot());
2264 
2265  if (!pArgs && ( nSlot != SID_BACKGROUND_COLOR || nSlot != SID_TABLE_CELL_BACKGROUND_COLOR ) )
2266  {
2267  return;
2268  }
2269 
2270  std::shared_ptr<SvxBrushItem> aBrushItem(std::make_shared<SvxBrushItem>(RES_BACKGROUND));
2271 
2272  if ( nSlot == SID_TABLE_CELL_BACKGROUND_COLOR )
2273  {
2274  rSh.GetBoxBackground( aBrushItem );
2275  }
2276  else
2277  {
2278  // Adapt to new DrawingLayer FillStyle; use a parent which has XFILL_NONE set
2280 
2281  aCoreSet.SetParent(&GetView().GetDocShell()->GetDoc()->GetDfltFrameFormat()->GetAttrSet());
2282 
2283  if((SelectionType::Frame & nSelType) || (SelectionType::Graphic & nSelType))
2284  {
2285  rSh.GetFlyFrameAttr(aCoreSet);
2286  }
2287  else
2288  {
2289  rSh.GetCurAttr(aCoreSet);
2290  }
2291 
2292  aBrushItem = getSvxBrushItemFromSourceSet(aCoreSet, RES_BACKGROUND);
2293  }
2294 
2295  switch(nSlot)
2296  {
2297  case SID_BACKGROUND_COLOR:
2298  case SID_TABLE_CELL_BACKGROUND_COLOR:
2299  {
2300  aBrushItem->SetGraphicPos(GPOS_NONE);
2301 
2302  if(pArgs)
2303  {
2304  const SvxColorItem& rNewColorItem = pArgs->Get(nSlot == SID_BACKGROUND_COLOR ? SID_BACKGROUND_COLOR : SID_TABLE_CELL_BACKGROUND_COLOR );
2305  const Color& rNewColor = rNewColorItem.GetValue();
2306  aBrushItem->SetColor(rNewColor);
2307  GetView().GetViewFrame()->GetBindings().SetState(rNewColorItem);
2308  }
2309  else
2310  {
2311  aBrushItem->SetColor(COL_TRANSPARENT);
2313  }
2314  break;
2315  }
2316 
2317  case SID_ATTR_BRUSH:
2318  case RES_BACKGROUND:
2319  {
2320  assert(pArgs && "only SID_BACKGROUND_COLOR can have !pArgs, checked at entry");
2321  aBrushItem.reset(static_cast<SvxBrushItem*>(pArgs->Get(GetPool().GetWhich(nSlot)).Clone()));
2322  break;
2323  }
2324  default:
2325  {
2326  rReq.Ignore();
2327  OSL_FAIL("unknown message in ExecuteAttr!" );
2328  return;
2329  }
2330  }
2331 
2332  if ( nSlot == SID_TABLE_CELL_BACKGROUND_COLOR )
2333  {
2334  rSh.SetBoxBackground( *aBrushItem );
2335  }
2336  else
2337  {
2338  // Adapt to new DrawingLayer FillStyle; use a parent which has XFILL_NONE set
2340 
2341  aCoreSet.SetParent(&GetView().GetDocShell()->GetDoc()->GetDfltFrameFormat()->GetAttrSet());
2342  setSvxBrushItemAsFillAttributesToTargetSet(*aBrushItem, aCoreSet);
2343 
2344  if((SelectionType::Frame & nSelType) || (SelectionType::Graphic & nSelType))
2345  {
2346  // Template autoupdate
2347  SwFrameFormat* pFormat = rSh.GetSelectedFrameFormat();
2348 
2349  if(pFormat && pFormat->IsAutoUpdateFormat())
2350  {
2351  rSh.AutoUpdateFrame(pFormat, aCoreSet);
2352  }
2353  else
2354  {
2355  rSh.SetFlyFrameAttr(aCoreSet);
2356  }
2357  }
2358  else
2359  {
2360  SwTextFormatColl* pColl = rSh.GetCurTextFormatColl();
2361 
2362  if(pColl && pColl->IsAutoUpdateFormat())
2363  {
2364  rSh.AutoUpdatePara(pColl, aCoreSet);
2365  }
2366  else
2367  {
2368  rSh.SetAttrSet(aCoreSet);
2369  }
2370  }
2371  }
2372 
2373  rReq.Done();
2374 }
2375 
2377 {
2378  SwWrtShell &rSh = GetShell();
2379  // Tabele cell(s) selected?
2380  bool bPrepare = true;
2381  bool bTableMode = rSh.IsTableMode();
2382  if ( bTableMode )
2383  {
2384  SfxItemSet aCoreSet( GetPool(),
2386  SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER>{} );
2387  SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
2388  aCoreSet.Put( aBoxInfo );
2389  rSh.GetTabBorders( aCoreSet );
2390  rSet.Put( aCoreSet );
2391  }
2392  else if ( rSh.IsFrameSelected() )
2393  {
2394  SwFlyFrameAttrMgr aMgr( false, &rSh, Frmmgr_Type::NONE );
2395  rSet.Put( aMgr.GetAttrSet() );
2396  bPrepare = false;
2397  }
2398  else
2399  // Get border attributes via shell quite normal
2400  rSh.GetCurAttr( rSet );
2401  if ( bPrepare )
2402  ::PrepareBoxInfo( rSet, rSh );
2403  // Switch the border toolbox controller mode
2404  rSet.Put( SfxBoolItem( SID_BORDER_REDUCED_MODE, !bTableMode ));
2405 }
2406 
2408 {
2409  SwWrtShell &rSh = GetShell();
2411  // So that from the basic no dialogues for the background views are called:
2412  bool bBackground = (&GetView() != GetActiveView());
2413  const SfxPoolItem* pItem = nullptr;
2414  const SfxItemSet* pArgs = rReq.GetArgs();
2415 
2416  sal_uInt16 nSlot = rReq.GetSlot();
2417  const SfxItemSet* pOutSet = nullptr;
2418  bool bDone = false;
2419  if(pArgs)
2420  pArgs->GetItemState( GetPool().GetWhich(nSlot), false, &pItem );
2421 
2422  switch ( nSlot )
2423  {
2425  {
2428  pDlg->Execute();
2429  }
2430  break;
2431  case FN_FORMAT_PAGE_DLG:
2434  {
2435  if( !bBackground )
2436  {
2437  const size_t nCurIdx = rSh.GetCurPageDesc();
2438  const SwPageDesc& rPageDesc = rSh.GetPageDesc( nCurIdx );
2439  // Temporary view, because the shell does not need to be valid after the dialogue
2440  // for example disable header
2441  SwView& rTempView = GetView();
2442 
2443  OString sPageId;
2444  switch (nSlot)
2445  {
2447  sPageId = "columns";
2448  break;
2450  sPageId = "page";
2451  break;
2452  case FN_FORMAT_PAGE_DLG:
2453  if (pItem)
2454  sPageId = OUStringToOString(static_cast<const SfxStringItem*>(pItem)->GetValue(), RTL_TEXTENCODING_UTF8);
2455  break;
2456  }
2457  rTempView.GetDocShell()->FormatPage(rPageDesc.GetName(), sPageId, rSh, &rReq);
2458  rTempView.InvalidateRulerPos();
2459 
2460  bDone = true; // FormatPage() takes care of calling Done()
2461  }
2462  }
2463  break;
2464  case FN_FORMAT_BORDER_DLG:
2465  {
2466  SfxItemSet aSet( rSh.GetAttrPool(),
2468  SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER>{} );
2470  // Table cell(s) selected?
2471  if ( rSh.IsTableMode() )
2472  {
2473  // Set border attributes Get/SetTabBorders()
2474  ::PrepareBoxInfo( aSet, rSh );
2475  rSh.GetTabBorders( aSet );
2477  pDlg.disposeAndReset(pFact->CreateSwBorderDlg(pMDI, aSet, SwBorderModes::TABLE));
2478  if ( pDlg->Execute() == RET_OK )
2479  {
2480  rSh.SetTabBorders( *pDlg->GetOutputItemSet() );
2481  pOutSet = pDlg->GetOutputItemSet();
2482  }
2483  }
2484  else if ( rSh.IsFrameSelected() )
2485  {
2486  // Set border attributes via Frame-Manager
2487  SwFlyFrameAttrMgr aMgr( false, &rSh, Frmmgr_Type::NONE );
2488  aSet.Put( aMgr.GetAttrSet() );
2489 
2491  pDlg.disposeAndReset(pFact->CreateSwBorderDlg(pMDI, aSet, SwBorderModes::FRAME));
2492  if ( pDlg->Execute() == RET_OK )
2493  {
2494  aMgr.SetAttrSet( *pDlg->GetOutputItemSet() );
2495  aMgr.UpdateFlyFrame();
2496  pOutSet = pDlg->GetOutputItemSet();
2497  }
2498  }
2499  else
2500  {
2501  // Set border attributes via Shell quite normal
2502  rSh.GetCurAttr( aSet );
2503  ::PrepareBoxInfo( aSet, rSh );
2504 
2506  pDlg.disposeAndReset(pFact->CreateSwBorderDlg(pMDI, aSet, SwBorderModes::PARA));
2507  if ( pDlg->Execute() == RET_OK )
2508  {
2509  rSh.SetAttrSet( *pDlg->GetOutputItemSet() );
2510  pOutSet = pDlg->GetOutputItemSet();
2511  }
2512  }
2513  if(pOutSet)
2514  {
2515  rReq.Done(*pOutSet);
2516  bDone = true;
2517  }
2518  }
2519  break;
2521  {
2522  SfxItemSet aSet( rSh.GetAttrPool(),
2524 
2527 
2528  // Table cell(s) selected?
2529  if ( rSh.IsTableMode() )
2530  {
2531  // Get background attributes of the table and put it in the set
2532  std::shared_ptr<SvxBrushItem> aBrush;
2533  rSh.GetBoxBackground( aBrush );
2534  pDlg.disposeAndReset(pFact->CreateSwBackgroundDialog(pMDI, aSet));
2535  aSet.Put( *aBrush );
2536  if ( pDlg->Execute() == RET_OK )
2537  {
2538 
2539  rSh.SetBoxBackground( pDlg->GetOutputItemSet()->Get( RES_BACKGROUND ) );
2540  pOutSet = pDlg->GetOutputItemSet();
2541  }
2542  }
2543  else if ( rSh.IsFrameSelected() )
2544  {
2545 
2546  rSh.GetFlyFrameAttr( aSet );
2547 
2548  pDlg.disposeAndReset(pFact->CreateSwBackgroundDialog(pMDI, aSet));
2549  if ( pDlg->Execute() == RET_OK )
2550  {
2551  rSh.SetFlyFrameAttr(const_cast<SfxItemSet &>(*pDlg->GetOutputItemSet()) );
2552  pOutSet = pDlg->GetOutputItemSet();
2553  }
2554  }
2555  else
2556  {
2557  // Set border attributes Umrandungsattribute with the shell quite normal.
2558  rSh.GetCurAttr( aSet );
2559 
2560  pDlg.disposeAndReset(pFact->CreateSwBackgroundDialog(pMDI, aSet));
2561  if ( pDlg->Execute() == RET_OK )
2562  {
2563  rSh.SetAttrSet( *pDlg->GetOutputItemSet() );
2564  pOutSet = pDlg->GetOutputItemSet();
2565  }
2566  }
2567  if(pOutSet)
2568  {
2569  rReq.Done(*pOutSet);
2570  bDone = true;
2571  }
2572  }
2573  break;
2574  default:OSL_FAIL("wrong Dispatcher (basesh.cxx)");
2575  }
2576  if(!bDone)
2577  rReq.Done();
2578 }
2579 
2581 {
2582  return rView.GetWrtShell();
2583 }
2584 
2586 {
2587  return rView.GetWrtShellPtr();
2588 }
2589 
2591 {
2592  const SfxItemSet* pArgs = _rRequest.GetArgs();
2593  SwWrtShell& rSh = GetShell();
2594 
2595  if ( !( rSh.GetFrameType( nullptr, true ) & FrameTypeFlags::FOOTNOTE ) )
2596  {
2597  SwView &rTempView = GetView(); // Because GetView() does not work after the shell exchange
2598  bool bHTMLMode = 0 != (::GetHtmlMode(rTempView.GetDocShell())&HTMLMODE_ON);
2599  bool bCallEndUndo = false;
2600 
2601  if( !pArgs && rSh.IsSelection() && !rSh.IsInClickToEdit() &&
2602  !rSh.IsTableMode() )
2603  {
2604  const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
2605  SwInsertTableOptions aInsTableOpts = pModOpt->GetInsTableFlags(bHTMLMode);
2606 
2608  bCallEndUndo = true;
2609 
2610  bool bInserted = rSh.TextToTable( aInsTableOpts, '\t' );
2611  rSh.EnterStdMode();
2612  if (bInserted)
2613  rTempView.AutoCaption(TABLE_CAP);
2614  _rRequest.Done();
2615  }
2616  else
2617  {
2618  sal_uInt16 nCols = 0;
2619  sal_uInt16 nRows = 0;
2620  SwInsertTableOptions aInsTableOpts( SwInsertTableFlags::All, 1 );
2621  OUString aTableName;
2622  OUString aAutoName;
2623  std::unique_ptr<SwTableAutoFormat> pTAFormat;
2624 
2625  if( pArgs && pArgs->Count() >= 2 )
2626  {
2628  const SfxUInt16Item* pCols = _rRequest.GetArg<SfxUInt16Item>(SID_ATTR_TABLE_COLUMN);
2629  const SfxUInt16Item* pRows = _rRequest.GetArg<SfxUInt16Item>(SID_ATTR_TABLE_ROW);
2630  const SfxInt32Item* pFlags = _rRequest.GetArg<SfxInt32Item>(FN_PARAM_1);
2631  const SfxStringItem* pAuto = _rRequest.GetArg<SfxStringItem>(FN_PARAM_2);
2632 
2633  if ( pName )
2634  aTableName = pName->GetValue();
2635  if ( pCols )
2636  nCols = pCols->GetValue();
2637  if ( pRows )
2638  nRows = pRows->GetValue();
2639  if ( pAuto )
2640  {
2641  aAutoName = pAuto->GetValue();
2642  if ( !aAutoName.isEmpty() )
2643  {
2644  SwTableAutoFormatTable aTableTable;
2645  aTableTable.Load();
2646  for ( size_t n=0; n<aTableTable.size(); n++ )
2647  {
2648  if ( aTableTable[n].GetName() == aAutoName )
2649  {
2650  pTAFormat.reset(new SwTableAutoFormat( aTableTable[n] ));
2651  break;
2652  }
2653  }
2654  }
2655  }
2656 
2657  if ( pFlags )
2658  aInsTableOpts.mnInsMode = static_cast<SwInsertTableFlags>(pFlags->GetValue());
2659  else
2660  {
2661  const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
2662  aInsTableOpts = pModOpt->GetInsTableFlags(bHTMLMode);
2663  }
2664  }
2665 
2666  if( !nCols || !nRows )
2667  {
2669  ScopedVclPtr<AbstractInsTableDlg> pDlg(pFact->CreateInsTableDlg(rTempView));
2670  if( RET_OK == pDlg->Execute() )
2671  {
2672  pDlg->GetValues( aTableName, nRows, nCols, aInsTableOpts, aAutoName, pTAFormat );
2673  }
2674  else
2675  _rRequest.Ignore();
2676  }
2677 
2678  if( nCols && nRows )
2679  {
2680  // record before shell change
2681  _rRequest.AppendItem( SfxStringItem( FN_INSERT_TABLE, aTableName ) );
2682  if ( !aAutoName.isEmpty() )
2683  _rRequest.AppendItem( SfxStringItem( FN_PARAM_2, aAutoName ) );
2684  _rRequest.AppendItem( SfxUInt16Item( SID_ATTR_TABLE_COLUMN, nCols ) );
2685  _rRequest.AppendItem( SfxUInt16Item( SID_ATTR_TABLE_ROW, nRows ) );
2686  _rRequest.AppendItem( SfxInt32Item( FN_PARAM_1, static_cast<sal_Int32>(aInsTableOpts.mnInsMode) ) );
2687  _rRequest.Done();
2688 
2690  bCallEndUndo = true;
2691 
2692  rSh.StartAllAction();
2693  if( rSh.HasSelection() )
2694  rSh.DelRight();
2695 
2696  rSh.InsertTable( aInsTableOpts, nRows, nCols, pTAFormat.get() );
2698 
2699  if( !aTableName.isEmpty() && !rSh.GetTableStyle( aTableName ) )
2700  rSh.GetTableFormat()->SetName( aTableName );
2701 
2702  if( pTAFormat != nullptr && !aAutoName.isEmpty()
2703  && aAutoName != SwStyleNameMapper::GetUIName( RES_POOLTABSTYLE_DEFAULT, OUString() )
2704  && aAutoName != SwViewShell::GetShellRes()->aStrNone )
2705  {
2706  SwTableNode* pTableNode = const_cast<SwTableNode*>( rSh.IsCursorInTable() );
2707  if ( pTableNode )
2708  pTableNode->GetTable().SetTableStyleName( aAutoName );
2709  }
2710 
2711  rSh.EndAllAction();
2712  rTempView.AutoCaption(TABLE_CAP);
2713  }
2714  }
2715 
2716  if( bCallEndUndo )
2717  {
2718  SwRewriter aRewriter;
2719 
2720  if (rSh.GetTableFormat())
2721  {
2722  aRewriter.AddRule(UndoArg1, SwResId(STR_START_QUOTE));
2723  aRewriter.AddRule(UndoArg2, rSh.GetTableFormat()->GetName());
2724  aRewriter.AddRule(UndoArg3, SwResId(STR_END_QUOTE));
2725 
2726  }
2727  rSh.EndUndo(SwUndoId::INSTABLE, &aRewriter); // If possible change the Shell
2728  }
2729  }
2730 }
2731 
2733 {
2734  SwWrtShell &rSh = GetShell();
2735  SfxWhichIter aIter( rSet );
2736  sal_uInt16 nWhich = aIter.FirstWhich();
2737  switch ( nWhich )
2738  {
2739  case SID_GALLERY_BG_BRUSH:
2740  {
2741  SelectionType nSel = rSh.GetSelectionType();
2742  SfxStringListItem aLst( nWhich );
2743  std::vector<OUString> &rLst = aLst.GetList();
2746  nHeaderPos = nFooterPos = 0;
2747  sal_uInt8 nPos = 1;
2748  rLst.push_back( SwResId( STR_SWBG_PAGE ) );
2749  nPagePos = nPos++;
2750  sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
2751  bool bHtmlMode = 0 != (nHtmlMode & HTMLMODE_ON);
2752 
2753  if ( (!bHtmlMode || (nHtmlMode & HTMLMODE_FULL_STYLES)) &&
2754  (nSel & SelectionType::Text) )
2755  {
2756  rLst.push_back( SwResId( STR_SWBG_PARAGRAPH ) );
2757  nParagraphPos = nPos++;
2758  }
2759  if ( (!bHtmlMode || (nHtmlMode & HTMLMODE_SOME_STYLES)) &&
2761  {
2762  rLst.push_back( SwResId( STR_SWBG_TABLE ) );
2763  nTablePos = nPos++;
2764 
2765  if(!bHtmlMode)
2766  {
2767  rLst.push_back( SwResId( STR_SWBG_TABLE_ROW ) );
2768  nTableRowPos = nPos++;
2769  }
2770 
2771  rLst.push_back( SwResId( STR_SWBG_TABLE_CELL) );
2772  nTableCellPos = nPos++;
2773  }
2774  if(!bHtmlMode)
2775  {
2776  if ( nSel & SelectionType::Frame )
2777  {
2778  rLst.push_back( SwResId( STR_SWBG_FRAME ) );
2779  nFramePos = nPos++;
2780  }
2781  if ( nSel & SelectionType::Graphic )
2782  {
2783  rLst.push_back( SwResId( STR_SWBG_GRAPHIC ) );
2784  nGraphicPos = nPos++;
2785  }
2786  if ( nSel & SelectionType::Ole )
2787  {
2788  rLst.push_back( SwResId( STR_SWBG_OLE ) );
2789  nOlePos = nPos++;
2790  }
2791  const FrameTypeFlags nType = rSh.GetFrameType(nullptr,true);
2792  if ( nType & FrameTypeFlags::HEADER )
2793  {
2794  rLst.push_back( SwResId( STR_SWBG_HEADER ) );
2795  nHeaderPos = nPos++;
2796  }
2797  if ( nType & FrameTypeFlags::FOOTER )
2798  {
2799  rLst.push_back( SwResId( STR_SWBG_FOOTER ) );
2800  nFooterPos = nPos;
2801  }
2802  }
2803  if ( rLst.empty() )
2804  rSet.DisableItem( nWhich );
2805  else
2806  rSet.Put( aLst );
2807  break;
2808  }
2809  }
2810 }
2811 
2813 {
2814  SwWrtShell &rSh = GetShell();
2815  rSh.StartAction();
2816  const SfxItemSet* pArgs = rReq.GetArgs();
2817  sal_uInt16 nSlot = rReq.GetSlot();
2818  switch(nSlot)
2819  {
2820  case SID_GALLERY_BG_BRUSH:
2821  {
2822  if ( !pArgs )
2823  break;
2824 
2825  SelectionType nSel = rSh.GetSelectionType();
2826  if ( nSel & SelectionType::DrawObjectEditMode )
2827  break;
2828 
2829  const SfxUInt16Item* pPos = rReq.GetArg<SfxUInt16Item>(SID_GALLERY_BG_POS);
2830  const SvxBrushItem* pBrush = rReq.GetArg<SvxBrushItem>(SID_GALLERY_BG_BRUSH);
2831  if ( !pPos || !pBrush )
2832  break;
2833 
2834  sal_uInt8 nPos = pPos->GetValue();
2835  ++nPos;
2836 
2837  SvxBrushItem aBrush( *pBrush );
2838  aBrush.SetWhich( RES_BACKGROUND );
2839  if ( nPos == nParagraphPos )
2840  rSh.SetAttrItem( aBrush );
2841  else if ( nPos == nTablePos )
2842  rSh.SetTabBackground( aBrush );
2843  else if ( nPos == nTableRowPos )
2844  rSh.SetRowBackground( aBrush );
2845  else if ( nPos == nTableCellPos )
2846  rSh.SetBoxBackground( aBrush );
2847  else if ( nPos == nFramePos || nPos == nGraphicPos || nPos == nOlePos )
2848  {
2850  aCoreSet.Put( aBrush );
2851  rSh.SetFlyFrameAttr( aCoreSet );
2852  }
2853  else if ( nPos == nPagePos || nPos == nHeaderPos || nPos == nFooterPos )
2854  {
2855  sal_uInt16 nDesc = rSh.GetCurPageDesc();
2856  SwPageDesc aDesc( rSh.GetPageDesc( nDesc ) );
2857  if ( nPos == nPagePos )
2858  aDesc.GetMaster().SetFormatAttr( aBrush );
2859  else if ( nPos == nHeaderPos )
2860  {
2861  SwFormatHeader aHead( aDesc.GetMaster().GetHeader() );
2862  aHead.GetHeaderFormat()->SetFormatAttr( aBrush );
2863  aDesc.GetMaster().SetFormatAttr( aHead );
2864  }
2865  else if ( nPos == nFooterPos )
2866  {
2867  SwFormatFooter aFoot( aDesc.GetMaster().GetFooter() );
2868  aFoot.GetFooterFormat()->SetFormatAttr( aBrush );
2869  aDesc.GetMaster().SetFormatAttr( aFoot );
2870  }
2871  rSh.ChgPageDesc( nDesc, aDesc );
2872  }
2873  break;
2874  }
2875  }
2876  rSh.EndAction();
2877  rReq.Done();
2878 }
2879 
2881 {
2882  sal_uInt16 nSlot = rReq.GetSlot();
2883  switch( nSlot )
2884  {
2885 #if HAVE_FEATURE_DBCONNECTIVITY
2886  case FN_CHANGE_DBFIELD:
2887  {
2890  pDlg->Execute();
2891  }
2892  break;
2893 #endif
2894  default:
2895  OSL_FAIL("wrong dispatcher");
2896  }
2897 }
2898 
2899 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void SetFamily(FontFamily)
const SfxPoolItem * ExecuteSlot(SfxRequest &rReq, const SfxInterface *pIF=nullptr)
std::shared_ptr< SfxDialogController > & GetController()
SwFieldType * GetFieldType(SwFieldIds nResId, size_t nField=0) const
Definition: fldmgr.cxx:418
SfxViewFrame * GetViewFrame() const
SFX_IMPL_SUPERCLASS_INTERFACE(DrawDocShell, SfxObjectShell)
static sal_uInt8 nOlePos
Definition: basesh.cxx:123
bool GetValue() const
Instances of SwFields and those derived from it occur 0 to n times.
Definition: fldbas.hxx:233
#define FN_PAGE_STYLE_SET_COLS
Definition: cmdid.h:364
bool IsContour() const
Definition: fmtsrnd.hxx:53
#define RES_CHRATR_WEIGHT
Definition: hintids.hxx:83
#define FN_FRAME_WRAP_RIGHT
Definition: cmdid.h:395
#define FN_UPDATE_ALL_LINKS
Definition: cmdid.h:119
#define FONT_GROUP_CTL
Definition: fontcfg.hxx:49
void SetWishWidth(sal_uInt16 nNew)
Definition: fmtclds.hxx:134
bool IsInClickToEdit() const
Definition: wrtsh.hxx:631
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 FN_UPDATE_TOX
Definition: cmdid.h:483
const css::uno::Reference< css::graphic::XGraphic > & GetGraphic() const
SwTextFormatColl * GetCurTextFormatColl() const
Get the named paragraph format of the current selection.
Definition: edattr.cxx:250
#define FN_FRAME_WRAP
Definition: cmdid.h:309
FlyMode
Definition: mdiexp.hxx:41
sal_uInt16 GetPhyPageNum()
Phy: real page count.
Definition: fews.cxx:336
void SetGrfArrivedLnk(const Link< SwCursorShell &, void > &rLnk)
Definition: crsrsh.hxx:489
#define RES_URL
Definition: hintids.hxx:216
Represents the style of a paragraph.
Definition: fmtcol.hxx:55
bool IsInVerticalText(const Point *pPt=nullptr) const
Definition: crsrsh.cxx:3291
#define FN_EDIT_REGION
Definition: cmdid.h:107
static sal_uInt8 nGraphicPos
Definition: basesh.cxx:122
void GetTextCtrlState(SfxItemSet &rSet)
Definition: basesh.cxx:2113
void ChgAnchor(RndStdIds eAnchorId, bool bSameOnly=false, bool bPosCorr=true)
frmatr.hxx.
Definition: feshview.cxx:2279
SfxChildWindow * GetChildWindow(sal_uInt16)
#define RES_CHRATR_CJK_LANGUAGE
Definition: hintids.hxx:92
#define FONT_STANDARD
Definition: fontcfg.hxx:28
SwView & GetView()
Definition: basesh.hxx:59
void ExecTextCtrl(SfxRequest &rReq)
Definition: basesh.cxx:1989
void GetGalleryState(SfxItemSet &)
Definition: basesh.cxx:2732
void AutoCaption(const sal_uInt16 nType, const SvGlobalName *pOleId=nullptr)
Definition: viewdlg2.cxx:135
bool HasCharts() const
Definition: viewsh.cxx:676
const Link< SwCursorShell &, void > & GetGrfArrivedLnk() const
Definition: crsrsh.hxx:490
#define FN_GOTO_NEXT_OBJ
Definition: cmdid.h:655
OUString GetRepeatString() const
Definition: wrtundo.cxx:137
#define FN_FRAME_TO_ANCHOR
Definition: cmdid.h:673
virtual void DoRepair(bool bRepair)=0
Enable repair mode.
#define RES_CHRATR_FONTSIZE
Definition: hintids.hxx:76
void SaveTableBoxContent(const SwPosition *pPos=nullptr)
Definition: trvltbl.cxx:873
bool isCHRATR(const sal_uInt16 nWhich)
Definition: hintids.hxx:342
#define RES_CHRATR_LANGUAGE
Definition: hintids.hxx:78
SwView * GetActiveView()
Definition: swmodul1.cxx:123
void ReRead(const OUString &rGrfName, const OUString &rFltName, const Graphic *pGraphic=nullptr)
Re-read if graphic is not ok. Current graphic is replaced by the new one.
Definition: editsh.cxx:300
void SetState(const SfxItemSet &rSet)
static ShellResource * GetShellRes()
Definition: viewsh.cxx:2490
bool GotoPrevTable(SwPaM &rCurrentCursor, SwMoveFnCollection const &fnPosTable, bool bInReadOnly)
Definition: trvltbl.cxx:484
static void GetDefaultTargetList(TargetList &)
bool SttEndDoc(bool bStt)
Definition: crsrsh.cxx:563
SwUndoId
Definition: swundo.hxx:29
#define RES_HORI_ORIENT
Definition: hintids.hxx:208
virtual VclPtr< VclAbstractDialog > CreateSwChangeDBDlg(SwView &rVw)=0
sfx2::LinkManager & GetLinkManager()
Definition: editsh.cxx:598
void ClearTableBoxContent()
Definition: trvltbl.cxx:912
std::string GetValue
void UpdateChart()
Definition: tablemgr.cxx:177
void SetRowBackground(const SvxBrushItem &rNew)
Definition: fetab.cxx:749
signed char sal_Int8
void ExecuteGallery(SfxRequest &)
Definition: basesh.cxx:2812
const css::uno::Reference< css::embed::XEmbeddedObject > GetOleRef() const
get reference to OLE object (if there is one) for selected FlyFrame
Definition: fefly1.cxx:1456
void Insert(SwField const &)
Definition: wrtsh2.cxx:71
void * GetIMapInventor() const
Unique identification of object (for ImageMapDlg).
Definition: editsh.cxx:603
bool IsTableMode() const
Definition: crsrsh.hxx:643
GPOS_NONE
bool MoveFieldType(const SwFieldType *pFieldType, const bool bNext, const SwFieldIds nResType=SwFieldIds::Unknown, const bool bAddSetExpressionFieldsToInputFields=true)
Definition: crstrvl.cxx:714
SwWrtShell * GetShellPtr()
Definition: basesh.cxx:2585
#define RES_SHADOW
Definition: hintids.hxx:212
SfxDispatcher * GetDispatcher()
SwWrtShell & GetShell()
Definition: basesh.cxx:2580
void SelectionToHeaven()
Above document.
Definition: feshview.cxx:1157
void SetWrapMode(sal_uInt16 nSlot)
Definition: basesh.cxx:1843
static bool IsPaste(const SwWrtShell &, const TransferableDataHelper &)
Definition: swdtflvr.cxx:1211
Size GetObjSize() const
Definition: feshview.cxx:2310
#define CNT_GRF
Definition: editsh.hxx:132
bool GetLastUndoInfo(OUString *const o_pStr, SwUndoId *const o_pId, const SwView *pView=nullptr) const
Definition: edws.cxx:236
#define RES_SURROUND
Definition: hintids.hxx:206
#define FN_TOOL_ANCHOR_PAGE
Definition: cmdid.h:215
Base class of all fields.
Definition: fldbas.hxx:279
static sal_uInt8 nTableCellPos
Definition: basesh.cxx:127
void SetAttrSet(const SfxItemSet &, SetAttrMode nFlags=SetAttrMode::DEFAULT, SwPaM *pCursor=nullptr, const bool bParagraphSetting=false)
Definition: edatmisc.cxx:152
std::shared_ptr< SvxBrushItem > getSvxBrushItemFromSourceSet(const SfxItemSet &rSourceSet, sal_uInt16 nBackgroundID, bool bSearchInParents, bool bXMLImportHack)
#define FN_INSERT_REGION
Definition: cmdid.h:270
SwInsertTableFlags mnInsMode
Definition: itabenum.hxx:40
Check only parents.
GraphicType
virtual VclPtr< AbstractInsTableDlg > CreateInsTableDlg(SwView &rView)=0
void ClickToField(const SwField &rField)
Definition: wrtsh2.cxx:334
static bool PasteFormat(SwWrtShell &rSh, TransferableDataHelper &rData, SotClipboardFormatId nFormat)
Definition: swdtflvr.cxx:3021
sal_uInt16 GetValue() const
void InvalidateItem(sal_uInt16 nWhich)
sal_Int16 nId
sal_uInt16 FirstWhich()
virtual VclPtr< SfxAbstractDialog > CreateSwBackgroundDialog(weld::Window *pParent, const SfxItemSet &rSet)=0
SwUndoId EndUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Closes parenthesis of nUndoId, not used by UI.
Definition: edws.cxx:233
#define RES_CHRATR_FONT
Definition: hintids.hxx:75
void UpdateAllCharts()
update all charts for which any table exists
Definition: viewsh.cxx:669
void GetTextFontCtrlState(SfxItemSet &rSet)
Definition: basesh.cxx:2119
void UpdateInputFields(SwInputFieldList *pLst=nullptr)
Definition: wrtsh2.cxx:136
bool TextToTable(const SwInsertTableOptions &rInsTableOpts, sal_Unicode cCh, const SwTableAutoFormat *pTAFormat=nullptr)
Definition: edtab.cxx:119
void GetDoStrings(DoType eDoType, SfxStringListItem &rStrLstItem) const
Definition: wrtundo.cxx:114
ShellMode GetShellMode()
Definition: view0.cxx:114
void EnterStdMode()
Definition: select.cxx:552
void ExecClpbrd(SfxRequest &)
Definition: basesh.cxx:246
#define FN_XFORMS_DESIGN_MODE
Definition: cmdid.h:571
SwEditWin & GetEditWin()
Definition: view.hxx:403
bool IsSelFullPara() const
Definition: crsrsh.cxx:3255
void Done(bool bRemove=false)
void SetCharSet(rtl_TextEncoding)
css::uno::Reference< css::frame::XModel > GetModel() const
static SfxItemSet makeItemSetFromFormatAnchor(SfxItemPool &rPool, const SwFormatAnchor &rAnchor)
Definition: fefly1.cxx:1100
#define RES_CHRATR_CJK_FONTSIZE
Definition: hintids.hxx:91
void AutoUpdatePara(SwTextFormatColl *pColl, const SfxItemSet &rStyleSet, SwPaM *pPaM=nullptr)
Definition: wrtsh1.cxx:1551
const SfxItemSet * GetArgs() const
void Invalidate(sal_uInt16 nId)
void ResetSubShell()
Definition: view.hxx:568
sal_Int32 GetFontHeight(sal_uInt8 nFont, sal_uInt8 nScriptType, LanguageType eLang)
Definition: fontcfg.cxx:300
void SetOrientation(short nLineOrientation)
void EndAllAction()
Definition: edws.cxx:96
static sal_uInt8 nTableRowPos
Definition: basesh.cxx:126
void SetContour(bool bNew)
Definition: fmtsrnd.hxx:57
void FlushInBuffer()
Character buffer is inserted into the document.
Definition: edtwin.cxx:860
sal_uInt16 mnRowsToRepeat
Definition: itabenum.hxx:41
SfxShell * GetCurShell()
Definition: view.hxx:561
void SetUseInputLanguage(bool bNew)
#i42732# display status of font size/name depending on either the input language or the selection pos...
Definition: edtwin.cxx:6212
#define FN_FRAME_WRAP_IDEAL
Definition: cmdid.h:382
void ExecBckCol(SfxRequest &rReq)
Definition: basesh.cxx:2258
sal_uInt16 NextWhich()
void StateStyle(SfxItemSet &)
Definition: basesh.cxx:1820
SwInsertTableFlags
Definition: itabenum.hxx:25
bool DelRight()
Definition: delete.cxx:292
const OUString & GetName() const
Definition: pagedesc.hxx:186
SwWrtShell & GetWrtShell() const
Definition: view.hxx:400
const SwSection * GetCurrSection() const
Definition: edsect.cxx:71
#define FONT_GROUP_DEFAULT
Definition: fontcfg.hxx:47
void SwapPam()
Definition: crsrsh.cxx:964
void SetTabBackground(const SvxBrushItem &rNew)
Definition: fetab.cxx:830
static sal_uInt8 nPagePos
Definition: basesh.cxx:128
#define FN_PAGE_STYLE_SET_PAPER_BIN
Definition: cmdid.h:362
OUString const aStrNone
Definition: shellres.hxx:44
Used by the UI to modify the document model.
Definition: wrtsh.hxx:86
void ToggleChildWindow(sal_uInt16)
weld::Window * GetFrameWeld() const
SfxItemSet * pGetStateSet
Definition: basesh.hxx:48
sal_uInt16 sal_Unicode
constexpr::Color COL_TRANSPARENT(0xFF, 0xFF, 0xFF, 0xFF)
#define RES_CHRATR_END
Definition: hintids.hxx:114
vcl::Window & GetWindow() const
const SwTable & InsertTable(const SwInsertTableOptions &rInsTableOpts, sal_uInt16 nRows, sal_uInt16 nCols, const SwTableAutoFormat *pTAFormat=nullptr)
Definition: edtab.cxx:92
const SwView & GetView() const
Definition: wrtsh.hxx:424
const Graphic & GetGraphic() const
const SwFrameFormat * IsFlyInFly()
Is selected frame within another frame?
Definition: fefly1.cxx:316
void SttCursorMove()
Definition: crsrsh.cxx:291
FUNC_TYPE const nType
virtual bool GetFirstRedoInfo(OUString *const o_pStr, SwUndoId *const o_pId, const SwView *pView=nullptr) const =0
Get Id and comment of first Redo action.
#define FN_EDIT_CURRENT_REGION
Definition: cmdid.h:109
#define RES_CHRATR_CTL_FONTSIZE
Definition: hintids.hxx:96
SvxIMapDlg * GetIMapDlg()
void ExecStyleSheet(SfxRequest &)
Definition: docst.cxx:297
#define FN_PAGE_STYLE_SET_PAPER_SIZE
Definition: cmdid.h:361
const tools::PolyPolygon * GetGraphicPolygon() const
Definition: editsh.cxx:324
void ExecDlg(SfxRequest &)
Definition: basesh.cxx:2407
#define FN_PAGE_STYLE_SET_NUMBER_FORMAT
Definition: cmdid.h:363
const OUString & GetName() const
Definition: format.hxx:111
SwField * GetCurField(const bool bIncludeInputFieldAtStart=false) const
Definition: crstrvl.cxx:927
Footer, for pageformats Client of FrameFormat describing the footer.
Definition: fmthdft.hxx:64
#define FN_FRAME_WRAP_LEFT
Definition: cmdid.h:394
#define FN_TOOL_ANCHOR_CHAR
Definition: cmdid.h:238
virtual void SetName(const OUString &rNewName, bool bBroadcast=false) override
Definition: atrfrm.cxx:2464
static TransferableDataHelper CreateFromSystemClipboard(vcl::Window *pWindow)
sal_Int8 GetType() const
Point GetAnchorObjDiff() const
Methods for status line.
Definition: feshview.cxx:2323
bool IsAnchorOnly() const
Definition: fmtsrnd.hxx:52
#define FN_GOTO_NEXT_MARK
Definition: cmdid.h:687
const SfxItemSet & GetAttrSet() const
Definition: frmmgr.hxx:124
static bool HasMacroRecorder(SfxViewFrame const *pFrame)
const SwTable & GetTable() const
Definition: node.hxx:497
SwDoc * GetDoc() const
Definition: viewsh.hxx:284
void GetGrfNms(OUString *pGrfName, OUString *pFltName, const SwFlyFrameFormat *=nullptr) const
Returns the name and the filter name of a graphic if the pointer is on a graphic. ...
Definition: editsh.cxx:310
void ExecField(SfxRequest const &rReq)
Definition: basesh.cxx:2880
tools::PolyPolygon GetPolyPolygon()
SotClipboardFormatId
#define FN_FRAME_WRAPTHRU_TOGGLE
Definition: cmdid.h:383
static SvtScriptType GetScriptTypeOfLanguage(LanguageType nLang)
const OUString & GetName() const
bool IsGraphicChanged() const
void SetMap(const ImageMap *pM)
Pointer will be copied.
Definition: atrfrm.cxx:1742
ShellMode
Definition: view.hxx:87
void DelNumRules()
Delete, split enumeration list.
Definition: ednumber.cxx:279
OUString GetDoString(DoType eDoType) const
Definition: wrtundo.cxx:94
static sal_uInt16 IsMath(const SvGlobalName &rName)
const sal_Unicode cDelim
void GetBorderState(SfxItemSet &rSet)
Definition: basesh.cxx:2376
#define FN_PAGE_STYLE_SET_LR_MARGIN
Definition: cmdid.h:359
static sal_uInt8 nTablePos
Definition: basesh.cxx:125
void Execute(SfxRequest &)
Definition: basesh.cxx:630
const void * GetEditingObject() const
void SetPitch(FontPitch ePitch)
SfxItemPool & GetPool() const
IMPL_LINK_NOARG(SwBaseShell, GraphicArrivedHdl, SwCursorShell &, void)
Definition: basesh.cxx:1281
void SelectionToHell()
Below document.
Definition: feshview.cxx:1162
#define FN_NEXT_BOOKMARK
Definition: cmdid.h:112
static sal_uInt8 nFramePos
Definition: basesh.cxx:124
const ImageMap & GetImageMap() const
#define RES_BACKGROUND
Definition: hintids.hxx:210
bool GetFlyFrameAttr(SfxItemSet &rSet) const
Definition: fefly1.cxx:1023
void EndCursorMove(const bool bIdleEnd=false)
Definition: crsrsh.cxx:300
virtual VclPtr< AbstractSwConvertTableDlg > CreateSwConvertTableDlg(SwView &rView, bool bToTable)=0
static bool lcl_UpdateContourDlg(SwWrtShell &rSh, SelectionType nSel)
Definition: basesh.cxx:181
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId()
Definition: unotxdoc.cxx:293
void EndSelect()
Definition: select.cxx:426
const SfxItemPool & GetAttrPool() const
Definition: viewsh.hxx:614
bool IsSelection() const
Definition: crsrsh.hxx:875
void SetTabBorders(const SfxItemSet &rSet)
Definition: fetab.cxx:762
void SetBoxBackground(const SvxBrushItem &rNew)
Definition: fetab.cxx:785
virtual FmFormShell * GetFormShell() override
Definition: view.hxx:564
const SwTableNode * IsCursorInTable() const
Definition: crsrsh.hxx:885
SvtScriptType
Style of a layout element.
Definition: frmfmt.hxx:57
void SetFormView(bool bSet)
Definition: viewopt.hxx:424
SvtScriptType GetScriptType() const
returns the script type of the selection
Definition: edattr.cxx:671
bool HasSelection() const
Definition: wrtsh.hxx:137
#define SW_MOD()
Definition: swmodule.hxx:255
void SetFamilyName(const OUString &rFamilyName)
void SetInputContext(const InputContext &rInputContext)
void AlignFormulaToBaseline(const css::uno::Reference< css::embed::XEmbeddedObject > &xObj)
for starmath formulas anchored 'as char' it aligns it baseline to baseline changing the previous vert...
Definition: fefly1.cxx:2013
bool IsInsRegionAvailable() const
Definition: edsect.cxx:58
#define RES_ANCHOR
Definition: hintids.hxx:209
Shell * GetShell()
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
#define FN_CHANGE_DBFIELD
Definition: cmdid.h:192
const SvBaseLinks & GetLinks() const
#define FN_INSERT_TABLE
Definition: cmdid.h:207
GraphicType GetGraphicType() const
Definition: editsh.cxx:276
bool GetObjAttr(SfxItemSet &rSet) const
Attention: Ambiguities if multiple selections.
Definition: feshview.cxx:2676
const SwFrameFormat * GetFooterFormat() const
Definition: fmthdft.hxx:85
static bool PasteSpecial(SwWrtShell &rSh, TransferableDataHelper &, SotClipboardFormatId &rFormatUsed)
Definition: swdtflvr.cxx:3110
void NotifyRefreshListeners()
Definition: unotxdoc.cxx:2217
GraphicType GetType() const
bool IsAnySectionInDoc() const
Definition: edsect.cxx:119
void EndAction(const bool bIdleEnd=false, const bool DoSetPosX=false)
Definition: crsrsh.cxx:229
bool IsFormView() const
Definition: viewopt.hxx:423
bool EndAllTableBoxEdit()
Definition: trvltbl.cxx:919
Window class for the Writer edit area, this is the one handling mouse and keyboard events and doing t...
Definition: edtwin.hxx:59
bool GoNextBookmark()
Definition: wrtsh3.cxx:143
#define FN_UPDATE_CHARTS
Definition: cmdid.h:133
#define FN_FORMAT_PAGE_SETTING_DLG
Definition: cmdid.h:292
css::uno::Reference< css::datatransfer::XTransferable > GetXTransferable() const
#define LANGUAGE_SYSTEM
#define RES_VERT_ORIENT
Definition: hintids.hxx:207
SfxBindings & GetBindings()
int i
void SetAttrItem(const SfxPoolItem &, SetAttrMode nFlags=SetAttrMode::DEFAULT, const bool bParagraphSetting=false)
Definition: edatmisc.cxx:113
const OUString & GetValue() const
sal_uInt16 Count() const
FlyAnchors.
Definition: fmtanchr.hxx:34
const SwPageDesc & GetPageDesc(size_t i) const
Definition: fedesc.cxx:127
HTMLMODE_ON
bool SetFlyFrameAttr(SfxItemSet &rSet)
Definition: fefly1.cxx:1066
FrameTypeFlags
values can be combined via logical or
Definition: fesh.hxx:62
sal_uInt16 GetHtmlMode(const SwDocShell *pShell)
Definition: viewopt.cxx:339
size_t size() const
Definition: tblafmt.cxx:900
bool GetBoxBackground(std::shared_ptr< SvxBrushItem > &rToFill) const
FALSE ambiguous.
Definition: fetab.cxx:793
const T * GetArg(sal_uInt16 nSlotId) const
#define FN_REPAGINATE
Definition: cmdid.h:104
void SetAttrSet(const SfxItemSet &rSet)
Definition: frmmgr.cxx:599
SwUndoId StartUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Undo: set up Undo parenthesis, return nUndoId of this parenthesis.
Definition: edws.cxx:222
void SetPool(SfxItemPool *pNewPool)
static void UpdateIMapDlg(const Graphic &rGraphic, const ImageMap *pImageMap, const TargetList *pTargetList, void *pEditingObj)
#define FN_UPDATE_FIELDS
Definition: cmdid.h:74
void AddRule(SwUndoArg eWhat, const OUString &rWith)
Definition: SwRewriter.cxx:29
#define RES_CHRATR_BEGIN
Definition: hintids.hxx:68
#define FN_WRAP_ANCHOR_ONLY
Definition: cmdid.h:397
sal_Int16 GetHoriOrient() const
Definition: fmtornt.hxx:87
#define LANGUAGE_DONTKNOW
css::text::WrapTextMode GetSurround() const
Definition: fmtsrnd.hxx:51
void setSvxBrushItemAsFillAttributesToTargetSet(const SvxBrushItem &rBrush, SfxItemSet &rToSet)
bool IsUseInputLanguage() const
Definition: edtwin.hxx:262
void Execute(SfxRequest &)
Dispatcher.
Definition: docsh2.cxx:413
#define FN_FORMAT_TITLEPAGE_DLG
Definition: cmdid.h:323
static SwAbstractDialogFactory * Create()
Definition: swabstdlg.cxx:36
static void SetFrameMode(FlyMode eMode, SwWrtShell *pShell)
Definition: basesh.cxx:1945
static void StateDisableItems(SfxItemSet &)
Definition: basesh.cxx:1806
sal_uInt16 sal_Char * pName
static sal_uInt8 nParagraphPos
Definition: basesh.cxx:121
virtual ~SwBaseShell() override
Definition: basesh.cxx:1979
ring_container GetRingContainer()
Definition: ring.hxx:240
sal_uInt16 GetSlotId(sal_uInt16 nWhich) const
static void lcl_UpdateIMapDlg(SwWrtShell &rSh)
Definition: basesh.cxx:165
OUString SwResId(const char *pId)
Definition: swmodule.cxx:191
bool DelLeft()
Definition: delete.cxx:139
void ExecUndo(SfxRequest &)
Definition: basesh.cxx:479
void SetName(const OUString &rName)
Graphic GetIMapGraphic() const
Remove default parameter, because method always called this default value.
Definition: editsh.cxx:610
bool IsAutoUpdateFormat() const
Query / set bAutoUpdateFormat-flag.
Definition: format.hxx:168
#define FN_TOOL_ANCHOR_FRAME
Definition: cmdid.h:220
bool HasReadonlySel() const
Definition: crsrsh.cxx:3227
void GrabFocus()
RndStdIds GetAnchorId() const
Anchor type of selected object, RndStdIds::UNKNOWN if ambiguous or in case of frame selection...
Definition: feshview.cxx:2249
std::unique_ptr< SfxPoolItem > CloneSetWhich(sal_uInt16 nNewWhich) const
bool isXForms() const
Definition: docxforms.cxx:44
const Graphic * GetGraphic(bool bWait=true) const
Definition: editsh.cxx:244
SfxItemPool * GetPool() const
std::vector< OUString > & GetList()
#define FONT_GROUP_CJK
Definition: fontcfg.hxx:48
FlyProtectFlags IsSelObjProtected(FlyProtectFlags eType) const
Which Protection is set at selected object?
Definition: feshview.cxx:2613
bool HasMark()
Definition: crsrsh.hxx:873
static sal_uInt8 nFooterPos
Definition: basesh.cxx:130
bool GoPrevBookmark()
Definition: wrtsh3.cxx:164
SwDocShell * GetDocShell()
Definition: view.cxx:1115
SwFrameFormat * GetTableFormat()
Definition: edws.cxx:182
const void * GetEditingObject() const
#define FN_FORMAT_BORDER_DLG
Definition: cmdid.h:294
#define FN_FRAME_WRAPTHRU_TRANSP
Definition: cmdid.h:384
SwFrameFormat * GetTableStyle(const OUString &rFormatName)
Definition: wrtsh1.cxx:1500
SwFrameFormat * GetSelectedFrameFormat() const
If frame then frame style, else 0.
Definition: fefly1.cxx:1178
void StartAction()
Definition: crsrsh.cxx:212
static void FillClipFormatItem(const SwWrtShell &rSh, const TransferableDataHelper &rData, SvxClipboardFormatItem &rToFill)
Definition: swdtflvr.cxx:3182
void StateClpbrd(SfxItemSet &)
Definition: basesh.cxx:414
SelectionType
Definition: wrtsh.hxx:56
const ImageMap * GetMap() const
Definition: fmturl.hxx:68
virtual bool SetFormatAttr(const SfxPoolItem &rAttr)
Definition: format.cxx:460
void GetBckColState(SfxItemSet &rSet)
Definition: basesh.cxx:2200
OString OUStringToOString(const OUString &str, ConnectionSettings const *settings)
void SetReturnValue(const SfxPoolItem &)
void InsertTable(SfxRequest &_rRequest)
Definition: basesh.cxx:2590
const OUString & GetName() const
Definition: tblafmt.hxx:225
SdrLayerID GetLayerId() const
1 Heaven, 0 Hell, SDRLAYER_NOTFOUND Ambiguous.
Definition: feshview.cxx:1094
void CallChgLnk()
Definition: crsrsh.cxx:2414
#define FN_TOOL_ANCHOR_AT_CHAR
Definition: cmdid.h:264
bool GotoObj(bool bNext, GotoObjFlags eType=GotoObjFlags::DrawAny)
Definition: feshview.cxx:1667
#define FN_UPDATE_ALL
Definition: cmdid.h:124
IDocumentUndoRedo const & GetIDocumentUndoRedo() const
Provides access to the document undo/redo interface.
Definition: viewsh.cxx:2606
Class for automated call of Start- and EndCursorMove().
Definition: editsh.hxx:1024
SwFrameFormat & GetMaster()
Definition: pagedesc.hxx:216
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
#define FN_FRAME_WRAPTHRU
Definition: cmdid.h:310
static FlyMode eFrameMode
Definition: basesh.hxx:44
void GetState(SfxItemSet &)
Definition: basesh.cxx:1377
sal_uInt16 GetSlot() const
SwBaseShell(SwView &rShell)
Definition: basesh.cxx:1967
#define DEF_GUTTER_WIDTH
Definition: swtypes.hxx:69
bool HasChildWindow(sal_uInt16)
void SetGraphicPolygon(const tools::PolyPolygon *pPoly)
Definition: editsh.cxx:330
void SetStyleName(const OUString &rStyleName)
const css::uno::Reference< css::frame::XDispatchRecorder > & GetRecorder() const
const OUString & GetURL() const
SwWrtShell * GetWrtShellPtr() const
Definition: view.hxx:401
#define FN_FORMAT_BACKGROUND_DLG
Definition: cmdid.h:296
void DisableItem(sal_uInt16 nWhich)
#define FN_FORMAT_PAGE_COLUMN_DLG
Definition: cmdid.h:295
bool Left(sal_uInt16 nMode, bool bSelect, sal_uInt16 nCount, bool bBasicCall, bool bVisual=false)
Definition: move.cxx:102
SwMoveFnCollection const & fnTableStart
Definition: paminit.cxx:52
HTMLMODE_SOME_STYLES
SwUndoId GetRepeatInfo(OUString *const o_pStr) const
Definition: edws.cxx:250
static bool Paste(SwWrtShell &, TransferableDataHelper &, RndStdIds nAnchorType=RndStdIds::FLY_AT_PARA, bool bIgnoreComments=false)
Definition: swdtflvr.cxx:1252
#define FN_CONVERT_TEXT_TABLE
Definition: cmdid.h:326
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
sal_uInt16 GetWhich(sal_uInt16 nSlot, bool bDeep=true) const
virtual bool GetLastUndoInfo(OUString *const o_pStr, SwUndoId *const o_pId, const SwView *pView=nullptr) const =0
Get Id and comment of last Undo action.
#define RES_CHRATR_CTL_LANGUAGE
Definition: hintids.hxx:97
void UpdateAllLinks(bool bAskUpdate, bool bUpdateGrfLinks, weld::Window *pParentWin)
unsigned char sal_uInt8
#define RES_CHRATR_POSTURE
Definition: hintids.hxx:79
void LockView(bool b)
Definition: viewsh.hxx:465
#define GetWhich(nSlot)
const SwViewOption * GetViewOptions() const
Definition: viewsh.hxx:426
bool MoveTable(SwWhichTable, SwMoveFnCollection const &)
Definition: trvltbl.cxx:685
void Do(DoType eDoType, sal_uInt16 nCnt=1)
Definition: wrtundo.cxx:32
bool IsCursorPtAtEnd() const
Definition: crsrsh.hxx:890
bool IsTextToTableAvailable() const
Definition: edtab.cxx:183
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
Definition: unosett.cxx:259
void SetTableStyleName(const OUString &rName)
Set the new table style name for this table.
Definition: swtable.hxx:191
#define RES_OPAQUE
Definition: hintids.hxx:204
bool TableToText(sal_Unicode cCh)
Definition: edtab.cxx:136
RET_OK
IDocumentSettingAccess const & getIDocumentSettingAccess() const
Definition: doc.cxx:208
static sal_uInt8 nHeaderPos
Definition: basesh.cxx:129
#define FN_BACKSPACE
Definition: cmdid.h:637
void ChgPageDesc(size_t i, const SwPageDesc &)
Definition: fedesc.cxx:112
static const OUString & GetUIName(const OUString &rName, SwGetPoolIdFromName)
size_t IsObjSelected() const
Definition: feshview.cxx:1167
bool IsNoNum(bool bChkStart=true) const
Definition: ednumber.cxx:683
virtual bool DoesRepair() const =0
Is repair mode active?
void UnSelectFrame()
Definition: select.cxx:327
void StateUndo(SfxItemSet &)
Definition: basesh.cxx:548
const SfxPoolItem & GetFormatAttr(sal_uInt16 nWhich, bool bInParents=true) const
If bInParents is FALSE, search only in this format for attribute.
Definition: format.cxx:379
void AutoUpdateFrame(SwFrameFormat *pFormat, const SfxItemSet &rStyleSet)
Definition: wrtsh1.cxx:1592
#define FN_FORMAT_PAGE_DLG
Definition: cmdid.h:297
#define FN_CONVERT_TEXT_TO_TABLE
Definition: cmdid.h:354
sal_Int16 GetVertOrient() const
Definition: fmtornt.hxx:54
void InvalidateRulerPos()
Definition: viewport.cxx:118
#define FN_TOOL_ANCHOR_PARAGRAPH
Definition: cmdid.h:216
#define FN_PAGE_STYLE_SET_UL_MARGIN
Definition: cmdid.h:360
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
bool GetFirstRedoInfo(OUString *const o_pStr, SwUndoId *const o_pId, const SwView *pView=nullptr) const
Definition: edws.cxx:243
Header, for PageFormats Client of FrameFormat describing the header.
Definition: fmthdft.hxx:33
void ClearMark()
Definition: crsrsh.cxx:927
bool GetCurAttr(SfxItemSet &, const bool bMergeIndentValuesOfNumRule=false) const
Definition: edattr.cxx:181
void SetObjAttr(const SfxItemSet &rSet)
Definition: feshview.cxx:2699
virtual void CalcLayout() override
To enable set up of StartActions and EndActions.
Definition: edws.cxx:107
void GetTabBorders(SfxItemSet &rSet) const
Definition: fetab.cxx:780
void Execute(SfxRequest &)
void LeaveSelFrameMode()
Definition: select.cxx:721
void SetVertical(bool bVertical)
virtual VclPtr< VclAbstractDialog > CreateTitlePageDlg(weld::Window *pParent)=0
#define FN_UPDATE_INPUTFIELDS
Definition: cmdid.h:95
SW_DLLPUBLIC void PrepareBoxInfo(SfxItemSet &rSet, const SwWrtShell &rSh)
Definition: uitool.cxx:103
#define RES_BOX
Definition: hintids.hxx:211
void UpdateDocStat()
Document - Statistics.
Definition: editsh.cxx:431
#define FN_SHIFT_BACKSPACE
Definition: cmdid.h:652
const sal_uInt16 CRSR_SKIP_CHARS
Definition: swcrsr.hxx:63
void InvalidateAll(bool bWithMsg)
HTMLMODE_FULL_STYLES
void AppendItem(const SfxPoolItem &)
bool IsTableComplexForChart()
Definition: trvltbl.cxx:729
bool AddGrfUpdateSlot(sal_uInt16 nSlot)
Definition: basesh.hxx:61
#define FN_GOTO_PREV_MARK
Definition: cmdid.h:688
void Update(const Graphic &rGraphic, bool bGraphicLinked, const tools::PolyPolygon *pPolyPoly, void *pEditingObj)
Reference< XModel > xModel
RndStdIds
SwView & rView
Definition: basesh.hxx:41
void EnterSelFrameMode(const Point *pStartDrag=nullptr)
Definition: select.cxx:703
const SfxPoolItem * Execute(sal_uInt16 nSlot, SfxCallMode nCall=SfxCallMode::SLOT, const SfxPoolItem **pArgs=nullptr, sal_uInt16 nModi=0, const SfxPoolItem **pInternalArgs=nullptr)
void GotoFlyAnchor()
jump from the frame to the anchor
Definition: trvlfnfl.cxx:343
#define FN_CONVERT_TABLE_TO_TEXT
Definition: cmdid.h:355
SectionType GetType() const
Definition: section.hxx:171
void FormatPage(const OUString &rPage, const OString &rPageId, SwWrtShell &rActShell, SfxRequest *pRequest=nullptr)
Show page style format dialog.
Definition: docst.cxx:1374
static bool PasteUnformatted(SwWrtShell &rSh, TransferableDataHelper &)
Definition: swdtflvr.cxx:3104
const SwInsertTableOptions & GetInsTableFlags(bool bHTML) const
Definition: modcfg.hxx:300
LanguageType GetInputLanguage() const
void Init(sal_uInt16 nNumCols, sal_uInt16 nGutterWidth, sal_uInt16 nAct)
This function allows to (repeatedly) initialize the columns.
Definition: atrfrm.cxx:947
SelectionType GetSelectionType() const
Definition: wrtsh1.cxx:1373
virtual void ApplyViewOptions(const SwViewOption &rOpt) override
Apply ViewOptions with Start-/EndAction.
Definition: wrtsh1.cxx:1765
#define FN_ESCAPE
Definition: cmdid.h:651
void StartAllAction()
For all views of this document.
Definition: edws.cxx:85
bool IsLinkedGrfSwapOut() const
Definition: editsh.cxx:255
#define FN_PREV_BOOKMARK
Definition: cmdid.h:113
sal_Int32 nPos
void Ignore()
size_t GetCurPageDesc(const bool bCalcFrame=true) const
Definition: fedesc.cxx:168
void SetGutterWidth(sal_uInt16 nNew, sal_uInt16 nAct)
Adjusts borders for columns in aColumns.
Definition: atrfrm.cxx:927
void StateStyleSheet(SfxItemSet &, SwWrtShell *pSh=nullptr)
Definition: docst.cxx:94
#define FN_FRAME_NOWRAP
Definition: cmdid.h:308
::std::vector< OUString > TargetList
#define FN_GOTO_PREV_OBJ
Definition: cmdid.h:656
FrameTypeFlags GetFrameType(const Point *pPt, bool bStopAtFly) const
For return values see above FrameType.
Definition: fews.cxx:238
bool IsFrameSelected() const
Definition: feshview.cxx:1175
bool IsViewLocked() const
Definition: viewsh.hxx:464
void HideCursor()
Definition: crsrsh.cxx:2311
#define FN_FRAME_WRAP_CONTOUR
Definition: cmdid.h:402
Definition: view.hxx:146
const SwFrameFormat * GetHeaderFormat() const
Definition: fmthdft.hxx:54
const Color & GetValue() const
bool IsSelFrameMode() const
Definition: wrtsh.hxx:166
void UpdateFlyFrame()
Definition: frmmgr.cxx:138
virtual VclPtr< SfxAbstractDialog > CreateSwBorderDlg(weld::Window *pParent, SfxItemSet &rSet, SwBorderModes nType)=0
void ExecDelete(SfxRequest &)
Definition: basesh.cxx:202
SAL_DLLPRIVATE bool Load(SvStream &rStream)
Definition: tblafmt.cxx:1031
bool CursorInsideInputField() const
Definition: crstrvl.cxx:948