LibreOffice Module cui (master) 1
|
#include <SpellDialog.hxx>
Public Member Functions | |
SentenceEditWindow_Impl () | |
virtual void | SetDrawingArea (weld::DrawingArea *pDrawingArea) override |
void | SetSpellDialog (SpellDialog *pDialog) |
virtual | ~SentenceEditWindow_Impl () override |
void | Init (weld::Toolbar *pToolbar) |
void | SetModifyHdl (const Link< LinkParamNone *, void > &rLink) |
void | SetAttrib (const SfxPoolItem &rItem, sal_Int32 nStart, sal_Int32 nEnd) |
void | SetText (const OUString &rStr) |
bool | MarkNextError (bool bIgnoreCurrentError, const css::uno::Reference< css::linguistic2::XSpellChecker1 > &) |
int | ChangeMarkedWord (const OUString &rNewWord, LanguageType eLanguage) |
void | MoveErrorMarkTo (sal_Int32 nErrorStart, sal_Int32 nErrorEnd, bool bGrammar) |
OUString | GetErrorText () const |
void | RestoreCurrentError () |
void | SetAlternatives (const css::uno::Reference< css::linguistic2::XSpellAlternatives > &) |
bool | GetAlternatives (SpellErrorDescription &rDesc) |
void | ClearModifyFlag () |
void | ResetModified () |
bool | IsModified () const |
bool | IsUndoEditMode () const |
void | SetUndoEditMode (bool bSet) |
svx::SpellPortions | CreateSpellPortions () const |
void | ResetUndo () |
void | Undo () |
void | AddUndoAction (std::unique_ptr< SfxUndoAction > pAction) |
size_t | GetUndoActionCount () const |
void | UndoActionStart (sal_uInt16 nId) |
void | UndoActionEnd () |
void | MoveErrorEnd (tools::Long nOffset) |
void | ResetIgnoreErrorsAt () |
Public Member Functions inherited from WeldEditView | |
WeldEditView () | |
virtual void | SetDrawingArea (weld::DrawingArea *pDrawingArea) override |
virtual int | GetSurroundingText (OUString &rSurrounding) override |
virtual bool | DeleteSurroundingText (const Selection &rRange) override |
void | SetText (const OUString &rStr) |
OUString | GetText () const |
virtual FactoryFunction | GetUITestFactory () const override |
void | SetModifyHdl (const Link< LinkParamNone *, void > &rLink) |
virtual EditView * | GetEditView () const |
virtual EditEngine * | GetEditEngine () const |
bool | HasSelection () const |
void | Delete () |
void | Cut () |
void | Copy () |
void | Paste () |
virtual | ~WeldEditView () override |
virtual void | Paint (vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override |
virtual bool | MouseMove (const MouseEvent &rMEvt) override |
virtual bool | MouseButtonDown (const MouseEvent &rMEvt) override |
virtual bool | MouseButtonUp (const MouseEvent &rMEvt) override |
virtual bool | KeyInput (const KeyEvent &rKEvt) override |
virtual bool | Command (const CommandEvent &rCEvt) override |
virtual bool | CanFocus () const |
virtual void | GetFocus () override |
virtual void | LoseFocus () override |
virtual void | Resize () override |
virtual css::uno::Reference< css::datatransfer::clipboard::XClipboard > | GetClipboard () const override |
virtual css::uno::Reference< css::datatransfer::dnd::XDropTarget > | GetDropTarget () override |
bool | GetAcceptsTab () const |
void | SetAcceptsTab (bool bAcceptsTab) |
Protected Member Functions | |
virtual bool | KeyInput (const KeyEvent &rKEvt) override |
Protected Member Functions inherited from WeldEditView | |
virtual void | makeEditEngine () |
void | InitAccessible () |
void | DoPaint (vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) |
virtual css::uno::Reference< css::accessibility::XAccessible > | CreateAccessible () override |
virtual void | EditViewInvalidate (const tools::Rectangle &rRect) override |
virtual void | EditViewSelectionChange () override |
virtual OutputDevice & | EditViewOutputDevice () const override |
virtual Point | EditViewPointerPosPixel () const override |
virtual void | EditViewInputContext (const InputContext &rInputContext) override |
virtual void | EditViewCursorRect (const tools::Rectangle &rRect, int nExtTextInputWidth) override |
virtual weld::Widget * | EditViewPopupParent () const override |
Private Member Functions | |
void | CallModifyLink () |
SpellDialog * | GetSpellDialog () const |
bool | GetErrorDescription (SpellErrorDescription &rSpellErrorDescription, sal_Int32 nPosition) |
DECL_LINK (ToolbarHdl, const OUString &, void) | |
Private Attributes | |
std::set< sal_Int32 > | m_aIgnoreErrorsAt |
SpellDialog * | m_pSpellDialog |
weld::Toolbar * | m_pToolbar |
sal_Int32 | m_nErrorStart |
sal_Int32 | m_nErrorEnd |
bool | m_bIsUndoEditMode |
Link< LinkParamNone *, void > | m_aModifyLink |
Additional Inherited Members | |
Protected Attributes inherited from WeldEditView | |
bool | m_bAcceptsTab |
css::uno::Reference< css::datatransfer::dnd::XDropTarget > | m_xDropTarget |
std::unique_ptr< EditEngine > | m_xEditEngine |
std::unique_ptr< EditView > | m_xEditView |
rtl::Reference< WeldEditAccessible > | m_xAccessible |
Definition at line 46 of file SpellDialog.hxx.
SentenceEditWindow_Impl::SentenceEditWindow_Impl | ( | ) |
Definition at line 1132 of file SpellDialog.cxx.
|
overridevirtual |
Definition at line 1158 of file SpellDialog.cxx.
void SentenceEditWindow_Impl::AddUndoAction | ( | std::unique_ptr< SfxUndoAction > | pAction | ) |
Definition at line 2036 of file SpellDialog.cxx.
References SfxUndoManager::AddUndoAction(), GetSpellDialog(), WeldEditView::m_xEditEngine, and svx::SpellDialog::m_xUndoPB.
Referenced by ChangeMarkedWord(), MarkNextError(), and SetUndoEditMode().
|
inlineprivate |
Definition at line 58 of file SpellDialog.hxx.
References Link< typename Arg, typename Ret >::Call(), and m_aModifyLink.
Referenced by KeyInput().
int SentenceEditWindow_Impl::ChangeMarkedWord | ( | const OUString & | rNewWord, |
LanguageType | eLanguage | ||
) |
Definition at line 1715 of file SpellDialog.cxx.
References AddUndoAction(), SfxPoolItem::Clone(), DBG_ASSERT, EE_CHAR_BKGCOLOR(), EE_CHAR_GRABBAG(), EE_CHAR_LANGUAGE(), SfxGrabBagItem::GetGrabBag(), GetLanguage(), GetSpellDialog(), m_nErrorEnd, m_nErrorStart, WeldEditView::m_xEditEngine, EECharAttrib::nEnd, EECharAttrib::nStart, EECharAttrib::pAttr, SetAttrib(), SPELLUNDO_MOVE_ERROREND, and svx::SpellErrorDescription::toSequence().
Referenced by MarkNextError(), and RestoreCurrentError().
|
inline |
Definition at line 97 of file SpellDialog.hxx.
References WeldEditView::m_xEditEngine.
Referenced by MarkNextError(), and ResetModified().
svx::SpellPortions SentenceEditWindow_Impl::CreateSpellPortions | ( | ) | const |
Definition at line 1906 of file SpellDialog.cxx.
References svx::SpellPortion::bIgnoreThisError, DBG_ASSERT, EE_CHAR_GRABBAG(), EE_CHAR_LANGUAGE(), svx::SpellPortion::eLanguage, GetLanguage(), svx::SpellDialog::GetSelectedLang_Impl(), GetSpellDialog(), i, LANGUAGE_DONTKNOW, lcl_InsertBreakPosition_Impl(), m_aIgnoreErrorsAt, WeldEditView::m_xEditEngine, EECharAttrib::nEnd, EECharAttrib::nStart, EECharAttrib::pAttr, and svx::SpellPortion::sText.
|
private |
bool SentenceEditWindow_Impl::GetAlternatives | ( | SpellErrorDescription & | rDesc | ) |
Definition at line 1814 of file SpellDialog.cxx.
References GetErrorDescription(), and m_nErrorStart.
|
private |
Definition at line 1800 of file SpellDialog.cxx.
References EE_CHAR_GRABBAG(), and WeldEditView::m_xEditEngine.
Referenced by GetAlternatives(), MarkNextError(), and RestoreCurrentError().
OUString SentenceEditWindow_Impl::GetErrorText | ( | ) | const |
Definition at line 1795 of file SpellDialog.cxx.
References m_nErrorEnd, m_nErrorStart, and WeldEditView::m_xEditEngine.
Referenced by MarkNextError(), and RestoreCurrentError().
|
inlineprivate |
Definition at line 60 of file SpellDialog.hxx.
References m_pSpellDialog.
Referenced by AddUndoAction(), ChangeMarkedWord(), CreateSpellPortions(), MarkNextError(), SetUndoEditMode(), and Undo().
size_t SentenceEditWindow_Impl::GetUndoActionCount | ( | ) | const |
Definition at line 2043 of file SpellDialog.cxx.
References WeldEditView::m_xEditEngine.
Referenced by Undo().
void SentenceEditWindow_Impl::Init | ( | weld::Toolbar * | pToolbar | ) |
Definition at line 1532 of file SpellDialog.cxx.
References weld::Toolbar::connect_clicked(), LINK, and m_pToolbar.
|
inline |
Definition at line 99 of file SpellDialog.hxx.
References WeldEditView::m_xEditEngine.
Referenced by MarkNextError().
|
inline |
Definition at line 101 of file SpellDialog.hxx.
References m_bIsUndoEditMode.
Referenced by KeyInput(), and Undo().
|
overrideprotectedvirtual |
Reimplemented from WeldEditView.
Definition at line 1261 of file SpellDialog.cxx.
References ACTION_CONTINUE, ACTION_EXPAND, ACTION_SELECTFIELD, ACTION_UNDOEDIT, ESelection::Adjust(), svx::SpellErrorDescription::bIsGrammarError, BRACE, CallModifyLink(), SfxPoolItem::Clone(), DBG_ASSERT, TextEngine::DoesKeyChangeText(), EE_CHAR_BKGCOLOR(), EE_CHAR_COLOR(), EE_CHAR_GRABBAG(), FULL, vcl::KeyCode::GetCode(), KeyEvent::GetKeyCode(), ESelection::HasRange(), INSIDE_NO, INSIDE_YES, INVALID, IsUndoEditMode(), KEY_BACKSPACE, KEY_DELETE, KEY_TAB, LEFT_NO, m_bIsUndoEditMode, m_nErrorEnd, m_nErrorStart, WeldEditView::m_xEditEngine, WeldEditView::m_xEditView, MoveErrorMarkTo(), EECharAttrib::nEnd, ESelection::nEndPos, EECharAttrib::nStart, ESelection::nStartPos, OUTSIDE_NO, OUTSIDE_YES, EECharAttrib::pAttr, RIGHT_NO, SAL_WARN_IF, SetAttrib(), and SetUndoEditMode().
bool SentenceEditWindow_Impl::MarkNextError | ( | bool | bIgnoreCurrentError, |
const css::uno::Reference< css::linguistic2::XSpellChecker1 > & | xSpell | ||
) |
Definition at line 1560 of file SpellDialog.cxx.
References AddUndoAction(), svx::SpellErrorDescription::aLocale, svx::SpellErrorDescription::aSuggestions, svx::SpellErrorDescription::bIsGrammarError, ChangeMarkedWord(), ClearModifyFlag(), LanguageTag::convertToLanguageType(), EE_CHAR_GRABBAG(), LinguMgr::GetChangeAllList(), GetErrorDescription(), GetErrorText(), LanguageTag::getLanguageType(), GetSpellDialog(), IsModified(), m_aIgnoreErrorsAt, m_nErrorEnd, m_nErrorStart, svx::SpellDialog::m_xAddToDictMB, svx::SpellDialog::m_xAddToDictPB, svx::SpellDialog::m_xAutoCorrPB, WeldEditView::m_xEditEngine, svx::SpellDialog::m_xIgnoreAllPB, svx::SpellDialog::m_xIgnorePB, MoveErrorMarkTo(), EECharAttrib::nEnd, EECharAttrib::nStart, svx::SpellErrorDescription::sErrorText, and SPELLUNDO_CHANGE_NEXTERROR.
void SentenceEditWindow_Impl::MoveErrorEnd | ( | tools::Long | nOffset | ) |
Definition at line 2058 of file SpellDialog.cxx.
References m_nErrorEnd.
void SentenceEditWindow_Impl::MoveErrorMarkTo | ( | sal_Int32 | nErrorStart, |
sal_Int32 | nErrorEnd, | ||
bool | bGrammar | ||
) |
Definition at line 1679 of file SpellDialog.cxx.
References ESelection::Adjust(), EE_CHAR_COLOR(), EE_CHAR_WEIGHT(), EE_CHAR_WEIGHT_CJK(), EE_CHAR_WEIGHT_CTL(), EE_TEXTPOS_ALL, svtools::ColorConfig::GetColorValue(), svtools::GRAMMAR, m_nErrorEnd, m_nErrorStart, WeldEditView::m_xEditEngine, WeldEditView::m_xEditView, svtools::ColorConfigValue::nColor, ESelection::nEndPos, ESelection::nStartPos, SfxItemSet::Put(), svtools::SPELL, and WEIGHT_BOLD.
Referenced by KeyInput(), and MarkNextError().
|
inline |
Definition at line 115 of file SpellDialog.hxx.
References m_aIgnoreErrorsAt.
|
inline |
Definition at line 98 of file SpellDialog.hxx.
References ClearModifyFlag(), and m_bIsUndoEditMode.
void SentenceEditWindow_Impl::ResetUndo | ( | ) |
Definition at line 2030 of file SpellDialog.cxx.
References SfxUndoManager::Clear(), and WeldEditView::m_xEditEngine.
void SentenceEditWindow_Impl::RestoreCurrentError | ( | ) |
Definition at line 1819 of file SpellDialog.cxx.
References svx::SpellErrorDescription::aLocale, ChangeMarkedWord(), LanguageTag::convertToLanguageType(), GetErrorDescription(), GetErrorText(), m_nErrorStart, and svx::SpellErrorDescription::sErrorText.
void SentenceEditWindow_Impl::SetAlternatives | ( | const css::uno::Reference< css::linguistic2::XSpellAlternatives > & | ) |
Definition at line 1829 of file SpellDialog.cxx.
References EE_CHAR_GRABBAG(), SfxGrabBagItem::GetGrabBag(), m_nErrorEnd, m_nErrorStart, SetAttrib(), and svx::SpellErrorDescription::toSequence().
void SentenceEditWindow_Impl::SetAttrib | ( | const SfxPoolItem & | rItem, |
sal_Int32 | nStart, | ||
sal_Int32 | nEnd | ||
) |
Definition at line 1846 of file SpellDialog.cxx.
References WeldEditView::m_xEditEngine, and SfxItemSet::Put().
Referenced by ChangeMarkedWord(), KeyInput(), and SetAlternatives().
|
overridevirtual |
Reimplemented from WeldEditView.
Definition at line 1141 of file SpellDialog.cxx.
References svtools::DOCCOLOR, weld::Widget::get_approximate_digit_width(), weld::DrawingArea::get_ref_device(), weld::Widget::get_text_height(), svtools::ColorConfig::GetColorValue(), Size::Height(), WeldEditView::m_xEditEngine, WeldEditView::m_xEditView, svtools::ColorConfigValue::nColor, weld::Widget::set_size_request(), OutputDevice::SetBackground(), WeldEditView::SetDrawingArea(), and Size::Width().
|
inline |
Definition at line 76 of file SpellDialog.hxx.
References m_aModifyLink, and WeldEditView::m_xEditEngine.
|
inline |
Definition at line 72 of file SpellDialog.hxx.
References m_pSpellDialog.
void SentenceEditWindow_Impl::SetText | ( | const OUString & | rStr | ) |
Definition at line 1854 of file SpellDialog.cxx.
References m_nErrorEnd, m_nErrorStart, and WeldEditView::m_xEditEngine.
void SentenceEditWindow_Impl::SetUndoEditMode | ( | bool | bSet | ) |
Definition at line 2068 of file SpellDialog.cxx.
References AddUndoAction(), DBG_ASSERT, EE_CHAR_COLOR(), EE_CHAR_WEIGHT(), EE_CHAR_WEIGHT_CJK(), EE_CHAR_WEIGHT_CTL(), EE_TEXTPOS_ALL, GetSpellDialog(), m_bIsUndoEditMode, svx::SpellDialog::m_xAddToDictMB, svx::SpellDialog::m_xAddToDictPB, svx::SpellDialog::m_xAutoCorrPB, svx::SpellDialog::m_xChangeAllPB, svx::SpellDialog::m_xChangePB, WeldEditView::m_xEditEngine, svx::SpellDialog::m_xExplainFT, svx::SpellDialog::m_xIgnoreAllPB, svx::SpellDialog::m_xIgnorePB, svx::SpellDialog::m_xIgnoreRulePB, svx::SpellDialog::m_xLanguageFT, svx::SpellDialog::m_xLanguageLB, svx::SpellDialog::m_xSuggestionFT, svx::SpellDialog::m_xSuggestionLB, and SPELLUNDO_UNDO_EDIT_MODE.
Referenced by KeyInput().
void SentenceEditWindow_Impl::Undo | ( | ) |
Definition at line 2011 of file SpellDialog.cxx.
References DBG_ASSERT, svx::SpellUndoAction_Impl::GetId(), GetSpellDialog(), SfxUndoManager::GetUndoAction(), GetUndoActionCount(), IsUndoEditMode(), WeldEditView::m_xEditEngine, SPELLUNDO_CHANGE_GROUP, SPELLUNDO_UNDO_EDIT_MODE, SfxUndoManager::Undo(), and svx::SpellDialog::UpdateBoxes_Impl().
void SentenceEditWindow_Impl::UndoActionEnd | ( | ) |
Definition at line 2053 of file SpellDialog.cxx.
References WeldEditView::m_xEditEngine.
void SentenceEditWindow_Impl::UndoActionStart | ( | sal_uInt16 | nId | ) |
Definition at line 2048 of file SpellDialog.cxx.
References WeldEditView::m_xEditEngine, and nId.
|
private |
Definition at line 49 of file SpellDialog.hxx.
Referenced by CreateSpellPortions(), MarkNextError(), and ResetIgnoreErrorsAt().
|
private |
Definition at line 56 of file SpellDialog.hxx.
Referenced by CallModifyLink(), and SetModifyHdl().
|
private |
Definition at line 54 of file SpellDialog.hxx.
Referenced by IsUndoEditMode(), KeyInput(), ResetModified(), and SetUndoEditMode().
|
private |
Definition at line 53 of file SpellDialog.hxx.
Referenced by ChangeMarkedWord(), GetErrorText(), KeyInput(), MarkNextError(), MoveErrorEnd(), MoveErrorMarkTo(), SetAlternatives(), and SetText().
|
private |
Definition at line 52 of file SpellDialog.hxx.
Referenced by ChangeMarkedWord(), GetAlternatives(), GetErrorText(), KeyInput(), MarkNextError(), MoveErrorMarkTo(), RestoreCurrentError(), SetAlternatives(), and SetText().
|
private |
Definition at line 50 of file SpellDialog.hxx.
Referenced by GetSpellDialog(), and SetSpellDialog().
|
private |
Definition at line 51 of file SpellDialog.hxx.
Referenced by Init().