Renamed FILE to DOCINFO_TITLE, which is more appropriate for this field.
Change-Id: I1267629da8b66fc21c4ae2e78634c2093274aa61
This commit is contained in:
@@ -223,7 +223,7 @@ public:
|
|||||||
class EDITENG_DLLPUBLIC SvxFileField : public SvxFieldData
|
class EDITENG_DLLPUBLIC SvxFileField : public SvxFieldData
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SV_DECL_PERSIST1( SvxFileField, SvxFieldData, com::sun::star::text::textfield::Type::FILE )
|
SV_DECL_PERSIST1( SvxFileField, SvxFieldData, com::sun::star::text::textfield::Type::DOCINFO_TITLE )
|
||||||
SvxFileField();
|
SvxFileField();
|
||||||
|
|
||||||
virtual SvxFieldData* Clone() const;
|
virtual SvxFieldData* Clone() const;
|
||||||
|
@@ -153,7 +153,7 @@ void Test::testUnoTextFields()
|
|||||||
|
|
||||||
{
|
{
|
||||||
// FILE
|
// FILE
|
||||||
SvxUnoTextField aField(text::textfield::Type::FILE);
|
SvxUnoTextField aField(text::textfield::Type::DOCINFO_TITLE);
|
||||||
uno::Sequence<rtl::OUString> aSvcs = aField.getSupportedServiceNames();
|
uno::Sequence<rtl::OUString> aSvcs = aField.getSupportedServiceNames();
|
||||||
bool bGood = includes(aSvcs, "com.sun.star.text.textfield.docinfo.Title");
|
bool bGood = includes(aSvcs, "com.sun.star.text.textfield.docinfo.Title");
|
||||||
CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood);
|
CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood);
|
||||||
|
@@ -122,7 +122,7 @@ SvxFieldData* SvxFieldData::Create(const uno::Reference<text::XTextContent>& xTe
|
|||||||
return new SvxPageField();
|
return new SvxPageField();
|
||||||
case text::textfield::Type::PAGES:
|
case text::textfield::Type::PAGES:
|
||||||
return new SvxPagesField();
|
return new SvxPagesField();
|
||||||
case text::textfield::Type::FILE:
|
case text::textfield::Type::DOCINFO_TITLE:
|
||||||
return new SvxFileField();
|
return new SvxFileField();
|
||||||
case text::textfield::Type::TABLE:
|
case text::textfield::Type::TABLE:
|
||||||
{
|
{
|
||||||
|
@@ -442,7 +442,7 @@ SvxFieldData* SvxUnoTextField::CreateFieldData() const throw()
|
|||||||
pData = new SvxPagesField();
|
pData = new SvxPagesField();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case text::textfield::Type::FILE:
|
case text::textfield::Type::DOCINFO_TITLE:
|
||||||
pData = new SvxFileField();
|
pData = new SvxFileField();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -608,7 +608,7 @@ OUString SAL_CALL SvxUnoTextField::getPresentation( sal_Bool bShowCommand )
|
|||||||
return OUString("Pages");
|
return OUString("Pages");
|
||||||
case text::textfield::Type::TIME:
|
case text::textfield::Type::TIME:
|
||||||
return OUString("Time");
|
return OUString("Time");
|
||||||
case text::textfield::Type::FILE:
|
case text::textfield::Type::DOCINFO_TITLE:
|
||||||
return OUString("File");
|
return OUString("File");
|
||||||
case text::textfield::Type::TABLE:
|
case text::textfield::Type::TABLE:
|
||||||
return OUString("Table");
|
return OUString("Table");
|
||||||
@@ -837,7 +837,7 @@ uno::Sequence< OUString > SAL_CALL SvxUnoTextField::getSupportedServiceNames()
|
|||||||
pServices[2] = "com.sun.star.text.TextField.DateTime";
|
pServices[2] = "com.sun.star.text.TextField.DateTime";
|
||||||
pServices[3] = "com.sun.star.text.textfield.DateTime";
|
pServices[3] = "com.sun.star.text.textfield.DateTime";
|
||||||
break;
|
break;
|
||||||
case text::textfield::Type::FILE:
|
case text::textfield::Type::DOCINFO_TITLE:
|
||||||
pServices[2] = "com.sun.star.text.TextField.docinfo.Title";
|
pServices[2] = "com.sun.star.text.TextField.docinfo.Title";
|
||||||
pServices[3] = "com.sun.star.text.textfield.docinfo.Title";
|
pServices[3] = "com.sun.star.text.textfield.docinfo.Title";
|
||||||
break;
|
break;
|
||||||
@@ -931,7 +931,7 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoTextCreateTextField( const ::rt
|
|||||||
aFieldType.equalsAsciiL(
|
aFieldType.equalsAsciiL(
|
||||||
RTL_CONSTASCII_STRINGPARAM("DocInfo.Title") ) )
|
RTL_CONSTASCII_STRINGPARAM("DocInfo.Title") ) )
|
||||||
{
|
{
|
||||||
nId = text::textfield::Type::FILE;
|
nId = text::textfield::Type::DOCINFO_TITLE;
|
||||||
}
|
}
|
||||||
else if ( aFieldType == "Author" )
|
else if ( aFieldType == "Author" )
|
||||||
{
|
{
|
||||||
|
@@ -50,12 +50,13 @@ constants Type
|
|||||||
const long PAGE = 2;
|
const long PAGE = 2;
|
||||||
const long PAGES = 3;
|
const long PAGES = 3;
|
||||||
const long TIME = 4;
|
const long TIME = 4;
|
||||||
const long FILE = 5;
|
const long TABLE = 5;
|
||||||
const long TABLE = 6;
|
const long EXTENDED_TIME = 6;
|
||||||
const long EXTENDED_TIME = 7;
|
const long EXTENDED_FILE = 7;
|
||||||
const long EXTENDED_FILE = 8;
|
const long AUTHOR = 8;
|
||||||
const long AUTHOR = 9;
|
const long MEASURE = 9;
|
||||||
const long MEASURE = 10;
|
|
||||||
|
const long DOCINFO_TITLE = 10;
|
||||||
|
|
||||||
const long PRESENTATION_HEADER = 11;
|
const long PRESENTATION_HEADER = 11;
|
||||||
const long PRESENTATION_FOOTER = 12;
|
const long PRESENTATION_FOOTER = 12;
|
||||||
|
@@ -670,7 +670,7 @@ String ScHeaderEditEngine::CalcFieldValue( const SvxFieldItem& rField,
|
|||||||
case text::textfield::Type::TIME:
|
case text::textfield::Type::TIME:
|
||||||
aRet = ScGlobal::pLocaleData->getTime(aData.aTime);
|
aRet = ScGlobal::pLocaleData->getTime(aData.aTime);
|
||||||
break;
|
break;
|
||||||
case text::textfield::Type::FILE:
|
case text::textfield::Type::DOCINFO_TITLE:
|
||||||
aRet = aData.aTitle;
|
aRet = aData.aTitle;
|
||||||
break;
|
break;
|
||||||
case text::textfield::Type::EXTENDED_FILE:
|
case text::textfield::Type::EXTENDED_FILE:
|
||||||
@@ -766,7 +766,7 @@ String ScFieldEditEngine::CalcFieldValue( const SvxFieldItem& rField,
|
|||||||
aRet = ScGlobal::pLocaleData->getDate(aDate);
|
aRet = ScGlobal::pLocaleData->getDate(aDate);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case text::textfield::Type::FILE:
|
case text::textfield::Type::DOCINFO_TITLE:
|
||||||
{
|
{
|
||||||
SfxObjectShell* pDocShell = mpDoc->GetDocumentShell();
|
SfxObjectShell* pDocShell = mpDoc->GetDocumentShell();
|
||||||
aRet = pDocShell->getDocProperties()->getTitle();
|
aRet = pDocShell->getDocProperties()->getTitle();
|
||||||
|
@@ -693,7 +693,7 @@ SvxFieldData* ScEditFieldObj::getData()
|
|||||||
mpData.reset(new SvxExtTimeField);
|
mpData.reset(new SvxExtTimeField);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case text::textfield::Type::FILE:
|
case text::textfield::Type::DOCINFO_TITLE:
|
||||||
mpData.reset(new SvxFileField);
|
mpData.reset(new SvxFileField);
|
||||||
break;
|
break;
|
||||||
case text::textfield::Type::URL:
|
case text::textfield::Type::URL:
|
||||||
@@ -1156,7 +1156,7 @@ ScEditFieldObj::ScEditFieldObj(
|
|||||||
{
|
{
|
||||||
switch (meType)
|
switch (meType)
|
||||||
{
|
{
|
||||||
case text::textfield::Type::FILE:
|
case text::textfield::Type::DOCINFO_TITLE:
|
||||||
pPropSet = getEmptyPropertySet();
|
pPropSet = getEmptyPropertySet();
|
||||||
break;
|
break;
|
||||||
case text::textfield::Type::EXTENDED_FILE:
|
case text::textfield::Type::EXTENDED_FILE:
|
||||||
@@ -1349,7 +1349,7 @@ void SAL_CALL ScEditFieldObj::setPropertyValue(
|
|||||||
case text::textfield::Type::TABLE:
|
case text::textfield::Type::TABLE:
|
||||||
setPropertyValueSheet(aPropertyName, aValue);
|
setPropertyValueSheet(aPropertyName, aValue);
|
||||||
break;
|
break;
|
||||||
case text::textfield::Type::FILE:
|
case text::textfield::Type::DOCINFO_TITLE:
|
||||||
default:
|
default:
|
||||||
throw beans::UnknownPropertyException();
|
throw beans::UnknownPropertyException();
|
||||||
}
|
}
|
||||||
@@ -1397,7 +1397,7 @@ uno::Any SAL_CALL ScEditFieldObj::getPropertyValue( const rtl::OUString& aProper
|
|||||||
case text::textfield::Type::TIME:
|
case text::textfield::Type::TIME:
|
||||||
case text::textfield::Type::EXTENDED_TIME:
|
case text::textfield::Type::EXTENDED_TIME:
|
||||||
return getPropertyValueDateTime(aPropertyName);
|
return getPropertyValueDateTime(aPropertyName);
|
||||||
case text::textfield::Type::FILE:
|
case text::textfield::Type::DOCINFO_TITLE:
|
||||||
default:
|
default:
|
||||||
throw beans::UnknownPropertyException();
|
throw beans::UnknownPropertyException();
|
||||||
}
|
}
|
||||||
|
@@ -441,7 +441,7 @@ sal_Int32 getFieldType(sal_uInt16 nOldType)
|
|||||||
case SC_SERVICE_EXT_TIMEFIELD:
|
case SC_SERVICE_EXT_TIMEFIELD:
|
||||||
return text::textfield::Type::EXTENDED_TIME;
|
return text::textfield::Type::EXTENDED_TIME;
|
||||||
case SC_SERVICE_TITLEFIELD:
|
case SC_SERVICE_TITLEFIELD:
|
||||||
return text::textfield::Type::FILE;
|
return text::textfield::Type::DOCINFO_TITLE;
|
||||||
case SC_SERVICE_FILEFIELD:
|
case SC_SERVICE_FILEFIELD:
|
||||||
return text::textfield::Type::EXTENDED_FILE;
|
return text::textfield::Type::EXTENDED_FILE;
|
||||||
case SC_SERVICE_SHEETFIELD:
|
case SC_SERVICE_SHEETFIELD:
|
||||||
|
Reference in New Issue
Block a user