LibreOffice Module sw (master)  1
viewstat.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 <memory>
21 #include <config_features.h>
22 
23 #include <hintids.hxx>
24 #include <com/sun/star/linguistic2/XThesaurus.hpp>
25 #include <officecfg/Office/Common.hxx>
26 #include <svl/aeitem.hxx>
27 #include <svl/whiter.hxx>
28 #include <svl/cjkoptions.hxx>
29 #include <sfx2/viewfrm.hxx>
30 #include <sfx2/objitem.hxx>
31 #include <svl/imageitm.hxx>
32 #include <svl/languageoptions.hxx>
33 #include <svx/svxids.hrc>
34 #include <editeng/protitem.hxx>
35 #include <sfx2/linkmgr.hxx>
36 #include <editeng/langitem.hxx>
37 #include <editeng/brushitem.hxx>
38 #include <editeng/tstpitem.hxx>
39 #include <sfx2/htmlmode.hxx>
40 #include <editeng/unolingu.hxx>
41 #include <sfx2/msgpool.hxx>
42 #include <swmodule.hxx>
43 #include <tox.hxx>
44 #include <sfx2/dispatch.hxx>
45 #include <sfx2/app.hxx>
46 #include <view.hxx>
47 #include <wrtsh.hxx>
48 #include <basesh.hxx>
49 #include <uitool.hxx>
50 #include <viewopt.hxx>
51 #include <tablemgr.hxx>
52 #include <pagedesc.hxx>
53 #include <wview.hxx>
54 #include <globdoc.hxx>
55 #include <svl/stritem.hxx>
57 #include <comphelper/lok.hxx>
58 #include <LibreOfficeKit/LibreOfficeKitEnums.h>
59 #include <svl/visitem.hxx>
60 #include <redline.hxx>
61 #include <rootfrm.hxx>
62 #include <docary.hxx>
63 
64 #include <cmdid.h>
66 
67 #include <doc.hxx>
68 
69 using namespace ::com::sun::star;
70 
72 {
73  SfxWhichIter aIter(rSet);
74  sal_uInt16 nWhich = aIter.FirstWhich();
76  bool bGetFrameType = false;
77  bool bWeb = dynamic_cast<SwWebView*>( this ) != nullptr;
78 
79  while(nWhich)
80  {
81  switch(nWhich)
82  {
83  case FN_NAV_ELEMENT:
84  // used to update all instances of this control
85  rSet.InvalidateItem( nWhich );
86  break;
87  case FN_EDIT_LINK_DLG:
88  if( m_pWrtShell->GetLinkManager().GetLinks().empty() )
89  rSet.DisableItem(nWhich);
90  else if( m_pWrtShell->IsSelFrameMode() &&
92  {
93  rSet.DisableItem(nWhich);
94  }
95  break;
96 
97  case SID_DRAWTBX_LINES:
98  if ( bWeb )
99  rSet.DisableItem(nWhich);
100  break;
101 
102  case SID_INSERT_GRAPHIC:
103  if( m_pWrtShell->CursorInsideInputField() )
104  {
105  rSet.DisableItem(nWhich);
106  }
107  break;
108  case SID_INSERT_SIGNATURELINE:
111  {
112  rSet.DisableItem(nWhich);
113  }
114  break;
115  case SID_EDIT_SIGNATURELINE:
116  case SID_SIGN_SIGNATURELINE:
118  rSet.DisableItem(nWhich);
119  break;
120  case SID_INSERT_QRCODE:
122  m_nSelectionType & SelectionType::NumberList ) )
123  {
124  rSet.DisableItem(nWhich);
125  }
126  break;
127  case SID_EDIT_QRCODE:
128  if (!isQRCodeSelected())
129  rSet.DisableItem(nWhich);
130  break;
131  case FN_INSERT_CAPTION:
132  {
133  // There are captions for graphics, OLE objects, frames and tables
134  if( !bGetFrameType )
135  {
136  eFrameType = m_pWrtShell->GetFrameType(nullptr, true);
137  bGetFrameType = true;
138  }
142  {
143  rSet.DisableItem(nWhich);
144  }
145  else if((m_pWrtShell->IsObjSelected() || m_pWrtShell->IsFrameSelected()) &&
146  (m_pWrtShell->IsSelObjProtected( FlyProtectFlags::Parent) != FlyProtectFlags::NONE ||
148  {
149  rSet.DisableItem(nWhich);
150  }
151  else if( m_pWrtShell->IsTableMode()
153  || m_pWrtShell->CursorInsideInputField() )
154  {
155  rSet.DisableItem(nWhich);
156  }
157  }
158  break;
159 
160  case FN_EDIT_FOOTNOTE:
161  {
162  if( !m_pWrtShell->GetCurFootnote() )
163  rSet.DisableItem(nWhich);
164  }
165  break;
166 
167  case FN_CHANGE_PAGENUM:
168  {
169  FrameTypeFlags nType = m_pWrtShell->GetFrameType(nullptr,true);
172  rSet.DisableItem(nWhich);
173  else
174  rSet.Put(SfxUInt16Item(nWhich, m_pWrtShell->GetPageOffset()));
175  }
176  break;
177  case SID_PRINTDOC:
178  case SID_PRINTDOCDIRECT:
179  GetSlotState( nWhich, SfxViewShell::GetInterface(), &rSet );
180  break;
181  case SID_ATTR_PAGE_ORIENTATION:
182  case SID_ATTR_PAGE:
183  case SID_ATTR_PAGE_SIZE:
184  case SID_ATTR_PAGE_PAPERBIN:
185  case RES_PAPER_BIN:
186  case FN_PARAM_FTN_INFO:
187  {
188  const size_t nCurIdx = m_pWrtShell->GetCurPageDesc();
189  const SwPageDesc& rDesc = m_pWrtShell->GetPageDesc( nCurIdx );
190 
191  // set correct parent to get the XFILL_NONE FillStyle as needed
192  if(!rSet.GetParent())
193  {
194  const SwFrameFormat& rMaster = rDesc.GetMaster();
195 
196  rSet.SetParent(&rMaster.GetDoc()->GetDfltFrameFormat()->GetAttrSet());
197  }
198 
199  ::PageDescToItemSet( rDesc, rSet);
200  }
201  break;
202  case RES_BACKGROUND:
203  case SID_ATTR_BRUSH:
204  {
205  const size_t nCurIdx = m_pWrtShell->GetCurPageDesc();
206  const SwPageDesc& rDesc = m_pWrtShell->GetPageDesc( nCurIdx );
207  const SwFrameFormat& rMaster = rDesc.GetMaster();
208  const SvxBrushItem& rBrush = rMaster.GetFormatAttr(RES_BACKGROUND);
209  rSet.Put(rBrush);
210  }
211  break;
212  case SID_CLEARHISTORY:
213  {
214  rSet.Put(SfxBoolItem(nWhich, m_pWrtShell->GetLastUndoInfo(nullptr, nullptr)));
215  }
216  break;
217  case SID_UNDO:
218  {
219  // which must not be present, so let them create:
220  if( !m_pShell )
221  SelectShell();
222 
223  const SfxPoolItem* pState = m_pShell->GetSlotState(SID_UNDO);
224  if(pState)
225  rSet.Put(*pState);
226  else
227  rSet.DisableItem(nWhich);
228  }
229  break;
230  case FN_INSERT_OBJ_CTRL:
231  if( bWeb
232  || m_pWrtShell->CursorInsideInputField() )
233  {
234  rSet.DisableItem(nWhich);
235  }
236  break;
237 
238  case FN_UPDATE_TOX:
239  if(!m_pWrtShell->GetTOXCount())
240  rSet.DisableItem(nWhich);
241  break;
242  case FN_EDIT_CURRENT_TOX:
243  case FN_UPDATE_CUR_TOX:
244  {
245  const SwTOXBase* pBase = nullptr;
246  if(nullptr == (pBase = m_pWrtShell->GetCurTOX()) ||
247  (FN_EDIT_CURRENT_TOX == nWhich && pBase->IsTOXBaseInReadonly()))
248  rSet.DisableItem(nWhich);
249  }
250  break;
251  case SID_TWAIN_SELECT:
252  case SID_TWAIN_TRANSFER:
253 #if defined(_WIN32) || defined UNX
254  {
255  if(!SW_MOD()->GetScannerManager().is())
256  rSet.DisableItem(nWhich);
257  }
258 #endif
259  break;
260  case RES_PARATR_TABSTOP:
261  case SID_ATTR_DEFTABSTOP:
262  {
263  const SvxTabStopItem& rDefTabs = m_pWrtShell->GetDefault(RES_PARATR_TABSTOP);
264  rSet.Put( SfxUInt16Item( nWhich,
265  static_cast<sal_uInt16>(::GetTabDist(rDefTabs))));
266  }
267  break;
268  case SID_ATTR_LANGUAGE:
269  {
270  rSet.Put(m_pWrtShell->GetDefault(RES_CHRATR_LANGUAGE).CloneSetWhich(SID_ATTR_LANGUAGE));
271  }
272  break;
274  {
275  rSet.Put(m_pWrtShell->GetDefault(RES_CHRATR_CJK_LANGUAGE)
276  .CloneSetWhich(RES_CHRATR_CJK_LANGUAGE));
277  }
278  break;
280  {
281  rSet.Put(m_pWrtShell->GetDefault(RES_CHRATR_CTL_LANGUAGE)
282  .CloneSetWhich(RES_CHRATR_CTL_LANGUAGE));
283  }
284  break;
285  case FN_REDLINE_ON:
286  rSet.Put( SfxBoolItem( nWhich, GetDocShell()->IsChangeRecording() ) );
287  break;
288  case FN_REDLINE_PROTECT :
289  rSet.Put( SfxBoolItem( nWhich, GetDocShell()->HasChangeRecordProtection() ) );
290  break;
291  case FN_REDLINE_SHOW:
292  {
293  uno::Reference<uno::XComponentContext> const xContext(
295  rSet.Put(SfxBoolItem(nWhich, !m_pWrtShell->GetLayout()->IsHideRedlines()));
296  }
297  break;
298  case SID_AVMEDIA_PLAYER :
299  case FN_REDLINE_ACCEPT :
300  {
301  SfxViewFrame* pVFrame = GetViewFrame();
302  if (pVFrame->KnowsChildWindow(nWhich))
303  rSet.Put(SfxBoolItem( nWhich, pVFrame->HasChildWindow(nWhich)));
304  else
305  rSet.DisableItem(nWhich);
306  }
307  break;
312  {
313  SwDoc *pDoc = m_pWrtShell->GetDoc();
314  SwPaM *pCursor = m_pWrtShell->GetCursor();
315  bool bDisable = false;
316  if (GetDocShell()->HasChangeRecordProtection())
317  bDisable = true;
318  else if (pCursor->HasMark())
319  {
320  // If the selection does not contain redlines, disable accepting/rejecting changes.
323  const SwRangeRedline* redline = table.FindAtPosition( *pCursor->Start(), index );
324  if( redline != nullptr && *redline->Start() == *pCursor->End())
325  redline = nullptr;
326  if( redline == nullptr )
327  {
328  for(; index < table.size(); ++index )
329  {
330  const SwRangeRedline* tmp = table[ index ];
331  if( *tmp->Start() >= *pCursor->End())
332  break;
333  if( tmp->HasMark() && tmp->IsVisible())
334  {
335  redline = tmp;
336  break;
337  }
338  }
339  }
340  if( redline == nullptr )
341  bDisable = true;
342  }
343  else
344  {
345  // If the cursor position isn't on a redline, disable
346  // accepting/rejecting changes.
347  if (nullptr == pDoc->getIDocumentRedlineAccess().GetRedline(*pCursor->Start(), nullptr))
348  bDisable = true;
349  }
350 
351  // LibreOfficeKit wants to handle changes by index, so always allow here.
352  if (bDisable)
353  rSet.DisableItem(nWhich);
355  {
356  OString aPayload(".uno:TrackedChangeIndex=");
357  SwRedlineTable::size_type nRedline = 0;
358  if (pDoc->getIDocumentRedlineAccess().GetRedline(*pCursor->Start(), &nRedline))
359  aPayload += OString::number(nRedline);
360  libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, aPayload.getStr());
361  }
362  }
363  break;
364 
367  {
368  // Enable change navigation if we have any redlines. Ideally we should disable
369  // "Next Change" if we're at or past the last change, and similarly for
370  // "Previous Change"
371  if (0 == m_pWrtShell->GetRedlineCount())
372  rSet.DisableItem(nWhich);
373  }
374  break;
375 
376  case SID_THESAURUS:
377  {
378  SwWrtShell &rSh = GetWrtShell();
379  if (2 <= rSh.GetCursorCnt()) // multi selection?
380  rSet.DisableItem(nWhich);
381  else
382  {
383  LanguageType nLang = rSh.GetCurLang();
384 
385  // disable "Thesaurus" (menu entry and key shortcut) if the
386  // language is not supported (by default it is enabled)
387  uno::Reference< linguistic2::XThesaurus > xThes( ::GetThesaurus() );
388  if (!xThes.is() || nLang == LANGUAGE_NONE ||
389  !xThes->hasLocale( LanguageTag::convertToLocale( nLang ) ))
390  rSet.DisableItem(nWhich);
391  }
392  }
393  break;
394  case SID_HANGUL_HANJA_CONVERSION:
395  case SID_CHINESE_CONVERSION:
396  {
397  if (!SvtCJKOptions().IsAnyEnabled())
398  {
399  GetViewFrame()->GetBindings().SetVisibleState( nWhich, false );
400  rSet.DisableItem(nWhich);
401  }
402  else
403  GetViewFrame()->GetBindings().SetVisibleState( nWhich, true );
404  }
405  break;
406  case SID_MAIL_SCROLLBODY_PAGEDOWN:
407  {
408  const long nBottom = m_pWrtShell->GetDocSize().Height() + DOCUMENTBORDER;
409  const long nAct = GetVisArea().Bottom();
410  rSet.Put(SfxBoolItem(SID_MAIL_SCROLLBODY_PAGEDOWN, nAct < nBottom ));
411  }
412  break;
413 
414  case SID_DOCUMENT_COMPARE:
415  case SID_DOCUMENT_MERGE:
416  if( dynamic_cast<const SwGlobalDocShell* >(GetDocShell()) != nullptr||
417  (SID_DOCUMENT_MERGE == nWhich && m_pWrtShell->getIDocumentRedlineAccess().GetRedlinePassword().hasElements()))
418  rSet.DisableItem(nWhich);
419  break;
420  case SID_VIEW_DATA_SOURCE_BROWSER:
421  if ( !SvtModuleOptions().IsModuleInstalled( SvtModuleOptions::EModule::DATABASE ) )
422  rSet.Put( SfxVisibilityItem( nWhich, false ) );
423  else
424  rSet.Put( SfxBoolItem( nWhich, GetViewFrame()->HasChildWindow( SID_BROWSER ) ) );
425  break;
426  case SID_READONLY_MODE:
427  rSet.Put(SfxBoolItem(nWhich,
428  m_pWrtShell->HasReadonlySel()||GetDocShell()->IsReadOnly()));
429  break;
430  case SID_IMAGE_ORIENTATION:
431  {
432  SfxImageItem aImageItem(nWhich);
433  if(m_pWrtShell->IsInVerticalText())
434  aImageItem.SetRotation( 2700 );
435  if(m_pWrtShell->IsInRightToLeftText())
436  aImageItem.SetMirrored( true );
437  rSet.Put(aImageItem);
438  }
439  break;
441  if(!m_bInMailMerge && !GetViewFrame()->HasChildWindow(nWhich))
442  rSet.DisableItem(nWhich);
443  break;
445  break;
446  case SID_ALIGN_ANY_LEFT :
447  case SID_ALIGN_ANY_HCENTER :
448  case SID_ALIGN_ANY_RIGHT :
449  case SID_ALIGN_ANY_JUSTIFIED:
450  case SID_ALIGN_ANY_TOP :
451  case SID_ALIGN_ANY_VCENTER :
452  case SID_ALIGN_ANY_BOTTOM :
453  case SID_ALIGN_ANY_HDEFAULT :
454  case SID_ALIGN_ANY_VDEFAULT :
455  {
456  if( !m_pShell )
457  SelectShell();
458  sal_uInt16 nAlias = 0;
460  {
461  switch( nWhich )
462  {
463  case SID_ALIGN_ANY_LEFT : nAlias = SID_ATTR_PARA_ADJUST_LEFT; break;
464  case SID_ALIGN_ANY_HCENTER : nAlias = SID_ATTR_PARA_ADJUST_CENTER; break;
465  case SID_ALIGN_ANY_RIGHT : nAlias = SID_ATTR_PARA_ADJUST_RIGHT; break;
466  case SID_ALIGN_ANY_JUSTIFIED: nAlias = SID_ATTR_PARA_ADJUST_BLOCK; break;
467  case SID_ALIGN_ANY_TOP : nAlias = SID_TABLE_VERT_NONE; break;
468  case SID_ALIGN_ANY_VCENTER : nAlias = SID_TABLE_VERT_CENTER; break;
469  case SID_ALIGN_ANY_BOTTOM : nAlias = SID_TABLE_VERT_BOTTOM; break;
470  }
471  }
472  else
473  {
474  switch( nWhich )
475  {
476  case SID_ALIGN_ANY_LEFT : nAlias = SID_OBJECT_ALIGN_LEFT ; break;
477  case SID_ALIGN_ANY_HCENTER : nAlias = SID_OBJECT_ALIGN_CENTER ; break;
478  case SID_ALIGN_ANY_RIGHT : nAlias = SID_OBJECT_ALIGN_RIGHT ; break;
479  case SID_ALIGN_ANY_TOP : nAlias = SID_OBJECT_ALIGN_UP ; break;
480  case SID_ALIGN_ANY_VCENTER : nAlias = SID_OBJECT_ALIGN_MIDDLE ; break;
481  case SID_ALIGN_ANY_BOTTOM : nAlias = SID_OBJECT_ALIGN_DOWN ; break;
482  }
483  }
484  //these slots are either re-mapped to text or object alignment
485  const SfxPoolItem* pState = nullptr;
486  if(nAlias)
487  GetViewFrame()->GetDispatcher()->QueryState( nAlias, pState );
488  if(pState)
489  {
491  {
492  rSet.Put(pState->CloneSetWhich(nWhich));
493  }
494  }
495  else
496  rSet.DisableItem(nWhich);
497  }
498  break;
499  }
500  nWhich = aIter.NextWhich();
501  }
502 }
503 
505 {
506  SfxWhichIter aIter(rSet);
507  bool bWeb = dynamic_cast<SwWebView*>( this ) != nullptr;
508 
509  for( sal_uInt16 nWhich = aIter.FirstWhich(); nWhich;
510  nWhich = aIter.NextWhich() )
511  switch(nWhich)
512  {
513  case SID_DRAW_LINE:
514  case SID_DRAW_XLINE:
515  case SID_LINE_ARROW_END:
516  case SID_LINE_ARROW_CIRCLE:
517  case SID_LINE_ARROW_SQUARE:
518  case SID_LINE_ARROW_START:
519  case SID_LINE_CIRCLE_ARROW:
520  case SID_LINE_SQUARE_ARROW:
521  case SID_LINE_ARROWS:
522  case SID_DRAW_MEASURELINE:
523  case SID_DRAW_RECT:
524  case SID_DRAW_ELLIPSE:
525  case SID_DRAW_XPOLYGON_NOFILL:
526  case SID_DRAW_XPOLYGON:
527  case SID_DRAW_POLYGON_NOFILL:
528  case SID_DRAW_POLYGON:
529  case SID_DRAW_BEZIER_NOFILL:
530  case SID_DRAW_BEZIER_FILL:
531  case SID_DRAW_FREELINE_NOFILL:
532  case SID_DRAW_FREELINE:
533  case SID_DRAW_ARC:
534  case SID_DRAW_PIE:
535  case SID_DRAW_CIRCLECUT:
536  case SID_DRAW_TEXT:
537  case SID_DRAW_CAPTION:
538  if ( bWeb )
539  rSet.DisableItem( nWhich );
540  else
541  rSet.Put( SfxBoolItem( nWhich, m_nDrawSfxId == nWhich ) );
542  break;
543 
544  case SID_DRAW_TEXT_VERTICAL:
545  case SID_DRAW_CAPTION_VERTICAL:
546  if ( bWeb || !SvtLanguageOptions().IsVerticalTextEnabled() )
547  rSet.DisableItem( nWhich );
548  else
549  rSet.Put( SfxBoolItem( nWhich, m_nDrawSfxId == nWhich ) );
550  break;
551 
552  case SID_DRAW_TEXT_MARQUEE:
554  rSet.Put( SfxBoolItem(nWhich, m_nDrawSfxId == nWhich));
555  else
556  rSet.DisableItem(nWhich);
557  break;
558  case SID_OBJECT_SELECT:
559  rSet.Put( SfxBoolItem(nWhich, m_nDrawSfxId == nWhich ||
560  m_nFormSfxId == nWhich));
561  break;
562 
563  case SID_INSERT_DRAW:
564  case SID_FONTWORK_GALLERY_FLOATER :
565  case SID_DRAWTBX_ARROWS:
566  {
567  if ( bWeb )
568  rSet.DisableItem( nWhich );
569  }
570  break;
571 
572  case SID_DRAWTBX_CS_BASIC :
573  case SID_DRAWTBX_CS_SYMBOL :
574  case SID_DRAWTBX_CS_ARROW :
575  case SID_DRAWTBX_CS_FLOWCHART :
576  case SID_DRAWTBX_CS_CALLOUT :
577  case SID_DRAWTBX_CS_STAR :
578  {
579  if ( bWeb )
580  rSet.DisableItem( nWhich );
581  else
582  rSet.Put( SfxStringItem( nWhich, m_nDrawSfxId == nWhich ? m_sDrawCustom : OUString() ) );
583  }
584  break;
585 
586  }
587 }
588 
590 {
591  assert((nFeature & ~SfxShellFeature::SwMask) == SfxShellFeature::NONE);
592  switch(nFeature)
593  {
594  case SfxShellFeature::SwChildWindowLabel:
595  return m_pWrtShell->IsLabelDoc();
596  default:
597  return false;
598  }
599 }
600 
601 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxViewFrame * GetViewFrame() const
#define LANGUAGE_NONE
#define FN_UPDATE_TOX
Definition: cmdid.h:488
#define RES_CHRATR_CJK_LANGUAGE
Definition: hintids.hxx:93
void SetMirrored(bool bSet)
void GetDrawState(SfxItemSet &rSet)
Definition: viewstat.cxx:504
#define RES_CHRATR_LANGUAGE
Definition: hintids.hxx:79
#define FN_EDIT_FOOTNOTE
Definition: cmdid.h:105
std::unique_ptr< SwWrtShell > m_pWrtShell
Definition: view.hxx:183
SfxDispatcher * GetDispatcher()
#define FN_INSERT_CAPTION
Definition: cmdid.h:195
Check only parents.
Definition: doc.hxx:185
void InvalidateItem(sal_uInt16 nWhich)
sal_uInt16 FirstWhich()
SW_DLLPUBLIC SwTwips GetTabDist(const SvxTabStopItem &rTabs)
Definition: uitool.cxx:604
bool IsTOXBaseInReadonly() const
Definition: doctxm.cxx:2013
bool isSignatureLineSigned() const
Definition: viewdlg2.cxx:125
sal_uInt16 NextWhich()
SwWrtShell & GetWrtShell() const
Definition: view.hxx:400
static LanguageType nLang
Definition: srtdlg.cxx:60
size_type size() const
Definition: docary.hxx:368
LanguageType GetCurLang() const
Definition: edattr.cxx:813
Used by the UI to modify the document model.
Definition: wrtsh.hxx:90
sal_uInt16 m_nFormSfxId
Definition: view.hxx:218
SelectionType m_nSelectionType
Definition: view.hxx:212
virtual void SelectShell()
Definition: view.cxx:260
#define FN_EDIT_LINK_DLG
Definition: cmdid.h:70
#define RES_PARATR_TABSTOP
Definition: hintids.hxx:167
#define FN_EDIT_CURRENT_TOX
Definition: cmdid.h:131
void libreOfficeKitViewCallback(int nType, const char *pPayload) const override
#define FN_PARAM_FTN_INFO
Definition: cmdid.h:748
OUString m_sDrawCustom
Definition: view.hxx:217
#define RES_PAPER_BIN
Definition: hintids.hxx:197
#define FN_INSERT_FIELD_DATA_ONLY
Definition: cmdid.h:204
#define FN_MAILMERGE_SENDMAIL_CHILDWINDOW
Definition: cmdid.h:259
#define RES_BACKGROUND
Definition: hintids.hxx:212
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:136
#define FN_REDLINE_ACCEPT_DIRECT
Definition: cmdid.h:136
#define FN_CHANGE_PAGENUM
Definition: cmdid.h:480
Style of a layout element.
Definition: frmfmt.hxx:57
#define SW_MOD()
Definition: swmodule.hxx:256
const SfxItemSet * GetParent() const
const SfxPoolItem * GetSlotState(sal_uInt16 nSlotId, const SfxInterface *pIF=nullptr, SfxItemSet *pStateSet=nullptr)
virtual bool HasUIFeature(SfxShellFeature nFeature) const override
Definition: viewstat.cxx:589
SfxShellFeature
#define FN_REDLINE_ACCEPT_TONEXT
Definition: cmdid.h:144
SfxBindings & GetBindings()
QPRO_FUNC_TYPE const nType
vector_type::size_type size_type
Definition: docary.hxx:330
#define FN_REDLINE_PREV_CHANGE
Definition: cmdid.h:141
bool HasMark() const
A PaM marks a selection if Point and Mark are distinct positions.
Definition: pam.hxx:205
FrameTypeFlags
values can be combined via logical or
Definition: fesh.hxx:62
sal_uInt16 GetHtmlMode(const SwDocShell *pShell)
Definition: viewopt.cxx:340
long Bottom() const
const SwRangeRedline * FindAtPosition(const SwPosition &startPosition, size_type &tableIndex, bool next=true) const
Find the redline at the given position.
Definition: docredln.cxx:695
sal_uInt16 GetCursorCnt(bool bAll=true) const
Get the number of elements in the ring of cursors.
Definition: crsrsh.cxx:2700
#define FN_UPDATE_CUR_TOX
Definition: cmdid.h:489
tuple index
const SwDoc * GetDoc() const
The document is set in SwAttrPool now, therefore you always can access it.
Definition: format.hxx:119
SfxItemState QueryState(sal_uInt16 nSID, const SfxPoolItem *&rpState)
#define FN_REDLINE_REJECT_TONEXT
Definition: cmdid.h:145
std::unique_ptr< SfxPoolItem > CloneSetWhich(sal_uInt16 nNewWhich) const
const SwPosition * Start() const
Definition: pam.hxx:212
bool IsVisible() const
Definition: redline.hxx:188
SwDocShell * GetDocShell()
Definition: view.cxx:1127
bool IsReadOnly() const
const SwFrameFormat * GetDfltFrameFormat() const
Definition: doc.hxx:740
virtual const SwRangeRedline * GetRedline(const SwPosition &rPos, SwRedlineTable::size_type *pFndPos) const =0
void SetParent(const SfxItemSet *pNew)
SwFrameFormat & GetMaster()
Definition: pagedesc.hxx:217
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
#define FN_NAV_ELEMENT
Definition: cmdid.h:180
bool HasChildWindow(sal_uInt16)
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
Definition: doc.cxx:334
void DisableItem(sal_uInt16 nWhich)
HTMLMODE_SOME_STYLES
#define RES_CHRATR_CTL_LANGUAGE
Definition: hintids.hxx:98
void PageDescToItemSet(const SwPageDesc &rPageDesc, SfxItemSet &rSet)
Definition: uitool.cxx:428
#define FN_REDLINE_NEXT_CHANGE
Definition: cmdid.h:140
bool isSignatureLineSelected() const
Definition: viewdlg2.cxx:104
uno::Reference< linguistic2::XThesaurus > GetThesaurus()
Definition: swtypes.cxx:55
void SetRotation(long nValue)
bool KnowsChildWindow(sal_uInt16)
const SwPosition * End() const
Definition: pam.hxx:217
Reference< XComponentContext > getProcessComponentContext()
const SfxPoolItem & GetFormatAttr(sal_uInt16 nWhich, bool bInParents=true) const
If bInParents is FALSE, search only in this format for attribute.
Definition: format.cxx:377
const tools::Rectangle & GetVisArea() const
Definition: view.hxx:413
virtual SfxInterface * GetInterface() const
void SetVisibleState(sal_uInt16 nId, bool bShow)
sal_uInt16 m_nDrawSfxId
Definition: view.hxx:216
SfxShell * m_pShell
Definition: view.hxx:186
bool m_bInMailMerge
Definition: view.hxx:229
#define FN_INSERT_OBJ_CTRL
Definition: cmdid.h:246
const SwAttrSet & GetAttrSet() const
For querying the attribute array.
Definition: format.hxx:116
virtual const SwRedlineTable & GetRedlineTable() const =0
#define DOCUMENTBORDER
Definition: swtypes.hxx:82
#define FN_REDLINE_SHOW
Definition: cmdid.h:121
#define FN_REDLINE_REJECT_DIRECT
Definition: cmdid.h:137
#define FN_REDLINE_ACCEPT
Definition: cmdid.h:129
bool isQRCodeSelected() const
Definition: viewdlg2.cxx:146
static css::lang::Locale convertToLocale(LanguageType nLangID, bool bResolveSystem=true)
void GetState(SfxItemSet &)
Definition: viewstat.cxx:71