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 <FrameControlsManager.hxx>
55 #include <comphelper/lok.hxx>
56 #include <authfld.hxx>
57 
58 static OUString lcl_GetRedlineHelp( const SwRangeRedline& rRedl, bool bBalloon )
59 {
60  TranslateId pResId;
61  switch( rRedl.GetType() )
62  {
63  case RedlineType::Insert: pResId = STR_REDLINE_INSERT; break;
64  case RedlineType::Delete: pResId = STR_REDLINE_DELETE; break;
65  case RedlineType::Format: pResId = STR_REDLINE_FORMAT; break;
66  case RedlineType::Table: pResId = STR_REDLINE_TABLE; break;
67  case RedlineType::FmtColl: pResId = STR_REDLINE_FMTCOLL; break;
68  case RedlineType::ParagraphFormat: pResId = STR_REDLINE_PARAGRAPH_FORMAT; break;
69  case RedlineType::TableRowInsert: pResId = STR_REDLINE_TABLE_ROW_INSERT; break;
70  case RedlineType::TableRowDelete: pResId = STR_REDLINE_TABLE_ROW_DELETE; break;
71  case RedlineType::TableCellInsert: pResId = STR_REDLINE_TABLE_CELL_INSERT; break;
72  case RedlineType::TableCellDelete: pResId = STR_REDLINE_TABLE_CELL_DELETE; break;
73  default: break;
74  }
75 
76  OUStringBuffer sBuf;
77  if (pResId)
78  {
79  sBuf.append(SwResId(pResId));
80  sBuf.append(": ");
81  sBuf.append(rRedl.GetAuthorString());
82  sBuf.append(" - ");
83  sBuf.append(GetAppLangDateTimeString(rRedl.GetTimeStamp()));
84  if( bBalloon && !rRedl.GetComment().isEmpty() )
85  sBuf.append('\n').append(rRedl.GetComment());
86  }
87  return sBuf.makeStringAndClear();
88 }
89 
90 OUString SwEditWin::ClipLongToolTip(const OUString& rText)
91 {
92  OUString sDisplayText(rText);
93  tools::Long nTextWidth = GetTextWidth(sDisplayText);
94  tools::Long nMaxWidth = GetDesktopRectPixel().GetWidth() * 2 / 3;
95  nMaxWidth = PixelToLogic(Size(nMaxWidth, 0)).Width();
96  if (nTextWidth > nMaxWidth)
97  sDisplayText = GetOutDev()->GetEllipsisString(sDisplayText, nMaxWidth, DrawTextFlags::CenterEllipsis);
98  return sDisplayText;
99 }
100 
102 {
103  SwWrtShell &rSh = m_rView.GetWrtShell();
104  bool bQuickBalloon = bool(rEvt.GetMode() & ( HelpEventMode::QUICK | HelpEventMode::BALLOON ));
105  if(bQuickBalloon && !rSh.GetViewOptions()->IsShowContentTips())
106  return;
107  bool bContinue = true;
108  CurrShell aCurr(&rSh);
109  OUString sText;
111  bool bBalloon = bool(rEvt.GetMode() & HelpEventMode::BALLOON);
112 
113  SdrView *pSdrView = rSh.GetDrawView();
114 
115  if( bQuickBalloon && pSdrView )
116  {
117  SdrPageView* pPV = pSdrView->GetSdrPageView();
118  SwDPage* pPage = pPV ? static_cast<SwDPage*>(pPV->GetPage()) : nullptr;
119  bContinue = pPage && pPage->RequestHelp(this, pSdrView, rEvt);
120  }
121 
122  if( bContinue && bQuickBalloon)
123  {
124  SwRect aFieldRect;
125  SwContentAtPos aContentAtPos( IsAttrAtPos::Field |
132 #ifdef DBG_UTIL
134  ( bBalloon ? IsAttrAtPos::CurrAttrs : IsAttrAtPos::NONE) |
135 #endif
137 
138  if( rSh.GetContentAtPos( aPos, aContentAtPos, false, &aFieldRect ) )
139  {
140  QuickHelpFlags nStyle = QuickHelpFlags::NONE; // style of quick help
141  switch( aContentAtPos.eContentAtPos )
142  {
143  case IsAttrAtPos::TableBoxFml:
144  sText = "= " + static_cast<const SwTableBoxFormula*>(aContentAtPos.aFnd.pAttr)->GetFormula();
145  break;
146 #ifdef DBG_UTIL
148  {
149  sText = OStringToOUString(OString::number(
150  static_cast<const SwTableBoxValue*>(aContentAtPos.aFnd.pAttr)->GetValue()),
151  osl_getThreadTextEncoding());
152  break;
153  }
155  sText = aContentAtPos.sStr;
156  break;
157 #endif
158 
160  {
161  sText = static_cast<const SwFormatINetFormat*>(aContentAtPos.aFnd.pAttr)->GetValue();
162  sText = URIHelper::removePassword( sText,
165  //#i63832# remove the link target type
166  sal_Int32 nFound = sText.indexOf(cMarkSeparator);
167  if( nFound != -1 && (++nFound) < sText.getLength() )
168  {
169  OUString sSuffix( sText.copy(nFound) );
170  if( sSuffix == "table" ||
171  sSuffix == "frame" ||
172  sSuffix == "region" ||
173  sSuffix == "outline" ||
174  sSuffix == "text" ||
175  sSuffix == "graphic" ||
176  sSuffix == "ole" ||
177  sSuffix == "drawingobject" )
178  sText = sText.copy( 0, nFound - 1);
179  }
180  // #i104300#
181  // special handling if target is a cross-reference bookmark
182  {
183  OUString sTmpSearchStr = sText.copy( 1 );
184  IDocumentMarkAccess* pMarkAccess = rSh.getIDocumentMarkAccess();
186  pMarkAccess->findBookmark( sTmpSearchStr );
187  if ( ppBkmk != pMarkAccess->getBookmarksEnd() &&
190  {
191  SwTextNode* pTextNode = (*ppBkmk)->GetMarkStart().nNode.GetNode().GetTextNode();
192  if ( pTextNode )
193  {
194  sText = sw::GetExpandTextMerged(rSh.GetLayout(), *pTextNode, true, false, ExpandMode(0));
195 
196  if( !sText.isEmpty() )
197  {
198  OUStringBuffer sTmp(sText.replaceAll(u"\u00ad", ""));
199  for (sal_Int32 i = 0; i < sTmp.getLength(); ++i)
200  {
201  if (sTmp[i] < 0x20)
202  sTmp[i] = 0x20;
203  else if (sTmp[i] == 0x2011)
204  sTmp[i] = '-';
205  }
206  sText = sTmp.makeStringAndClear();
207  }
208  }
209  }
210  }
211  // #i80029#
212  bool bExecHyperlinks = m_rView.GetDocShell()->IsReadOnly();
213  if ( !bExecHyperlinks )
214  {
215  sText = SfxHelp::GetURLHelpText(sText);
216  }
217  break;
218  }
220  {
221  vcl::KeyCode aCode( KEY_SPACE );
222  vcl::KeyCode aModifiedCode( KEY_SPACE, KEY_MOD1 );
223  OUString aModStr( aModifiedCode.GetName() );
224  aModStr = aModStr.replaceFirst(aCode.GetName(), "");
225  aModStr = aModStr.replaceAll("+", "");
226  sText = SwResId(STR_SMARTTAG_CLICK).replaceAll("%s", aModStr);
227  break;
228  }
229 
230  case IsAttrAtPos::Ftn:
231  if( aContentAtPos.pFndTextAttr && aContentAtPos.aFnd.pAttr )
232  {
233  const SwFormatFootnote* pFootnote = static_cast<const SwFormatFootnote*>(aContentAtPos.aFnd.pAttr);
234  OUString sTmp(pFootnote->GetFootnoteText(*rSh.GetLayout()));
235  sText = SwResId( pFootnote->IsEndNote()
236  ? STR_ENDNOTE : STR_FTNNOTE ) + sTmp;
237  bBalloon = true;
238  if( aContentAtPos.IsInRTLText() )
239  nStyle |= QuickHelpFlags::BiDiRtl;
240  }
241  break;
242 
244  {
246  const bool bShowInlineTooltips = rSh.GetViewOptions()->IsShowInlineTooltips();
247  if ( bShowTrackChanges && bShowInlineTooltips )
248  sText = lcl_GetRedlineHelp(*aContentAtPos.aFnd.pRedl, bBalloon);
249  break;
250  }
251 
253  sText = aContentAtPos.sStr;
254  if( !sText.isEmpty() && aContentAtPos.pFndTextAttr )
255  {
256  const SwTOXType* pTType = aContentAtPos.pFndTextAttr->
257  GetTOXMark().GetTOXType();
258  if( pTType && !pTType->GetTypeName().isEmpty() )
259  {
260  sText = ": " + sText;
261  sText = pTType->GetTypeName() + sText;
262  }
263  }
264  break;
265 
267  if(aContentAtPos.aFnd.pAttr)
268  {
269  sText = SwResId(STR_CONTENT_TYPE_SINGLE_REFERENCE) + ": ";
270  sText += static_cast<const SwFormatRefMark*>(aContentAtPos.aFnd.pAttr)->GetRefName();
271  }
272  break;
273 
274  default:
275  {
276  SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
277  if(!pModOpt->IsHideFieldTips())
278  {
279  const SwField* pField = aContentAtPos.aFnd.pField;
280  switch( pField->Which() )
281  {
282  case SwFieldIds::SetExp:
283  case SwFieldIds::Table:
284  case SwFieldIds::GetExp:
285  {
286  sal_uInt16 nOldSubType = pField->GetSubType();
287  const_cast<SwField*>(pField)->SetSubType(nsSwExtendedSubType::SUB_CMD);
288  sText = pField->ExpandField(true, rSh.GetLayout());
289  const_cast<SwField*>(pField)->SetSubType(nOldSubType);
290  }
291  break;
292 
293  case SwFieldIds::Postit:
294  {
295  break;
296  }
297  case SwFieldIds::Input: // BubbleHelp, because the suggestion could be quite long
298  bBalloon = true;
299  [[fallthrough]];
302  sText = pField->GetPar2();
303  break;
304 
306  sText = pField->GetFieldName();
307  break;
308 
309  case SwFieldIds::User:
311  sText = pField->GetPar1();
312  break;
313 
314  case SwFieldIds::DocStat:
315  break;
316 
317  case SwFieldIds::Macro:
318  sText = static_cast<const SwMacroField*>(pField)->GetMacro();
319  break;
320 
321  case SwFieldIds::GetRef:
322  {
323  // #i85090#
324  const SwGetRefField* pRefField( dynamic_cast<const SwGetRefField*>(pField) );
325  OSL_ENSURE( pRefField,
326  "<SwEditWin::RequestHelp(..)> - unexpected type of <pField>" );
327  if ( pRefField )
328  {
329  if ( pRefField->IsRefToHeadingCrossRefBookmark() ||
330  pRefField->IsRefToNumItemCrossRefBookmark() )
331  {
332  sText = pRefField->GetExpandedTextOfReferencedTextNode(*rSh.GetLayout());
333  if ( sText.getLength() > 80 )
334  {
335  sText = OUString::Concat(sText.subView(0, 80)) + "...";
336  }
337  }
338  else
339  {
340  sText = pRefField->GetSetRefName();
341  }
342  }
343  break;
344  }
346  {
347  const auto pAuthorityField
348  = static_cast<const SwAuthorityField*>(pField);
349  sText = pAuthorityField->GetAuthority(aContentAtPos.pFndTextAttr,
350  rSh.GetLayout());
351  if (pAuthorityField->HasURL())
352  {
353  const OUString& rURL
354  = pAuthorityField->GetAuthEntry()->GetAuthorField(
356  sText += "\n" + SfxHelp::GetURLHelpText(rURL);
357  }
358  break;
359  }
360 
361  default: break;
362  }
363  }
364 
365  if( sText.isEmpty() )
366  {
368  const bool bShowInlineTooltips = rSh.GetViewOptions()->IsShowInlineTooltips();
369  if ( bShowTrackChanges && bShowInlineTooltips )
370  {
371  aContentAtPos.eContentAtPos = IsAttrAtPos::Redline;
372  if( rSh.GetContentAtPos( aPos, aContentAtPos, false, &aFieldRect ) )
373  sText = lcl_GetRedlineHelp(*aContentAtPos.aFnd.pRedl, bBalloon);
374  }
375  }
376  }
377  }
378  if (!sText.isEmpty())
379  {
380  tools::Rectangle aRect( aFieldRect.SVRect() );
381  Point aPt( OutputToScreenPixel( LogicToPixel( aRect.TopLeft() )));
382  aRect.SetLeft( aPt.X() );
383  aRect.SetTop( aPt.Y() );
384  aPt = OutputToScreenPixel( LogicToPixel( aRect.BottomRight() ));
385  aRect.SetRight( aPt.X() );
386  aRect.SetBottom( aPt.Y() );
387 
388  // tdf#136336 ensure tooltip area surrounds the current mouse position with at least a pixel margin
389  aRect.Union(tools::Rectangle(rEvt.GetMousePosPixel(), Size(1, 1)));
390  aRect.AdjustLeft(-1);
391  aRect.AdjustRight(1);
392  aRect.AdjustTop(-1);
393  aRect.AdjustBottom(1);
394 
395  if( bBalloon )
396  Help::ShowBalloon( this, rEvt.GetMousePosPixel(), aRect, sText );
397  else
398  {
399  // the show the help
400  OUString sDisplayText(ClipLongToolTip(sText));
401  Help::ShowQuickHelp(this, aRect, sDisplayText, nStyle);
402  }
403  }
404 
405  bContinue = false;
406  }
407 
408  }
409 
410  if( bContinue )
411  Window::RequestHelp( rEvt );
412 }
413 
414 void SwEditWin::PrePaint(vcl::RenderContext& /*rRenderContext*/)
415 {
416  SwWrtShell* pWrtShell = GetView().GetWrtShellPtr();
417 
418  if(pWrtShell)
419  {
420  pWrtShell->PrePaint();
421  }
422 }
423 
424 void SwEditWin::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
425 {
426  SwWrtShell* pWrtShell = GetView().GetWrtShellPtr();
427  if(!pWrtShell)
428  return;
429  bool bPaintShadowCursor = false;
430  if( m_pShadCursor )
431  {
432  tools::Rectangle aRect( m_pShadCursor->GetRect());
433  // fully resides inside?
434  if( rRect.IsInside( aRect ) )
435  {
436  // then cancel
437  m_pShadCursor.reset();
438  }
439  else if( rRect.IsOver( aRect ))
440  {
441  // resides somewhat above, then everything is clipped outside
442  // and we have to make the "inner part" at the end of the
443  // Paint visible again. Otherwise Paint errors occur!
444  bPaintShadowCursor = true;
445  }
446  }
447 
448  if ( GetView().GetVisArea().GetWidth() <= 0 ||
449  GetView().GetVisArea().GetHeight() <= 0 )
450  Invalidate( rRect );
451  else
452  {
453  pWrtShell->setOutputToWindow(true);
454  bool bTiledPainting = false;
456  {
459  }
460  pWrtShell->Paint(rRenderContext, rRect);
462  {
464  }
465  pWrtShell->setOutputToWindow(false);
466  }
467 
468  if( bPaintShadowCursor )
469  m_pShadCursor->Paint();
470 }
471 
472 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool IsInRTLText() const
Definition: crstrvl.cxx:1918
void setOutputToWindow(bool bOutputToWindow)
Definition: viewsh.cxx:129
OUString GetExpandedTextOfReferencedTextNode(SwRootFrame const &rLayout) const
Definition: reffld.cxx:402
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:90
OUString const & GetAuthorString(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1800
bool IsShowContentTips() const
Definition: viewopt.hxx:539
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:478
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::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:873
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:101
SwWrtShell & GetWrtShell() const
Definition: view.hxx:413
Used by the UI to modify the document model.
Definition: wrtsh.hxx:93
OUString SwResId(TranslateId aId)
Definition: swmodule.cxx:165
virtual OUString GetPar1() const
Definition: fldbas.cxx:316
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:561
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:166
const DateTime & GetTimeStamp(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1805
OUString GetEllipsisString(const OUString &rStr, tools::Long nMaxWidth, DrawTextFlags nStyle=DrawTextFlags::EndEllipsis) const
virtual void PrePaint(vcl::RenderContext &rRenderContext) override
Definition: edtwin2.cxx:414
IsAttrAtPos eContentAtPos
Definition: crsrsh.hxx:101
constexpr tools::Long GetWidth() const
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:2672
const Point & GetMousePosPixel() const
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:256
Point LogicToPixel(const Point &rLogicPt) const
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:189
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
QuickHelpFlags
float u
const OUString & GetTypeName() const
Definition: tox.hxx:706
bool IsInside(const Point &rPOINT) const
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:321
const sal_Unicode cMarkSeparator
Definition: swtypes.hxx:125
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:337
SwDocShell * GetDocShell()
Definition: view.cxx:1122
bool IsReadOnly() const
const OUString & GetComment(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1815
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:465
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
Definition: doc.cxx:335
SwWrtShell * GetWrtShellPtr() const
Definition: view.hxx:414
SwFieldIds Which() const
ResId.
Definition: fldbas.cxx:245
tools::Rectangle SVRect() const
Definition: swrect.hxx:279
bool IsShowInlineTooltips() const
Definition: viewopt.hxx:288
bool IsRefToHeadingCrossRefBookmark() const
Definition: reffld.cxx:380
SdrPage * GetPage() const
const SwViewOption * GetViewOptions() const
Definition: viewsh.hxx:423
::OutputDevice const * GetOutDev() const
RedlineType GetType(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1810
const OUString & GetSetRefName() const
Definition: reffld.hxx:108
virtual OUString GetFieldName() const
get name or content
Definition: fldbas.cxx:300
const SwRangeRedline * pRedl
Definition: crsrsh.hxx:97
SwView & m_rView
Definition: edtwin.hxx:97
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:1255
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
Definition: edtwin2.cxx:424
static OUString GetURLHelpText(std::u16string_view)
SwRootFrame * GetLayout() const
Definition: viewsh.cxx:2074
static OUString lcl_GetRedlineHelp(const SwRangeRedline &rRedl, bool bBalloon)
Definition: edtwin2.cxx:58
only for debugging
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:850
static void ShowBalloon(vcl::Window *pParent, const Point &rScreenPos, const tools::Rectangle &, const OUString &rHelpText)
constexpr tools::Long GetHeight() const