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