diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-05-09 11:36:08 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-05-09 16:28:47 -0400 |
commit | 47910c495331a0173e304cac40e573c1195e77ee (patch) | |
tree | 1ba0fb4e120bc7aa164bf86119175958547436b2 /sc/source/ui/unoobj | |
parent | 151c2aeb1054679dde6f3b2b4e9480d564b5ca3f (diff) |
FILE (title) field doesn't have any properties.
Change-Id: I67c62e6be5afc65d74462a17b047946de88659a0
Diffstat (limited to 'sc/source/ui/unoobj')
-rw-r--r-- | sc/source/ui/unoobj/fielduno.cxx | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx index f196978649ae..0bd3bf40c480 100644 --- a/sc/source/ui/unoobj/fielduno.cxx +++ b/sc/source/ui/unoobj/fielduno.cxx @@ -74,6 +74,16 @@ const SfxItemPropertySet* getDateTimePropertySet() return &aMap; } +const SfxItemPropertySet* getEmptyPropertySet() +{ + static SfxItemPropertyMapEntry aMapContent[] = + { + {0,0,0,0,0,0} + }; + static SfxItemPropertySet aMap(aMapContent); + return &aMap; +} + const SfxItemPropertySet* lcl_GetURLPropertySet() { static SfxItemPropertyMapEntry aURLPropertyMap_Impl[] = @@ -979,6 +989,8 @@ ScEditFieldObj::ScEditFieldObj( switch (meType) { case text::textfield::Type::FILE: + pPropSet = getEmptyPropertySet(); + break; case text::textfield::Type::EXTENDED_FILE: pPropSet = lcl_GetFileFieldPropertySet(); break; @@ -1159,7 +1171,6 @@ void SAL_CALL ScEditFieldObj::setPropertyValue( case text::textfield::Type::URL: setPropertyValueURL(aPropertyName, aValue); break; - case text::textfield::Type::FILE: case text::textfield::Type::EXTENDED_FILE: setPropertyValueFile(aPropertyName, aValue); break; @@ -1172,6 +1183,7 @@ void SAL_CALL ScEditFieldObj::setPropertyValue( case text::textfield::Type::TABLE: setPropertyValueSheet(aPropertyName, aValue); break; + case text::textfield::Type::FILE: default: throw beans::UnknownPropertyException(); } @@ -1213,7 +1225,6 @@ uno::Any SAL_CALL ScEditFieldObj::getPropertyValue( const rtl::OUString& aProper { case text::textfield::Type::URL: return getPropertyValueURL(aPropertyName); - case text::textfield::Type::FILE: case text::textfield::Type::EXTENDED_FILE: return getPropertyValueFile(aPropertyName); case text::textfield::Type::DATE: @@ -1221,6 +1232,7 @@ uno::Any SAL_CALL ScEditFieldObj::getPropertyValue( const rtl::OUString& aProper case text::textfield::Type::EXTENDED_DATE: case text::textfield::Type::EXTENDED_TIME: return getPropertyValueDateTime(aPropertyName); + case text::textfield::Type::FILE: default: throw beans::UnknownPropertyException(); } |