LibreOffice Module sd (master) 1
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Private Attributes | List of all members
SdUnoSearchReplaceShape Class Reference

this class implements a search or replace operation on a given page or a given sdrobj More...

#include <unosrch.hxx>

Inheritance diagram for SdUnoSearchReplaceShape:
[legend]
Collaboration diagram for SdUnoSearchReplaceShape:
[legend]

Public Member Functions

 SdUnoSearchReplaceShape (css::drawing::XDrawPage *xPage) noexcept
 this class implements a search or replace operation on a given page or a given sdrobj More...
 
virtual ~SdUnoSearchReplaceShape () noexcept
 
virtual css::uno::Reference< css::util::XReplaceDescriptor > SAL_CALL createReplaceDescriptor () override
 
virtual sal_Int32 SAL_CALL replaceAll (const css::uno::Reference< css::util::XSearchDescriptor > &xDesc) override
 
virtual css::uno::Reference< css::util::XSearchDescriptor > SAL_CALL createSearchDescriptor () override
 
virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL findAll (const css::uno::Reference< css::util::XSearchDescriptor > &xDesc) override
 
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL findFirst (const css::uno::Reference< css::util::XSearchDescriptor > &xDesc) override
 
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL findNext (const css::uno::Reference< css::uno::XInterface > &xStartAt, const css::uno::Reference< css::util::XSearchDescriptor > &xDesc) override
 

Protected Member Functions

css::uno::Reference< css::text::XTextRange > Search (const css::uno::Reference< css::text::XTextRange > &xText, SdUnoSearchReplaceDescriptor *pDescr)
 
bool Search (const OUString &rText, sal_Int32 &nStartPos, sal_Int32 &nEndPos, SdUnoSearchReplaceDescriptor *pDescr) noexcept
 
css::uno::Reference< css::drawing::XShape > GetNextShape (const css::uno::Reference< css::container::XIndexAccess > &xShapes, const css::uno::Reference< css::drawing::XShape > &xCurrentShape) noexcept
 this method returns the shape that follows xCurrentShape in the shape collection xShapes. More...
 
css::uno::Reference< css::drawing::XShape > GetCurrentShape () const noexcept
 

Static Protected Member Functions

static ESelection GetSelection (const css::uno::Reference< css::text::XTextRange > &xTextRange) noexcept
 
static css::uno::Reference< css::drawing::XShape > GetShape (const css::uno::Reference< css::text::XTextRange > &xTextRange) noexcept
 

Private Attributes

css::drawing::XDrawPage * mpPage
 

Detailed Description

this class implements a search or replace operation on a given page or a given sdrobj

Definition at line 39 of file unosrch.hxx.

Constructor & Destructor Documentation

◆ SdUnoSearchReplaceShape()

SdUnoSearchReplaceShape::SdUnoSearchReplaceShape ( css::drawing::XDrawPage *  xPage)
noexcept

this class implements a search or replace operation on a given page or a given sdrobj

Definition at line 92 of file unosrch.cxx.

References mpPage.

◆ ~SdUnoSearchReplaceShape()

SdUnoSearchReplaceShape::~SdUnoSearchReplaceShape ( )
virtualnoexcept

Definition at line 97 of file unosrch.cxx.

Member Function Documentation

◆ createReplaceDescriptor()

uno::Reference< util::XReplaceDescriptor > SAL_CALL SdUnoSearchReplaceShape::createReplaceDescriptor ( )
overridevirtual

Definition at line 102 of file unosrch.cxx.

◆ createSearchDescriptor()

uno::Reference< css::util::XSearchDescriptor > SAL_CALL SdUnoSearchReplaceShape::createSearchDescriptor ( )
overridevirtual

Definition at line 182 of file unosrch.cxx.

◆ findAll()

uno::Reference< css::container::XIndexAccess > SAL_CALL SdUnoSearchReplaceShape::findAll ( const css::uno::Reference< css::util::XSearchDescriptor > &  xDesc)
overridevirtual

Definition at line 187 of file unosrch.cxx.

References aSeq, mpPage, and Search().

◆ findFirst()

uno::Reference< css::uno::XInterface > SAL_CALL SdUnoSearchReplaceShape::findFirst ( const css::uno::Reference< css::util::XSearchDescriptor > &  xDesc)
overridevirtual

Definition at line 279 of file unosrch.cxx.

References findNext(), and GetCurrentShape().

◆ findNext()

uno::Reference< css::uno::XInterface > SAL_CALL SdUnoSearchReplaceShape::findNext ( const css::uno::Reference< css::uno::XInterface > &  xStartAt,
const css::uno::Reference< css::util::XSearchDescriptor > &  xDesc 
)
overridevirtual

Definition at line 299 of file unosrch.cxx.

References GetNextShape(), GetShape(), mpPage, and Search().

Referenced by findFirst().

◆ GetCurrentShape()

uno::Reference< drawing::XShape > SdUnoSearchReplaceShape::GetCurrentShape ( ) const
protectednoexcept

Definition at line 288 of file unosrch.cxx.

References mpPage.

Referenced by findFirst().

◆ GetNextShape()

uno::Reference< drawing::XShape > SdUnoSearchReplaceShape::GetNextShape ( const css::uno::Reference< css::container::XIndexAccess > &  xShapes,
const css::uno::Reference< css::drawing::XShape > &  xCurrentShape 
)
protectednoexcept

this method returns the shape that follows xCurrentShape in the shape collection xShapes.

It steps recursive into groupshapes and returns the xCurrentShape if it is the last shape in this collection

Definition at line 349 of file unosrch.cxx.

References i, and nCount.

Referenced by findNext().

◆ GetSelection()

ESelection SdUnoSearchReplaceShape::GetSelection ( const css::uno::Reference< css::text::XTextRange > &  xTextRange)
staticprotectednoexcept

Definition at line 594 of file unosrch.cxx.

◆ GetShape()

uno::Reference< drawing::XShape > SdUnoSearchReplaceShape::GetShape ( const css::uno::Reference< css::text::XTextRange > &  xTextRange)
staticprotectednoexcept

Definition at line 605 of file unosrch.cxx.

Referenced by findNext().

◆ replaceAll()

sal_Int32 SAL_CALL SdUnoSearchReplaceShape::replaceAll ( const css::uno::Reference< css::util::XSearchDescriptor > &  xDesc)
overridevirtual

Definition at line 107 of file unosrch.cxx.

References SdUnoSearchReplaceDescriptor::getReplaceString(), mpPage, and Search().

◆ Search() [1/2]

css::uno::Reference< css::text::XTextRange > SdUnoSearchReplaceShape::Search ( const css::uno::Reference< css::text::XTextRange > &  xText,
SdUnoSearchReplaceDescriptor pDescr 
)
protected

Referenced by findAll(), findNext(), and replaceAll().

◆ Search() [2/2]

bool SdUnoSearchReplaceShape::Search ( const OUString &  rText,
sal_Int32 &  nStartPos,
sal_Int32 &  nEndPos,
SdUnoSearchReplaceDescriptor pDescr 
)
protectednoexcept

Member Data Documentation

◆ mpPage

css::drawing::XDrawPage* SdUnoSearchReplaceShape::mpPage
private

Definition at line 41 of file unosrch.hxx.

Referenced by findAll(), findNext(), GetCurrentShape(), and replaceAll().


The documentation for this class was generated from the following files: