LibreOffice Module editeng (master) 1
unotext2.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 <sal/config.h>
21
22#include <initializer_list>
23#include <string_view>
24
25#include <o3tl/safeint.hxx>
26#include <vcl/svapp.hxx>
27
28#include <editeng/unotext.hxx>
31
32using namespace ::cppu;
33using namespace ::com::sun::star;
34
35#define QUERYINT( xint ) \
36 if( rType == cppu::UnoType<xint>::get() ) \
37 return uno::Any(uno::Reference< xint >(this))
38
39
40// SvxUnoTextContentEnumeration
41
42
44{
45 mxParentText = const_cast<SvxUnoTextBase*>(&rText);
46 if( rText.GetEditSource() )
47 mpEditSource = rText.GetEditSource()->Clone();
48 mnNextParagraph = 0;
49
50 if (!mpEditSource)
51 return;
52
53 const SvxTextForwarder* pTextForwarder = rText.GetEditSource()->GetTextForwarder();
54 const sal_Int32 maxParaIndex = std::min( rSel.nEndPara + 1, pTextForwarder->GetParagraphCount() );
55
56 for( sal_Int32 currentPara = rSel.nStartPara; currentPara < maxParaIndex; currentPara++ )
57 {
58 const SvxUnoTextRangeBaseVec& rRanges( mpEditSource->getRanges() );
60 sal_Int32 nStartPos = 0;
61 sal_Int32 nEndPos = pTextForwarder->GetTextLen( currentPara );
62 if( currentPara == rSel.nStartPara )
63 nStartPos = std::max(nStartPos, rSel.nStartPos);
64 if( currentPara == rSel.nEndPara )
65 nEndPos = std::min(nEndPos, rSel.nEndPos);
66 ESelection aCurrentParaSel( currentPara, nStartPos, currentPara, nEndPos );
67 for (auto const& elemRange : rRanges)
68 {
69 if (pContent)
70 break;
71 SvxUnoTextContent* pIterContent = dynamic_cast< SvxUnoTextContent* >( elemRange );
72 if( pIterContent && (pIterContent->mnParagraph == currentPara) )
73 {
74 ESelection aIterSel = pIterContent->GetSelection();
75 if( aIterSel == aCurrentParaSel )
76 {
77 pContent = pIterContent;
78 maContents.emplace_back(pContent );
79 }
80 }
81 }
82 if( pContent == nullptr )
83 {
84 pContent = new SvxUnoTextContent( rText, currentPara );
85 pContent->SetSelection( aCurrentParaSel );
86 maContents.emplace_back(pContent );
87 }
88 }
89}
90
92{
93}
94
95// container::XEnumeration
97{
98 SolarMutexGuard aGuard;
99 if( mpEditSource && !maContents.empty() )
101 else
102 return false;
103}
104
106{
107 SolarMutexGuard aGuard;
108
109 if(!hasMoreElements())
110 throw container::NoSuchElementException();
111
112 uno::Reference< text::XTextContent > xRef( maContents.at(mnNextParagraph) );
114 return uno::Any( xRef );
115}
116
117
118
119
120SvxUnoTextContent::SvxUnoTextContent( const SvxUnoTextBase& rText, sal_Int32 nPara ) noexcept
121: SvxUnoTextRangeBase(rText)
122, mnParagraph(nPara)
123, mrParentText(rText)
124, mbDisposing( false )
125{
126 mxParentText = const_cast<SvxUnoTextBase*>(&rText);
127}
128
130: SvxUnoTextRangeBase(rContent)
131, text::XTextContent()
132, container::XEnumerationAccess()
133, lang::XTypeProvider()
135, mrParentText(rContent.mrParentText)
136, mbDisposing( false )
137{
138 mxParentText = rContent.mxParentText;
139 mnParagraph = rContent.mnParagraph;
140 SetSelection( rContent.GetSelection() );
141}
142
144{
145}
146
147// uno::XInterface
149{
150 QUERYINT( text::XTextRange );
151 else QUERYINT( beans::XMultiPropertyStates );
152 else QUERYINT( beans::XPropertySet );
153 else QUERYINT( beans::XMultiPropertySet );
154 else QUERYINT( beans::XPropertyState );
155 else QUERYINT( text::XTextContent );
156 else QUERYINT( text::XTextRangeCompare );
157 else QUERYINT( lang::XComponent );
158 else QUERYINT( container::XEnumerationAccess );
159 else QUERYINT( container::XElementAccess );
160 else QUERYINT( lang::XServiceInfo );
161 else QUERYINT( lang::XTypeProvider );
162 else QUERYINT( lang::XUnoTunnel );
163 else
164 return OWeakAggObject::queryAggregation( rType );
165}
166
168{
169 return OWeakAggObject::queryInterface(rType);
170}
171
172void SAL_CALL SvxUnoTextContent::acquire() noexcept
173{
174 OWeakAggObject::acquire();
175}
176
177void SAL_CALL SvxUnoTextContent::release() noexcept
178{
179 OWeakAggObject::release();
180}
181
182// XTypeProvider
183
184uno::Sequence< uno::Type > SAL_CALL SvxUnoTextContent::getTypes()
185{
186 static const uno::Sequence< uno::Type > TYPES {
198 return TYPES;
199}
200
201uno::Sequence< sal_Int8 > SAL_CALL SvxUnoTextContent::getImplementationId()
202{
203 return css::uno::Sequence<sal_Int8>();
204}
205
206// text::XTextRange
207
208uno::Reference< text::XText > SAL_CALL SvxUnoTextContent::getText()
209{
210 return mxParentText;
211}
212
213// text::XTextContent
214void SAL_CALL SvxUnoTextContent::attach( const uno::Reference< text::XTextRange >& )
215{
216}
217
218uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextContent::getAnchor()
219{
220 return mxParentText;
221}
222
223// XComponent
224
226{
227 SolarMutexGuard aGuard;
228
229 if( mbDisposing )
230 return; // caught a recursion
231
232 mbDisposing = true;
233
234 lang::EventObject aEvt;
235 aEvt.Source = *static_cast<OWeakAggObject*>(this);
236 {
237 std::unique_lock aMutexGuard(maDisposeContainerMutex);
238 maDisposeListeners.disposeAndClear(aMutexGuard, aEvt);
239 }
240
241 if( mxParentText.is() )
242 mxParentText->removeTextContent( this );
243}
244
245void SAL_CALL SvxUnoTextContent::addEventListener( const uno::Reference< lang::XEventListener >& xListener )
246{
247 std::unique_lock aGuard(maDisposeContainerMutex);
248 maDisposeListeners.addInterface(aGuard, xListener);
249}
250
251void SAL_CALL SvxUnoTextContent::removeEventListener( const uno::Reference< lang::XEventListener >& aListener )
252{
253 std::unique_lock aGuard(maDisposeContainerMutex);
254 maDisposeListeners.removeInterface(aGuard, aListener);
255}
256
257// XEnumerationAccess
258
259uno::Reference< container::XEnumeration > SAL_CALL SvxUnoTextContent::createEnumeration()
260{
261 SolarMutexGuard aGuard;
262
263 return new SvxUnoTextRangeEnumeration( mrParentText, mnParagraph, maSelection );
264}
265
266// XElementAccess ( container::XEnumerationAccess )
267
269{
271}
272
274{
275 SolarMutexGuard aGuard;
276
277 SvxTextForwarder* pForwarder = GetEditSource() ? GetEditSource()->GetTextForwarder() : nullptr;
278 if( pForwarder )
279 {
280 std::vector<sal_Int32> aPortions;
281 pForwarder->GetPortions( mnParagraph, aPortions );
282 return !aPortions.empty();
283 }
284 else
285 {
286 return false;
287 }
288}
289
290// XPropertySet
291
292void SAL_CALL SvxUnoTextContent::setPropertyValue( const OUString& aPropertyName, const uno::Any& aValue )
293{
294 _setPropertyValue( aPropertyName, aValue, mnParagraph );
295}
296
297uno::Any SAL_CALL SvxUnoTextContent::getPropertyValue( const OUString& PropertyName )
298{
299 return _getPropertyValue( PropertyName, mnParagraph );
300}
301
302// XMultiPropertySet
303void SAL_CALL SvxUnoTextContent::setPropertyValues( const uno::Sequence< OUString >& aPropertyNames, const uno::Sequence< uno::Any >& aValues )
304{
305 _setPropertyValues( aPropertyNames, aValues, mnParagraph );
306}
307
308uno::Sequence< uno::Any > SAL_CALL SvxUnoTextContent::getPropertyValues( const uno::Sequence< OUString >& aPropertyNames )
309{
310 return _getPropertyValues( aPropertyNames, mnParagraph );
311}
312
313/*// XTolerantMultiPropertySet
314uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL SvxUnoTextContent::setPropertyValuesTolerant( const uno::Sequence< OUString >& aPropertyNames, const uno::Sequence< uno::Any >& aValues ) throw (lang::IllegalArgumentException, uno::RuntimeException)
315{
316 return _setPropertyValuesTolerant(aPropertyNames, aValues, mnParagraph);
317}
318
319uno::Sequence< beans::GetPropertyTolerantResult > SAL_CALL SvxUnoTextContent::getPropertyValuesTolerant( const uno::Sequence< OUString >& aPropertyNames ) throw (uno::RuntimeException)
320{
321 return _getPropertyValuesTolerant(aPropertyNames, mnParagraph);
322}
323
324uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL SvxUnoTextContent::getDirectPropertyValuesTolerant( const uno::Sequence< OUString >& aPropertyNames )
325 throw (uno::RuntimeException)
326{
327 return _getDirectPropertyValuesTolerant(aPropertyNames, mnParagraph);
328}*/
329
330// beans::XPropertyState
331beans::PropertyState SAL_CALL SvxUnoTextContent::getPropertyState( const OUString& PropertyName )
332{
333 return _getPropertyState( PropertyName, mnParagraph );
334}
335
336uno::Sequence< beans::PropertyState > SAL_CALL SvxUnoTextContent::getPropertyStates( const uno::Sequence< OUString >& aPropertyName )
337{
338 return _getPropertyStates( aPropertyName, mnParagraph );
339}
340
341void SAL_CALL SvxUnoTextContent::setPropertyToDefault( const OUString& PropertyName )
342{
343 _setPropertyToDefault( PropertyName, mnParagraph );
344}
345
346// lang::XServiceInfo
347
349{
350 return "SvxUnoTextContent";
351}
352
353uno::Sequence< OUString > SAL_CALL SvxUnoTextContent::getSupportedServiceNames()
354{
356 SvxUnoTextRangeBase::getSupportedServiceNames(),
357 std::initializer_list<std::u16string_view>{ u"com.sun.star.style.ParagraphProperties",
358 u"com.sun.star.style.ParagraphPropertiesComplex",
359 u"com.sun.star.style.ParagraphPropertiesAsian",
360 u"com.sun.star.text.TextContent",
361 u"com.sun.star.text.Paragraph" });
362}
363
364
365
366
367SvxUnoTextRangeEnumeration::SvxUnoTextRangeEnumeration(const SvxUnoTextBase& rParentText, sal_Int32 nParagraph, const ESelection& rSel)
368: mxParentText( const_cast<SvxUnoTextBase*>(&rParentText) ),
369 mnNextPortion( 0 )
370{
371 if (rParentText.GetEditSource())
372 mpEditSource = rParentText.GetEditSource()->Clone();
373
374 if( !(mpEditSource && mpEditSource->GetTextForwarder() && (nParagraph == rSel.nStartPara && nParagraph == rSel.nEndPara)) )
375 return;
376
377 std::vector<sal_Int32> aPortions;
378 mpEditSource->GetTextForwarder()->GetPortions( nParagraph, aPortions );
379 for( size_t aPortionIndex = 0; aPortionIndex < aPortions.size(); aPortionIndex++ )
380 {
381 sal_uInt16 nStartPos = 0;
382 if ( aPortionIndex > 0 )
383 nStartPos = aPortions.at( aPortionIndex - 1 );
384 if( nStartPos > rSel.nEndPos )
385 continue;
386 sal_uInt16 nEndPos = aPortions.at( aPortionIndex );
387 if( nEndPos < rSel.nStartPos )
388 continue;
389
390 nStartPos = std::max<int>(nStartPos, rSel.nStartPos);
391 nEndPos = std::min<sal_uInt16>(nEndPos, rSel.nEndPos);
392 ESelection aSel( nParagraph, nStartPos, nParagraph, nEndPos );
393
394 const SvxUnoTextRangeBaseVec& rRanges( mpEditSource->getRanges() );
396 for (auto const& elemRange : rRanges)
397 {
398 if (pRange)
399 break;
400 SvxUnoTextRange* pIterRange = dynamic_cast< SvxUnoTextRange* >( elemRange );
401 if( pIterRange && pIterRange->mbPortion && (aSel == pIterRange->maSelection) )
402 pRange = pIterRange;
403 }
404 if( pRange == nullptr )
405 {
406 pRange = new SvxUnoTextRange( rParentText, true );
407 pRange->SetSelection( aSel );
408 }
409 maPortions.emplace_back(pRange );
410 }
411}
412
414{
415}
416
417// container::XEnumeration
418
420{
421 SolarMutexGuard aGuard;
422
423 return !maPortions.empty() && mnNextPortion < maPortions.size();
424}
425
427{
428 SolarMutexGuard aGuard;
429
430 if( maPortions.empty() || mnNextPortion >= maPortions.size() )
431 throw container::NoSuchElementException();
432
433 uno::Reference< text::XTextRange > xRange = maPortions.at(mnNextPortion);
435 return uno::Any( xRange );
436}
437
439: SvxUnoTextRangeBase(rText),
440 mxParentText( const_cast<SvxUnoTextBase*>(&rText) )
441{
442}
443
445: SvxUnoTextRangeBase(rCursor)
446, text::XTextCursor()
447, lang::XTypeProvider()
449, mxParentText(rCursor.mxParentText)
450{
451}
452
454{
455}
456
457// Comment out automatically - [getIdlClass(es) or queryInterface]
458// Please use the XTypeProvider!
459//sal_Bool SvxUnoTextCursor::queryInterface( uno::Uik aUIK, Reference< uno::XInterface > & xRef)
461{
463 return uno::Any(uno::Reference< text::XTextRange >(static_cast<SvxUnoTextRangeBase *>(this)));
464 else QUERYINT( text::XTextCursor );
465 else QUERYINT( beans::XMultiPropertyStates );
466 else QUERYINT( beans::XPropertySet );
467 else QUERYINT( beans::XMultiPropertySet );
468 else QUERYINT( beans::XPropertyState );
469 else QUERYINT( text::XTextRangeCompare );
470 else QUERYINT( lang::XServiceInfo );
471 else QUERYINT( lang::XTypeProvider );
472 else QUERYINT( lang::XUnoTunnel );
473 else
474 return OWeakAggObject::queryAggregation( rType );
475}
476
478{
479 return OWeakAggObject::queryInterface(rType);
480}
481
482void SAL_CALL SvxUnoTextCursor::acquire() noexcept
483{
484 OWeakAggObject::acquire();
485}
486
487void SAL_CALL SvxUnoTextCursor::release() noexcept
488{
489 OWeakAggObject::release();
490}
491
492// XTypeProvider
493uno::Sequence< uno::Type > SAL_CALL SvxUnoTextCursor::getTypes()
494{
495 static const uno::Sequence< uno::Type > TYPES {
506 return TYPES;
507}
508
509uno::Sequence< sal_Int8 > SAL_CALL SvxUnoTextCursor::getImplementationId()
510{
511 return css::uno::Sequence<sal_Int8>();
512}
513
514// text::XTextCursor
516{
517 SolarMutexGuard aGuard;
518 CollapseToStart();
519}
520
522{
523 SolarMutexGuard aGuard;
524 CollapseToEnd();
525}
526
528{
529 SolarMutexGuard aGuard;
530 return IsCollapsed();
531}
532
533sal_Bool SAL_CALL SvxUnoTextCursor::goLeft( sal_Int16 nCount, sal_Bool bExpand )
534{
535 SolarMutexGuard aGuard;
536 return GoLeft( nCount, bExpand );
537}
538
539sal_Bool SAL_CALL SvxUnoTextCursor::goRight( sal_Int16 nCount, sal_Bool bExpand )
540{
541 SolarMutexGuard aGuard;
542 return GoRight( nCount, bExpand );
543}
544
545void SAL_CALL SvxUnoTextCursor::gotoStart( sal_Bool bExpand )
546{
547 SolarMutexGuard aGuard;
548 GotoStart( bExpand );
549}
550
551void SAL_CALL SvxUnoTextCursor::gotoEnd( sal_Bool bExpand )
552{
553 SolarMutexGuard aGuard;
554 GotoEnd( bExpand );
555}
556
557void SAL_CALL SvxUnoTextCursor::gotoRange( const uno::Reference< text::XTextRange >& xRange, sal_Bool bExpand )
558{
559 if( !xRange.is() )
560 return;
561
562 SvxUnoTextRangeBase* pRange = comphelper::getFromUnoTunnel<SvxUnoTextRangeBase>( xRange );
563
564 if( !pRange )
565 return;
566
567 ESelection aNewSel = pRange->GetSelection();
568
569 if( bExpand )
570 {
571 const ESelection& rOldSel = GetSelection();
572 aNewSel.nStartPara = rOldSel.nStartPara;
573 aNewSel.nStartPos = rOldSel.nStartPos;
574 }
575
576 SetSelection( aNewSel );
577}
578
579// text::XTextRange (rest in SvxTextRange)
580uno::Reference< text::XText > SAL_CALL SvxUnoTextCursor::getText()
581{
582 return mxParentText;
583}
584
585uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextCursor::getStart()
586{
587 return SvxUnoTextRangeBase::getStart();
588}
589
590uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextCursor::getEnd()
591{
592 return SvxUnoTextRangeBase::getEnd();
593}
594
596{
597 return SvxUnoTextRangeBase::getString();
598}
599
600void SAL_CALL SvxUnoTextCursor::setString( const OUString& aString )
601{
602 SvxUnoTextRangeBase::setString(aString);
603}
604// lang::XServiceInfo
606{
607 return "SvxUnoTextCursor";
608}
609
610sal_Bool SAL_CALL SvxUnoTextCursor::supportsService( const OUString& ServiceName )
611{
612 return cppu::supportsService( this, ServiceName );
613}
614
615uno::Sequence< OUString > SAL_CALL SvxUnoTextCursor::getSupportedServiceNames()
616{
618 SvxUnoTextRangeBase::getSupportedServiceNames(),
619 std::initializer_list<std::u16string_view>{ u"com.sun.star.style.ParagraphProperties",
620 u"com.sun.star.style.ParagraphPropertiesComplex",
621 u"com.sun.star.style.ParagraphPropertiesAsian",
622 u"com.sun.star.text.TextCursor" });
623}
624
625
626/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Contains an EditEngine or an Outliner and unifies access to them.
Definition: unoedsrc.hxx:142
virtual void GetPortions(sal_Int32 nPara, std::vector< sal_Int32 > &rList) const =0
virtual sal_Int32 GetTextLen(sal_Int32 nParagraph) const =0
virtual sal_Int32 GetParagraphCount() const =0
SvxUnoTextContentEnumeration(const SvxUnoTextBase &_rText, const ESelection &rSel) noexcept
Definition: unotext2.cxx:43
std::vector< rtl::Reference< SvxUnoTextContent > > maContents
Definition: unotext.hxx:602
std::unique_ptr< SvxEditSource > mpEditSource
Definition: unotext.hxx:600
virtual css::uno::Any SAL_CALL nextElement() override
Definition: unotext2.cxx:105
virtual sal_Bool SAL_CALL hasMoreElements() override
Definition: unotext2.cxx:96
virtual ~SvxUnoTextContentEnumeration() noexcept override
Definition: unotext2.cxx:91
const SvxUnoTextBase & mrParentText
Definition: unotext.hxx:532
virtual void SAL_CALL dispose() override
Definition: unotext2.cxx:225
virtual void SAL_CALL attach(const css::uno::Reference< css::text::XTextRange > &xTextRange) override
Definition: unotext2.cxx:214
virtual void SAL_CALL setPropertyToDefault(const OUString &PropertyName) override
Definition: unotext2.cxx:341
SvxUnoTextContent(const SvxUnoTextBase &rText, sal_Int32 nPara) noexcept
Definition: unotext2.cxx:120
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
Definition: unotext2.cxx:251
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
Definition: unotext2.cxx:259
virtual css::uno::Type SAL_CALL getElementType() override
Definition: unotext2.cxx:268
virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates(const css::uno::Sequence< OUString > &aPropertyName) override
Definition: unotext2.cxx:336
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unotext2.cxx:353
virtual sal_Bool SAL_CALL hasElements() override
Definition: unotext2.cxx:273
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: unotext2.cxx:201
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getAnchor() override
Definition: unotext2.cxx:218
virtual OUString SAL_CALL getImplementationName() override
Definition: unotext2.cxx:348
virtual void SAL_CALL acquire() noexcept override
Definition: unotext2.cxx:172
sal_Int32 mnParagraph
Definition: unotext.hxx:531
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &rType) override
Definition: unotext2.cxx:148
::comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > maDisposeListeners
Definition: unotext.hxx:536
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
Definition: unotext2.cxx:245
virtual css::beans::PropertyState SAL_CALL getPropertyState(const OUString &PropertyName) override
Definition: unotext2.cxx:331
virtual ~SvxUnoTextContent() noexcept override
Definition: unotext2.cxx:143
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: unotext2.cxx:184
virtual void SAL_CALL setPropertyValues(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Sequence< css::uno::Any > &aValues) override
Definition: unotext2.cxx:303
virtual void SAL_CALL release() noexcept override
Definition: unotext2.cxx:177
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyValues(const css::uno::Sequence< OUString > &aPropertyNames) override
Definition: unotext2.cxx:308
css::uno::Reference< css::text::XText > mxParentText
Definition: unotext.hxx:530
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
Definition: unotext2.cxx:167
virtual css::uno::Reference< css::text::XText > SAL_CALL getText() override
Definition: unotext2.cxx:208
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: unotext2.cxx:292
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: unotext2.cxx:297
std::mutex maDisposeContainerMutex
Definition: unotext.hxx:535
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unotext2.cxx:615
SvxUnoTextCursor(const SvxUnoTextBase &rText) noexcept
Definition: unotext2.cxx:438
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: unotext2.cxx:509
virtual css::uno::Reference< css::text::XText > SAL_CALL getText() override
Definition: unotext2.cxx:580
virtual void SAL_CALL collapseToStart() override
Definition: unotext2.cxx:515
virtual ~SvxUnoTextCursor() noexcept override
Definition: unotext2.cxx:453
virtual void SAL_CALL gotoStart(sal_Bool bExpand) override
Definition: unotext2.cxx:545
virtual void SAL_CALL collapseToEnd() override
Definition: unotext2.cxx:521
virtual sal_Bool SAL_CALL goRight(sal_Int16 nCount, sal_Bool bExpand) override
Definition: unotext2.cxx:539
virtual void SAL_CALL release() noexcept override
Definition: unotext2.cxx:487
virtual void SAL_CALL gotoEnd(sal_Bool bExpand) override
Definition: unotext2.cxx:551
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unotext2.cxx:610
css::uno::Reference< css::text::XText > mxParentText
Definition: unotext.hxx:638
virtual sal_Bool SAL_CALL goLeft(sal_Int16 nCount, sal_Bool bExpand) override
Definition: unotext2.cxx:533
virtual OUString SAL_CALL getImplementationName() override
Definition: unotext2.cxx:605
virtual void SAL_CALL setString(const OUString &aString) override
Definition: unotext2.cxx:600
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
Definition: unotext2.cxx:477
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getStart() override
Definition: unotext2.cxx:585
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getEnd() override
Definition: unotext2.cxx:590
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: unotext2.cxx:493
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &rType) override
Definition: unotext2.cxx:460
virtual void SAL_CALL acquire() noexcept override
Definition: unotext2.cxx:482
virtual void SAL_CALL gotoRange(const css::uno::Reference< css::text::XTextRange > &xRange, sal_Bool bExpand) override
Definition: unotext2.cxx:557
virtual sal_Bool SAL_CALL isCollapsed() override
Definition: unotext2.cxx:527
virtual OUString SAL_CALL getString() override
Definition: unotext2.cxx:595
virtual css::uno::Any SAL_CALL nextElement() override
Definition: unotext2.cxx:426
std::vector< rtl::Reference< SvxUnoTextRange > > maPortions
Definition: unotext.hxx:619
virtual sal_Bool SAL_CALL hasMoreElements() override
Definition: unotext2.cxx:419
SvxUnoTextRangeEnumeration(const SvxUnoTextBase &rText, sal_Int32 nPara, const ESelection &rSel)
Definition: unotext2.cxx:367
virtual ~SvxUnoTextRangeEnumeration() noexcept override
Definition: unotext2.cxx:413
std::unique_ptr< SvxEditSource > mpEditSource
Definition: unotext.hxx:617
sal_Int32 addInterface(std::unique_lock< std::mutex > &rGuard, const css::uno::Reference< ListenerT > &rxIFace)
void disposeAndClear(::std::unique_lock<::std::mutex > &rGuard, const css::lang::EventObject &rEvt)
sal_Int32 removeInterface(std::unique_lock< std::mutex > &rGuard, const css::uno::Reference< ListenerT > &rxIFace)
css::uno::Type const & get()
int nCount
float u
css::uno::Sequence< T > concatSequences(const css::uno::Sequence< T > &rS1, const Ss &... rSn)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
sal_Int32 nStartPara
Definition: editdata.hxx:113
sal_Int32 nEndPos
Definition: editdata.hxx:116
sal_Int32 nStartPos
Definition: editdata.hxx:114
sal_Int32 nEndPara
Definition: editdata.hxx:115
unsigned char sal_Bool
std::vector< SvxUnoTextRangeBase * > SvxUnoTextRangeBaseVec
Definition: unoedsrc.hxx:45
#define QUERYINT(xint)
Definition: unotext2.cxx:35
void GetSelection(struct ESelection &rSel, SvxTextForwarder const *pForwarder) noexcept
Definition: unotext.cxx:135