LibreOffice Module sw (master)  1
wrtsh1.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 <com/sun/star/beans/XPropertySet.hpp>
21 #include <com/sun/star/container/XChild.hpp>
22 #include <com/sun/star/embed/EmbedMisc.hpp>
23 #include <com/sun/star/embed/EmbedStates.hpp>
24 #include <com/sun/star/embed/EmbedVerbs.hpp>
25 #include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
26 #include <com/sun/star/chart2/XChartDocument.hpp>
27 #include <com/sun/star/util/XModifiable.hpp>
28 
29 #include <hintids.hxx>
30 #include <sot/exchange.hxx>
31 #include <svx/hdft.hxx>
32 #include <svx/svdview.hxx>
33 #include <svl/itemiter.hxx>
34 #include <tools/bigint.hxx>
35 #include <svtools/insdlg.hxx>
36 #include <sfx2/ipclient.hxx>
38 #include <editeng/svxacorr.hxx>
39 #include <editeng/ulspitem.hxx>
40 #include <vcl/graph.hxx>
41 #include <unotools/charclass.hxx>
43 #include <svx/svxdlg.hxx>
44 #include <svx/extrusionbar.hxx>
45 #include <svx/fontworkbar.hxx>
46 #include <dialoghelp.hxx>
47 #include <frmfmt.hxx>
48 #include <fmtftn.hxx>
49 #include <fmthdft.hxx>
50 #include <fmtpdsc.hxx>
51 #include <txtfrm.hxx>
52 #include <wdocsh.hxx>
53 #include <swmodule.hxx>
54 #include <wrtsh.hxx>
55 #include <view.hxx>
56 #include <cmdid.h>
57 #include <pagedesc.hxx>
58 #include <frmmgr.hxx>
59 #include <swundo.hxx>
60 #include <swcli.hxx>
61 #include <poolfmt.hxx>
62 #include <edtwin.hxx>
63 #include <fmtcol.hxx>
64 #include <swtable.hxx>
65 #include <viscrs.hxx>
66 #include <swdtflvr.hxx>
67 #include <doc.hxx>
69 #include <SwCapObjType.hxx>
70 #include <SwStyleNameMapper.hxx>
71 #include <sfx2/request.hxx>
72 #include <paratr.hxx>
73 #include <ndtxt.hxx>
74 #include <editeng/acorrcfg.hxx>
75 #include <IMark.hxx>
76 #include <sfx2/bindings.hxx>
77 #include <flyfrm.hxx>
78 
79 // -> #111827#
80 #include <SwRewriter.hxx>
81 #include <strings.hrc>
82 // <- #111827#
83 
85 #include <sfx2/viewfrm.hxx>
86 #include <vcl/uitest/logger.hxx>
88 
89 #include <PostItMgr.hxx>
90 #include <FrameControlsManager.hxx>
91 #include <fldmgr.hxx>
92 #include <docufld.hxx>
94 #include <fmtfld.hxx>
95 
96 #include <sfx2/msgpool.hxx>
97 #include <sfx2/msg.hxx>
98 #include <svtools/embedhlp.hxx>
99 #include <svx/postattr.hxx>
100 #include <comphelper/lok.hxx>
101 #include <memory>
102 
103 using namespace sw::mark;
104 using namespace com::sun::star;
105 namespace {
106 
107 void collectUIInformation(const OUString& rAction, const OUString& aParameters)
108 {
109  EventDescription aDescription;
110  aDescription.aAction = rAction;
111  aDescription.aParameters = {{"parameters", aParameters}};
112  aDescription.aID = "writer_edit";
113  aDescription.aKeyWord = "SwEditWinUIObject";
114  aDescription.aParent = "MainWindow";
115  UITestLogger::getInstance().logEvent(aDescription);
116 }
117 
118 }
119 
120 #define BITFLD_INI_LIST \
121  m_bClearMark = \
122  m_bIns = true;\
123  m_bAddMode = \
124  m_bBlockMode = \
125  m_bExtMode = \
126  m_bInSelect = \
127  m_bLayoutMode = \
128  m_bSelWrd = \
129  m_bSelLn = \
130  m_bRetainSelection = false; \
131  m_bIsInClickToEdit = false;
132 
134 {
136  if( pACorr && !pACorr->IsAutoCorrFlag( ACFlags::CapitalStartSentence | ACFlags::CapitalStartWord |
137  ACFlags::AddNonBrkSpace | ACFlags::ChgOrdinalNumber |
138  ACFlags::ChgToEnEmDash | ACFlags::SetINetAttr | ACFlags::Autocorrect ))
139  pACorr = nullptr;
140  return pACorr;
141 }
142 
143 void SwWrtShell::NoEdit(bool bHideCursor)
144 {
145  if(bHideCursor)
146  HideCursor();
147 }
148 
150 {
151  if (CanInsert())
152  {
153  ShowCursor();
154  }
155 }
156 
158 {
159  SwMvContext aMvContext(this);
160  if(IsEndPara() && !IsSttPara())
161  return true;
162 
163  return IsEndWord();
164 }
165 
166 // Insert string
167 void SwWrtShell::InsertByWord( const OUString & rStr)
168 {
169  if( !rStr.isEmpty() )
170  {
171  bool bDelim = GetAppCharClass().isLetterNumeric( rStr, 0 );
172  sal_Int32 nPos = 0, nStt = 0;
173  for( ; nPos < rStr.getLength(); nPos++ )
174  {
175  bool bTmpDelim = GetAppCharClass().isLetterNumeric( rStr, nPos );
176  if( bTmpDelim != bDelim )
177  {
178  Insert( rStr.copy( nStt, nPos - nStt ));
179  nStt = nPos;
180  }
181  }
182  if( nStt != nPos )
183  Insert( rStr.copy( nStt, nPos - nStt ));
184  }
185 }
186 
187 void SwWrtShell::Insert( const OUString &rStr )
188 {
189  ResetCursorStack();
190  if( !CanInsert() )
191  return;
192 
193  bool bStarted = false;
194  bool bHasSel = HasSelection(),
195  bCallIns = m_bIns /*|| bHasSel*/;
196  bool bDeleted = false;
197 
199  RES_CHRATR_RSID + 1, RES_CHRATR_END - 1,
200  RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT> CharItems;
201  SfxItemSet aCharAttrSet(GetAttrPool(), CharItems{});
202 
203  if( bHasSel || ( !m_bIns && SelectHiddenRange() ) )
204  {
205  // Only here parenthesizing, because the normal
206  // insert is already in parentheses at Editshell.
207  StartAllAction();
208 
209  SwRewriter aRewriter;
210 
211  aRewriter.AddRule(UndoArg1, GetCursorDescr());
212  aRewriter.AddRule(UndoArg2, SwResId(STR_YIELDS));
213  {
214  OUString aTmpStr = SwResId(STR_START_QUOTE) +
215  rStr + SwResId(STR_END_QUOTE);
216 
217  aRewriter.AddRule(UndoArg3, aTmpStr);
218  }
219 
220  // tdf#79717 Save character formatting of the start of the selection
221  const SwPosition *pStart = GetCursor()->Start();
222  SwPaM aPaM(pStart->nNode.GetNode(), pStart->nContent.GetIndex(),
223  pStart->nNode.GetNode(), pStart->nContent.GetIndex() + 1);
224  GetPaMAttr(&aPaM, aCharAttrSet);
225 
226  StartUndo(SwUndoId::REPLACE, &aRewriter);
227  bStarted = true;
228  bDeleted = DelRight();
229  }
230 
231  bCallIns ?
232  SwEditShell::Insert2( rStr, bDeleted ) : SwEditShell::Overwrite( rStr );
233 
234  if( bDeleted )
235  {
236  // tdf#79717 Restore formatting of the deleted selection
237  SwPosition* pEnd = GetCursor()->Start();
238  SwPaM aPaM(pEnd->nNode.GetNode(), pEnd->nContent.GetIndex() - rStr.getLength(),
239  pEnd->nNode.GetNode(), pEnd->nContent.GetIndex());
240 
241  std::set<sal_uInt16> aAttribs;
242  for (sal_uInt16 i = RES_CHRATR_BEGIN; i < RES_CHRATR_END; ++i)
243  if (i != sal_uInt16(RES_CHRATR_RSID))
244  aAttribs.insert(aAttribs.end(), i);
245  aAttribs.insert(aAttribs.end(), RES_TXTATR_CHARFMT);
246  ResetAttr(aAttribs, &aPaM);
247 
248  SetAttrSet(aCharAttrSet, SetAttrMode::DEFAULT, &aPaM);
249  }
250 
251  if( bStarted )
252  {
253  EndUndo();
254  EndAllAction();
255  }
256 }
257 
258 // Maximum height limit not possible, because the maximum height
259 // of the current frame can not be obtained.
260 
261 void SwWrtShell::Insert( const OUString &rPath, const OUString &rFilter,
262  const Graphic &rGrf, SwFlyFrameAttrMgr *pFrameMgr,
263  RndStdIds nAnchorType )
264 {
265  ResetCursorStack();
266  if ( !CanInsert() )
267  return;
268 
269  StartAllAction();
270 
271  SwRewriter aRewriter;
272  aRewriter.AddRule(UndoArg1, SwResId(STR_GRAPHIC));
273 
274  StartUndo(SwUndoId::INSERT, &aRewriter);
275 
276  if ( HasSelection() )
277  DelRight();
278  // Inserted graphics in its own paragraph,
279  // if at the end of a non-empty paragraph.
280  //For i120928,avoid to split node
281 
282  EnterSelFrameMode();
283 
284  bool bSetGrfSize = true;
285  bool bOwnMgr = false;
286 
287  if ( !pFrameMgr )
288  {
289  bOwnMgr = true;
290  pFrameMgr = new SwFlyFrameAttrMgr( true, this, Frmmgr_Type::GRF );
291 
292  // CAUTION
293  // GetAttrSet makes an adjustment
294  // While pasting is a SwFrameSize present
295  // because of the DEF-Framesize
296  // These must be removed explicitly for the optimal size.
297  pFrameMgr->DelAttr(RES_FRM_SIZE);
298 
299  if (nAnchorType != RndStdIds::FLY_AT_PARA)
300  // Something other than at-para was requested.
301  pFrameMgr->SetAnchor(nAnchorType);
302  }
303  else
304  {
305  Size aSz( pFrameMgr->GetSize() );
306  if ( !aSz.Width() || !aSz.Height() )
307  {
308  aSz.setWidth(567);
309  aSz.setHeight( 567);
310  pFrameMgr->SetSize( aSz );
311  }
312  else if ( aSz.Width() != DFLT_WIDTH && aSz.Height() != DFLT_HEIGHT )
313  bSetGrfSize = false;
314 
316  }
317 
318  // Insert the graphic
319  SwFEShell::Insert(rPath, rFilter, &rGrf, &pFrameMgr->GetAttrSet());
320  if ( bOwnMgr )
321  pFrameMgr->UpdateAttrMgr();
322 
323  if( bSetGrfSize )
324  {
325  Size aGrfSize, aBound = GetGraphicDefaultSize();
326  GetGrfSize( aGrfSize );
327 
328  // Add the margin attributes to GrfSize,
329  // because these counts at the margin additionally
330  aGrfSize.AdjustWidth(pFrameMgr->CalcWidthBorder() );
331  aGrfSize.AdjustHeight(pFrameMgr->CalcHeightBorder() );
332 
333  const BigInt aTempWidth( aGrfSize.Width() );
334  const BigInt aTempHeight( aGrfSize.Height());
335 
336  // Fit width if necessary, scale down the height proportional thereafter.
337  if( aGrfSize.Width() > aBound.Width() )
338  {
339  aGrfSize.setWidth( aBound.Width() );
340  aGrfSize.setHeight( BigInt(aBound.Width()) * aTempHeight / aTempWidth );
341  }
342  // Fit height if necessary, scale down the width proportional thereafter.
343  if( aGrfSize.Height() > aBound.Height() )
344  {
345  aGrfSize.setHeight( aBound.Height() );
346  aGrfSize.setWidth( BigInt(aBound.Height()) * aTempWidth / aTempHeight );
347  }
348  pFrameMgr->SetSize( aGrfSize );
349  pFrameMgr->UpdateFlyFrame();
350  }
351  if ( bOwnMgr )
352  delete pFrameMgr;
353 
354  EndUndo();
355  EndAllAction();
356 }
357 
358 // Insert an OLE-Object into the CORE.
359 // if no object is transferred, then one will be created.
360 
362  sal_uInt16 nSlotId )
363 {
364  ResetCursorStack();
365  if( !CanInsert() )
366  return;
367 
368  if( !xRef.is() )
369  {
370  // temporary storage
372  uno::Reference < embed::XStorage > xStor = comphelper::OStorageHelper::GetTemporaryStorage();
373  bool bDoVerb = true;
374  if ( pName )
375  {
377  OUString aName;
378  // TODO/LATER: get aspect?
379  xObj.Assign( aCnt.CreateEmbeddedObject( pName->GetByteSequence(), aName ), embed::Aspects::MSOLE_CONTENT );
380  }
381  else
382  {
383  SvObjectServerList aServerList;
384  switch (nSlotId)
385  {
386  case SID_INSERT_OBJECT:
387  {
388  aServerList.FillInsertObjects();
389  aServerList.Remove( SwDocShell::Factory().GetClassId() );
390  [[fallthrough]];
391  }
392 
393  // TODO/LATER: recording! Convert properties to items
394  case SID_INSERT_FLOATINGFRAME:
395  {
396  SfxSlotPool* pSlotPool = SW_MOD()->GetSlotPool();
397  const SfxSlot* pSlot = pSlotPool->GetSlot(nSlotId);
398  OString aCmd = OStringLiteral(".uno:") + pSlot->GetUnoName();
400  ScopedVclPtr<SfxAbstractInsertObjectDialog> pDlg(pFact->CreateInsertObjectDialog(GetFrameWeld(mxDoc->GetDocShell()),
401  OUString::fromUtf8( aCmd ), xStor, &aServerList));
402  if (pDlg)
403  {
404  pDlg->Execute();
405  bDoVerb = pDlg->IsCreateNew();
406  OUString aIconMediaType;
407  uno::Reference< io::XInputStream > xIconMetaFile = pDlg->GetIconIfIconified( &aIconMediaType );
408  xObj.Assign( pDlg->GetObject(),
409  xIconMetaFile.is() ? embed::Aspects::MSOLE_ICON : embed::Aspects::MSOLE_CONTENT );
410  if ( xIconMetaFile.is() )
411  xObj.SetGraphicStream( xIconMetaFile, aIconMediaType );
412  }
413 
414  break;
415  }
416 
417  default:
418  break;
419  }
420  }
421 
422  if ( xObj.is() )
423  {
424  if( InsertOleObject( xObj ) && bDoVerb )
425  {
426  SfxInPlaceClient* pClient = GetView().FindIPClient( xObj.GetObject(), &GetView().GetEditWin() );
427  if ( !pClient )
428  {
429  pClient = new SwOleClient( &GetView(), &GetView().GetEditWin(), xObj );
430  SetCheckForOLEInCaption( true );
431  }
432 
433  if ( xObj.GetViewAspect() == embed::Aspects::MSOLE_ICON )
434  {
435  SwRect aArea = GetAnyCurRect( CurRectType::FlyEmbeddedPrt, nullptr, xObj.GetObject() );
436  aArea.Pos() += GetAnyCurRect( CurRectType::FlyEmbedded, nullptr, xObj.GetObject() ).Pos();
437  MapMode aMapMode( MapUnit::MapTwip );
438  Size aSize = xObj.GetSize( &aMapMode );
439  aArea.Width( aSize.Width() );
440  aArea.Height( aSize.Height() );
441  RequestObjectResize( aArea, xObj.GetObject() );
442  }
443  else
444  CalcAndSetScale( xObj );
445 
446  //#50270# We don't need to handle error, this is handled by the
447  //DoVerb in the SfxViewShell
448  pClient->DoVerb(embed::EmbedVerbs::MS_OLEVERB_SHOW);
449 
450  // TODO/LATER: set document name - should be done in Client
451  }
452  }
453  }
454  else
455  {
456  if( HasSelection() )
457  DelRight();
458  InsertOleObject( xRef );
459  }
460 }
461 
462 // Insert object into the Core.
463 // From ClipBoard or Insert
464 
466 {
467  //tdf#125100 Ensure that ole object is initially shown as pictogram
468  comphelper::EmbeddedObjectContainer& rEmbeddedObjectContainer = mxDoc->GetDocShell()->getEmbeddedObjectContainer();
469  bool bSaveUserAllowsLinkUpdate = rEmbeddedObjectContainer.getUserAllowsLinkUpdate();
470  rEmbeddedObjectContainer.setUserAllowsLinkUpdate(true);
471 
472  ResetCursorStack();
473  StartAllAction();
474 
475  StartUndo(SwUndoId::INSERT);
476 
477  //Some differences between StarMath and any other objects:
478  //1. Selections should be deleted. For StarMath the Text should be
479  // passed to the Object
480  //2. If the cursor is at the end of a non empty paragraph a paragraph
481  // break should be inserted. StarMath objects are character bound and
482  // no break should be inserted.
483  //3. If an selection is passed to a StarMath object, this object should
484  // not be activated. false should be returned then.
485  bool bStarMath = true;
486  bool bActivate = true;
487 
488  // set parent to get correct VisArea(in case of object needing parent printer)
489  uno::Reference < container::XChild > xChild( xRef.GetObject(), uno::UNO_QUERY );
490  if ( xChild.is() )
491  xChild->setParent( mxDoc->GetDocShell()->GetModel() );
492 
493  SvGlobalName aCLSID( xRef->getClassID() );
494  bStarMath = ( SotExchange::IsMath( aCLSID ) != 0 );
495  if( IsSelection() )
496  {
497  if( bStarMath )
498  {
499  OUString aMathData;
500  GetSelectedText( aMathData, ParaBreakType::ToOnlyCR );
501 
502  if( !aMathData.isEmpty() && svt::EmbeddedObjectRef::TryRunningState( xRef.GetObject() ) )
503  {
504  uno::Reference < beans::XPropertySet > xSet( xRef->getComponent(), uno::UNO_QUERY );
505  if ( xSet.is() )
506  {
507  try
508  {
509  xSet->setPropertyValue("Formula", uno::makeAny( aMathData ) );
510  bActivate = false;
511  }
512  catch (const uno::Exception&)
513  {
514  }
515  }
516  }
517  }
518  DelRight();
519  }
520 
521  if ( !bStarMath )
522  SwFEShell::SplitNode( false, false );
523 
524  EnterSelFrameMode();
525 
526  SwFlyFrameAttrMgr aFrameMgr( true, this, Frmmgr_Type::OLE );
528 
529  SwRect aBound;
530  CalcBoundRect( aBound, aFrameMgr.GetAnchor() );
531 
532  //The Size should be suggested by the OLE server
533  MapMode aMapMode( MapUnit::MapTwip );
534  Size aSz = xRef.GetSize( &aMapMode );
535 
536  //Object size can be limited
537  if ( aSz.Width() > aBound.Width() )
538  {
539  //Always limit proportional.
540  aSz.setHeight( aSz.Height() * aBound.Width() / aSz.Width() );
541  aSz.setWidth( aBound.Width() );
542  }
543  aFrameMgr.SetSize( aSz );
544  SwFlyFrameFormat *pFormat = SwFEShell::InsertObject( xRef, &aFrameMgr.GetAttrSet() );
545 
546  // --> #i972#
547  if ( bStarMath && mxDoc->getIDocumentSettingAccess().get( DocumentSettingId::MATH_BASELINE_ALIGNMENT ) )
548  AlignFormulaToBaseline( xRef.GetObject() );
549 
550  if (pFlyFrameFormat)
551  *pFlyFrameFormat = pFormat;
552 
553  if ( SotExchange::IsChart( aCLSID ) )
554  {
555  uno::Reference< embed::XEmbeddedObject > xEmbeddedObj = xRef.GetObject();
556  if ( xEmbeddedObj.is() )
557  {
558  bool bDisableDataTableDialog = false;
560  uno::Reference< beans::XPropertySet > xProps( xEmbeddedObj->getComponent(), uno::UNO_QUERY );
561  if ( xProps.is() &&
562  ( xProps->getPropertyValue("DisableDataTableDialog") >>= bDisableDataTableDialog ) &&
563  bDisableDataTableDialog )
564  {
565  xProps->setPropertyValue("DisableDataTableDialog",
566  uno::makeAny( false ) );
567  xProps->setPropertyValue("DisableComplexChartTypes",
568  uno::makeAny( false ) );
569  uno::Reference< util::XModifiable > xModifiable( xProps, uno::UNO_QUERY );
570  if ( xModifiable.is() )
571  {
572  xModifiable->setModified( true );
573  }
574  }
575  }
576  }
577 
578  EndAllAction();
579  GetView().AutoCaption(OLE_CAP, &aCLSID);
580 
581  SwRewriter aRewriter;
582 
583  if ( bStarMath )
584  aRewriter.AddRule(UndoArg1, SwResId(STR_MATH_FORMULA));
585  else if ( SotExchange::IsChart( aCLSID ) )
586  aRewriter.AddRule(UndoArg1, SwResId(STR_CHART));
587  else
588  aRewriter.AddRule(UndoArg1, SwResId(STR_OLE));
589 
590  EndUndo(SwUndoId::INSERT, &aRewriter);
591 
592  rEmbeddedObjectContainer.setUserAllowsLinkUpdate(bSaveUserAllowsLinkUpdate);
593 
594  return bActivate;
595 }
596 
597 // The current selected OLE object will be loaded with the
598 // verb into the server.
599 
600 void SwWrtShell::LaunchOLEObj( long nVerb )
601 {
602  if ( GetCntType() == CNT_OLE &&
603  !GetView().GetViewFrame()->GetFrame().IsInPlace() )
604  {
605  svt::EmbeddedObjectRef& xRef = GetOLEObject();
606  OSL_ENSURE( xRef.is(), "OLE not found" );
607 
608  // LOK: we don't want to handle any other embedded objects than
609  // charts, there are too many problems with eg. embedded spreadsheets
610  // (like it creates a separate view for the calc sheet)
611  if (comphelper::LibreOfficeKit::isActive() && !SotExchange::IsChart(xRef->getClassID()))
612  return;
613 
614  SfxInPlaceClient* pCli = GetView().FindIPClient( xRef.GetObject(), &GetView().GetEditWin() );
615  if ( !pCli )
616  pCli = new SwOleClient( &GetView(), &GetView().GetEditWin(), xRef );
617 
618  static_cast<SwOleClient*>(pCli)->SetInDoVerb( true );
619 
620  CalcAndSetScale( xRef );
621  pCli->DoVerb( nVerb );
622 
623  static_cast<SwOleClient*>(pCli)->SetInDoVerb( false );
624  CalcAndSetScale( xRef );
625  }
626 }
627 
629 {
630  try
631  {
632  sal_Int32 nState = xObj->getCurrentState();
633  if ( nState == css::embed::EmbedStates::INPLACE_ACTIVE
634  || nState == css::embed::EmbedStates::UI_ACTIVE )
635  {
636  SfxInPlaceClient* pCli =
637  GetView().FindIPClient( xObj.GetObject(), &(GetView().GetEditWin()) );
638  if ( pCli )
639  {
640  tools::Rectangle aArea = pCli->GetObjArea();
641  aArea += rOffset;
642  pCli->SetObjArea( aArea );
643  }
644  }
645  }
646  catch (const uno::Exception&)
647  {
648  }
649 }
650 
652  const SwRect *pFlyPrtRect,
653  const SwRect *pFlyFrameRect,
654  const bool bNoTextFramePrtAreaChanged )
655 {
656  // Setting the scale of the client. This arises from the difference
657  // between the VisArea of the object and the ObjArea.
658  OSL_ENSURE( xObj.is(), "ObjectRef not valid" );
659 
660  sal_Int64 nAspect = xObj.GetViewAspect();
661  if ( nAspect == embed::Aspects::MSOLE_ICON )
662  return; // the replacement image is completely controlled by container in this case
663 
664  sal_Int64 nMisc = 0;
665  bool bLinkingChart = false;
666 
667  try
668  {
669  nMisc = xObj->getStatus( nAspect );
670 
671  // This can surely only be a non-active object, if desired they
672  // get the new size set as VisArea (StarChart).
673  if( embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE & nMisc )
674  {
675  // TODO/MBA: testing
676  SwRect aRect( pFlyPrtRect ? *pFlyPrtRect
677  : GetAnyCurRect( CurRectType::FlyEmbeddedPrt, nullptr, xObj.GetObject() ));
678  if( !aRect.IsEmpty() )
679  {
680  // TODO/LEAN: getMapUnit can switch object to running state
681  // xObj.TryRunningState();
682 
683  MapUnit aUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( nAspect ) );
684 
685  // TODO/LATER: needs complete VisArea?!
686  Size aSize( OutputDevice::LogicToLogic(aRect.SVRect(), MapMode(MapUnit::MapTwip), MapMode(aUnit)).GetSize() );
687  awt::Size aSz;
688  aSz.Width = aSize.Width();
689  aSz.Height = aSize.Height();
690 
691  // Action 'setVisualAreaSize' doesn't have to turn on the
692  // modified state of the document, either.
693  bool bModified = false;
694  uno::Reference<util::XModifiable> xModifiable(xObj->getComponent(), uno::UNO_QUERY);
695  if (xModifiable.is())
696  bModified = xModifiable->isModified();
697  xObj->setVisualAreaSize( nAspect, aSz );
698  xModifiable.set(xObj->getComponent(), uno::UNO_QUERY);
699  if (xModifiable.is() && xModifiable->isModified() && !bModified)
700  xModifiable->setModified(bModified);
701 
702  // #i48419# - action 'UpdateReplacement' doesn't
703  // have to change the modified state of the document.
704  // This is only a workaround for the defect, that this action
705  // modifies a document after load, because unnecessarily the
706  // replacement graphic is updated, in spite of the fact that
707  // nothing has been changed.
708  // If the replacement graphic changes by this action, the document
709  // will be already modified via other mechanisms.
710  {
711  bool bResetEnableSetModified(false);
712  if ( GetDoc()->GetDocShell()->IsEnableSetModified() )
713  {
714  GetDoc()->GetDocShell()->EnableSetModified( false );
715  bResetEnableSetModified = true;
716  }
717 
718  //#i79576# don't destroy chart replacement images on load
719  //#i79578# don't request a new replacement image for charts to often
720  //a chart sends a modified call to the framework if it was changed
721  //thus the replacement update is already handled elsewhere
722  if ( !SotExchange::IsChart( xObj->getClassID() ) )
723  xObj.UpdateReplacement();
724 
725  if ( bResetEnableSetModified )
726  {
727  GetDoc()->GetDocShell()->EnableSetModified();
728  }
729  }
730  }
731 
732  // TODO/LATER: this is only a workaround,
733  uno::Reference< chart2::XChartDocument > xChartDocument( xObj->getComponent(), uno::UNO_QUERY );
734  bLinkingChart = ( xChartDocument.is() && !xChartDocument->hasInternalDataProvider() );
735  }
736  }
737  catch (const uno::Exception&)
738  {
739  // TODO/LATER: handle the error
740  return;
741  }
742 
743  SfxInPlaceClient* pCli = GetView().FindIPClient( xObj.GetObject(), &GetView().GetEditWin() );
744  if ( !pCli )
745  {
746  if ( (embed::EmbedMisc::EMBED_ACTIVATEIMMEDIATELY & nMisc)
747  || bLinkingChart
748  // --> OD #i117189# - refine condition for non-resizable objects
749  // non-resizable objects need to be set the size back by this method
750  || ( bNoTextFramePrtAreaChanged && nMisc & embed::EmbedMisc::EMBED_NEVERRESIZE ) )
751  {
752  pCli = new SwOleClient( &GetView(), &GetView().GetEditWin(), xObj );
753  }
754  else
755  return;
756  }
757 
758  // TODO/LEAN: getMapUnit can switch object to running state
759  // xObj.TryRunningState();
760 
761  awt::Size aSize;
762  try
763  {
764  aSize = xObj->getVisualAreaSize( nAspect );
765  }
766  catch (const embed::NoVisualAreaSizeException&)
767  {
768  OSL_FAIL("Can't get visual area size!" );
769  // the scaling will not be done
770  }
771  catch (const uno::Exception&)
772  {
773  // TODO/LATER: handle the error
774  OSL_FAIL("Can't get visual area size!" );
775  return;
776  }
777 
778  Size _aVisArea( aSize.Width, aSize.Height );
779 
780  Fraction aScaleWidth( 1, 1 );
781  Fraction aScaleHeight( 1, 1 );
782 
783  bool bUseObjectSize = false;
784 
785  // As long as there comes no reasonable size from the object,
786  // nothing can be scaled.
787  if( _aVisArea.Width() && _aVisArea.Height() )
788  {
789  const MapMode aTmp( MapUnit::MapTwip );
790  MapUnit aUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( nAspect ) );
791  _aVisArea = OutputDevice::LogicToLogic(_aVisArea, MapMode(aUnit), aTmp);
792  Size aObjArea;
793  if ( pFlyPrtRect )
794  aObjArea = pFlyPrtRect->SSize();
795  else
796  aObjArea = GetAnyCurRect( CurRectType::FlyEmbeddedPrt, nullptr, xObj.GetObject() ).SSize();
797 
798  // differ the aObjArea and _aVisArea by 1 Pixel then set new VisArea
799  long nX, nY;
800  SwSelPaintRects::Get1PixelInLogic( *this, &nX, &nY );
801  if( !( _aVisArea.Width() - nX <= aObjArea.Width() &&
802  _aVisArea.Width() + nX >= aObjArea.Width() &&
803  _aVisArea.Height()- nY <= aObjArea.Height()&&
804  _aVisArea.Height()+ nY >= aObjArea.Height() ))
805  {
806  if ( nMisc & embed::EmbedMisc::EMBED_NEVERRESIZE )
807  {
808  // the object must not be scaled,
809  // the size stored in object must be used for restoring
810  bUseObjectSize = true;
811  }
812  else
813  {
814  aScaleWidth = Fraction( aObjArea.Width(), _aVisArea.Width() );
815  aScaleHeight = Fraction( aObjArea.Height(), _aVisArea.Height());
816  }
817  }
818  }
819 
820  // Now is the favorable time to set the ObjArea.
821  // The Scaling must be considered.
822  SwRect aArea;
823  if ( pFlyPrtRect )
824  {
825  aArea = *pFlyPrtRect;
826  aArea += pFlyFrameRect->Pos();
827  }
828  else
829  {
830  aArea = GetAnyCurRect( CurRectType::FlyEmbeddedPrt, nullptr, xObj.GetObject() );
831  aArea.Pos() += GetAnyCurRect( CurRectType::FlyEmbedded, nullptr, xObj.GetObject() ).Pos();
832  }
833 
834  if ( bUseObjectSize )
835  {
836  // --> this moves non-resizable object so that when adding borders the baseline remains the same
837  const SwFlyFrameFormat *pFlyFrameFormat = dynamic_cast< const SwFlyFrameFormat * >( GetFlyFrameFormat() );
838  OSL_ENSURE( pFlyFrameFormat, "Could not find fly frame." );
839  if ( pFlyFrameFormat )
840  {
841  const Point &rPoint = pFlyFrameFormat->GetLastFlyFramePrtRectPos();
842  SwRect aRect( pFlyPrtRect ? *pFlyPrtRect
843  : GetAnyCurRect( CurRectType::FlyEmbeddedPrt, nullptr, xObj.GetObject() ));
844  aArea += rPoint - aRect.Pos(); // adjust area by diff of printing area position in order to keep baseline alignment correct.
845  }
846  aArea.Width ( _aVisArea.Width() );
847  aArea.Height( _aVisArea.Height() );
848  RequestObjectResize( aArea, xObj.GetObject() );
849  }
850  else
851  {
852  aArea.Width ( long( aArea.Width() / pCli->GetScaleWidth() ) );
853  aArea.Height( long( aArea.Height() / pCli->GetScaleHeight() ) );
854  }
855 
856  pCli->SetObjAreaAndScale( aArea.SVRect(), aScaleWidth, aScaleHeight );
857 }
858 
860  const SwRect &rFrame )
861 {
862  SfxInPlaceClient* pCli = GetView().FindIPClient( xObj.GetObject(), &GetView().GetEditWin());
863  if ( !pCli )
864  new SwOleClient( &GetView(), &GetView().GetEditWin(), xObj );
865  CalcAndSetScale( xObj, &rPrt, &rFrame );
866 }
867 
868 // Insert hard page break;
869 // Selections will be overwritten
870 void SwWrtShell::InsertPageBreak(const OUString *pPageDesc, const ::o3tl::optional<sal_uInt16>& oPgNum )
871 {
872  ResetCursorStack();
873  if( CanInsert() )
874  {
875  SwActContext aActContext(this);
877 
878  if ( !IsCursorInTable() )
879  {
880  if(HasSelection())
881  DelRight();
883  // delete the numbered attribute of the last line if the last line is empty
884  GetDoc()->ClearLineNumAttrs( *GetCursor()->GetPoint() );
885  }
886 
887  const SwPageDesc *pDesc = pPageDesc
888  ? FindPageDescByName( *pPageDesc, true ) : nullptr;
889  if( pDesc )
890  {
891  SwFormatPageDesc aDesc( pDesc );
892  aDesc.SetNumOffset( oPgNum );
893  SetAttrItem( aDesc );
894  }
895  else
896  SetAttrItem( SvxFormatBreakItem(SvxBreak::PageBefore, RES_BREAK) );
898  }
899  collectUIInformation("BREAK_PAGE", "parameter");
900 }
901 
902 // Insert hard page break;
903 // Selections will be overwritten
904 
906 {
907  ResetCursorStack();
908  if( CanInsert() )
909  {
910  if(HasSelection())
911  DelRight();
912 
913  const sal_Unicode cIns = 0x0A;
914  SvxAutoCorrect* pACorr = lcl_IsAutoCorr();
915  if( pACorr )
916  AutoCorrect( *pACorr, cIns );
917  else
918  SwWrtShell::Insert( OUString( cIns ) );
919  }
920 }
921 
922 // Insert hard column break;
923 // Selections will be overwritten
924 
926 {
927  SwActContext aActContext(this);
928  ResetCursorStack();
929  if( CanInsert() )
930  {
932 
933  if ( !IsCursorInTable() )
934  {
935  if(HasSelection())
936  DelRight();
937  SwFEShell::SplitNode( false, false );
938  }
939  SetAttrItem(SvxFormatBreakItem(SvxBreak::ColumnBefore, RES_BREAK));
940 
942  }
943 }
944 
945 // Insert footnote
946 // rStr - optional footnote mark
947 
948 void SwWrtShell::InsertFootnote(const OUString &rStr, bool bEndNote, bool bEdit )
949 {
950  ResetCursorStack();
951  if( CanInsert() )
952  {
953  if(HasSelection())
954  {
955  //collapse cursor to the end
956  if(!IsCursorPtAtEnd())
957  SwapPam();
958  ClearMark();
959  }
960  SwPosition aPos = *GetCursor()->GetPoint();
961  SwFormatFootnote aFootNote( bEndNote );
962  if(!rStr.isEmpty())
963  aFootNote.SetNumStr( rStr );
964 
965  SetAttrItem(aFootNote);
966 
967  if( bEdit )
968  {
969  // For editing the footnote text.
970  Left(CRSR_SKIP_CHARS, false, 1, false );
971  GotoFootnoteText();
972  }
973  m_aNavigationMgr.addEntry(aPos);
974  }
975 }
976 
977 // SplitNode; also, because
978 // - of deleting selected content;
979 // - of reset of the Cursorstack if necessary.
980 
981 void SwWrtShell::SplitNode( bool bAutoFormat )
982 {
983  ResetCursorStack();
984  if( CanInsert() )
985  {
986  SwActContext aActContext(this);
987 
988  m_rView.GetEditWin().FlushInBuffer();
989  bool bHasSel = HasSelection();
990  if( bHasSel )
991  {
992  StartUndo( SwUndoId::INSERT );
993  DelRight();
994  }
995 
996  SwFEShell::SplitNode( bAutoFormat );
997  if( bHasSel )
998  EndUndo( SwUndoId::INSERT );
999  }
1000 }
1001 
1002 // Turn on numbering
1003 // Parameter: Optional specification of a name for the named list;
1004 // this indicates a position if it is possible to convert them
1005 // into a number and less than nMaxRules.
1006 
1007 // To test the CharFormats at the numbering
1008 // external void SetNumChrFormat( SwWrtShell*, SwNumRules& );
1009 
1010 // -> #i40041#
1011 // Preconditions (as far as OD has figured out):
1012 // - <SwEditShell::HasNumber()> is false, if <bNum> is true
1013 // - <SwEditShell::HasBullet()> is false, if <bNum> is false
1014 // Behavior of method is determined by the current situation at the current
1015 // cursor position in the document.
1017 {
1018  // determine numbering rule found at current cursor position in the document.
1019  const SwNumRule* pCurRule = GetNumRuleAtCurrCursorPos();
1020 
1021  StartUndo(SwUndoId::NUMORNONUM);
1022 
1023  const SwNumRule * pNumRule = pCurRule;
1024 
1025  // - activate outline rule respectively turning on outline rule for
1026  // current text node. But, only for turning on a numbering (<bNum> == true).
1027  // - overwrite found numbering rule at current cursor position, if
1028  // no numbering rule can be retrieved from the paragraph style.
1029  bool bContinueFoundNumRule( false );
1030  bool bActivateOutlineRule( false );
1031  int nActivateOutlineLvl( MAXLEVEL ); // only relevant, if <bActivateOutlineRule> == true
1033  if ( pColl )
1034  {
1035  // retrieve numbering rule at paragraph
1036  // style, which is found at current cursor position in the document.
1037  SwNumRule* pCollRule = mxDoc->FindNumRulePtr(pColl->GetNumRule().GetValue());
1038  // #125993# - The outline numbering rule isn't allowed
1039  // to be derived from a parent paragraph style to a derived one.
1040  // Thus check, if the found outline numbering rule is directly
1041  // set at the paragraph style <pColl>. If not, set <pCollRule> to NULL
1042  if ( pCollRule && pCollRule == GetDoc()->GetOutlineNumRule() )
1043  {
1044  const SwNumRule* pDirectCollRule =
1045  mxDoc->FindNumRulePtr(pColl->GetNumRule( false ).GetValue());
1046  if ( !pDirectCollRule )
1047  {
1048  pCollRule = nullptr;
1049  }
1050  }
1051 
1052  if ( !pCollRule )
1053  {
1054  pNumRule = pCollRule;
1055  }
1056  // no activation or continuation of outline numbering in Writer/Web document
1057  else if ( bNum &&
1058  !dynamic_cast<SwWebDocShell*>(GetDoc()->GetDocShell()) &&
1059  pCollRule == GetDoc()->GetOutlineNumRule() )
1060  {
1061  if ( pNumRule == pCollRule )
1062  {
1063  // check, if text node at current cursor positioned is counted.
1064  // If not, let it been counted. Then it has to be checked,
1065  // of the outline numbering has to be activated or continued.
1066  SwTextNode const*const pTextNode = sw::GetParaPropsNode(
1067  *GetLayout(), GetCursor()->GetPoint()->nNode);
1068  if ( pTextNode && !pTextNode->IsCountedInList() )
1069  {
1070  // check, if numbering of the outline level of the paragraph
1071  // style is active. If not, activate this outline level.
1072  nActivateOutlineLvl = pColl->GetAssignedOutlineStyleLevel();
1073  OSL_ENSURE( pColl->IsAssignedToListLevelOfOutlineStyle(),
1074  "<SwWrtShell::NumOrBulletOn(..)> - paragraph style with outline rule, but no outline level" );
1075  if ( pColl->IsAssignedToListLevelOfOutlineStyle() &&
1076  pCollRule->Get( static_cast<sal_uInt16>(nActivateOutlineLvl) ).GetNumberingType()
1077  == SVX_NUM_NUMBER_NONE )
1078  {
1079  // activate outline numbering
1080  bActivateOutlineRule = true;
1081  }
1082  else
1083  {
1084  // turning on outline numbering at current cursor position
1085  bContinueFoundNumRule = true;
1086  }
1087  }
1088  else
1089  {
1090  // #i101234#
1091  // activate outline numbering, because from the precondition
1092  // it's known, that <SwEdit::HasNumber()> == false
1093  bActivateOutlineRule = true;
1094  nActivateOutlineLvl = pColl->GetAssignedOutlineStyleLevel();
1095  }
1096  }
1097  else if ( !pNumRule )
1098  {
1099  // #i101234#
1100  // Check, if corresponding list level of the outline numbering
1101  // has already a numbering format set.
1102  nActivateOutlineLvl = pColl->GetAssignedOutlineStyleLevel();
1103  if ( pCollRule->Get( static_cast<sal_uInt16>(nActivateOutlineLvl) ).GetNumberingType()
1104  == SVX_NUM_NUMBER_NONE )
1105  {
1106  // activate outline numbering, because from the precondition
1107  // it's known, that <SwEdit::HasNumber()> == false
1108  bActivateOutlineRule = true;
1109  }
1110  else
1111  {
1112  // turning on outline numbering at current cursor position
1113  bContinueFoundNumRule = true;
1114  }
1115  }
1116  else
1117  {
1118  // check, if numbering of the outline level of the paragraph
1119  // style is active. If not, activate this outline level.
1120  nActivateOutlineLvl = pColl->GetAssignedOutlineStyleLevel();
1121  OSL_ENSURE( pColl->IsAssignedToListLevelOfOutlineStyle(),
1122  "<SwWrtShell::NumOrBulletOn(..)> - paragraph style with outline rule, but no outline level" );
1123  if ( pColl->IsAssignedToListLevelOfOutlineStyle() &&
1124  pCollRule->Get( static_cast<sal_uInt16>(nActivateOutlineLvl) ).GetNumberingType()
1125  == SVX_NUM_NUMBER_NONE )
1126  {
1127  // activate outline numbering
1128  bActivateOutlineRule = true;
1129  }
1130  else
1131  {
1132  // turning on outline numbering at current cursor position
1133  bContinueFoundNumRule = true;
1134  }
1135  }
1136  pNumRule = pCollRule;
1137  }
1138  }
1139 
1140  // Only automatic numbering/bullet rules should be changed.
1141  // Note: The outline numbering rule is also an automatic one. It's only
1142  // changed, if it has to be activated.
1143  if ( pNumRule )
1144  {
1145  if ( !pNumRule->IsAutoRule() )
1146  {
1147  pNumRule = nullptr;
1148  }
1149  else if ( pNumRule == GetDoc()->GetOutlineNumRule() &&
1150  !bActivateOutlineRule && !bContinueFoundNumRule )
1151  {
1152  pNumRule = nullptr;
1153  }
1154  }
1155 
1156  // Search for a previous numbering/bullet rule to continue it.
1157  OUString sContinuedListId;
1158  if ( !pNumRule )
1159  {
1160  pNumRule = GetDoc()->SearchNumRule( *GetCursor()->GetPoint(),
1161  false, bNum, false, 0,
1162  sContinuedListId, GetLayout() );
1163  bContinueFoundNumRule = pNumRule != nullptr;
1164  }
1165 
1166  if (pNumRule)
1167  {
1168  SwNumRule aNumRule(*pNumRule);
1169 
1170  // do not change found numbering/bullet rule, if it should only be continued.
1171  if ( !bContinueFoundNumRule )
1172  {
1173  SwTextNode const*const pTextNode = sw::GetParaPropsNode(
1174  *GetLayout(), GetCursor()->GetPoint()->nNode);
1175 
1176  if (pTextNode)
1177  {
1178  // use above retrieve outline level, if outline numbering has to be activated.
1179  int nLevel = bActivateOutlineRule
1180  ? nActivateOutlineLvl
1181  : pTextNode->GetActualListLevel();
1182 
1183  if (nLevel < 0)
1184  nLevel = 0;
1185 
1186  if (nLevel >= MAXLEVEL)
1187  nLevel = MAXLEVEL - 1;
1188 
1189  SwNumFormat aFormat(aNumRule.Get(static_cast<sal_uInt16>(nLevel)));
1190 
1191  if (bNum)
1193  else
1194  {
1195  // #i63395# Only apply user defined default bullet font
1197  {
1198  const vcl::Font* pFnt = &numfunc::GetDefBulletFont();
1199  aFormat.SetBulletFont( pFnt );
1200  }
1201  aFormat.SetBulletChar( numfunc::GetBulletChar(static_cast<sal_uInt8>(nLevel)));
1202  aFormat.SetNumberingType(SVX_NUM_CHAR_SPECIAL);
1203  // #i93908# clear suffix for bullet lists
1204  aFormat.SetPrefix(OUString());
1205  aFormat.SetSuffix(OUString());
1206  }
1207  aNumRule.Set(static_cast<sal_uInt16>(nLevel), aFormat);
1208  }
1209  }
1210 
1211  // reset indent attribute on applying list style
1212  SetCurNumRule( aNumRule, false, sContinuedListId, true );
1213  }
1214  else
1215  {
1216  // #i95907#
1217  const SvxNumberFormat::SvxNumPositionAndSpaceMode ePosAndSpaceMode(
1219  SwNumRule aNumRule( GetUniqueNumRuleName(), ePosAndSpaceMode );
1220  // Append the character template at the numbering.
1221  SwCharFormat* pChrFormat;
1222  SwDocShell* pDocSh = GetView().GetDocShell();
1223  // #i63395#
1224  // Only apply user defined default bullet font
1227  : nullptr;
1228 
1229  if (bNum)
1230  {
1231  pChrFormat = GetCharFormatFromPool( RES_POOLCHR_NUM_LEVEL );
1232  }
1233  else
1234  {
1235  pChrFormat = GetCharFormatFromPool( RES_POOLCHR_BULLET_LEVEL );
1236  }
1237 
1238  const SwTextNode *const pTextNode = sw::GetParaPropsNode(*GetLayout(),
1239  GetCursor()->GetPoint()->nNode);
1240  const SwTwips nWidthOfTabs = pTextNode
1241  ? pTextNode->GetWidthOfLeadingTabs()
1242  : 0;
1243  GetDoc()->getIDocumentContentOperations().RemoveLeadingWhiteSpace( *GetCursor()->GetPoint() );
1244 
1245  const bool bHtml = dynamic_cast<SwWebDocShell*>( pDocSh ) != nullptr;
1246  const bool bRightToLeft = IsInRightToLeftText();
1247  for( sal_uInt8 nLvl = 0; nLvl < MAXLEVEL; ++nLvl )
1248  {
1249  SwNumFormat aFormat( aNumRule.Get( nLvl ) );
1250  aFormat.SetCharFormat( pChrFormat );
1251 
1252  if (! bNum)
1253  {
1254  // #i63395#
1255  // Only apply user defined default bullet font
1256  if ( pFnt )
1257  {
1258  aFormat.SetBulletFont( pFnt );
1259  }
1260  aFormat.SetBulletChar( numfunc::GetBulletChar(nLvl) );
1261  aFormat.SetNumberingType(SVX_NUM_CHAR_SPECIAL);
1262  // #i93908# clear suffix for bullet lists
1263  aFormat.SetPrefix(OUString());
1264  aFormat.SetSuffix(OUString());
1265  }
1266 
1267  // #i95907#
1268  if ( ePosAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
1269  {
1270  if(bHtml && nLvl)
1271  {
1272  // 1/2" for HTML
1273  aFormat.SetAbsLSpace(nLvl * 720);
1274  }
1275  else if ( nWidthOfTabs > 0 )
1276  {
1277  aFormat.SetAbsLSpace(nWidthOfTabs + nLvl * 720);
1278  }
1279  }
1280 
1281  // #i38904# Default alignment for
1282  // numbering/bullet should be rtl in rtl paragraph:
1283  if ( bRightToLeft )
1284  {
1285  aFormat.SetNumAdjust( SvxAdjust::Right );
1286  }
1287 
1288  aNumRule.Set( nLvl, aFormat );
1289  }
1290 
1291  // #i95907#
1292  if ( pTextNode &&
1293  ePosAndSpaceMode == SvxNumberFormat::LABEL_ALIGNMENT )
1294  {
1295 
1296  const SwTwips nTextNodeIndent = pTextNode->GetAdditionalIndentForStartingNewList();
1297  if ( ( nTextNodeIndent + nWidthOfTabs ) != 0 )
1298  {
1299  // #i111172#/fdo#85666
1300  // If text node is already inside a list, assure that the indents
1301  // are the same. Thus, adjust the indent change value by subtracting
1302  // indents of to be applied list style.
1303  SwTwips nIndentChange = nTextNodeIndent + nWidthOfTabs;
1304  if ( pTextNode->GetNumRule() )
1305  {
1306  int nLevel = pTextNode->GetActualListLevel();
1307 
1308  if (nLevel < 0)
1309  nLevel = 0;
1310 
1311  if (nLevel >= MAXLEVEL)
1312  nLevel = MAXLEVEL - 1;
1313 
1314  const SwNumFormat& aFormat( aNumRule.Get( nLevel ) );
1315  if ( aFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
1316  {
1317  nIndentChange -= aFormat.GetIndentAt() + aFormat.GetFirstLineIndent();
1318  }
1319  }
1320  aNumRule.ChangeIndent( nIndentChange );
1321  }
1322  }
1323  // reset indent attribute on applying list style
1324  // start new list
1325  SetCurNumRule( aNumRule, true, OUString(), true );
1326  }
1327 
1328  EndUndo(SwUndoId::NUMORNONUM);
1329 }
1330 // <- #i40041#
1331 
1333 {
1334  NumOrBulletOn(true);
1335 }
1336 
1338 {
1339  const SwNumRule * pCurNumRule = GetNumRuleAtCurrCursorPos();
1340 
1341  if (pCurNumRule)
1342  {
1343  if (pCurNumRule->IsOutlineRule())
1344  {
1345  SwNumRule aNumRule(*pCurNumRule);
1346 
1347  SwTextNode * pTextNode =
1348  sw::GetParaPropsNode(*GetLayout(), GetCursor()->GetPoint()->nNode);
1349 
1350  if (pTextNode)
1351  {
1352  int nLevel = pTextNode->GetActualListLevel();
1353 
1354  if (nLevel < 0)
1355  nLevel = 0;
1356 
1357  if (nLevel >= MAXLEVEL)
1358  nLevel = MAXLEVEL - 1;
1359 
1360  SwNumFormat aFormat(aNumRule.Get(static_cast<sal_uInt16>(nLevel)));
1361 
1363  aNumRule.Set(nLevel, aFormat);
1364 
1365  // no start or continuation of a list - the outline style is only changed.
1366  SetCurNumRule( aNumRule, false );
1367  }
1368  }
1369  else
1370  {
1371  DelNumRules();
1372  }
1373 
1374  // #126346# - Cursor can not be anymore in front of
1375  // a label, because numbering/bullet is switched off.
1376  SetInFrontOfLabel( false );
1377  }
1378 }
1379 // <- #i29560#
1380 
1381 // Request Default-Bulletlist
1382 
1384 {
1385  NumOrBulletOn(false);
1386 }
1387 
1389 {
1390  // ContentType cannot be determined within a Start-/EndAction.
1391  // Because there is no invalid value TEXT will be returned.
1392  // The value does not matter, it may be updated in EndAction anyway.
1393 
1394  if (ActionPend())
1395  return IsSelFrameMode() ? SelectionType::Frame : SelectionType::Text;
1396 
1397  SwView &_rView = const_cast<SwView&>(GetView());
1398  if (_rView.GetPostItMgr() && _rView.GetPostItMgr()->HasActiveSidebarWin() )
1399  return SelectionType::PostIt;
1400 
1401  // Inserting a frame is not a DrawMode
1402  SelectionType nCnt;
1403  if ( !_rView.GetEditWin().IsFrameAction() &&
1404  (IsObjSelected() || (_rView.IsDrawMode() && !IsFrameSelected()) ))
1405  {
1406  if (GetDrawView()->IsTextEdit())
1408  else
1409  {
1410  if (GetView().IsFormMode()) // Only Form selected
1411  nCnt = SelectionType::DbForm;
1412  else
1413  nCnt = SelectionType::DrawObject; // Any draw object
1414 
1415  if (_rView.IsBezierEditMode())
1416  nCnt |= SelectionType::Ornament;
1417  else if( GetDrawView()->GetContext() == SdrViewContext::Media )
1418  nCnt |= SelectionType::Media;
1419 
1420  if (svx::checkForSelectedCustomShapes( GetDrawView(), true /* bOnlyExtruded */ ))
1421  {
1423  }
1424  sal_uInt32 nCheckStatus = 0;
1425  if (svx::checkForSelectedFontWork( GetDrawView(), nCheckStatus ))
1426  {
1427  nCnt |= SelectionType::FontWork;
1428  }
1429  }
1430 
1431  return nCnt;
1432  }
1433 
1434  nCnt = static_cast<SelectionType>(GetCntType());
1435 
1436  if ( IsFrameSelected() )
1437  {
1438  if (_rView.IsDrawMode())
1439  _rView.LeaveDrawCreate(); // clean up (Bug #45639)
1440  if ( !(nCnt & (SelectionType::Graphic | SelectionType::Ole)) )
1441  return SelectionType::Frame;
1442  }
1443 
1444  if ( IsCursorInTable() )
1445  nCnt |= SelectionType::Table;
1446 
1447  if ( IsTableMode() )
1448  {
1450  SwTable::SearchType eTableSel = GetEnhancedTableSelection();
1451  if ( eTableSel == SwTable::SEARCH_ROW )
1452  nCnt |= SelectionType::TableRow;
1453  else if ( eTableSel == SwTable::SEARCH_COL )
1454  nCnt |= SelectionType::TableCol;
1455  }
1456 
1457  // Do not pop up numbering toolbar, if the text node has a numbering of type SVX_NUM_NUMBER_NONE.
1458  const SwNumRule* pNumRule = GetNumRuleAtCurrCursorPos();
1459  if ( pNumRule )
1460  {
1461  const SwTextNode* pTextNd =
1462  sw::GetParaPropsNode(*GetLayout(), GetCursor()->GetPoint()->nNode);
1463 
1464  if ( pTextNd && pTextNd->IsInList() )
1465  {
1466  int nLevel = pTextNd->GetActualListLevel();
1467 
1468  if (nLevel < 0)
1469  nLevel = 0;
1470 
1471  if (nLevel >= MAXLEVEL)
1472  nLevel = MAXLEVEL - 1;
1473 
1474  const SwNumFormat& rFormat = pNumRule->Get(nLevel);
1475  if ( SVX_NUM_NUMBER_NONE != rFormat.GetNumberingType() )
1476  nCnt |= SelectionType::NumberList;
1477  }
1478  }
1479 
1480  return nCnt;
1481 }
1482 
1483 // Find the text collection with the name rCollname
1484 // Returns: Pointer at the collection or 0, if no
1485 // text collection with this name exists, or
1486 // this is a default template.
1487 
1488 SwTextFormatColl *SwWrtShell::GetParaStyle(const OUString &rCollName, GetStyle eCreate )
1489 {
1490  SwTextFormatColl* pColl = FindTextFormatCollByName( rCollName );
1491  if( !pColl && GETSTYLE_NOCREATE != eCreate )
1492  {
1494  if( USHRT_MAX != nId || GETSTYLE_CREATEANY == eCreate )
1495  pColl = GetTextCollFromPool( nId );
1496  }
1497  return pColl;
1498 }
1499 
1500 // Find the text collection with the name rCollname
1501 // Returns: Pointer at the collection or 0, if no
1502 // character template with this name exists, or
1503 // this is a default template or template is automatic.
1504 
1505 SwCharFormat *SwWrtShell::GetCharStyle(const OUString &rFormatName, GetStyle eCreate )
1506 {
1507  SwCharFormat* pFormat = FindCharFormatByName( rFormatName );
1508  if( !pFormat && GETSTYLE_NOCREATE != eCreate )
1509  {
1511  if( USHRT_MAX != nId || GETSTYLE_CREATEANY == eCreate )
1512  pFormat = static_cast<SwCharFormat*>(GetFormatFromPool( nId ));
1513  }
1514  return pFormat;
1515 }
1516 
1517 // Find the table format with the name rFormatname
1518 // Returns: Pointer at the collection or 0, if no
1519 // frame format with this name exists or
1520 // this is a default format or the format is automatic.
1521 
1522 SwFrameFormat *SwWrtShell::GetTableStyle(const OUString &rFormatName)
1523 {
1524  for( size_t i = GetTableFrameFormatCount(); i; )
1525  {
1526  SwFrameFormat *pFormat = &GetTableFrameFormat( --i );
1527  if( !pFormat->IsDefault() &&
1528  pFormat->GetName() == rFormatName && IsUsed( *pFormat ) )
1529  return pFormat;
1530  }
1531  return nullptr;
1532 }
1533 
1535  SwPaM* pPaM = GetCursor();
1536  m_aNavigationMgr.addEntry(*pPaM->GetPoint());
1537 }
1538 
1539 // Applying templates
1540 
1541 void SwWrtShell::SetPageStyle(const OUString &rCollName)
1542 {
1543  if( !SwCursorShell::HasSelection() && !IsSelFrameMode() && !IsObjSelected() )
1544  {
1545  SwPageDesc* pDesc = FindPageDescByName( rCollName, true );
1546  if( pDesc )
1547  ChgCurPageDesc( *pDesc );
1548  }
1549 }
1550 
1551 // Access templates
1552 
1553 OUString const & SwWrtShell::GetCurPageStyle() const
1554 {
1555  return GetPageDesc(GetCurPageDesc( false/*bCalcFrame*/ )).GetName();
1556 }
1557 
1558 // Change the current template referring to the existing change.
1559 
1561 {
1563 
1564  // Default cannot be changed
1565  if(pColl && !pColl->IsDefault())
1566  {
1567  FillByEx(pColl);
1568  // Also apply the template to remove hard attribute assignment.
1569  SetTextFormatColl(pColl);
1570  }
1571 }
1572 
1573 void SwWrtShell::AutoUpdatePara(SwTextFormatColl* pColl, const SfxItemSet& rStyleSet, SwPaM* pPaM )
1574 {
1575  SwPaM* pCursor = pPaM ? pPaM : GetCursor( );
1576  SfxItemSet aCoreSet(
1577  GetAttrPool(),
1578  svl::Items<
1582  SID_ATTR_TABSTOP_DEFAULTS,SID_ATTR_TABSTOP_OFFSET,
1583  SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
1584  SID_ATTR_PARA_MODEL, SID_ATTR_PARA_KEEP,
1585  SID_ATTR_PARA_PAGENUM, SID_ATTR_PARA_PAGENUM>{});
1586  GetPaMAttr( pCursor, aCoreSet );
1587  bool bReset = false;
1588  SfxItemIter aParaIter( aCoreSet );
1589  for (auto pParaItem = aParaIter.GetCurItem(); pParaItem; pParaItem = aParaIter.NextItem())
1590  {
1591  if(!IsInvalidItem(pParaItem))
1592  {
1593  sal_uInt16 nWhich = pParaItem->Which();
1594  if(SfxItemState::SET == aCoreSet.GetItemState(nWhich) &&
1595  SfxItemState::SET == rStyleSet.GetItemState(nWhich))
1596  {
1597  aCoreSet.ClearItem(nWhich);
1598  bReset = true;
1599  }
1600  }
1601  }
1602  StartAction();
1603  if(bReset)
1604  {
1605  ResetAttr( std::set<sal_uInt16>(), pCursor );
1606  SetAttrSet(aCoreSet, SetAttrMode::DEFAULT, pCursor);
1607  }
1608  mxDoc->ChgFormat(*pColl, rStyleSet );
1609  EndAction();
1610 }
1611 
1612 void SwWrtShell::AutoUpdateFrame( SwFrameFormat* pFormat, const SfxItemSet& rStyleSet )
1613 {
1614  StartAction();
1615 
1616  ResetFlyFrameAttr( &rStyleSet );
1617  pFormat->SetFormatAttr( rStyleSet );
1618 
1619  EndAction();
1620 }
1621 
1623 {
1624  ResetCursorStack();
1625  if(CanInsert())
1626  {
1627  bool bStarted = false;
1628  SwRewriter aRewriter;
1629 
1630  if(HasSelection())
1631  {
1632  // Only parentheses here, because the regular insert
1633  // is already clipped to the editshell
1634  StartAllAction();
1635 
1636  OUString aTmpStr1 = SwResId(STR_START_QUOTE) +
1637  GetSelText() +
1638  SwResId(STR_END_QUOTE);
1639  OUString aTmpStr3 = SwResId(STR_START_QUOTE) +
1640  OUStringChar(cChar) +
1641  SwResId(STR_END_QUOTE);
1642  aRewriter.AddRule( UndoArg1, aTmpStr1 );
1643  aRewriter.AddRule( UndoArg2, SwResId(STR_YIELDS) );
1644  aRewriter.AddRule( UndoArg3, aTmpStr3 );
1645 
1646  StartUndo( SwUndoId::REPLACE, &aRewriter );
1647  bStarted = true;
1648  DelRight();
1649  }
1650  SwEditShell::AutoCorrect( rACorr, IsInsMode(), cChar );
1651 
1652  if(bStarted)
1653  {
1654  EndAllAction();
1655  EndUndo( SwUndoId::REPLACE, &aRewriter );
1656  }
1657  }
1658 }
1659 
1660 // Some kind of controlled copy ctor
1661 
1663  : SwFEShell(rSh, _pWin)
1664  , m_rView(rShell)
1665  , m_aNavigationMgr(*this)
1666 {
1668  SET_CURR_SHELL( this );
1669 
1670  SetSfxViewShell( static_cast<SfxViewShell *>(&rShell) );
1671  SetFlyMacroLnk( LINK(this, SwWrtShell, ExecFlyMac) );
1672 
1673  // place the cursor on the first field...
1674  IFieldmark *pBM = nullptr;
1675  if ( IsFormProtected() && ( pBM = GetFieldmarkAfter( ) ) !=nullptr ) {
1676  GotoFieldmark(pBM);
1677  }
1678 }
1679 
1681  const SwViewOption *pViewOpt )
1682  : SwFEShell(rDoc, _pWin, pViewOpt)
1683  , m_rView(rShell)
1684  , m_aNavigationMgr(*this)
1685 {
1687  SET_CURR_SHELL( this );
1688  SetSfxViewShell( static_cast<SfxViewShell *>(&rShell) );
1689  SetFlyMacroLnk( LINK(this, SwWrtShell, ExecFlyMac) );
1690 
1691  // place the cursor on the first field...
1692  IFieldmark *pBM = nullptr;
1693  if ( IsFormProtected() && ( pBM = GetFieldmarkAfter( ) ) !=nullptr ) {
1694  GotoFieldmark(pBM);
1695  }
1696 }
1697 
1699 {
1700  SET_CURR_SHELL( this );
1701  while(IsModePushed())
1702  PopMode();
1703  while(PopCursor(false))
1704  ;
1706 }
1707 
1709 {
1710  bool bRet = SwCursorShell::Pop(eDelete);
1711  if( bRet && IsSelection() )
1712  {
1715  }
1716  return bRet;
1717 }
1718 
1720 {
1721  if(IsSelFrameMode())
1722  {
1723  return false;
1724  }
1725 
1726  if(IsObjSelected())
1727  {
1728  return false;
1729  }
1730 
1731  if(GetView().GetDrawFuncPtr())
1732  {
1733  return false;
1734  }
1735 
1736  if(GetView().GetPostItMgr()->GetActiveSidebarWin())
1737  {
1738  return false;
1739  }
1740 
1741  return true;
1742 }
1743 
1744 void SwWrtShell::ChgDBData(const SwDBData& aDBData)
1745 {
1746  SwEditShell::ChgDBData(aDBData);
1747  //notify the db-beamer if available
1749 }
1750 
1751 OUString SwWrtShell::GetSelDescr() const
1752 {
1753  OUString aResult;
1754 
1755  SelectionType nSelType = GetSelectionType();
1756  switch (nSelType)
1757  {
1759  aResult = SwResId(STR_GRAPHIC);
1760 
1761  break;
1762  case SelectionType::Frame:
1763  {
1764  const SwFrameFormat * pFrameFormat = GetSelectedFrameFormat();
1765 
1766  if (pFrameFormat)
1767  aResult = pFrameFormat->GetDescription();
1768  }
1769  break;
1771  {
1772  aResult = SwResId(STR_DRAWING_OBJECTS);
1773  }
1774  break;
1775  default:
1776  if (mxDoc)
1777  aResult = GetCursorDescr();
1778  }
1779 
1780  return aResult;
1781 }
1782 
1784 {
1786  //#i115062# invalidate meta character slot
1788 }
1789 
1791 {
1794 }
1795 
1796 // Switch on/off header or footer of a page style - if an empty name is
1797 // given all styles are changed
1798 
1800  const OUString& rStyleName, bool bHeader, bool bOn, bool bShowWarning)
1801 {
1802  SdrView *const pSdrView = GetDrawView();
1803  if (pSdrView && pSdrView->IsTextEdit())
1804  { // tdf#107474 deleting header may delete active drawing object
1805  pSdrView->SdrEndTextEdit(true);
1806  }
1808  StartAllAction();
1809  StartUndo( SwUndoId::HEADER_FOOTER ); // #i7983#
1810  bool bExecute = true;
1811  bool bCursorSet = false;
1812  for( size_t nFrom = 0, nTo = GetPageDescCnt();
1813  nFrom < nTo; ++nFrom )
1814  {
1815  SwPageDesc aDesc( GetPageDesc( nFrom ));
1816  OUString sTmp(aDesc.GetName());
1817  if( rStyleName.isEmpty() || rStyleName == sTmp )
1818  {
1819  bool bChgd = false;
1820 
1821  if( bShowWarning && !bOn && GetActiveView() && GetActiveView() == &GetView() &&
1822  ( (bHeader && aDesc.GetMaster().GetHeader().IsActive()) ||
1823  (!bHeader && aDesc.GetMaster().GetFooter().IsActive()) ) )
1824  {
1825  bShowWarning = false;
1826  //Actions have to be closed while the dialog is showing
1827  EndAllAction();
1828 
1829  weld::Window* pParent = GetView().GetFrameWeld();
1830  short nResult;
1831  if (bHeader) {
1832  nResult = DeleteHeaderDialog(pParent).run();
1833  } else {
1834  nResult = DeleteFooterDialog(pParent).run();
1835  }
1836 
1837  bExecute = nResult == RET_YES;
1838  StartAllAction();
1839  if (nResult == RET_YES)
1841  }
1842  if( bExecute )
1843  {
1844  bChgd = true;
1845  SwFrameFormat &rMaster = aDesc.GetMaster();
1846  if(bHeader)
1847  rMaster.SetFormatAttr( SwFormatHeader( bOn ));
1848  else
1849  rMaster.SetFormatAttr( SwFormatFooter( bOn ));
1850  if( bOn )
1851  {
1852  SvxULSpaceItem aUL(bHeader ? 0 : MM50, bHeader ? MM50 : 0, RES_UL_SPACE );
1853  SwFrameFormat* pFormat = bHeader ?
1854  const_cast<SwFrameFormat*>(rMaster.GetHeader().GetHeaderFormat()) :
1855  const_cast<SwFrameFormat*>(rMaster.GetFooter().GetFooterFormat());
1856  pFormat->SetFormatAttr( aUL );
1857  }
1858  }
1859  if( bChgd )
1860  {
1861  ChgPageDesc( nFrom, aDesc );
1862 
1863  if( !bCursorSet && bOn )
1864  {
1865  if ( !IsHeaderFooterEdit() )
1867  bCursorSet = SetCursorInHdFt(
1868  rStyleName.isEmpty() ? SIZE_MAX : nFrom,
1869  bHeader );
1870  }
1871  }
1872  }
1873  }
1874  EndUndo( SwUndoId::HEADER_FOOTER ); // #i7983#
1875  EndAllAction();
1876 }
1877 
1879 {
1880  SwViewShell::SetShowHeaderFooterSeparator( eControl, bShow );
1881  if ( !bShow )
1883 }
1884 
1885 void SwWrtShell::InsertPostIt(SwFieldMgr& rFieldMgr, const SfxRequest& rReq)
1886 {
1887  SwPostItField* pPostIt = dynamic_cast<SwPostItField*>(rFieldMgr.GetCurField());
1888  bool bNew = !(pPostIt && pPostIt->GetTyp()->Which() == SwFieldIds::Postit);
1889  if (bNew || GetView().GetPostItMgr()->IsAnswer())
1890  {
1891  const SvxPostItAuthorItem* pAuthorItem = rReq.GetArg<SvxPostItAuthorItem>(SID_ATTR_POSTIT_AUTHOR);
1892  OUString sAuthor;
1893  if ( pAuthorItem )
1894  sAuthor = pAuthorItem->GetValue();
1895  else
1896  {
1897  std::size_t nAuthor = SW_MOD()->GetRedlineAuthor();
1898  sAuthor = SW_MOD()->GetRedlineAuthor(nAuthor);
1899  }
1900 
1901  const SvxPostItTextItem* pTextItem = rReq.GetArg<SvxPostItTextItem>(SID_ATTR_POSTIT_TEXT);
1902  OUString sText;
1903  if ( pTextItem )
1904  sText = pTextItem->GetValue();
1905 
1906  // If we have a text already registered for answer, use that
1907  if (GetView().GetPostItMgr()->IsAnswer() && !GetView().GetPostItMgr()->GetAnswerText().isEmpty())
1908  {
1909  sText = GetView().GetPostItMgr()->GetAnswerText();
1910  GetView().GetPostItMgr()->RegisterAnswerText(OUString());
1911  }
1912 
1913  if ( HasSelection() && !IsTableMode() )
1914  {
1915  KillPams();
1916  }
1917 
1918  // #i120513# Inserting a comment into an autocompletion crashes
1919  // --> suggestion has to be removed before
1921 
1922  SwInsertField_Data aData(SwFieldTypesEnum::Postit, 0, sAuthor, sText, 0);
1923 
1924  if (IsSelFrameMode())
1925  {
1926  SwFlyFrame* pFly = GetSelectedFlyFrame();
1927 
1928  // Remember the anchor of the selected object before deletion.
1929  std::unique_ptr<SwPosition> pAnchor;
1930  if (pFly)
1931  {
1932  SwFrameFormat* pFormat = pFly->GetFormat();
1933  if (pFormat)
1934  {
1935  RndStdIds eAnchorId = pFormat->GetAnchor().GetAnchorId();
1936  if ((eAnchorId == RndStdIds::FLY_AS_CHAR || eAnchorId == RndStdIds::FLY_AT_CHAR) && pFormat->GetAnchor().GetContentAnchor())
1937  {
1938  pAnchor.reset(new SwPosition(*pFormat->GetAnchor().GetContentAnchor()));
1939  }
1940  }
1941  }
1942 
1943  // A frame is selected, end frame selection.
1944  EnterStdMode();
1945  GetView().AttrChangedNotify(nullptr);
1946 
1947  // Set up text selection, so the anchor of the frame will be the anchor of the
1948  // comment.
1949  if (pFly)
1950  {
1951  *GetCurrentShellCursor().GetPoint() = *pAnchor;
1952  SwFrameFormat* pFormat = pFly->GetFormat();
1953  if (pFormat && pFormat->GetAnchor().GetAnchorId() == RndStdIds::FLY_AS_CHAR)
1954  {
1955  Right(CRSR_SKIP_CELLS, /*bSelect=*/true, 1, /*bBasicCall=*/false, /*bVisual=*/true);
1956  }
1957  else if (pFormat && pFormat->GetAnchor().GetAnchorId() == RndStdIds::FLY_AT_CHAR)
1958  {
1959  aData.m_pAnnotationRange.reset(new SwPaM(*GetCurrentShellCursor().Start(),
1960  *GetCurrentShellCursor().End()));
1961  }
1962  }
1963  }
1964 
1965  rFieldMgr.InsertField( aData );
1966 
1967  Push();
1969  pPostIt = static_cast<SwPostItField*>(rFieldMgr.GetCurField());
1970  Pop(SwCursorShell::PopMode::DeleteCurrent); // Restore cursor position
1971  }
1972 
1973  // Client has disabled annotations rendering, no need to
1974  // focus the postit field
1976  return;
1977 
1978  if (pPostIt)
1979  {
1981  SwIterator<SwFormatField,SwFieldType> aIter( *pType );
1982  SwFormatField* pSwFormatField = aIter.First();
1983  while( pSwFormatField )
1984  {
1985  if ( pSwFormatField->GetField() == pPostIt )
1986  {
1987  pSwFormatField->Broadcast( SwFormatFieldHint( nullptr, SwFormatFieldHintWhich::FOCUS, &GetView() ) );
1988  break;
1989  }
1990  pSwFormatField = aIter.Next();
1991  }
1992  }
1993 }
1994 
1995 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void InsertLineBreak()
Definition: wrtsh1.cxx:905
const Fraction & GetScaleWidth() const
SfxViewFrame * GetViewFrame() const
SvxNumType GetNumberingType() const
Instances of SwFields and those derived from it occur 0 to n times.
Definition: fldbas.hxx:234
long Width() const
css::uno::Reference< css::embed::XEmbeddedObject > CreateEmbeddedObject(const css::uno::Sequence< sal_Int8 > &, OUString &, OUString const *pBaseURL=nullptr)
const SfxSlot * GetSlot(sal_uInt16 nId) const
const css::uno::Reference< css::embed::XEmbeddedObject > & GetObject() const
bool Right(sal_uInt16 nMode, bool bSelect, sal_uInt16 nCount, bool bBasicCall, bool bVisual=false)
Definition: move.cxx:123
void KillPams()
Definition: crsrsh.cxx:1013
#define RES_FRM_SIZE
Definition: hintids.hxx:289
virtual css::uno::Reference< css::io::XInputStream > GetIconIfIconified(OUString *pGraphicMediaType)=0
void SplitNode(bool bAutoFormat=false)
Definition: wrtsh1.cxx:981
virtual const SwFlyFrameFormat * GetFormat() const override
Definition: fly.cxx:2810
int GetAssignedOutlineStyleLevel() const
Definition: fmtcol.cxx:587
OUString const & GetCurPageStyle() const
Definition: wrtsh1.cxx:1553
void ChgDBData(const SwDBData &SwDBData)
Definition: edfld.cxx:304
Represents the style of a paragraph.
Definition: fmtcol.hxx:55
Rect of current FlyFrame.
static SvxAutoCorrCfg & Get()
Marks a position in the document model.
Definition: pam.hxx:35
virtual SdrEndTextEditKind SdrEndTextEdit(bool bDontDeleteReally=false)
void InsertByWord(const OUString &)
Definition: wrtsh1.cxx:167
bool IsAutoCorrFlag(ACFlags nFlag) const
const SwField * GetField() const
Definition: fmtfld.hxx:70
bool IsDrawMode() const
Definition: view.hxx:526
SdrView * GetDrawView()
Definition: vnew.cxx:375
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
Definition: fmtpdsc.hxx:35
size_t GetPageDescCnt() const
Definition: fedesc.cxx:37
void InsertObject( const svt::EmbeddedObjectRef &, SvGlobalName const *pName, sal_uInt16 nSlotId=0)
Definition: wrtsh1.cxx:361
bool IsDefault() const
Definition: format.hxx:109
bool SetObjArea(const tools::Rectangle &)
void BulletOn()
Definition: wrtsh1.cxx:1383
long AdjustWidth(long n)
SwView * GetActiveView()
Definition: swmodul1.cxx:115
const char aData[]
Definition: ww8scan.hxx:47
const SwFormatHeader & GetHeader(bool=true) const
Definition: fmthdft.hxx:97
OutlinerParaObject * IsAnswer()
Definition: PostItMgr.hxx:258
void UpdateAttrMgr()
Definition: frmmgr.cxx:116
bool IsBezierEditMode() const
Definition: viewdraw.cxx:617
Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
long Height() const
virtual SwFieldType * GetFieldType(SwFieldIds nResId, const OUString &rName, bool bDbFieldMatching) const =0
SwNodeIndex nNode
Definition: pam.hxx:37
bool IsTableMode() const
Definition: crsrsh.hxx:647
void SetFlyMacroLnk(const Link< const SwFlyFrameFormat *, void > &rLnk)
Definition: crsrsh.hxx:483
void ChangeHeaderOrFooter(const OUString &rStyleName, bool bHeader, bool bOn, bool bShowWarning)
Definition: wrtsh1.cxx:1799
sal_uInt16 char char * pDesc
void Remove(const SvGlobalName &)
SVX_NUM_NUMBER_NONE
static SvxAbstractDialogFactory * Create()
void StopQuickHelp()
Definition: edtwin.cxx:5805
bool Pop(SwCursorShell::PopMode=SwCursorShell::PopMode::DeleteStack)
Definition: wrtsh1.cxx:1708
bool IsAutoRule() const
Definition: numrule.hxx:227
virtual void SetShowHeaderFooterSeparator(FrameControlType eControl, bool bShow) override
Definition: wrtsh1.cxx:1878
#define RES_FRMATR_END
Definition: hintids.hxx:331
virtual OUString GetDescription() const
Definition: atrfrm.cxx:2788
Definition: doc.hxx:185
void SetNumStr(const OUString &rStr)
Definition: fmtftn.hxx:76
void HideControls(FrameControlType eType)
TElementType * Next()
Definition: calbck.hxx:373
void Height(long nNew)
Definition: swrect.hxx:189
sal_Int16 nId
css::uno::Sequence< sal_Int8 > GetByteSequence() const
void AutoCorrect(SvxAutoCorrect &rACorr, bool bInsertMode, sal_Unicode cChar)
Call AutoCorrect.
Definition: edws.cxx:254
SwUndoId EndUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Closes parenthesis of nUndoId, not used by UI.
Definition: edws.cxx:233
OUString GetSelDescr() const
Definition: wrtsh1.cxx:1751
SwNode & GetNode() const
Definition: ndindex.hxx:119
bool Left(sal_uInt16 nCnt, sal_uInt16 nMode, bool bAllowVisual=false)
Definition: crsrsh.hxx:353
long SwTwips
Definition: swtypes.hxx:49
SwTwips GetWidthOfLeadingTabs() const
Returns the width of leading tabs/blanks in this paragraph.
Definition: itratr.cxx:1437
void EnterStdMode()
Definition: select.cxx:550
SwEditWin & GetEditWin()
Definition: view.hxx:403
void SetPageStyle(const OUString &rCollName)
Definition: wrtsh1.cxx:1541
void Pos(const Point &rNew)
Definition: swrect.hxx:167
Of course Writer needs its own rectangles.
Definition: swrect.hxx:34
#define RES_TXTATR_CHARFMT
Definition: hintids.hxx:236
void AutoUpdatePara(SwTextFormatColl *pColl, const SfxItemSet &rStyleSet, SwPaM *pPaM=nullptr)
Definition: wrtsh1.cxx:1573
void Invalidate(sal_uInt16 nId)
SwFlyFrame * GetSelectedFlyFrame() const
Definition: fefly1.cxx:273
bool InsertField(const SwInsertField_Data &rData)
Definition: fldmgr.cxx:889
bool InsertOleObject(const svt::EmbeddedObjectRef &xObj, SwFlyFrameFormat **pFlyFrameFormat=nullptr)
Definition: wrtsh1.cxx:465
OUString GetCursorDescr() const
Returns textual description of the current selection.
Definition: crsrsh.cxx:3612
RndStdIds GetAnchor() const
Definition: frmmgr.hxx:166
void DelAttr(sal_uInt16 nId)
Definition: frmmgr.cxx:515
void EndAllAction()
Definition: edws.cxx:96
long AdjustHeight(long n)
int GetActualListLevel() const
Returns the actual list level of this text node, when it is a list item.
Definition: ndtxt.cxx:4088
bool checkForSelectedCustomShapes(SdrView const *pSdrView, bool bOnlyExtruded)
static sal_uInt16 IsChart(const SvGlobalName &rName)
void InsertPostIt(SwFieldMgr &rFieldMgr, const SfxRequest &rReq)
Inserts a new annotation/comment at the current cursor position / selection.
Definition: wrtsh1.cxx:1885
void NoEdit(bool bHideCursor=true)
Definition: wrtsh1.cxx:143
virtual void SetReadonlyOption(bool bSet)
Definition: viewsh.cxx:2294
bool HasSelection() const
Does the current cursor create a selection?
Definition: crsrsh.cxx:2494
const OUString & GetName() const
Definition: pagedesc.hxx:187
bool IsActive() const
Definition: fmthdft.hxx:89
Used by the UI to modify the document model.
Definition: wrtsh.hxx:90
static UITestLogger & getInstance()
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
Definition: doc.cxx:356
bool IsHeaderFooterEdit() const
Acts both for headers / footers, depending on the bShow(Header|Footer)Separator flags.
Definition: viewsh.hxx:565
void logEvent(const EventDescription &rDescription)
bool isLetterNumeric(const OUString &rStr, sal_Int32 nPos) const
sal_uInt16 sal_Unicode
#define RES_CHRATR_END
Definition: hintids.hxx:208
const SfxPoolItem * NextItem()
bool IsAssignedToListLevelOfOutlineStyle() const
Definition: fmtcol.hxx:109
virtual void ApplyViewOptions(const SwViewOption &rOpt) override
Apply ViewOptions with Start-/EndAction.
Definition: editsh.cxx:1049
const SwTwips DFLT_HEIGHT
Definition: frmmgr.hxx:38
const SwView & GetView() const
Definition: wrtsh.hxx:428
SwFrameControlsManager & GetFrameControlsManager()
Definition: edtwin.cxx:6416
RET_YES
rtl::Reference< SwDoc > mxDoc
The document; never 0.
Definition: viewsh.hxx:174
SwIndex nContent
Definition: pam.hxx:38
sal_Unicode GetBulletChar(sal_uInt8 nLevel)
retrieve unicode of character used for the default bullet list for the given list level ...
Definition: number.cxx:1274
const OUString & GetName() const
Definition: format.hxx:111
void Edit()
Definition: wrtsh1.cxx:149
Footer, for pageformats Client of FrameFormat describing the footer.
Definition: fmthdft.hxx:64
SVX_NUM_ARABIC
const sal_uInt8 MAXLEVEL
Definition: swtypes.hxx:95
SELECTFUNC m_fnSetCursor
Definition: wrtsh.hxx:109
static SW_DLLPUBLIC sal_uInt16 GetPoolIdFromUIName(const OUString &rName, SwGetPoolIdFromName)
const SfxItemSet & GetAttrSet() const
Definition: frmmgr.hxx:123
#define RES_UL_SPACE
Definition: hintids.hxx:292
Numbering symbols.
Definition: poolfmt.hxx:118
SwDoc * GetDoc() const
Definition: viewsh.hxx:284
#define RES_PARATR_BEGIN
Definition: hintids.hxx:254
static sal_uInt16 IsMath(const SvGlobalName &rName)
virtual void MoveObjectIfActive(svt::EmbeddedObjectRef &xObj, const Point &rOffset) override
The layout has been changed, so the active object has to be moved after that.
Definition: wrtsh1.cxx:628
bool IsEmpty() const
Definition: swrect.hxx:294
void Insert(SwField const &, SwPaM *pAnnotationRange=nullptr)
Definition: wrtsh2.cxx:60
void NumOn()
Definition: wrtsh1.cxx:1332
bool IsFormProtected()
Definition: crbm.cxx:278
SwWrtShell(SwWrtShell &, vcl::Window *pWin, SwView &rShell)
Definition: wrtsh1.cxx:1662
void SetReadonlyControls(bool bReadonly)
SVX_NUM_CHAR_SPECIAL
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
Definition: dialoghelp.cxx:20
void LaunchOLEObj(long nVerb=0)
Definition: wrtsh1.cxx:600
void SetHeightSizeType(SwFrameSize eType)
Definition: frmmgr.cxx:573
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:136
Class for automated call of Start- and EndAction().
Definition: editsh.hxx:1020
bool IsSelection() const
Definition: crsrsh.hxx:883
sal_uInt16 char * pName
std::unique_ptr< SwPaM > m_pAnnotationRange
Marks the PostIt field's annotation start/end if it differs from the cursor selection.
Definition: fldmgr.hxx:84
static css::uno::Reference< css::embed::XStorage > GetTemporaryStorage(const css::uno::Reference< css::uno::XComponentContext > &rxContext=css::uno::Reference< css::uno::XComponentContext >())
Style of a layout element.
Definition: frmfmt.hxx:57
virtual SwPaM & GetCurrentShellCursor() override
Return the current shell cursor.
Definition: crsrsh.cxx:179
bool HasSelection() const
Definition: wrtsh.hxx:141
#define SW_MOD()
Definition: swmodule.hxx:256
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SwFormatAnchor & GetAnchor(bool=true) const
Definition: fmtanchr.hxx:81
void Insert2(const OUString &, const bool bForceExpandHints=false)
Definition: editsh.cxx:79
bool IsFrameAction() const
Definition: edtwin.hxx:215
bool checkForSelectedFontWork(SdrView const *pSdrView, sal_uInt32 &nCheckStatus)
const SwFrameFormat * GetFooterFormat() const
Definition: fmthdft.hxx:85
const SwPosition * GetPoint() const
Definition: pam.hxx:207
bool SetCursorInHdFt(size_t nDescNo, bool bInHeader)
Definition: crstrvl.cxx:191
const vcl::Font & GetDefBulletFont()
retrieve font used for the default bullet list characters
Definition: number.cxx:1269
RndStdIds GetAnchorId() const
Definition: fmtanchr.hxx:65
SwFlyFrameFormat * InsertObject(const svt::EmbeddedObjectRef &, const SfxItemSet *pFlyAttrSet)
Definition: fefly1.cxx:883
const SwPosition * GetContentAnchor() const
Definition: fmtanchr.hxx:67
virtual void SetShowHeaderFooterSeparator(FrameControlType eControl, bool bShow)
Definition: viewsh.cxx:91
void Push()
store a copy of the current cursor on the cursor stack
Definition: crsrsh.cxx:2229
SwCharFormat * GetCharStyle(const OUString &rFormatName, GetStyle eCreate=GETSTYLE_NOCREATE)
Definition: wrtsh1.cxx:1505
SvxAutoCorrect * GetAutoCorrect()
SfxBindings & GetBindings()
TElementType * First()
Definition: calbck.hxx:342
int i
void Assign(const css::uno::Reference< css::embed::XEmbeddedObject > &xObj, sal_Int64 nAspect)
const OUString & GetValue() const
const SwPageDesc & GetPageDesc(size_t i) const
Definition: fedesc.cxx:125
void SetTextFormatColl(const css::uno::Any &rAny, SwPaM &rPaM)
const T * GetArg(sal_uInt16 nSlotId) const
void SetSfxViewShell(SfxViewShell *pNew)
Definition: viewsh.hxx:445
SwUndoId StartUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Undo: set up Undo parenthesis, return nUndoId of this parenthesis.
Definition: edws.cxx:222
SwField * GetCurField()
Definition: fldmgr.cxx:424
void SetNumOffset(const ::o3tl::optional< sal_uInt16 > &oNum)
Definition: fmtpdsc.hxx:66
void AddRule(SwUndoArg eWhat, const OUString &rWith)
Definition: SwRewriter.cxx:29
#define RES_CHRATR_BEGIN
Definition: hintids.hxx:162
const SwFormatFooter & GetFooter(bool=true) const
Definition: fmthdft.hxx:99
void SetGraphicStream(const css::uno::Reference< css::io::XInputStream > &xInGrStream, const OUString &rMediaType)
SwNumRule * GetNumRule(bool bInParent=true) const
Returns numbering rule of this text node.
Definition: ndtxt.cxx:2804
void SetAnchor(RndStdIds eId)
Definition: frmmgr.cxx:207
void NumOrBulletOff()
Definition: wrtsh1.cxx:1337
#define SET_CURR_SHELL(shell)
Definition: swtypes.hxx:101
long ResetSelect(const Point *, bool)
Definition: select.cxx:332
void ToggleHeaderFooterEdit()
Definition: fews.cxx:1346
virtual void SetReadonlyOption(bool bSet) override
Definition: wrtsh1.cxx:1790
#define CNT_OLE
Definition: editsh.hxx:133
OUString SwResId(const char *pId)
Definition: swmodule.cxx:178
void SSize(const Size &rNew)
Definition: swrect.hxx:176
void PopMode()
Definition: select.cxx:283
void LeaveDrawCreate()
Definition: view.hxx:525
void Insert(const OUString &rGrfName, const OUString &rFltName, const Graphic *pGraphic, const SfxItemSet *pFlyAttrSet)
Definition: fefly1.cxx:800
Frame cannot be moved in Var-direction.
const SwNumRuleItem & GetNumRule(bool=true) const
Definition: paratr.hxx:218
const char * GetUnoName() const
SwTextNode * GetParaPropsNode(SwRootFrame const &rLayout, SwNodeIndex const &rNode)
Definition: txtfrm.cxx:324
SwFieldType * GetTyp() const
Definition: fldbas.hxx:383
SwFrameFormat * GetTableStyle(const OUString &rFormatName)
Definition: wrtsh1.cxx:1522
SwFrameFormat * GetSelectedFrameFormat() const
If frame then frame style, else 0.
Definition: fefly1.cxx:1168
void ChangeIndent(const sal_Int32 nDiff)
change indent of all list levels by given difference
Definition: number.cxx:890
SW_DLLPUBLIC bool HasActiveSidebarWin() const
Definition: PostItMgr.cxx:2317
virtual void CalcAndSetScale(svt::EmbeddedObjectRef &xObj, const SwRect *pFlyPrtRect=nullptr, const SwRect *pFlyFrameRect=nullptr, const bool bNoTextFramePrtAreaChanged=false) override
Client for OleObject has to be up-to-date regarding scaling.
Definition: wrtsh1.cxx:651
SelectionType
Definition: wrtsh.hxx:58
long GetIndentAt() const
virtual bool SetFormatAttr(const SfxPoolItem &rAttr)
Definition: format.cxx:458
const SwNumFormat & Get(sal_uInt16 i) const
Definition: number.cxx:77
const sal_uInt16 CRSR_SKIP_CELLS
Definition: swcrsr.hxx:64
static void Get1PixelInLogic(const SwViewShell &rSh, long *pX=nullptr, long *pY=nullptr)
Definition: viscrs.cxx:545
virtual css::uno::Reference< css::embed::XEmbeddedObject > GetObject()=0
void InsertFootnote(const OUString &, bool bEndNote=false, bool bEdit=true)
Definition: wrtsh1.cxx:948
FrameControlType
Definition: swtypes.hxx:244
Class for automated call of Start- and EndCursorMove().
Definition: editsh.hxx:1028
SwFrameFormat & GetMaster()
Definition: pagedesc.hxx:217
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:79
void Broadcast(const SfxHint &rHint)
void NumOrBulletOn(bool bNum)
Turns on numbering or bullets.
Definition: wrtsh1.cxx:1016
void addCurrentPosition()
Definition: wrtsh1.cxx:1534
void Set(sal_uInt16 i, const SwNumFormat *)
Definition: number.cxx:585
virtual ~SwWrtShell() override
Definition: wrtsh1.cxx:1698
void SetCharFormat(SwCharFormat *)
Definition: number.cxx:271
#define BITFLD_INI_LIST
Definition: wrtsh1.cxx:120
::sw::mark::IFieldmark * GetFieldmarkAfter()
Definition: crbm.cxx:290
virtual bool IsTextEdit() const final override
tools::Rectangle SVRect() const
Definition: swrect.hxx:282
long CalcWidthBorder()
Definition: frmmgr.hxx:133
SvxNumberFormat::SvxNumPositionAndSpaceMode GetDefaultPositionAndSpaceMode()
Definition: number.cxx:1391
weld::Window * GetFrameWeld() const
#define MM50
Definition: swtypes.hxx:59
general base class for all free-flowing frames
Definition: flyfrm.hxx:60
bool IsDefBulletFontUserDefined()
determine if default bullet font is user defined
Definition: number.cxx:1264
static MapUnit UnoEmbed2VCLMapUnit(sal_Int32 nUnoEmbedMapUnit)
unsigned char sal_uInt8
void Width(long nNew)
Definition: swrect.hxx:185
static void ClearSelection(SwWrtShell &rSh, const SwFrameShell *pCreator=nullptr)
Definition: swdtflvr.cxx:4048
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
Definition: unosett.cxx:253
OUString aName
sal_Int32 GetIndex() const
Definition: index.hxx:95
bool IsCountedInList() const
Definition: ndtxt.cxx:4231
const tools::Rectangle & GetObjArea() const
Reference< XComponent > mxDoc
bool IsModePushed() const
Definition: wrtsh.hxx:132
void ChgPageDesc(size_t i, const SwPageDesc &)
Definition: fedesc.cxx:110
SwPostItMgr * GetPostItMgr()
Definition: view.hxx:623
bool CanInsert()
Definition: wrtsh1.cxx:1719
void NotifyDBChanged()
Definition: view.cxx:1844
Size GetSize(MapMode const *pTargetMapMode) const
size_t IsObjSelected() const
Definition: feshview.cxx:1158
void SetSize(const Size &rLSize)
Definition: frmmgr.cxx:594
void SetObjAreaAndScale(const tools::Rectangle &, const Fraction &, const Fraction &)
void AutoUpdateFrame(SwFrameFormat *pFormat, const SfxItemSet &rStyleSet)
Definition: wrtsh1.cxx:1612
SAL_DLLPRIVATE long SetCursorKillSel(const Point *, bool bProp)
Definition: select.cxx:315
Header, for PageFormats Client of FrameFormat describing the header.
Definition: fmthdft.hxx:33
#define FN_VIEW_META_CHARS
Definition: cmdid.h:161
void InsertColumnBreak()
Definition: wrtsh1.cxx:925
ErrCode DoVerb(long nVerb)
const SwPostItMgr * GetPostItMgr() const
Definition: viewsh.hxx:559
virtual bool IsCreateNew()=0
SwFormatColl * GetCurTextFormatColl(SwPaM &rPam, const bool bConditional)
Definition: unoobj.cxx:606
void AutoCorrect(SvxAutoCorrect &rACorr, sal_Unicode cChar)
Definition: wrtsh1.cxx:1622
void InsertPageBreak(const OUString *pPageDesc=nullptr, const ::o3tl::optional< sal_uInt16 > &rPgNum=o3tl::nullopt)
Definition: wrtsh1.cxx:870
void Overwrite(const OUString &)
Definition: editsh.cxx:168
static SvxAutoCorrect * lcl_IsAutoCorr()
Definition: wrtsh1.cxx:133
bool IsEndWrd()
Definition: wrtsh1.cxx:157
const sal_uInt16 CRSR_SKIP_CHARS
Definition: swcrsr.hxx:63
MapUnit
RndStdIds
SwTwips GetAdditionalIndentForStartingNewList() const
Definition: ndtxt.cxx:3238
bool IsInList() const
Definition: ndtxt.cxx:4335
static bool TryRunningState(const css::uno::Reference< css::embed::XEmbeddedObject > &)
const Point & GetLastFlyFramePrtRectPos() const
Definition: frmfmt.hxx:244
Left
void ChgDBData(const SwDBData &SwDBData)
Definition: wrtsh1.cxx:1744
SAL_DLLPRIVATE bool PopCursor(bool bUpdate, bool bSelect=false)
Definition: move.cxx:481
void SplitNode(bool bAutoFormat=false, bool bCheckTableStart=true)
Definition: editsh.cxx:182
bool Pop(PopMode)
delete cursor
Definition: crsrsh.cxx:2251
const Size & GetSize() const
Definition: frmmgr.hxx:137
long CalcHeightBorder()
Definition: frmmgr.hxx:134
void SetNumberingType(SvxNumType nSet)
virtual void ConnectObj(svt::EmbeddedObjectRef &xIPObj, const SwRect &rPrt, const SwRect &rFrame) override
Connect objects with ActivateWhenVisible at Paint.
Definition: wrtsh1.cxx:859
std::map< OUString, OUString > aParameters
bool IsActive() const
Definition: fmthdft.hxx:58
sal_Int64 GetViewAspect() const
bool IsInvalidItem(const SfxPoolItem *pItem)
const SwTwips DFLT_WIDTH
Definition: frmmgr.hxx:37
#define RES_BREAK
Definition: hintids.hxx:294
SelectionType GetSelectionType() const
Definition: wrtsh1.cxx:1388
virtual void ApplyViewOptions(const SwViewOption &rOpt) override
Apply ViewOptions with Start-/EndAction.
Definition: wrtsh1.cxx:1783
void StartAllAction()
For all views of this document.
Definition: edws.cxx:85
const Fraction & GetScaleHeight() const
bool GotoFieldmark(::sw::mark::IFieldmark const *const pMark)
Definition: wrtsh3.cxx:85
void RegisterAnswerText(const OUString &aAnswerText)
Definition: PostItMgr.hxx:259
CharClass & GetAppCharClass()
Definition: init.cxx:709
void setWidth(long nWidth)
#define RES_FRMATR_BEGIN
Definition: hintids.hxx:287
const OUString & GetAnswerText() const
Definition: PostItMgr.hxx:260
SwFieldIds Which() const
Definition: fldbas.hxx:266
sal_Int32 nState
Rect of PrtArea of FlyFrame.
void QuickUpdateStyle()
Definition: wrtsh1.cxx:1560
bool IsOutlineRule() const
Definition: numrule.hxx:239
Definition: view.hxx:146
SELECTFUNC m_fnKillSel
Definition: wrtsh.hxx:111
const SwFrameFormat * GetHeaderFormat() const
Definition: fmthdft.hxx:54
sal_uInt16 nPos
const SfxPoolItem * GetCurItem() const
bool IsSelFrameMode() const
Definition: wrtsh.hxx:170
SwTextFormatColl * GetParaStyle(const OUString &rCollName, GetStyle eCreate=GETSTYLE_NOCREATE)
Definition: wrtsh1.cxx:1488
void UpdateFlyFrame()
Definition: frmmgr.cxx:140
#define RES_PARATR_END
Definition: hintids.hxx:274
#define RES_CHRATR_RSID
Definition: hintids.hxx:201
void setHeight(long nHeight)