summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLászló Németh <laszlo.nemeth@collabora.com>2015-04-08 11:12:39 +0200
committerJan Holesovsky <kendy@collabora.com>2015-04-09 11:39:37 +0200
commit1cb372a9536d3a9d708c782b8346121f97ae41d3 (patch)
tree82dd29573922a9ed13e971633d6af3839cef3130
parentlet all cond format objects inherit from XConditionEntry (diff)
downloadcore-1cb372a9536d3a9d708c782b8346121f97ae41d3.tar.gz
core-1cb372a9536d3a9d708c782b8346121f97ae41d3.zip
follow-up conditional uno api rebase
Change-Id: I569292581c5d2f35cf39fb7db9148cde61a38dc8
-rw-r--r--offapi/com/sun/star/sheet/ConditionFormatEntry.idl2
-rw-r--r--offapi/com/sun/star/sheet/ConditionalFormat.idl1
-rw-r--r--offapi/com/sun/star/sheet/DataBar.idl1
-rw-r--r--offapi/com/sun/star/sheet/IconSet.idl1
-rw-r--r--offapi/com/sun/star/sheet/IconSetFormatEntry.idl4
-rw-r--r--offapi/com/sun/star/sheet/XColorScaleEntry.idl1
-rw-r--r--offapi/com/sun/star/sheet/XConditionEntry.idl4
-rw-r--r--offapi/com/sun/star/sheet/XDataBarEntry.idl2
-rw-r--r--offapi/com/sun/star/sheet/XIconSetEntry.idl7
-rw-r--r--sc/CppunitTest_sc_new_cond_format_api.mk1
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx2
-rw-r--r--sc/source/ui/unoobj/condformatuno.cxx64
12 files changed, 49 insertions, 41 deletions
diff --git a/offapi/com/sun/star/sheet/ConditionFormatEntry.idl b/offapi/com/sun/star/sheet/ConditionFormatEntry.idl
index 53dfa1b5c37a..b6818aaf6975 100644
--- a/offapi/com/sun/star/sheet/ConditionFormatEntry.idl
+++ b/offapi/com/sun/star/sheet/ConditionFormatEntry.idl
@@ -10,6 +10,8 @@
#ifndef __com_sun_star_sheet_ConditionFormatEntry_idl__
#define __com_sun_star_sheet_ConditionFormatEntry_idl__
+#include <com/sun/star/sheet/XConditionEntry.idl>
+
module com { module sun { module star { module sheet {
service ConditionFormatEntry
diff --git a/offapi/com/sun/star/sheet/ConditionalFormat.idl b/offapi/com/sun/star/sheet/ConditionalFormat.idl
index 953d3cff2ba1..93c8f3d2d125 100644
--- a/offapi/com/sun/star/sheet/ConditionalFormat.idl
+++ b/offapi/com/sun/star/sheet/ConditionalFormat.idl
@@ -19,6 +19,7 @@
#ifndef __com_sun_star_sheet_ConditionalFormat_idl__
#define __com_sun_star_sheet_ConditionalFormat_idl__
+#include <com/sun/star/beans/XPropertySet.idl>
#include <com/sun/star/sheet/XConditionalFormat.idl>
#include <com/sun/star/sheet/XSheetCellRanges.idl>
diff --git a/offapi/com/sun/star/sheet/DataBar.idl b/offapi/com/sun/star/sheet/DataBar.idl
index 9045a6786686..6fb56bfff2bd 100644
--- a/offapi/com/sun/star/sheet/DataBar.idl
+++ b/offapi/com/sun/star/sheet/DataBar.idl
@@ -13,6 +13,7 @@
#include <com/sun/star/sheet/XConditionEntry.idl>
#include <com/sun/star/sheet/XColorScaleEntry.idl>
#include <com/sun/star/sheet/DataBarAxis.idl>
+#include <com/sun/star/sheet/XDataBarEntry.idl>
#include <com/sun/star/util/Color.idl>
module com { module sun { module star { module sheet {
diff --git a/offapi/com/sun/star/sheet/IconSet.idl b/offapi/com/sun/star/sheet/IconSet.idl
index 9588ab4cb2a6..8e01d65e1010 100644
--- a/offapi/com/sun/star/sheet/IconSet.idl
+++ b/offapi/com/sun/star/sheet/IconSet.idl
@@ -11,6 +11,7 @@
#define __com_sun_star_sheet_IconSet_idl__
#include <com/sun/star/sheet/XConditionEntry.idl>
+#include <com/sun/star/sheet/XIconSetEntry.idl>
module com { module sun { module star { module sheet {
diff --git a/offapi/com/sun/star/sheet/IconSetFormatEntry.idl b/offapi/com/sun/star/sheet/IconSetFormatEntry.idl
index 652618cd4abc..22e7150f48a5 100644
--- a/offapi/com/sun/star/sheet/IconSetFormatEntry.idl
+++ b/offapi/com/sun/star/sheet/IconSetFormatEntry.idl
@@ -7,8 +7,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#ifndef __com_sun_star_sheet_IconSetEntryType_idl__
-#define __com_sun_star_sheet_IconSetEntryType_idl__
+#ifndef __com_sun_star_sheet_IconSetFormatEntry_idl__
+#define __com_sun_star_sheet_IconSetFormatEntry_idl__
module com { module sun { module star { module sheet {
diff --git a/offapi/com/sun/star/sheet/XColorScaleEntry.idl b/offapi/com/sun/star/sheet/XColorScaleEntry.idl
index 8d29e6365f44..3b2555801519 100644
--- a/offapi/com/sun/star/sheet/XColorScaleEntry.idl
+++ b/offapi/com/sun/star/sheet/XColorScaleEntry.idl
@@ -10,6 +10,7 @@
#ifndef __com_sun_star_sheet_XColorScaleEntry_idl__
#define __com_sun_star_sheet_XColorScaleEntry_idl__
+#include <com/sun/star/uno/XInterface.idl>
#include <com/sun/star/util/Color.idl>
module com { module sun { module star { module sheet {
diff --git a/offapi/com/sun/star/sheet/XConditionEntry.idl b/offapi/com/sun/star/sheet/XConditionEntry.idl
index f7dfa79b58dd..d3ac1f9a97fa 100644
--- a/offapi/com/sun/star/sheet/XConditionEntry.idl
+++ b/offapi/com/sun/star/sheet/XConditionEntry.idl
@@ -7,8 +7,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#ifndef __com_sun_star_sheet_XConditionalFormat_idl__
-#define __com_sun_star_sheet_XConditionalFormat_idl__
+#ifndef __com_sun_star_sheet_XConditionEntry_idl__
+#define __com_sun_star_sheet_XConditionEntry_idl__
#include <com/sun/star/uno/XInterface.idl>
#include <com/sun/star/sheet/ConditionEntryType.idl>
diff --git a/offapi/com/sun/star/sheet/XDataBarEntry.idl b/offapi/com/sun/star/sheet/XDataBarEntry.idl
index 746de16c22b3..0c548746d069 100644
--- a/offapi/com/sun/star/sheet/XDataBarEntry.idl
+++ b/offapi/com/sun/star/sheet/XDataBarEntry.idl
@@ -10,6 +10,8 @@
#ifndef __com_sun_star_sheet_XDataBarEntry_idl__
#define __com_sun_star_sheet_XDataBarEntry_idl__
+#include <com/sun/star/uno/XInterface.idl>
+
module com { module sun { module star { module sheet {
interface XDataBarEntry
diff --git a/offapi/com/sun/star/sheet/XIconSetEntry.idl b/offapi/com/sun/star/sheet/XIconSetEntry.idl
index 4382e4406cff..736f8dfb07d5 100644
--- a/offapi/com/sun/star/sheet/XIconSetEntry.idl
+++ b/offapi/com/sun/star/sheet/XIconSetEntry.idl
@@ -10,7 +10,8 @@
#ifndef __com_sun_star_sheet_XIconSetEntry_idl__
#define __com_sun_star_sheet_XIconSetEntry_idl__
-#include <com/sun/star/sheet/IconSetEntryType.idl>
+#include <com/sun/star/sheet/IconSetFormatEntry.idl>
+#include <com/sun/star/uno/XInterface.idl>
module com { module sun { module star { module sheet {
@@ -21,12 +22,12 @@ interface XIconSetEntry
void setFormula([in] string Formula);
/**
- * See com.sun.star.sheet.IconSetEntryType for possible values.
+ * See com.sun.star.sheet.IconSetFormatEntry for possible values.
*/
long getType();
/**
- * See com.sun.star.sheet.IconSetEntryType for possible values.
+ * See com.sun.star.sheet.IconSetFormatEntry for possible values.
*/
void setType([in] long Type);
};
diff --git a/sc/CppunitTest_sc_new_cond_format_api.mk b/sc/CppunitTest_sc_new_cond_format_api.mk
index c0558d12264a..f331b0fb8379 100644
--- a/sc/CppunitTest_sc_new_cond_format_api.mk
+++ b/sc/CppunitTest_sc_new_cond_format_api.mk
@@ -72,7 +72,6 @@ $(eval $(call gb_CppunitTest_use_components,sc_new_cond_format_api,\
configmgr/source/configmgr \
dbaccess/util/dba \
filter/source/config/cache/filterconfig1 \
- filter/source/storagefilterdetect/storagefd \
forms/util/frm \
framework/util/fwk \
i18npool/util/i18npool \
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index c5362584fded..23ba169f48a0 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -818,7 +818,7 @@ static const SfxItemPropertySet* lcl_GetSheetPropertySet()
{MAP_CHAR_LEN(SC_UNONAME_TBLBORD), SC_WID_UNO_TBLBORD, &getCppuType((table::TableBorder*)0), 0, 0 | CONVERT_TWIPS },
{MAP_CHAR_LEN(SC_UNONAME_TBLBORD2), SC_WID_UNO_TBLBORD2, &getCppuType((table::TableBorder2*)0), 0, 0 | CONVERT_TWIPS },
{MAP_CHAR_LEN(SC_UNONAME_TABLAYOUT),SC_WID_UNO_TABLAYOUT,&getCppuType((sal_Int16*)0), 0, 0 },
- {MAP_CHAR_LEN(SC_UNONAME_CONDFORMAT),SC_WID_UNO_CONDFORMAT, &::getCppuType((const sheet::XConditionalFormats*0)), 0, 0},
+ {MAP_CHAR_LEN(SC_UNONAME_CONDFORMAT),SC_WID_UNO_CONDFORMAT, &::cppu::UnoType< sheet::XConditionalFormats >::get(), 0, 0},
{MAP_CHAR_LEN(SC_UNONAME_TOPBORDER),ATTR_BORDER, &::getCppuType((const table::BorderLine*)0), 0, TOP_BORDER | CONVERT_TWIPS },
{MAP_CHAR_LEN(SC_UNONAME_TOPBORDER2),ATTR_BORDER, &::getCppuType((const table::BorderLine2*)0), 0, TOP_BORDER | CONVERT_TWIPS },
{MAP_CHAR_LEN(SC_UNONAME_USERDEF), ATTR_USERDEF, &getCppuType((uno::Reference<container::XNameContainer>*)0), 0, 0 },
diff --git a/sc/source/ui/unoobj/condformatuno.cxx b/sc/source/ui/unoobj/condformatuno.cxx
index ba9d49619430..26f34e3daee9 100644
--- a/sc/source/ui/unoobj/condformatuno.cxx
+++ b/sc/source/ui/unoobj/condformatuno.cxx
@@ -44,9 +44,9 @@ const SfxItemPropertyMapEntry* getCondFormatPropset()
{
static const SfxItemPropertyMapEntry aCondFormatPropertyMap_Impl[] =
{
- {OUString("ID"), ID, cppu::UnoType<sal_Int32>::get(), 0, 0},
- {OUString("Range"), CondFormat_Range, cppu::UnoType<sheet::XSheetCellRanges>::get(), 0, 0},
- {OUString(), 0, css::uno::Type(), 0, 0}
+ {MAP_CHAR_LEN("ID"), ID, &cppu::UnoType<sal_Int32>::get(), 0, 0},
+ {MAP_CHAR_LEN("Range"), CondFormat_Range, &cppu::UnoType<sheet::XSheetCellRanges>::get(), 0, 0},
+ {0, 0, 0, 0, 0, 0}
};
return aCondFormatPropertyMap_Impl;
}
@@ -63,11 +63,11 @@ const SfxItemPropertyMapEntry* getConditionEntryrPropSet()
{
static const SfxItemPropertyMapEntry aConditionEntryPropertyMap_Impl[] =
{
- {OUString("StyleName"), StyleName, cppu::UnoType<OUString>::get(), 0, 0},
- {OUString("Formula1"), Formula1, cppu::UnoType<OUString>::get(), 0, 0},
- {OUString("Formula2"), Formula2, cppu::UnoType<OUString>::get(), 0, 0},
- {OUString("Operator"), Operator, getCppuType(&sheet::ConditionFormatOperator::EQUAL), 0, 0 },
- {OUString(), 0, css::uno::Type(), 0, 0}
+ {MAP_CHAR_LEN("StyleName"), StyleName, &cppu::UnoType<OUString>::get(), 0, 0},
+ {MAP_CHAR_LEN("Formula1"), Formula1, &cppu::UnoType<OUString>::get(), 0, 0},
+ {MAP_CHAR_LEN("Formula2"), Formula2, &cppu::UnoType<OUString>::get(), 0, 0},
+ {MAP_CHAR_LEN("Operator"), Operator, &getCppuType(&sheet::ConditionFormatOperator::EQUAL), 0, 0 },
+ {0, 0, 0, 0, 0, 0}
};
return aConditionEntryPropertyMap_Impl;
}
@@ -117,8 +117,8 @@ const SfxItemPropertyMapEntry* getColorScalePropSet()
{
static const SfxItemPropertyMapEntry aColorScalePropertyMap_Impl[] =
{
- {OUString("ColorScaleEntries"), ColorScaleEntries, getCppuType((uno::Sequence< sheet::XColorScaleEntry >*)0), 0, 0 },
- {OUString(), 0, css::uno::Type(), 0, 0}
+ {MAP_CHAR_LEN("ColorScaleEntries"), ColorScaleEntries, &getCppuType((uno::Sequence< sheet::XColorScaleEntry >*)0), 0, 0 },
+ {0, 0, 0, 0, 0, 0}
};
return aColorScalePropertyMap_Impl;
}
@@ -155,15 +155,15 @@ const SfxItemPropertyMapEntry* getDataBarPropSet()
{
static const SfxItemPropertyMapEntry aDataBarPropertyMap_Impl[] =
{
- {OUString("AxisPosition"), AxisPosition, getCppuType(&sheet::DataBarAxis::AXIS_AUTOMATIC), 0, 0 },
- {OUString("UseGradient"), UseGradient, getBooleanCppuType(), 0, 0 },
- {OUString("UseNegativeColor"), UseNegativeColor, getBooleanCppuType(), 0, 0 },
- {OUString("ShowValue"), DataBar_ShowValue, getBooleanCppuType(), 0, 0 },
- {OUString("Color"), DataBar_Color, cppu::UnoType<sal_Int32>::get(), 0, 0},
- {OUString("AxisColor"), AxisColor, cppu::UnoType<sal_Int32>::get(), 0, 0},
- {OUString("NegativeColor"), NegativeColor, cppu::UnoType<sal_Int32>::get(), 0, 0},
- {OUString("DataBarEntries"), DataBarEntries, getCppuType((uno::Sequence< sheet::XDataBarEntry >*)0), 0, 0 },
- {OUString(), 0, css::uno::Type(), 0, 0}
+ {MAP_CHAR_LEN("AxisPosition"), AxisPosition, &getCppuType(&sheet::DataBarAxis::AXIS_AUTOMATIC), 0, 0 },
+ {MAP_CHAR_LEN("UseGradient"), UseGradient, &getBooleanCppuType(), 0, 0 },
+ {MAP_CHAR_LEN("UseNegativeColor"), UseNegativeColor, &getBooleanCppuType(), 0, 0 },
+ {MAP_CHAR_LEN("ShowValue"), DataBar_ShowValue, &getBooleanCppuType(), 0, 0 },
+ {MAP_CHAR_LEN("Color"), DataBar_Color, &cppu::UnoType<sal_Int32>::get(), 0, 0},
+ {MAP_CHAR_LEN("AxisColor"), AxisColor, &cppu::UnoType<sal_Int32>::get(), 0, 0},
+ {MAP_CHAR_LEN("NegativeColor"), NegativeColor, &cppu::UnoType<sal_Int32>::get(), 0, 0},
+ {MAP_CHAR_LEN("DataBarEntries"), DataBarEntries, &getCppuType((uno::Sequence< sheet::XDataBarEntry >*)0), 0, 0 },
+ {0, 0, 0, 0, 0, 0}
};
return aDataBarPropertyMap_Impl;
}
@@ -210,11 +210,11 @@ const SfxItemPropertyMapEntry* getIconSetPropSet()
{
static const SfxItemPropertyMapEntry aIconSetPropertyMap_Impl[] =
{
- {OUString("Icons"), Icons, getCppuType(&sheet::IconSetType::ICONSET_3SYMBOLS), 0, 0 },
- {OUString("Reverse"), Reverse, getBooleanCppuType(), 0, 0 },
- {OUString("ShowValue"), ShowValue, getBooleanCppuType(), 0, 0 },
- {OUString("IconSetEntries"), IconSetEntries, getCppuType((uno::Sequence< sheet::XIconSetEntry >*)0), 0, 0 },
- {OUString(), 0, css::uno::Type(), 0, 0}
+ {MAP_CHAR_LEN("Icons"), Icons, &getCppuType(&sheet::IconSetType::ICONSET_3SYMBOLS), 0, 0 },
+ {MAP_CHAR_LEN("Reverse"), Reverse, &getBooleanCppuType(), 0, 0 },
+ {MAP_CHAR_LEN("ShowValue"), ShowValue, &getBooleanCppuType(), 0, 0 },
+ {MAP_CHAR_LEN("IconSetEntries"), IconSetEntries, &getCppuType((uno::Sequence< sheet::XIconSetEntry >*)0), 0, 0 },
+ {0, 0, 0, 0, 0, 0}
};
return aIconSetPropertyMap_Impl;
}
@@ -235,8 +235,8 @@ const IconSetTypeApiMap aIconSetApiMap[] =
{ IconSet_3Signs, sheet::IconSetType::ICONSET_3SIGNS },
{ IconSet_3Symbols, sheet::IconSetType::ICONSET_3SYMBOLS },
{ IconSet_3Symbols2, sheet::IconSetType::ICONSET_3SYMBOLS2 },
- { IconSet_3Smilies, sheet::IconSetType::ICONSET_3SMILIES },
- { IconSet_3ColorSmilies, sheet::IconSetType::ICONSET_3COLOR_SIMILIES },
+// { IconSet_3Smilies, sheet::IconSetType::ICONSET_3SMILIES },
+// { IconSet_3ColorSmilies, sheet::IconSetType::ICONSET_3COLOR_SIMILIES },
{ IconSet_4Arrows, sheet::IconSetType::ICONSET_4ARROWS },
{ IconSet_4ArrowsGray, sheet::IconSetType::ICONSET_4ARROWS_GRAY },
{ IconSet_4Rating, sheet::IconSetType::ICONSET_4RATING },
@@ -269,13 +269,13 @@ ScCondFormatsObj::ScCondFormatsObj(ScDocShell* pDocShell, SCTAB nTab):
mnTab(nTab),
mpDocShell(pDocShell)
{
- pDocShell->GetDocument().AddUnoObject(*this);
+ pDocShell->GetDocument()->AddUnoObject(*this);
}
ScCondFormatsObj::~ScCondFormatsObj()
{
if (mpDocShell)
- mpDocShell->GetDocument().RemoveUnoObject(*this);
+ mpDocShell->GetDocument()->RemoveUnoObject(*this);
}
void ScCondFormatsObj::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint)
@@ -340,7 +340,7 @@ ScConditionalFormatList* ScCondFormatsObj::getCoreObject()
if (!mpDocShell)
throw uno::RuntimeException();
- ScConditionalFormatList* pList = mpDocShell->GetDocument().GetCondFormList(mnTab);
+ ScConditionalFormatList* pList = mpDocShell->GetDocument()->GetCondFormList(mnTab);
if (!pList)
throw uno::RuntimeException();
@@ -503,7 +503,7 @@ void SAL_CALL ScCondFormatObj::setPropertyValue(
ScUnoConversion::FillScRange(aRange, aRanges[i]);
aTargetRange.Join(aRange);
}
- pFormat->SetRange(aTargetRange);
+ pFormat->AddRange(aTargetRange);
}
}
break;
@@ -652,7 +652,7 @@ void SAL_CALL ScConditionEntryObj::setPropertyValue(
OUString aFormula;
if ((aValue >>= aFormula) && !aFormula.isEmpty())
{
- ScCompiler aComp(&mpDocShell->GetDocument(), getCoreObject()->GetSrcPos());
+ ScCompiler aComp(mpDocShell->GetDocument(), getCoreObject()->GetSrcPos());
boost::scoped_ptr<ScTokenArray> pArr(aComp.CompileString(aFormula));
getCoreObject()->SetFormula1(*pArr);
}
@@ -663,7 +663,7 @@ void SAL_CALL ScConditionEntryObj::setPropertyValue(
OUString aFormula;
if ((aValue >>= aFormula) && !aFormula.isEmpty())
{
- ScCompiler aComp(&mpDocShell->GetDocument(), getCoreObject()->GetSrcPos());
+ ScCompiler aComp(mpDocShell->GetDocument(), getCoreObject()->GetSrcPos());
boost::scoped_ptr<ScTokenArray> pArr(aComp.CompileString(aFormula));
getCoreObject()->SetFormula2(*pArr);
}