40 : GenericDialogController(pWindow,
"modules/simpress/ui/dlgfield.ui",
"EditFieldsDialog")
41 , m_aInputSet(
std::move(aSet))
43 , m_xRbtFix(m_xBuilder->weld_radio_button(
"fixedRB"))
44 , m_xRbtVar(m_xBuilder->weld_radio_button(
"varRB"))
45 , m_xLbLanguage(new
SvxLanguageBox(m_xBuilder->weld_combo_box(
"languageLB")))
46 , m_xLbFormat(m_xBuilder->weld_combo_box(
"formatLB"))
48 m_xLbLanguage->SetLanguageList( SvxLanguageListFlags::ALL|SvxLanguageListFlags::ONLY_KNOWN,
false );
65 if(
m_xRbtFix->get_state_changed_from_saved() ||
66 m_xRbtVar->get_state_changed_from_saved() ||
75 eType = SvxDateType::Fix;
77 eType = SvxDateType::Var;
91 eType = SvxTimeType::Fix;
93 eType = SvxTimeType::Var;
107 eType = SvxFileType::Fix;
109 eType = SvxFileType::Var;
133 eType = SvxAuthorType::Fix;
135 eType = SvxAuthorType::Var;
166 aDateField.
SetFormat( SvxDateFormat::A );
168 aDateField.
SetFormat( SvxDateFormat::B );
170 aDateField.
SetFormat( SvxDateFormat::C );
172 aDateField.
SetFormat( SvxDateFormat::D );
174 aDateField.
SetFormat( SvxDateFormat::E );
176 aDateField.
SetFormat( SvxDateFormat::F );
179 m_xLbFormat->set_active(
static_cast<sal_uInt16
>(pDateField->GetFormat()) - 2 );
190 aTimeField.
SetFormat( SvxTimeFormat::HH24_MM );
192 aTimeField.
SetFormat( SvxTimeFormat::HH24_MM_SS );
194 aTimeField.
SetFormat( SvxTimeFormat::HH24_MM_SS_00 );
196 aTimeField.
SetFormat( SvxTimeFormat::HH12_MM );
198 aTimeField.
SetFormat( SvxTimeFormat::HH12_MM_SS );
200 aTimeField.
SetFormat( SvxTimeFormat::HH12_MM_SS_00 );
206 m_xLbFormat->set_active(
static_cast<sal_uInt16
>(pTimeField->GetFormat()) - 2 );
215 m_xLbFormat->set_active(
static_cast<sal_uInt16
>( pFileField->GetFormat() ) );
221 for( sal_uInt16
i = 0;
i < 4;
i++ )
227 m_xLbFormat->set_active(
static_cast<sal_uInt16
>( pAuthorField->GetFormat() ) );
239 if( pDateField->GetType() == SvxDateType::Fix )
246 if( pTimeField->GetType() == SvxTimeType::Fix )
253 if( pFileField->GetType() == SvxFileType::Fix )
260 if( pAuthorField->GetType() == SvxAuthorType::Fix )
290 aOutput.
Put( aItem );
293 aOutput.
Put( aItemCJK );
296 aOutput.
Put( aItemCTL );
dialog to adjust field-commands
std::unique_ptr< weld::RadioButton > m_xRbtFix
const SvxFieldData * m_pField
std::unique_ptr< weld::ComboBox > m_xLbFormat
SvxFieldData * GetField()
Returns the new field, owned by caller.
SdModifyFieldDlg(weld::Window *pWindow, const SvxFieldData *pInField, SfxItemSet aSet)
dialog to edit field commands
std::unique_ptr< SvxLanguageBox > m_xLbLanguage
virtual ~SdModifyFieldDlg() override
std::unique_ptr< weld::RadioButton > m_xRbtVar
SfxItemSet GetItemSet() const
SfxItemPool * GetPool() const
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const OUString & GetName() const
SfxMedium * GetMedium() const
static SAL_WARN_UNUSED_RESULT SfxObjectShell * Current()
OUString GetFirstName() const
OUString GetLastName() const
OUString GetFormatted() const
void SetFormat(SvxAuthorFormat eFmt)
OUString GetFormatted(SvNumberFormatter &rFormatter, LanguageType eLanguage) const
void SetFormat(SvxDateFormat eFmt)
void SetFormat(SvxTimeFormat eFmt)
OUString GetFormatted(SvNumberFormatter &rFormatter, LanguageType eLanguage) const
IMPL_LINK_NOARG(SdModifyFieldDlg, LanguageChangeHdl, weld::ComboBox &, void)
constexpr TypedWhichId< SvxLanguageItem > EE_CHAR_LANGUAGE_CTL(EE_CHAR_START+16)
constexpr TypedWhichId< SvxLanguageItem > EE_CHAR_LANGUAGE_CJK(EE_CHAR_START+15)
constexpr TypedWhichId< SvxLanguageItem > EE_CHAR_LANGUAGE(EE_CHAR_START+14)
#define LINK(Instance, Class, Member)
OUString SdResId(TranslateId aId)