[Libreoffice-commits] .: 2 commits - editeng/inc editeng/qa editeng/source offapi/com sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Mon May 14 09:10:17 PDT 2012
editeng/inc/editeng/flditem.hxx | 2 +-
editeng/qa/unit/core-test.cxx | 2 +-
editeng/source/items/flditem.cxx | 2 +-
editeng/source/uno/unofield.cxx | 8 ++++----
offapi/com/sun/star/text/textfield/Type.idl | 13 +++++++------
sc/source/core/data/docpool.cxx | 1 +
sc/source/core/tool/editutil.cxx | 4 ++--
sc/source/ui/unoobj/fielduno.cxx | 8 ++++----
sc/source/ui/unoobj/servuno.cxx | 2 +-
9 files changed, 22 insertions(+), 20 deletions(-)
New commits:
commit cf8b304af3e88e9d8b42793f079124939a616d3b
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Mon May 14 12:08:06 2012 -0400
fdo#49854: Adjust array access for the addition of color scale attribute.
Or else crash would ensue...
Change-Id: I537523818eae3d558c300705baf7a5d9a8fa6dd9
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index 8e2dbf5..9d7daec 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -149,6 +149,7 @@ static SfxItemInfo const aItemInfos[] =
{ SID_ATTR_BORDER_SHADOW, SFX_ITEM_POOLABLE }, // ATTR_SHADOW
{ 0, SFX_ITEM_POOLABLE }, // ATTR_VALIDDATA
{ 0, SFX_ITEM_POOLABLE }, // ATTR_CONDITIONAL
+ { 0, SFX_ITEM_POOLABLE }, // ATTR_COLORSCALE
{ 0, SFX_ITEM_POOLABLE }, // ATTR_PATTERN
{ SID_ATTR_LRSPACE, SFX_ITEM_POOLABLE }, // ATTR_LRSPACE
{ SID_ATTR_ULSPACE, SFX_ITEM_POOLABLE }, // ATTR_ULSPACE
commit 204555c107ae455b5bf2c84e450b2da37e5b06db
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Mon May 14 10:35:45 2012 -0400
Renamed FILE to DOCINFO_TITLE, which is more appropriate for this field.
Change-Id: I1267629da8b66fc21c4ae2e78634c2093274aa61
diff --git a/editeng/inc/editeng/flditem.hxx b/editeng/inc/editeng/flditem.hxx
index b124762..4414b6a 100644
--- a/editeng/inc/editeng/flditem.hxx
+++ b/editeng/inc/editeng/flditem.hxx
@@ -223,7 +223,7 @@ public:
class EDITENG_DLLPUBLIC SvxFileField : public SvxFieldData
{
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();
virtual SvxFieldData* Clone() const;
diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
index 5c45932..d02cb93 100644
--- a/editeng/qa/unit/core-test.cxx
+++ b/editeng/qa/unit/core-test.cxx
@@ -153,7 +153,7 @@ void Test::testUnoTextFields()
{
// FILE
- SvxUnoTextField aField(text::textfield::Type::FILE);
+ SvxUnoTextField aField(text::textfield::Type::DOCINFO_TITLE);
uno::Sequence<rtl::OUString> aSvcs = aField.getSupportedServiceNames();
bool bGood = includes(aSvcs, "com.sun.star.text.textfield.docinfo.Title");
CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood);
diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx
index bcc578d..5b039dd 100644
--- a/editeng/source/items/flditem.cxx
+++ b/editeng/source/items/flditem.cxx
@@ -122,7 +122,7 @@ SvxFieldData* SvxFieldData::Create(const uno::Reference<text::XTextContent>& xTe
return new SvxPageField();
case text::textfield::Type::PAGES:
return new SvxPagesField();
- case text::textfield::Type::FILE:
+ case text::textfield::Type::DOCINFO_TITLE:
return new SvxFileField();
case text::textfield::Type::TABLE:
{
diff --git a/editeng/source/uno/unofield.cxx b/editeng/source/uno/unofield.cxx
index a156c89..3217e89 100644
--- a/editeng/source/uno/unofield.cxx
+++ b/editeng/source/uno/unofield.cxx
@@ -442,7 +442,7 @@ SvxFieldData* SvxUnoTextField::CreateFieldData() const throw()
pData = new SvxPagesField();
break;
- case text::textfield::Type::FILE:
+ case text::textfield::Type::DOCINFO_TITLE:
pData = new SvxFileField();
break;
@@ -608,7 +608,7 @@ OUString SAL_CALL SvxUnoTextField::getPresentation( sal_Bool bShowCommand )
return OUString("Pages");
case text::textfield::Type::TIME:
return OUString("Time");
- case text::textfield::Type::FILE:
+ case text::textfield::Type::DOCINFO_TITLE:
return OUString("File");
case text::textfield::Type::TABLE:
return OUString("Table");
@@ -837,7 +837,7 @@ uno::Sequence< OUString > SAL_CALL SvxUnoTextField::getSupportedServiceNames()
pServices[2] = "com.sun.star.text.TextField.DateTime";
pServices[3] = "com.sun.star.text.textfield.DateTime";
break;
- case text::textfield::Type::FILE:
+ case text::textfield::Type::DOCINFO_TITLE:
pServices[2] = "com.sun.star.text.TextField.docinfo.Title";
pServices[3] = "com.sun.star.text.textfield.docinfo.Title";
break;
@@ -931,7 +931,7 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoTextCreateTextField( const ::rt
aFieldType.equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM("DocInfo.Title") ) )
{
- nId = text::textfield::Type::FILE;
+ nId = text::textfield::Type::DOCINFO_TITLE;
}
else if ( aFieldType == "Author" )
{
diff --git a/offapi/com/sun/star/text/textfield/Type.idl b/offapi/com/sun/star/text/textfield/Type.idl
index cfa864a..082a65a 100644
--- a/offapi/com/sun/star/text/textfield/Type.idl
+++ b/offapi/com/sun/star/text/textfield/Type.idl
@@ -50,12 +50,13 @@ constants Type
const long PAGE = 2;
const long PAGES = 3;
const long TIME = 4;
- const long FILE = 5;
- const long TABLE = 6;
- const long EXTENDED_TIME = 7;
- const long EXTENDED_FILE = 8;
- const long AUTHOR = 9;
- const long MEASURE = 10;
+ const long TABLE = 5;
+ const long EXTENDED_TIME = 6;
+ const long EXTENDED_FILE = 7;
+ const long AUTHOR = 8;
+ const long MEASURE = 9;
+
+ const long DOCINFO_TITLE = 10;
const long PRESENTATION_HEADER = 11;
const long PRESENTATION_FOOTER = 12;
diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
index 54ab2f6..dad6a7a 100644
--- a/sc/source/core/tool/editutil.cxx
+++ b/sc/source/core/tool/editutil.cxx
@@ -670,7 +670,7 @@ String ScHeaderEditEngine::CalcFieldValue( const SvxFieldItem& rField,
case text::textfield::Type::TIME:
aRet = ScGlobal::pLocaleData->getTime(aData.aTime);
break;
- case text::textfield::Type::FILE:
+ case text::textfield::Type::DOCINFO_TITLE:
aRet = aData.aTitle;
break;
case text::textfield::Type::EXTENDED_FILE:
@@ -766,7 +766,7 @@ String ScFieldEditEngine::CalcFieldValue( const SvxFieldItem& rField,
aRet = ScGlobal::pLocaleData->getDate(aDate);
}
break;
- case text::textfield::Type::FILE:
+ case text::textfield::Type::DOCINFO_TITLE:
{
SfxObjectShell* pDocShell = mpDoc->GetDocumentShell();
aRet = pDocShell->getDocProperties()->getTitle();
diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx
index 9699945..99d5ddd 100644
--- a/sc/source/ui/unoobj/fielduno.cxx
+++ b/sc/source/ui/unoobj/fielduno.cxx
@@ -693,7 +693,7 @@ SvxFieldData* ScEditFieldObj::getData()
mpData.reset(new SvxExtTimeField);
}
break;
- case text::textfield::Type::FILE:
+ case text::textfield::Type::DOCINFO_TITLE:
mpData.reset(new SvxFileField);
break;
case text::textfield::Type::URL:
@@ -1156,7 +1156,7 @@ ScEditFieldObj::ScEditFieldObj(
{
switch (meType)
{
- case text::textfield::Type::FILE:
+ case text::textfield::Type::DOCINFO_TITLE:
pPropSet = getEmptyPropertySet();
break;
case text::textfield::Type::EXTENDED_FILE:
@@ -1349,7 +1349,7 @@ void SAL_CALL ScEditFieldObj::setPropertyValue(
case text::textfield::Type::TABLE:
setPropertyValueSheet(aPropertyName, aValue);
break;
- case text::textfield::Type::FILE:
+ case text::textfield::Type::DOCINFO_TITLE:
default:
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::EXTENDED_TIME:
return getPropertyValueDateTime(aPropertyName);
- case text::textfield::Type::FILE:
+ case text::textfield::Type::DOCINFO_TITLE:
default:
throw beans::UnknownPropertyException();
}
diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx
index 32cfb75..c106409 100644
--- a/sc/source/ui/unoobj/servuno.cxx
+++ b/sc/source/ui/unoobj/servuno.cxx
@@ -441,7 +441,7 @@ sal_Int32 getFieldType(sal_uInt16 nOldType)
case SC_SERVICE_EXT_TIMEFIELD:
return text::textfield::Type::EXTENDED_TIME;
case SC_SERVICE_TITLEFIELD:
- return text::textfield::Type::FILE;
+ return text::textfield::Type::DOCINFO_TITLE;
case SC_SERVICE_FILEFIELD:
return text::textfield::Type::EXTENDED_FILE;
case SC_SERVICE_SHEETFIELD:
More information about the Libreoffice-commits
mailing list