diff options
-rw-r--r-- | editeng/inc/editeng/flditem.hxx | 2 | ||||
-rw-r--r-- | editeng/source/items/flditem.cxx | 2 | ||||
-rw-r--r-- | editeng/source/uno/unofield.cxx | 10 | ||||
-rw-r--r-- | offapi/com/sun/star/text/textfield/Type.idl | 11 | ||||
-rw-r--r-- | sc/source/ui/unoobj/fielduno.cxx | 18 |
5 files changed, 22 insertions, 21 deletions
diff --git a/editeng/inc/editeng/flditem.hxx b/editeng/inc/editeng/flditem.hxx index 03a2cacbe074..40ba0e28b126 100644 --- a/editeng/inc/editeng/flditem.hxx +++ b/editeng/inc/editeng/flditem.hxx @@ -57,7 +57,7 @@ public: static SvxFieldData* Create(const com::sun::star::uno::Reference<com::sun::star::text::XTextContent>& xContent); - SV_DECL_PERSIST1( SvxFieldData, SvPersistBase, UNKNOWN_FIELD) + SV_DECL_PERSIST1( SvxFieldData, SvPersistBase, com::sun::star::text::textfield::Type::UNSPECIFIED) SvxFieldData(); virtual ~SvxFieldData(); diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx index 0290ad4f56dc..36ba686a9960 100644 --- a/editeng/source/items/flditem.cxx +++ b/editeng/source/items/flditem.cxx @@ -49,8 +49,6 @@ using namespace com::sun::star; #define FRAME_MARKER (sal_uInt32)0x21981357 #define CHARSET_MARKER (FRAME_MARKER+1) -const sal_Int32 SvxFieldData::UNKNOWN_FIELD = -1; - SvxFieldData* SvxFieldData::Create(const uno::Reference<text::XTextContent>& xTextContent) { uno::Reference<beans::XPropertySet> xPropSet(xTextContent, uno::UNO_QUERY); diff --git a/editeng/source/uno/unofield.cxx b/editeng/source/uno/unofield.cxx index 975ab1506ee5..f08a820f90ca 100644 --- a/editeng/source/uno/unofield.cxx +++ b/editeng/source/uno/unofield.cxx @@ -313,7 +313,7 @@ SvxUnoTextField::SvxUnoTextField( uno::Reference< text::XTextRange > xAnchor, co : OComponentHelper( getMutex() ) , mxAnchor( xAnchor ) , mpPropSet(NULL) -, mnServiceId(SvxFieldData::UNKNOWN_FIELD) +, mnServiceId(text::textfield::Type::UNSPECIFIED) , mpImpl( new SvxUnoFieldData_Impl ) { DBG_ASSERT(pData, "pFieldData == NULL! [CL]" ); @@ -323,8 +323,8 @@ SvxUnoTextField::SvxUnoTextField( uno::Reference< text::XTextRange > xAnchor, co if(pData) { mnServiceId = pData->GetClassId(); - DBG_ASSERT(mnServiceId != SvxFieldData::UNKNOWN_FIELD, "unknown SvxFieldData! [CL]"); - if (mnServiceId != SvxFieldData::UNKNOWN_FIELD) + DBG_ASSERT(mnServiceId != text::textfield::Type::UNSPECIFIED, "unknown SvxFieldData! [CL]"); + if (mnServiceId != text::textfield::Type::UNSPECIFIED) { // extract field properties from data class switch( mnServiceId ) @@ -911,7 +911,7 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoTextCreateTextField( const ::rt { OUString aFieldType( ServiceSpecifier.copy( aTextFieldPrexit.getLength() ) ); - sal_Int32 nId = SvxFieldData::UNKNOWN_FIELD; + sal_Int32 nId = text::textfield::Type::UNSPECIFIED; if ( aFieldType == "DateTime" ) { @@ -953,7 +953,7 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoTextCreateTextField( const ::rt nId = text::textfield::Type::MEASURE; } - if (nId != SvxFieldData::UNKNOWN_FIELD) + if (nId != text::textfield::Type::UNSPECIFIED) xRet = (::cppu::OWeakObject * )new SvxUnoTextField( nId ); } diff --git a/offapi/com/sun/star/text/textfield/Type.idl b/offapi/com/sun/star/text/textfield/Type.idl index fe99a912d569..29f8c4d80e3c 100644 --- a/offapi/com/sun/star/text/textfield/Type.idl +++ b/offapi/com/sun/star/text/textfield/Type.idl @@ -43,6 +43,8 @@ module com { module sun { module star { module text { module textfield { */ constants Type { + const long UNSPECIFIED = -1; + const long DATE = 0; const long URL = 1; const long PAGE = 2; @@ -54,10 +56,11 @@ constants Type const long EXTENDED_FILE = 8; const long AUTHOR = 9; const long MEASURE = 10; - const long EXTENDED_DATE = 11; - const long HEADER = 12; - const long FOOTER = 13; - const long DATE_TIME = 14; + const long HEADER = 11; + const long FOOTER = 12; + const long DATE_TIME = 13; + + const long EXTENDED_DATE = 14; }; }; }; }; }; }; diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx index 7bc82b770f8f..7f36dfb1b71a 100644 --- a/sc/source/ui/unoobj/fielduno.cxx +++ b/sc/source/ui/unoobj/fielduno.cxx @@ -206,7 +206,7 @@ ScUnoEditEngine::ScUnoEditEngine(ScEditEngineDefaulter* pSource) : ScEditEngineDefaulter( *pSource ), eMode( SC_UNO_COLLECT_NONE ), nFieldCount( 0 ), - mnFieldType(SvxFieldData::UNKNOWN_FIELD), + mnFieldType(text::textfield::Type::UNSPECIFIED), pFound( NULL ) { if (pSource) @@ -231,7 +231,7 @@ String ScUnoEditEngine::CalcFieldValue( const SvxFieldItem& rField, const SvxFieldData* pFieldData = rField.GetField(); if ( pFieldData ) { - if (mnFieldType == SvxFieldData::UNKNOWN_FIELD || pFieldData->GetClassId() == mnFieldType) + if (mnFieldType == text::textfield::Type::UNSPECIFIED || pFieldData->GetClassId() == mnFieldType) { if ( eMode == SC_UNO_COLLECT_FINDINDEX && !pFound && nFieldCount == nFieldIndex ) { @@ -255,7 +255,7 @@ String ScUnoEditEngine::CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 ScUnoEditEngine::CountFields() { eMode = SC_UNO_COLLECT_COUNT; - mnFieldType = SvxFieldData::UNKNOWN_FIELD; + mnFieldType = text::textfield::Type::UNSPECIFIED; nFieldCount = 0; UpdateFields(); eMode = SC_UNO_COLLECT_NONE; @@ -267,7 +267,7 @@ SvxFieldData* ScUnoEditEngine::FindByIndex(sal_uInt16 nIndex) { eMode = SC_UNO_COLLECT_FINDINDEX; nFieldIndex = nIndex; - mnFieldType = SvxFieldData::UNKNOWN_FIELD; + mnFieldType = text::textfield::Type::UNSPECIFIED; nFieldCount = 0; UpdateFields(); eMode = SC_UNO_COLLECT_NONE; @@ -283,7 +283,7 @@ SvxFieldData* ScUnoEditEngine::FindByPos(sal_uInt16 nPar, xub_StrLen nPos, sal_I mnFieldType = nType; nFieldCount = 0; UpdateFields(); - mnFieldType = SvxFieldData::UNKNOWN_FIELD; + mnFieldType = text::textfield::Type::UNSPECIFIED; eMode = SC_UNO_COLLECT_NONE; return pFound; @@ -718,7 +718,7 @@ void ScEditFieldObj::setPropertyValueURL(const rtl::OUString& rName, const com:: // Typ egal (in Zellen gibts nur URLs) SvxFieldData* pField = aTempEngine.FindByPos( - aSelection.nStartPara, aSelection.nStartPos, SvxFieldData::UNKNOWN_FIELD); + aSelection.nStartPara, aSelection.nStartPos, text::textfield::Type::UNSPECIFIED); OSL_ENSURE(pField,"setPropertyValue: Feld nicht gefunden"); if (!pField) return; @@ -791,7 +791,7 @@ uno::Any ScEditFieldObj::getPropertyValueURL(const rtl::OUString& rName) // Typ egal (in Zellen gibts nur URLs) const SvxFieldData* pField = aTempEngine.FindByPos( - aSelection.nStartPara, aSelection.nStartPos, SvxFieldData::UNKNOWN_FIELD); + aSelection.nStartPara, aSelection.nStartPos, text::textfield::Type::UNSPECIFIED); OSL_ENSURE(pField,"getPropertyValue: Feld nicht gefunden"); if (!pField) throw uno::RuntimeException(); @@ -1105,7 +1105,7 @@ void ScEditFieldObj::setPropertyValueSheet(const rtl::OUString& rName, const uno // Typ egal (in Zellen gibts nur URLs) SvxFieldData* pField = aTempEngine.FindByPos( - aSelection.nStartPara, aSelection.nStartPos, SvxFieldData::UNKNOWN_FIELD); + aSelection.nStartPara, aSelection.nStartPos, text::textfield::Type::UNSPECIFIED); OSL_ENSURE(pField,"setPropertyValue: Feld nicht gefunden"); if (!pField) return; @@ -1245,7 +1245,7 @@ rtl::OUString SAL_CALL ScEditFieldObj::getPresentation( sal_Bool bShowCommand ) // Typ egal (in Zellen gibts nur URLs) const SvxFieldData* pField = aTempEngine.FindByPos( - aSelection.nStartPara, aSelection.nStartPos, SvxFieldData::UNKNOWN_FIELD); + aSelection.nStartPara, aSelection.nStartPos, text::textfield::Type::UNSPECIFIED); OSL_ENSURE(pField,"getPresentation: Feld nicht gefunden"); if (!pField) return rtl::OUString(); |