LibreOffice
LibreOffice 24.2 SDK API Reference
Public Member Functions | List of all members
XReplaceable Interface Referencepublished

makes it possible to replace strings in a text described by a SearchDescriptor. More...

import"XReplaceable.idl";

Inheritance diagram for XReplaceable:
XSearchable XInterface SheetCell SheetCellRange SheetCellRanges GenericTextDocument SheetCellCursor Spreadsheet GlobalDocument TextDocument WebDocument

Public Member Functions

com::sun::star::util::XReplaceDescriptor createReplaceDescriptor ()
 creates a descriptor which contains properties that specify a search in this container. More...
 
long replaceAll ([in] com::sun::star::util::XSearchDescriptor xDesc)
 searches for all occurrences of whatever is specified. More...
 
- Public Member Functions inherited from XSearchable
com::sun::star::util::XSearchDescriptor createSearchDescriptor ()
 creates a SearchDescriptor which contains properties that specify a search in this container. More...
 
com::sun::star::container::XIndexAccess findAll ([in] com::sun::star::util::XSearchDescriptor xDesc)
 searches the contained texts for all occurrences of whatever is specified. More...
 
com::sun::star::uno::XInterface findFirst ([in] com::sun::star::util::XSearchDescriptor xDesc)
 searches the contained texts for the next occurrence of whatever is specified. More...
 
com::sun::star::uno::XInterface findNext ([in] com::sun::star::uno::XInterface xStartAt, [in] com::sun::star::util::XSearchDescriptor xDesc)
 searches the contained texts for the next occurrence of whatever is specified. More...
 
- Public Member Functions inherited from XInterface
any queryInterface ([in] type aType)
 queries for a new interface to an existing UNO object. More...
 
void acquire ()
 increases the reference counter by one. More...
 
void release ()
 decreases the reference counter by one. More...
 

Detailed Description

makes it possible to replace strings in a text described by a SearchDescriptor.

Example: replace all bold words "search for" by "look for"

xReplaceDescr = xDocument.createReplaceDescriptor()
xReplaceDescr.SearchString = "search for"
xReplaceDescr.ReplaceString = "look for"
xFound = xDocument.replaceAll( xReplaceDescr )
Developers Guide
Text Documents - Navigating - Search and Replace
Spreadsheet Documents - Search and Replace

Member Function Documentation

◆ createReplaceDescriptor()

com::sun::star::util::XReplaceDescriptor createReplaceDescriptor ( )

creates a descriptor which contains properties that specify a search in this container.

See also
SearchDescriptor

◆ replaceAll()

long replaceAll ( [in] com::sun::star::util::XSearchDescriptor  xDesc)

searches for all occurrences of whatever is specified.

See also
SearchDescriptor

The documentation for this interface was generated from the following file: