LibreOffice Module sw (master) 1
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
SwVbaFind Class Reference

#include <vbafind.hxx>

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

Public Member Functions

virtual ~SwVbaFind () override
 
virtual OUString SAL_CALL getText () override
 
virtual void SAL_CALL setText (const OUString &_text) override
 
virtual css::uno::Any SAL_CALL getReplacement () override
 
virtual void SAL_CALL setReplacement (const css::uno::Any &_replacement) override
 
virtual sal_Bool SAL_CALL getForward () override
 
virtual void SAL_CALL setForward (sal_Bool _forward) override
 
virtual ::sal_Int32 SAL_CALL getWrap () override
 
virtual void SAL_CALL setWrap (::sal_Int32 _wrap) override
 
virtual sal_Bool SAL_CALL getFormat () override
 
virtual void SAL_CALL setFormat (sal_Bool _format) override
 
virtual sal_Bool SAL_CALL getMatchCase () override
 
virtual void SAL_CALL setMatchCase (sal_Bool _matchcase) override
 
virtual sal_Bool SAL_CALL getMatchWholeWord () override
 
virtual void SAL_CALL setMatchWholeWord (sal_Bool _matchwholeword) override
 
virtual sal_Bool SAL_CALL getMatchWildcards () override
 
virtual void SAL_CALL setMatchWildcards (sal_Bool _matchwildcards) override
 
virtual sal_Bool SAL_CALL getMatchSoundsLike () override
 
virtual void SAL_CALL setMatchSoundsLike (sal_Bool _matchsoundslike) override
 
virtual sal_Bool SAL_CALL getMatchAllWordForms () override
 
virtual void SAL_CALL setMatchAllWordForms (sal_Bool _matchallwordforms) override
 
virtual css::uno::Any SAL_CALL getStyle () override
 
virtual void SAL_CALL setStyle (const css::uno::Any &_style) override
 
virtual sal_Bool SAL_CALL Execute (const css::uno::Any &FindText, const css::uno::Any &MatchCase, const css::uno::Any &MatchWholeWord, const css::uno::Any &MatchWildcards, const css::uno::Any &MatchSoundsLike, const css::uno::Any &MatchAllWordForms, const css::uno::Any &Forward, const css::uno::Any &Wrap, const css::uno::Any &Format, const css::uno::Any &ReplaceWith, const css::uno::Any &Replace, const css::uno::Any &MatchKashida, const css::uno::Any &MatchDiacritics, const css::uno::Any &MatchAlefHamza, const css::uno::Any &MatchControl, const css::uno::Any &MatchPrefix, const css::uno::Any &MatchSuffix, const css::uno::Any &MatchPhrase, const css::uno::Any &IgnoreSpace, const css::uno::Any &IgnorePunct) override
 
virtual void SAL_CALL ClearFormatting () override
 
virtual OUString getServiceImplName () override
 
virtual css::uno::Sequence< OUString > getServiceNames () override
 
- Public Member Functions inherited from InheritedHelperInterfaceWeakImpl< typename... Ifc >
 InheritedHelperInterfaceWeakImpl (const css::uno::Reference< ov::XHelperInterface > &xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext)
 
- Public Member Functions inherited from InheritedHelperInterfaceImpl< ::cppu::WeakImplHelper< Ifc... > >
 InheritedHelperInterfaceImpl (const css::uno::Reference< ov::XHelperInterface > &xParent, css::uno::Reference< css::uno::XComponentContext > xContext)
 
virtual OUString getServiceImplName ()=0
 
virtual css::uno::Sequence< OUString > getServiceNames ()=0
 
virtual ::sal_Int32 SAL_CALL getCreator () override
 
virtual css::uno::Reference< ov::XHelperInterface > SAL_CALL getParent () override
 
virtual css::uno::Any SAL_CALL Application () override
 
virtual OUString SAL_CALL getImplementationName () override
 
