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