diff options
author | os <os@openoffice.org> | 2009-10-12 10:27:34 +0200 |
---|---|---|
committer | os <os@openoffice.org> | 2009-10-12 10:27:34 +0200 |
commit | 4e525deca576c2678cd5ace6095415ef41968875 (patch) | |
tree | e3522eaba5bf9d57031af8ebd42ef4ccf6d19595 | |
parent | cdfba51c8e577750050d4f564416e6113d642f41 (diff) |
#i105687# enable number format for custom date/datetime/time data
-rw-r--r-- | sw/source/core/unocore/unomap.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/fldui/flddinf.cxx | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx index 3730da041f90..51d37522f0fd 100644 --- a/sw/source/core/unocore/unomap.cxx +++ b/sw/source/core/unocore/unomap.cxx @@ -2249,6 +2249,8 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s {SW_PROP_NMID(UNO_NAME_NAME), FIELD_PROP_PAR4, CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_NONE, 0}, {SW_PROP_NMID(UNO_NAME_CURRENT_PRESENTATION), FIELD_PROP_PAR3, CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_NONE, 0}, {SW_PROP_NMID(UNO_NAME_IS_FIXED), FIELD_PROP_BOOL1, CPPU_E2T(CPPUTYPE_BOOLEAN) , PROPERTY_NONE,0}, + {SW_PROP_NMID(UNO_NAME_NUMBER_FORMAT), FIELD_PROP_FORMAT, CPPU_E2T(CPPUTYPE_INT32), PROPERTY_NONE, 0}, + {SW_PROP_NMID(UNO_NAME_IS_FIXED_LANGUAGE), FIELD_PROP_BOOL4, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0}, COMMON_FLDTYP_PROPERTIES {0,0,0,0,0,0} }; diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx index 5fce68753d29..d28ed50043a9 100644 --- a/sw/source/ui/fldui/flddinf.cxx +++ b/sw/source/ui/fldui/flddinf.cxx @@ -264,7 +264,6 @@ IMPL_LINK( SwFldDokInfPage, TypeHdl, ListBox *, EMPTYARG ) /*-------------------------------------------------------------------- Beschreibung: --------------------------------------------------------------------*/ - IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG ) { USHORT nSubType = (USHORT)(ULONG)pSelEntry->GetUserData(); @@ -360,7 +359,7 @@ IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG ) if (IsFldEdit()) { nPos = aSelectionLB.GetSelectEntryPos(); - if (nPos != LISTBOX_ENTRY_NOTFOUND) + if (nPos != LISTBOX_ENTRY_NOTFOUND ) { nSubType = (USHORT)(ULONG)aSelectionLB.GetEntryData(nPos); @@ -372,7 +371,6 @@ IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG ) SwWrtShell *pSh = GetWrtShell(); if(pSh) { - SvNumberFormatter* pFormatter = pSh->GetNumberFormatter(); LanguageType eLang = aFormatLB.GetCurLanguage(); if (nNewType == NUMBERFORMAT_DATE) @@ -384,6 +382,10 @@ IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG ) aFormatLB.SetDefFormat(nFormat); } } + else if( (nSubType == DI_CUSTOM) && (nNewType != 0) ) + { + aFormatLB.SetDefFormat(nFormat); + } } aFormatLB.Enable(bEnable); |