20#include <SpellDialogChildWindow.hxx>
21#include <svx/svxids.hrc>
39 :
svx::SpellDialogChildWindow (_pParent,
nId, pBindings),
40 mpSdOutliner (nullptr),
46SpellDialogChildWindow::~SpellDialogChildWindow()
48 EndSpellingAndClearOutliner();
53 return svx::SpellDialogChildWindow::GetInfo();
56void SpellDialogChildWindow::InvalidateSpellDialog()
65 if (mpSdOutliner !=
nullptr)
68 aResult = mpSdOutliner->GetNextSpellSentence();
73void SpellDialogChildWindow::ApplyChangedSentence (
76 if (mpSdOutliner !=
nullptr)
79 if (pOutlinerView !=
nullptr)
80 mpSdOutliner->ApplyChangedSentence (
86void SpellDialogChildWindow::GetFocus()
95void SpellDialogChildWindow::LoseFocus()
99void SpellDialogChildWindow::EndSpellingAndClearOutliner()
103 EndListening(*mpSdOutliner->GetDoc());
104 mpSdOutliner->EndSpelling();
107 mpSdOutliner =
nullptr;
108 mbOwnOutliner =
false;
113 if (rHint.
GetId() != SfxHintId::ThisIsAnSdrHint)
116 if (SdrHintKind::ModelCleared == pSdrHint->
GetKind())
118 EndSpellingAndClearOutliner();
122void SpellDialogChildWindow::ProvideOutliner()
126 if (pViewShellBase ==
nullptr)
132 if (mpSdOutliner !=
nullptr)
133 if((
dynamic_cast< const DrawViewShell *
>( pViewShell ) !=
nullptr && ! mbOwnOutliner)
134 || (
dynamic_cast< const OutlineViewShell *
>( pViewShell ) !=
nullptr && mbOwnOutliner))
136 EndSpellingAndClearOutliner();
140 if (mpSdOutliner !=
nullptr)
143 if(
dynamic_cast< const DrawViewShell *
>( pViewShell ) !=
nullptr)
147 mbOwnOutliner =
true;
149 mpSdOutliner =
new SdOutliner(pDoc, OutlinerMode::TextObject);
156 mbOwnOutliner =
false;
163 if (mpSdOutliner !=
nullptr)
165 mpSdOutliner->PrepareSpelling();
166 mpSdOutliner->StartSpelling();
EditView & GetEditView() const
SAL_DLLPRIVATE SdOutliner * GetOutliner(bool bCreateOutliner=true)
The main purpose of this class is searching and replacing as well as spelling of impress documents.
SdrHintKind GetKind() const
static SAL_WARN_UNUSED_RESULT SfxViewShell * Current()
Base class of the stacked shells that provide graphical views to Draw and Impress documents and editi...
Show a textual overview of the text contents of all slides.
SpellDialogChildWindow(vcl::Window *pParent, sal_uInt16 nId, SfxBindings *pBindings, SfxChildWinInfo *pInfo)
SfxViewShell descendant that the stacked Draw/Impress shells are based on.
std::shared_ptr< ViewShell > GetMainViewShell() const
Return the main view shell stacked on the called ViewShellBase object.
Base class of the stacked shell hierarchy.
SdDrawDocument * GetDoc() const
void InvalidateSpellDialog()
SFX_IMPL_CHILDWINDOW_WITHID(SearchResultsDlgWrapper, SID_SEARCH_RESULTS_DIALOG)
std::vector< SpellPortion > SpellPortions