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