28#include <osl/diagnose.h>
35#include <com/sun/star/lang/NoSupportException.hpp>
36#include <com/sun/star/linguistic2/ConversionDictionaryType.hpp>
37#include <com/sun/star/linguistic2/ConversionDirection.hpp>
38#include <com/sun/star/linguistic2/ConversionDictionaryList.hpp>
39#include <com/sun/star/i18n/TextConversionOption.hpp>
40#include <com/sun/star/util/XFlushable.hpp>
45#define HHC editeng::HangulHanjaConversion
46#define LINE_CNT static_cast< sal_uInt16 >(2)
47#define MAXNUM_SUGGESTIONS 50
54 using namespace css::uno;
55 using namespace css::linguistic2;
56 using namespace css::lang;
57 using namespace css::container;
74 ~FontSwitch() COVERITY_NOEXCEPT_FALSE
98 void init(
const OUString& rPrimaryText,
const OUString& rSecondaryText,
const RubyPosition& rPosition );
109 PseudoRubyText::PseudoRubyText()
114 void PseudoRubyText::init(
const OUString& rPrimaryText,
const OUString& rSecondaryText,
const RubyPosition& rPosition )
122 void PseudoRubyText::Paint(
vcl::RenderContext& rRenderContext, const ::tools::Rectangle& _rRect,
126 constexpr DrawTextFlags nTextStyle = DrawTextFlags::Mnemonic |
127 DrawTextFlags::Left |
128 DrawTextFlags::VCenter;
130 Size aPlaygroundSize(_rRect.GetSize());
135 aSmallerFont.SetFontHeight(
static_cast<tools::Long>( 0.8 * aSmallerFont.GetFontHeight() ) );
141 FontSwitch aFontRestore(rRenderContext, aSmallerFont);
147 sal_Int32 nCombinedWidth = std::max( aSecondaryRect.
GetWidth(), aPrimaryRect.
GetWidth() );
150 aPrimaryRect.
SetLeft( _rRect.Left() );
152 aPrimaryRect.
SetRight( _rRect.Left() + nCombinedWidth );
158 aPrimaryRect.
Move( 0, _rRect.Top() - aPrimaryRect.
Top() );
159 aSecondaryRect.
Move( 0, aPrimaryRect.
Top() + aPrimaryRect.
GetHeight() - aSecondaryRect.
Top() );
161 aPrimaryRect.
Move( 0, ( aPlaygroundSize.Height() - nCombinedHeight ) / 2 );
162 aSecondaryRect.
Move( 0, ( aPlaygroundSize.Height() - nCombinedHeight ) / 2 );
168 sal_Int32 nVertDistance = aSecondaryRect.
Top() - aPrimaryRect.
Top();
169 aSecondaryRect.
Move( 0, -nVertDistance );
170 aPrimaryRect.
Move( 0, nCombinedHeight - nVertDistance );
177 nDrawTextStyle &=
~DrawTextFlags( DrawTextFlags::Right | DrawTextFlags::Left | DrawTextFlags::Bottom | DrawTextFlags::Top );
178 nDrawTextStyle |= DrawTextFlags::Center | DrawTextFlags::VCenter;
182 FontSwitch aFontRestore(rRenderContext, aSmallerFont);
187 if (_pPrimaryLocation)
188 *_pPrimaryLocation = aPrimaryRect;
189 if (_pSecondaryLocation)
190 *_pSecondaryLocation = aSecondaryRect;
196 RubyRadioButton(std::unique_ptr<weld::RadioButton> xControl, std::unique_ptr<weld::Image> xImage);
197 void init(
const OUString& rPrimaryText,
const OUString& rSecondaryText,
const PseudoRubyText::RubyPosition& rPosition);
202 m_xImage->set_sensitive(sensitive);
210 Size GetOptimalSize()
const;
219 RubyRadioButton::RubyRadioButton(std::unique_ptr<weld::RadioButton> xControl, std::unique_ptr<weld::Image> xImage)
220 : m_xVirDev(xControl->create_virtual_device())
222 , m_xImage(
std::move(xImage))
228 void RubyRadioButton::init(
const OUString& rPrimaryText,
const OUString& rSecondaryText,
const PseudoRubyText::RubyPosition& rPosition )
230 m_aRubyText.init(rPrimaryText, rSecondaryText, rPosition);
251 m_aRubyText.Paint(rRenderContext, aTextRect, &aPrimaryTextLocation, &aSecondaryTextLocation);
263 FontSwitch aFontRestore(*
m_xVirDev, aSmallerFont);
285 OUString sText = *
static_cast< OUString*
>(
GetItemData( nItemId ) );
286 pDev->
DrawText( aRect, sText, DrawTextFlags::Center | DrawTextFlags::VCenter );
290 : m_bDisplayListBox( true )
291 , m_bInSelectionUpdate( false )
292 , m_xValueSet(new
SuggestionSet(rBuilder.weld_scrolled_window(
"scrollwin", true)))
293 , m_xValueSetWin(new
weld::CustomWeld(rBuilder,
"valueset", *m_xValueSet))
294 , m_xListBox(rBuilder.weld_tree_view(
"listbox"))
302 auto nItemWidth = 2 *
m_xListBox->get_pixel_size(
"AU").Width();
334 bool bHasFocus = rOldControl.
has_focus();
349 SelectSuggestionHdl(
false);
354 SelectSuggestionHdl(
true);
391 sal_uInt16 nItemId =
m_xListBox->n_children();
393 OUString* pItemData =
new OUString( rStr );
425 : GenericDialogController(pParent,
"cui/ui/hangulhanjaconversiondialog.ui",
"HangulHanjaConversionDialog")
426 , m_bDocumentMode( true )
427 , m_xFind(m_xBuilder->weld_button(
"find"))
428 , m_xIgnore(m_xBuilder->weld_button(
"ignore"))
429 , m_xIgnoreAll(m_xBuilder->weld_button(
"ignoreall"))
430 , m_xReplace(m_xBuilder->weld_button(
"replace"))
431 , m_xReplaceAll(m_xBuilder->weld_button(
"replaceall"))
432 , m_xOptions(m_xBuilder->weld_button(
"options"))
434 , m_xSimpleConversion(m_xBuilder->weld_radio_button(
"simpleconversion"))
435 , m_xHangulBracketed(m_xBuilder->weld_radio_button(
"hangulbracket"))
436 , m_xHanjaBracketed(m_xBuilder->weld_radio_button(
"hanjabracket"))
437 , m_xWordInput(m_xBuilder->weld_entry(
"wordinput"))
438 , m_xOriginalWord(m_xBuilder->weld_label(
"originalword"))
439 , m_xHanjaAbove(new
RubyRadioButton(m_xBuilder->weld_radio_button(
"hanja_above"),
440 m_xBuilder->weld_image(
"hanja_above_img")))
441 , m_xHanjaBelow(new
RubyRadioButton(m_xBuilder->weld_radio_button(
"hanja_below"),
442 m_xBuilder->weld_image(
"hanja_below_img")))
443 , m_xHangulAbove(new
RubyRadioButton(m_xBuilder->weld_radio_button(
"hangul_above"),
444 m_xBuilder->weld_image(
"hangul_above_img")))
445 , m_xHangulBelow(new
RubyRadioButton(m_xBuilder->weld_radio_button(
"hangul_below"),
446 m_xBuilder->weld_image(
"hangul_below_img")))
447 , m_xHangulOnly(m_xBuilder->weld_check_button(
"hangulonly"))
448 , m_xHanjaOnly(m_xBuilder->weld_check_button(
"hanjaonly"))
449 , m_xReplaceByChar(m_xBuilder->weld_check_button(
"replacebychar"))
454 const OUString sHangul(
CuiResId(RID_CUISTR_HANGUL));
455 const OUString sHanja(
CuiResId(RID_CUISTR_HANJA));
456 m_xHanjaAbove->init( sHangul, sHanja, PseudoRubyText::eAbove );
457 m_xHanjaBelow->init( sHangul, sHanja, PseudoRubyText::eBelow );
484 for (
auto const & suggestion : _rSuggestions )
488 OUString sFirstSuggestion;
526 m_xFind->connect_clicked(rHdl);
547 m_xWordInput->set_text(m_xSuggestions->GetSelectedEntry());
548 OnSuggestionModified( *m_xWordInput );
553 m_xFind->set_sensitive(m_xWordInput->get_value_changed_from_saved());
555 bool bSameLen = m_xWordInput->get_text().getLength() == m_xOriginalWord->get_label().getLength();
556 m_xReplace->set_sensitive( m_bDocumentMode && bSameLen );
557 m_xReplaceAll->set_sensitive( m_bDocumentMode && bSameLen );
562 m_aClickByCharacterLink.Call(rBox);
563 bool bByCharacter = rBox.get_active();
564 m_xSuggestions->DisplayListBox( !bByCharacter );
570 if (&rBox == m_xHangulOnly.get())
571 pOtherBox = m_xHanjaOnly.get();
573 pOtherBox = m_xHangulOnly.get();
584 m_aOptionsChangedLink.Call(
nullptr );
625 m_xDialog->change_default_widget(pOldDefButton, pNewDefButton);
640 bool _bTryBothDirections,
641 HHC::ConversionDirection ePrimaryConversionDirection )
649 if (!_bTryBothDirections)
654 OnConversionDirectionClicked(*pBox);
664 HHC::ConversionDirection eDefaultDirection )
const
666 HHC::ConversionDirection eDirection = eDefaultDirection;
668 eDirection = HHC::eHangulToHanja;
670 eDirection = HHC::eHanjaToHangul;
681 case HHC::eRubyHanjaAbove:
m_xHanjaAbove->set_active(
true);
break;
682 case HHC::eRubyHanjaBelow:
m_xHanjaBelow->set_active(
true);
break;
683 case HHC::eRubyHangulAbove:
m_xHangulAbove->set_active(
true);
break;
684 case HHC::eRubyHangulBelow:
m_xHangulBelow->set_active(
true);
break;
686 OSL_FAIL(
"HangulHanjaConversionDialog::SetConversionFormat: unknown type!" );
693 return HHC::eSimpleConversion;
695 return HHC::eHangulBracketed;
697 return HHC::eHanjaBracketed;
699 return HHC::eRubyHanjaAbove;
701 return HHC::eRubyHanjaBelow;
703 return HHC::eRubyHangulAbove;
705 return HHC::eRubyHangulBelow;
707 OSL_FAIL(
"HangulHanjaConversionDialog::GetConversionFormat: no radio checked?" );
708 return HHC::eSimpleConversion;
734 const OUString* pDic = aDictNames.getConstArray();
735 sal_Int32
nCount = aDictNames.getLength();
740 Any aAny( xNameCont->getByName( pDic[
i ] ) );
741 Reference< XConversionDictionary > xDic;
742 if( ( aAny >>= xDic ) && xDic.is() )
747 AddDict( xDic->getName(), xDic->isActive() );
758 sal_uInt32 nCnt = m_aDictList.size();
760 sal_uInt32 nActiveDics = 0;
763 aActiveDics.realloc( nCnt );
764 OUString* pActActiveDic = aActiveDics.getArray();
768 Reference< XConversionDictionary > xDict = m_aDictList[
n ];
770 DBG_ASSERT( xDict.is(),
"-HangulHanjaOptionsDialog::OkHdl(): someone is evaporated..." );
773 xDict->setActive( bActive );
774 Reference< util::XFlushable > xFlush( xDict, uno::UNO_QUERY );
780 pActActiveDic[ nActiveDics ] = xDict->getName();
789 aActiveDics.realloc( nActiveDics );
792 aTmp <<= aActiveDics;
795 aTmp <<= m_xIgnorepostCB->get_active();
798 aTmp <<= m_xShowrecentlyfirstCB->get_active();
801 aTmp <<= m_xAutoreplaceuniqueCB->get_active();
809 bool bSel = m_xDictsLB->get_selected_index() != -1;
811 m_xEditPB->set_sensitive(bSel);
812 m_xDeletePB->set_sensitive(bSel);
823 if( !m_xConversionDictionaryList.is() )
828 Reference< XConversionDictionary > xDic =
834 m_aDictList.push_back( xDic );
835 AddDict( xDic->getName(), xDic->isActive() );
838 catch(
const ElementExistException& )
841 catch(
const NoSupportException& )
848 int nEntry = m_xDictsLB->get_selected_index();
849 DBG_ASSERT(nEntry != -1,
"+HangulHanjaEditDictDialog::EditDictHdl(): call of edit should not be possible with no selection!");
859 int nSelPos = m_xDictsLB->get_selected_index();
863 Reference< XConversionDictionary > xDic( m_aDictList[ nSelPos ] );
864 if( !(m_xConversionDictionaryList.is() && xDic.is()) )
868 if( !xNameCont.is() )
873 xNameCont->removeByName( xDic->getName() );
876 m_aDictList.erase(m_aDictList.begin()+nSelPos );
877 m_xDictsLB->remove(nSelPos);
879 catch(
const ElementExistException& )
882 catch(
const NoSupportException& )
888 : GenericDialogController(pParent,
"cui/ui/hangulhanjaoptdialog.ui",
"HangulHanjaOptDialog")
889 , m_xDictsLB(m_xBuilder->weld_tree_view(
"dicts"))
890 , m_xIgnorepostCB(m_xBuilder->weld_check_button(
"ignorepost"))
891 , m_xShowrecentlyfirstCB(m_xBuilder->weld_check_button(
"showrecentfirst"))
892 , m_xAutoreplaceuniqueCB(m_xBuilder->weld_check_button(
"autoreplaceunique"))
893 , m_xNewPB(m_xBuilder->weld_button(
"new"))
894 , m_xEditPB(m_xBuilder->weld_button(
"edit"))
895 , m_xDeletePB(m_xBuilder->weld_button(
"delete"))
896 , m_xOkPB(m_xBuilder->weld_button(
"ok"))
945 m_bEntered = !
aName.isEmpty();
947 m_xDictNameED->set_text(
aName);
956 m_xOkBtn->set_sensitive(!
aName.isEmpty());
960 : GenericDialogController(pParent,
"cui/ui/hangulhanjaadddialog.ui",
"HangulHanjaAddDialog")
962 , m_xOkBtn(m_xBuilder->weld_button(
"ok"))
963 , m_xDictNameED(m_xBuilder->weld_entry(
"entry"))
990 const OUString*
Next_();
995 void Set(
const OUString& _rElement, sal_uInt16 _nNumOfElement );
996 void Reset( sal_uInt16 _nNumOfElement );
997 const OUString &
Get( sal_uInt16 _nNumOfElement )
const;
1000 const OUString*
First();
1001 const OUString*
Next();
1065 const OUString* pRet;
1104 : m_pParent(pParent)
1107 , m_pScrollBar(nullptr)
1108 , m_xEntry(
std::move(xEntry))
1115 bool bHandled =
false;
1119 sal_uInt16 nCode = rKeyCode.
GetCode();
1123 if( ShouldScroll( bUp ) )
1126 m_xEntry->select_region(0, -1);
1133 bool bUp =
KEY_UP == nCode;
1134 if( ShouldScroll( bUp ) )
1143 m_pPrev->grab_focus();
1149 m_pNext->grab_focus();
1166 bool GetConversions(
const Reference< XConversionDictionary >& _xDict,
1167 const OUString& _rOrg,
1171 if( _xDict.is() && !_rOrg.isEmpty() )
1175 _rEntries = _xDict->getConversions( _rOrg,
1178 ConversionDirection_FROM_LEFT,
1179 css::i18n::TextConversionOption::NONE );
1180 bRet = _rEntries.hasElements();
1182 catch(
const IllegalArgumentException& )
1198 m_bModifiedOriginal =
true;
1201 UpdateSuggestions();
1202 UpdateButtonStates();
1227 InitEditDictDialog( m_xBookLB->get_active() );
1232 DBG_ASSERT( m_xSuggestions,
"-HangulHanjaEditDictDialog::NewPBPushHdl(): no suggestions... search in hell..." );
1233 Reference< XConversionDictionary > xDict = m_rDictList[ m_nCurrentDict ];
1234 if( xDict.is() && m_xSuggestions )
1237 bool bRemovedSomething = DeleteEntryFromDictionary( xDict );
1239 OUString aLeft( m_aOriginal );
1240 const OUString* pRight = m_xSuggestions->First();
1241 bool bAddedSomething =
false;
1247 xDict->addEntry( aLeft, *pRight );
1248 bAddedSomething =
true;
1250 catch(
const IllegalArgumentException& )
1253 catch(
const ElementExistException& )
1257 pRight = m_xSuggestions->Next();
1260 if( bAddedSomething || bRemovedSomething )
1261 InitEditDictDialog( m_nCurrentDict );
1265 SAL_INFO(
"cui.dialogs",
"dictionary faded away..." );
1271 bool bRemovedSomething =
false;
1279 OUString* pEntry =
aEntries.getArray();
1284 xDict->removeEntry( aOrg, *pEntry );
1285 bRemovedSomething =
true;
1287 catch(
const NoSuchElementException& )
1295 return bRemovedSomething;
1300 if( DeleteEntryFromDictionary( m_rDictList[ m_nCurrentDict ] ) )
1302 m_aOriginal.clear();
1303 m_bModifiedOriginal =
true;
1304 InitEditDictDialog( m_nCurrentDict );
1338 OUString* pEntry =
aEntries.getArray();
1349 SAL_INFO(
"cui.dialogs",
"dictionary faded away..." );
1375 sal_uInt32 nCnt =
aEntries.getLength();
1381 const OUString* pSugg =
aEntries.getConstArray();
1412 OUString aTxt( pEdit->
get_text() );
1413 sal_uInt16 nEntryNum =
m_nTopPos + _nEntryOffset;
1414 if( aTxt.isEmpty() )
1432 : GenericDialogController(pParent,
"cui/ui/hangulhanjaeditdictdialog.ui",
"HangulHanjaEditDictDialog")
1433 , m_aEditHintText (
CuiResId(RID_CUISTR_EDITHINT) )
1434 , m_rDictList ( _rDictList )
1435 , m_nCurrentDict ( 0xFFFFFFFF )
1437 , m_bModifiedSuggestions ( false )
1438 , m_bModifiedOriginal ( false )
1439 , m_xBookLB(m_xBuilder->weld_combo_box(
"book"))
1440 , m_xOriginalLB(m_xBuilder->weld_combo_box(
"original"))
1441 , m_xEdit1(new
SuggestionEdit(m_xBuilder->weld_entry(
"edit1"), this))
1442 , m_xEdit2(new
SuggestionEdit(m_xBuilder->weld_entry(
"edit2"), this))
1443 , m_xEdit3(new
SuggestionEdit(m_xBuilder->weld_entry(
"edit3"), this))
1444 , m_xEdit4(new
SuggestionEdit(m_xBuilder->weld_entry(
"edit4"), this))
1445 , m_xContents(m_xBuilder->weld_widget(
"box"))
1446 , m_xScrollSB(m_xBuilder->weld_scrolled_window(
"scrollbar", true))
1447 , m_xNewPB(m_xBuilder->weld_button(
"new"))
1448 , m_xDeletePB(m_xBuilder->weld_button(
"delete"))
1466 static_assert(
MAXNUM_SUGGESTIONS >= 5,
"number of suggestions should not under-run the value of 5");
1479 for( sal_uInt32
n = 0 ;
n < nDictCnt ; ++
n )
1481 Reference< XConversionDictionary > xDic(
m_rDictList[
n] );
1484 aName = xDic->getName();
Reference< XExecutableDialog > m_xDialog
FILE * init(int, char **)
LanguageType getLanguageType(bool bResolveSystem=true) const
static css::lang::Locale convertToLocale(LanguageType nLangID, bool bResolveSystem=true)
const vcl::Font & GetFont() const
void SetFont(const vcl::Font &rNewFont)
Size GetOutputSizePixel() const
tools::Rectangle GetTextRect(const tools::Rectangle &rRect, const OUString &rStr, DrawTextFlags nStyle=DrawTextFlags::WordBreak, TextRectInfo *pInfo=nullptr, const vcl::ITextLayout *_pTextLayout=nullptr) const
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
void DrawText(const Point &rStartPt, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, std::vector< tools::Rectangle > *pVector=nullptr, OUString *pDisplayText=nullptr, const SalLayoutGlyphs *pLayoutCache=nullptr)
constexpr tools::Long Height() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
css::uno::Any GetProperty(std::u16string_view rPropertyName) const
bool SetProperty(std::u16string_view rPropertyName, const css::uno::Any &rValue)
vcl::RenderContext * GetRenderContext() const
const tools::Rectangle & GetRect() const
sal_uInt16 GetItemId() const
void * GetItemData(sal_uInt16 nItemId) const
reference_type * get() const
std::unique_ptr< weld::Button > m_xReplaceAll
editeng::HangulHanjaConversion::ConversionFormat GetConversionFormat() const
void SetChangeHdl(const Link< weld::Button &, void > &_rHdl)
void SetFindHdl(const Link< weld::Button &, void > &_rHdl)
std::unique_ptr< SuggestionDisplay > m_xSuggestions
Link< weld::Toggleable &, void > m_aClickByCharacterLink
editeng::HangulHanjaConversion::ConversionDirection GetDirection(editeng::HangulHanjaConversion::ConversionDirection eDefaultDirection) const
get current conversion direction to use (return argument if GetUseBothDirections is true)
bool GetUseBothDirections() const
should text which does not match the primary conversion direction be ignored?
HangulHanjaConversionDialog(weld::Widget *pParent)
void SetByCharacter(bool _bByCharacter)
std::unique_ptr< RubyRadioButton > m_xHangulAbove
std::unique_ptr< RubyRadioButton > m_xHangulBelow
std::unique_ptr< weld::CheckButton > m_xHanjaOnly
void SetOptionsChangedHdl(const Link< LinkParamNone *, void > &_rHdl)
std::unique_ptr< weld::RadioButton > m_xHangulBracketed
std::unique_ptr< RubyRadioButton > m_xHanjaAbove
void SetConversionFormat(editeng::HangulHanjaConversion::ConversionFormat _eType)
void SetCurrentString(const OUString &_rNewString, const css::uno::Sequence< OUString > &_rSuggestions, bool _bOriginatesFromDocument)
void FillSuggestions(const css::uno::Sequence< OUString > &_rSuggestions)
fill the suggestion list box with suggestions for the actual input
std::unique_ptr< weld::Button > m_xFind
std::unique_ptr< weld::CheckButton > m_xHangulOnly
std::unique_ptr< weld::RadioButton > m_xHanjaBracketed
void SetIgnoreHdl(const Link< weld::Button &, void > &_rHdl)
Link< LinkParamNone *, void > m_aOptionsChangedLink
std::unique_ptr< weld::Entry > m_xWordInput
std::unique_ptr< weld::Button > m_xIgnore
std::unique_ptr< weld::Button > m_xOptions
std::unique_ptr< RubyRadioButton > m_xHanjaBelow
OUString GetCurrentString() const
std::unique_ptr< weld::CheckButton > m_xReplaceByChar
void SetChangeAllHdl(const Link< weld::Button &, void > &_rHdl)
void SetConversionDirectionState(bool _bTryBothDirections, editeng::HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection)
void SetIgnoreAllHdl(const Link< weld::Button &, void > &_rHdl)
std::unique_ptr< weld::Button > m_xReplace
OUString GetCurrentSuggestion() const
retrieves the current suggestion
void EnableRubySupport(bool bVal)
enables or disables the checkboxes for ruby formatted replacements
std::unique_ptr< weld::RadioButton > m_xSimpleConversion
void SetConversionFormatChangedHdl(const Link< weld::Toggleable &, void > &_rHdl)
std::unique_ptr< weld::Label > m_xOriginalWord
bool m_bDocumentMode
are we working for a document? This is normally true, but in case the user uses the "find" functional...
virtual ~HangulHanjaConversionDialog() override
std::unique_ptr< weld::Button > m_xIgnoreAll
void SetClickByCharacterHdl(const Link< weld::Toggleable &, void > &_rHdl)
std::unique_ptr< weld::Button > m_xDeletePB
std::unique_ptr< weld::Widget > m_xContents
std::unique_ptr< SuggestionEdit > m_xEdit4
sal_uInt32 m_nCurrentDict
HangulHanjaEditDictDialog(weld::Window *pParent, HHDictList &rDictList, sal_uInt32 nSelDict)
std::unique_ptr< weld::ComboBox > m_xBookLB
void EditModify(const weld::Entry *pEdit, sal_uInt8 nEntryOffset)
void SetEditText(SuggestionEdit &rEdit, sal_uInt16 nEntryNum)
std::unique_ptr< weld::ScrolledWindow > m_xScrollSB
std::unique_ptr< weld::ComboBox > m_xOriginalLB
std::unique_ptr< SuggestionEdit > m_xEdit2
std::unique_ptr< SuggestionEdit > m_xEdit1
void UpdateButtonStates()
std::unique_ptr< SuggestionList > m_xSuggestions
std::unique_ptr< SuggestionEdit > m_xEdit3
const OUString m_aEditHintText
virtual ~HangulHanjaEditDictDialog() override
void InitEditDictDialog(sal_uInt32 nSelDict)
bool DeleteEntryFromDictionary(const css::uno::Reference< css::linguistic2::XConversionDictionary > &xDict)
bool m_bModifiedSuggestions
std::unique_ptr< weld::Button > m_xNewPB
HangulHanjaNewDictDialog(weld::Window *pParent)
virtual ~HangulHanjaNewDictDialog() override
std::unique_ptr< weld::Entry > m_xDictNameED
bool GetName(OUString &_rRetName) const
std::unique_ptr< weld::Button > m_xOkBtn
std::unique_ptr< weld::CheckButton > m_xIgnorepostCB
std::unique_ptr< weld::Button > m_xOkPB
css::uno::Reference< css::linguistic2::XConversionDictionaryList > m_xConversionDictionaryList
void AddDict(const OUString &_rName, bool _bChecked)
std::unique_ptr< weld::Button > m_xNewPB
std::unique_ptr< weld::Button > m_xDeletePB
std::unique_ptr< weld::CheckButton > m_xAutoreplaceuniqueCB
std::unique_ptr< weld::Button > m_xEditPB
void Init()
reads settings from core and init controls
virtual ~HangulHanjaOptionsDialog() override
std::unique_ptr< weld::CheckButton > m_xShowrecentlyfirstCB
std::unique_ptr< weld::TreeView > m_xDictsLB
HangulHanjaOptionsDialog(weld::Window *pParent)
OUString GetSelectedEntry() const
bool m_bInSelectionUpdate
std::unique_ptr< weld::CustomWeld > m_xValueSetWin
void DisplayListBox(bool bDisplayListBox)
SuggestionDisplay(weld::Builder &rBuilder)
weld::Widget & implGetCurrentControl()
Link< SuggestionDisplay &, void > m_aSelectLink
OUString GetEntry(sal_uInt16 nPos) const
void SelectSuggestionHdl(bool bListBox)
std::unique_ptr< weld::TreeView > m_xListBox
void InsertEntry(const OUString &rStr)
void SetSelectHdl(const Link< SuggestionDisplay &, void > &rLink)
std::unique_ptr< SuggestionSet > m_xValueSet
void SelectEntryPos(sal_uInt16 nPos)
sal_uInt16 GetEntryCount() const
std::unique_ptr< weld::Entry > m_xEntry
bool ShouldScroll(bool _bUp) const
HangulHanjaEditDictDialog * m_pParent
weld::ScrolledWindow * m_pScrollBar
SuggestionEdit(std::unique_ptr< weld::Entry > xEntry, HangulHanjaEditDictDialog *pParent)
void set_text(const OUString &rText)
void init(weld::ScrolledWindow *pScrollBar, SuggestionEdit *pPrev, SuggestionEdit *pNext)
const OUString & Get(sal_uInt16 _nNumOfElement) const
sal_uInt16 GetCount() const
std::vector< OUString > m_vElements
void Reset(sal_uInt16 _nNumOfElement)
sal_uInt16 m_nNumOfEntries
void Set(const OUString &_rElement, sal_uInt16 _nNumOfElement)
SuggestionSet(std::unique_ptr< weld::ScrolledWindow > xScrolledWindow)
virtual void UserDraw(const UserDrawEvent &rUDEvt) override
tools::Long GetFontHeight() const
void SetFontHeight(tools::Long nHeight)
sal_uInt16 GetCode() const
sal_uInt16 GetModifier() const
virtual OUString get_text() const=0
std::shared_ptr< weld::Dialog > m_xDialog
virtual bool get_active() const=0
virtual void set_active(bool active)=0
OUString CuiResId(TranslateId aKey)
#define DBG_ASSERT(sCon, aError)
ScXMLEditAttributeMap::Entry const aEntries[]
#define MAXNUM_SUGGESTIONS
OUString m_sSecondaryText
constexpr OUStringLiteral HID_HANGULDLG_SUGGESTIONS_GRID
constexpr OUStringLiteral HID_HANGULDLG_SUGGESTIONS_LIST
constexpr sal_uInt16 KEY_TAB
constexpr sal_uInt16 KEY_UP
constexpr sal_uInt16 KEY_DOWN
constexpr sal_uInt16 KEY_SHIFT
#define UPH_ACTIVE_CONVERSION_DICTIONARIES
#define UPH_IS_SHOW_ENTRIES_RECENTLY_USED_FIRST
#define UPH_IS_IGNORE_POST_POSITIONAL_WORD
#define UPH_IS_AUTO_REPLACE_UNIQUE_ENTRIES
#define LINK(Instance, Class, Member)
#define SAL_INFO(area, stream)
OString stripEnd(const OString &rIn, char c)
IMPL_LINK(ClassificationDialog, SelectClassificationHdl, weld::ComboBox &, rBox, void)
IMPL_LINK_NOARG(ClassificationDialog, OnAsyncExpandHdl, void *, void)
std::vector< css::uno::Reference< css::linguistic2::XConversionDictionary > > HHDictList
void SetPointFont(OutputDevice &rDevice, const vcl::Font &rFont)