LibreOffice Module svx (master) 1
Public Member Functions | Protected Member Functions | Private Attributes | Friends | List of all members
svx::SpellDialogChildWindow Class Referenceabstract

The child window wrapper of the actual spelling dialog. More...

#include <SpellDialogChildWindow.hxx>

Inheritance diagram for svx::SpellDialogChildWindow:
[legend]
Collaboration diagram for svx::SpellDialogChildWindow:
[legend]

Public Member Functions

 SpellDialogChildWindow (vcl::Window *pParent, sal_uInt16 nId, SfxBindings *pBindings)
 
virtual ~SpellDialogChildWindow () override
 
- Public Member Functions inherited from SfxChildWindow
virtual ~SfxChildWindow ()
 
void Destroy ()
 
vcl::WindowGetWindow () const
 
void SetController (std::shared_ptr< SfxDialogController > controller)
 
void ClearController ()
 
std::shared_ptr< SfxDialogController > & GetController ()
 
const std::shared_ptr< SfxDialogController > & GetController () const
 
vcl::WindowGetParent () const
 
SfxChildAlignment GetAlignment () const
 
void SetAlignment (SfxChildAlignment eAlign)
 
virtual void Hide ()
 
virtual void Show (ShowFlags nFlags)
 
sal_uInt16 GetPosition () const
 
sal_uInt16 GetType () const
 
virtual SfxChildWinInfo GetInfo () const
 
void SaveStatus (const SfxChildWinInfo &rInfo)
 
void SetHideNotDelete (bool bOn)
 
bool IsHideNotDelete () const
 
bool IsVisible () const
 
void SetWantsFocus (bool)
 
bool WantsFocus () const
 
virtual bool QueryClose ()
 
const css::uno::Reference< css::frame::XFrame > & GetFrame () const
 
void SetFrame (const css::uno::Reference< css::frame::XFrame > &)
 
void SetVisible_Impl (bool bVis)
 
SAL_DLLPRIVATE void SetWorkWindow_Impl (SfxWorkWindow *)
 
SAL_DLLPRIVATE void Activate_Impl ()
 
SAL_DLLPRIVATE void SetFactory_Impl (const SfxChildWinFactory *)
 

Protected Member Functions

virtual SpellPortions GetNextWrongSentence (bool bRecheck)=0
 This abstract method has to be defined by a derived class. More...
 
virtual void ApplyChangedSentence (const SpellPortions &rChanged, bool bRecheck)=0
 This abstract method applies the changes made in the spelling dialog to the document. More...
 
virtual bool HasAutoCorrection ()
 This methods determines whether the application supports AutoCorrection. More...
 
virtual void AddAutoCorrection (const OUString &rOld, const OUString &rNew, LanguageType eLanguage)
 This method adds a word pair to the AutoCorrection - if available. More...
 
virtual bool HasGrammarChecking ()
 Return the sfx bindings for this child window. More...
 
virtual bool IsGrammarChecking ()
 determines if grammar checking is switched on More...
 
virtual void SetGrammarChecking (bool bOn)
 switches grammar checking on/off More...
 
SfxBindingsGetBindings () const
 
void InvalidateSpellDialog ()
 Set the spell dialog into the 'resume' state. More...
 
virtual void GetFocus ()=0
 Notifies the ChildWindow about the get focus event. More...
 
virtual void LoseFocus ()=0
 Notifies the ChildWindow about the lose focus event. More...
 
- Protected Member Functions inherited from SfxChildWindow
void SetWindow (const VclPtr< vcl::Window > &p)
 
 SfxChildWindow (vcl::Window *pParentWindow, sal_uInt16 nId)
 

Private Attributes

VclPtr< AbstractSpellDialogm_xAbstractSpellDialog
 

Friends

class SpellDialog
 

Additional Inherited Members

- Static Public Member Functions inherited from SfxChildWindow
static void RegisterChildWindow (SfxModule *, const SfxChildWinFactory &)
 
static std::unique_ptr< SfxChildWindowCreateChildWindow (sal_uInt16, vcl::Window *, SfxBindings *, SfxChildWinInfo const &)
 
static SAL_DLLPRIVATE void InitializeChildWinFactory_Impl (sal_uInt16, SfxChildWinInfo &)
 

Detailed Description

The child window wrapper of the actual spelling dialog.

To use the spelling dialog in an application you have to do the usual things:

  1. Call this class' RegisterChildWindow() method with the module as second argument that you want the dialog included in.
  2. In the SFX_IMPL_INTERFACE implementation of the view shell that wants to use the dialog call RegisterChildWindow() with the id returned by this class' GetChildWindowId() method.
  3. Include the item associated with this child window to the SDI description of the view shell.

