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/thread.h>
22 #include <vcl/help.hxx>
23 #include <tools/urlobj.hxx>
24 #include <fmtrfmrk.hxx>
25 #include <svl/urihelper.hxx>
26 #include <sfx2/sfxhelp.hxx>
27 #include <svx/svdview.hxx>
28 #include <svx/svdpagv.hxx>
29 #include <swmodule.hxx>
30 #include <modcfg.hxx>
31 #include <view.hxx>
32 #include <wrtsh.hxx>
33 #include <docsh.hxx>
34 #include <edtwin.hxx>
35 #include <dpage.hxx>
36 #include <docufld.hxx>
37 #include <reffld.hxx>
38 #include <cellatr.hxx>
39 #include <shdwcrsr.hxx>
40 #include <fmtinfmt.hxx>
41 #include <fmtftn.hxx>
42 #include <redline.hxx>
43 #include <tox.hxx>
44 #include <txatbase.hxx>
45 #include <uitool.hxx>
46 #include <viewopt.hxx>
47 #include <strings.hrc>
48 
49 #include <IDocumentMarkAccess.hxx>
51 #include <txtfrm.hxx>
52 #include <ndtxt.hxx>
53 #include <FrameControlsManager.hxx>
54 #include <comphelper/lok.hxx>
55 
56 static OUString lcl_GetRedlineHelp( const SwRangeRedline& rRedl, bool bBalloon )
57 {
58  const char* pResId = nullptr;
59  switch( rRedl.GetType() )
60  {
61  case RedlineType::Insert: pResId = STR_REDLINE_INSERT; break;
62  case RedlineType::Delete: pResId = STR_REDLINE_DELETE; break;
63  case RedlineType::Format: pResId = STR_REDLINE_FORMAT; break;
64  case RedlineType::Table: pResId = STR_REDLINE_TABLE; break;
65  case RedlineType::FmtColl: pResId = STR_REDLINE_FMTCOLL; break;
66  case RedlineType::ParagraphFormat: pResId = STR_REDLINE_PARAGRAPH_FORMAT; break;
67  case RedlineType::TableRowInsert: pResId = STR_REDLINE_TABLE_ROW_INSERT; break;
68  case RedlineType::TableRowDelete: pResId = STR_REDLINE_TABLE_ROW_DELETE; break;
69  case RedlineType::TableCellInsert: pResId = STR_REDLINE_TABLE_CELL_INSERT; break;
70  case RedlineType::TableCellDelete: pResId = STR_REDLINE_TABLE_CELL_DELETE; break;
71  default: break;
72  }
73 
74  OUStringBuffer sBuf;
75  if (pResId)
76  {
77  sBuf.append(SwResId(pResId));
78  sBuf.append(": ");
79  sBuf.append(rRedl.GetAuthorString());
80  sBuf.append(" - ");
81  sBuf.append(GetAppLangDateTimeString(rRedl.GetTimeStamp()));
82  if( bBalloon && !rRedl.GetComment().isEmpty() )
83  sBuf.append('\n').append(rRedl.GetComment());
84  }
85  return sBuf.makeStringAndClear();
86 }
87 
88 OUString SwEditWin::ClipLongToolTip(const OUString& rText)
89 {
90  OUString sDisplayText(rText);
91  tools::Long nTextWidth = GetTextWidth(sDisplayText);
92  tools::Long nMaxWidth = GetDesktopRectPixel().GetWidth() * 2 / 3;
93  nMaxWidth = PixelToLogic(Size(nMaxWidth, 0)).Width();
94  if (nTextWidth > nMaxWidth)
95  sDisplayText = GetEllipsisString(sDisplayText, nMaxWidth, DrawTextFlags::CenterEllipsis);
96  return sDisplayText;
97 }
98 
100 {
101  SwWrtShell &rSh = m_rView.GetWrtShell();
102  bool bQuickBalloon = bool(rEvt.GetMode() & ( HelpEventMode::QUICK | HelpEventMode::BALLOON ));
103  if(bQuickBalloon && !rSh.GetViewOptions()->IsShowContentTips())
104  return;
105  bool bContinue = true;
106  CurrShell aCurr(&rSh);
107  OUString sText;
109  bool bBalloon = bool(rEvt.GetMode() & HelpEventMode::BALLOON);
110 
111  SdrView *pSdrView = rSh.GetDrawView();
112 
113  if( bQuickBalloon && pSdrView )
114  {
115  SdrPageView* pPV = pSdrView->GetSdrPageView();
116  SwDPage* pPage = pPV ? static_cast<SwDPage*>(pPV->GetPage()) : nullptr;
117  bContinue = pPage && pPage->RequestHelp(this, pSdrView, rEvt);
118  }
119 
120  if( bContinue && bQuickBalloon)
121  {
122  SwRect aFieldRect;
123  SwContentAtPos aContentAtPos( IsAttrAtPos::Field |
130 #ifdef DBG_UTIL
132  ( bBalloon ? IsAttrAtPos::CurrAttrs : IsAttrAtPos::NONE) |
133 #endif
135 
136  if( rSh.GetContentAtPos( aPos, aContentAtPos, false, &aFieldRect ) )
137  {
138  QuickHelpFlags nStyle = QuickHelpFlags::NONE; // style of quick help
139  switch( aContentAtPos.eContentAtPos )
140  {
141  case IsAttrAtPos::TableBoxFml:
142  sText = "= " + static_cast<const SwTableBoxFormula*>(aContentAtPos.aFnd.pAttr)->GetFormula();
143  break;
144 #ifdef DBG_UTIL
146  {
147  sText = OStringToOUString(OString::number(
148  static_cast<const SwTableBoxValue*>(aContentAtPos.aFnd.pAttr)->GetValue()),
149  osl_getThreadTextEncoding());
150  break;
151  }
153  sText = aContentAtPos.sStr;
154  break;
155 #endif
156 
158  {
159  sText = static_cast<const SwFormatINetFormat*>(aContentAtPos.aFnd.pAttr)->GetValue();
160  sText = URIHelper::removePassword( sText,
163  //#i63832# remove the link target type
164  sal_Int32 nFound = sText.indexOf(cMarkSeparator);
165  if( nFound != -1 && (++nFound) < sText.getLength() )
166  {
167  OUString sSuffix( sText.copy(nFound) );
168  if( sSuffix == "table" ||
169  sSuffix == "frame" ||
170  sSuffix == "region" ||
171  sSuffix == "outline" ||
172  sSuffix == "text" ||
173  sSuffix == "graphic" ||
174  sSuffix == "ole" ||
175  sSuffix == "drawingobject" )
176  sText = sText.copy( 0, nFound - 1);
177  }
178  // #i104300#
179  // special handling if target is a cross-reference bookmark
180  {
181  OUString sTmpSearchStr = sText.copy( 1 );
182  IDocumentMarkAccess* pMarkAccess = rSh.getIDocumentMarkAccess();
184  pMarkAccess->findBookmark( sTmpSearchStr );
185  if ( ppBkmk != pMarkAccess->getBookmarksEnd() &&
188  {
189  SwTextNode* pTextNode = (*ppBkmk)->GetMarkStart().nNode.GetNode().GetTextNode();
190  if ( pTextNode )
191  {
192  sText = sw::GetExpandTextMerged(rSh.GetLayout(), *pTextNode, true, false, ExpandMode(0));
193 
194  if( !sText.isEmpty() )
195  {
196  OUStringBuffer sTmp(sText.replaceAll(u"\u00ad", ""));
197  for (sal_Int32 i = 0; i < sTmp.getLength(); ++i)
198  {
199  if (sTmp[i] < 0x20)
200  sTmp[i] = 0x20;
201  else if (sTmp[i] == 0x2011)
202  sTmp[i] = '-';
203  }
204  sText = sTmp.makeStringAndClear();
205  }
206  }
207  }
208  }
209  // #i80029#
210  bool bExecHyperlinks = m_rView.GetDocShell()->IsReadOnly();
211  if ( !bExecHyperlinks )
212  {
213  sText = SfxHelp::GetURLHelpText(sText);
214  }
215  break;
216  }
218  {
219  vcl::KeyCode aCode( KEY_SPACE );
220  vcl::KeyCode aModifiedCode( KEY_SPACE, KEY_MOD1 );
221  OUString aModStr( aModifiedCode.GetName() );
222  aModStr = aModStr.replaceFirst(aCode.GetName(), "");
223  aModStr = aModStr.replaceAll("+", "");
224  sText = SwResId(STR_SMARTTAG_CLICK).replaceAll("%s", aModStr);
225  break;
226  }
227 
228  case IsAttrAtPos::Ftn:
229  if( aContentAtPos.pFndTextAttr && aContentAtPos.aFnd.pAttr )
230  {
231  const SwFormatFootnote* pFootnote = static_cast<const SwFormatFootnote*>(aContentAtPos.aFnd.pAttr);
232  OUString sTmp(pFootnote->GetFootnoteText(*rSh.GetLayout()));
233  sText = SwResId( pFootnote->IsEndNote()
234  ? STR_ENDNOTE : STR_FTNNOTE ) + sTmp;
235  bBalloon = true;
236  if( aContentAtPos.IsInRTLText() )
237  nStyle |= QuickHelpFlags::BiDiRtl;
238  }
239  break;
240 
242  {
244  const bool bShowInlineTooltips = rSh.GetViewOptions()->IsShowInlineTooltips();
245  if ( bShowTrackChanges && bShowInlineTooltips )
246  sText = lcl_GetRedlineHelp(*aContentAtPos.aFnd.pRedl, bBalloon);
247  break;
248  }
249 
251  sText = aContentAtPos.sStr;
252  if( !sText.isEmpty() && aContentAtPos.pFndTextAttr )
253  {
254  const SwTOXType* pTType = aContentAtPos.pFndTextAttr->
255  GetTOXMark().GetTOXType();
256  if( pTType && !pTType->GetTypeName().isEmpty() )
257  {
258  sText = ": " + sText;
259  sText = pTType->GetTypeName() + sText;
260  }
261  }
262  break;
263 
265  if(aContentAtPos.aFnd.pAttr)
266  {
267  sText = SwResId(STR_CONTENT_TYPE_SINGLE_REFERENCE) + ": ";
268  sText += static_cast<const SwFormatRefMark*>(aContentAtPos.aFnd.pAttr)->GetRefName();
269  }
270  break;
271 
272  default:
273  {
274  SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
275  if(!pModOpt->IsHideFieldTips())
276  {
277  const SwField* pField = aContentAtPos.aFnd.pField;
278  switch( pField->Which() )
279  {
280  case SwFieldIds::SetExp:
281  case SwFieldIds::Table:
282  case SwFieldIds::GetExp:
283  {
284  sal_uInt16 nOldSubType = pField->GetSubType();
285  const_cast<SwField*>(pField)->SetSubType(nsSwExtendedSubType::SUB_CMD);
286  sText = pField->ExpandField(true, rSh.GetLayout());
287  const_cast<SwField*>(pField)->SetSubType(nOldSubType);
288  }
289  break;
290 
291  case SwFieldIds::Postit:
292  {
293  break;
294  }
295  case SwFieldIds::Input: // BubbleHelp, because the suggestion could be quite long
296  bBalloon = true;
297  [[fallthrough]];
300  sText = pField->GetPar2();
301  break;
302 
304  sText = pField->GetFieldName();
305  break;
306 
307  case SwFieldIds::User:
309  sText = pField->GetPar1();
310  break;
311 
312  case SwFieldIds::DocStat:
313  break;
314 
315  case SwFieldIds::Macro:
316  sText = static_cast<const SwMacroField*>(pField)->GetMacro();
317  break;
318 
319  case SwFieldIds::GetRef:
320  {
321  // #i85090#
322  const SwGetRefField* pRefField( dynamic_cast<const SwGetRefField*>(pField) );
323  OSL_ENSURE( pRefField,
324  "<SwEditWin::RequestHelp(..)> - unexpected type of <pField>" );
325  if ( pRefField )
326  {
327  if ( pRefField->IsRefToHeadingCrossRefBookmark() ||
328  pRefField->IsRefToNumItemCrossRefBookmark() )
329  {
330  sText = pRefField->GetExpandedTextOfReferencedTextNode(*rSh.GetLayout());
331  if ( sText.getLength() > 80 )
332  {
333  sText = OUString::Concat(sText.subView(0, 80)) + "...";
334  }
335  }
336  else
337  {
338  sText = static_cast<const SwGetRefField*>(pField)->GetSetRefName();
339  }
340  }
341  break;
342  }
343 
344  default: break;
345  }
346  }
347 
348  if( sText.isEmpty() )
349  {
351  const bool bShowInlineTooltips = rSh.GetViewOptions()->IsShowInlineTooltips();
352  if ( bShowTrackChanges && bShowInlineTooltips )
353  {
354  aContentAtPos.eContentAtPos = IsAttrAtPos::Redline;
355  if( rSh.GetContentAtPos( aPos, aContentAtPos, false, &aFieldRect ) )
356  sText = lcl_GetRedlineHelp(*aContentAtPos.aFnd.pRedl, bBalloon);
357  }
358  }
359  }
360  }
361  if (!sText.isEmpty())
362  {
363  tools::Rectangle aRect( aFieldRect.SVRect() );
364  Point aPt( OutputToScreenPixel( LogicToPixel( aRect.TopLeft() )));
365  aRect.SetLeft( aPt.X() );
366  aRect.SetTop( aPt.Y() );
367  aPt = OutputToScreenPixel( LogicToPixel( aRect.BottomRight() ));
368  aRect.SetRight( aPt.X() );
369  aRect.SetBottom( aPt.Y() );
370 
371  // tdf#136336 ensure tooltip area surrounds the current mouse position with at least a pixel margin
372  aRect.Union(tools::Rectangle(rEvt.GetMousePosPixel(), Size(1, 1)));
373  aRect.AdjustLeft(-1);
374  aRect.AdjustRight(1);
375  aRect.AdjustTop(-1);
376  aRect.AdjustBottom(1);
377 
378  if( bBalloon )
379  Help::ShowBalloon( this, rEvt.GetMousePosPixel(), aRect, sText );
380  else
381  {
382  // the show the help
383  OUString sDisplayText(ClipLongToolTip(sText));
384  Help::ShowQuickHelp(this, aRect, sDisplayText, nStyle);
385  }
386  }
387 
388  bContinue = false;
389  }
390 
391  }
392 
393  if( bContinue )
394  Window::RequestHelp( rEvt );
395 }
396 
397 void SwEditWin::PrePaint(vcl::RenderContext& /*rRenderContext*/)
398 {
399  SwWrtShell* pWrtShell = GetView().GetWrtShellPtr();
400 
401  if(pWrtShell)
402  {
403  pWrtShell->PrePaint();
404  }
405 }
406 
407 void SwEditWin::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
408 {
409  SwWrtShell* pWrtShell = GetView().GetWrtShellPtr();
410  if(!pWrtShell)
411  return;
412  bool bPaintShadowCursor = false;
413  if( m_pShadCursor )
414  {
415  tools::Rectangle aRect( m_pShadCursor->GetRect());
416  // fully resides inside?
417  if( rRect.IsInside( aRect ) )
418  {
419  // then cancel
420  m_pShadCursor.reset();
421  }
422  else if( rRect.IsOver( aRect ))
423  {
424  // resides somewhat above, then everything is clipped outside
425  // and we have to make the "inner part" at the end of the
426  // Paint visible again. Otherwise Paint errors occur!
427  bPaintShadowCursor = true;
428  }
429  }
430 
431  if ( GetView().GetVisArea().GetWidth() <= 0 ||
432  GetView().GetVisArea().GetHeight() <= 0 )
433  Invalidate( rRect );
434  else
435  {
436  pWrtShell->setOutputToWindow(true);
437  bool bTiledPainting = false;
439  {
442  }
443  pWrtShell->Paint(rRenderContext, rRect);
445  {
447  }
448  pWrtShell->setOutputToWindow(false);
449  }
450 
451  if( bPaintShadowCursor )
452  m_pShadCursor->Paint();
453 
456 }
457 
458 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool IsInRTLText() const
Definition: crstrvl.cxx:1912
void setOutputToWindow(bool bOutputToWindow)
Definition: viewsh.cxx:127
OUString GetExpandedTextOfReferencedTextNode(SwRootFrame const &rLayout) const
Definition: reffld.cxx:402
constexpr sal_uInt16 KEY_MOD1
SdrView * GetDrawView()
Definition: vnew.cxx:375
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:88
OUString const & GetAuthorString(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1755
bool IsShowContentTips() const
Definition: viewopt.hxx:540
std::string GetValue
const SwView & GetView() const
Definition: edtwin.hxx:244
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:475
const SfxPoolItem * pAttr
Definition: crsrsh.hxx:96
Base class of all fields.
Definition: fldbas.hxx:289
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)
bool IsOver(const tools::Rectangle &rRect) const
tools::Long GetWidth() const
tools::Rectangle GetDesktopRectPixel() const
bool IsEndNote() const
Definition: fmtftn.hxx:71
Of course Writer needs its own rectangles.
Definition: swrect.hxx:35
constexpr sal_uInt16 KEY_SPACE
void setTiledPainting(bool bTiledPainting)
OUString GetAppLangDateTimeString(const DateTime &)
Definition: uitool.cxx:800
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:99
SwWrtShell & GetWrtShell() const
Definition: view.hxx:399
Used by the UI to modify the document model.
Definition: wrtsh.hxx:90
virtual OUString GetPar1() const
Definition: fldbas.cxx:314
SwFrameControlsManager & GetFrameControlsManager()
Definition: edtwin.cxx:6656
OUString sSuffix
void PrePaint()
Definition: viewsh.cxx:164
const DateTime & GetTimeStamp(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1760
OUString GetEllipsisString(const OUString &rStr, tools::Long nMaxWidth, DrawTextFlags nStyle=DrawTextFlags::EndEllipsis) const
virtual void PrePaint(vcl::RenderContext &rRenderContext) override
Definition: edtwin2.cxx:397
IsAttrAtPos eContentAtPos
Definition: crsrsh.hxx:101
only for debugging
OUString sStr
Definition: crsrsh.hxx:103
union SwContentAtPos::@24 aFnd
const IDocumentMarkAccess * getIDocumentMarkAccess() const
Provides access to the document bookmark interface.
Definition: viewsh.cxx:2669
const Point & GetMousePosPixel() const
bool IsShowOutlineContentVisibilityButton() const
Definition: viewopt.cxx:100
SwDoc * GetDoc()
returns Doc. But be careful!
Definition: docsh.hxx:203
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
int i
const SwField * pField
Definition: crsrsh.hxx:95
const SwExtendedSubType SUB_CMD
Show command.
Definition: fldbas.hxx:211
std::unique_ptr< SwShadowCursor, o3tl::default_delete< SwShadowCursor > > m_pShadCursor
Definition: edtwin.hxx:94
OUString GetFootnoteText(SwRootFrame const &rLayout) const
Definition: atrftn.cxx:187
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
QuickHelpFlags
float u
const OUString & GetTypeName() const
Definition: tox.hxx:698
OUString GetName(vcl::Window *pWindow=nullptr) const
bool IsInside(const Point &rPOINT) const
virtual const_iterator_t findBookmark(const OUString &rMark) const =0
Finds a bookmark by name.
OUString SwResId(const char *pId)
Definition: swmodule.cxx:166
virtual OUString GetPar2() const
Definition: fldbas.cxx:319
const sal_Unicode cMarkSeparator
Definition: swtypes.hxx:129
const SwTextAttr * pFndTextAttr
Definition: crsrsh.hxx:104
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:335
SwDocShell * GetDocShell()
Definition: view.cxx:1109
bool IsReadOnly() const
Point PixelToLogic(const Point &rDevicePt) const
Point LogicToPixel(const Point &rLogicPt) const
const OUString & GetComment(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1770
bool RequestHelp(vcl::Window *pWindow, SdrView const *pView, const HelpEvent &rEvt)
Definition: dpage.cxx:144
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:80
ExpandMode
Some helpers for converting model strings to view strings.
OUString ExpandField(bool bCached, SwRootFrame const *pLayout) const
expand the field.
Definition: fldbas.cxx:455
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
Definition: doc.cxx:335
SwWrtShell * GetWrtShellPtr() const
Definition: view.hxx:400
SwFieldIds Which() const
ResId.
Definition: fldbas.cxx:243
tools::Rectangle SVRect() const
Definition: swrect.hxx:280
bool IsShowInlineTooltips() const
Definition: viewopt.hxx:289
bool IsRefToHeadingCrossRefBookmark() const
Definition: reffld.cxx:380
SdrPage * GetPage() const
const SwViewOption * GetViewOptions() const
Definition: viewsh.hxx:423
tools::Long GetTextWidth(const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, vcl::TextLayoutCache const *=nullptr, SalLayoutGlyphs const *const pLayoutCache=nullptr) const
RedlineType GetType(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1765
virtual OUString GetFieldName() const
get name or content
Definition: fldbas.cxx:298
const SwRangeRedline * pRedl
Definition: crsrsh.hxx:97
SwView & m_rView
Definition: edtwin.hxx:97
const tools::Rectangle & GetVisArea() const
Definition: view.hxx:412
tools::Long GetHeight() 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:1252
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
Definition: edtwin2.cxx:407
static OUString GetURLHelpText(std::u16string_view)
SwRootFrame * GetLayout() const
Definition: viewsh.cxx:2064
static OUString lcl_GetRedlineHelp(const SwRangeRedline &rRedl, bool bBalloon)
Definition: edtwin2.cxx:56
only for debugging
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:846
static void ShowBalloon(vcl::Window *pParent, const Point &rScreenPos, const tools::Rectangle &, const OUString &rHelpText)