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 };
87 return new comphelper::PropertySetInfo(s_Entries);
88}
89
90void SAL_CALL
92{
93 throw lang::IllegalArgumentException("no values can be set",
94 static_cast< ::cppu::OWeakObject*>(this), 0);
95}
96
97uno::Any SAL_CALL
98SwXFlatParagraph::getPropertyValue(const OUString& rPropertyName)
99{
101
102 if (rPropertyName == "FieldPositions")
103 {
104 return uno::Any( comphelper::containerToSequence( GetConversionMap().getFieldPositions() ) );
105 }
106 else if (rPropertyName == "FootnotePositions")
107 {
108 return uno::Any( comphelper::containerToSequence( GetConversionMap().getFootnotePositions() ) );
109 }
110 return uno::Any();
111}
112
113void SAL_CALL
115 const OUString& /*rPropertyName*/,
116 const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/)
117{
118 SAL_WARN("sw.uno",
119 "SwXFlatParagraph::addPropertyChangeListener(): not implemented");
120}
121
122void SAL_CALL
124 const OUString& /*rPropertyName*/,
125 const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/)
126{
127 SAL_WARN("sw.uno",
128 "SwXFlatParagraph::removePropertyChangeListener(): not implemented");
129}
130
131void SAL_CALL
133 const OUString& /*rPropertyName*/,
134 const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/)
135{
136 SAL_WARN("sw.uno",
137 "SwXFlatParagraph::addVetoableChangeListener(): not implemented");
138}
139
140void SAL_CALL
142 const OUString& /*rPropertyName*/,
143 const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/)
144{
145 SAL_WARN("sw.uno",
146 "SwXFlatParagraph::removeVetoableChangeListener(): not implemented");
147}
148
149
150css::uno::Reference< css::container::XStringKeyMap > SAL_CALL SwXFlatParagraph::getMarkupInfoContainer()
151{
153}
154
155void SAL_CALL SwXFlatParagraph::commitTextRangeMarkup(::sal_Int32 nType, const OUString & aIdentifier, const uno::Reference< text::XTextRange> & xRange,
156 const css::uno::Reference< css::container::XStringKeyMap > & xMarkupInfoContainer)
157{
158 SolarMutexGuard aGuard;
159 SwXTextMarkup::commitTextRangeMarkup( nType, aIdentifier, xRange, xMarkupInfoContainer );
160}
161
162void SAL_CALL SwXFlatParagraph::commitStringMarkup(::sal_Int32 nType, const OUString & rIdentifier, ::sal_Int32 nStart, ::sal_Int32 nLength, const css::uno::Reference< css::container::XStringKeyMap > & rxMarkupInfoContainer)
163{
164 SolarMutexGuard aGuard;
165 SwXTextMarkup::commitStringMarkup( nType, rIdentifier, nStart, nLength, rxMarkupInfoContainer );
166}
167
168// text::XFlatParagraph:
169OUString SAL_CALL SwXFlatParagraph::getText()
170{
171 return maExpandText;
172}
173
174// text::XFlatParagraph:
175void SAL_CALL SwXFlatParagraph::setChecked( ::sal_Int32 nType, sal_Bool bVal )
176{
177 SolarMutexGuard aGuard;
178
179 if (!GetTextNode())
180 return;
181
182 if ( text::TextMarkupType::SPELLCHECK == nType )
183 {
186 }
187 else if ( text::TextMarkupType::SMARTTAG == nType )
188 GetTextNode()->SetSmartTagDirty( !bVal );
189 else if( text::TextMarkupType::PROOFREADING == nType )
190 {
192 if( bVal )
194 }
195}
196
197// text::XFlatParagraph:
198sal_Bool SAL_CALL SwXFlatParagraph::isChecked( ::sal_Int32 nType )
199{
200 SolarMutexGuard aGuard;
201 if (GetTextNode())
202 {
203 if ( text::TextMarkupType::SPELLCHECK == nType )
204 return !GetTextNode()->IsWrongDirty();
205 else if ( text::TextMarkupType::PROOFREADING == nType )
206 return !GetTextNode()->IsGrammarCheckDirty();
207 else if ( text::TextMarkupType::SMARTTAG == nType )
208 return !GetTextNode()->IsSmartTagDirty();
209 }
210
211 return true;
212}
213
214// text::XFlatParagraph:
216{
217 SolarMutexGuard aGuard;
218 return nullptr == GetTextNode();
219}
220
221// text::XFlatParagraph:
222lang::Locale SAL_CALL SwXFlatParagraph::getLanguageOfText(::sal_Int32 nPos, ::sal_Int32 nLen)
223{
224 SolarMutexGuard aGuard;
225 if (!GetTextNode())
227
228 const lang::Locale aLocale( SW_BREAKITER()->GetLocale( GetTextNode()->GetLang(nPos, nLen) ) );
229 return aLocale;
230}
231
232// text::XFlatParagraph:
233lang::Locale SAL_CALL SwXFlatParagraph::getPrimaryLanguageOfText(::sal_Int32 nPos, ::sal_Int32 nLen)
234{
235 SolarMutexGuard aGuard;
236
237 if (!GetTextNode())
239
240 const lang::Locale aLocale( SW_BREAKITER()->GetLocale( GetTextNode()->GetLang(nPos, nLen) ) );
241 return aLocale;
242}
243
244// text::XFlatParagraph:
245void SAL_CALL SwXFlatParagraph::changeText(::sal_Int32 nPos, ::sal_Int32 nLen, const OUString & aNewText, const css::uno::Sequence< css::beans::PropertyValue > & aAttributes)
246{
247 SolarMutexGuard aGuard;
248
249 if (!GetTextNode())
250 return;
251
252 SwTextNode *const pOldTextNode = GetTextNode();
253
254 if (nPos < 0 || pOldTextNode->Len() < nPos || nLen < 0 || o3tl::make_unsigned(pOldTextNode->Len()) < static_cast<sal_uInt32>(nPos) + nLen)
255 {
256 throw lang::IllegalArgumentException();
257 }
258
259 SwPaM aPaM( *GetTextNode(), nPos, *GetTextNode(), nPos+nLen );
260
261 UnoActionContext aAction( &GetTextNode()->GetDoc() );
262
263 const rtl::Reference<SwXTextRange> xRange =
265 GetTextNode()->GetDoc(), *aPaM.GetPoint(), aPaM.GetMark() );
266 if ( xRange.is() )
267 {
268 for ( const auto& rAttribute : aAttributes )
269 xRange->setPropertyValue( rAttribute.Name, rAttribute.Value );
270 }
271
273 rIDCO.ReplaceRange( aPaM, aNewText, false );
274
275 ClearTextNode(); // TODO: is this really needed?
276}
277
278// text::XFlatParagraph:
279void SAL_CALL SwXFlatParagraph::changeAttributes(::sal_Int32 nPos, ::sal_Int32 nLen, const css::uno::Sequence< css::beans::PropertyValue > & aAttributes)
280{
281 SolarMutexGuard aGuard;
282
283 if (!GetTextNode())
284 return;
285
286 if (nPos < 0 || GetTextNode()->Len() < nPos || nLen < 0 || o3tl::make_unsigned(GetTextNode()->Len()) < static_cast<sal_uInt32>(nPos) + nLen)
287 {
288 throw lang::IllegalArgumentException();
289 }
290
291 SwPaM aPaM( *GetTextNode(), nPos, *GetTextNode(), nPos+nLen );
292
293 UnoActionContext aAction( &GetTextNode()->GetDoc() );
294
295 const rtl::Reference<SwXTextRange> xRange =
297 GetTextNode()->GetDoc(), *aPaM.GetPoint(), aPaM.GetMark() );
298 if ( xRange.is() )
299 {
300 for ( const auto& rAttribute : aAttributes )
301 xRange->setPropertyValue( rAttribute.Name, rAttribute.Value );
302 }
303
304 ClearTextNode(); // TODO: is this really needed?
305}
306
307// text::XFlatParagraph:
308css::uno::Sequence< ::sal_Int32 > SAL_CALL SwXFlatParagraph::getLanguagePortions()
309{
310 return css::uno::Sequence< ::sal_Int32>();
311}
312
313const uno::Sequence< sal_Int8 >&
315{
316 static const comphelper::UnoIdInit theSwXFlatParagraphUnoTunnelId;
317 return theSwXFlatParagraphUnoTunnelId.getSeq();
318}
319
320sal_Int64 SAL_CALL
322 const uno::Sequence< sal_Int8 >& rId)
323{
324 return comphelper::getSomethingImpl(rId, this);
325}
326
327SwXFlatParagraphIterator::SwXFlatParagraphIterator( SwDoc& rDoc, sal_Int32 nType, bool bAutomatic )
328 : mpDoc( &rDoc ),
329 mnType( nType ),
330 mbAutomatic( bAutomatic ),
331 mnCurrentNode( 0 ),
332 mnEndNode( rDoc.GetNodes().Count() )
333{
334 //mnStartNode = mnCurrentNode = get node from current cursor TODO!
335
336 // register as listener and get notified when document is closed
338}
339
341{
342 SolarMutexGuard aGuard;
344}
345
347{
348 if(rHint.GetId() == SfxHintId::Dying)
349 {
350 SolarMutexGuard aGuard;
351 mpDoc = nullptr;
352 }
353}
354
355uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getFirstPara()
356{
357 return getNextPara(); // TODO
358}
359
360uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getNextPara()
361{
362 SolarMutexGuard aGuard;
363
364 uno::Reference< text::XFlatParagraph > xRet;
365 if (!mpDoc)
366 return xRet;
367
368 SwTextNode* pRet = nullptr;
369 if ( mbAutomatic )
370 {
372
373 SwPageFrame* pCurrentPage = pViewShell ? pViewShell->Imp()->GetFirstVisPage(pViewShell->GetOut()) : nullptr;
374 SwPageFrame* pStartPage = pCurrentPage;
375 SwPageFrame* pStopPage = nullptr;
376
377 while ( pCurrentPage && pCurrentPage != pStopPage )
378 {
379 if (mnType != text::TextMarkupType::SPELLCHECK || pCurrentPage->IsInvalidSpelling() )
380 {
381 // this method is supposed to return an empty paragraph in case Online Checking is disabled
382 if ( ( mnType == text::TextMarkupType::PROOFREADING || mnType == text::TextMarkupType::SPELLCHECK )
383 && !pViewShell->GetViewOptions()->IsOnlineSpell() )
384 return xRet;
385
386 // search for invalid content:
387 SwContentFrame* pCnt = pCurrentPage->ContainsContent();
388
389 while( pCnt && pCurrentPage->IsAnLower( pCnt ) )
390 {
391 if (pCnt->IsTextFrame())
392 {
393 SwTextFrame const*const pText(static_cast<SwTextFrame const*>(pCnt));
394 if (sw::MergedPara const*const pMergedPara = pText->GetMergedPara()
395 )
396 {
397 SwTextNode * pTextNode(nullptr);
398 for (auto const& e : pMergedPara->extents)
399 {
400 if (e.pNode != pTextNode)
401 {
402 pTextNode = e.pNode;
403 if ((mnType == text::TextMarkupType::SPELLCHECK
404 && pTextNode->IsWrongDirty()) ||
405 (mnType == text::TextMarkupType::PROOFREADING
406 && pTextNode->IsGrammarCheckDirty()))
407 {
408 pRet = pTextNode;
409 break;
410 }
411 }
412 }
413 }
414 else
415 {
416 SwTextNode const*const pTextNode(pText->GetTextNodeFirst());
417 if ((mnType == text::TextMarkupType::SPELLCHECK
418 && pTextNode->IsWrongDirty()) ||
419 (mnType == text::TextMarkupType::PROOFREADING
420 && pTextNode->IsGrammarCheckDirty()))
421
422 {
423 pRet = const_cast<SwTextNode*>(pTextNode);
424 }
425 }
426
427 if (pRet)
428 {
429 break;
430 }
431 }
432
433 pCnt = pCnt->GetNextContentFrame();
434 }
435 }
436
437 if ( pRet )
438 break;
439
440 // if there is no invalid text node on the current page,
441 // we validate the page
442 pCurrentPage->ValidateSpelling();
443
444 // proceed with next page, wrap at end of document if required:
445 pCurrentPage = static_cast<SwPageFrame*>(pCurrentPage->GetNext());
446
447 if ( !pCurrentPage && !pStopPage )
448 {
449 pStopPage = pStartPage;
450 pCurrentPage = static_cast<SwPageFrame*>(pViewShell->GetLayout()->Lower());
451 }
452 }
453 }
454 else // non-automatic checking
455 {
456 const SwNodes& rNodes = mpDoc->GetNodes();
457 const SwNodeOffset nMaxNodes = rNodes.Count();
458
459 while ( mnCurrentNode < mnEndNode && mnCurrentNode < nMaxNodes )
460 {
461 SwNode* pNd = rNodes[ mnCurrentNode ];
462
464
465 pRet = pNd->GetTextNode();
466 if ( pRet )
467 break;
468
469 if ( mnCurrentNode == mnEndNode )
470 {
473 }
474 }
475 }
476
477 if ( pRet )
478 {
479 // Expand the string:
480 const ModelToViewHelper aConversionMap(*pRet, mpDoc->getIDocumentLayoutAccess().GetCurrentLayout());
481 const OUString& aExpandText = aConversionMap.getViewText();
482
483 xRet = new SwXFlatParagraph( *pRet, aExpandText, aConversionMap );
484 // keep hard references...
485 m_aFlatParaList.insert( xRet );
486 }
487
488 return xRet;
489}
490
491uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getLastPara()
492{
493 return getNextPara();
494}
495
496uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getParaAfter(const uno::Reference< text::XFlatParagraph > & xPara)
497{
498 SolarMutexGuard aGuard;
499
500 uno::Reference< text::XFlatParagraph > xRet;
501 if (!mpDoc)
502 return xRet;
503
504 const uno::Reference<lang::XUnoTunnel> xFPTunnel(xPara, uno::UNO_QUERY);
505 SAL_WARN_IF(!xFPTunnel.is(), "sw.core", "invalid argument");
506 SwXFlatParagraph* const pFlatParagraph(comphelper::getFromUnoTunnel<SwXFlatParagraph>(xFPTunnel));
507
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 // keep hard references...
535 m_aFlatParaList.insert( xRet );
536 }
537
538 return xRet;
539}
540
541uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getParaBefore(const uno::Reference< text::XFlatParagraph > & xPara )
542{
543 SolarMutexGuard aGuard;
544
545 uno::Reference< text::XFlatParagraph > xRet;
546 if (!mpDoc)
547 return xRet;
548
549 const uno::Reference<lang::XUnoTunnel> xFPTunnel(xPara, uno::UNO_QUERY);
550
551 SAL_WARN_IF(!xFPTunnel.is(), "sw.core", "invalid argument");
552 SwXFlatParagraph* const pFlatParagraph(comphelper::getFromUnoTunnel<SwXFlatParagraph>(xFPTunnel));
553
554 if ( !pFlatParagraph )
555 return xRet;
556
557 SwTextNode const*const pCurrentNode = pFlatParagraph->GetTextNode();
558
559 if ( !pCurrentNode )
560 return xRet;
561
562 SwTextNode* pPrevTextNode = nullptr;
563 const SwNodes& rNodes = pCurrentNode->GetDoc().GetNodes();
564
565 for( SwNodeOffset nCurrentNode = pCurrentNode->GetIndex() - 1; nCurrentNode > SwNodeOffset(0); --nCurrentNode )
566 {
567 SwNode* pNd = rNodes[ nCurrentNode ];
568 pPrevTextNode = pNd->GetTextNode();
569 if ( pPrevTextNode )
570 break;
571 }
572
573 if ( pPrevTextNode )
574 {
575 // Expand the string:
576 const ModelToViewHelper aConversionMap(*pPrevTextNode, mpDoc->getIDocumentLayoutAccess().GetCurrentLayout());
577 const OUString& aExpandText = aConversionMap.getViewText();
578
579 xRet = new SwXFlatParagraph( *pPrevTextNode, aExpandText, aConversionMap );
580 // keep hard references...
581 m_aFlatParaList.insert( xRet );
582 }
583
584 return xRet;
585}
586
587/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define SW_BREAKITER()
Definition: breakit.hxx:121
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:58
SwContentFrame * GetNextContentFrame() const
Definition: cntfrm.hxx:119
Definition: doc.hxx:194
SwNodes & GetNodes()
Definition: doc.hxx:417
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
Definition: doc.cxx:411
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
Definition: doc.cxx:432
bool IsTextFrame() const
Definition: frame.hxx:1234
SwFrame * GetNext()
Definition: frame.hxx:676
bool IsAnLower(const SwFrame *) const
Definition: findfrm.cxx:231
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:70
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:2169
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:897
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:187
const SwPosition * GetMark() const
Definition: pam.hxx:263
const SwPosition * GetPoint() const
Definition: pam.hxx:261
A page of the document layout.
Definition: pagefrm.hxx:58
bool IsInvalidSpelling() const
Definition: pagefrm.hxx:236
void ValidateSpelling() const
Definition: pagefrm.hxx:421
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:165
sw::MergedPara * GetMergedPara()
Definition: txtfrm.hxx:456
SwTextNode * GetTextNodeFirst()
Definition: txtfrm.hxx:463
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:111
void SetWrongDirty(sw::WrongState eNew) const
Definition: txtedt.cxx:2246
virtual sal_Int32 Len() const override
Definition: ndtxt.cxx:290
bool IsSmartTagDirty() const
Definition: txtedt.cxx:2276
bool IsGrammarCheckDirty() const
Definition: txtedt.cxx:2266
void SetGrammarCheckDirty(bool bNew) const
Definition: txtedt.cxx:2261
void SetSmartTagDirty(bool bNew) const
Definition: txtedt.cxx:2271
bool IsWrongDirty() const
Definition: txtedt.cxx:2256
bool IsOnlineSpell() const
Definition: viewopt.hxx:481
const SwPageFrame * GetFirstVisPage(OutputDevice const *pRenderContext) const
Management of the first visible Page.
Definition: viewimp.cxx:315
vcl::RenderContext * GetOut() const
Definition: viewsh.hxx:347
const SwViewOption * GetViewOptions() const
Definition: viewsh.hxx:433
SwViewShellImp * Imp()
Definition: viewsh.hxx:190
SwRootFrame * GetLayout() const
Definition: viewsh.cxx:2160
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
std::set< css::uno::Reference< css::text::XFlatParagraph > > m_aFlatParaList
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
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId()
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
Definition: unoflatpara.cxx:98
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:91
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 sal_Int64 SAL_CALL getSomething(const css::uno::Sequence< sal_Int8 > &rId) 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:1210
const css::uno::Sequence< sal_Int8 > & getSeq() const
SvtBroadcaster & GetNotifier()
Definition: calbck.hxx:102
#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
sal_Int64 getSomethingImpl(const css::uno::Sequence< sal_Int8 > &rId, T *pThis, FallbackToGetSomethingOf< Base >={})
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)
Count
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
Describes parts of multiple text nodes, which will form a text frame, even when redlines are hidden a...
Definition: txtfrm.hxx:963
unsigned char sal_Bool
::cppu::ImplInheritanceHelper< SwXTextMarkup, css::beans::XPropertySet, css::text::XFlatParagraph, css::lang::XUnoTunnel > SwXFlatParagraph_Base
Definition: unoflatpara.hxx:39
sal_Int32 nLength