GOffice.SearchReplace

g GObject.Object GObject.Object GOffice.SearchReplace GOffice.SearchReplace GObject.Object->GOffice.SearchReplace

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

error_quark ()

string (src)

verify (repl)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

ignore-case

bool

r/w

Ignore the case of letters.

is-regexp

bool

r/w

Is the search text a regular expression.

match-words

bool

r/w

Match whole words only.

preserve-case

bool

r/w

Preserve the case of letters.

replace-text

str

r/w

The text to replace with

search-text

str

r/w

The text to search for

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

base

GObject.Object

r

comp_search

GOffice.Regexp

r

GOffice.Regexp

ignore_case

bool

r

consider “a” and “A” the same.

is_regexp

bool

r

search text is a regular expression.

match_words

bool

r

like grep -w.

plain_replace

bool

r

preserve_case

bool

r

like Emacs’ case-replace.

replace_text

str

r

string to use as replacement/

search_text

str

r

string to replace.

Class Details

class GOffice.SearchReplace(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

GOffice.SearchReplaceClass

classmethod error_quark()
Return type:

int

string(src)
Parameters:

src (str) – the source string

Returns:

the string after search-and-replace. However, if nothing changed, None is returned.

Return type:

str or None

verify(repl)
Parameters:

repl (bool) – Check replacement part too.

Raises:

GLib.Error

Returns:

True if search-and-replace data is valid.

Return type:

bool

Property Details

GOffice.SearchReplace.props.ignore_case
Name:

ignore-case

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Ignore the case of letters.

GOffice.SearchReplace.props.is_regexp
Name:

is-regexp

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Is the search text a regular expression.

GOffice.SearchReplace.props.match_words
Name:

match-words

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Match whole words only.

GOffice.SearchReplace.props.preserve_case
Name:

preserve-case

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Preserve the case of letters.

GOffice.SearchReplace.props.replace_text
Name:

replace-text

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The text to replace with

GOffice.SearchReplace.props.search_text
Name:

search-text

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The text to search for