virtual sal_Bool SAL_CALL supportsService (const OUString &ServiceName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 

Static Public Member Functions

static css::uno::Reference< ooo::vba::word::XFind > GetOrCreateFind (const css::uno::Reference< ooo::vba::XHelperInterface > &rParent, const css::uno::Reference< com::sun::star::uno::XComponentContext > &rContext, const css::uno::Reference< com::sun::star::frame::XModel > &xModel, const css::uno::Reference< css::text::XTextRange > &xTextRange)
 

Private Member Functions

bool InRange (const css::uno::Reference< css::text::XTextRange > &xCurrentRange)
 
bool InEqualRange (const css::uno::Reference< css::text::XTextRange > &xCurrentRange)
 
void SetReplace (sal_Int32 type)
 
void SetReplaceWith (const OUString &rText)
 
OUString GetReplaceWith ()
 
css::uno::Reference< css::text::XTextRange > FindOneElement ()
 
bool SearchReplace ()
 
 SwVbaFind (const css::uno::Reference< ooo::vba::XHelperInterface > &rParent, const css::uno::Reference< css::uno::XComponentContext > &rContext, css::uno::Reference< css::frame::XModel > xModel)
 

Private Attributes

css::uno::Reference< css::frame::XModel > mxModel
 
css::uno::Reference< css::text::XTextRange > mxTextRange
 
css::uno::Reference< css::util::XReplaceable > mxReplaceable
 
css::uno::Reference< css::util::XPropertyReplace > mxPropertyReplace
 
css::uno::Reference< css::text::XTextViewCursor > mxTVC
 
css::uno::Reference< css::view::XSelectionSupplier > mxSelSupp
 
bool mbReplace
 
sal_Int32 mnReplaceType
 
sal_Int32 mnWrap
 

Additional Inherited Members

- Protected Attributes inherited from InheritedHelperInterfaceImpl< ::cppu::WeakImplHelper< Ifc... > >
css::uno::WeakReference< ov::XHelperInterface > mxParent
 
css::uno::Reference< css::uno::XComponentContext > mxContext
 

Detailed Description

Definition at line 32 of file vbafind.hxx.

Constructor & Destructor Documentation

◆ SwVbaFind()

SwVbaFind::SwVbaFind ( const css::uno::Reference< ooo::vba::XHelperInterface > &  rParent,
const css::uno::Reference< css::uno::XComponentContext > &  rContext,
css::uno::Reference< css::frame::XModel >  xModel 
)
private
Exceptions
css::uno::RuntimeException

Definition at line 34 of file vbafind.cxx.

References ooo::vba::word::getXTextViewCursor(), mxModel, mxModel, mxPropertyReplace, mxReplaceable, mxSelSupp, mxTVC, and xModel.

Referenced by GetOrCreateFind().

◆ ~SwVbaFind()

SwVbaFind::~SwVbaFind ( )
overridevirtual

Definition at line 43 of file vbafind.cxx.

Member Function Documentation

◆ ClearFormatting()

void SAL_CALL SwVbaFind::ClearFormatting ( )
overridevirtual

Definition at line 409 of file vbafind.cxx.

References mxPropertyReplace.

◆ Execute()

sal_Bool SAL_CALL SwVbaFind::Execute ( const css::uno::Any &  FindText,
const css::uno::Any &  MatchCase,
const css::uno::Any &  MatchWholeWord,
const css::uno::Any &  MatchWildcards,
const css::uno::Any &  MatchSoundsLike,
const css::uno::Any &  MatchAllWordForms,
const css::uno::Any &  Forward,
const css::uno::Any &  Wrap,
const css::uno::Any &  Format,
const css::uno::Any &  ReplaceWith,
const css::uno::Any &  Replace,
const css::uno::Any &  MatchKashida,
const css::uno::Any &  MatchDiacritics,
const css::uno::Any &  MatchAlefHamza,
const css::uno::Any &  MatchControl,
const css::uno::Any &  MatchPrefix,
const css::uno::Any &  MatchSuffix,
const css::uno::Any &  MatchPhrase,
const css::uno::Any &  IgnoreSpace,
const css::uno::Any &  IgnorePunct 
)
overridevirtual

◆ FindOneElement()

uno::Reference< text::XTextRange > SwVbaFind::FindOneElement ( )
private
Exceptions
css::uno::RuntimeException

Definition at line 95 of file vbafind.cxx.

References getForward(), getWrap(), InEqualRange(), InRange(), mxPropertyReplace, mxReplaceable, mxTextRange, and mxTVC.

Referenced by SearchReplace().

◆ getFormat()

sal_Bool SAL_CALL SwVbaFind::getFormat ( )
overridevirtual

Definition at line 243 of file vbafind.cxx.

References mxPropertyReplace.

◆ getForward()

sal_Bool SAL_CALL SwVbaFind::getForward ( )
overridevirtual

Definition at line 218 of file vbafind.cxx.

References mxPropertyReplace.

Referenced by FindOneElement().

◆ getMatchAllWordForms()

sal_Bool SAL_CALL SwVbaFind::getMatchAllWordForms ( )
overridevirtual

Definition at line 302 of file vbafind.cxx.

References mxPropertyReplace, and value.

◆ getMatchCase()

sal_Bool SAL_CALL SwVbaFind::getMatchCase ( )
overridevirtual

Definition at line 253 of file vbafind.cxx.

References mxPropertyReplace, and value.

◆ getMatchSoundsLike()

sal_Bool SAL_CALL SwVbaFind::getMatchSoundsLike ( )
overridevirtual

Definition at line 289 of file vbafind.cxx.

References mxPropertyReplace, and value.

◆ getMatchWholeWord()

sal_Bool SAL_CALL SwVbaFind::getMatchWholeWord ( )
overridevirtual

Definition at line 265 of file vbafind.cxx.

References mxPropertyReplace, and value.

◆ getMatchWildcards()

sal_Bool SAL_CALL SwVbaFind::getMatchWildcards ( )
overridevirtual

Definition at line 277 of file vbafind.cxx.

References mxPropertyReplace, and value.

◆ GetOrCreateFind()

uno::Reference< word::XFind > SwVbaFind::GetOrCreateFind ( const css::uno::Reference< ooo::vba::XHelperInterface > &  rParent,
const css::uno::Reference< com::sun::star::uno::XComponentContext > &  rContext,
const css::uno::Reference< com::sun::star::frame::XModel > &  xModel,
const css::uno::Reference< css::text::XTextRange > &  xTextRange 
)
static

◆ getReplacement()

uno::Any SAL_CALL SwVbaFind::getReplacement ( )
overridevirtual

◆ GetReplaceWith()

OUString SwVbaFind::GetReplaceWith ( )
private
Exceptions
css::uno::RuntimeException

Definition at line 86 of file vbafind.cxx.

References mxPropertyReplace.

Referenced by SearchReplace().

◆ getServiceImplName()

OUString SwVbaFind::getServiceImplName ( )
overridevirtual

◆ getServiceNames()

uno::Sequence< OUString > SwVbaFind::getServiceNames ( )
overridevirtual

◆ getStyle()

uno::Any SAL_CALL SwVbaFind::getStyle ( )
overridevirtual

Definition at line 318 of file vbafind.cxx.

◆ getText()

OUString SAL_CALL SwVbaFind::getText ( )
overridevirtual

Definition at line 198 of file vbafind.cxx.

References mxPropertyReplace.

◆ getWrap()

sal_Int32 SAL_CALL SwVbaFind::getWrap ( )
override

Definition at line 231 of file vbafind.cxx.

References mnWrap.

Referenced by FindOneElement().

◆ InEqualRange()

bool SwVbaFind::InEqualRange ( const css::uno::Reference< css::text::XTextRange > &  xCurrentRange)
private
Exceptions
css::uno::RuntimeException

Definition at line 74 of file vbafind.cxx.

References mxTextRange.

Referenced by FindOneElement().

◆ InRange()

bool SwVbaFind::InRange ( const css::uno::Reference< css::text::XTextRange > &  xCurrentRange)
private
Exceptions
css::uno::RuntimeException

Definition at line 68 of file vbafind.cxx.

References mxTextRange.

Referenced by FindOneElement(), and SearchReplace().

◆ SearchReplace()

bool SwVbaFind::SearchReplace ( )
private
Exceptions
css::uno::RuntimeException

Definition at line 140 of file vbafind.cxx.

References FindOneElement(), GetReplaceWith(), i, InRange(), mbReplace, mnReplaceType, mnWrap, mxPropertyReplace, mxReplaceable, mxSelSupp, and result.

Referenced by Execute().

◆ setFormat()

void SAL_CALL SwVbaFind::setFormat ( sal_Bool  _format)
overridevirtual

Definition at line 248 of file vbafind.cxx.

References mxPropertyReplace.

Referenced by Execute().

◆ setForward()

void SAL_CALL SwVbaFind::setForward ( sal_Bool  _forward)
overridevirtual

Definition at line 225 of file vbafind.cxx.

References mxPropertyReplace.

Referenced by Execute().

◆ setMatchAllWordForms()

void SAL_CALL SwVbaFind::setMatchAllWordForms ( sal_Bool  _matchallwordforms)
overridevirtual

Definition at line 311 of file vbafind.cxx.

References mxPropertyReplace.

Referenced by Execute().

◆ setMatchCase()

void SAL_CALL SwVbaFind::setMatchCase ( sal_Bool  _matchcase)
overridevirtual

Definition at line 260 of file vbafind.cxx.

References mxPropertyReplace.

Referenced by Execute().

◆ setMatchSoundsLike()

void SAL_CALL SwVbaFind::setMatchSoundsLike ( sal_Bool  _matchsoundslike)
overridevirtual

Definition at line 296 of file vbafind.cxx.

References mxPropertyReplace.

Referenced by Execute().

◆ setMatchWholeWord()

void SAL_CALL SwVbaFind::setMatchWholeWord ( sal_Bool  _matchwholeword)
overridevirtual

Definition at line 272 of file vbafind.cxx.

References mxPropertyReplace.

Referenced by Execute().

◆ setMatchWildcards()

void SAL_CALL SwVbaFind::setMatchWildcards ( sal_Bool  _matchwildcards)
overridevirtual

Definition at line 284 of file vbafind.cxx.

References mxPropertyReplace.

Referenced by Execute().

◆ SetReplace()

void SwVbaFind::SetReplace ( sal_Int32  type)
private

Definition at line 90 of file vbafind.cxx.

References mbReplace, mnReplaceType, and type.

Referenced by Execute().

◆ setReplacement()

void SAL_CALL SwVbaFind::setReplacement ( const css::uno::Any &  _replacement)
overridevirtual

Definition at line 213 of file vbafind.cxx.

◆ SetReplaceWith()

void SwVbaFind::SetReplaceWith ( const OUString &  rText)
private
Exceptions
css::uno::RuntimeException

Definition at line 80 of file vbafind.cxx.

References mbReplace, and mxPropertyReplace.

Referenced by Execute().

◆ setStyle()

void SAL_CALL SwVbaFind::setStyle ( const css::uno::Any &  _style)
overridevirtual

Definition at line 323 of file vbafind.cxx.

◆ setText()

void SAL_CALL SwVbaFind::setText ( const OUString &  _text)
overridevirtual

Definition at line 203 of file vbafind.cxx.

References mxPropertyReplace.

Referenced by Execute().

◆ setWrap()

void SAL_CALL SwVbaFind::setWrap ( ::sal_Int32  _wrap)
overridevirtual

Definition at line 237 of file vbafind.cxx.

References mnWrap.

Referenced by Execute().

Member Data Documentation

◆ mbReplace

bool SwVbaFind::mbReplace
private

Definition at line 41 of file vbafind.hxx.

Referenced by SearchReplace(), SetReplace(), and SetReplaceWith().

◆ mnReplaceType

sal_Int32 SwVbaFind::mnReplaceType
private

Definition at line 42 of file vbafind.hxx.

Referenced by SearchReplace(), and SetReplace().

◆ mnWrap

sal_Int32 SwVbaFind::mnWrap
private

Definition at line 43 of file vbafind.hxx.

Referenced by getWrap(), SearchReplace(), and setWrap().

◆ mxModel

css::uno::Reference< css::frame::XModel > SwVbaFind::mxModel
private

Definition at line 35 of file vbafind.hxx.

Referenced by SwVbaFind().

◆ mxPropertyReplace

css::uno::Reference< css::util::XPropertyReplace> SwVbaFind::mxPropertyReplace
private

◆ mxReplaceable

css::uno::Reference< css::util::XReplaceable > SwVbaFind::mxReplaceable
private

Definition at line 37 of file vbafind.hxx.

Referenced by FindOneElement(), SearchReplace(), and SwVbaFind().

◆ mxSelSupp

css::uno::Reference< css::view::XSelectionSupplier> SwVbaFind::mxSelSupp
private

Definition at line 40 of file vbafind.hxx.

Referenced by SearchReplace(), and SwVbaFind().

◆ mxTextRange

css::uno::Reference< css::text::XTextRange > SwVbaFind::mxTextRange
private

Definition at line 36 of file vbafind.hxx.

Referenced by FindOneElement(), InEqualRange(), and InRange().

◆ mxTVC

css::uno::Reference< css::text::XTextViewCursor> SwVbaFind::mxTVC
private

Definition at line 39 of file vbafind.hxx.

Referenced by FindOneElement(), and SwVbaFind().


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