LibreOffice Module editeng (master) 1
|
Public Member Functions | |
HangulHanjaConversion_Impl (weld::Widget *pUIParent, const Reference< XComponentContext > &rxContext, const lang::Locale &_rSourceLocale, const lang::Locale &_rTargetLocale, const vcl::Font *_pTargetFont, sal_Int32 _nConvOptions, bool _bIsInteractive, HangulHanjaConversion *_pAntiImpl) | |
void | DoDocumentConversion () |
bool | IsValid () const |
weld::Widget * | GetUIParent () const |
LanguageType | GetSourceLang () const |
LanguageType | GetTargetLang () const |
const vcl::Font * | GetTargetFont () const |
sal_Int32 | GetConvOptions () const |
bool | IsInteractive () const |
Protected Member Functions | |
void | createDialog () |
bool | ContinueConversion (bool _bRepeatCurrentUnit) |
continue with the conversion, return <TRUE> if and only if the complete conversion is done More... | |
Private Types | |
typedef std::set< OUString > | StringBag |
typedef std::map< OUString, OUString > | StringMap |
Private Member Functions | |
DECL_LINK (OnOptionsChanged, LinkParamNone *, void) | |
DECL_LINK (OnIgnore, weld::Button &, void) | |
DECL_LINK (OnIgnoreAll, weld::Button &, void) | |
DECL_LINK (OnChange, weld::Button &, void) | |
DECL_LINK (OnChangeAll, weld::Button &, void) | |
DECL_LINK (OnByCharClicked, weld::Toggleable &, void) | |
DECL_LINK (OnConversionTypeChanged, weld::Toggleable &, void) | |
DECL_LINK (OnFind, weld::Button &, void) | |
void | implProceed (bool _bRepeatCurrentUnit) |
proceed, after the current convertible has been handled More... | |
void | implChange (const OUString &_rChangeInto) |
bool | implNextConvertible (bool _bRepeatUnit) |
find the next convertible piece of text, with possibly advancing to the next portion More... | |
bool | implNextConvertibleUnit (const sal_Int32 _nStartAt) |
find the next convertible unit within the current portion More... | |
bool | implRetrieveNextPortion () |
retrieves the next portion, with setting the index members properly More... | |
bool | implGetConversionDirectionForCurrentPortion (HHC::ConversionDirection &rDirection) |
determine the ConversionDirection for m_sCurrentPortion More... | |
bool | implUpdateSuggestions (const bool _bAllowSearchNextConvertibleText=false, const sal_Int32 _nStartAt=-1) |
member m_aCurrentSuggestions and m_nCurrentEndIndex are updated according to the other settings and current dictionaries More... | |
void | implReadOptionsFromConfiguration () |
reads the options from Hangul/Hanja Options dialog that are saved to configuration More... | |
OUString | GetCurrentUnit () const |
get the string currently considered to be replaced or ignored More... | |
void | implUpdateData () |
read options from configuration, update suggestion list and dialog content More... | |
sal_Int16 | implGetConversionType (bool bSwitchDirection=false) const |
get the conversion direction dependent from m_eConvType and m_eCurrentConversionDirection in case of switching the direction is allowed this can be triggered with parameter bSwitchDirection More... | |
Static Private Attributes | |
static StringMap | m_aRecentlyUsedList = HangulHanjaConversion_Impl::StringMap() |
Definition at line 56 of file hangulhanja.cxx.
|
private |
Definition at line 59 of file hangulhanja.cxx.
|
private |
Definition at line 60 of file hangulhanja.cxx.
editeng::HangulHanjaConversion_Impl::HangulHanjaConversion_Impl | ( | weld::Widget * | pUIParent, |
const Reference< XComponentContext > & | rxContext, | ||
const lang::Locale & | _rSourceLocale, | ||
const lang::Locale & | _rTargetLocale, | ||
const vcl::Font * | _pTargetFont, | ||
sal_Int32 | _nConvOptions, | ||
bool | _bIsInteractive, | ||
HangulHanjaConversion * | _pAntiImpl | ||
) |
Definition at line 229 of file hangulhanja.cxx.
References DBG_ASSERT, implReadOptionsFromConfiguration(), LANGUAGE_CHINESE_SIMPLIFIED, LANGUAGE_CHINESE_TRADITIONAL, LANGUAGE_KOREAN, LANGUAGE_NONE, m_eConvType, m_nSourceLang, m_nTargetLang, m_xContext, m_xContext, m_xConverter, and NONE.
|
protected |
continue with the conversion, return <TRUE> if and only if the complete conversion is done
_bRepeatCurrentUnit | if <TRUE>, an implNextConvertible will be called initially to advance to the next convertible. if <FALSE>, the method will initially work with the current convertible unit |
Definition at line 523 of file hangulhanja.cxx.
References DBG_ASSERT, GetCurrentUnit(), editeng::HangulHanjaConversion::HandleNewUnit(), implChange(), implNextConvertible(), m_aChangeList, m_aCurrentSuggestions, m_bAutoReplaceUnique, m_bIsInteractive, m_nCurrentEndIndex, m_nCurrentStartIndex, m_nReplacementBaseIndex, m_pAntiImpl, m_pConversionDialog, and m_sIgnoreList.
Referenced by DoDocumentConversion(), and implProceed().
|
protected |
Definition at line 277 of file hangulhanja.cxx.
References EditAbstractDialogFactory::Create(), EditAbstractDialogFactory::CreateHangulHanjaConversionDialog(), DBG_ASSERT, editeng::HangulHanjaConversion::HasRubySupport(), LINK, m_bByCharacter, m_bIsInteractive, m_bTryBothDirections, m_eConversionFormat, m_ePrimaryConversionDirection, m_pAntiImpl, m_pConversionDialog, m_pUIParent, and OnChange.
Referenced by DoDocumentConversion().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
void editeng::HangulHanjaConversion_Impl::DoDocumentConversion | ( | ) |
Definition at line 621 of file hangulhanja.cxx.
References ContinueConversion(), createDialog(), DBG_ASSERT, VclPtr< class reference_type >::disposeAndClear(), implGetConversionDirectionForCurrentPortion(), implRetrieveNextPortion(), implUpdateData(), editeng::HangulHanjaConversion::IsUseSavedConversionDirectionState(), m_aChangeList, m_bIsInteractive, m_bTryBothDirections, editeng::HangulHanjaConversion::m_bTryBothDirectionsSave, m_eConvType, m_eCurrentConversionDirection, m_ePrimaryConversionDirection, editeng::HangulHanjaConversion::m_ePrimaryConversionDirectionSave, m_pConversionDialog, and SAL_INFO.
|
inline |
Definition at line 138 of file hangulhanja.cxx.
References m_nConvOptions.
|
private |
get the string currently considered to be replaced or ignored
Definition at line 510 of file hangulhanja.cxx.
References DBG_ASSERT, m_nCurrentEndIndex, m_nCurrentStartIndex, and m_sCurrentPortion.
Referenced by ContinueConversion(), implChange(), implUpdateData(), and implUpdateSuggestions().
|
inline |
Definition at line 135 of file hangulhanja.cxx.
References m_nSourceLang.
|
inline |
Definition at line 137 of file hangulhanja.cxx.
References m_pTargetFont.
|
inline |
Definition at line 136 of file hangulhanja.cxx.
References m_nTargetLang.
|
inline |
Definition at line 134 of file hangulhanja.cxx.
References m_pUIParent.
|
private |
Definition at line 686 of file hangulhanja.cxx.
References DBG_ASSERT, Exception, GetCurrentUnit(), editeng::HangulHanjaConversion::GetTargetLanguage(), editeng::HangulHanjaConversion::IsSimplified(), editeng::HangulHanjaConversion::IsTraditional(), LANGUAGE_CHINESE_SIMPLIFIED, LANGUAGE_CHINESE_TRADITIONAL, LANGUAGE_NONE, m_aRecentlyUsedList, m_aSourceLocale, m_eConversionFormat, m_eConvType, m_eCurrentConversionDirection, m_nCurrentConversionOption, m_nCurrentConversionType, m_nCurrentEndIndex, m_nCurrentPortionLang, m_nCurrentStartIndex, m_nReplacementBaseIndex, m_pAntiImpl, m_sCurrentPortion, m_xConverter, editeng::HangulHanjaConversion::ReplaceUnit(), and TOOLS_WARN_EXCEPTION.
Referenced by ContinueConversion().
|
private |
determine the ConversionDirection for m_sCurrentPortion
Definition at line 572 of file hangulhanja.cxx.
References Exception, CharClass::getScript(), m_aSourceLocale, m_eConvType, m_nCurrentStartIndex, m_sCurrentPortion, m_xContext, and TOOLS_WARN_EXCEPTION.
Referenced by DoDocumentConversion(), and implRetrieveNextPortion().
|
private |
get the conversion direction dependent from m_eConvType and m_eCurrentConversionDirection in case of switching the direction is allowed this can be triggered with parameter bSwitchDirection
Definition at line 303 of file hangulhanja.cxx.
References DBG_ASSERT, LANGUAGE_CHINESE_SIMPLIFIED, m_eConvType, m_eCurrentConversionDirection, and m_nTargetLang.
Referenced by implUpdateSuggestions().
|
private |
find the next convertible piece of text, with possibly advancing to the next portion
Definition at line 480 of file hangulhanja.cxx.
References implNextConvertibleUnit(), implRetrieveNextPortion(), m_nCurrentEndIndex, m_nCurrentStartIndex, and m_sCurrentPortion.
Referenced by ContinueConversion().
|
private |
find the next convertible unit within the current portion
_bRepeatUnit | if <TRUE>, the search will start at the beginning of the current unit, if <FALSE>, it will start at the end of the current unit |
Definition at line 434 of file hangulhanja.cxx.
References implUpdateSuggestions(), m_aCurrentSuggestions, m_bTryBothDirections, editeng::HangulHanjaConversion::m_bTryBothDirectionsSave, m_eConvType, m_eCurrentConversionDirection, editeng::HangulHanjaConversion::m_ePrimaryConversionDirectionSave, m_nCurrentStartIndex, m_pConversionDialog, and m_sCurrentPortion.
Referenced by implNextConvertible().
|
private |
proceed, after the current convertible has been handled
Attention: When returning from this method, the dialog may have been deleted!
_bRepeatCurrentUnit | will be passed to the <member>ContinueConversion</member> call |
Definition at line 676 of file hangulhanja.cxx.
References ContinueConversion(), DBG_ASSERT, m_bIsInteractive, m_pConversionDialog, and RET_OK.
|
private |
reads the options from Hangul/Hanja Options dialog that are saved to configuration
Definition at line 777 of file hangulhanja.cxx.
References SvtLinguConfig::GetProperty(), m_bAutoReplaceUnique, m_bIgnorePostPositionalWord, m_bShowRecentlyUsedFirst, UPH_IS_AUTO_REPLACE_UNIQUE_ENTRIES, UPH_IS_IGNORE_POST_POSITIONAL_WORD, and UPH_IS_SHOW_ENTRIES_RECENTLY_USED_FIRST.
Referenced by HangulHanjaConversion_Impl(), and implUpdateData().
|
private |
retrieves the next portion, with setting the index members properly
Definition at line 462 of file hangulhanja.cxx.
References editeng::HangulHanjaConversion::GetNextPortion(), implGetConversionDirectionForCurrentPortion(), LANGUAGE_NONE, m_bTryBothDirections, m_eConvType, m_eCurrentConversionDirection, m_nCurrentEndIndex, m_nCurrentPortionLang, m_nCurrentStartIndex, m_nReplacementBaseIndex, m_pAntiImpl, and m_sCurrentPortion.
Referenced by DoDocumentConversion(), and implNextConvertible().
|
private |
read options from configuration, update suggestion list and dialog content
Definition at line 785 of file hangulhanja.cxx.
References GetCurrentUnit(), editeng::HangulHanjaConversion::HandleNewUnit(), implReadOptionsFromConfiguration(), implUpdateSuggestions(), m_aCurrentSuggestions, m_nCurrentEndIndex, m_nCurrentStartIndex, m_nReplacementBaseIndex, m_pAntiImpl, and m_pConversionDialog.
Referenced by DoDocumentConversion().
|
private |
member m_aCurrentSuggestions and m_nCurrentEndIndex are updated according to the other settings and current dictionaries
if _bAllowSearchNextConvertibleText is true _nStartAt is used as starting point to search the next convertible text portion. This may result in changing of the member m_nCurrentStartIndex additionally.
!! at least we want to move on in the text in order !! to avoid an endless loop...
Definition at line 314 of file hangulhanja.cxx.
References Exception, GetCurrentUnit(), implGetConversionType(), m_aCurrentSuggestions, m_aRecentlyUsedList, m_aSourceLocale, m_bByCharacter, m_bIgnorePostPositionalWord, m_bShowRecentlyUsedFirst, m_bTryBothDirections, m_eConvType, m_eCurrentConversionDirection, m_nCurrentConversionOption, m_nCurrentConversionType, m_nCurrentEndIndex, m_nCurrentStartIndex, m_sCurrentPortion, m_xConverter, n, nCount, nLength, and TOOLS_WARN_EXCEPTION.
Referenced by implNextConvertibleUnit(), and implUpdateData().
|
inline |
Definition at line 139 of file hangulhanja.cxx.
References m_bIsInteractive.
|
inline |
Definition at line 132 of file hangulhanja.cxx.
References m_xConverter.
|
private |
Definition at line 64 of file hangulhanja.cxx.
Referenced by ContinueConversion(), and DoDocumentConversion().
|
private |
Definition at line 113 of file hangulhanja.cxx.
Referenced by ContinueConversion(), implNextConvertibleUnit(), implUpdateData(), and implUpdateSuggestions().
|
staticprivate |
Definition at line 65 of file hangulhanja.cxx.
Referenced by implChange(), and implUpdateSuggestions().
|
private |
Definition at line 75 of file hangulhanja.cxx.
Referenced by implChange(), implGetConversionDirectionForCurrentPortion(), and implUpdateSuggestions().
|
private |
Definition at line 102 of file hangulhanja.cxx.
Referenced by ContinueConversion(), and implReadOptionsFromConfiguration().
|
private |
Definition at line 94 of file hangulhanja.cxx.
Referenced by createDialog(), and implUpdateSuggestions().
|
private |
Definition at line 100 of file hangulhanja.cxx.
Referenced by implReadOptionsFromConfiguration(), and implUpdateSuggestions().
|
private |
Definition at line 85 of file hangulhanja.cxx.
Referenced by ContinueConversion(), createDialog(), DoDocumentConversion(), implProceed(), and IsInteractive().
|
private |
Definition at line 101 of file hangulhanja.cxx.
Referenced by implReadOptionsFromConfiguration(), and implUpdateSuggestions().
|
private |
Definition at line 115 of file hangulhanja.cxx.
Referenced by createDialog(), DoDocumentConversion(), implNextConvertibleUnit(), implRetrieveNextPortion(), and implUpdateSuggestions().
|
private |
Definition at line 95 of file hangulhanja.cxx.
Referenced by createDialog(), and implChange().
|
private |
Definition at line 78 of file hangulhanja.cxx.
Referenced by DoDocumentConversion(), HangulHanjaConversion_Impl(), implChange(), implGetConversionDirectionForCurrentPortion(), implGetConversionType(), implNextConvertibleUnit(), implRetrieveNextPortion(), and implUpdateSuggestions().
|
private |
Definition at line 97 of file hangulhanja.cxx.
Referenced by DoDocumentConversion(), implChange(), implGetConversionType(), implNextConvertibleUnit(), implRetrieveNextPortion(), and implUpdateSuggestions().
|
private |
Definition at line 96 of file hangulhanja.cxx.
Referenced by createDialog(), and DoDocumentConversion().
|
private |
Definition at line 84 of file hangulhanja.cxx.
Referenced by GetConvOptions().
|
private |
Definition at line 110 of file hangulhanja.cxx.
Referenced by implChange(), and implUpdateSuggestions().
|
private |
Definition at line 111 of file hangulhanja.cxx.
Referenced by implChange(), and implUpdateSuggestions().
|
private |
Definition at line 108 of file hangulhanja.cxx.
Referenced by ContinueConversion(), GetCurrentUnit(), implChange(), implNextConvertible(), implRetrieveNextPortion(), implUpdateData(), and implUpdateSuggestions().
|
private |
Definition at line 106 of file hangulhanja.cxx.
Referenced by implChange(), and implRetrieveNextPortion().
|
private |
Definition at line 107 of file hangulhanja.cxx.
Referenced by ContinueConversion(), GetCurrentUnit(), implChange(), implGetConversionDirectionForCurrentPortion(), implNextConvertible(), implNextConvertibleUnit(), implRetrieveNextPortion(), implUpdateData(), and implUpdateSuggestions().
|
private |
Definition at line 109 of file hangulhanja.cxx.
Referenced by ContinueConversion(), implChange(), implRetrieveNextPortion(), and implUpdateData().
|
private |
Definition at line 79 of file hangulhanja.cxx.
Referenced by GetSourceLang(), and HangulHanjaConversion_Impl().
|
private |
Definition at line 82 of file hangulhanja.cxx.
Referenced by GetTargetLang(), HangulHanjaConversion_Impl(), and implGetConversionType().
|
private |
Definition at line 91 of file hangulhanja.cxx.
Referenced by ContinueConversion(), createDialog(), implChange(), implRetrieveNextPortion(), and implUpdateData().
|
private |
Definition at line 69 of file hangulhanja.cxx.
Referenced by ContinueConversion(), createDialog(), DoDocumentConversion(), implNextConvertibleUnit(), implProceed(), and implUpdateData().
|
private |
Definition at line 83 of file hangulhanja.cxx.
Referenced by GetTargetFont().
|
private |
Definition at line 70 of file hangulhanja.cxx.
Referenced by createDialog(), and GetUIParent().
|
private |
Definition at line 105 of file hangulhanja.cxx.
Referenced by GetCurrentUnit(), implChange(), implGetConversionDirectionForCurrentPortion(), implNextConvertible(), implNextConvertibleUnit(), implRetrieveNextPortion(), and implUpdateSuggestions().
|
private |
Definition at line 63 of file hangulhanja.cxx.
Referenced by ContinueConversion().
|
private |
Definition at line 72 of file hangulhanja.cxx.
Referenced by HangulHanjaConversion_Impl(), and implGetConversionDirectionForCurrentPortion().
|
private |
Definition at line 74 of file hangulhanja.cxx.
Referenced by HangulHanjaConversion_Impl(), implChange(), implUpdateSuggestions(), and IsValid().