LibreOffice Module sw (master)  1
edtwin2.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 <doc.hxx>
21 #include <osl/diagnose.h>
22 #include <osl/thread.h>
23 #include <vcl/help.hxx>
24 #include <tools/urlobj.hxx>
25 #include <fmtrfmrk.hxx>
26 #include <svl/urihelper.hxx>
27 #include <sfx2/sfxhelp.hxx>
28 #include <svx/svdview.hxx>
29 #include <svx/svdpagv.hxx>
30 #include <swmodule.hxx>
31 #include <modcfg.hxx>
32 #include <view.hxx>
33 #include <wrtsh.hxx>
34 #include <docsh.hxx>
35 #include <edtwin.hxx>
36 #include <dpage.hxx>
37 #include <docufld.hxx>
38 #include <reffld.hxx>
39 #include <cellatr.hxx>
40 #include <shdwcrsr.hxx>
41 #include <fmtinfmt.hxx>
42 #include <fmtftn.hxx>
43 #include <redline.hxx>
44 #include <tox.hxx>
45 #include <txatbase.hxx>
46 #include <uitool.hxx>
47 #include <viewopt.hxx>
48 #include <strings.hrc>
49 
50 #include <IDocumentMarkAccess.hxx>
52 #include <txtfrm.hxx>
53 #include <ndtxt.hxx>
54 #include <comphelper/lok.hxx>
55 #include <authfld.hxx>
56 
57 static OUString lcl_GetRedlineHelp( const SwRangeRedline& rRedl, bool bBalloon, bool bTableChange )
58 {
59  TranslateId pResId;
60  switch( rRedl.GetType() )
61  {
62  case RedlineType::Insert: pResId = bTableChange
63  ? STR_REDLINE_TABLE_ROW_INSERT
64  : rRedl.IsMoved()
65  ? STR_REDLINE_INSERT_MOVED
66  : STR_REDLINE_INSERT;
67  break;
68  case RedlineType::Delete: pResId = bTableChange
69  ? STR_REDLINE_TABLE_ROW_DELETE
70  : rRedl.IsMoved()
71  ? STR_REDLINE_DELETE_MOVED
72  : STR_REDLINE_DELETE;
73  break;
74  case RedlineType::Format: pResId = STR_REDLINE_FORMAT; break;
75  case RedlineType::Table: pResId = STR_REDLINE_TABLE; break;
76  case RedlineType::FmtColl: pResId = STR_REDLINE_FMTCOLL; break;
77  case RedlineType::ParagraphFormat: pResId = STR_REDLINE_PARAGRAPH_FORMAT; break;
78  case RedlineType::TableRowInsert: pResId = STR_REDLINE_TABLE_ROW_INSERT; break;
79  case RedlineType::TableRowDelete: pResId = STR_REDLINE_TABLE_ROW_DELETE; break;
80  case RedlineType::TableCellInsert: pResId = STR_REDLINE_TABLE_CELL_INSERT; break;
81  case RedlineType::TableCellDelete: pResId = STR_REDLINE_TABLE_CELL_DELETE; break;
82  default: break;
83  }
84 
85  OUStringBuffer sBuf;
86  if (pResId)
87  {
88  sBuf.append(SwResId(pResId));
89  sBuf.append(": ");
90  sBuf.append(rRedl.GetAuthorString());
91  sBuf.append(" - ");
92  sBuf.append(GetAppLangDateTimeString(rRedl.GetTimeStamp()));
93  if( bBalloon && !rRedl.GetComment().isEmpty() )
94  sBuf.append('\n').append(rRedl.GetComment());
95  }
96  return sBuf.makeStringAndClear();
97 }
98 
99 OUString SwEditWin::ClipLongToolTip(const OUString& rText)
100 {
101  OUString sDisplayText(rText);
102  tools::Long nTextWidth = GetTextWidth(sDisplayText);
103  tools::Long nMaxWidth = GetDesktopRectPixel().GetWidth() * 2 / 3;
104  nMaxWidth = PixelToLogic(Size(nMaxWidth, 0)).Width();
105  if (nTextWidth > nMaxWidth)
106  sDisplayText = GetOutDev()->GetEllipsisString(sDisplayText, nMaxWidth, DrawTextFlags::CenterEllipsis);
107  return sDisplayText;
108 }
109 
111 {
112  SwWrtShell &rSh = m_rView.GetWrtShell();
113  bool bQuickBalloon = bool(rEvt.GetMode() & ( HelpEventMode::QUICK | HelpEventMode::BALLOON ));
114  if(bQuickBalloon && !rSh.GetViewOptions()->IsShowContentTips())
115  return;
116  bool bContinue = true;
117  CurrShell aCurr(&rSh);
118  OUString sText;
120  bool bBalloon = bool(rEvt.GetMode() & HelpEventMode::BALLOON);
121 
122  SdrView *pSdrView = rSh.GetDrawView();
123 
124  if( bQuickBalloon && pSdrView )
125  {
126  SdrPageView* pPV = pSdrView->GetSdrPageView();
127  SwDPage* pPage = pPV ? static_cast<SwDPage*>(pPV->GetPage()) : nullptr;
128  bContinue = pPage && pPage->RequestHelp(this, pSdrView, rEvt);
129  }
130 
131  if( bContinue && bQuickBalloon)
132  {
133  SwRect aFieldRect;
134  SwContentAtPos aContentAtPos( IsAttrAtPos::Field |
141 #ifdef DBG_UTIL
143  ( bBalloon ? IsAttrAtPos::CurrAttrs : IsAttrAtPos::NONE) |
144 #endif
147 
148  if( rSh.GetContentAtPos( aPos, aContentAtPos, false, &aFieldRect ) )
149  {
150  QuickHelpFlags nStyle = QuickHelpFlags::NONE; // style of quick help
151  switch( aContentAtPos.eContentAtPos )
152  {
154  sText = "= " + static_cast<const SwTableBoxFormula*>(aContentAtPos.aFnd.pAttr)->GetFormula();
155  break;
156 #ifdef DBG_UTIL
158  {
159  if(aContentAtPos.aFnd.pAttr)
160  {
161  sText = OStringToOUString(OString::number(
162  static_cast<const SwTableBoxValue*>(aContentAtPos.aFnd.pAttr)->GetValue()),
163  osl_getThreadTextEncoding());
164  }
165  break;
166  }
168  sText = aContentAtPos.sStr;
169  break;
170 #endif
171 
173  {
174  sText = static_cast<const SwFormatINetFormat*>(aContentAtPos.aFnd.pAttr)->GetValue();
175  sText = URIHelper::removePassword( sText,
178  //#i63832# remove the link target type
179  sal_Int32 nFound = sText.indexOf(cMarkSeparator);
180  if( nFound != -1 && (++nFound) < sText.getLength() )
181  {
182  std::u16string_view sSuffix( sText.subView(nFound) );
183  if( sSuffix == u"table" ||
184  sSuffix == u"frame" ||
185  sSuffix == u"region" ||
186  sSuffix == u"outline" ||
187  sSuffix == u"text" ||
188  sSuffix == u"graphic" ||
189  sSuffix == u"ole" ||
190  sSuffix == u"drawingobject" )
191  sText = sText.copy( 0, nFound - 1);
192  }
193  // #i104300#
194  // special handling if target is a cross-reference bookmark
195  {
196  OUString sTmpSearchStr = sText.copy( 1 );
197  IDocumentMarkAccess* pMarkAccess = rSh.getIDocumentMarkAccess();
199  pMarkAccess->findBookmark( sTmpSearchStr );
200  if ( ppBkmk != pMarkAccess->getBookmarksEnd() &&
203  {
204  SwTextNode* pTextNode = (*ppBkmk)->GetMarkStart().nNode.GetNode().GetTextNode();
205  if ( pTextNode )
206  {
207  sText = sw::GetExpandTextMerged(rSh.GetLayout(), *pTextNode, true, false, ExpandMode(0));
208 
209  if( !sText.isEmpty() )
210  {
211  OUStringBuffer sTmp(sText.replaceAll(u"\u00ad", ""));
212  for (sal_Int32 i = 0; i < sTmp.getLength(); ++i)
213  {
214  if (sTmp[i] < 0x20)
215  sTmp[i] = 0x20;
216  else if (sTmp[i] == 0x2011)
217  sTmp[i] = '-';
218  }
219  sText = sTmp.makeStringAndClear();
220  }
221  }
222  }
223  }
224  // #i80029#
225  bool bExecHyperlinks = m_rView.GetDocShell()->IsReadOnly();
226  if ( !bExecHyperlinks )
227  {
228  sText = SfxHelp::GetURLHelpText(sText);
229  }
230  break;
231  }
233  {
234  vcl::KeyCode aCode( KEY_SPACE );
235  vcl::KeyCode aModifiedCode( KEY_SPACE, KEY_MOD1 );
236  OUString aModStr( aModifiedCode.GetName() );
237  aModStr = aModStr.replaceFirst(aCode.GetName(), "");
238  aModStr = aModStr.replaceAll("+", "");
239  sText = SwResId(STR_SMARTTAG_CLICK).replaceAll("%s", aModStr);
240  break;
241  }
242 
243  case IsAttrAtPos::Ftn:
244  if( aContentAtPos.pFndTextAttr && aContentAtPos.aFnd.pAttr )
245  {
246  const SwFormatFootnote* pFootnote = static_cast<const SwFormatFootnote*>(aContentAtPos.aFnd.pAttr);
247  OUString sTmp(pFootnote->GetFootnoteText(*rSh.GetLayout()));
248  sText = SwResId( pFootnote->IsEndNote()
249  ? STR_ENDNOTE : STR_FTNNOTE ) + sTmp;
250  bBalloon = true;
251  if( aContentAtPos.IsInRTLText() )
252  nStyle |= QuickHelpFlags::BiDiRtl;
253  }
254  break;
255 
258  {
260  const bool bShowInlineTooltips = rSh.GetViewOptions()->IsShowInlineTooltips();
261  if ( bShowTrackChanges && bShowInlineTooltips )
262  {
263  sText = lcl_GetRedlineHelp(*aContentAtPos.aFnd.pRedl, bBalloon, IsAttrAtPos::TableRedline == aContentAtPos.eContentAtPos );
264  }
265  break;
266  }
267 
269  sText = aContentAtPos.sStr;
270  if( !sText.isEmpty() && aContentAtPos.pFndTextAttr )
271  {
272  const SwTOXType* pTType = aContentAtPos.pFndTextAttr->
273  GetTOXMark().GetTOXType();
274  if( pTType && !pTType->GetTypeName().isEmpty() )
275  {
276  sText = ": " + sText;
277  sText = pTType->GetTypeName() + sText;
278  }
279  }
280  break;
281 
283  if(aContentAtPos.aFnd.pAttr)
284  {
285  sText = SwResId(STR_CONTENT_TYPE_SINGLE_REFERENCE) + ": ";
286  sText += static_cast<const SwFormatRefMark*>(aContentAtPos.aFnd.pAttr)->GetRefName();
287  }
288  break;
289 
290  default:
291  {
292  SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
293  if(!pModOpt->IsHideFieldTips())
294  {
295  const SwField* pField = aContentAtPos.aFnd.pField;
296  switch( pField->Which() )
297  {
298  case SwFieldIds::SetExp:
299  case SwFieldIds::Table:
300  case SwFieldIds::GetExp:
301  {
302  sal_uInt16 nOldSubType = pField->GetSubType();
303  const_cast<SwField*>(pField)->SetSubType(nsSwExtendedSubType::SUB_CMD);
304  sText = pField->ExpandField(true, rSh.GetLayout());
305  const_cast<SwField*>(pField)->SetSubType(nOldSubType);
306  }
307  break;
308 
309  case SwFieldIds::Postit:
310  {
311  break;
312  }
313  case SwFieldIds::Input: // BubbleHelp, because the suggestion could be quite long
314  bBalloon = true;
315  [[fallthrough]];
318  sText = pField->GetPar2();
319  break;
320 
322  sText = pField->GetFieldName();
323  break;
324 
325  case SwFieldIds::User:
326  {
327  OUString aTitle = pField->GetTitle();
328  if (!aTitle.isEmpty())
329  {
330  sText = aTitle;
331  }
332  else
333  {
334  sText = pField->GetPar1();
335  }
336  break;
337  }
339  sText = pField->GetPar1();
340  break;
341 
342  case SwFieldIds::DocStat:
343  break;
344 
345  case SwFieldIds::Macro:
346  sText = static_cast<const SwMacroField*>(pField)->GetMacro();
347  break;
348 
349  case SwFieldIds::GetRef:
350  {
351  // #i85090#
352  const SwGetRefField* pRefField( dynamic_cast<const SwGetRefField*>(pField) );
353  OSL_ENSURE( pRefField,
354  "<SwEditWin::RequestHelp(..)> - unexpected type of <pField>" );
355  if ( pRefField )
356  {
357  if ( pRefField->IsRefToHeadingCrossRefBookmark() ||
358  pRefField->IsRefToNumItemCrossRefBookmark() )
359  {
360  sText = pRefField->GetExpandedTextOfReferencedTextNode(*rSh.GetLayout());
361  if ( sText.getLength() > 80 )
362  {
363  sText = OUString::Concat(sText.subView(0, 80)) + "...";
364  }
365  }
366  else
367  {
368  sText = pRefField->GetSetRefName();
369  }
370  }
371  break;
372  }
374  {
375  const auto pAuthorityField
376  = static_cast<const SwAuthorityField*>(pField);
377  sText = pAuthorityField->GetAuthority(aContentAtPos.pFndTextAttr,
378  rSh.GetLayout());
379  if (pAuthorityField->HasURL())
380  {
381  const OUString& rURL
382  = pAuthorityField->GetAuthEntry()->GetAuthorField(
384  sText += "\n" + SfxHelp::GetURLHelpText(rURL);
385  }
386  break;
387  }
388 
389  default: break;
390  }
391  }
392 
393  if( sText.isEmpty() )
394  {
396  const bool bShowInlineTooltips = rSh.GetViewOptions()->IsShowInlineTooltips();
397  if ( bShowTrackChanges && bShowInlineTooltips )
398  {
399  aContentAtPos.eContentAtPos = IsAttrAtPos::Redline;
400  if( rSh.GetContentAtPos( aPos, aContentAtPos, false, &aFieldRect ) )
401  sText = lcl_GetRedlineHelp(*aContentAtPos.aFnd.pRedl, bBalloon, /*bTableChange=*/false);
402  }
403  }
404  }
405  }
406  if (!sText.isEmpty())
407  {
408  tools::Rectangle aRect( aFieldRect.SVRect() );
409  Point aPt( OutputToScreenPixel( LogicToPixel( aRect.TopLeft() )));
410  aRect.SetLeft( aPt.X() );
411  aRect.SetTop( aPt.Y() );
412  aPt = OutputToScreenPixel( LogicToPixel( aRect.BottomRight() ));
413  aRect.SetRight( aPt.X() );
414  aRect.SetBottom( aPt.Y() );
415 
416  // tdf#136336 ensure tooltip area surrounds the current mouse position with at least a pixel margin
417  aRect.Union(tools::Rectangle(rEvt.GetMousePosPixel(), Size(1, 1)));
418  aRect.AdjustLeft(-1);
419  aRect.AdjustRight(1);
420  aRect.AdjustTop(-1);
421  aRect.AdjustBottom(1);
422 
423  if( bBalloon )
424  Help::ShowBalloon( this, rEvt.GetMousePosPixel(), aRect, sText );
425  else
426  {
427  // the show the help
428  OUString sDisplayText(ClipLongToolTip(sText));
429  Help::ShowQuickHelp(this, aRect, sDisplayText, nStyle);
430  }
431  }
432 
433  bContinue = false;
434  }
435 
436  }
437 
438  if( bContinue )
439  Window::RequestHelp( rEvt );
440 }
441 
442 void SwEditWin::PrePaint(vcl::RenderContext& /*rRenderContext*/)
443 {
444  SwWrtShell* pWrtShell = GetView().GetWrtShellPtr();
445 
446  if(pWrtShell)
447  {
448  pWrtShell->PrePaint();
449  }
450 }
451 
452 void SwEditWin::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
453 {
454  SwWrtShell* pWrtShell = GetView().GetWrtShellPtr();
455  if(!pWrtShell)
456  return;
457  bool bPaintShadowCursor = false;
458  if( m_pShadCursor )
459  {
460  tools::Rectangle aRect( m_pShadCursor->GetRect());
461  // fully resides inside?
462  if( rRect.Contains( aRect ) )
463  {
464  // then cancel
465  m_pShadCursor.reset();
466  }
467  else if( rRect.Overlaps( aRect ))
468  {
469  // resides somewhat above, then everything is clipped outside
470  // and we have to make the "inner part" at the end of the
471  // Paint visible again. Otherwise Paint errors occur!
472  bPaintShadowCursor = true;
473  }
474  }
475 
476  if ( GetView().GetVisArea().GetWidth() <= 0 ||
477  GetView().GetVisArea().GetHeight() <= 0 )
478  Invalidate( rRect );
479  else
480  {
481  pWrtShell->setOutputToWindow(true);
482  bool bTiledPainting = false;
484  {
487  }
488  pWrtShell->Paint(rRenderContext, rRect);
490  {
492  }
493  pWrtShell->setOutputToWindow(false);
494  }
495 
496  if( bPaintShadowCursor )
497  m_pShadCursor->Paint();
498 }
499 
500 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool IsInRTLText() const
Definition: crstrvl.cxx:2043
void setOutputToWindow(bool bOutputToWindow)
Definition: viewsh.cxx:132
OUString GetExpandedTextOfReferencedTextNode(SwRootFrame const &rLayout) const
Definition: reffld.cxx:414
constexpr sal_uInt16 KEY_MOD1
SdrView * GetDrawView()
Definition: vnew.cxx:373
OUString ClipLongToolTip(const OUString &rText)
fdo#55546 cut very long tooltips to 2/3 of the width of the screen via center ellipsis ...
Definition: edtwin2.cxx:99
OUString const & GetAuthorString(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1919
bool IsShowContentTips() const
Definition: viewopt.hxx:539
std::string GetValue
bool Contains(const Point &rPOINT) const
const SwView & GetView() const
Definition: edtwin.hxx:245
bool IsHideFieldTips() const
Definition: modcfg.hxx:377
wrapper iterator: wraps iterator of implementation while hiding MarkBase class; only IMark instances ...
long Long
static SW_DLLPUBLIC MarkType GetType(const ::sw::mark::IMark &rMark)
Returns the MarkType used to create the mark.
Definition: docbm.cxx:474
const SfxPoolItem * pAttr
Definition: crsrsh.hxx:102
Base class of all fields.
Definition: fldbas.hxx:291
Provides access to the marks of a document.
void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
Definition: crsrsh.cxx:1411
SVL_DLLPUBLIC OUString removePassword(OUString const &rURI, INetURLObject::EncodeMechanism eEncodeMechanism, INetURLObject::DecodeMechanism eDecodeMechanism=INetURLObject::DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
tools::Rectangle GetDesktopRectPixel() const
bool IsEndNote() const
Definition: fmtftn.hxx:71
Of course Writer needs its own rectangles.
Definition: swrect.hxx:34
constexpr sal_uInt16 KEY_SPACE
void setTiledPainting(bool bTiledPainting)
OUString GetAppLangDateTimeString(const DateTime &)
Definition: uitool.cxx:862
static OUString lcl_GetRedlineHelp(const SwRangeRedline &rRedl, bool bBalloon, bool bTableChange)
Definition: edtwin2.cxx:57
For old documents the Field-Which IDs must be preserved !!!
HelpEventMode GetMode() const
static bool IsShowChanges(const RedlineFlags eM)
virtual void RequestHelp(const HelpEvent &rEvt) override
Definition: edtwin2.cxx:110
SwWrtShell & GetWrtShell() const
Definition: view.hxx:413
Used by the UI to modify the document model.
Definition: wrtsh.hxx:96
OUString SwResId(TranslateId aId)
Definition: swmodule.cxx:164
virtual OUString GetPar1() const
Definition: fldbas.cxx:321
OUString GetName() const
OUString GetAuthority(const SwTextAttr *pTextAttr, const SwRootFrame *pLayout) const
Returns the line matching the source's default row in the ToX.
Definition: authfld.cxx:562
invariant for SwAuthorityField is that it is always registered at its SwAuthorityFieldType via AddFie...
Definition: authfld.hxx:154
OUString sSuffix
void PrePaint()
Definition: viewsh.cxx:169
const DateTime & GetTimeStamp(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1924
OUString GetEllipsisString(const OUString &rStr, tools::Long nMaxWidth, DrawTextFlags nStyle=DrawTextFlags::EndEllipsis) const
virtual void PrePaint(vcl::RenderContext &rRenderContext) override
Definition: edtwin2.cxx:442
IsAttrAtPos eContentAtPos
Definition: crsrsh.hxx:107
constexpr tools::Long GetWidth() const
only for debugging
OUString sStr
Definition: crsrsh.hxx:109
union SwContentAtPos::@24 aFnd
const IDocumentMarkAccess * getIDocumentMarkAccess() const
Provides access to the document bookmark interface.
Definition: viewsh.cxx:2781
const Point & GetMousePosPixel() const
SwDoc * GetDoc()
returns Doc. But be careful!
Definition: docsh.hxx:204
virtual const_iterator_t getBookmarksEnd() const =0
returns a STL-like random access iterator to the end of the sequence of IBookmarks.
bool IsRefToNumItemCrossRefBookmark() const
Definition: reffld.cxx:386
OUString GetExpandTextMerged(SwRootFrame const *const pLayout, SwTextNode const &rNode, bool const bWithNumber, bool const bWithSpacesForLevel, ExpandMode const i_mode)
#define SW_MOD()
Definition: swmodule.hxx:255
Point LogicToPixel(const Point &rLogicPt) const
const OUString & GetTitle() const
Definition: fldbas.hxx:394
int i
const SwField * pField
Definition: crsrsh.hxx:101
const SwExtendedSubType SUB_CMD
Show command.
Definition: fldbas.hxx:212
std::unique_ptr< SwShadowCursor, o3tl::default_delete< SwShadowCursor > > m_pShadCursor
Definition: edtwin.hxx:95
bool Overlaps(const tools::Rectangle &rRect) const
OUString GetFootnoteText(SwRootFrame const &rLayout) const
Definition: atrftn.cxx:189
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
QuickHelpFlags
float u
const OUString & GetTypeName() const
Definition: tox.hxx:688
virtual const_iterator_t findBookmark(const OUString &rMark) const =0
Finds a bookmark by name.
Point PixelToLogic(const Point &rDevicePt) const
virtual OUString GetPar2() const
Definition: fldbas.cxx:326
const sal_Unicode cMarkSeparator
Definition: swtypes.hxx:124
const SwTextAttr * pFndTextAttr
Definition: crsrsh.hxx:110
Point ScreenToOutputPixel(const Point &rPos) const
static void ShowQuickHelp(vcl::Window *pParent, const tools::Rectangle &rScreenRect, const OUString &rHelpText, QuickHelpFlags nStyle=QuickHelpFlags::NONE)
virtual sal_uInt16 GetSubType() const
Definition: fldbas.cxx:342
SwDocShell * GetDocShell()
Definition: view.cxx:1132
bool IsReadOnly() const
const OUString & GetComment(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1939
bool RequestHelp(vcl::Window *pWindow, SdrView const *pView, const HelpEvent &rEvt)
Definition: dpage.cxx:145
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:79
ExpandMode
Some helpers for converting model strings to view strings.
OUString ExpandField(bool bCached, SwRootFrame const *pLayout) const
expand the field.
Definition: fldbas.cxx:484
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
Definition: doc.cxx:335
SwWrtShell * GetWrtShellPtr() const
Definition: view.hxx:414
bool IsMoved() const
Definition: redline.hxx:273
SwFieldIds Which() const
ResId.
Definition: fldbas.cxx:250
tools::Rectangle SVRect() const
Definition: swrect.hxx:292
bool IsShowInlineTooltips() const
Definition: viewopt.hxx:288
bool IsRefToHeadingCrossRefBookmark() const
Definition: reffld.cxx:380
SdrPage * GetPage() const
const SwViewOption * GetViewOptions() const
Definition: viewsh.hxx:428
::OutputDevice const * GetOutDev() const
RedlineType GetType(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1929
const OUString & GetSetRefName() const
Definition: reffld.hxx:109
virtual OUString GetFieldName() const
get name or content
Definition: fldbas.cxx:305
const SwRangeRedline * pRedl
Definition: crsrsh.hxx:103
SwView & m_rView
Definition: edtwin.hxx:98
const tools::Rectangle & GetVisArea() const
Definition: view.hxx:426
tools::Long GetTextWidth(const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, vcl::text::TextLayoutCache const *=nullptr, SalLayoutGlyphs const *const pLayoutCache=nullptr) const
virtual RedlineFlags GetRedlineFlags() const =0
Query the currently set redline mode.
Point OutputToScreenPixel(const Point &rPos) const
bool GetContentAtPos(const Point &rPt, SwContentAtPos &rContentAtPos, bool bSetCursor=false, SwRect *pFieldRect=nullptr)
Definition: crstrvl.cxx:1342
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
Definition: edtwin2.cxx:452
static OUString GetURLHelpText(std::u16string_view)
SwRootFrame * GetLayout() const
Definition: viewsh.cxx:2172
only for debugging
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:864
static void ShowBalloon(vcl::Window *pParent, const Point &rScreenPos, const tools::Rectangle &, const OUString &rHelpText)
constexpr tools::Long GetHeight() const