23#include <com/sun/star/i18n/TextConversionOption.hpp>
34 : GenericDialogController(pParent,
"svx/ui/chineseconversiondialog.ui",
"ChineseConversionDialog")
35 , m_xBP_OK(m_xBuilder->weld_button(
"ok"))
36 , m_xPB_Editterms(m_xBuilder->weld_button(
"editterms"))
37 , m_xRB_To_Simplified(m_xBuilder->weld_radio_button(
"tosimplified"))
38 , m_xRB_To_Traditional(m_xBuilder->weld_radio_button(
"totraditional"))
39 , m_xCB_Translate_Commonterms(m_xBuilder->weld_check_button(
"commonterms"))
63 ,
bool& rbTranslateCommonTerms )
const
74 aAny <<= m_xRB_To_Simplified->get_active();
76 aAny <<= m_xCB_Translate_Commonterms->get_active();
84 if( !m_xDictionaryDialog )
86 sal_Int32 nTextConversionOptions = i18n::TextConversionOption::NONE;
87 if (!m_xCB_Translate_Commonterms->get_active())
88 nTextConversionOptions = nTextConversionOptions | i18n::TextConversionOption::CHARACTER_BY_CHARACTER;
89 m_xDictionaryDialog->setDirectionAndTextConversionOptions(m_xRB_To_Simplified->get_active(), nTextConversionOptions);
90 m_xDictionaryDialog->run();
Reference< XExecutableDialog > m_xDialog
css::uno::Any GetProperty(std::u16string_view rPropertyName) const
bool SetProperty(std::u16string_view rPropertyName, const css::uno::Any &rValue)
std::unique_ptr< weld::Button > m_xPB_Editterms
std::unique_ptr< weld::RadioButton > m_xRB_To_Simplified
virtual ~ChineseTranslationDialog() override
std::unique_ptr< weld::Button > m_xBP_OK
void getSettings(bool &rbDirectionToSimplified, bool &rbTranslateCommonTerms) const
std::unique_ptr< weld::CheckButton > m_xCB_Translate_Commonterms
ChineseTranslationDialog(weld::Window *pParent)
std::unique_ptr< weld::RadioButton > m_xRB_To_Traditional
constexpr OUStringLiteral UPN_IS_DIRECTION_TO_SIMPLIFIED
constexpr OUStringLiteral UPN_IS_TRANSLATE_COMMON_TERMS
#define LINK(Instance, Class, Member)
IMPL_LINK_NOARG(ChineseDictionaryDialog, SizeAllocHdl, const Size &, void)