LibreOffice Module sw (master) 1
unoflatpara.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 <unobaseclass.hxx>
21#include <unocrsrhelper.hxx>
22#include <unoflatpara.hxx>
23
24#include <o3tl/safeint.hxx>
25#include <utility>
26#include <vcl/svapp.hxx>
27#include <com/sun/star/text/TextMarkupType.hpp>
28#include <com/sun/star/beans/PropertyAttribute.hpp>
29#include <unotextmarkup.hxx>
30#include <ndtxt.hxx>
31#include <doc.hxx>
34#include <viewsh.hxx>
35#include <viewimp.hxx>
36#include <breakit.hxx>
37#include <pam.hxx>
38#include <unotextrange.hxx>
39#include <pagefrm.hxx>
40#include <cntfrm.hxx>
41#include <txtfrm.hxx>
42#include <rootfrm.hxx>
43#include <poolfmt.hxx>
44#include <pagedesc.hxx>
45#include <GrammarContact.hxx>
46#include <viewopt.hxx>
50#include <sal/log.hxx>
51
52#include <com/sun/star/lang/XUnoTunnel.hpp>
53#include <com/sun/star/text/XTextRange.hpp>
54
55using namespace ::com::sun::star;
56
57namespace SwUnoCursorHelper {
58
59uno::Reference<text::XFlatParagraphIterator>
60CreateFlatParagraphIterator(SwDoc & rDoc, sal_Int32 const nTextMarkupType,
61 bool const bAutomatic)
62{
63 return new SwXFlatParagraphIterator(rDoc, nTextMarkupType, bAutomatic);
64}
65
66}
67
68SwXFlatParagraph::SwXFlatParagraph( SwTextNode& rTextNode, OUString aExpandText, const ModelToViewHelper& rMap )
69 : SwXFlatParagraph_Base(& rTextNode, rMap)
70 , maExpandText(std::move(aExpandText))
71{
72}
73
75{
76}
77
78
79// XPropertySet
80uno::Reference< beans::XPropertySetInfo > SAL_CALL
82{
83 static const comphelper::PropertyMapEntry s_Entries[] = {
84 { OUString("FieldPositions"), -1, ::cppu::UnoType<uno::Sequence<sal_Int32>>::get(), beans::PropertyAttribute::READONLY, 0 },
85 { OUString("FootnotePositions"), -1, ::cppu::UnoType<uno::Sequence<sal_Int32>>::get(), beans::PropertyAttribute::READONLY, 0 },
86 { OUString("SortedTextId"), -1, ::cppu::UnoType<sal_Int32>::get(), beans::PropertyAttribute::READONLY, 0 },
87 { OUString("DocumentElementsCount"), -1, ::cppu::UnoType<sal_Int32>::get(), beans::PropertyAttribute::READONLY, 0 },
88 };
89 return new comphelper::PropertySetInfo(s_Entries);
90}
91
92void SAL_CALL
94{
95 throw lang::IllegalArgumentException("no values can be set",
96 static_cast< ::cppu::OWeakObject*>(this), 0);
97}
98
99uno::Any SAL_CALL
100SwXFlatParagraph::getPropertyValue(const OUString& rPropertyName)
101{
103
104 if (rPropertyName == "FieldPositions")
105 {
106 return uno::Any( comphelper::containerToSequence( GetConversionMap().getFieldPositions() ) );
107 }
108 else if (rPropertyName == "FootnotePositions")
109 {
110 return uno::Any( comphelper::containerToSequence( GetConversionMap().getFootnotePositions() ) );
111 }
112 else if (rPropertyName == "SortedTextId")
113 {
114 SwTextNode const*const pCurrentNode = GetTextNode();
115 sal_Int32 nIndex = -1;
116 if ( pCurrentNode )
117 nIndex = pCurrentNode->GetIndex().get();
118 return uno::Any( nIndex );
119 }
120 else if (rPropertyName == "DocumentElementsCount")
121 {
122 SwTextNode const*const pCurrentNode = GetTextNode();
123 sal_Int32 nCount = -1;
124 if ( pCurrentNode )
125 nCount = pCurrentNode->GetDoc().GetNodes().Count().get();
126 return uno::Any( nCount );
127 }
128 return uno::Any();
129}
130
131void SAL_CALL
133 const OUString& /*rPropertyName*/,
134 const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/)
135{
136 SAL_WARN("sw.uno",
137 "SwXFlatParagraph::addPropertyChangeListener(): not implemented");
138}
139
140void SAL_CALL
142 const OUString& /*rPropertyName*/,
143 const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/)
144{
145 SAL_WARN("sw.uno",
146 "SwXFlatParagraph::removePropertyChangeListener(): not implemented");
147}
148
149void SAL_CALL
151 const OUString& /*rPropertyName*/,
152 const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/)
153{
154 SAL_WARN("sw.uno",
155 "SwXFlatParagraph::addVetoableChangeListener(): not implemented");
156}
157
158void SAL_CALL
160 const OUString& /*rPropertyName*/,
161 const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/)
162{
163 SAL_WARN("sw.uno",
164 "SwXFlatParagraph::removeVetoableChangeListener(): not implemented");
165}
166
167
168css::uno::Reference< css::container::XStringKeyMap > SAL_CALL SwXFlatParagraph::getMarkupInfoContainer()
169{
171}
172
173void SAL_CALL SwXFlatParagraph::commitTextRangeMarkup(::sal_Int32 nType, const OUString & aIdentifier, const uno::Reference< text::XTextRange> & xRange,
174 const css::uno::Reference< css::container::XStringKeyMap > & xMarkupInfoContainer)
175{
176 SolarMutexGuard aGuard;
177 SwXTextMarkup::commitTextRangeMarkup( nType, aIdentifier, xRange, xMarkupInfoContainer );
178}
179
180void SAL_CALL SwXFlatParagraph::commitStringMarkup(::sal_Int32 nType, const OUString & rIdentifier, ::sal_Int32 nStart, ::sal_Int32 nLength, const css::uno::Reference< css::container::XStringKeyMap > & rxMarkupInfoContainer)
181{
182 SolarMutexGuard aGuard;
183 SwXTextMarkup::commitStringMarkup( nType, rIdentifier, nStart, nLength, rxMarkupInfoContainer );
184}
185
186// text::XFlatParagraph:
187OUString SAL_CALL SwXFlatParagraph::getText()
188{
189 return maExpandText;
190}
191
192// text::XFlatParagraph:
193void SAL_CALL SwXFlatParagraph::setChecked( ::sal_Int32 nType, sal_Bool bVal )
194{
195 SolarMutexGuard aGuard;
196
197 if (!GetTextNode())
198 return;
199
200 if ( text::TextMarkupType::SPELLCHECK == nType )
201 {
204 }
205 else if ( text::TextMarkupType::SMARTTAG == nType )
206 GetTextNode()->SetSmartTagDirty( !bVal );
207 else if( text::TextMarkupType::PROOFREADING == nType )
208 {
210 if( bVal )
212 }
213}
214
215// text::XFlatParagraph:
216sal_Bool SAL_CALL SwXFlatParagraph::isChecked( ::sal_Int32 nType )
217{
218 SolarMutexGuard aGuard;
219 if (GetTextNode())
220 {
221 if ( text::TextMarkupType::SPELLCHECK == nType )
222 return !GetTextNode()->IsWrongDirty();
223 else if ( text::TextMarkupType::PROOFREADING == nType )
224 return !GetTextNode()->IsGrammarCheckDirty();
225 else if ( text::TextMarkupType::SMARTTAG == nType )
226 return !GetTextNode()->IsSmartTagDirty();
227 }
228
229 return true;
230}
231
232// text::XFlatParagraph:
234{
235 SolarMutexGuard aGuard;
236 return nullptr == GetTextNode();
237}
238
239// text::XFlatParagraph:
240lang::Locale SAL_CALL SwXFlatParagraph::getLanguageOfText(::sal_Int32 nPos, ::sal_Int32 nLen)
241{
242 SolarMutexGuard aGuard;
243 if (!GetTextNode())
245
246 const lang::Locale aLocale( SW_BREAKITER()->GetLocale( GetTextNode()->GetLang(nPos, nLen) ) );
247 return aLocale;
248}
249
250// text::XFlatParagraph:
251lang::Locale SAL_CALL SwXFlatParagraph::getPrimaryLanguageOfText(::sal_Int32 nPos, ::sal_Int32 nLen)
252{
253 SolarMutexGuard aGuard;
254
255 if (!GetTextNode())
257
258 const lang::Locale aLocale( SW_BREAKITER()->GetLocale( GetTextNode()->GetLang(nPos, nLen) ) );
259 return aLocale;
260}
261
262// text::XFlatParagraph:
263void SAL_CALL SwXFlatParagraph::changeText(::sal_Int32 nPos, ::sal_Int32 nLen, const OUString & aNewText, const css::uno::Sequence< css::beans::PropertyValue > & aAttributes)
264{
265 SolarMutexGuard aGuard;
266
267 if (!GetTextNode())
268 return;
269
270 SwTextNode *const pOldTextNode = GetTextNode();
271
272 if (nPos < 0 || pOldTextNode->Len() < nPos || nLen < 0 || o3tl::make_unsigned(pOldTextNode->Len()) < static_cast<sal_uInt32>(nPos) + nLen)
273 {
274 throw lang::IllegalArgumentException();
275 }
276
277 SwPaM aPaM( *GetTextNode(), nPos, *GetTextNode(), nPos+nLen );
278
279 UnoActionContext aAction( &GetTextNode()->GetDoc() );
280
281 const rtl::Reference<SwXTextRange> xRange =
283 GetTextNode()->GetDoc(), *aPaM.GetPoint(), aPaM.GetMark() );
284 if ( xRange.is() )
285 {
286 for ( const auto& rAttribute : aAttributes )
287 xRange->setPropertyValue( rAttribute.Name, rAttribute.Value );
288 }
289
291 rIDCO.ReplaceRange( aPaM, aNewText, false );
292
293 ClearTextNode(); // TODO: is this really needed?
294}
295
296// text::XFlatParagraph:
297void SAL_CALL SwXFlatParagraph::changeAttributes(::sal_Int32 nPos, ::sal_Int32 nLen, const css::uno::Sequence< css::beans::PropertyValue > & aAttributes)
298{
299 SolarMutexGuard aGuard;
300
301 if (!GetTextNode())
302 return;
303
304 if (nPos < 0 || GetTextNode()->Len() < nPos || nLen < 0 || o3tl::make_unsigned(GetTextNode()->Len()) < static_cast<sal_uInt32>(nPos) + nLen)
305 {
306 throw lang::IllegalArgumentException();
307 }
308
309 SwPaM aPaM( *GetTextNode(), nPos, *GetTextNode(), nPos+nLen );
310
311 UnoActionContext aAction( &GetTextNode()->GetDoc() );
312
313 const rtl::Reference<SwXTextRange> xRange =
315 GetTextNode()->GetDoc(), *aPaM.GetPoint(), aPaM.GetMark() );
316 if ( xRange.is() )
317 {
318 for ( const auto& rAttribute : aAttributes )
319 xRange->setPropertyValue( rAttribute.Name, rAttribute.Value );
320 }
321
322 ClearTextNode(); // TODO: is this really needed?
323}
324
325// text::XFlatParagraph:
326css::uno::Sequence< ::sal_Int32 > SAL_CALL SwXFlatParagraph::getLanguagePortions()
327{
328 return css::uno::Sequence< ::sal_Int32>();
329}
330
331SwXFlatParagraphIterator::SwXFlatParagraphIterator( SwDoc& rDoc, sal_Int32 nType, bool bAutomatic )
332 : mpDoc( &rDoc ),
333 mnType( nType ),
334 mbAutomatic( bAutomatic ),
335 mnCurrentNode( 0 ),
336 mnEndNode( rDoc.GetNodes().Count() )
337{
338 //mnStartNode = mnCurrentNode = get node from current cursor TODO!
339
340 // register as listener and get notified when document is closed
342}
343
345{
346 SolarMutexGuard aGuard;
348}
349
351{
352 if(rHint.GetId() == SfxHintId::Dying)
353 {
354 SolarMutexGuard aGuard;
355 mpDoc = nullptr;
356 }
357}
358
359uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getFirstPara()
360{
361 return getNextPara(); // TODO
362}
363
364uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getNextPara()
365{
366 SolarMutexGuard aGuard;
367
368 uno::Reference< text::XFlatParagraph > xRet;
369 if (!mpDoc)
370 return xRet;
371
372 SwTextNode* pRet = nullptr;
373 if ( mbAutomatic )
374 {
376
377 SwPageFrame* pCurrentPage = pViewShell ? pViewShell->Imp()->GetFirstVisPage(pViewShell->GetOut()) : nullptr;
378 SwPageFrame* pStartPage = pCurrentPage;
379 SwPageFrame* pStopPage = nullptr;
380
381 while ( pCurrentPage && pCurrentPage != pStopPage )
382 {
383 if (mnType != text::TextMarkupType::SPELLCHECK || pCurrentPage->IsInvalidSpelling() )
384 {
385 // this method is supposed to return an empty paragraph in case Online Checking is disabled
386 if ( ( mnType == text::TextMarkupType::PROOFREADING || mnType == text::TextMarkupType::SPELLCHECK )
387 && !pViewShell->GetViewOptions()->IsOnlineSpell() )
388 return xRet;
389
390 // search for invalid content:
391 SwContentFrame* pCnt = pCurrentPage->ContainsContent();
392
393 while( pCnt && pCurrentPage->IsAnLower( pCnt ) )
394 {
395 if (pCnt->IsTextFrame())
396 {
397 SwTextFrame const*const pText(static_cast<SwTextFrame const*>(pCnt));
398 if (sw::MergedPara const*const pMergedPara = pText->GetMergedPara()
399 )
400 {
401 SwTextNode * pTextNode(nullptr);
402 for (auto const& e : pMergedPara->extents)
403 {
404 if (e.pNode != pTextNode)
405 {
406 pTextNode = e.pNode;
407 if ((mnType == text::TextMarkupType::SPELLCHECK
408 && pTextNode->IsWrongDirty()) ||
409 (mnType == text::TextMarkupType::PROOFREADING
410 && pTextNode->IsGrammarCheckDirty()))
411 {
412 pRet = pTextNode;
413 break;
414 }
415 }
416 }
417 }
418 else
419 {
420 SwTextNode const*const pTextNode(pText->GetTextNodeFirst());
421 if ((mnType == text::TextMarkupType::SPELLCHECK
422 && pTextNode->IsWrongDirty()) ||
423 (mnType == text::TextMarkupType::PROOFREADING
424 && pTextNode->IsGrammarCheckDirty()))
425
426 {
427 pRet = const_cast<SwTextNode*>(pTextNode);
428 }
429 }
430
431 if (pRet)
432 {
433 break;
434 }
435 }
436
437 pCnt = pCnt->GetNextContentFrame();
438 }
439 }
440
441 if ( pRet )
442 break;
443
444 // if there is no invalid text node on the current page,
445 // we validate the page
446 pCurrentPage->ValidateSpelling();
447
448 // proceed with next page, wrap at end of document if required:
449 pCurrentPage = static_cast<SwPageFrame*>(pCurrentPage->GetNext());
450
451 if ( !pCurrentPage && !pStopPage )
452 {
453 pStopPage = pStartPage;
454 pCurrentPage = static_cast<SwPageFrame*>(pViewShell->GetLayout()->Lower());
455 }
456 }
457 }
458 else // non-automatic checking
459 {
460 const SwNodes& rNodes = mpDoc->GetNodes();
461 const SwNodeOffset nMaxNodes = rNodes.Count();
462
463 while ( mnCurrentNode < mnEndNode && mnCurrentNode < nMaxNodes )
464 {
465 SwNode* pNd = rNodes[ mnCurrentNode ];
466
468
469 pRet = pNd->GetTextNode();
470 if ( pRet )
471 break;
472
473 if ( mnCurrentNode == mnEndNode )
474 {
477 }
478 }
479 }
480
481 if ( pRet )
482 {
483 // Expand the string:
484 const ModelToViewHelper aConversionMap(*pRet, mpDoc->getIDocumentLayoutAccess().GetCurrentLayout());
485 const OUString& aExpandText = aConversionMap.getViewText();
486
487 xRet = new SwXFlatParagraph( *pRet, aExpandText, aConversionMap );
488 }
489
490 return xRet;
491}
492
493uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getLastPara()
494{
495 return getNextPara();
496}
497
498uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getParaAfter(const uno::Reference< text::XFlatParagraph > & xPara)
499{
500 SolarMutexGuard aGuard;
501
502 uno::Reference< text::XFlatParagraph > xRet;
503 if (!mpDoc)
504 return xRet;
505
506 SwXFlatParagraph* const pFlatParagraph(dynamic_cast<SwXFlatParagraph*>(xPara.get()));
507 SAL_WARN_IF(!pFlatParagraph, "sw.core", "invalid argument");
508 if ( !pFlatParagraph )
509 return xRet;
510
511 SwTextNode const*const pCurrentNode = pFlatParagraph->GetTextNode();
512
513 if ( !pCurrentNode )
514 return xRet;
515
516 SwTextNode* pNextTextNode = nullptr;
517 const SwNodes& rNodes = pCurrentNode->GetDoc().GetNodes();
518
519 for( SwNodeOffset nCurrentNode = pCurrentNode->GetIndex() + 1; nCurrentNode < rNodes.Count(); ++nCurrentNode )
520 {
521 SwNode* pNd = rNodes[ nCurrentNode ];
522 pNextTextNode = pNd->GetTextNode();
523 if ( pNextTextNode )
524 break;
525 }
526
527 if ( pNextTextNode )
528 {
529 // Expand the string:
530 const ModelToViewHelper aConversionMap(*pNextTextNode, mpDoc->getIDocumentLayoutAccess().GetCurrentLayout());
531 const OUString& aExpandText = aConversionMap.getViewText();
532
533 xRet = new SwXFlatParagraph( *pNextTextNode, aExpandText, aConversionMap );
534 }
535
536 return xRet;
537}
538
539uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getParaBefore(const uno::Reference< text::XFlatParagraph > & xPara )
540{
541 SolarMutexGuard aGuard;
542
543 uno::Reference< text::XFlatParagraph > xRet;
544 if (!mpDoc)
545 return xRet;
546
547 SwXFlatParagraph* const pFlatParagraph(dynamic_cast<SwXFlatParagraph*>(xPara.get()));
548 SAL_WARN_IF(!pFlatParagraph, "sw.core", "invalid argument");
549 if ( !pFlatParagraph )
550 return xRet;
551
552 SwTextNode const*const pCurrentNode = pFlatParagraph->GetTextNode();
553
554 if ( !pCurrentNode )
555 return xRet;
556
557 SwTextNode* pPrevTextNode = nullptr;
558 const SwNodes& rNodes = pCurrentNode->GetDoc().GetNodes();
559
560 for( SwNodeOffset nCurrentNode = pCurrentNode->GetIndex() - 1; nCurrentNode > SwNodeOffset(0); --nCurrentNode )
561 {
562 SwNode* pNd = rNodes[ nCurrentNode ];
563 pPrevTextNode = pNd->GetTextNode();
564 if ( pPrevTextNode )
565 break;
566 }
567
568 if ( pPrevTextNode )
569 {
570 // Expand the string:
571 const ModelToViewHelper aConversionMap(*pPrevTextNode, mpDoc->getIDocumentLayoutAccess().GetCurrentLayout());
572 const OUString& aExpandText = aConversionMap.getViewText();
573
574 xRet = new SwXFlatParagraph( *pPrevTextNode, aExpandText, aConversionMap );
575 }
576
577 return xRet;
578}
579
580/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define SW_BREAKITER()
Definition: breakit.hxx:122
Text operation/manipulation interface.
virtual bool ReplaceRange(SwPaM &rPam, const OUString &rNewStr, const bool bRegExReplace)=0
Replace selected range in a TextNode with string.
virtual const SwRootFrame * GetCurrentLayout() const =0
virtual const SwViewShell * GetCurrentViewShell() const =0
Returns the layout set at the document.
virtual SwPageDesc * GetPageDescFromPool(sal_uInt16 nId, bool bRegardLanguage=true)=0
Return required automatic page style.
static css::lang::Locale convertToLocale(LanguageType nLangID, bool bResolveSystem=true)
const OUString & getViewText() const
SfxHintId GetId() const
void EndListeningAll()
bool StartListening(SvtBroadcaster &rBroadcaster)
SwContentFrame is the layout for content nodes: a common base class for text (paragraph) and non-text...
Definition: cntfrm.hxx:59
SwContentFrame * GetNextContentFrame() const
Definition: cntfrm.hxx:120
Definition: doc.hxx:197
SwNodes & GetNodes()
Definition: doc.hxx:422
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
Definition: doc.cxx:419
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
Definition: doc.cxx:440
bool IsTextFrame() const
Definition: frame.hxx:1240
SwFrame * GetNext()
Definition: frame.hxx:682
bool IsAnLower(const SwFrame *) const
Definition: findfrm.cxx:233
const SwContentFrame * ContainsContent() const
Checks if the frame contains one or more ContentFrame's anywhere in his subsidiary structure; if so t...
Definition: findfrm.cxx:72
const SwFrame * Lower() const
Definition: layfrm.hxx:101
Base class of the Writer document model elements.
Definition: node.hxx:98
IDocumentContentOperations & getIDocumentContentOperations()
Provides access to the document content operations interface.
Definition: node.cxx:2149
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:901
SwNodeOffset GetIndex() const
Definition: node.hxx:312
SwDoc & GetDoc()
Definition: node.hxx:233
SwNodeOffset Count() const
Definition: ndarr.hxx:142
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:188
const SwPosition * GetMark() const
Definition: pam.hxx:255
const SwPosition * GetPoint() const
Definition: pam.hxx:253
A page of the document layout.
Definition: pagefrm.hxx:60
bool IsInvalidSpelling() const
Definition: pagefrm.hxx:241
void ValidateSpelling() const
Definition: pagefrm.hxx:430
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:168
sw::MergedPara * GetMergedPara()
Definition: txtfrm.hxx:465
SwTextNode * GetTextNodeFirst()
Definition: txtfrm.hxx:472
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:112
void SetWrongDirty(sw::WrongState eNew) const
Definition: txtedt.cxx:2345
virtual sal_Int32 Len() const override
Definition: ndtxt.cxx:291
bool IsSmartTagDirty() const
Definition: txtedt.cxx:2375
bool IsGrammarCheckDirty() const
Definition: txtedt.cxx:2365
void SetGrammarCheckDirty(bool bNew) const
Definition: txtedt.cxx:2360
void SetSmartTagDirty(bool bNew) const
Definition: txtedt.cxx:2370
bool IsWrongDirty() const
Definition: txtedt.cxx:2355
bool IsOnlineSpell() const
Definition: viewopt.hxx:537
const SwPageFrame * GetFirstVisPage(OutputDevice const *pRenderContext) const
Management of the first visible Page.
Definition: viewimp.cxx:315
vcl::RenderContext * GetOut() const
Definition: viewsh.hxx:365
const SwViewOption * GetViewOptions() const
Definition: viewsh.hxx:452
SwViewShellImp * Imp()
Definition: viewsh.hxx:211
SwRootFrame * GetLayout() const
Definition: viewsh.cxx:2163
const sal_Int32 mnType
virtual css::uno::Reference< css::text::XFlatParagraph > SAL_CALL getParaBefore(const css::uno::Reference< css::text::XFlatParagraph > &xPara) override
virtual css::uno::Reference< css::text::XFlatParagraph > SAL_CALL getNextPara() override
virtual ~SwXFlatParagraphIterator() override
virtual void Notify(const SfxHint &) override
virtual css::uno::Reference< css::text::XFlatParagraph > SAL_CALL getParaAfter(const css::uno::Reference< css::text::XFlatParagraph > &xPara) override
virtual css::uno::Reference< css::text::XFlatParagraph > SAL_CALL getFirstPara() override
SwXFlatParagraphIterator(SwDoc &rDoc, sal_Int32 nType, bool bAutomatic)
virtual css::uno::Reference< css::text::XFlatParagraph > SAL_CALL getLastPara() override
virtual ~SwXFlatParagraph() override
Definition: unoflatpara.cxx:74
virtual OUString SAL_CALL getText() override
virtual void SAL_CALL removePropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
virtual void SAL_CALL changeText(::sal_Int32 nPos, ::sal_Int32 nLen, const OUString &aNewText, const css::uno::Sequence< css::beans::PropertyValue > &aAttributes) override
virtual void SAL_CALL addVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
virtual css::uno::Reference< css::container::XStringKeyMap > SAL_CALL getMarkupInfoContainer() override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: unoflatpara.cxx:81
virtual void SAL_CALL addPropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
virtual css::lang::Locale SAL_CALL getPrimaryLanguageOfText(::sal_Int32 nPos, ::sal_Int32 nLen) override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &rPropertyName) override
SwXFlatParagraph(SwTextNode &rTextNode, OUString aExpandText, const ModelToViewHelper &rConversionMap)
Definition: unoflatpara.cxx:68
OUString maExpandText
virtual void SAL_CALL commitStringMarkup(::sal_Int32 nType, const OUString &aIdentifier, ::sal_Int32 nStart, ::sal_Int32 nLength, const css::uno::Reference< css::container::XStringKeyMap > &xMarkupInfoContainer) override
virtual void SAL_CALL removeVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
virtual sal_Bool SAL_CALL isChecked(::sal_Int32 nType) override
virtual void SAL_CALL commitTextRangeMarkup(::sal_Int32 nType, const OUString &aIdentifier, const css::uno::Reference< css::text::XTextRange > &xRange, const css::uno::Reference< css::container::XStringKeyMap > &xMarkupInfoContainer) override
virtual void SAL_CALL setPropertyValue(const OUString &rPropertyName, const css::uno::Any &rValue) override
Definition: unoflatpara.cxx:93
virtual sal_Bool SAL_CALL isModified() override
virtual void SAL_CALL setChecked(::sal_Int32 nType, sal_Bool bVal) override
SwTextNode * GetTextNode()
virtual void SAL_CALL changeAttributes(::sal_Int32 nPos, ::sal_Int32 nLen, const css::uno::Sequence< css::beans::PropertyValue > &aAttributes) override
virtual css::lang::Locale SAL_CALL getLanguageOfText(::sal_Int32 nPos, ::sal_Int32 nLen) override
virtual css::uno::Sequence< ::sal_Int32 > SAL_CALL getLanguagePortions() override
virtual void SAL_CALL commitStringMarkup(::sal_Int32 nType, const OUString &aIdentifier, ::sal_Int32 nStart, ::sal_Int32 nLength, const css::uno::Reference< css::container::XStringKeyMap > &xMarkupInfoContainer) override
virtual css::uno::Reference< css::container::XStringKeyMap > SAL_CALL getMarkupInfoContainer() override
virtual void SAL_CALL commitTextRangeMarkup(::sal_Int32 nType, const OUString &aIdentifier, const css::uno::Reference< css::text::XTextRange > &xRange, const css::uno::Reference< css::container::XStringKeyMap > &xMarkupInfoContainer) override
static rtl::Reference< SwXTextRange > CreateXTextRange(SwDoc &rDoc, const SwPosition &rPos, const SwPosition *const pMark)
Definition: unoobj2.cxx:1221
css::uno::Type const & get()
int nCount
sal_Int32 nIndex
#define LANGUAGE_NONE
sal_uInt16 nPos
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
uno::Reference< text::XFlatParagraphIterator > CreateFlatParagraphIterator(SwDoc &rDoc, sal_Int32 const nTextMarkupType, bool const bAutomatic)
Definition: unoflatpara.cxx:60
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
void finishGrammarCheckFor(SwTextNode &rTextNode)
finishGrammarCheck() calls the same function of the grammar contact of the document (for a given text...
o3tl::strong_int< sal_Int32, struct Tag_SwNodeOffset > SwNodeOffset
Definition: nodeoffset.hxx:16
@ RES_POOLPAGE_STANDARD
Standard page.
Definition: poolfmt.hxx:170
QPRO_FUNC_TYPE nType
sal_Int32 mnType
UNDERLYING_TYPE get() const
Describes parts of multiple text nodes, which will form a text frame, even when redlines are hidden a...
Definition: txtfrm.hxx:991
unsigned char sal_Bool
::cppu::ImplInheritanceHelper< SwXTextMarkup, css::beans::XPropertySet, css::text::XFlatParagraph > SwXFlatParagraph_Base
Definition: unoflatpara.hxx:38
Count
sal_Int32 nLength