LibreOffice Module sw (master)  1
viscrs.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 <config_features.h>
21 
22 #include <vcl/weld.hxx>
23 #include <vcl/svapp.hxx>
24 #include <vcl/settings.hxx>
25 #include <viewopt.hxx>
26 #include <frmtool.hxx>
27 #include <viscrs.hxx>
28 #include <crsrsh.hxx>
29 #include <doc.hxx>
30 #include <swtable.hxx>
31 #include <viewimp.hxx>
32 #include <dview.hxx>
33 #include <rootfrm.hxx>
34 #include <txtfrm.hxx>
35 #include <ndtxt.hxx>
36 #include <txtfld.hxx>
37 #include <scriptinfo.hxx>
38 #include <view.hxx>
40 
42 #include <svx/sdrpaintwindow.hxx>
43 #include <svx/srchdlg.hxx>
45 #include "overlayrangesoutline.hxx"
46 
47 #include <memory>
48 
49 #include <LibreOfficeKit/LibreOfficeKitEnums.h>
50 #include <comphelper/lok.hxx>
51 #include <sfx2/lokhelper.hxx>
52 #include <boost/property_tree/json_parser.hpp>
53 #include <comphelper/string.hxx>
54 #include <paintfrm.hxx>
55 #include <PostItMgr.hxx>
56 #include <SwGrammarMarkUp.hxx>
57 #include <docsh.hxx>
58 
59 #include <cellfrm.hxx>
60 #include <wrtsh.hxx>
61 
62 // Here static members are defined. They will get changed on alteration of the
63 // MapMode. This is done so that on ShowCursor the same size does not have to be
64 // expensively determined again and again.
65 
69 
70 // Starting from here: classes / methods for the non-text-cursor
72  : m_pCursorShell( pCShell )
73  , m_nPageLastTime(0)
74 {
75  pCShell->GetWin()->SetCursor( &m_aTextCursor );
77  m_bIsDragCursor = false;
79 }
80 
82 {
85 
86  m_pCursorShell->GetWin()->SetCursor( nullptr );
87 }
88 
90 {
91  if( !m_bIsVisible )
92  {
93  m_bIsVisible = true;
94 
95  // display at all?
97  SetPosAndShow(nullptr);
98  }
99 }
100 
102 {
103  if( m_bIsVisible )
104  {
105  m_bIsVisible = false;
106 
107  if( m_aTextCursor.IsVisible() ) // Shouldn't the flags be in effect?
109  }
110 }
111 
112 namespace
113 {
114 
115 // Build JSON message to be sent to Online
116 OString buildHyperlinkJSON(const OUString& sText, const OUString& sLink)
117 {
118  boost::property_tree::ptree aTree;
119  aTree.put("text", sText);
120  aTree.put("link", sLink);
121  std::stringstream aStream;
122  boost::property_tree::write_json(aStream, aTree, false);
123 
124  return OString(aStream.str().c_str()).trim();
125 }
126 
127 }
128 
130 {
131  SwRect aRect;
132  long nTmpY = m_pCursorShell->m_aCursorHeight.getY();
133  if( 0 > nTmpY )
134  {
135  nTmpY = -nTmpY;
137  aRect = SwRect( m_pCursorShell->m_aCharRect.Pos(),
138  Size( m_pCursorShell->m_aCharRect.Height(), nTmpY ) );
139  aRect.Pos().setX(aRect.Pos().getX() + m_pCursorShell->m_aCursorHeight.getX());
141  aRect.Pos().setY(aRect.Pos().getY() + aRect.Width());
142  }
143  else
144  {
146  aRect = SwRect( m_pCursorShell->m_aCharRect.Pos(),
147  Size( m_pCursorShell->m_aCharRect.Width(), nTmpY ) );
148  aRect.Pos().setY(aRect.Pos().getY() + m_pCursorShell->m_aCursorHeight.getX());
149  }
150 
151  // check if cursor should show the current cursor bidi level
153  const SwCursor* pTmpCursor = m_pCursorShell->GetCursor_();
154 
155  if ( pTmpCursor && !m_pCursorShell->IsOverwriteCursor() )
156  {
157  SwNode& rNode = pTmpCursor->GetPoint()->nNode.GetNode();
158  if( rNode.IsTextNode() )
159  {
160  const SwTextNode& rTNd = *rNode.GetTextNode();
161  const SwFrame* pFrame = rTNd.getLayoutFrame(m_pCursorShell->GetLayout(), nullptr, nullptr);
162  if ( pFrame )
163  {
164  const SwScriptInfo* pSI = static_cast<const SwTextFrame*>(pFrame)->GetScriptInfo();
165  // cursor level has to be shown
166  if ( pSI && pSI->CountDirChg() > 1 )
167  {
169  ( pTmpCursor->GetCursorBidiLevel() % 2 ) ?
170  CursorDirection::RTL :
171  CursorDirection::LTR );
172  }
173  if ( pFrame->IsRightToLeft() )
174  {
176  if ( pOut )
177  {
178  long nSize = pOut->GetSettings().GetStyleSettings().GetCursorSize();
179  Size aSize( nSize, nSize );
180  aSize = pOut->PixelToLogic( aSize );
181  aRect.Left( aRect.Left() - aSize.Width() );
182  }
183  }
184  }
185  }
186  }
187 
188  if( aRect.Height())
189  {
191 
192  // Disable pixel alignment when tiled rendering, so that twip values of
193  // the cursor don't depend on statics.
195  ::SwAlignRect( aRect, static_cast<SwViewShell const *>(m_pCursorShell), m_pCursorShell->GetOut() );
196  }
199  aRect.Width( 0 );
200 
201  m_aTextCursor.SetSize( aRect.SSize() );
202 
203  m_aTextCursor.SetPos( aRect.Pos() );
204 
205  bool bPostItActive = false;
206  SwView* pView = dynamic_cast<SwView*>(m_pCursorShell->GetSfxViewShell());
207  if (pView)
208  {
209  if (SwPostItMgr* pPostItMgr = pView->GetPostItMgr())
210  bPostItActive = pPostItMgr->GetActiveSidebarWin() != nullptr;
211  }
212 
213  if (comphelper::LibreOfficeKit::isActive() && !bPostItActive)
214  {
215  // notify about page number change (if that happened)
216  sal_uInt16 nPage, nVirtPage;
217  // bCalcFrame=false is important to avoid calculating the layout when
218  // we're in the middle of doing that already.
219  const_cast<SwCursorShell*>(m_pCursorShell)->GetPageNum(nPage, nVirtPage, /*bAtCursorPos=*/true, /*bCalcFrame=*/false);
220  if (nPage != m_nPageLastTime)
221  {
222  m_nPageLastTime = nPage;
223  OString aPayload = OString::number(nPage - 1);
224  m_pCursorShell->GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_SET_PART, aPayload.getStr());
225  }
226 
227  // notify about the cursor position & size
228  tools::Rectangle aSVRect(aRect.Pos().getX(), aRect.Pos().getY(), aRect.Pos().getX() + aRect.SSize().Width(), aRect.Pos().getY() + aRect.SSize().Height());
229  OString sRect = aSVRect.toString();
230 
231  // is cursor at a misspelled word ?
232  bool bIsWrong = false;
233  if (pView && pView->GetWrtShellPtr())
234  {
235  const SwViewOption* pVOpt = pView->GetWrtShell().GetViewOptions();
236  if(pVOpt && pVOpt->IsOnlineSpell())
237  {
238  SwPaM* pCursor = m_pCursorShell->GetCursor();
239  SwPosition aPos(*pCursor->GetPoint());
240  Point aPt = aRect.Pos();
242  SwTextNode *pNode = nullptr;
243  if (m_pCursorShell->GetLayout()->GetModelPositionForViewPoint(&aPos, aPt, &eTmpState))
244  pNode = aPos.nNode.GetNode().GetTextNode();
245  if (pNode && !pNode->IsInProtectSect())
246  {
247  sal_Int32 nBegin = aPos.nContent.GetIndex();
248  sal_Int32 nLen = 1;
249 
250  SwWrongList *pWrong = nullptr;
251  pWrong = pNode->GetWrong();
252  if (!pWrong)
253  pWrong = pNode->GetGrammarCheck();
254  if (pWrong)
255  bIsWrong = pWrong->InWrongWord(nBegin,nLen) && !pNode->IsSymbolAt(nBegin);
256  }
257  }
258  }
259 
260  OString sHyperlink;
261  SwContentAtPos aContentAtPos(IsAttrAtPos::InetAttr);
262  bool bIsSelection = m_pCursorShell->IsSelection();
263 
264  if (const_cast<SwCursorShell*>(m_pCursorShell)->GetContentAtPos(aRect.Pos(), aContentAtPos))
265  {
266  const SwFormatINetFormat* pItem = static_cast<const SwFormatINetFormat*>(aContentAtPos.aFnd.pAttr);
267  sHyperlink = buildHyperlinkJSON(aContentAtPos.sStr, pItem->GetValue());
268  }
269  else if (bIsSelection)
270  {
272 
273  if (pShell)
274  {
277  RES_TXTATR_INETFMT>{});
278  pShell->GetCurAttr(aSet);
279  if(SfxItemState::SET <= aSet.GetItemState( RES_TXTATR_INETFMT ))
280  {
281  sHyperlink = buildHyperlinkJSON(m_pCursorShell->GetSelText(),
282  aSet.GetItem(RES_TXTATR_INETFMT)->GetValue());
283  }
284  }
285  }
286 
287  if (pViewShell)
288  {
289  if (pViewShell == m_pCursorShell->GetSfxViewShell())
290  {
291  SfxLokHelper::notifyVisCursorInvalidation(pViewShell, sRect, bIsWrong, sHyperlink);
292  }
293  else
294  SfxLokHelper::notifyOtherView(m_pCursorShell->GetSfxViewShell(), pViewShell, LOK_CALLBACK_INVALIDATE_VIEW_CURSOR, "rectangle", sRect);
295  }
296  else
297  {
299  SfxLokHelper::notifyOtherViews(m_pCursorShell->GetSfxViewShell(), LOK_CALLBACK_INVALIDATE_VIEW_CURSOR, "rectangle", sRect);
300  }
301  }
302 
304  return;
305 
306  if ( m_pCursorShell->GetDrawView() )
307  const_cast<SwDrawView*>(static_cast<const SwDrawView*>(m_pCursorShell->GetDrawView()))->SetAnimationEnabled(
309 
310  sal_uInt16 nStyle = m_bIsDragCursor ? CURSOR_SHADOW : 0;
311  if( nStyle != m_aTextCursor.GetStyle() )
312  {
313  m_aTextCursor.SetStyle( nStyle );
315  }
316 
318 }
319 
321 {
322  return m_aTextCursor;
323 }
324 
326  : SwRects()
327  , m_pCursorShell( &rCSh )
328 #if HAVE_FEATURE_DESKTOP
329  , m_bShowTextInputFieldOverlay(true)
330 #endif
331 {
332 }
333 
335 {
336  Hide();
337 }
338 
340 {
341  SwRects::swap(rSwap);
342 
343 #if HAVE_FEATURE_DESKTOP
344  // #i75172# also swap m_pCursorOverlay
345  std::swap(m_pCursorOverlay, rSwap.m_pCursorOverlay);
348 #endif
349 }
350 
352 {
353 #if HAVE_FEATURE_DESKTOP
354  m_pCursorOverlay.reset();
355  m_pTextInputFieldOverlay.reset();
356 #endif
357 
358  SwRects::clear();
359 }
360 
369 static SwRect lcl_getLayoutRect(const Point& rPoint, const SwPosition& rPosition)
370 {
371  const SwContentNode* pNode = rPosition.nNode.GetNode().GetContentNode();
372  std::pair<Point, bool> const tmp(rPoint, true);
373  const SwContentFrame* pFrame = pNode->getLayoutFrame(
375  &rPosition, &tmp);
376  SwRect aRect;
377  pFrame->GetCharRect(aRect, rPosition);
378  return aRect;
379 }
380 
381 void SwShellCursor::FillStartEnd(SwRect& rStart, SwRect& rEnd) const
382 {
383  const SwShellCursor* pCursor = GetShell()->getShellCursor(false);
384  rStart = lcl_getLayoutRect(pCursor->GetSttPos(), *pCursor->Start());
385  rEnd = lcl_getLayoutRect(pCursor->GetEndPos(), *pCursor->End());
386 }
387 
388 void SwSelPaintRects::Show(std::vector<OString>* pSelectionRectangles)
389 {
390  SdrView *const pView = const_cast<SdrView*>(m_pCursorShell->GetDrawView());
391 
392  if(!(pView && pView->PaintWindowCount()))
393  return;
394 
395  // reset rects
396  SwRects::clear();
397  FillRects();
398 
399 #if HAVE_FEATURE_DESKTOP
400  // get new rects
401  std::vector< basegfx::B2DRange > aNewRanges;
402  aNewRanges.reserve(size());
403  for(size_type a = 0; a < size(); ++a)
404  {
405  const SwRect aNextRect((*this)[a]);
406  const tools::Rectangle aPntRect(aNextRect.SVRect());
407 
408  aNewRanges.emplace_back(
409  aPntRect.Left(), aPntRect.Top(),
410  aPntRect.Right() + 1, aPntRect.Bottom() + 1);
411  }
412 
413  if (m_pCursorOverlay)
414  {
415  if(!aNewRanges.empty())
416  {
417  static_cast<sdr::overlay::OverlaySelection*>(m_pCursorOverlay.get())->setRanges(aNewRanges);
418  }
419  else
420  {
421  m_pCursorOverlay.reset();
422  }
423  }
424  else if(!empty())
425  {
426  SdrPaintWindow* pCandidate = pView->GetPaintWindow(0);
427  const rtl::Reference< sdr::overlay::OverlayManager >& xTargetOverlay = pCandidate->GetOverlayManager();
428 
429  if (xTargetOverlay.is())
430  {
431  // get the system's highlight color
432  const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer;
433  const Color aHighlight(aSvtOptionsDrawinglayer.getHilightColor());
434 
435  // create correct selection
436  m_pCursorOverlay.reset( new sdr::overlay::OverlaySelection(
438  aHighlight,
439  aNewRanges,
440  true) );
441 
442  xTargetOverlay->add(*m_pCursorOverlay);
443  }
444  }
445 
447 #endif
448 
449  // Tiled editing does not expose the draw and writer cursor, it just
450  // talks about "the" cursor at the moment. As long as that's true,
451  // don't say anything about the Writer cursor till a draw object is
452  // being edited.
454  return;
455 
456  // If pSelectionRectangles is set, we're just collecting the text selections -> don't emit start/end.
457  if (!empty() && !pSelectionRectangles)
458  {
459  // The selection may be a complex polygon, emit the logical
460  // start/end cursor rectangle of the selection as separate
461  // events, if there is a real selection.
462  // This can be used to easily show selection handles on the
463  // client side.
464  SwRect aStartRect;
465  SwRect aEndRect;
466  FillStartEnd(aStartRect, aEndRect);
467 
468  if (aStartRect.HasArea())
469  {
470  OString sRect = aStartRect.SVRect().toString();
471  GetShell()->GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION_START, sRect.getStr());
472  }
473  if (aEndRect.HasArea())
474  {
475  OString sRect = aEndRect.SVRect().toString();
476  GetShell()->GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION_END, sRect.getStr());
477  }
478  }
479 
480  std::vector<OString> aRect;
481  aRect.reserve(size());
482  for (size_type i = 0; i < size(); ++i)
483  {
484  const SwRect& rRect = (*this)[i];
485  aRect.push_back(rRect.SVRect().toString());
486  }
487  OString sRect = comphelper::string::join("; ", aRect);
488  if (!pSelectionRectangles)
489  {
490  GetShell()->GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION, sRect.getStr());
491  SfxLokHelper::notifyOtherViews(GetShell()->GetSfxViewShell(), LOK_CALLBACK_TEXT_VIEW_SELECTION, "selection", sRect);
492  }
493  else
494  pSelectionRectangles->push_back(sRect);
495 }
496 
498 {
499  std::vector< basegfx::B2DRange > aInputFieldRanges;
500 
502  {
503  SwTextInputField* pCurTextInputFieldAtCursor =
504  dynamic_cast<SwTextInputField*>(SwCursorShell::GetTextFieldAtPos( GetShell()->GetCursor()->Start(), false ));
505  if ( pCurTextInputFieldAtCursor != nullptr )
506  {
507  SwTextNode* pTextNode = pCurTextInputFieldAtCursor->GetpTextNode();
508  std::unique_ptr<SwShellCursor> pCursorForInputTextField(
509  new SwShellCursor( *GetShell(), SwPosition( *pTextNode, pCurTextInputFieldAtCursor->GetStart() ) ) );
510  pCursorForInputTextField->SetMark();
511  pCursorForInputTextField->GetMark()->nNode = *pTextNode;
512  pCursorForInputTextField->GetMark()->nContent.Assign( pTextNode, *(pCurTextInputFieldAtCursor->End()) );
513 
514  pCursorForInputTextField->FillRects();
515  SwRects* pRects = static_cast<SwRects*>(pCursorForInputTextField.get());
516  for (const SwRect & rNextRect : *pRects)
517  {
518  const tools::Rectangle aPntRect(rNextRect.SVRect());
519 
520  aInputFieldRanges.emplace_back(
521  aPntRect.Left(), aPntRect.Top(),
522  aPntRect.Right() + 1, aPntRect.Bottom() + 1);
523  }
524  }
525  }
526 
527  if ( !aInputFieldRanges.empty() )
528  {
529  if (m_pTextInputFieldOverlay != nullptr)
530  {
531  m_pTextInputFieldOverlay->setRanges( aInputFieldRanges );
532  }
533  else
534  {
535  SdrView* pView = const_cast<SdrView*>(GetShell()->GetDrawView());
536  SdrPaintWindow* pCandidate = pView->GetPaintWindow(0);
537  const rtl::Reference<sdr::overlay::OverlayManager>& xTargetOverlay = pCandidate->GetOverlayManager();
538 
539  if (xTargetOverlay.is())
540  {
541  // use system's highlight color with decreased luminance as highlight color
542  const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer;
543  Color aHighlight(aSvtOptionsDrawinglayer.getHilightColor());
544  aHighlight.DecreaseLuminance( 128 );
545 
547  aHighlight, aInputFieldRanges ) );
548  xTargetOverlay->add( *m_pTextInputFieldOverlay );
549  }
550  }
551  }
552  else
553  {
554  m_pTextInputFieldOverlay.reset();
555  }
556 }
557 
559 {
560  size_type nSz = size();
561  if( !nSz )
562  return;
563 
564  SwRegionRects aReg( GetShell()->VisArea() );
565  aReg.assign( begin(), end() );
566  aReg -= rRect;
567  SwRects::erase( begin(), begin() + nSz );
568  SwRects::insert( begin(), aReg.begin(), aReg.end() );
569 
570  // If the selection is to the right or at the bottom, outside the
571  // visible area, it is never aligned on one pixel at the right/bottom.
572  // This has to be determined here and if that is the case the
573  // rectangle has to be expanded.
574  if( !(GetShell()->m_bVisPortChgd && 0 != ( nSz = size())) )
575  return;
576 
578  iterator it = begin();
579  for( ; nSz--; ++it )
580  {
581  SwRect& rRectIt = *it;
582  if( rRectIt.Right() == GetShell()->m_aOldRBPos.X() )
583  rRectIt.AddRight( s_nPixPtX );
584  if( rRectIt.Bottom() == GetShell()->m_aOldRBPos.Y() )
585  rRectIt.AddBottom( s_nPixPtY );
586  }
587 }
588 
589 // check current MapMode of the shell and set possibly the static members.
590 // Optional set the parameters pX, pY
592  long* pX, long* pY )
593 {
594  const OutputDevice* pOut = rSh.GetWin();
595  if ( ! pOut )
596  pOut = rSh.GetOut();
597 
598  const MapMode& rMM = pOut->GetMapMode();
599  if (s_pMapMode->GetMapUnit() != rMM.GetMapUnit() ||
600  s_pMapMode->GetScaleX() != rMM.GetScaleX() ||
601  s_pMapMode->GetScaleY() != rMM.GetScaleY())
602  {
603  *s_pMapMode = rMM;
604  Size aTmp( 1, 1 );
605  aTmp = pOut->PixelToLogic( aTmp );
606  s_nPixPtX = aTmp.Width();
607  s_nPixPtY = aTmp.Height();
608  }
609  if( pX )
610  *pX = s_nPixPtX;
611  if( pY )
612  *pY = s_nPixPtY;
613 }
614 
616  const SwCursorShell& rCShell,
617  const SwPosition &rPos )
618  : SwCursor(rPos,nullptr)
619  , SwSelPaintRects(rCShell)
620  , m_pInitialPoint(SwPaM::GetPoint())
621 {}
622 
624  const SwCursorShell& rCShell,
625  const SwPosition &rPos,
626  const Point& rPtPos,
627  SwPaM* pRing )
628  : SwCursor(rPos, pRing)
629  , SwSelPaintRects(rCShell)
630  , m_MarkPt(rPtPos)
631  , m_PointPt(rPtPos)
632  , m_pInitialPoint(SwPaM::GetPoint())
633 {}
634 
636  : SwCursor(rICursor, &rICursor)
637  , SwSelPaintRects(*rICursor.GetShell())
638  , m_MarkPt(rICursor.GetMkPos())
639  , m_PointPt(rICursor.GetPtPos())
640  , m_pInitialPoint(SwPaM::GetPoint())
641 {}
642 
644 {}
645 
647 {
648  return GetShell()->IsReadOnlyAvailable();
649 }
650 
652 {
655  else
657  SwPaM::SetMark();
658 }
659 
661 {
662  // calculate the new rectangles
663  if( HasMark() &&
664  GetPoint()->nNode.GetNode().IsContentNode() &&
665  GetPoint()->nNode.GetNode().GetContentNode()->getLayoutFrame( GetShell()->GetLayout() ) &&
666  (GetMark()->nNode == GetPoint()->nNode ||
668  GetMark()->nNode.GetNode().GetContentNode()->getLayoutFrame( GetShell()->GetLayout() ) ) ))
669  GetShell()->GetLayout()->CalcFrameRects( *this );
670 }
671 
672 void SwShellCursor::Show(SfxViewShell const * pViewShell)
673 {
674  std::vector<OString> aSelectionRectangles;
675  for(SwPaM& rPaM : GetRingContainer())
676  {
677  SwShellCursor* pShCursor = dynamic_cast<SwShellCursor*>(&rPaM);
678  if(pShCursor)
679  pShCursor->SwSelPaintRects::Show(&aSelectionRectangles);
680  }
681 
683  return;
684 
685  std::vector<OString> aRect;
686  for (const OString & rSelectionRectangle : aSelectionRectangles)
687  {
688  if (rSelectionRectangle.isEmpty())
689  continue;
690  aRect.push_back(rSelectionRectangle);
691  }
692  OString sRect = comphelper::string::join("; ", aRect);
693  if (pViewShell)
694  {
695  // Just notify pViewShell about our existing selection.
696  if (pViewShell != GetShell()->GetSfxViewShell())
697  SfxLokHelper::notifyOtherView(GetShell()->GetSfxViewShell(), pViewShell, LOK_CALLBACK_TEXT_VIEW_SELECTION, "selection", sRect);
698  }
699  else
700  {
701  GetShell()->GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION, sRect.getStr());
702  SfxLokHelper::notifyOtherViews(GetShell()->GetSfxViewShell(), LOK_CALLBACK_TEXT_VIEW_SELECTION, "selection", sRect);
703  }
704 }
705 
706 // This rectangle gets painted anew, therefore the SSelection in this
707 // area is invalid.
708 void SwShellCursor::Invalidate( const SwRect& rRect )
709 {
710  for(SwPaM& rPaM : GetRingContainer())
711  {
712  SwShellCursor* pShCursor = dynamic_cast<SwShellCursor*>(&rPaM);
713  // skip any non SwShellCursor objects in the ring
714  // see also: SwAutoFormat::DeleteSel()
715  if(pShCursor)
716  pShCursor->SwSelPaintRects::Invalidate(rRect);
717  }
718 }
719 
721 {
722  for(SwPaM& rPaM : GetRingContainer())
723  {
724  SwShellCursor* pShCursor = dynamic_cast<SwShellCursor*>(&rPaM);
725  if(pShCursor)
726  pShCursor->SwSelPaintRects::Hide();
727  }
728 }
729 
731 {
732  return new SwShellCursor( *GetShell(), *GetPoint(), GetPtPos(), pRing );
733 }
734 
736 {
737  short nRet = RET_YES;
739  if( pDlg )
740  {
741  // Terminate old actions. The table-frames get constructed and
742  // a SSelection can be created.
743  std::vector<sal_uInt16> vActionCounts;
744  for(SwViewShell& rShell : const_cast< SwCursorShell* >( GetShell() )->GetRingContainer())
745  {
746  sal_uInt16 nActCnt = 0;
747  while(rShell.ActionPend())
748  {
749  rShell.EndAction();
750  ++nActCnt;
751  }
752  vActionCounts.push_back(nActCnt);
753  }
754  std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pDlg->getDialog(), "modules/swriter/ui/asksearchdialog.ui"));
755  std::unique_ptr<weld::MessageDialog> xDialog(xBuilder->weld_message_dialog("AskSearchDialog"));
756  nRet = xDialog->run();
757  auto pActionCount = vActionCounts.begin();
758  for(SwViewShell& rShell : const_cast< SwCursorShell* >( GetShell() )->GetRingContainer())
759  {
760  while(*pActionCount)
761  {
762  rShell.StartAction();
763  --(*pActionCount);
764  }
765  ++pActionCount;
766  }
767  }
768  else
769  // otherwise from the Basic, and then switch to RET_YES
770  nRet = RET_YES;
771 
772  return nRet;
773 }
774 
776 {
777  const_cast<SwCursorShell*>(GetShell())->SaveTableBoxContent( pPos );
778 }
779 
780 bool SwShellCursor::UpDown( bool bUp, sal_uInt16 nCnt )
781 {
782  return SwCursor::UpDown( bUp, nCnt,
783  &GetPtPos(), GetShell()->GetUpDownX(),
784  *GetShell()->GetLayout());
785 }
786 
787 // if <true> than the cursor can be set to the position.
788 bool SwShellCursor::IsAtValidPos( bool bPoint ) const
789 {
790  if( GetShell() && ( GetShell()->IsAllProtect() ||
791  GetShell()->GetViewOptions()->IsReadonly() ||
792  ( GetShell()->Imp()->GetDrawView() &&
793  GetShell()->Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount() )))
794  return true;
795 
796  return SwCursor::IsAtValidPos( bPoint );
797 }
798 
800  const SwPosition& rPos )
801  : SwCursor(rPos,nullptr), SwShellCursor(rCursorSh, rPos), SwTableCursor(rPos)
802 {
803 }
804 
806  const SwPosition& rMkPos, const Point& rMkPt,
807  const SwPosition& rPtPos, const Point& rPtPt )
808  : SwCursor(rPtPos,nullptr), SwShellCursor(rCursorSh, rPtPos), SwTableCursor(rPtPos)
809 {
810  SetMark();
811  *GetMark() = rMkPos;
812  GetMkPos() = rMkPt;
813  GetPtPos() = rPtPt;
814 }
815 
817 
819 
821 {
822  return SwShellCursor::Create( pRing );
823 }
824 
826 {
828 }
829 
831 {
833 }
834 
836 {
837  // Calculate the new rectangles. If the cursor is still "parked" do nothing
839  return;
840 
841  bool bStart = true;
842  SwRegionRects aReg( GetShell()->VisArea() );
845  SwNodes& rNds = GetDoc()->GetNodes();
846  SwFrame* pEndFrame = nullptr;
847  for (size_t n = 0; n < m_SelectedBoxes.size(); ++n)
848  {
849  const SwStartNode* pSttNd = m_SelectedBoxes[n]->GetSttNd();
850  const SwTableNode* pSelTableNd = pSttNd->FindTableNode();
851 
852  SwNodeIndex aIdx( *pSttNd );
853  SwContentNode* pCNd = rNds.GoNextSection( &aIdx, true, false );
854 
855  // table in table
856  // (see also lcl_FindTopLevelTable in unoobj2.cxx for a different
857  // version to do this)
858  const SwTableNode* pCurTableNd = pCNd ? pCNd->FindTableNode() : nullptr;
859  while ( pSelTableNd != pCurTableNd && pCurTableNd )
860  {
861  aIdx = pCurTableNd->EndOfSectionIndex();
862  pCNd = rNds.GoNextSection( &aIdx, true, false );
863  pCurTableNd = pCNd->FindTableNode();
864  }
865 
866  if( !pCNd )
867  continue;
868 
869  std::pair<Point, bool> const tmp(GetSttPos(), false);
870  SwFrame* pFrame = pCNd->getLayoutFrame(GetShell()->GetLayout(), nullptr, &tmp);
871  while( pFrame && !pFrame->IsCellFrame() )
872  pFrame = pFrame->GetUpper();
873 
874  OSL_ENSURE( pFrame, "Node not in a table" );
875 
876  while ( pFrame )
877  {
878  if( aReg.GetOrigin().IsOver( pFrame->getFrameArea() ) )
879  {
880  aReg -= pFrame->getFrameArea();
881  if (bStart)
882  {
883  bStart = false;
884  m_aStart = SwRect(pFrame->getFrameArea().Left(), pFrame->getFrameArea().Top(), 1, pFrame->getFrameArea().Height());
885  }
886  }
887 
888  pEndFrame = pFrame;
889  pFrame = pFrame->GetNextCellLeaf();
890  }
891  }
892  if (pEndFrame)
893  m_aEnd = SwRect(pEndFrame->getFrameArea().Right(), pEndFrame->getFrameArea().Top(), 1, pEndFrame->getFrameArea().Height());
894  aReg.Invert();
895  insert( begin(), aReg.begin(), aReg.end() );
896 }
897 
899 {
900  rStart = m_aStart;
901  rEnd = m_aEnd;
902 }
903 
904 // Check if the SPoint is within the Table-SSelection.
905 bool SwShellTableCursor::IsInside( const Point& rPt ) const
906 {
907  // Calculate the new rectangles. If the cursor is still "parked" do nothing
909  return false;
910 
911  SwNodes& rNds = GetDoc()->GetNodes();
912  for (size_t n = 0; n < m_SelectedBoxes.size(); ++n)
913  {
914  SwNodeIndex aIdx( *m_SelectedBoxes[n]->GetSttNd() );
915  SwContentNode* pCNd = rNds.GoNextSection( &aIdx, true, false );
916  if( !pCNd )
917  continue;
918 
919  std::pair<Point, bool> const tmp(GetPtPos(), true);
920  SwFrame* pFrame = pCNd->getLayoutFrame(GetShell()->GetLayout(), nullptr, &tmp);
921  while( pFrame && !pFrame->IsCellFrame() )
922  pFrame = pFrame->GetUpper();
923  OSL_ENSURE( pFrame, "Node not in a table" );
924  if( pFrame && pFrame->getFrameArea().IsInside( rPt ) )
925  return true;
926 
927  for ( SwCellFrame* pCellFrame = static_cast<SwCellFrame*>(pFrame); pCellFrame; pCellFrame = pCellFrame->GetFollowCell() )
928  {
929  if( pCellFrame->getFrameArea().IsInside( rPt ) )
930  return true;
931  }
932  }
933  return false;
934 }
935 
936 bool SwShellTableCursor::IsAtValidPos( bool bPoint ) const
937 {
938  return SwShellCursor::IsAtValidPos( bPoint );
939 }
940 
941 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool m_bIsVisible
Definition: viscrs.hxx:42
vcl::RenderContext * GetOut() const
Definition: viewsh.hxx:339
static SwRect lcl_getLayoutRect(const Point &rPoint, const SwPosition &rPosition)
Return a layout rectangle (typically with minimal width) that represents a cursor at rPosition...
Definition: viscrs.cxx:369
const Fraction & GetScaleX() const
long Width() const
virtual short MaxReplaceArived() override
Definition: viscrs.cxx:825
Starts a section of nodes in the document model.
Definition: node.hxx:303
Base class of the Writer layout elements.
Definition: frame.hxx:297
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:151
sal_uLong GetIndex() const
Definition: node.hxx:282
void SetOrientation(short nOrientation=0)
Marks a position in the document model.
Definition: pam.hxx:35
static long s_nPixPtY
Definition: viscrs.hxx:74
const SwRect & GetOrigin() const
Definition: swregion.hxx:47
const SwPosition * m_pInitialPoint
Definition: viscrs.hxx:122
SdrView * GetDrawView()
Definition: vnew.cxx:375
void SwCalcPixStatics(vcl::RenderContext const *pOut)
Set borders alignment statics Adjustment for 'small' twip-to-pixel relations: For 'small' twip-to-pix...
Definition: paintfrm.cxx:379
virtual bool IsAtValidPos(bool bPoint=true) const override
Return if cursor can be set to this position.
Definition: viscrs.cxx:788
SwPaM * GetCursor(bool bMakeTableCursor=true) const
Return pointer to the current shell cursor.
Definition: crsrsh.cxx:189
void SetPos(const Point &rNewPos)
virtual const SwRootFrame * GetCurrentLayout() const =0
rtl::Reference< sdr::overlay::OverlayManager > const & GetOverlayManager() const
SwDocShell * GetDocShell()
Definition: doc.hxx:1348
long Height() const
SwNodeIndex nNode
Definition: pam.hxx:37
SwShellCursor * getShellCursor(bool bBlock)
Delivers the current shell cursor.
Definition: crsrsh.cxx:3025
sal_uInt16 GetStyle() const
SdrTextObj * GetTextEditObject() const
virtual void SaveTableBoxContent(const SwPosition *pPos) override
Definition: viscrs.cxx:830
const StyleSettings & GetStyleSettings() const
const SfxPoolItem * pAttr
Definition: crsrsh.hxx:96
const SwPosition * GetMark() const
Definition: pam.hxx:209
void SetWidth(long nNewWidth)
SwContentFrame * getLayoutFrame(const SwRootFrame *, const SwPosition *pPos=nullptr, std::pair< Point, bool > const *pViewPosAndCalcFrame=nullptr) const
Definition: node.cxx:1190
sal_Int64 n
virtual void SetMark() override
Unless this is called, the getter method of Mark will return Point.
Definition: viscrs.cxx:651
static SvxSearchDialog * GetSearchDialog()
Definition: viewsrch.cxx:809
void Height(long nNew)
Definition: swrect.hxx:191
static void notifyVisCursorInvalidation(OutlinerViewShell const *pThisView, const OString &rRectangle, bool bMispelledWord=false, const OString &rHyperlink="")
static weld::Builder * CreateBuilder(weld::Widget *pParent, const OUString &rUIFile, bool bMobile=false)
virtual SwCursor * Create(SwPaM *pRing=nullptr) const override
Definition: viscrs.cxx:820
sal_uInt8 GetCursorBidiLevel() const
Definition: swcrsr.hxx:209
const Point & GetSttPos() const
Definition: viscrs.hxx:146
const MapMode & GetMapMode() const
SwNode & GetNode() const
Definition: ndindex.hxx:119
SwRect m_aEnd
Right edge of the selection end (bottom right cell).
Definition: viscrs.hxx:176
SwTextNode * GetpTextNode() const
Definition: txtfld.hxx:49
void Pos(const Point &rNew)
Definition: swrect.hxx:169
OString join(const OString &rSeparator, const std::vector< OString > &rSequence)
bool IsCellFrame() const
Definition: frame.hxx:1204
Of course Writer needs its own rectangles.
Definition: swrect.hxx:35
SfxViewShell * GetSfxViewShell() const
Definition: viewsh.hxx:442
static void notifyOtherViews(SfxViewShell *pThisView, int nType, const OString &rKey, const OString &rPayload)
void Hide()
Definition: viscrs.cxx:720
virtual bool IsAtValidPos(bool bPoint=true) const override
Return if cursor can be set to this position.
Definition: viscrs.cxx:936
bool IsSymbolAt(sal_Int32 nBegin) const
in ndcopy.cxx
Definition: itratr.cxx:844
virtual void SaveTableBoxContent(const SwPosition *pPos) override
Definition: viscrs.cxx:775
SwWrtShell & GetWrtShell() const
Definition: view.hxx:398
void Invalidate(const SwRect &rRect)
Definition: viscrs.cxx:558
bool m_bShowTextInputFieldOverlay
Definition: viscrs.hxx:83
Used by the UI to modify the document model.
Definition: wrtsh.hxx:90
static long s_nPixPtX
Definition: viscrs.hxx:74
virtual bool GetModelPositionForViewPoint(SwPosition *, Point &, SwCursorMoveState *=nullptr, bool bTestBackground=false) const override
Primary passes the call to the first page.
Definition: trvlfrm.cxx:424
const OUString & GetValue() const
Definition: fmtinfmt.hxx:75
RET_YES
void Top(const long nTop)
Definition: swrect.hxx:204
Point m_PointPt
Definition: viscrs.hxx:121
void SwAlignRect(SwRect &rRect, const SwViewShell *pSh, const vcl::RenderContext *pRenderContext)
Function is also used outside this file.
Definition: paintfrm.cxx:1120
enumrange< T >::Iterator begin(enumrange< T >)
const SwRect & getFrameArea() const
Definition: frame.hxx:177
const Fraction & GetScaleY() const
sal_uLong GetIndex() const
Definition: ndindex.hxx:152
void CalcFrameRects(SwShellCursor &)
Definition: trvlfrm.cxx:2007
void libreOfficeKitViewCallback(int nType, const char *pPayload) const override
sal_Int32 GetStart() const
Definition: txatbase.hxx:82
void Invert()
invert current rectangle
Definition: swregion.cxx:122
oslFileHandle & pOut
virtual void FillRects() override
Definition: viscrs.cxx:835
SwShellTableCursor(const SwCursorShell &rCursorSh, const SwPosition &rPos)
Definition: viscrs.cxx:799
#define CURSOR_SHADOW
OUString sStr
Definition: crsrsh.hxx:103
Point m_aOldRBPos
Right/Bottom of last VisArea.
Definition: crsrsh.hxx:166
union SwContentAtPos::@24 aFnd
virtual void FillRects() override
Definition: viscrs.cxx:660
SwDoc * GetDoc() const
Definition: viewsh.hxx:282
void SetStyle(sal_uInt16 nStyle)
void Right(const long nRight)
Definition: swrect.hxx:200
virtual short MaxReplaceArived() override
Definition: viscrs.cxx:735
void Show(SfxViewShell const *pViewShell)
Definition: viscrs.cxx:672
size_type size() const
void Invalidate(const SwRect &rRect)
Definition: viscrs.cxx:708
virtual void FillStartEnd(SwRect &rStart, SwRect &rEnd) const =0
Fill rStart and rEnd with a rectangle that represents the start and end for selection handles...
SwLayoutFrame * GetNextCellLeaf()
Definition: findfrm.cxx:1522
virtual bool GetCharRect(SwRect &, const SwPosition &, SwCursorMoveState *=nullptr, bool bAllowFarAway=true) const
Definition: unusedf.cxx:71
constexpr TypedWhichId< SwFormatINetFormat > RES_TXTATR_INETFMT(51)
SfxItemPool & GetPool() const
sal_uInt32 PaintWindowCount() const
SwShellCursor * GetCursor_()
Definition: crsrsh.hxx:328
static MapMode * s_pMapMode
Definition: viscrs.hxx:75
SwVisibleCursor(const SwCursorShell *pCShell)
Definition: viscrs.cxx:71
bool IsContentNode() const
Definition: node.hxx:628
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:136
bool IsSelection() const
Definition: crsrsh.hxx:879
virtual ~SwShellTableCursor() override
Definition: viscrs.cxx:816
const SwCursorShell * m_pCursorShell
Definition: viscrs.hxx:77
const SwCursorShell * GetShell() const
Definition: viscrs.hxx:109
SwShellCursor(const SwCursorShell &rCursorSh, const SwPosition &rPos)
Definition: viscrs.cxx:615
long GetCursorSize() const
void SetPosAndShow(SfxViewShell const *pViewShell)
Definition: viscrs.cxx:129
Shell * GetShell()
void DecreaseLuminance(sal_uInt8 cLumDec)
int i
const SwRect & VisArea() const
Definition: viewsh.cxx:560
uno_Any a
const SwPosition * GetPoint() const
Definition: pam.hxx:207
bool UpDown(bool bUp, sal_uInt16 nCnt)
Definition: viscrs.cxx:780
SwContentNode * GetContentNode()
Definition: node.hxx:615
void AddRight(const long nAdd)
Definition: swrect.cxx:164
bool HasMark() const
A PaM marks a selection if Point and Mark are distinct positions.
Definition: pam.hxx:205
SwDoc * GetDoc()
Definition: node.hxx:702
SwDoc * GetDoc() const
Definition: pam.hxx:243
SwLayoutFrame * GetUpper()
Definition: frame.hxx:658
virtual ~SwShellCursor() override
Definition: viscrs.cxx:643
bool HasArea() const
Definition: swrect.hxx:288
void SetWindow(vcl::Window *pWindow)
SwGrammarMarkUp * GetGrammarCheck()
Definition: txtedt.cxx:2181
void HighlightInputField()
Definition: viscrs.cxx:497
bool IsCursorReadonly() const
Definition: crsrsh.cxx:3279
virtual void FillStartEnd(SwRect &rStart, SwRect &rEnd) const override
Definition: viscrs.cxx:898
bool IsInside(const Point &rPt) const
Definition: viscrs.cxx:905
virtual void SetMark() override
Unless this is called, the getter method of Mark will return Point.
Definition: viscrs.cxx:818
SwWrtShell * GetWrtShell()
Access to the SwWrtShell belonging to SwView.
Definition: docsh.hxx:224
const Point & GetMkPos() const
Definition: viscrs.hxx:144
size
Marks a node in the document model.
Definition: ndindex.hxx:31
void SetSize(const Size &rNewSize)
const AllSettings & GetSettings() const
bool IsOverwriteCursor() const
Definition: crsrsh.hxx:459
ring_container GetRingContainer()
MapUnit GetMapUnit() const
bool IsOnlineSpell() const
Definition: viewopt.hxx:353
bool empty() const
void SSize(const Size &rNew)
Definition: swrect.hxx:178
void Show(std::vector< OString > *pSelectionRectangles=nullptr)
Definition: viscrs.cxx:388
SwCellFrame * GetFollowCell() const
Definition: findfrm.cxx:1590
stay with the cursor inside text
const IDocumentLayoutAccess & getIDocumentLayoutAccess() const
Provides access to the document layout interface.
Definition: viewsh.cxx:2593
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
Definition: doc.cxx:404
enumrange< T >::Iterator end(enumrange< T >)
const SwPosition * Start() const
Definition: pam.hxx:212
bool IsInProtectSect() const
Is node in a protected area?
Definition: node.cxx:411
SwSelPaintRects(const SwCursorShell &rCSh)
Definition: viscrs.cxx:325
Point PixelToLogic(const Point &rDevicePt) const
virtual void FillStartEnd(SwRect &rStart, SwRect &rEnd) const override
Definition: viscrs.cxx:381
virtual ~SwSelPaintRects()
Definition: viscrs.cxx:334
virtual void FillRects()=0
static void Get1PixelInLogic(const SwViewShell &rSh, long *pX=nullptr, long *pY=nullptr)
Definition: viscrs.cxx:591
void Left(const long nLeft)
Definition: swrect.hxx:195
sal_uLong EndOfSectionIndex() const
Definition: node.hxx:677
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:80
void Bottom(const long nBottom)
Definition: swrect.hxx:209
SwSelBoxes m_SelectedBoxes
Definition: swcrsr.hxx:259
std::vector< SwRect > SwRects
Definition: swregion.hxx:26
bool IsReadOnlyAvailable() const
Definition: crsrsh.hxx:474
SwWrtShell * GetWrtShellPtr() const
Definition: view.hxx:399
tools::Rectangle SVRect() const
Definition: swrect.hxx:280
Point m_aCursorHeight
height & offset from visible Cursor
Definition: crsrsh.hxx:165
bool UpDown(bool bUp, sal_uInt16 nCnt, Point const *pPt, long nUpDownX, SwRootFrame &rLayout)
Definition: swcrsr.cxx:1947
bool m_bIsDragCursor
Definition: viscrs.hxx:43
const SwViewOption * GetViewOptions() const
Definition: viewsh.hxx:424
void SetCursor(vcl::Cursor *pCursor)
void Width(long nNew)
Definition: swrect.hxx:187
static void notifyOtherView(SfxViewShell *pThisView, SfxViewShell const *pOtherView, int nType, const OString &rKey, const OString &rPayload)
vcl::Window * GetWin() const
Definition: viewsh.hxx:338
vcl::Cursor m_aTextCursor
Definition: viscrs.hxx:45
OUString GetSelText() const
get selected text of a node at current cursor
Definition: crsrsh.cxx:2525
size_t CountDirChg() const
Definition: scriptinfo.hxx:138
bool InWrongWord(sal_Int32 &rChk, sal_Int32 &rLn) const
If a word is incorrectly selected, this method returns begin and length of it.
Definition: wrong.cxx:102
bool IsInside(const Point &rPOINT) const
Definition: swrect.cxx:105
SwNodes & GetNodes()
Definition: doc.hxx:403
bool m_bParked
Definition: swcrsr.hxx:261
const SwPosition * End() const
Definition: pam.hxx:217
bool IsRightToLeft() const
Definition: frame.hxx:965
SwPostItMgr * GetPostItMgr()
Definition: view.hxx:621
const sal_Int32 * End() const
Definition: txatbase.hxx:148
virtual SwCursor * Create(SwPaM *pRing=nullptr) const override
Definition: viscrs.cxx:730
const Point & GetPtPos() const
Definition: viscrs.hxx:142
SwWrongList * GetWrong()
Definition: txtedt.cxx:2158
bool GetCurAttr(SfxItemSet &, const bool bMergeIndentValuesOfNumRule=false) const
Definition: edattr.cxx:176
bool IsVisible() const
SwTableNode * FindTableNode()
Search table node, in which it is.
Definition: node.cxx:352
void Show()
Definition: viscrs.cxx:89
virtual bool IsAtValidPos(bool bPoint=true) const
Return if cursor can be set to this position.
Definition: swcrsr.cxx:717
void AddBottom(const long nAdd)
Definition: swrect.cxx:167
const Point & GetEndPos() const
Definition: viscrs.hxx:148
SwRect m_aStart
Left edge of the selection start (top left cell).
Definition: viscrs.hxx:174
SwContentNode * GoNextSection(SwNodeIndex *, bool bSkipHidden=true, bool bSkipProtect=true) const
Go to next content-node that is not protected or hidden (Both set FALSE ==> GoNext/GoPrevious!!!).
Definition: nodes.cxx:1906
sal_uInt16 m_nPageLastTime
For LibreOfficeKit only - remember what page we were at the last time.
Definition: viscrs.hxx:49
if(!pCandidateA->getEnd().equal(pCandidateB->getStart()))
virtual void SetMark()
Unless this is called, the getter method of Mark will return Point.
Definition: pam.cxx:475
const SwCursorShell * m_pCursorShell
Definition: viscrs.hxx:46
virtual bool IsReadOnlyAvailable() const override
Definition: viscrs.cxx:646
SwRect m_aCharRect
Char-SRectangle on which the cursor is located.
Definition: crsrsh.hxx:164
Point m_MarkPt
Definition: viscrs.hxx:120
bool IsOver(const SwRect &rRect) const
Definition: swrect.cxx:123
rtl::OString toString() const
const vcl::Cursor & GetTextCursor() const
Definition: viscrs.cxx:320
SwRootFrame * GetLayout() const
Definition: viewsh.cxx:2069
void swapContent(SwSelPaintRects &rSwap)
Definition: viscrs.cxx:339
void SetDirection(CursorDirection nDirection=CursorDirection::NONE)
bool IsTextNode() const
Definition: node.hxx:636
std::unique_ptr< sw::overlay::OverlayRangesOutline > m_pTextInputFieldOverlay
Definition: viscrs.hxx:84
SdrPaintWindow * GetPaintWindow(sal_uInt32 nIndex) const
SwCellFrame is one table cell in the document layout.
Definition: cellfrm.hxx:30
Definition: view.hxx:144
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:844
bool IsSelectionInReadonly() const
Definition: viewopt.hxx:448
Color getHilightColor() const
static SwTextField * GetTextFieldAtPos(const SwPosition *pPos, const bool bIncludeInputFieldAtStart)
Definition: crstrvl.cxx:857
Base class of the Writer document model elements.
Definition: node.hxx:79