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:
class EDITENG_DLLPUBLIC SvxHeaderField : public SvxFieldData
{
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();
virtual SvxFieldData* Clone() const;
......@@ -399,7 +399,7 @@ public:
class EDITENG_DLLPUBLIC SvxFooterField : public SvxFieldData
{
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();
virtual SvxFieldData* Clone() const;
virtual int operator==( const SvxFieldData& ) const;
......@@ -410,7 +410,7 @@ public:
class EDITENG_DLLPUBLIC SvxDateTimeField : public SvxFieldData
{
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();
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
return new SdrMeasureField(eKind);
}
case text::textfield::Type::HEADER:
case text::textfield::Type::PRESENTATION_HEADER:
return new SvxHeaderField();
case text::textfield::Type::FOOTER:
case text::textfield::Type::PRESENTATION_FOOTER:
return new SvxFooterField();
case text::textfield::Type::DATE_TIME:
case text::textfield::Type::PRESENTATION_DATE_TIME:
return new SvxDateTimeField();
default:
;
......
......@@ -160,7 +160,6 @@ const SfxItemPropertySet* ImplGetFieldItemPropertySet( sal_Int32 mnId )
return &aAuthorFieldPropertySet_Impl;
case text::textfield::Type::MEASURE:
return &aMeasureFieldPropertySet_Impl;
case text::textfield::Type::DATE_TIME:
default:
return &aEmptyPropertySet_Impl;
}
......@@ -515,13 +514,13 @@ SvxFieldData* SvxUnoTextField::CreateFieldData() const throw()
pData = new SdrMeasureField( eKind);
break;
}
case text::textfield::Type::HEADER:
case text::textfield::Type::PRESENTATION_HEADER:
pData = new SvxHeaderField();
break;
case text::textfield::Type::FOOTER:
case text::textfield::Type::PRESENTATION_FOOTER:
pData = new SvxFooterField();
break;
case text::textfield::Type::DATE_TIME:
case text::textfield::Type::PRESENTATION_DATE_TIME:
pData = new SvxDateTimeField();
break;
};
......@@ -625,11 +624,11 @@ OUString SAL_CALL SvxUnoTextField::getPresentation( sal_Bool bShowCommand )
return OUString("Author");
case text::textfield::Type::MEASURE:
return OUString("Measure");
case text::textfield::Type::HEADER:
case text::textfield::Type::PRESENTATION_HEADER:
return OUString("Header");
case text::textfield::Type::FOOTER:
case text::textfield::Type::PRESENTATION_FOOTER:
return OUString("Footer");
case text::textfield::Type::DATE_TIME:
case text::textfield::Type::PRESENTATION_DATE_TIME:
return OUString("DateTime");
case text::textfield::Type::EXTENDED_DATE:
return OUString("ExtDate");
......@@ -868,15 +867,15 @@ uno::Sequence< OUString > SAL_CALL SvxUnoTextField::getSupportedServiceNames()
pServices[2] = "com.sun.star.text.TextField.Measure";
pServices[3] = "com.sun.star.text.textfield.Measure";
break;
case text::textfield::Type::HEADER:
case text::textfield::Type::PRESENTATION_HEADER:
pServices[2] = "com.sun.star.presentation.TextField.Header";
pServices[3] = "com.sun.star.presentation.textfield.Header";
break;
case text::textfield::Type::FOOTER:
case text::textfield::Type::PRESENTATION_FOOTER:
pServices[2] = "com.sun.star.presentation.TextField.Footer";
pServices[3] = "com.sun.star.presentation.textfield.Footer";
break;
case text::textfield::Type::DATE_TIME:
case text::textfield::Type::PRESENTATION_DATE_TIME:
pServices[2] = "com.sun.star.presentation.TextField.DateTime";
pServices[3] = "com.sun.star.presentation.textfield.DateTime";
break;
......
......@@ -1773,15 +1773,15 @@ IMPL_LINK( SVGFilter, CalcFieldHdl, EditFieldInfo*, pInfo )
pCharSetMap = &( mTextFieldCharSets[ mCreateOjectsCurrentMasterPage ] );
}
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 ] );
}
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 ] );
}
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() ) )
{
......@@ -1913,15 +1913,15 @@ IMPL_LINK( SVGFilter, CalcFieldHdl, EditFieldInfo*, pInfo )
if( mVisiblePagePropSet.bAreBackgroundObjectsVisible )
{
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;
}
else if( ( pField->GetClassId() == text::textfield::Type::FOOTER ) && mVisiblePagePropSet.bIsFooterFieldVisible )
else if( ( pField->GetClassId() == text::textfield::Type::PRESENTATION_FOOTER ) && mVisiblePagePropSet.bIsFooterFieldVisible )
{
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
aRepresentation += mVisiblePagePropSet.sDateTimeText;
......
......@@ -56,9 +56,10 @@ constants Type
const long EXTENDED_FILE = 8;
const long AUTHOR = 9;
const long MEASURE = 10;
const long HEADER = 11;
const long FOOTER = 12;
const long DATE_TIME = 13;
const long PRESENTATION_HEADER = 11;
const long PRESENTATION_FOOTER = 12;
const long PRESENTATION_DATE_TIME = 13;
const long EXTENDED_DATE = 14;
};
......
......@@ -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"))) ||
(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"))) ||
(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"))) ||
(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") ) )
......
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