Definition at line 44 of file SpellDialogChildWindow.hxx.

Constructor & Destructor Documentation

◆ SpellDialogChildWindow()

svx::SpellDialogChildWindow::SpellDialogChildWindow ( vcl::Window pParent,
sal_uInt16  nId,
SfxBindings pBindings 
)

◆ ~SpellDialogChildWindow()

svx::SpellDialogChildWindow::~SpellDialogChildWindow ( )
overridevirtual

Member Function Documentation

◆ AddAutoCorrection()

void svx::SpellDialogChildWindow::AddAutoCorrection ( const OUString &  rOld,
const OUString &  rNew,
LanguageType  eLanguage 
)
protectedvirtual

This method adds a word pair to the AutoCorrection - if available.

Definition at line 65 of file SpellDialogChildWindow.cxx.

◆ ApplyChangedSentence()

virtual void svx::SpellDialogChildWindow::ApplyChangedSentence ( const SpellPortions rChanged,
bool  bRecheck 
)
protectedpure virtual

This abstract method applies the changes made in the spelling dialog to the document.

The dialog always updates its settings when it gets the focus. The document can rely on the fact that the methods ApplyChangedSentence() is called for the position that the last GetNextWrongSentence() returned. If 'bRecheck' is set to true then the same sentence should be rechecked once from the start. This should be used to find errors that the user has introduced by manual changes in the edit field, and in order to not miss the still following errors in that sentence.

References GetBindings().

◆ GetBindings()

SfxBindings & svx::SpellDialogChildWindow::GetBindings ( ) const
protected

Definition at line 47 of file SpellDialogChildWindow.cxx.

References m_xAbstractSpellDialog.

◆ GetFocus()

virtual void svx::SpellDialogChildWindow::GetFocus ( )
protectedpure virtual

Notifies the ChildWindow about the get focus event.

The ChildWindow should no check if the spelling dialog should be set to the 'Resume' state by calling InvalidateSpellDialog()

◆ GetNextWrongSentence()

virtual SpellPortions svx::SpellDialogChildWindow::GetNextWrongSentence ( bool  bRecheck)
protectedpure virtual

This abstract method has to be defined by a derived class.

It returns the next wrong sentence.

Returns
returns an empty vector if no error could be found

◆ HasAutoCorrection()

bool svx::SpellDialogChildWindow::HasAutoCorrection ( )
protectedvirtual

This methods determines whether the application supports AutoCorrection.

Definition at line 60 of file SpellDialogChildWindow.cxx.

◆ HasGrammarChecking()

bool svx::SpellDialogChildWindow::HasGrammarChecking ( )
protectedvirtual

Return the sfx bindings for this child window.

They are retrieved from the dialog so they do not have to be stored in this class as well. The bindings may be necessary to be used by the abstract methods. This method determines if grammar checking is supported

Definition at line 73 of file SpellDialogChildWindow.cxx.

◆ InvalidateSpellDialog()

void svx::SpellDialogChildWindow::InvalidateSpellDialog ( )
protected

Set the spell dialog into the 'resume' state.

This method should be called to notify the SpellDialog about changes in the document that invalidate the current state which results in disabling most of the dialog controls and presenting a "Resume" button that initiates a reinitialization.

Definition at line 53 of file SpellDialogChildWindow.cxx.

References m_xAbstractSpellDialog.

◆ IsGrammarChecking()

bool svx::SpellDialogChildWindow::IsGrammarChecking ( )
protectedvirtual

determines if grammar checking is switched on

Definition at line 78 of file SpellDialogChildWindow.cxx.

◆ LoseFocus()

virtual void svx::SpellDialogChildWindow::LoseFocus ( )
protectedpure virtual

Notifies the ChildWindow about the lose focus event.

The ChildWindow should use it to save the current selection/state.

◆ SetGrammarChecking()

void svx::SpellDialogChildWindow::SetGrammarChecking ( bool  bOn)
protectedvirtual

switches grammar checking on/off

Definition at line 84 of file SpellDialogChildWindow.cxx.

Friends And Related Function Documentation

◆ SpellDialog

friend class SpellDialog
friend

Definition at line 46 of file SpellDialogChildWindow.hxx.

Member Data Documentation

◆ m_xAbstractSpellDialog

VclPtr<AbstractSpellDialog> svx::SpellDialogChildWindow::m_xAbstractSpellDialog
private

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