21 #include <dialmgr.hxx>
24 #include <strings.hrc>
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
71 m_rDev.
Push( PushFlags::FONT );
72 m_rDev.
SetFont( _rTemporaryFont );
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;
197 void init(
const OUString& rPrimaryText,
const OUString& rSecondaryText,
const PseudoRubyText::RubyPosition& rPosition);
206 Size GetOptimalSize()
const;
214 RubyRadioButton::RubyRadioButton(std::unique_ptr<weld::RadioButton> xControl)
215 : m_xVirDev(xControl->create_virtual_device())
223 void RubyRadioButton::init(
const OUString& rPrimaryText,
const OUString& rSecondaryText,
const PseudoRubyText::RubyPosition& rPosition )
225 m_aRubyText.init(rPrimaryText, rSecondaryText, rPosition);
239 aTextRect.AdjustLeft( 1 ); aTextRect.AdjustRight( -1 );
240 aTextRect.AdjustTop( 1 ); aTextRect.AdjustBottom( -1 );
246 m_aRubyText.Paint(rRenderContext, aTextRect, &aPrimaryTextLocation, &aSecondaryTextLocation);
252 aSmallerFont.
SetFontHeight( static_cast<tools::Long>( 0.8 * aSmallerFont.GetFontHeight() ) );
258 FontSwitch aFontRestore(*
m_xVirDev, aSmallerFont);
280 OUString sText = *
static_cast< OUString*
>(
GetItemData( nItemId ) );
281 pDev->
DrawText( aRect, sText, DrawTextFlags::Center | DrawTextFlags::VCenter );
285 : m_bDisplayListBox( true )
286 , m_bInSelectionUpdate( false )
287 , m_xValueSet(new
SuggestionSet(rBuilder.weld_scrolled_window(
"scrollwin", true)))
288 , m_xValueSetWin(new
weld::CustomWeld(rBuilder,
"valueset", *m_xValueSet))
289 , m_xListBox(rBuilder.weld_tree_view(
"listbox"))
297 auto nItemWidth = 2 *
m_xListBox->get_pixel_size(
"AU").Width();
301 m_xValueSet->set_size_request(aSize.Width(), aSize.Height());
302 m_xListBox->set_size_request(aSize.Width(), aSize.Height());
329 bool bHasFocus = rOldControl.
has_focus();
344 SelectSuggestionHdl(
false);
349 SelectSuggestionHdl(
true);
386 sal_uInt16 nItemId =
m_xListBox->n_children();
388 OUString* pItemData =
new OUString( rStr );
420 : GenericDialogController(pParent,
"cui/ui/hangulhanjaconversiondialog.ui",
"HangulHanjaConversionDialog")
421 , m_bDocumentMode( true )
422 , m_xFind(m_xBuilder->weld_button(
"find"))
423 , m_xIgnore(m_xBuilder->weld_button(
"ignore"))
424 , m_xIgnoreAll(m_xBuilder->weld_button(
"ignoreall"))
425 , m_xReplace(m_xBuilder->weld_button(
"replace"))
426 , m_xReplaceAll(m_xBuilder->weld_button(
"replaceall"))
427 , m_xOptions(m_xBuilder->weld_button(
"options"))
429 , m_xSimpleConversion(m_xBuilder->weld_radio_button(
"simpleconversion"))
430 , m_xHangulBracketed(m_xBuilder->weld_radio_button(
"hangulbracket"))
431 , m_xHanjaBracketed(m_xBuilder->weld_radio_button(
"hanjabracket"))
432 , m_xWordInput(m_xBuilder->weld_entry(
"wordinput"))
433 , m_xOriginalWord(m_xBuilder->weld_label(
"originalword"))
434 , m_xHanjaAbove(new
RubyRadioButton(m_xBuilder->weld_radio_button(
"hanja_above")))
435 , m_xHanjaBelow(new
RubyRadioButton(m_xBuilder->weld_radio_button(
"hanja_below")))
436 , m_xHangulAbove(new
RubyRadioButton(m_xBuilder->weld_radio_button(
"hangul_above")))
437 , m_xHangulBelow(new
RubyRadioButton(m_xBuilder->weld_radio_button(
"hangul_below")))
438 , m_xHangulOnly(m_xBuilder->weld_check_button(
"hangulonly"))
439 , m_xHanjaOnly(m_xBuilder->weld_check_button(
"hanjaonly"))
440 , m_xReplaceByChar(m_xBuilder->weld_check_button(
"replacebychar"))
445 const OUString sHangul(
CuiResId(RID_SVXSTR_HANGUL));
446 const OUString sHanja(
CuiResId(RID_SVXSTR_HANJA));
447 m_xHanjaAbove->init( sHangul, sHanja, PseudoRubyText::eAbove );
448 m_xHanjaBelow->init( sHangul, sHanja, PseudoRubyText::eBelow );
475 for (
auto const & suggestion : _rSuggestions )
479 OUString sFirstSuggestion;
517 m_xFind->connect_clicked(rHdl);
538 m_xWordInput->set_text(m_xSuggestions->GetSelectedEntry());
539 OnSuggestionModified( *m_xWordInput );
544 m_xFind->set_sensitive(m_xWordInput->get_value_changed_from_saved());
546 bool bSameLen = m_xWordInput->get_text().getLength() == m_xOriginalWord->get_label().getLength();
547 m_xReplace->set_sensitive( m_bDocumentMode && bSameLen );
548 m_xReplaceAll->set_sensitive( m_bDocumentMode && bSameLen );
553 m_aClickByCharacterLink.Call(rBox);
554 bool bByCharacter = rBox.get_active();
555 m_xSuggestions->DisplayListBox( !bByCharacter );
561 if (&rBox == m_xHangulOnly.get())
562 pOtherBox = m_xHanjaOnly.get();
564 pOtherBox = m_xHangulOnly.get();
575 m_aOptionsChangedLink.Call(
nullptr );
632 bool _bTryBothDirections,
633 HHC::ConversionDirection ePrimaryConversionDirection )
641 if (!_bTryBothDirections)
646 OnConversionDirectionClicked(*pBox);
656 HHC::ConversionDirection eDefaultDirection )
const
658 HHC::ConversionDirection eDirection = eDefaultDirection;
660 eDirection = HHC::eHangulToHanja;
662 eDirection = HHC::eHanjaToHangul;
673 case HHC::eRubyHanjaAbove:
m_xHanjaAbove->set_active(
true);
break;
674 case HHC::eRubyHanjaBelow:
m_xHanjaBelow->set_active(
true);
break;
675 case HHC::eRubyHangulAbove:
m_xHangulAbove->set_active(
true);
break;
676 case HHC::eRubyHangulBelow:
m_xHangulBelow->set_active(
true);
break;
678 OSL_FAIL(
"HangulHanjaConversionDialog::SetConversionFormat: unknown type!" );
685 return HHC::eSimpleConversion;
687 return HHC::eHangulBracketed;
689 return HHC::eHanjaBracketed;
691 return HHC::eRubyHanjaAbove;
693 return HHC::eRubyHanjaBelow;
695 return HHC::eRubyHangulAbove;
697 return HHC::eRubyHangulBelow;
699 OSL_FAIL(
"HangulHanjaConversionDialog::GetConversionFormat: no radio checked?" );
700 return HHC::eSimpleConversion;
726 const OUString* pDic = aDictNames.getConstArray();
727 sal_Int32
nCount = aDictNames.getLength();
730 for( i = 0 ; i < nCount ; ++i )
732 Any aAny( xNameCont->getByName( pDic[ i ] ) );
733 Reference< XConversionDictionary > xDic;
734 if( ( aAny >>= xDic ) && xDic.is() )
739 AddDict( xDic->getName(), xDic->isActive() );
750 sal_uInt32 nCnt = m_aDictList.size();
752 sal_uInt32 nActiveDics = 0;
755 aActiveDics.realloc( nCnt );
756 OUString* pActActiveDic = aActiveDics.getArray();
760 Reference< XConversionDictionary > xDict = m_aDictList[ n ];
762 DBG_ASSERT( xDict.is(),
"-HangulHanjaOptionsDialog::OkHdl(): someone is evaporated..." );
765 xDict->setActive( bActive );
766 Reference< util::XFlushable > xFlush( xDict, uno::UNO_QUERY );
772 pActActiveDic[ nActiveDics ] = xDict->getName();
781 aActiveDics.realloc( nActiveDics );
784 aTmp <<= aActiveDics;
787 aTmp <<= m_xIgnorepostCB->get_active();
790 aTmp <<= m_xShowrecentlyfirstCB->get_active();
793 aTmp <<= m_xAutoreplaceuniqueCB->get_active();
801 bool bSel = m_xDictsLB->get_selected_index() != -1;
803 m_xEditPB->set_sensitive(bSel);
804 m_xDeletePB->set_sensitive(bSel);
812 if (!aNewDlg.GetName(aName))
815 if( !m_xConversionDictionaryList.is() )
820 Reference< XConversionDictionary > xDic =
826 m_aDictList.push_back( xDic );
827 AddDict( xDic->getName(), xDic->isActive() );
830 catch(
const ElementExistException& )
833 catch(
const NoSupportException& )
840 int nEntry = m_xDictsLB->get_selected_index();
841 DBG_ASSERT(nEntry != -1,
"+HangulHanjaEditDictDialog::EditDictHdl(): call of edit should not be possible with no selection!");
851 int nSelPos = m_xDictsLB->get_selected_index();
855 Reference< XConversionDictionary > xDic( m_aDictList[ nSelPos ] );
856 if( !(m_xConversionDictionaryList.is() && xDic.is()) )
860 if( !xNameCont.is() )
865 xNameCont->removeByName( xDic->getName() );
868 m_aDictList.erase(m_aDictList.begin()+nSelPos );
869 m_xDictsLB->remove(nSelPos);
871 catch(
const ElementExistException& )
874 catch(
const NoSupportException& )
880 : GenericDialogController(pParent,
"cui/ui/hangulhanjaoptdialog.ui",
"HangulHanjaOptDialog")
881 , m_xDictsLB(m_xBuilder->weld_tree_view(
"dicts"))
882 , m_xIgnorepostCB(m_xBuilder->weld_check_button(
"ignorepost"))
883 , m_xShowrecentlyfirstCB(m_xBuilder->weld_check_button(
"showrecentfirst"))
884 , m_xAutoreplaceuniqueCB(m_xBuilder->weld_check_button(
"autoreplaceunique"))
885 , m_xNewPB(m_xBuilder->weld_button(
"new"))
886 , m_xEditPB(m_xBuilder->weld_button(
"edit"))
887 , m_xDeletePB(m_xBuilder->weld_button(
"delete"))
888 , m_xOkPB(m_xBuilder->weld_button(
"ok"))
937 m_bEntered = !aName.isEmpty();
939 m_xDictNameED->set_text(aName);
948 m_xOkBtn->set_sensitive(!aName.isEmpty());
952 : GenericDialogController(pParent,
"cui/ui/hangulhanjaadddialog.ui",
"HangulHanjaAddDialog")
954 , m_xOkBtn(m_xBuilder->weld_button(
"ok"))
955 , m_xDictNameED(m_xBuilder->weld_entry(
"entry"))
982 const OUString*
Next_();
987 void Set(
const OUString& _rElement, sal_uInt16 _nNumOfElement );
988 void Reset( sal_uInt16 _nNumOfElement );
989 const OUString &
Get( sal_uInt16 _nNumOfElement )
const;
992 const OUString*
First();
993 const OUString*
Next();
1057 const OUString* pRet;
1096 : m_pParent(pParent)
1099 , m_pScrollBar(nullptr)
1100 , m_xEntry(
std::move(xEntry))
1107 bool bHandled =
false;
1115 if( ShouldScroll( bUp ) )
1118 m_xEntry->select_region(0, -1);
1125 bool bUp =
KEY_UP == nCode;
1126 if( ShouldScroll( bUp ) )
1135 m_pPrev->grab_focus();
1141 m_pNext->grab_focus();
1158 bool GetConversions(
const Reference< XConversionDictionary >& _xDict,
1159 const OUString& _rOrg,
1163 if( _xDict.is() && !_rOrg.isEmpty() )
1167 _rEntries = _xDict->getConversions( _rOrg,
1170 ConversionDirection_FROM_LEFT,
1171 css::i18n::TextConversionOption::NONE );
1172 bRet = _rEntries.hasElements();
1174 catch(
const IllegalArgumentException& )
1190 m_bModifiedOriginal =
true;
1193 UpdateSuggestions();
1194 UpdateButtonStates();
1219 InitEditDictDialog( m_xBookLB->get_active() );
1224 DBG_ASSERT( m_xSuggestions,
"-HangulHanjaEditDictDialog::NewPBPushHdl(): no suggestions... search in hell..." );
1225 Reference< XConversionDictionary > xDict = m_rDictList[ m_nCurrentDict ];
1226 if( xDict.is() && m_xSuggestions )
1229 bool bRemovedSomething = DeleteEntryFromDictionary( xDict );
1231 OUString aLeft( m_aOriginal );
1232 const OUString* pRight = m_xSuggestions->First();
1233 bool bAddedSomething =
false;
1239 xDict->addEntry( aLeft, *pRight );
1240 bAddedSomething =
true;
1242 catch(
const IllegalArgumentException& )
1245 catch(
const ElementExistException& )
1249 pRight = m_xSuggestions->Next();
1252 if( bAddedSomething || bRemovedSomething )
1253 InitEditDictDialog( m_nCurrentDict );
1257 SAL_INFO(
"cui.dialogs",
"dictionary faded away..." );
1263 bool bRemovedSomething =
false;
1270 sal_uInt32
n = aEntries.getLength();
1271 OUString* pEntry = aEntries.getArray();
1276 xDict->removeEntry( aOrg, *pEntry );
1277 bRemovedSomething =
true;
1279 catch(
const NoSuchElementException& )
1287 return bRemovedSomething;
1292 if( DeleteEntryFromDictionary( m_rDictList[ m_nCurrentDict ] ) )
1294 m_aOriginal.clear();
1295 m_bModifiedOriginal =
true;
1296 InitEditDictDialog( m_nCurrentDict );
1329 sal_uInt32
n = aEntries.getLength();
1330 OUString* pEntry = aEntries.getArray();
1341 SAL_INFO(
"cui.dialogs",
"dictionary faded away..." );
1367 sal_uInt32 nCnt = aEntries.getLength();
1373 const OUString* pSugg = aEntries.getConstArray();
1404 OUString aTxt( pEdit->
get_text() );
1405 sal_uInt16 nEntryNum =
m_nTopPos + _nEntryOffset;
1406 if( aTxt.isEmpty() )
1424 : GenericDialogController(pParent,
"cui/ui/hangulhanjaeditdictdialog.ui",
"HangulHanjaEditDictDialog")
1425 , m_aEditHintText (
CuiResId(RID_SVXSTR_EDITHINT) )
1426 , m_rDictList ( _rDictList )
1427 , m_nCurrentDict ( 0xFFFFFFFF )
1429 , m_bModifiedSuggestions ( false )
1430 , m_bModifiedOriginal ( false )
1431 , m_xBookLB(m_xBuilder->weld_combo_box(
"book"))
1432 , m_xOriginalLB(m_xBuilder->weld_combo_box(
"original"))
1433 , m_xEdit1(new
SuggestionEdit(m_xBuilder->weld_entry(
"edit1"), this))
1434 , m_xEdit2(new
SuggestionEdit(m_xBuilder->weld_entry(
"edit2"), this))
1435 , m_xEdit3(new
SuggestionEdit(m_xBuilder->weld_entry(
"edit3"), this))
1436 , m_xEdit4(new
SuggestionEdit(m_xBuilder->weld_entry(
"edit4"), this))
1437 , m_xContents(m_xBuilder->weld_widget(
"box"))
1438 , m_xScrollSB(m_xBuilder->weld_scrolled_window(
"scrollbar", true))
1439 , m_xNewPB(m_xBuilder->weld_button(
"new"))
1440 , m_xDeletePB(m_xBuilder->weld_button(
"delete"))
1443 m_xScrollSB->set_size_request(-1, aSize.Height());
1458 static_assert(
MAXNUM_SUGGESTIONS >= 5,
"number of suggestions should not under-run the value of 5");
1471 for( sal_uInt32
n = 0 ;
n < nDictCnt ; ++
n )
1473 Reference< XConversionDictionary > xDic(
m_rDictList[
n] );
1476 aName = xDic->getName();
OString stripEnd(const OString &rIn, char c)
#define LINK(Instance, Class, Member)
void SetEditText(SuggestionEdit &rEdit, sal_uInt16 nEntryNum)
void DrawText(const Point &rStartPt, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, MetricVector *pVector=nullptr, OUString *pDisplayText=nullptr, const SalLayoutGlyphs *pLayoutCache=nullptr)
virtual ~HangulHanjaConversionDialog() override
sal_uInt16 m_nNumOfEntries
std::unique_ptr< weld::Button > m_xFind
#define UPH_IS_AUTO_REPLACE_UNIQUE_ENTRIES
std::unique_ptr< RubyRadioButton > m_xHangulAbove
std::unique_ptr< weld::RadioButton > m_xHangulBracketed
OUString GetCurrentSuggestion() const
retrieves the current suggestion
void SetConversionFormat(editeng::HangulHanjaConversion::ConversionFormat _eType)
void setWidth(tools::Long nWidth)
std::unique_ptr< RubyRadioButton > m_xHanjaAbove
std::unique_ptr< weld::Entry > m_xEntry
const tools::Rectangle & GetRect() const
std::unique_ptr< weld::Widget > m_xContents
std::unique_ptr< weld::Label > m_xOriginalWord
std::unique_ptr< weld::Button > m_xIgnoreAll
void SelectEntryPos(sal_uInt16 nPos)
std::unique_ptr< weld::CheckButton > m_xHanjaOnly
void DisplayListBox(bool bDisplayListBox)
SuggestionSet(std::unique_ptr< weld::ScrolledWindow > xScrolledWindow)
SuggestionEdit(std::unique_ptr< weld::Entry > xEntry, HangulHanjaEditDictDialog *pParent)
std::unique_ptr< weld::Entry > m_xWordInput
std::unique_ptr< weld::Button > m_xEditPB
sal_uInt16 GetCode() const
std::unique_ptr< weld::CheckButton > m_xReplaceByChar
virtual void UserDraw(const UserDrawEvent &rUDEvt) override
void SetIgnoreHdl(const Link< weld::Button &, void > &_rHdl)
void * GetItemData(sal_uInt16 nItemId) const
std::vector< css::uno::Reference< css::linguistic2::XConversionDictionary > > HHDictList
virtual ~HangulHanjaOptionsDialog() override
HangulHanjaEditDictDialog(weld::Window *pParent, HHDictList &rDictList, sal_uInt32 nSelDict)
constexpr sal_uInt16 KEY_UP
sal_uInt16 GetCount() const
void SetCurrentString(const OUString &_rNewString, const css::uno::Sequence< OUString > &_rSuggestions, bool _bOriginatesFromDocument)
css::uno::Reference< css::linguistic2::XConversionDictionaryList > m_xConversionDictionaryList
static OutputDevice * GetDefaultDevice()
const OUString m_aEditHintText
tools::Rectangle GetTextRect(const tools::Rectangle &rRect, const OUString &rStr, DrawTextFlags nStyle=DrawTextFlags::WordBreak, TextRectInfo *pInfo=nullptr, const vcl::ITextLayout *_pTextLayout=nullptr) const
std::unique_ptr< weld::Button > m_xOptions
std::unique_ptr< weld::ScrolledWindow > m_xScrollSB
std::unique_ptr< RubyRadioButton > m_xHanjaBelow
const vcl::Font & GetFont() const
std::unique_ptr< SuggestionEdit > m_xEdit4
std::unique_ptr< weld::Button > m_xDeletePB
std::unique_ptr< weld::Button > m_xNewPB
void set_text(const OUString &rText)
HangulHanjaConversionDialog(weld::Widget *pParent)
sal_uInt16 GetModifier() const
std::unique_ptr< weld::RadioButton > m_xSimpleConversion
#define HID_HANGULDLG_SUGGESTIONS_LIST
OUString GetEntry(sal_uInt16 nPos) const
void Set(const OUString &_rElement, sal_uInt16 _nNumOfElement)
SuggestionDisplay(weld::Builder &rBuilder)
constexpr sal_uInt16 KEY_DOWN
std::unique_ptr< weld::Button > m_xIgnore
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_xReplace
std::unique_ptr< weld::CustomWeld > m_xValueSetWin
vcl::RenderContext * GetRenderContext() const
#define DBG_ASSERT(sCon, aError)
bool ShouldScroll(bool _bUp) const
void EnableRubySupport(bool bVal)
enables or disables the checkboxes for ruby formatted replacements
std::unique_ptr< weld::RadioButton > m_xHanjaBracketed
OUString GetCurrentString() const
bool m_bDocumentMode
are we working for a document? This is normally true, but in case the user uses the "find" functional...
sal_uInt32 m_nCurrentDict
void SetOptionsChangedHdl(const Link< LinkParamNone *, void > &_rHdl)
tools::Long Width() const
std::unique_ptr< weld::Button > m_xOkPB
void SetChangeHdl(const Link< weld::Button &, void > &_rHdl)
Link< LinkParamNone *, void > m_aOptionsChangedLink
void InitEditDictDialog(sal_uInt32 nSelDict)
IMPL_LINK(ClassificationDialog, SelectClassificationHdl, weld::ComboBox &, rBox, void)
void AddDict(const OUString &_rName, bool _bChecked)
std::unique_ptr< SuggestionDisplay > m_xSuggestions
bool GetUseBothDirections() const
should text which does not match the primary conversion direction be ignored?
std::unique_ptr< weld::Button > m_xDeletePB
Size GetOutputSizePixel() const
void SelectSuggestionHdl(bool bListBox)
#define UPH_IS_SHOW_ENTRIES_RECENTLY_USED_FIRST
std::unique_ptr< SuggestionEdit > m_xEdit2
OUString CuiResId(const char *pKey)
virtual OUString get_text() const =0
#define HID_HANGULDLG_SUGGESTIONS_GRID
sal_uInt16 GetItemId() const
const OUString & Get(sal_uInt16 _nNumOfElement) const
std::unique_ptr< weld::CheckButton > m_xHangulOnly
virtual ~HangulHanjaEditDictDialog() override
Link< SuggestionDisplay &, void > m_aSelectLink
void SetSelectHdl(const Link< SuggestionDisplay &, void > &rLink)
weld::ScrolledWindow * m_pScrollBar
void SetIgnoreAllHdl(const Link< weld::Button &, void > &_rHdl)
void SetConversionDirectionState(bool _bTryBothDirections, editeng::HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection)
void SetFindHdl(const Link< weld::Button &, void > &_rHdl)
void Init()
reads settings from core and init controls
void SetClickByCharacterHdl(const Link< weld::ToggleButton &, void > &_rHdl)
void SetFont(const vcl::Font &rNewFont)
std::unique_ptr< SuggestionSet > m_xValueSet
void EditModify(const weld::Entry *pEdit, sal_uInt8 nEntryOffset)
HangulHanjaNewDictDialog(weld::Window *pParent)
#define SAL_INFO(area, stream)
std::unique_ptr< weld::Button > m_xOkBtn
std::unique_ptr< weld::ComboBox > m_xOriginalLB
OUString GetSelectedEntry() const
Reference< XExecutableDialog > m_xDialog
sal_uInt16 GetEntryCount() const
std::unique_ptr< SuggestionEdit > m_xEdit3
bool SetProperty(const OUString &rPropertyName, const css::uno::Any &rValue)
tools::Long Height() const
Reference< XComponentContext > getProcessComponentContext()
std::unique_ptr< weld::TreeView > m_xListBox
virtual ~HangulHanjaNewDictDialog() override
bool m_bInSelectionUpdate
IMPL_LINK_NOARG(AccessibilityCheckEntry, GotoButtonClicked, weld::Button &, void)
FILE * init(int, char **)
void SetFontHeight(tools::Long nHeight)
std::unique_ptr< SuggestionList > m_xSuggestions
void setHeight(tools::Long nHeight)
std::unique_ptr< weld::Entry > m_xDictNameED
std::unique_ptr< weld::CheckButton > m_xShowrecentlyfirstCB
#define UPH_IS_IGNORE_POST_POSITIONAL_WORD
VirtualDevice * get() const
ScXMLEditAttributeMap::Entry const aEntries[]
void InsertEntry(const OUString &rStr)
std::unique_ptr< SuggestionEdit > m_xEdit1
editeng::HangulHanjaConversion::ConversionFormat GetConversionFormat() const
css::uno::Any GetProperty(const OUString &rPropertyName) const
std::unique_ptr< weld::Button > m_xNewPB
std::unique_ptr< weld::ComboBox > m_xBookLB
bool m_bModifiedSuggestions
void SetByCharacter(bool _bByCharacter)
#define UPH_ACTIVE_CONVERSION_DICTIONARIES
std::unique_ptr< weld::Button > m_xReplaceAll
std::unique_ptr< weld::CheckButton > m_xAutoreplaceuniqueCB
constexpr sal_uInt16 KEY_SHIFT
std::unique_ptr< weld::CheckButton > m_xIgnorepostCB
std::unique_ptr< weld::TreeView > m_xDictsLB
void Push(PushFlags nFlags=PushFlags::ALL)
void SetChangeAllHdl(const Link< weld::Button &, void > &_rHdl)
bool GetName(OUString &_rRetName) const
void UpdateButtonStates()
editeng::HangulHanjaConversion::ConversionDirection GetDirection(editeng::HangulHanjaConversion::ConversionDirection eDefaultDirection) const
get current conversion direction to use (return argument if GetUseBothDirections is true) ...
OUString m_sSecondaryText
void SetConversionFormatChangedHdl(const Link< weld::Button &, void > &_rHdl)
Link< weld::ToggleButton &, void > m_aClickByCharacterLink
std::unique_ptr< RubyRadioButton > m_xHangulBelow
bool DeleteEntryFromDictionary(const css::uno::Reference< css::linguistic2::XConversionDictionary > &xDict)
void Reset(sal_uInt16 _nNumOfElement)
weld::Widget & implGetCurrentControl()
void init(weld::ScrolledWindow *pScrollBar, SuggestionEdit *pPrev, SuggestionEdit *pNext)
constexpr sal_uInt16 KEY_TAB
#define MAXNUM_SUGGESTIONS
std::vector< OUString > m_vElements
static css::lang::Locale convertToLocale(LanguageType nLangID, bool bResolveSystem=true)
HangulHanjaEditDictDialog * m_pParent
HangulHanjaOptionsDialog(weld::Window *pParent)