summaryrefslogtreecommitdiff
path: root/editeng/source/uno
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-12-11 15:16:51 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-12-12 08:26:40 +0100
commita62c2a5fa5d5be465b0edab6adeb1fd16ace462f (patch)
tree47cf29b4b7a0ba3ce321ce628a6b0a6175d978d7 /editeng/source/uno
parentcff72ec4bf87c6484be97d954966309ba7a5eb8a (diff)
Don't hold css::uno::Type instances by pointer
...in comphelper::PropertyMapEntry and SfxItemPropertyMapEntry. And as the arrays of such need to be initialized dynamically anyway, also change their name members to proper OUStrings while at it. Plus some const clean-up. Change-Id: I67d4d7b5773fb020605f369daf39528bec930606
Diffstat (limited to 'editeng/source/uno')
-rw-r--r--editeng/source/uno/unofield.cxx50
-rw-r--r--editeng/source/uno/unoipset.cxx8
-rw-r--r--editeng/source/uno/unotext.cxx16
3 files changed, 37 insertions, 37 deletions
diff --git a/editeng/source/uno/unofield.cxx b/editeng/source/uno/unofield.cxx
index 6c818e2a8566..b4ee7cd1b4cd 100644
--- a/editeng/source/uno/unofield.cxx
+++ b/editeng/source/uno/unofield.cxx
@@ -71,62 +71,62 @@ const SfxItemPropertySet* ImplGetFieldItemPropertySet( sal_Int32 mnId )
{
static const SfxItemPropertyMapEntry aExDateTimeFieldPropertyMap_Impl[] =
{
- { MAP_CHAR_LEN(UNO_TC_PROP_DATE_TIME), WID_DATE, &::getCppuType((const util::DateTime*)0), 0, 0 },
- { MAP_CHAR_LEN(UNO_TC_PROP_IS_FIXED), WID_BOOL1, &::getBooleanCppuType(), 0, 0 },
- { MAP_CHAR_LEN(UNO_TC_PROP_IS_DATE), WID_BOOL2, &::getBooleanCppuType(), 0, 0 },
- { MAP_CHAR_LEN(UNO_TC_PROP_NUMFORMAT), WID_INT32, &::getCppuType((const sal_Int32*)0), 0, 0 },
- {0,0,0,0,0,0}
+ { OUString(UNO_TC_PROP_DATE_TIME), WID_DATE, ::getCppuType((const util::DateTime*)0), 0, 0 },
+ { OUString(UNO_TC_PROP_IS_FIXED), WID_BOOL1, ::getBooleanCppuType(), 0, 0 },
+ { OUString(UNO_TC_PROP_IS_DATE), WID_BOOL2, ::getBooleanCppuType(), 0, 0 },
+ { OUString(UNO_TC_PROP_NUMFORMAT), WID_INT32, ::getCppuType((const sal_Int32*)0), 0, 0 },
+ { OUString(), 0, css::uno::Type(), 0, 0 }
};
static const SfxItemPropertySet aExDateTimeFieldPropertySet_Impl(aExDateTimeFieldPropertyMap_Impl);
static const SfxItemPropertyMapEntry aDateTimeFieldPropertyMap_Impl[] =
{
- { MAP_CHAR_LEN(UNO_TC_PROP_IS_DATE), WID_BOOL2, &::getBooleanCppuType(), 0, 0 },
- {0,0,0,0,0,0}
+ { OUString(UNO_TC_PROP_IS_DATE), WID_BOOL2, ::getBooleanCppuType(), 0, 0 },
+ { OUString(), 0, css::uno::Type(), 0, 0 }
};
static const SfxItemPropertySet aDateTimeFieldPropertySet_Impl(aDateTimeFieldPropertyMap_Impl);
static const SfxItemPropertyMapEntry aUrlFieldPropertyMap_Impl[] =
{
- { MAP_CHAR_LEN(UNO_TC_PROP_URL_FORMAT), WID_INT16, &::getCppuType((const sal_Int16*)0), 0, 0 },
- { MAP_CHAR_LEN(UNO_TC_PROP_URL_REPRESENTATION), WID_STRING1, &::getCppuType((const OUString*)0), 0, 0 },
- { MAP_CHAR_LEN(UNO_TC_PROP_URL_TARGET), WID_STRING2, &::getCppuType((const OUString*)0), 0, 0 },
- { MAP_CHAR_LEN(UNO_TC_PROP_URL), WID_STRING3, &::getCppuType((const OUString*)0), 0, 0 },
- {0,0,0,0,0,0}
+ { OUString(UNO_TC_PROP_URL_FORMAT), WID_INT16, ::getCppuType((const sal_Int16*)0), 0, 0 },
+ { OUString(UNO_TC_PROP_URL_REPRESENTATION), WID_STRING1, ::getCppuType((const OUString*)0), 0, 0 },
+ { OUString(UNO_TC_PROP_URL_TARGET), WID_STRING2, ::getCppuType((const OUString*)0), 0, 0 },
+ { OUString(UNO_TC_PROP_URL), WID_STRING3, ::getCppuType((const OUString*)0), 0, 0 },
+ { OUString(), 0, css::uno::Type(), 0, 0 }
};
static const SfxItemPropertySet aUrlFieldPropertySet_Impl(aUrlFieldPropertyMap_Impl);
static const SfxItemPropertyMapEntry aEmptyPropertyMap_Impl[] =
{
- {0,0,0,0,0,0}
+ { OUString(), 0, css::uno::Type(), 0, 0 }
};
static const SfxItemPropertySet aEmptyPropertySet_Impl(aEmptyPropertyMap_Impl);
static const SfxItemPropertyMapEntry aExtFileFieldPropertyMap_Impl[] =
{
- { MAP_CHAR_LEN(UNO_TC_PROP_IS_FIXED), WID_BOOL1, &::getBooleanCppuType(), 0, 0 },
- { MAP_CHAR_LEN(UNO_TC_PROP_FILE_FORMAT), WID_INT16, &::getCppuType((const sal_Int16*)0), 0, 0 },
- { MAP_CHAR_LEN(UNO_TC_PROP_CURRENT_PRESENTATION), WID_STRING1, &::getCppuType((const OUString*)0), 0, 0 },
- {0,0,0,0,0,0}
+ { OUString(UNO_TC_PROP_IS_FIXED), WID_BOOL1, ::getBooleanCppuType(), 0, 0 },
+ { OUString(UNO_TC_PROP_FILE_FORMAT), WID_INT16, ::getCppuType((const sal_Int16*)0), 0, 0 },
+ { OUString(UNO_TC_PROP_CURRENT_PRESENTATION), WID_STRING1, ::getCppuType((const OUString*)0), 0, 0 },
+ { OUString(), 0, css::uno::Type(), 0, 0 }
};
static const SfxItemPropertySet aExtFileFieldPropertySet_Impl(aExtFileFieldPropertyMap_Impl);
static const SfxItemPropertyMapEntry aAuthorFieldPropertyMap_Impl[] =
{
- { MAP_CHAR_LEN(UNO_TC_PROP_IS_FIXED), WID_BOOL1, &::getBooleanCppuType(), 0, 0 },
- { MAP_CHAR_LEN(UNO_TC_PROP_CURRENT_PRESENTATION), WID_STRING1,&::getCppuType((const OUString*)0), 0, 0 },
- { MAP_CHAR_LEN(UNO_TC_PROP_AUTHOR_CONTENT), WID_STRING2,&::getCppuType((const OUString*)0), 0, 0 },
- { MAP_CHAR_LEN(UNO_TC_PROP_AUTHOR_FORMAT), WID_INT16, &::getCppuType((const sal_Int16*)0), 0, 0 },
- { MAP_CHAR_LEN(UNO_TC_PROP_AUTHOR_FULLNAME), WID_BOOL2, &::getBooleanCppuType(), 0, 0 },
- {0,0,0,0,0,0}
+ { OUString(UNO_TC_PROP_IS_FIXED), WID_BOOL1, ::getBooleanCppuType(), 0, 0 },
+ { OUString(UNO_TC_PROP_CURRENT_PRESENTATION), WID_STRING1,::getCppuType((const OUString*)0), 0, 0 },
+ { OUString(UNO_TC_PROP_AUTHOR_CONTENT), WID_STRING2,::getCppuType((const OUString*)0), 0, 0 },
+ { OUString(UNO_TC_PROP_AUTHOR_FORMAT), WID_INT16, ::getCppuType((const sal_Int16*)0), 0, 0 },
+ { OUString(UNO_TC_PROP_AUTHOR_FULLNAME), WID_BOOL2, ::getBooleanCppuType(), 0, 0 },
+ { OUString(), 0, css::uno::Type(), 0, 0 }
};
static const SfxItemPropertySet aAuthorFieldPropertySet_Impl(aAuthorFieldPropertyMap_Impl);
static const SfxItemPropertyMapEntry aMeasureFieldPropertyMap_Impl[] =
{
- { MAP_CHAR_LEN(UNO_TC_PROP_MEASURE_KIND), WID_INT16, &::getCppuType((const sal_Int16*)0), 0, 0 },
- {0,0,0,0,0,0}
+ { OUString(UNO_TC_PROP_MEASURE_KIND), WID_INT16, ::getCppuType((const sal_Int16*)0), 0, 0 },
+ { OUString(), 0, css::uno::Type(), 0, 0 }
};
static const SfxItemPropertySet aMeasureFieldPropertySet_Impl(aMeasureFieldPropertyMap_Impl);
diff --git a/editeng/source/uno/unoipset.cxx b/editeng/source/uno/unoipset.cxx
index ed16db9b4148..fe955ba8d969 100644
--- a/editeng/source/uno/unoipset.cxx
+++ b/editeng/source/uno/unoipset.cxx
@@ -133,13 +133,13 @@ uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry*
SvxUnoConvertToMM( eMapUnit, aVal );
}
}
- else if ( pMap->pType->getTypeClass() == uno::TypeClass_ENUM &&
+ else if ( pMap->aType.getTypeClass() == uno::TypeClass_ENUM &&
aVal.getValueType() == ::getCppuType((const sal_Int32*)0) )
{
// convert typeless SfxEnumItem to enum type
sal_Int32 nEnum;
aVal >>= nEnum;
- aVal.setValue( &nEnum, *pMap->pType );
+ aVal.setValue( &nEnum, pMap->aType );
}
}
else
@@ -245,13 +245,13 @@ uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry*
}
}
- if ( pMap->pType->getTypeClass() == uno::TypeClass_ENUM &&
+ if ( pMap->aType.getTypeClass() == uno::TypeClass_ENUM &&
aVal.getValueType() == ::getCppuType((const sal_Int32*)0) )
{
sal_Int32 nEnum;
aVal >>= nEnum;
- aVal.setValue( &nEnum, *pMap->pType );
+ aVal.setValue( &nEnum, pMap->aType );
}
return aVal;
diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx
index 8a63ef7e3e5c..93c46ae97b71 100644
--- a/editeng/source/uno/unotext.cxx
+++ b/editeng/source/uno/unotext.cxx
@@ -88,11 +88,11 @@ const SfxItemPropertyMapEntry* ImplGetSvxTextPortionPropertyMap()
SVX_UNOEDIT_FONT_PROPERTIES,
SVX_UNOEDIT_OUTLINER_PROPERTIES,
SVX_UNOEDIT_PARA_PROPERTIES,
- {MAP_CHAR_LEN("TextField"), EE_FEATURE_FIELD, &::getCppuType((const uno::Reference< text::XTextField >*)0), beans::PropertyAttribute::READONLY, 0 },
- {MAP_CHAR_LEN("TextPortionType"), WID_PORTIONTYPE, &::getCppuType((const OUString*)0), beans::PropertyAttribute::READONLY, 0 },
- {MAP_CHAR_LEN("TextUserDefinedAttributes"), EE_CHAR_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
- {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
- {0,0,0,0,0,0}
+ {OUString("TextField"), EE_FEATURE_FIELD, ::getCppuType((const uno::Reference< text::XTextField >*)0), beans::PropertyAttribute::READONLY, 0 },
+ {OUString("TextPortionType"), WID_PORTIONTYPE, ::getCppuType((const OUString*)0), beans::PropertyAttribute::READONLY, 0 },
+ {OUString("TextUserDefinedAttributes"), EE_CHAR_XMLATTRIBS, ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ { OUString(), 0, css::uno::Type(), 0, 0 }
};
return aSvxTextPortionPropertyMap;
}
@@ -117,9 +117,9 @@ const SfxItemPropertyMapEntry* ImplGetSvxUnoOutlinerTextCursorPropertyMap()
SVX_UNOEDIT_FONT_PROPERTIES,
SVX_UNOEDIT_OUTLINER_PROPERTIES,
SVX_UNOEDIT_PARA_PROPERTIES,
- {MAP_CHAR_LEN("TextUserDefinedAttributes"), EE_CHAR_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
- {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
- {0,0,0,0,0,0}
+ {OUString("TextUserDefinedAttributes"), EE_CHAR_XMLATTRIBS, ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ { OUString(), 0, css::uno::Type(), 0, 0 }
};
return aSvxUnoOutlinerTextCursorPropertyMap;