27#include <com/sun/star/text/TextMarkupType.hpp>
28#include <com/sun/star/beans/PropertyAttribute.hpp>
52#include <com/sun/star/lang/XUnoTunnel.hpp>
53#include <com/sun/star/text/XTextRange.hpp>
59uno::Reference<text::XFlatParagraphIterator>
61 bool const bAutomatic)
70 , maExpandText(
std::move(aExpandText))
80uno::Reference< beans::XPropertySetInfo > SAL_CALL
95 throw lang::IllegalArgumentException(
"no values can be set",
104 if (rPropertyName ==
"FieldPositions")
108 else if (rPropertyName ==
"FootnotePositions")
112 else if (rPropertyName ==
"SortedTextId")
120 else if (rPropertyName ==
"DocumentElementsCount")
134 const uno::Reference< beans::XPropertyChangeListener >& )
137 "SwXFlatParagraph::addPropertyChangeListener(): not implemented");
143 const uno::Reference< beans::XPropertyChangeListener >& )
146 "SwXFlatParagraph::removePropertyChangeListener(): not implemented");
152 const uno::Reference< beans::XVetoableChangeListener >& )
155 "SwXFlatParagraph::addVetoableChangeListener(): not implemented");
161 const uno::Reference< beans::XVetoableChangeListener >& )
164 "SwXFlatParagraph::removeVetoableChangeListener(): not implemented");
174 const css::uno::Reference< css::container::XStringKeyMap > & xMarkupInfoContainer)
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)
200 if ( text::TextMarkupType::SPELLCHECK ==
nType )
205 else if ( text::TextMarkupType::SMARTTAG ==
nType )
207 else if( text::TextMarkupType::PROOFREADING ==
nType )
221 if ( text::TextMarkupType::SPELLCHECK ==
nType )
223 else if ( text::TextMarkupType::PROOFREADING ==
nType )
225 else if ( text::TextMarkupType::SMARTTAG ==
nType )
263void SAL_CALL
SwXFlatParagraph::changeText(::sal_Int32 nPos, ::sal_Int32 nLen,
const OUString & aNewText,
const css::uno::Sequence< css::beans::PropertyValue > & aAttributes)
274 throw lang::IllegalArgumentException();
286 for (
const auto& rAttribute : aAttributes )
287 xRange->setPropertyValue( rAttribute.Name, rAttribute.Value );
306 throw lang::IllegalArgumentException();
318 for (
const auto& rAttribute : aAttributes )
319 xRange->setPropertyValue( rAttribute.Name, rAttribute.Value );
328 return css::uno::Sequence< ::sal_Int32>();
334 mbAutomatic( bAutomatic ),
336 mnEndNode( rDoc.GetNodes().
Count() )
352 if(rHint.
GetId() == SfxHintId::Dying)
368 uno::Reference< text::XFlatParagraph > xRet;
381 while ( pCurrentPage && pCurrentPage != pStopPage )
386 if ( (
mnType == text::TextMarkupType::PROOFREADING ||
mnType == text::TextMarkupType::SPELLCHECK )
393 while( pCnt && pCurrentPage->
IsAnLower( pCnt ) )
402 for (
auto const& e : pMergedPara->extents)
404 if (e.pNode != pTextNode)
407 if ((
mnType == text::TextMarkupType::SPELLCHECK
409 (
mnType == text::TextMarkupType::PROOFREADING
421 if ((
mnType == text::TextMarkupType::SPELLCHECK
423 (
mnType == text::TextMarkupType::PROOFREADING
451 if ( !pCurrentPage && !pStopPage )
453 pStopPage = pStartPage;
485 const OUString& aExpandText = aConversionMap.
getViewText();
502 uno::Reference< text::XFlatParagraph > xRet;
507 SAL_WARN_IF(!pFlatParagraph,
"sw.core",
"invalid argument");
508 if ( !pFlatParagraph )
521 SwNode* pNd = rNodes[ nCurrentNode ];
531 const OUString& aExpandText = aConversionMap.
getViewText();
543 uno::Reference< text::XFlatParagraph > xRet;
548 SAL_WARN_IF(!pFlatParagraph,
"sw.core",
"invalid argument");
549 if ( !pFlatParagraph )
562 SwNode* pNd = rNodes[ nCurrentNode ];
572 const OUString& aExpandText = aConversionMap.
getViewText();
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
bool StartListening(SvtBroadcaster &rBroadcaster)
SwContentFrame is the layout for content nodes: a common base class for text (paragraph) and non-text...
SwContentFrame * GetNextContentFrame() const
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
bool IsAnLower(const SwFrame *) const
const SwContentFrame * ContainsContent() const
Checks if the frame contains one or more ContentFrame's anywhere in his subsidiary structure; if so t...
const SwFrame * Lower() const
Base class of the Writer document model elements.
IDocumentContentOperations & getIDocumentContentOperations()
Provides access to the document content operations interface.
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
SwNodeOffset GetIndex() const
SwNodeOffset Count() const
PaM is Point and Mark: a selection of the document model.
const SwPosition * GetMark() const
const SwPosition * GetPoint() const
A page of the document layout.
bool IsInvalidSpelling() const
void ValidateSpelling() const
Represents the visualization of a paragraph.
sw::MergedPara * GetMergedPara()
SwTextNode * GetTextNodeFirst()
SwTextNode is a paragraph in the document model.
void SetWrongDirty(sw::WrongState eNew) const
virtual sal_Int32 Len() const override
bool IsSmartTagDirty() const
bool IsGrammarCheckDirty() const
void SetGrammarCheckDirty(bool bNew) const
void SetSmartTagDirty(bool bNew) const
bool IsWrongDirty() const
bool IsOnlineSpell() const
const SwPageFrame * GetFirstVisPage(OutputDevice const *pRenderContext) const
Management of the first visible Page.
vcl::RenderContext * GetOut() const
const SwViewOption * GetViewOptions() const
SwRootFrame * GetLayout() const
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
SwNodeOffset mnCurrentNode
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
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
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)
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
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
css::uno::Type const & get()
#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)
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
@ RES_POOLPAGE_STANDARD
Standard page.
UNDERLYING_TYPE get() const
Describes parts of multiple text nodes, which will form a text frame, even when redlines are hidden a...
::cppu::ImplInheritanceHelper< SwXTextMarkup, css::beans::XPropertySet, css::text::XFlatParagraph > SwXFlatParagraph_Base