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  break;
192  case RES_BACKGROUND:
193  case SID_ATTR_BRUSH:
194  {
195  const size_t nCurIdx = m_pWrtShell->GetCurPageDesc();
196  const SwPageDesc& rDesc = m_pWrtShell->GetPageDesc( nCurIdx );
197  const SwFrameFormat& rMaster = rDesc.GetMaster();
198  const SvxBrushItem& rBrush = rMaster.GetFormatAttr(RES_BACKGROUND);
199  rSet.Put(rBrush);
200  }
201  break;
202  case SID_CLEARHISTORY:
203  {
204  rSet.Put(SfxBoolItem(nWhich, m_pWrtShell->GetLastUndoInfo(nullptr, nullptr)));
205  }
206  break;
207  case SID_UNDO:
208  {
209  // which must not be present, so let them create:
210  if( !m_pShell )
211  SelectShell();
212 
213  const SfxPoolItem* pState = m_pShell->GetSlotState(SID_UNDO);
214  if(pState)
215  rSet.Put(*pState);
216  else
217  rSet.DisableItem(nWhich);
218  }
219  break;
220  case FN_INSERT_OBJ_CTRL:
221  if( bWeb
222  || m_pWrtShell->CursorInsideInputField() )
223  {
224  rSet.DisableItem(nWhich);
225  }
226  break;
227 
228  case FN_UPDATE_TOX:
229  if(!m_pWrtShell->GetTOXCount())
230  rSet.DisableItem(nWhich);
231  break;
232  case FN_EDIT_CURRENT_TOX:
233  case FN_UPDATE_CUR_TOX:
234  {
235  const SwTOXBase* pBase = nullptr;
236  if(nullptr == (pBase = m_pWrtShell->GetCurTOX()) ||
237  (FN_EDIT_CURRENT_TOX == nWhich && pBase->IsTOXBaseInReadonly()))
238  rSet.DisableItem(nWhich);
239  }
240  break;
241  case SID_TWAIN_SELECT:
242  case SID_TWAIN_TRANSFER:
243 #if defined(_WIN32) || defined UNX
244  {
245  if(!SW_MOD()->GetScannerManager().is())
246  rSet.DisableItem(nWhich);
247  }
248 #endif
249  break;
250  case RES_PARATR_TABSTOP:
251  case SID_ATTR_DEFTABSTOP:
252  {
253  const SvxTabStopItem& rDefTabs = m_pWrtShell->GetDefault(RES_PARATR_TABSTOP);
254  rSet.Put( SfxUInt16Item( nWhich,
255  static_cast<sal_uInt16>(::GetTabDist(rDefTabs))));
256  }
257  break;
258  case SID_ATTR_LANGUAGE:
259  {
260  rSet.Put(m_pWrtShell->GetDefault(RES_CHRATR_LANGUAGE).CloneSetWhich(SID_ATTR_LANGUAGE));
261  }
262  break;
264  {
265  rSet.Put(m_pWrtShell->GetDefault(RES_CHRATR_CJK_LANGUAGE)
266  .CloneSetWhich(RES_CHRATR_CJK_LANGUAGE));
267  }
268  break;
270  {
271  rSet.Put(m_pWrtShell->GetDefault(RES_CHRATR_CTL_LANGUAGE)
272  .CloneSetWhich(RES_CHRATR_CTL_LANGUAGE));
273  }
274  break;
275  case FN_REDLINE_ON:
276  rSet.Put( SfxBoolItem( nWhich, GetDocShell()->IsChangeRecording() ) );
277  break;
278  case FN_REDLINE_PROTECT :
279  rSet.Put( SfxBoolItem( nWhich, GetDocShell()->HasChangeRecordProtection() ) );
280  break;
281  case FN_REDLINE_SHOW:
282  {
283  uno::Reference<uno::XComponentContext> const xContext(
285  rSet.Put(SfxBoolItem(nWhich, !m_pWrtShell->GetLayout()->IsHideRedlines()));
286  }
287  break;
288  case SID_AVMEDIA_PLAYER :
289  case FN_REDLINE_ACCEPT :
290  {
291  SfxViewFrame* pVFrame = GetViewFrame();
292  if (pVFrame->KnowsChildWindow(nWhich))
293  rSet.Put(SfxBoolItem( nWhich, pVFrame->HasChildWindow(nWhich)));
294  else
295  rSet.DisableItem(nWhich);
296  }
297  break;
302  {
303  SwDoc *pDoc = m_pWrtShell->GetDoc();
304  SwPaM *pCursor = m_pWrtShell->GetCursor();
305  bool bDisable = false;
306  if (GetDocShell()->HasChangeRecordProtection())
307  bDisable = true;
308  else if (pCursor->HasMark())
309  {
310  // If the selection does not contain redlines, disable accepting/rejecting changes.
313  const SwRangeRedline* redline = table.FindAtPosition( *pCursor->Start(), index );
314  if( redline != nullptr && *redline->Start() == *pCursor->End())
315  redline = nullptr;
316  if( redline == nullptr )
317  {
318  for(; index < table.size(); ++index )
319  {
320  const SwRangeRedline* tmp = table[ index ];
321  if( *tmp->Start() >= *pCursor->End())
322  break;
323  if( tmp->HasMark() && tmp->IsVisible())
324  {
325  redline = tmp;
326  break;
327  }
328  }
329  }
330  if( redline == nullptr )
331  bDisable = true;
332  }
333  else
334  {
335  // If the cursor position isn't on a redline, disable
336  // accepting/rejecting changes.
337  if (nullptr == pDoc->getIDocumentRedlineAccess().GetRedline(*pCursor->Start(), nullptr))
338  bDisable = true;
339  }
340 
341  // LibreOfficeKit wants to handle changes by index, so always allow here.
342  if (bDisable)
343  rSet.DisableItem(nWhich);
345  {
346  OString aPayload(".uno:TrackedChangeIndex=");
347  SwRedlineTable::size_type nRedline = 0;
348  if (pDoc->getIDocumentRedlineAccess().GetRedline(*pCursor->Start(), &nRedline))
349  aPayload += OString::number(nRedline);
350  libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, aPayload.getStr());
351  }
352  }
353  break;
354 
357  {
358  // Enable change navigation if we have any redlines. Ideally we should disable
359  // "Next Change" if we're at or past the last change, and similarly for
360  // "Previous Change"
361  if (0 == m_pWrtShell->GetRedlineCount())
362  rSet.DisableItem(nWhich);
363  }
364  break;
365 
366  case SID_THESAURUS:
367  {
368  SwWrtShell &rSh = GetWrtShell();
369  if (2 <= rSh.GetCursorCnt()) // multi selection?
370  rSet.DisableItem(nWhich);
371  else
372  {
373  LanguageType nLang = rSh.GetCurLang();
374 
375  // disable "Thesaurus" (menu entry and key shortcut) if the
376  // language is not supported (by default it is enabled)
377  uno::Reference< linguistic2::XThesaurus > xThes( ::GetThesaurus() );
378  if (!xThes.is() || nLang == LANGUAGE_NONE ||
379  !xThes->hasLocale( LanguageTag::convertToLocale( nLang ) ))
380  rSet.DisableItem(nWhich);
381  }
382  }
383  break;
384  case SID_HANGUL_HANJA_CONVERSION:
385  case SID_CHINESE_CONVERSION:
386  {
387  if (!SvtCJKOptions().IsAnyEnabled())
388  {
389  GetViewFrame()->GetBindings().SetVisibleState( nWhich, false );
390  rSet.DisableItem(nWhich);
391  }
392  else
393  GetViewFrame()->GetBindings().SetVisibleState( nWhich, true );
394  }
395  break;
396  case SID_MAIL_SCROLLBODY_PAGEDOWN:
397  {
398  const long nBottom = m_pWrtShell->GetDocSize().Height() + DOCUMENTBORDER;
399  const long nAct = GetVisArea().Bottom();
400  rSet.Put(SfxBoolItem(SID_MAIL_SCROLLBODY_PAGEDOWN, nAct < nBottom ));
401  }
402  break;
403 
404  case SID_DOCUMENT_COMPARE:
405  case SID_DOCUMENT_MERGE:
406  if( dynamic_cast<const SwGlobalDocShell* >(GetDocShell()) != nullptr||
407  (SID_DOCUMENT_MERGE == nWhich && m_pWrtShell->getIDocumentRedlineAccess().GetRedlinePassword().hasElements()))
408  rSet.DisableItem(nWhich);
409  break;
410  case SID_VIEW_DATA_SOURCE_BROWSER:
411  if ( !SvtModuleOptions().IsModuleInstalled( SvtModuleOptions::EModule::DATABASE ) )
412  rSet.Put( SfxVisibilityItem( nWhich, false ) );
413  else
414  rSet.Put( SfxBoolItem( nWhich, GetViewFrame()->HasChildWindow( SID_BROWSER ) ) );
415  break;
416  case SID_READONLY_MODE:
417  rSet.Put(SfxBoolItem(nWhich,
418  m_pWrtShell->HasReadonlySel()||GetDocShell()->IsReadOnly()));
419  break;
420  case SID_IMAGE_ORIENTATION:
421  {
422  SfxImageItem aImageItem(nWhich);
423  if(m_pWrtShell->IsInVerticalText())
424  aImageItem.SetRotation( 2700 );
425  if(m_pWrtShell->IsInRightToLeftText())
426  aImageItem.SetMirrored( true );
427  rSet.Put(aImageItem);
428  }
429  break;
431  if(!m_bInMailMerge && !GetViewFrame()->HasChildWindow(nWhich))
432  rSet.DisableItem(nWhich);
433  break;
435  break;
436  case SID_ALIGN_ANY_LEFT :
437  case SID_ALIGN_ANY_HCENTER :
438  case SID_ALIGN_ANY_RIGHT :
439  case SID_ALIGN_ANY_JUSTIFIED:
440  case SID_ALIGN_ANY_TOP :
441  case SID_ALIGN_ANY_VCENTER :
442  case SID_ALIGN_ANY_BOTTOM :
443  case SID_ALIGN_ANY_HDEFAULT :
444  case SID_ALIGN_ANY_VDEFAULT :
445  {
446  if( !m_pShell )
447  SelectShell();
448  sal_uInt16 nAlias = 0;
450  {
451  switch( nWhich )
452  {
453  case SID_ALIGN_ANY_LEFT : nAlias = SID_ATTR_PARA_ADJUST_LEFT; break;
454  case SID_ALIGN_ANY_HCENTER : nAlias = SID_ATTR_PARA_ADJUST_CENTER; break;
455  case SID_ALIGN_ANY_RIGHT : nAlias = SID_ATTR_PARA_ADJUST_RIGHT; break;
456  case SID_ALIGN_ANY_JUSTIFIED: nAlias = SID_ATTR_PARA_ADJUST_BLOCK; break;
457  case SID_ALIGN_ANY_TOP : nAlias = SID_TABLE_VERT_NONE; break;
458  case SID_ALIGN_ANY_VCENTER : nAlias = SID_TABLE_VERT_CENTER; break;
459  case SID_ALIGN_ANY_BOTTOM : nAlias = SID_TABLE_VERT_BOTTOM; break;
460  }
461  }
462  else
463  {
464  switch( nWhich )
465  {
466  case SID_ALIGN_ANY_LEFT : nAlias = SID_OBJECT_ALIGN_LEFT ; break;
467  case SID_ALIGN_ANY_HCENTER : nAlias = SID_OBJECT_ALIGN_CENTER ; break;
468  case SID_ALIGN_ANY_RIGHT : nAlias = SID_OBJECT_ALIGN_RIGHT ; break;
469  case SID_ALIGN_ANY_TOP : nAlias = SID_OBJECT_ALIGN_UP ; break;
470  case SID_ALIGN_ANY_VCENTER : nAlias = SID_OBJECT_ALIGN_MIDDLE ; break;
471  case SID_ALIGN_ANY_BOTTOM : nAlias = SID_OBJECT_ALIGN_DOWN ; break;
472  }
473  }
474  //these slots are either re-mapped to text or object alignment
475  const SfxPoolItem* pState = nullptr;
476  if(nAlias)
477  GetViewFrame()->GetDispatcher()->QueryState( nAlias, pState );
478  if(pState)
479  {
481  {
482  rSet.Put(pState->CloneSetWhich(nWhich));
483  }
484  }
485  else
486  rSet.DisableItem(nWhich);
487  }
488  break;
489  }
490  nWhich = aIter.NextWhich();
491  }
492 }
493 
495 {
496  SfxWhichIter aIter(rSet);
497  bool bWeb = dynamic_cast<SwWebView*>( this ) != nullptr;
498 
499  for( sal_uInt16 nWhich = aIter.FirstWhich(); nWhich;
500  nWhich = aIter.NextWhich() )
501  switch(nWhich)
502  {
503  case SID_DRAW_LINE:
504  case SID_DRAW_XLINE:
505  case SID_LINE_ARROW_END:
506  case SID_LINE_ARROW_CIRCLE:
507  case SID_LINE_ARROW_SQUARE:
508  case SID_LINE_ARROW_START:
509  case SID_LINE_CIRCLE_ARROW:
510  case SID_LINE_SQUARE_ARROW:
511  case SID_LINE_ARROWS:
512  case SID_DRAW_MEASURELINE:
513  case SID_DRAW_RECT:
514  case SID_DRAW_ELLIPSE:
515  case SID_DRAW_XPOLYGON_NOFILL:
516  case SID_DRAW_XPOLYGON:
517  case SID_DRAW_POLYGON_NOFILL:
518  case SID_DRAW_POLYGON:
519  case SID_DRAW_BEZIER_NOFILL:
520  case SID_DRAW_BEZIER_FILL:
521  case SID_DRAW_FREELINE_NOFILL:
522  case SID_DRAW_FREELINE:
523  case SID_DRAW_ARC:
524  case SID_DRAW_PIE:
525  case SID_DRAW_CIRCLECUT:
526  case SID_DRAW_TEXT:
527  case SID_DRAW_CAPTION:
528  if ( bWeb )
529  rSet.DisableItem( nWhich );
530  else
531  rSet.Put( SfxBoolItem( nWhich, m_nDrawSfxId == nWhich ) );
532  break;
533 
534  case SID_DRAW_TEXT_VERTICAL:
535  case SID_DRAW_CAPTION_VERTICAL:
536  if ( bWeb || !SvtLanguageOptions().IsVerticalTextEnabled() )
537  rSet.DisableItem( nWhich );
538  else
539  rSet.Put( SfxBoolItem( nWhich, m_nDrawSfxId == nWhich ) );
540  break;
541 
542  case SID_DRAW_TEXT_MARQUEE:
544  rSet.Put( SfxBoolItem(nWhich, m_nDrawSfxId == nWhich));
545  else
546  rSet.DisableItem(nWhich);
547  break;
548  case SID_OBJECT_SELECT:
549  rSet.Put( SfxBoolItem(nWhich, m_nDrawSfxId == nWhich ||
550  m_nFormSfxId == nWhich));
551  break;
552 
553  case SID_INSERT_DRAW:
554  case SID_FONTWORK_GALLERY_FLOATER :
555  case SID_DRAWTBX_ARROWS:
556  {
557  if ( bWeb )
558  rSet.DisableItem( nWhich );
559  }
560  break;
561 
562  case SID_DRAWTBX_CS_BASIC :
563  case SID_DRAWTBX_CS_SYMBOL :
564  case SID_DRAWTBX_CS_ARROW :
565  case SID_DRAWTBX_CS_FLOWCHART :
566  case SID_DRAWTBX_CS_CALLOUT :
567  case SID_DRAWTBX_CS_STAR :
568  {
569  if ( bWeb )
570  rSet.DisableItem( nWhich );
571  else
572  rSet.Put( SfxStringItem( nWhich, m_nDrawSfxId == nWhich ? m_sDrawCustom : OUString() ) );
573  }
574  break;
575 
576  }
577 }
578 
580 {
581  assert((nFeature & ~SfxShellFeature::SwMask) == SfxShellFeature::NONE);
582  switch(nFeature)
583  {
584  case SfxShellFeature::SwChildWindowLabel:
585  return m_pWrtShell->IsLabelDoc();
586  default:
587  return false;
588  }
589 }
590 
591 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxViewFrame * GetViewFrame() const
#define LANGUAGE_NONE
#define FN_UPDATE_TOX
Definition: cmdid.h:495
#define RES_CHRATR_CJK_LANGUAGE
Definition: hintids.hxx:186
void SetMirrored(bool bSet)
void GetDrawState(SfxItemSet &rSet)
Definition: viewstat.cxx:494
#define RES_CHRATR_LANGUAGE
Definition: hintids.hxx:172
#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:196
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:593
bool IsTOXBaseInReadonly() const
Definition: doctxm.cxx:2017
bool isSignatureLineSigned() const
Definition: viewdlg2.cxx:121
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: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
#define FN_EDIT_LINK_DLG
Definition: cmdid.h:71
#define RES_PARATR_TABSTOP
Definition: hintids.hxx:260
#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:755
OUString m_sDrawCustom
Definition: view.hxx:217
#define RES_PAPER_BIN
Definition: hintids.hxx:290
#define FN_INSERT_FIELD_DATA_ONLY
Definition: cmdid.h:205
#define FN_MAILMERGE_SENDMAIL_CHILDWINDOW
Definition: cmdid.h:262
#define RES_BACKGROUND
Definition: hintids.hxx:305
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:487
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:579
SfxShellFeature
#define FN_REDLINE_ACCEPT_TONEXT
Definition: cmdid.h:145
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: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:695
sal_uInt16 GetCursorCnt(bool bAll=true) const
Get the number of elements in the ring of cursors.
Definition: crsrsh.cxx:2708
#define FN_UPDATE_CUR_TOX
Definition: cmdid.h:496
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:741
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)
HTMLMODE_SOME_STYLES
#define RES_CHRATR_CTL_LANGUAGE
Definition: hintids.hxx:191
void PageDescToItemSet(const SwPageDesc &rPageDesc, SfxItemSet &rSet)
Definition: uitool.cxx:417
#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
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:247
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
static css::lang::Locale convertToLocale(LanguageType nLangID, bool bResolveSystem=true)
void GetState(SfxItemSet &)
Definition: viewstat.cxx:61