Kaydet (Commit) eeb92125 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Better names for presentation specific field item types.

Change-Id: Ib9bea60e05f1dcdd9501a3320f3b1185d5890d17
üst e3df5584
...@@ -387,7 +387,7 @@ public: ...@@ -387,7 +387,7 @@ public:
class EDITENG_DLLPUBLIC SvxHeaderField : public SvxFieldData class EDITENG_DLLPUBLIC SvxHeaderField : public SvxFieldData
{ {
public: public:
SV_DECL_PERSIST1( SvxHeaderField, SvxFieldData, com::sun::star::text::textfield::Type::HEADER ) SV_DECL_PERSIST1( SvxHeaderField, SvxFieldData, com::sun::star::text::textfield::Type::PRESENTATION_HEADER )
SvxHeaderField(); SvxHeaderField();
virtual SvxFieldData* Clone() const; virtual SvxFieldData* Clone() const;
...@@ -399,7 +399,7 @@ public: ...@@ -399,7 +399,7 @@ public:
class EDITENG_DLLPUBLIC SvxFooterField : public SvxFieldData class EDITENG_DLLPUBLIC SvxFooterField : public SvxFieldData
{ {
public: public:
SV_DECL_PERSIST1( SvxFooterField, SvxFieldData, com::sun::star::text::textfield::Type::FOOTER ) SV_DECL_PERSIST1( SvxFooterField, SvxFieldData, com::sun::star::text::textfield::Type::PRESENTATION_FOOTER )
SvxFooterField(); SvxFooterField();
virtual SvxFieldData* Clone() const; virtual SvxFieldData* Clone() const;
virtual int operator==( const SvxFieldData& ) const; virtual int operator==( const SvxFieldData& ) const;
...@@ -410,7 +410,7 @@ public: ...@@ -410,7 +410,7 @@ public:
class EDITENG_DLLPUBLIC SvxDateTimeField : public SvxFieldData class EDITENG_DLLPUBLIC SvxDateTimeField : public SvxFieldData
{ {
public: public:
SV_DECL_PERSIST1( SvxDateTimeField, SvxFieldData, com::sun::star::text::textfield::Type::DATE_TIME ) SV_DECL_PERSIST1( SvxDateTimeField, SvxFieldData, com::sun::star::text::textfield::Type::PRESENTATION_DATE_TIME )
SvxDateTimeField(); SvxDateTimeField();
static rtl::OUString GetFormatted( Date& rDate, Time& rTime, int eFormat, SvNumberFormatter& rFormatter, LanguageType eLanguage ); static rtl::OUString GetFormatted( Date& rDate, Time& rTime, int eFormat, SvNumberFormatter& rFormatter, LanguageType eLanguage );
......
...@@ -208,11 +208,11 @@ SvxFieldData* SvxFieldData::Create(const uno::Reference<text::XTextContent>& xTe ...@@ -208,11 +208,11 @@ SvxFieldData* SvxFieldData::Create(const uno::Reference<text::XTextContent>& xTe
return new SdrMeasureField(eKind); return new SdrMeasureField(eKind);
} }
case text::textfield::Type::HEADER: case text::textfield::Type::PRESENTATION_HEADER:
return new SvxHeaderField(); return new SvxHeaderField();
case text::textfield::Type::FOOTER: case text::textfield::Type::PRESENTATION_FOOTER:
return new SvxFooterField(); return new SvxFooterField();
case text::textfield::Type::DATE_TIME: case text::textfield::Type::PRESENTATION_DATE_TIME:
return new SvxDateTimeField(); return new SvxDateTimeField();
default: default:
; ;
......
...@@ -160,7 +160,6 @@ const SfxItemPropertySet* ImplGetFieldItemPropertySet( sal_Int32 mnId ) ...@@ -160,7 +160,6 @@ const SfxItemPropertySet* ImplGetFieldItemPropertySet( sal_Int32 mnId )
return &aAuthorFieldPropertySet_Impl; return &aAuthorFieldPropertySet_Impl;
case text::textfield::Type::MEASURE: case text::textfield::Type::MEASURE:
return &aMeasureFieldPropertySet_Impl; return &aMeasureFieldPropertySet_Impl;
case text::textfield::Type::DATE_TIME:
default: default:
return &aEmptyPropertySet_Impl; return &aEmptyPropertySet_Impl;
} }
...@@ -515,13 +514,13 @@ SvxFieldData* SvxUnoTextField::CreateFieldData() const throw() ...@@ -515,13 +514,13 @@ SvxFieldData* SvxUnoTextField::CreateFieldData() const throw()
pData = new SdrMeasureField( eKind); pData = new SdrMeasureField( eKind);
break; break;
} }
case text::textfield::Type::HEADER: case text::textfield::Type::PRESENTATION_HEADER:
pData = new SvxHeaderField(); pData = new SvxHeaderField();
break; break;
case text::textfield::Type::FOOTER: case text::textfield::Type::PRESENTATION_FOOTER:
pData = new SvxFooterField(); pData = new SvxFooterField();
break; break;
case text::textfield::Type::DATE_TIME: case text::textfield::Type::PRESENTATION_DATE_TIME:
pData = new SvxDateTimeField(); pData = new SvxDateTimeField();
break; break;
}; };
...@@ -625,11 +624,11 @@ OUString SAL_CALL SvxUnoTextField::getPresentation( sal_Bool bShowCommand ) ...@@ -625,11 +624,11 @@ OUString SAL_CALL SvxUnoTextField::getPresentation( sal_Bool bShowCommand )
return OUString("Author"); return OUString("Author");
case text::textfield::Type::MEASURE: case text::textfield::Type::MEASURE:
return OUString("Measure"); return OUString("Measure");
case text::textfield::Type::HEADER: case text::textfield::Type::PRESENTATION_HEADER:
return OUString("Header"); return OUString("Header");
case text::textfield::Type::FOOTER: case text::textfield::Type::PRESENTATION_FOOTER:
return OUString("Footer"); return OUString("Footer");
case text::textfield::Type::DATE_TIME: case text::textfield::Type::PRESENTATION_DATE_TIME:
return OUString("DateTime"); return OUString("DateTime");
case text::textfield::Type::EXTENDED_DATE: case text::textfield::Type::EXTENDED_DATE:
return OUString("ExtDate"); return OUString("ExtDate");
...@@ -868,15 +867,15 @@ uno::Sequence< OUString > SAL_CALL SvxUnoTextField::getSupportedServiceNames() ...@@ -868,15 +867,15 @@ uno::Sequence< OUString > SAL_CALL SvxUnoTextField::getSupportedServiceNames()
pServices[2] = "com.sun.star.text.TextField.Measure"; pServices[2] = "com.sun.star.text.TextField.Measure";
pServices[3] = "com.sun.star.text.textfield.Measure"; pServices[3] = "com.sun.star.text.textfield.Measure";
break; break;
case text::textfield::Type::HEADER: case text::textfield::Type::PRESENTATION_HEADER:
pServices[2] = "com.sun.star.presentation.TextField.Header"; pServices[2] = "com.sun.star.presentation.TextField.Header";
pServices[3] = "com.sun.star.presentation.textfield.Header"; pServices[3] = "com.sun.star.presentation.textfield.Header";
break; break;
case text::textfield::Type::FOOTER: case text::textfield::Type::PRESENTATION_FOOTER:
pServices[2] = "com.sun.star.presentation.TextField.Footer"; pServices[2] = "com.sun.star.presentation.TextField.Footer";
pServices[3] = "com.sun.star.presentation.textfield.Footer"; pServices[3] = "com.sun.star.presentation.textfield.Footer";
break; break;
case text::textfield::Type::DATE_TIME: case text::textfield::Type::PRESENTATION_DATE_TIME:
pServices[2] = "com.sun.star.presentation.TextField.DateTime"; pServices[2] = "com.sun.star.presentation.TextField.DateTime";
pServices[3] = "com.sun.star.presentation.textfield.DateTime"; pServices[3] = "com.sun.star.presentation.textfield.DateTime";
break; break;
......
...@@ -1773,15 +1773,15 @@ IMPL_LINK( SVGFilter, CalcFieldHdl, EditFieldInfo*, pInfo ) ...@@ -1773,15 +1773,15 @@ IMPL_LINK( SVGFilter, CalcFieldHdl, EditFieldInfo*, pInfo )
pCharSetMap = &( mTextFieldCharSets[ mCreateOjectsCurrentMasterPage ] ); pCharSetMap = &( mTextFieldCharSets[ mCreateOjectsCurrentMasterPage ] );
} }
const SvxFieldData* pField = pInfo->GetField().GetField(); const SvxFieldData* pField = pInfo->GetField().GetField();
if( bHasCharSetMap && ( pField->GetClassId() == text::textfield::Type::HEADER ) && ( pCharSetMap->find( aHeaderId ) != pCharSetMap->end() ) ) if( bHasCharSetMap && ( pField->GetClassId() == text::textfield::Type::PRESENTATION_HEADER ) && ( pCharSetMap->find( aHeaderId ) != pCharSetMap->end() ) )
{ {
pCharSet = &( (*pCharSetMap)[ aHeaderId ] ); pCharSet = &( (*pCharSetMap)[ aHeaderId ] );
} }
else if( bHasCharSetMap && ( pField->GetClassId() == text::textfield::Type::FOOTER ) && ( pCharSetMap->find( aFooterId ) != pCharSetMap->end() ) ) else if( bHasCharSetMap && ( pField->GetClassId() == text::textfield::Type::PRESENTATION_FOOTER ) && ( pCharSetMap->find( aFooterId ) != pCharSetMap->end() ) )
{ {
pCharSet = &( (*pCharSetMap)[ aFooterId ] ); pCharSet = &( (*pCharSetMap)[ aFooterId ] );
} }
else if( pField->GetClassId() == text::textfield::Type::DATE_TIME ) else if( pField->GetClassId() == text::textfield::Type::PRESENTATION_DATE_TIME )
{ {
if( bHasCharSetMap && ( pCharSetMap->find( aDateTimeId ) != pCharSetMap->end() ) ) if( bHasCharSetMap && ( pCharSetMap->find( aDateTimeId ) != pCharSetMap->end() ) )
{ {
...@@ -1913,15 +1913,15 @@ IMPL_LINK( SVGFilter, CalcFieldHdl, EditFieldInfo*, pInfo ) ...@@ -1913,15 +1913,15 @@ IMPL_LINK( SVGFilter, CalcFieldHdl, EditFieldInfo*, pInfo )
if( mVisiblePagePropSet.bAreBackgroundObjectsVisible ) if( mVisiblePagePropSet.bAreBackgroundObjectsVisible )
{ {
const SvxFieldData* pField = pInfo->GetField().GetField(); const SvxFieldData* pField = pInfo->GetField().GetField();
if( ( pField->GetClassId() == text::textfield::Type::HEADER ) && mVisiblePagePropSet.bIsHeaderFieldVisible ) if( ( pField->GetClassId() == text::textfield::Type::PRESENTATION_HEADER ) && mVisiblePagePropSet.bIsHeaderFieldVisible )
{ {
aRepresentation += mVisiblePagePropSet.sHeaderText; aRepresentation += mVisiblePagePropSet.sHeaderText;
} }
else if( ( pField->GetClassId() == text::textfield::Type::FOOTER ) && mVisiblePagePropSet.bIsFooterFieldVisible ) else if( ( pField->GetClassId() == text::textfield::Type::PRESENTATION_FOOTER ) && mVisiblePagePropSet.bIsFooterFieldVisible )
{ {
aRepresentation += mVisiblePagePropSet.sFooterText; aRepresentation += mVisiblePagePropSet.sFooterText;
} }
else if( ( pField->GetClassId() == text::textfield::Type::DATE_TIME ) && mVisiblePagePropSet.bIsDateTimeFieldVisible ) else if( ( pField->GetClassId() == text::textfield::Type::PRESENTATION_DATE_TIME ) && mVisiblePagePropSet.bIsDateTimeFieldVisible )
{ {
// TODO: implement the variable case // TODO: implement the variable case
aRepresentation += mVisiblePagePropSet.sDateTimeText; aRepresentation += mVisiblePagePropSet.sDateTimeText;
......
...@@ -56,9 +56,10 @@ constants Type ...@@ -56,9 +56,10 @@ constants Type
const long EXTENDED_FILE = 8; const long EXTENDED_FILE = 8;
const long AUTHOR = 9; const long AUTHOR = 9;
const long MEASURE = 10; const long MEASURE = 10;
const long HEADER = 11;
const long FOOTER = 12; const long PRESENTATION_HEADER = 11;
const long DATE_TIME = 13; const long PRESENTATION_FOOTER = 12;
const long PRESENTATION_DATE_TIME = 13;
const long EXTENDED_DATE = 14; const long EXTENDED_DATE = 14;
}; };
......
...@@ -913,19 +913,19 @@ uno::Reference< uno::XInterface > SAL_CALL SdXImpressDocument::createInstance( c ...@@ -913,19 +913,19 @@ uno::Reference< uno::XInterface > SAL_CALL SdXImpressDocument::createInstance( c
if( (0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.TextField.Header"))) || if( (0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.TextField.Header"))) ||
(0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.textfield.Header"))) ) (0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.textfield.Header"))) )
{ {
return (::cppu::OWeakObject * )new SvxUnoTextField( text::textfield::Type::HEADER ); return (::cppu::OWeakObject * )new SvxUnoTextField( text::textfield::Type::PRESENTATION_HEADER );
} }
if( (0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.TextField.Footer"))) || if( (0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.TextField.Footer"))) ||
(0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.textfield.Footer"))) ) (0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.textfield.Footer"))) )
{ {
return (::cppu::OWeakObject * )new SvxUnoTextField( text::textfield::Type::FOOTER ); return (::cppu::OWeakObject * )new SvxUnoTextField( text::textfield::Type::PRESENTATION_FOOTER );
} }
if( (0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.TextField.DateTime"))) || if( (0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.TextField.DateTime"))) ||
(0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.textfield.DateTime"))) ) (0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.textfield.DateTime"))) )
{ {
return (::cppu::OWeakObject * )new SvxUnoTextField( text::textfield::Type::DATE_TIME ); return (::cppu::OWeakObject * )new SvxUnoTextField( text::textfield::Type::PRESENTATION_DATE_TIME );
} }
if( 0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.xml.NamespaceMap") ) ) if( 0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.xml.NamespaceMap") ) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment