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
52#include <txtfrm.hxx>
53#include <ndtxt.hxx>
54#include <comphelper/lok.hxx>
55#include <authfld.hxx>
56
57#include <com/sun/star/text/XTextRange.hpp>
58#include <unotextrange.hxx>
59#include <SwStyleNameMapper.hxx>
60#include <unoprnms.hxx>
61#include <editeng/unoprnms.hxx>
62#include <rootfrm.hxx>
63#include <unomap.hxx>
64#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
65
66namespace {
67
68bool HasValidPropertyValue(const uno::Any& rAny)
69{
70 if (bool bValue; rAny >>= bValue)
71 {
72 return true;
73 }
74 else if (OUString aValue; (rAny >>= aValue) && !(aValue.isEmpty()))
75 {
76 return true;
77 }
78 else if (awt::FontSlant eValue; rAny >>= eValue)
79 {
80 return true;
81 }
82 else if (tools::Long nValueLong; rAny >>= nValueLong)
83 {
84 return true;
85 }
86 else if (double fValue; rAny >>= fValue)
87 {
88 return true;
89 }
90 else if (short nValueShort; rAny >>= nValueShort)
91 {
92 return true;
93 }
94 else
95 return false;
96}
97
98bool PSCSDFPropsQuickHelp(const HelpEvent &rEvt, SwWrtShell& rSh)
99{
100 OUString sText;
101 SwView& rView = rSh.GetView();
102
103 if (rView.IsHighlightCharDF() || rView.GetStylesHighlighterParaColorMap().size()
104 || rView.GetStylesHighlighterCharColorMap().size())
105 {
106 SwPosition aPos(rSh.GetDoc()->GetNodes());
107 Point aPt(rSh.GetWin()->PixelToLogic(
109
110 rSh.GetLayout()->GetModelPositionForViewPoint(&aPos, aPt);
111
112 if (!aPos.GetContentNode()->IsTextNode())
113 return false;
114
115 uno::Reference<text::XTextRange> xRange(
117 aPos, &aPos));
118 uno::Reference<beans::XPropertySet> xPropertySet(xRange, uno::UNO_QUERY_THROW);
119
120 SwContentFrame* pContentFrame = aPos.GetContentNode()->GetTextNode()->getLayoutFrame(
121 rSh.GetLayout());
122
123 SwRect aFrameAreaRect;
124
125 bool bContainsPt = false;
126 do
127 {
128 aFrameAreaRect = pContentFrame->getFrameArea();
129 if (aFrameAreaRect.Contains(aPt))
130 {
131 bContainsPt = true;
132 break;
133 }
134 } while((pContentFrame = pContentFrame->GetFollow()));
135
136 if (bContainsPt)
137 {
138 if (rView.GetStylesHighlighterCharColorMap().size())
139 {
140 // check if in CS formatting highlighted area
141 OUString sCharStyle;
142 xPropertySet->getPropertyValue("CharStyleName") >>= sCharStyle;
143 if (!sCharStyle.isEmpty())
145 }
146
147 if (sText.isEmpty() && rView.IsHighlightCharDF())
148 {
149 // check if in direct formatting highlighted area
150 const std::vector<OUString> aHiddenProperties{ UNO_NAME_RSID,
164
165 SfxItemPropertySet const& rPropSet(
167 SfxItemPropertyMap const& rMap(rPropSet.getPropertyMap());
168
169 uno::Reference<beans::XPropertyState> xPropertiesState(xRange, uno::UNO_QUERY_THROW);
170 const uno::Sequence<beans::Property> aProperties
171 = xPropertySet->getPropertySetInfo()->getProperties();
172
173 for (const beans::Property& rProperty : aProperties)
174 {
175 const OUString& rPropName = rProperty.Name;
176
177 if (!rMap.hasPropertyByName(rPropName))
178 continue;
179
180 if (std::find(aHiddenProperties.begin(), aHiddenProperties.end(), rPropName)
181 != aHiddenProperties.end())
182 continue;
183
184 if (xPropertiesState->getPropertyState(rPropName)
185 == beans::PropertyState_DIRECT_VALUE)
186 {
187 const uno::Any aAny = xPropertySet->getPropertyValue(rPropName);
188 if (HasValidPropertyValue(aAny))
189 {
190 sText = SwResId(STR_CHARACTER_DIRECT_FORMATTING);
191 break;
192 }
193 }
194 }
195 }
196 }
197 else if (rView.GetStylesHighlighterParaColorMap().size())
198 {
199 // check if in paragraph style formatting highlighted area
200 pContentFrame = aPos.GetContentNode()->GetTextNode()->getLayoutFrame(
201 rSh.GetLayout());
202 do
203 {
204 aFrameAreaRect = pContentFrame->getFrameArea();
205 if (pContentFrame->IsRightToLeft())
206 {
207 aFrameAreaRect.AddRight(375);
208 aFrameAreaRect.Left(aFrameAreaRect.Right() - 300);
209 }
210 else
211 {
212 aFrameAreaRect.AddLeft(-375);
213 aFrameAreaRect.Right(aFrameAreaRect.Left() + 300);
214 }
215 if (aFrameAreaRect.Contains(aPt))
216 {
217 OUString sParaStyle;
218 xPropertySet->getPropertyValue("ParaStyleName") >>= sParaStyle;
220 // check for paragraph direct formatting
222 sText = sText + " + " + SwResId(STR_PARAGRAPH_DIRECT_FORMATTING);
223 break;
224 }
225 } while((pContentFrame = pContentFrame->GetFollow()));
226 }
227 }
228
229 if (!sText.isEmpty())
230 {
233 Size(1, 1));
234 Point aPt(rSh.GetWin()->OutputToScreenPixel(rSh.GetWin()->LogicToPixel(aRect.TopLeft())));
235 aRect.SetLeft(aPt.X());
236 aRect.SetTop(aPt.Y());
237 aPt = rSh.GetWin()->OutputToScreenPixel(rSh.GetWin()->LogicToPixel(aRect.BottomRight()));
238 aRect.SetRight(aPt.X());
239 aRect.SetBottom(aPt.Y());
240
241 // tdf#136336 ensure tooltip area surrounds the current mouse position with at least a pixel margin
242 aRect.Union(tools::Rectangle(rEvt.GetMousePosPixel(), Size(1, 1)));
243 aRect.AdjustLeft(-1);
244 aRect.AdjustRight(1);
245 aRect.AdjustTop(-1);
246 aRect.AdjustBottom(1);
247
248 QuickHelpFlags nStyle = QuickHelpFlags::NONE; //TipStyleBalloon;
249 Help::ShowQuickHelp(rSh.GetWin(), aRect, sText, nStyle);
250 }
251
252 return !sText.isEmpty();
253}
254}
255
256static OUString lcl_GetRedlineHelp( const SwRangeRedline& rRedl, bool bBalloon,
257 bool bTableChange, bool bTableColChange )
258{
259 TranslateId pResId;
260 switch( rRedl.GetType() )
261 {
262 case RedlineType::Insert: pResId = bTableChange
263 ? !bTableColChange
264 ? STR_REDLINE_TABLE_ROW_INSERT
265 : STR_REDLINE_TABLE_COLUMN_INSERT
266 : rRedl.IsMoved()
267 ? STR_REDLINE_INSERT_MOVED
268 : STR_REDLINE_INSERT;
269 break;
270 case RedlineType::Delete: pResId = bTableChange
271 ? !bTableColChange
272 ? STR_REDLINE_TABLE_ROW_DELETE
273 : STR_REDLINE_TABLE_COLUMN_DELETE
274 : rRedl.IsMoved()
275 ? STR_REDLINE_DELETE_MOVED
276 : STR_REDLINE_DELETE;
277 break;
278 case RedlineType::Format: pResId = STR_REDLINE_FORMAT; break;
279 case RedlineType::Table: pResId = STR_REDLINE_TABLE; break;
280 case RedlineType::FmtColl: pResId = STR_REDLINE_FMTCOLL; break;
281 case RedlineType::ParagraphFormat: pResId = STR_REDLINE_PARAGRAPH_FORMAT; break;
282 case RedlineType::TableRowInsert: pResId = STR_REDLINE_TABLE_ROW_INSERT; break;
283 case RedlineType::TableRowDelete: pResId = STR_REDLINE_TABLE_ROW_DELETE; break;
284 case RedlineType::TableCellInsert: pResId = STR_REDLINE_TABLE_CELL_INSERT; break;
285 case RedlineType::TableCellDelete: pResId = STR_REDLINE_TABLE_CELL_DELETE; break;
286 default: break;
287 }
288
289 if (!pResId)
290 return OUString();
291 OUStringBuffer sBuf(SwResId(pResId)
292 + ": "
293 + rRedl.GetAuthorString()
294 + " - "
296 if( bBalloon && !rRedl.GetComment().isEmpty() )
297 sBuf.append("\n" + rRedl.GetComment());
298 return sBuf.makeStringAndClear();
299}
300
301OUString SwEditWin::ClipLongToolTip(const OUString& rText)
302{
303 OUString sDisplayText(rText);
304 tools::Long nTextWidth = GetTextWidth(sDisplayText);
305 tools::Long nMaxWidth = GetDesktopRectPixel().GetWidth() * 2 / 3;
306 nMaxWidth = PixelToLogic(Size(nMaxWidth, 0)).Width();
307 if (nTextWidth > nMaxWidth)
308 sDisplayText = GetOutDev()->GetEllipsisString(sDisplayText, nMaxWidth, DrawTextFlags::CenterEllipsis);
309 return sDisplayText;
310}
311
313{
315
316 if (PSCSDFPropsQuickHelp(rEvt, rSh))
317 return;
318
319 bool bQuickBalloon = bool(rEvt.GetMode() & ( HelpEventMode::QUICK | HelpEventMode::BALLOON ));
320 if(bQuickBalloon && !rSh.GetViewOptions()->IsShowContentTips())
321 return;
322 bool bContinue = true;
323 CurrShell aCurr(&rSh);
324 OUString sText;
326 bool bBalloon = bool(rEvt.GetMode() & HelpEventMode::BALLOON);
327
328 SdrView *pSdrView = rSh.GetDrawView();
329
330 if( bQuickBalloon && pSdrView )
331 {
332 SdrPageView* pPV = pSdrView->GetSdrPageView();
333 SwDPage* pPage = pPV ? static_cast<SwDPage*>(pPV->GetPage()) : nullptr;
334 bContinue = pPage && pPage->RequestHelp(this, pSdrView, rEvt);
335 }
336
337 if( bContinue && bQuickBalloon)
338 {
339 SwRect aFieldRect;
340 SwContentAtPos aContentAtPos( IsAttrAtPos::Field |
347#ifdef DBG_UTIL
350#endif
354
355 if( rSh.GetContentAtPos( aPos, aContentAtPos, false, &aFieldRect ) )
356 {
357 QuickHelpFlags nStyle = QuickHelpFlags::NONE; // style of quick help
358 switch( aContentAtPos.eContentAtPos )
359 {
361 sText = "= " + static_cast<const SwTableBoxFormula*>(aContentAtPos.aFnd.pAttr)->GetFormula();
362 break;
363#ifdef DBG_UTIL
365 {
366 if(aContentAtPos.aFnd.pAttr)
367 {
368 sText = OUString::number(
369 static_cast<const SwTableBoxValue*>(aContentAtPos.aFnd.pAttr)->GetValue());
370 }
371 break;
372 }
374 sText = aContentAtPos.sStr;
375 break;
376#endif
377
379 {
380 sText = static_cast<const SwFormatINetFormat*>(aContentAtPos.aFnd.pAttr)->GetValue();
381 sText = URIHelper::removePassword( sText,
384 //#i63832# remove the link target type
385 sal_Int32 nFound = sText.indexOf(cMarkSeparator);
386 if( nFound != -1 && (++nFound) < sText.getLength() )
387 {
388 std::u16string_view sSuffix( sText.subView(nFound) );
389 if( sSuffix == u"table" ||
390 sSuffix == u"frame" ||
391 sSuffix == u"region" ||
392 sSuffix == u"outline" ||
393 sSuffix == u"text" ||
394 sSuffix == u"graphic" ||
395 sSuffix == u"ole" ||
396 sSuffix == u"drawingobject" )
397 sText = sText.copy( 0, nFound - 1);
398 }
399 // #i104300#
400 // special handling if target is a cross-reference bookmark
401 {
402 OUString sTmpSearchStr = sText.copy( 1 );
403 IDocumentMarkAccess* pMarkAccess = rSh.getIDocumentMarkAccess();
405 pMarkAccess->findBookmark( sTmpSearchStr );
406 if ( ppBkmk != pMarkAccess->getBookmarksEnd() &&
409 {
410 SwTextNode* pTextNode = (*ppBkmk)->GetMarkStart().GetNode().GetTextNode();
411 if ( pTextNode )
412 {
413 sText = sw::GetExpandTextMerged(rSh.GetLayout(), *pTextNode, true, false, ExpandMode(0));
414
415 if( !sText.isEmpty() )
416 {
417 OUStringBuffer sTmp(sText.replaceAll(u"\u00ad", ""));
418 for (sal_Int32 i = 0; i < sTmp.getLength(); ++i)
419 {
420 if (sTmp[i] < 0x20)
421 sTmp[i] = 0x20;
422 else if (sTmp[i] == 0x2011)
423 sTmp[i] = '-';
424 }
425 sText = sTmp.makeStringAndClear();
426 }
427 }
428 }
429 }
430 // #i80029#
431 bool bExecHyperlinks = m_rView.GetDocShell()->IsReadOnly();
432 if ( !bExecHyperlinks )
433 {
434 sText = SfxHelp::GetURLHelpText(sText);
435 }
436 break;
437 }
439 {
440 vcl::KeyCode aCode( KEY_SPACE );
441 vcl::KeyCode aModifiedCode( KEY_SPACE, KEY_MOD1 );
442 OUString aModStr( aModifiedCode.GetName() );
443 aModStr = aModStr.replaceFirst(aCode.GetName(), "");
444 aModStr = aModStr.replaceAll("+", "");
445 sText = SwResId(STR_SMARTTAG_CLICK).replaceAll("%s", aModStr);
446 break;
447 }
448
449 case IsAttrAtPos::Ftn:
450 if( aContentAtPos.pFndTextAttr && aContentAtPos.aFnd.pAttr )
451 {
452 const SwFormatFootnote* pFootnote = static_cast<const SwFormatFootnote*>(aContentAtPos.aFnd.pAttr);
453 OUString sTmp(pFootnote->GetFootnoteText(*rSh.GetLayout()));
454 sText = SwResId( pFootnote->IsEndNote()
455 ? STR_ENDNOTE : STR_FTNNOTE ) + sTmp;
456 bBalloon = true;
457 if( aContentAtPos.IsInRTLText() )
458 nStyle |= QuickHelpFlags::BiDiRtl;
459 }
460 break;
461
465 {
467 const bool bShowInlineTooltips = rSh.GetViewOptions()->IsShowInlineTooltips();
468 if ( bShowTrackChanges && bShowInlineTooltips )
469 {
470 sText = lcl_GetRedlineHelp(*aContentAtPos.aFnd.pRedl, bBalloon,
471 IsAttrAtPos::TableRedline == aContentAtPos.eContentAtPos ||
474 }
475 break;
476 }
477
479 sText = aContentAtPos.sStr;
480 if( !sText.isEmpty() && aContentAtPos.pFndTextAttr )
481 {
482 const SwTOXType* pTType = aContentAtPos.pFndTextAttr->
483 GetTOXMark().GetTOXType();
484 if( pTType && !pTType->GetTypeName().isEmpty() )
485 {
486 sText = ": " + sText;
487 sText = pTType->GetTypeName() + sText;
488 }
489 }
490 break;
491
493 if(aContentAtPos.aFnd.pAttr)
494 {
495 sText = SwResId(STR_CONTENT_TYPE_SINGLE_REFERENCE) + ": " +
496 static_cast<const SwFormatRefMark*>(aContentAtPos.aFnd.pAttr)->GetRefName();
497 }
498 break;
499
500 default:
501 {
502 SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
503 if(!pModOpt->IsHideFieldTips())
504 {
505 const SwField* pField = aContentAtPos.aFnd.pField;
506 switch( pField->Which() )
507 {
511 {
512 sal_uInt16 nOldSubType = pField->GetSubType();
513 const_cast<SwField*>(pField)->SetSubType(nsSwExtendedSubType::SUB_CMD);
514 sText = pField->ExpandField(true, rSh.GetLayout());
515 const_cast<SwField*>(pField)->SetSubType(nOldSubType);
516 }
517 break;
518
520 {
521 break;
522 }
523 case SwFieldIds::Input: // BubbleHelp, because the suggestion could be quite long
524 bBalloon = true;
525 [[fallthrough]];
528 sText = pField->GetPar2();
529 break;
530
532 sText = pField->GetFieldName();
533 break;
534
535 case SwFieldIds::User:
536 {
537 OUString aTitle = pField->GetTitle();
538 if (!aTitle.isEmpty())
539 {
540 sText = aTitle;
541 }
542 else
543 {
544 sText = pField->GetPar1();
545 }
546 break;
547 }
549 sText = pField->GetPar1();
550 break;
551
553 break;
554
556 sText = static_cast<const SwMacroField*>(pField)->GetMacro();
557 break;
558
560 {
561 // #i85090#
562 const SwGetRefField* pRefField( dynamic_cast<const SwGetRefField*>(pField) );
563 OSL_ENSURE( pRefField,
564 "<SwEditWin::RequestHelp(..)> - unexpected type of <pField>" );
565 if ( pRefField )
566 {
567 if ( pRefField->IsRefToHeadingCrossRefBookmark() ||
568 pRefField->IsRefToNumItemCrossRefBookmark() )
569 {
570 sText = pRefField->GetExpandedTextOfReferencedTextNode(*rSh.GetLayout());
571 if ( sText.getLength() > 80 )
572 {
573 sText = OUString::Concat(sText.subView(0, 80)) + "...";
574 }
575 }
576 else
577 {
578 sText = pRefField->GetSetRefName();
579 }
580 }
581 break;
582 }
584 {
585 const auto pAuthorityField = static_cast<const SwAuthorityField*>(pField);
586 sText = pAuthorityField->GetAuthority(rSh.GetLayout());
587
588 if (auto t = pAuthorityField->GetTargetType();
589 t == SwAuthorityField::TargetType::UseDisplayURL
590 || t == SwAuthorityField::TargetType::UseTargetURL)
591 {
592 const OUString& rURL = pAuthorityField->GetAbsoluteURL();
593 sText += "\n" + SfxHelp::GetURLHelpText(rURL);
594 }
595
596 break;
597 }
598
599 default: break;
600 }
601 }
602
603 if( sText.isEmpty() )
604 {
606 const bool bShowInlineTooltips = rSh.GetViewOptions()->IsShowInlineTooltips();
607 if ( bShowTrackChanges && bShowInlineTooltips )
608 {
609 aContentAtPos.eContentAtPos = IsAttrAtPos::Redline;
610 if( rSh.GetContentAtPos( aPos, aContentAtPos, false, &aFieldRect ) )
611 sText = lcl_GetRedlineHelp(*aContentAtPos.aFnd.pRedl, bBalloon, /*bTableChange=*/false, /*bTableColChange=*/false);
612 }
613 }
614 }
615 }
616 if (!sText.isEmpty())
617 {
618 tools::Rectangle aRect( aFieldRect.SVRect() );
620 aRect.SetLeft( aPt.X() );
621 aRect.SetTop( aPt.Y() );
623 aRect.SetRight( aPt.X() );
624 aRect.SetBottom( aPt.Y() );
625
626 // tdf#136336 ensure tooltip area surrounds the current mouse position with at least a pixel margin
627 aRect.Union(tools::Rectangle(rEvt.GetMousePosPixel(), Size(1, 1)));
628 aRect.AdjustLeft(-1);
629 aRect.AdjustRight(1);
630 aRect.AdjustTop(-1);
631 aRect.AdjustBottom(1);
632
633 if( bBalloon )
634 Help::ShowBalloon( this, rEvt.GetMousePosPixel(), aRect, sText );
635 else
636 {
637 // the show the help
638 OUString sDisplayText(ClipLongToolTip(sText));
639 Help::ShowQuickHelp(this, aRect, sDisplayText, nStyle);
640 }
641 }
642
643 bContinue = false;
644 }
645
646 }
647
648 if( bContinue )
649 Window::RequestHelp( rEvt );
650}
651
653{
654 if (SwWrtShell* pWrtShell = GetView().GetWrtShellPtr())
655 pWrtShell->PrePaint();
656}
657
658void SwEditWin::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
659{
660 SwWrtShell* pWrtShell = GetView().GetWrtShellPtr();
661 if(!pWrtShell)
662 return;
663
664 if ( GetView().GetVisArea().GetWidth() <= 0 ||
665 GetView().GetVisArea().GetHeight() <= 0 )
666 Invalidate( rRect );
667 else
668 {
669 pWrtShell->setOutputToWindow(true);
670 bool bTiledPainting = false;
672 {
675 }
676 pWrtShell->Paint(rRenderContext, rRect);
678 {
680 }
681 pWrtShell->setOutputToWindow(false);
682 }
683}
684
685/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
PropertiesInfo aProperties
XPropertyListType t
HelpEventMode GetMode() const
const Point & GetMousePosPixel() const
static void ShowQuickHelp(vcl::Window *pParent, const tools::Rectangle &rScreenRect, const OUString &rHelpText, QuickHelpFlags nStyle=QuickHelpFlags::NONE)
static void ShowBalloon(vcl::Window *pParent, const Point &rScreenPos, const tools::Rectangle &, const OUString &rHelpText)
wrapper iterator: wraps iterator of implementation while hiding MarkBase class; only IMark instances ...
Provides access to the marks of a document.
virtual const_iterator_t findBookmark(const OUString &rMark) const =0
Finds a bookmark by name.
static SW_DLLPUBLIC MarkType GetType(const ::sw::mark::IMark &rMark)
Returns the MarkType used to create the mark.
Definition: docbm.cxx:502
virtual const_iterator_t getBookmarksEnd() const =0
returns a STL-like random access iterator to the end of the sequence of IBookmarks.
static bool IsShowChanges(const RedlineFlags eM)
virtual RedlineFlags GetRedlineFlags() const =0
Query the currently set redline mode.
OUString GetEllipsisString(const OUString &rStr, tools::Long nMaxWidth, DrawTextFlags nStyle=DrawTextFlags::EndEllipsis) const
constexpr tools::Long Y() const
constexpr tools::Long X() const
SdrPage * GetPage() const
SdrPageView * GetSdrPageView() const
static OUString GetURLHelpText(std::u16string_view)
bool IsReadOnly() const
StylesHighlighterColorMap & GetStylesHighlighterCharColorMap()
StylesHighlighterColorMap & GetStylesHighlighterParaColorMap()
Represents an inserted bibliography entry, created using Insert -> Table of Contents and Index -> Bib...
Definition: authfld.hxx:161
OUString GetAuthority(const SwRootFrame *pLayout, const SwForm *pTOX=nullptr) const
Returns the line matching the source's default row in the ToX.
Definition: authfld.cxx:567
SwContentFrame is the layout for content nodes: a common base class for text (paragraph) and non-text...
Definition: cntfrm.hxx:59
const SwContentFrame * GetFollow() const
Definition: cntfrm.hxx:136
void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
Definition: crsrsh.cxx:1711
bool GetContentAtPos(const Point &rPt, SwContentAtPos &rContentAtPos, bool bSetCursor=false, SwRect *pFieldRect=nullptr)
Definition: crstrvl.cxx:1433
SwDPage is Writer's draw page: derives from SdrPage, but has a reference to the Writer document via S...
Definition: dpage.hxx:34
bool RequestHelp(vcl::Window *pWindow, SdrView const *pView, const HelpEvent &rEvt)
Definition: dpage.cxx:145
SwDoc * GetDoc()
returns Doc. But be careful!
Definition: docsh.hxx:204
SwNodes & GetNodes()
Definition: doc.hxx:422
static bool HasParagraphDirectFormatting(const SwPosition &rPos)
Definition: doc.cxx:1869
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
Definition: doc.cxx:349
SwView & m_rView
Definition: edtwin.hxx:99
virtual void PrePaint(vcl::RenderContext &rRenderContext) override
Definition: edtwin2.cxx:652
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:301
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
Definition: edtwin2.cxx:658
const SwView & GetView() const
Definition: edtwin.hxx:246
virtual void RequestHelp(const HelpEvent &rEvt) override
Definition: edtwin2.cxx:312
Base class of all fields.
Definition: fldbas.hxx:296
virtual OUString GetPar1() const
Definition: fldbas.cxx:334
virtual sal_uInt16 GetSubType() const
Definition: fldbas.cxx:355
OUString ExpandField(bool bCached, SwRootFrame const *pLayout) const
expand the field.
Definition: fldbas.cxx:491
virtual OUString GetFieldName() const
get name or content
Definition: fldbas.cxx:318
SwFieldIds Which() const
ResId.
Definition: fldbas.cxx:263
virtual OUString GetPar2() const
Definition: fldbas.cxx:339
const OUString & GetTitle() const
Definition: fldbas.hxx:398
SfxPoolItem subclass for footnotes and endnotes, stored in the anchor text node.
Definition: fmtftn.hxx:47
bool IsEndNote() const
Definition: fmtftn.hxx:75
OUString GetFootnoteText(SwRootFrame const &rLayout) const
Definition: atrftn.cxx:191
const SwRect & getFrameArea() const
Definition: frame.hxx:179
bool IsRightToLeft() const
Definition: frame.hxx:993
bool IsRefToNumItemCrossRefBookmark() const
Definition: reffld.cxx:386
bool IsRefToHeadingCrossRefBookmark() const
Definition: reffld.cxx:380
OUString GetExpandedTextOfReferencedTextNode(SwRootFrame const &rLayout) const
Definition: reffld.cxx:413
const OUString & GetSetRefName() const
Definition: reffld.hxx:109
bool IsHideFieldTips() const
Definition: modcfg.hxx:377
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:901
const OUString & GetComment(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1985
OUString const & GetAuthorString(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1965
bool IsMoved() const
Definition: redline.hxx:282
const DateTime & GetTimeStamp(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1970
RedlineType GetType(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1975
Of course Writer needs its own rectangles.
Definition: swrect.hxx:35
void Right(const tools::Long nRight)
Definition: swrect.hxx:202
void AddLeft(const tools::Long nAdd)
Definition: swrect.cxx:125
bool Contains(const Point &rPOINT) const
Definition: swrect.hxx:356
void AddRight(const tools::Long nAdd)
Definition: swrect.cxx:127
tools::Rectangle SVRect() const
Definition: swrect.hxx:292
void Left(const tools::Long nLeft)
Definition: swrect.hxx:197
virtual bool GetModelPositionForViewPoint(SwPosition *, Point &, SwCursorMoveState *=nullptr, bool bTestBackground=false) const override
Primary passes the call to the first page.
Definition: trvlfrm.cxx:425
static const OUString & GetUIName(const OUString &rName, SwGetPoolIdFromName)
const OUString & GetTypeName() const
Definition: tox.hxx:690
double GetValue() const
Definition: cellatr.hxx:112
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:112
const SfxItemPropertySet * GetPropertySet(sal_uInt16 PropertyId)
Definition: unomap1.cxx:1111
bool IsShowContentTips() const
Definition: viewopt.hxx:703
bool IsShowInlineTooltips() const
Definition: viewopt.hxx:446
const SwViewOption * GetViewOptions() const
Definition: viewsh.hxx:452
void setOutputToWindow(bool bOutputToWindow)
Definition: viewsh.cxx:147
const IDocumentMarkAccess * getIDocumentMarkAccess() const
Provides access to the document bookmark interface.
Definition: viewsh.cxx:2821
SwRootFrame * GetLayout() const
Definition: viewsh.cxx:2163
vcl::Window * GetWin() const
Definition: viewsh.hxx:364
SwDoc * GetDoc() const
Definition: viewsh.hxx:308
SdrView * GetDrawView()
Definition: vnew.cxx:386
Definition: view.hxx:146
SwWrtShell & GetWrtShell() const
Definition: view.hxx:423
bool IsHighlightCharDF()
Definition: view.hxx:718
SwWrtShell * GetWrtShellPtr() const
Definition: view.hxx:424
SwDocShell * GetDocShell()
Definition: view.cxx:1193
Used by the UI to modify the document model.
Definition: wrtsh.hxx:97
const SwView & GetView() const
Definition: wrtsh.hxx:443
static rtl::Reference< SwXTextRange > CreateXTextRange(SwDoc &rDoc, const SwPosition &rPos, const SwPosition *const pMark)
Definition: unoobj2.cxx:1221
constexpr tools::Long GetWidth() const
constexpr void SetLeft(tools::Long v)
constexpr void SetTop(tools::Long v)
constexpr Point TopLeft() const
constexpr void SetRight(tools::Long v)
tools::Long AdjustTop(tools::Long nVertMoveDelta)
tools::Long AdjustRight(tools::Long nHorzMoveDelta)
constexpr void SetBottom(tools::Long v)
constexpr Point BottomRight() const
tools::Rectangle & Union(const tools::Rectangle &rRect)
tools::Long AdjustBottom(tools::Long nVertMoveDelta)
tools::Long AdjustLeft(tools::Long nHorzMoveDelta)
OUString GetName() const
Point OutputToScreenPixel(const Point &rPos) const
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
Point LogicToPixel(const Point &rLogicPt) const
tools::Rectangle GetDesktopRectPixel() const
::OutputDevice const * GetOutDev() const
Point PixelToLogic(const Point &rDevicePt) const
void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
Point ScreenToOutputPixel(const Point &rPos) const
@ CurrAttrs
only for debugging
@ TableBoxValue
only for debugging
float u
static OUString lcl_GetRedlineHelp(const SwRangeRedline &rRedl, bool bBalloon, bool bTableChange, bool bTableColChange)
Definition: edtwin2.cxx:256
@ Database
For old documents the Field-Which IDs must be preserved !!!
@ TableOfAuthorities
QuickHelpFlags
constexpr sal_uInt16 KEY_MOD1
constexpr sal_uInt16 KEY_SPACE
OUString sSuffix
ExpandMode
Some helpers for converting model strings to view strings.
SVL_DLLPUBLIC OUString removePassword(OUString const &rURI, INetURLObject::EncodeMechanism eEncodeMechanism, INetURLObject::DecodeMechanism eDecodeMechanism=INetURLObject::DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
void setTiledPainting(bool bTiledPainting)
int i
const SwExtendedSubType SUB_CMD
Show command.
Definition: fldbas.hxx:216
OUString GetExpandTextMerged(SwRootFrame const *const pLayout, SwTextNode const &rNode, bool const bWithNumber, bool const bWithSpacesForLevel, ExpandMode const i_mode)
long Long
const char GetValue[]
union SwContentAtPos::@21 aFnd
const SwRangeRedline * pRedl
Definition: crsrsh.hxx:108
const SfxPoolItem * pAttr
Definition: crsrsh.hxx:107
bool IsInRTLText() const
Definition: crstrvl.cxx:2163
OUString sStr
Definition: crsrsh.hxx:114
const SwField * pField
Definition: crsrsh.hxx:106
const SwTextAttr * pFndTextAttr
Definition: crsrsh.hxx:115
IsAttrAtPos eContentAtPos
Definition: crsrsh.hxx:112
Marks a position in the document model.
Definition: pam.hxx:38
OUString SwResId(TranslateId aId)
Definition: swmodule.cxx:168
#define SW_MOD()
Definition: swmodule.hxx:254
const sal_Unicode cMarkSeparator
Definition: swtypes.hxx:124
OUString GetAppLangDateTimeString(const DateTime &)
Definition: uitool.cxx:863
SwUnoPropertyMapProvider aSwMapProvider
Definition: unomap1.cxx:88
#define PROPERTY_MAP_CHAR_AUTO_STYLE
Definition: unomap.hxx:120
constexpr OUStringLiteral UNO_NAME_SORTED_TEXT_ID
Definition: unoprnms.hxx:424
constexpr OUStringLiteral UNO_NAME_PARA_IS_NUMBERING_RESTART
Definition: unoprnms.hxx:527
constexpr OUStringLiteral UNO_NAME_CHAR_COLOR_THEME
constexpr OUStringLiteral UNO_NAME_NUMBERING_IS_NUMBER
Definition: unoprnms.hxx:169
constexpr OUStringLiteral UNO_NAME_PARA_CONDITIONAL_STYLE_NAME
Definition: unoprnms.hxx:498
constexpr OUStringLiteral UNO_NAME_PARA_STYLE_NAME
Definition: unoprnms.hxx:193
constexpr OUStringLiteral UNO_NAME_CHAR_COLOR_TINT_OR_SHADE
constexpr OUStringLiteral UNO_NAME_RSID
Definition: unoprnms.hxx:857
constexpr OUStringLiteral UNO_NAME_NUMBERING_LEVEL
constexpr OUStringLiteral UNO_NAME_PAGE_STYLE_NAME
Definition: unoprnms.hxx:189
constexpr OUStringLiteral UNO_NAME_NUMBERING_START_VALUE
Definition: unoprnms.hxx:168
constexpr OUStringLiteral UNO_NAME_PARA_CONTINUEING_PREVIOUS_SUB_TREE
Definition: unoprnms.hxx:840
constexpr OUStringLiteral UNO_NAME_PARRSID
Definition: unoprnms.hxx:858
constexpr OUStringLiteral UNO_NAME_CHAR_STYLE_NAME