void SpellDialogChildWindow::GetFocus()
{ // In order to detect a cursor movement we could compare the // currently selected text shape with the one that was selected // when LoseFocus() was called the last time. // For the time being we instead rely on the DetectChange() method // in the SdOutliner class.
}
void SpellDialogChildWindow::LoseFocus()
{
}
void SpellDialogChildWindow::EndSpellingAndClearOutliner()
{ if (!mpSdOutliner) return;
EndListening(mpSdOutliner->GetDoc());
mpSdOutliner->EndSpelling(); if (mbOwnOutliner) delete mpSdOutliner;
mpSdOutliner = nullptr;
mbOwnOutliner = false;
}
ViewShell* pViewShell = pViewShellBase->GetMainViewShell().get(); // If there already exists an outliner that has been created // for another view shell then destroy it first. if (mpSdOutliner != nullptr) if(( dynamic_cast< const DrawViewShell *>( pViewShell ) != nullptr && ! mbOwnOutliner)
|| (dynamic_cast< const OutlineViewShell *>( pViewShell ) != nullptr && mbOwnOutliner))
{
EndSpellingAndClearOutliner();
}
// Now create/get an outliner if none is present. if (mpSdOutliner != nullptr) return;
if( dynamic_cast< const DrawViewShell *>( pViewShell ) != nullptr)
{ // We need an outliner for the spell check so we have // to create one.
mbOwnOutliner = true;
SdDrawDocument *pDoc = pViewShell->GetDoc();
mpSdOutliner = new SdOutliner(*pDoc, OutlinerMode::TextObject);
StartListening(*pDoc);
} elseif( dynamic_cast< const OutlineViewShell *>( pViewShell ) != nullptr)
{ // An outline view is already visible. The SdOutliner // will use it instead of creating its own.
mbOwnOutliner = false;
SdDrawDocument *pDoc = pViewShell->GetDoc();
mpSdOutliner = pDoc->GetOutliner();
StartListening(*pDoc);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.