summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-04-25 19:09:53 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-04-26 09:58:06 -0400
commita262e46b6bddc7d819296cf49f84d18f80fdbdad (patch)
tree2b97303a1bb84fc6285281c46899cd35d2bca336 /sc
parent1aa91a2d8e7db5cebff5b47f3005f1acff64d25e (diff)
ScHeaderFieldObj is no more.
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/fielduno.hxx126
-rw-r--r--sc/source/ui/unoobj/fielduno.cxx432
2 files changed, 24 insertions, 534 deletions
diff --git a/sc/inc/fielduno.hxx b/sc/inc/fielduno.hxx
index 80efb2403ee8..82ce9c860382 100644
--- a/sc/inc/fielduno.hxx
+++ b/sc/inc/fielduno.hxx
@@ -197,132 +197,6 @@ public:
throw(::com::sun::star::uno::RuntimeException);
};
-
-class ScHeaderFieldObj : public ScMutexHelper,
- public ::cppu::OComponentHelper,
- public ::com::sun::star::text::XTextField,
- public ::com::sun::star::beans::XPropertySet,
- public ::com::sun::star::lang::XUnoTunnel,
- public ::com::sun::star::lang::XServiceInfo
-{
-private:
- const SfxItemPropertySet* pPropSet;
- com::sun::star::uno::Reference<com::sun::star::text::XTextRange> mpContent;
- sal_uInt16 nType;
- ScEditSource* mpEditSource;
- ESelection aSelection;
- sal_Int16 nFileFormat; // enum SvxFileFormat, valid if not inserted
-
- ScHeaderFieldObj(); // disabled
-public:
- ScHeaderFieldObj(
- const com::sun::star::uno::Reference<com::sun::star::text::XTextRange>& rContent,
- ScEditSource* pEditSrc, sal_uInt16 nT, const ESelection& rSel);
- virtual ~ScHeaderFieldObj();
-
- // called by getImplementation:
- void DeleteField();
- sal_Bool IsInserted() const { return mpEditSource != NULL; }
- SvxFieldItem CreateFieldItem();
- void InitDoc(
- const com::sun::star::uno::Reference<com::sun::star::text::XTextRange>& rContent,
- ScEditSource* pEditSrc, const ESelection& rSel);
-
- virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation(
- const ::com::sun::star::uno::Type & rType )
- throw(::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
- const ::com::sun::star::uno::Type & rType )
- throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL acquire() throw();
- virtual void SAL_CALL release() throw();
-
- // XTextField
- virtual ::rtl::OUString SAL_CALL getPresentation( sal_Bool bShowCommand )
- throw(::com::sun::star::uno::RuntimeException);
-
- // XTextContent
- virtual void SAL_CALL attach( const ::com::sun::star::uno::Reference<
- ::com::sun::star::text::XTextRange >& xTextRange )
- throw(::com::sun::star::lang::IllegalArgumentException,
- ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL
- getAnchor() throw(::com::sun::star::uno::RuntimeException);
-
- // XComponent
- virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference<
- ::com::sun::star::lang::XEventListener >& xListener )
- throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference<
- ::com::sun::star::lang::XEventListener >& aListener )
- throw(::com::sun::star::uno::RuntimeException);
-
- // XPropertySet
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
- SAL_CALL getPropertySetInfo()
- throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName,
- const ::com::sun::star::uno::Any& aValue )
- throw(::com::sun::star::beans::UnknownPropertyException,
- ::com::sun::star::beans::PropertyVetoException,
- ::com::sun::star::lang::IllegalArgumentException,
- ::com::sun::star::lang::WrappedTargetException,
- ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
- const ::rtl::OUString& PropertyName )
- throw(::com::sun::star::beans::UnknownPropertyException,
- ::com::sun::star::lang::WrappedTargetException,
- ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::beans::XPropertyChangeListener >& xListener )
- throw(::com::sun::star::beans::UnknownPropertyException,
- ::com::sun::star::lang::WrappedTargetException,
- ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::beans::XPropertyChangeListener >& aListener )
- throw(::com::sun::star::beans::UnknownPropertyException,
- ::com::sun::star::lang::WrappedTargetException,
- ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::beans::XVetoableChangeListener >& aListener )
- throw(::com::sun::star::beans::UnknownPropertyException,
- ::com::sun::star::lang::WrappedTargetException,
- ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::beans::XVetoableChangeListener >& aListener )
- throw(::com::sun::star::beans::UnknownPropertyException,
- ::com::sun::star::lang::WrappedTargetException,
- ::com::sun::star::uno::RuntimeException);
-
- // XUnoTunnel
- virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence<
- sal_Int8 >& aIdentifier )
- throw(::com::sun::star::uno::RuntimeException);
-
- static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
- static ScHeaderFieldObj* getImplementation( const com::sun::star::uno::Reference<
- com::sun::star::text::XTextContent> xObj );
-
- // XServiceInfo
- virtual ::rtl::OUString SAL_CALL getImplementationName()
- throw(::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
- throw(::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
- throw(::com::sun::star::uno::RuntimeException);
-
- // XTypeProvider
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
- throw(::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
- throw(::com::sun::star::uno::RuntimeException);
-};
-
/**
* Generic UNO wrapper for edit engine's field item. This will eventually
* replace ScCellFieldObj and ScHeaderFieldObj.
diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx
index 42a137d1e9a7..ecc660ecb336 100644
--- a/sc/source/ui/unoobj/fielduno.cxx
+++ b/sc/source/ui/unoobj/fielduno.cxx
@@ -102,6 +102,30 @@ const SfxItemPropertySet* lcl_GetFileFieldPropertySet()
return &aFileFieldPropertySet_Impl;
}
+SvxFileFormat lcl_UnoToSvxFileFormat( sal_Int16 nUnoValue )
+{
+ switch( nUnoValue )
+ {
+ case text::FilenameDisplayFormat::FULL: return SVXFILEFORMAT_FULLPATH;
+ case text::FilenameDisplayFormat::PATH: return SVXFILEFORMAT_PATH;
+ case text::FilenameDisplayFormat::NAME: return SVXFILEFORMAT_NAME;
+ default:
+ return SVXFILEFORMAT_NAME_EXT;
+ }
+}
+
+sal_Int16 lcl_SvxToUnoFileFormat( SvxFileFormat nSvxValue )
+{
+ switch( nSvxValue )
+ {
+ case SVXFILEFORMAT_NAME_EXT: return text::FilenameDisplayFormat::NAME_AND_EXT;
+ case SVXFILEFORMAT_FULLPATH: return text::FilenameDisplayFormat::FULL;
+ case SVXFILEFORMAT_PATH: return text::FilenameDisplayFormat::PATH;
+ default:
+ return text::FilenameDisplayFormat::NAME;
+ }
+}
+
ScEditFieldObj::FieldType getFieldType(sal_uInt16 nSvxType)
{
switch (nSvxType)
@@ -136,8 +160,6 @@ ScEditFieldObj::FieldType getFieldType(sal_uInt16 nSvxType)
}
-//------------------------------------------------------------------------
-
#define SCTEXTFIELD_SERVICE "com.sun.star.text.TextField"
#define SCTEXTCONTENT_SERVICE "com.sun.star.text.TextContent"
@@ -642,412 +664,6 @@ void SAL_CALL ScHeaderFieldsObj::removeRefreshListener( const uno::Reference<uti
}
}
-//------------------------------------------------------------------------
-
-SvxFileFormat lcl_UnoToSvxFileFormat( sal_Int16 nUnoValue )
-{
- switch( nUnoValue )
- {
- case text::FilenameDisplayFormat::FULL: return SVXFILEFORMAT_FULLPATH;
- case text::FilenameDisplayFormat::PATH: return SVXFILEFORMAT_PATH;
- case text::FilenameDisplayFormat::NAME: return SVXFILEFORMAT_NAME;
- default:
- return SVXFILEFORMAT_NAME_EXT;
- }
-}
-
-sal_Int16 lcl_SvxToUnoFileFormat( SvxFileFormat nSvxValue )
-{
- switch( nSvxValue )
- {
- case SVXFILEFORMAT_NAME_EXT: return text::FilenameDisplayFormat::NAME_AND_EXT;
- case SVXFILEFORMAT_FULLPATH: return text::FilenameDisplayFormat::FULL;
- case SVXFILEFORMAT_PATH: return text::FilenameDisplayFormat::PATH;
- default:
- return text::FilenameDisplayFormat::NAME;
- }
-}
-
-ScHeaderFieldObj::ScHeaderFieldObj(
- const uno::Reference<text::XTextRange>& rContent,
- ScEditSource* pEditSrc, sal_uInt16 nT, const ESelection& rSel) :
- OComponentHelper( getMutex() ),
- pPropSet( (nT == SC_SERVICE_FILEFIELD) ? lcl_GetFileFieldPropertySet() : lcl_GetHeaderFieldPropertySet() ),
- mpContent(rContent),
- nType( nT ),
- mpEditSource(pEditSrc),
- aSelection( rSel ),
- nFileFormat( SVXFILEFORMAT_NAME_EXT )
-{
-}
-
-uno::Any SAL_CALL ScHeaderFieldObj::queryAggregation( const uno::Type& rType )
- throw(uno::RuntimeException)
-{
- SC_QUERYINTERFACE( text::XTextField )
- SC_QUERYINTERFACE( text::XTextContent ) // parent of XTextField
- SC_QUERYINTERFACE( beans::XPropertySet )
- SC_QUERYINTERFACE( lang::XUnoTunnel )
- SC_QUERYINTERFACE( lang::XServiceInfo )
-
- return OComponentHelper::queryAggregation( rType ); // XComponent
-}
-
-uno::Sequence<uno::Type> SAL_CALL ScHeaderFieldObj::getTypes() throw(uno::RuntimeException)
-{
- static uno::Sequence<uno::Type> aTypes;
- if ( aTypes.getLength() == 0 )
- {
- uno::Sequence<uno::Type> aParentTypes(OComponentHelper::getTypes());
- long nParentLen = aParentTypes.getLength();
- const uno::Type* pParentPtr = aParentTypes.getConstArray();
-
- aTypes.realloc( nParentLen + 4 );
- uno::Type* pPtr = aTypes.getArray();
- pPtr[nParentLen + 0] = getCppuType((const uno::Reference<text::XTextField>*)0);
- pPtr[nParentLen + 1] = getCppuType((const uno::Reference<beans::XPropertySet>*)0);
- pPtr[nParentLen + 2] = getCppuType((const uno::Reference<lang::XUnoTunnel>*)0);
- pPtr[nParentLen + 3] = getCppuType((const uno::Reference<lang::XServiceInfo>*)0);
-
- for (long i=0; i<nParentLen; i++)
- pPtr[i] = pParentPtr[i]; // parent types first
- }
- return aTypes;
-}
-
-namespace
-{
- class theScHeaderFieldObjImplementationId : public rtl::Static< UnoTunnelIdInit, theScHeaderFieldObjImplementationId > {};
-}
-
-uno::Sequence<sal_Int8> SAL_CALL ScHeaderFieldObj::getImplementationId()
- throw(uno::RuntimeException)
-{
- return theScHeaderFieldObjImplementationId::get().getSeq();
-}
-
-uno::Any SAL_CALL ScHeaderFieldObj::queryInterface( const uno::Type& rType )
- throw(uno::RuntimeException)
-{
- return OComponentHelper::queryInterface( rType );
-}
-
-void SAL_CALL ScHeaderFieldObj::acquire() throw()
-{
- OComponentHelper::acquire();
-}
-
-void SAL_CALL ScHeaderFieldObj::release() throw()
-{
- OComponentHelper::release();
-}
-
-void ScHeaderFieldObj::InitDoc(
- const uno::Reference<text::XTextRange>& rContent, ScEditSource* pEditSrc, const ESelection& rSel)
-{
- if (!mpEditSource)
- {
- mpEditSource = pEditSrc;
- aSelection = rSel;
- mpContent = rContent;
- }
-}
-
-ScHeaderFieldObj::~ScHeaderFieldObj()
-{
- delete mpEditSource;
-}
-
-// per getImplementation gerufen:
-
-SvxFieldItem ScHeaderFieldObj::CreateFieldItem()
-{
- OSL_ENSURE( !mpEditSource, "CreateFieldItem mit eingefuegtem Feld" );
-
- switch (nType)
- {
- case SC_SERVICE_PAGEFIELD:
- {
- SvxPageField aField;
- return SvxFieldItem( aField, EE_FEATURE_FIELD );
- }
- case SC_SERVICE_PAGESFIELD:
- {
- SvxPagesField aField;
- return SvxFieldItem( aField, EE_FEATURE_FIELD );
- }
- case SC_SERVICE_DATEFIELD:
- {
- SvxDateField aField;
- return SvxFieldItem( aField, EE_FEATURE_FIELD );
- }
- case SC_SERVICE_TIMEFIELD:
- {
- SvxTimeField aField;
- return SvxFieldItem( aField, EE_FEATURE_FIELD );
- }
- case SC_SERVICE_TITLEFIELD:
- {
- SvxFileField aField;
- return SvxFieldItem( aField, EE_FEATURE_FIELD );
- }
- case SC_SERVICE_FILEFIELD:
- {
- SvxExtFileField aField;
- aField.SetFormat( (SvxFileFormat) nFileFormat );
- return SvxFieldItem( aField, EE_FEATURE_FIELD );
- }
- case SC_SERVICE_SHEETFIELD:
- {
- SvxTableField aField;
- return SvxFieldItem( aField, EE_FEATURE_FIELD );
- }
- }
-
- return SvxFieldItem( SvxFieldData(), EE_FEATURE_FIELD );
-}
-
-void ScHeaderFieldObj::DeleteField()
-{
- if (mpEditSource)
- {
- SvxTextForwarder* pForwarder = mpEditSource->GetTextForwarder();
- pForwarder->QuickInsertText( String(), aSelection );
- mpEditSource->UpdateData();
-
- aSelection.nEndPara = aSelection.nStartPara;
- aSelection.nEndPos = aSelection.nStartPos;
-
- //! Broadcast, um Selektion in anderen Objekten anzupassen
- //! (auch bei anderen Aktionen)
- }
-}
-
-// XTextField
-
-rtl::OUString SAL_CALL ScHeaderFieldObj::getPresentation( sal_Bool /* bShowCommand */ )
- throw(uno::RuntimeException)
-{
- SolarMutexGuard aGuard;
- String aRet;
-
- if (mpEditSource)
- {
- // Feld von der EditEngine formatieren lassen, bShowCommand gibt's nicht
-
- SvxTextForwarder* pForwarder = mpEditSource->GetTextForwarder();
- aRet = pForwarder->GetText( aSelection );
- }
-
- return aRet;
-}
-
-// XTextContent
-
-void SAL_CALL ScHeaderFieldObj::attach( const uno::Reference<text::XTextRange>& xTextRange )
- throw(lang::IllegalArgumentException, uno::RuntimeException)
-{
- SolarMutexGuard aGuard;
- if (xTextRange.is())
- {
- uno::Reference<text::XText> xText(xTextRange->getText());
- if (xText.is())
- {
- xText->insertTextContent( xTextRange, this, sal_True );
- }
- }
-}
-
-uno::Reference<text::XTextRange> SAL_CALL ScHeaderFieldObj::getAnchor() throw(uno::RuntimeException)
-{
- SolarMutexGuard aGuard;
- return mpContent;
-}
-
-// XComponent
-
-void SAL_CALL ScHeaderFieldObj::dispose() throw(uno::RuntimeException)
-{
- OComponentHelper::dispose();
-}
-
-void SAL_CALL ScHeaderFieldObj::addEventListener(
- const uno::Reference<lang::XEventListener>& xListener )
- throw(uno::RuntimeException)
-{
- OComponentHelper::addEventListener( xListener );
-}
-
-void SAL_CALL ScHeaderFieldObj::removeEventListener(
- const uno::Reference<lang::XEventListener>& xListener )
- throw(uno::RuntimeException)
-{
- OComponentHelper::removeEventListener( xListener );
-}
-
-// XPropertySet
-
-uno::Reference<beans::XPropertySetInfo> SAL_CALL ScHeaderFieldObj::getPropertySetInfo()
- throw(uno::RuntimeException)
-{
- SolarMutexGuard aGuard;
- if (nType == SC_SERVICE_FILEFIELD)
- {
- // file field has different properties
- static uno::Reference<beans::XPropertySetInfo> aFileFieldInfo = pPropSet->getPropertySetInfo();
- return aFileFieldInfo;
- }
- else
- {
- static uno::Reference<beans::XPropertySetInfo> aRef = pPropSet->getPropertySetInfo();
- return aRef;
- }
-}
-
-void SAL_CALL ScHeaderFieldObj::setPropertyValue(
- const rtl::OUString& aPropertyName, const uno::Any& aValue )
- throw(beans::UnknownPropertyException, beans::PropertyVetoException,
- lang::IllegalArgumentException, lang::WrappedTargetException,
- uno::RuntimeException)
-{
- SolarMutexGuard aGuard;
- String aNameString(aPropertyName);
- if ( nType == SC_SERVICE_FILEFIELD && aNameString.EqualsAscii( SC_UNONAME_FILEFORM ) )
- {
- sal_Int16 nIntVal = 0;
- if ( aValue >>= nIntVal )
- {
- SvxFileFormat eFormat = lcl_UnoToSvxFileFormat( nIntVal );
- if (mpEditSource)
- {
- ScEditEngineDefaulter* pEditEngine = ((ScHeaderFooterEditSource*)mpEditSource)->GetEditEngine();
- ScUnoEditEngine aTempEngine(pEditEngine);
- SvxFieldData* pField = aTempEngine.FindByPos(
- aSelection.nStartPara, aSelection.nStartPos, TYPE(SvxExtFileField) );
- OSL_ENSURE(pField,"setPropertyValue: Field not found");
- if (pField)
- {
- SvxExtFileField* pExtFile = (SvxExtFileField*)pField; // local to the ScUnoEditEngine
- pExtFile->SetFormat( eFormat );
- pEditEngine->QuickInsertField( SvxFieldItem(*pField, EE_FEATURE_FIELD), aSelection );
- mpEditSource->UpdateData();
- }
- }
- else
- nFileFormat = sal::static_int_cast<sal_Int16>(eFormat); // not inserted yet - store value
- }
- }
-}
-
-uno::Any SAL_CALL ScHeaderFieldObj::getPropertyValue( const rtl::OUString& aPropertyName )
- throw(beans::UnknownPropertyException, lang::WrappedTargetException,
- uno::RuntimeException)
-{
- SolarMutexGuard aGuard;
-
- //! Properties?
- uno::Any aRet;
- String aNameString(aPropertyName);
-
- // anchor type is always "as character", text wrap always "none"
-
- if ( aNameString.EqualsAscii( SC_UNONAME_ANCTYPE ) )
- aRet <<= text::TextContentAnchorType_AS_CHARACTER;
- else if ( aNameString.EqualsAscii( SC_UNONAME_ANCTYPES ) )
- {
- uno::Sequence<text::TextContentAnchorType> aSeq(1);
- aSeq[0] = text::TextContentAnchorType_AS_CHARACTER;
- aRet <<= aSeq;
- }
- else if ( aNameString.EqualsAscii( SC_UNONAME_TEXTWRAP ) )
- aRet <<= text::WrapTextMode_NONE;
- else if ( nType == SC_SERVICE_FILEFIELD && aNameString.EqualsAscii( SC_UNONAME_FILEFORM ) )
- {
- SvxFileFormat eFormat = SVXFILEFORMAT_NAME_EXT;
- if (mpEditSource)
- {
- ScEditEngineDefaulter* pEditEngine = ((ScHeaderFooterEditSource*)mpEditSource)->GetEditEngine();
- ScUnoEditEngine aTempEngine(pEditEngine);
- SvxFieldData* pField = aTempEngine.FindByPos(
- aSelection.nStartPara, aSelection.nStartPos, TYPE(SvxExtFileField) );
- OSL_ENSURE(pField,"setPropertyValue: Field not found");
- if (pField)
- {
- const SvxExtFileField* pExtFile = (const SvxExtFileField*)pField;
- eFormat = pExtFile->GetFormat();
- }
- }
- else
- eFormat = (SvxFileFormat) nFileFormat; // not inserted yet - use stored value
-
- sal_Int16 nIntVal = lcl_SvxToUnoFileFormat( eFormat );
- aRet <<= nIntVal;
- }
-
- return aRet;
-}
-
-SC_IMPL_DUMMY_PROPERTY_LISTENER( ScHeaderFieldObj )
-
-// XUnoTunnel
-
-sal_Int64 SAL_CALL ScHeaderFieldObj::getSomething(
- const uno::Sequence<sal_Int8 >& rId ) throw(uno::RuntimeException)
-{
- if ( rId.getLength() == 16 &&
- 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(),
- rId.getConstArray(), 16 ) )
- {
- return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this));
- }
- return 0;
-}
-
-namespace
-{
- class theScHeaderFieldObjUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theScHeaderFieldObjUnoTunnelId> {};
-}
-
-const uno::Sequence<sal_Int8>& ScHeaderFieldObj::getUnoTunnelId()
-{
- return theScHeaderFieldObjUnoTunnelId::get().getSeq();
-}
-
-ScHeaderFieldObj* ScHeaderFieldObj::getImplementation(
- const uno::Reference<text::XTextContent> xObj )
-{
- ScHeaderFieldObj* pRet = NULL;
- uno::Reference<lang::XUnoTunnel> xUT( xObj, uno::UNO_QUERY );
- if (xUT.is())
- pRet = reinterpret_cast<ScHeaderFieldObj*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
- return pRet;
-}
-
-// XServiceInfo
-
-rtl::OUString SAL_CALL ScHeaderFieldObj::getImplementationName() throw(uno::RuntimeException)
-{
- return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ScHeaderFieldObj" ));
-}
-
-sal_Bool SAL_CALL ScHeaderFieldObj::supportsService( const rtl::OUString& rServiceName )
- throw(uno::RuntimeException)
-{
- String aServiceStr( rServiceName );
- return aServiceStr.EqualsAscii( SCTEXTFIELD_SERVICE ) ||
- aServiceStr.EqualsAscii( SCTEXTCONTENT_SERVICE );
-}
-
-uno::Sequence<rtl::OUString> SAL_CALL ScHeaderFieldObj::getSupportedServiceNames()
- throw(uno::RuntimeException)
-{
- uno::Sequence<rtl::OUString> aRet(2);
- rtl::OUString* pArray = aRet.getArray();
- pArray[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SCTEXTFIELD_SERVICE ));
- pArray[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SCTEXTCONTENT_SERVICE ));
- return aRet;
-}
-
SvxFieldData* ScEditFieldObj::getData()
{
if (!mpData)