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