28#include <osl/diagnose.h>
30#include <com/sun/star/awt/XBitmap.hpp>
31#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
32#include <com/sun/star/util/SortField.hpp>
33#include <com/sun/star/table/TableSortField.hpp>
34#include <com/sun/star/beans/PropertyAttribute.hpp>
35#include <com/sun/star/table/TableOrientation.hpp>
36#include <com/sun/star/table/CellRangeAddress.hpp>
37#include <com/sun/star/sheet/DataImportMode.hpp>
38#include <com/sun/star/sheet/FilterFieldType.hpp>
39#include <com/sun/star/sheet/FilterOperator2.hpp>
40#include <com/sun/star/sheet/TableFilterField2.hpp>
50#include <unonames.hxx>
69using namespace css::sheet;
92 return aSubTotalPropertyMap_Impl;
109 return aFilterPropertyMap_Impl;
131 return aDBRangePropertyMap_Impl;
142 sheet::GeneralFunction eGeneral;
158 OSL_FAIL(
"SubTotalToGeneral: wrong enum");
159 eGeneral = sheet::GeneralFunction_NONE;
169 beans::PropertyValue* pArray = rSeq.getArray();
171 sheet::DataImportMode
eMode = sheet::DataImportMode_NONE;
175 eMode = sheet::DataImportMode_SQL;
177 eMode = sheet::DataImportMode_QUERY;
179 eMode = sheet::DataImportMode_TABLE;
187 pArray[0].Value <<= rParam.
aDBName;
192 pArray[0].Value <<= rParam.
aDBName;
196 pArray[1].Value <<=
eMode;
202 pArray[3].Value <<= rParam.
bNative;
208 for (
const beans::PropertyValue& rProp : rSeq)
216 if ( rProp.Value >>= aStrVal )
221 if ( rProp.Value >>= aStrVal )
226 if ( rProp.Value >>= aStrVal )
235 case sheet::DataImportMode_NONE:
238 case sheet::DataImportMode_SQL:
242 case sheet::DataImportMode_TABLE:
247 case sheet::DataImportMode_QUERY:
253 OSL_FAIL(
"wrong mode");
264 beans::PropertyValue* pArray = rSeq.getArray();
268 table::CellAddress aOutPos;
273 sal_uInt16 nSortCount = 0;
277 uno::Sequence<table::TableSortField> aFields(nSortCount);
280 table::TableSortField* pFieldArray = aFields.getArray();
281 for (sal_uInt16
i=0;
i<nSortCount;
i++)
284 pFieldArray[
i].IsAscending = rParam.
maKeyState[
i].bAscending;
285 pFieldArray[
i].FieldType = table::TableSortFieldType_AUTOMATIC;
286 pFieldArray[
i].IsCaseSensitive = rParam.
bCaseSens;
295 pArray[0].Value <<= !rParam.
bByRow;
301 pArray[2].Value <<=
static_cast<sal_Int32
>( rParam.
GetSortKeyCount() );
304 pArray[3].Value <<= aFields;
310 pArray[5].Value <<= !rParam.
bInplace;
313 pArray[6].Value <<= aOutPos;
316 pArray[7].Value <<= rParam.
bUserDef;
319 pArray[8].Value <<=
static_cast<sal_Int32
>( rParam.
nUserIndex );
324 sal_Int32 nSortSize =
static_cast<sal_Int32
>(rParam.
GetSortKeyCount());
326 for (
const beans::PropertyValue& rProp : rSeq)
334 rParam.
bByRow = ( eOrient != table::TableOrientation_COLUMNS );
338 rParam.
bByRow = !::cppu::any2bool(rProp.Value);
345 if ( (rProp.Value >>= nVal) && nVal > nSortSize )
353 uno::Sequence<util::SortField>
aSeq;
354 uno::Sequence<table::TableSortField> aNewSeq;
355 if ( rProp.Value >>=
aSeq )
365 const util::SortField* pFieldArray =
aSeq.getConstArray();
369 rParam.
maKeyState[
i].bAscending = pFieldArray[
i].SortAscending;
377 else if ( rProp.Value >>= aNewSeq )
379 sal_Int32
nCount = aNewSeq.getLength();
386 const table::TableSortField* pFieldArray = aNewSeq.getConstArray();
390 rParam.
maKeyState[
i].bAscending = pFieldArray[
i].IsAscending;
393 rParam.
bCaseSens = pFieldArray[
i].IsCaseSensitive;
414 table::CellAddress aAddress;
415 if ( rProp.Value >>= aAddress )
427 if ( rProp.Value >>= nVal )
428 rParam.
nUserIndex =
static_cast<sal_uInt16
>(nVal);
437 if ( rProp.Value >>= sStr )
447 OSL_ENSURE(pDesc,
"ScSubTotalFieldObj: Parent is 0");
483 uno::Sequence<sheet::SubTotalColumn>
aSeq(
nCount);
484 sheet::SubTotalColumn* pAry =
aSeq.getArray();
495 const uno::Sequence<sheet::SubTotalColumn>& aSubTotalColumns )
501 sal_uInt32 nColCount = aSubTotalColumns.getLength();
502 if ( nColCount <= sal::static_int_cast<sal_uInt32>(
SCCOL_MAX) )
511 const sheet::SubTotalColumn* pAry = aSubTotalColumns.getConstArray();
562 const uno::Sequence<sheet::SubTotalColumn>& aSubTotalColumns,
563 sal_Int32 nGroupColumn )
573 sal_uInt32 nColCount = aSubTotalColumns.getLength();
577 throw uno::RuntimeException();
592 const sheet::SubTotalColumn* pAry = aSubTotalColumns.getConstArray();
637 throw lang::IndexOutOfBoundsException();
658 static uno::Reference<beans::XPropertySetInfo> aRef(
664 const OUString& aPropertyName,
const uno::Any& aValue )
687 if ( aValue >>= nVal )
688 aParam.
nUserIndex =
static_cast<sal_uInt16
>(nVal);
693 if ( (aValue >>= nVal) && nVal > sal::static_int_cast<sal_Int32>(
MAXSUBTOTAL) )
695 throw lang::IllegalArgumentException();
725 aRet <<= static_cast<sal_Int32>(aParam.
nUserIndex);
769 mxParent->GetSubTotalParam( rParam );
775 mxParent->SetSubTotalParam( rParam );
811 table::CellRangeAddress aRange;
812 uno::Sequence<table::CellRangeAddress>
aSeq(
nCount);
813 table::CellRangeAddress* pAry =
aSeq.getArray();
817 aRange.Sheet = rArea.
nTab;
820 aRange.EndColumn = rArea.
nColEnd;
828 const uno::Sequence<table::CellRangeAddress>& aSources )
831 sal_uInt16
nCount =
static_cast<sal_uInt16
>(aSources.getLength());
834 const table::CellRangeAddress* pAry = aSources.getConstArray();
839 static_cast<SCCOL>(pAry[
i].StartColumn), pAry[
i].StartRow,
840 static_cast<SCCOL>(pAry[
i].EndColumn), pAry[
i].EndRow );
851 table::CellAddress aPos;
859 const table::CellAddress& aStartOutputPosition )
921 if ( rHint.
GetId() == SfxHintId::Dying )
937 while (
nCount < nEntries &&
941 sheet::TableFilterField aField;
942 uno::Sequence<sheet::TableFilterField>
aSeq(
static_cast<sal_Int32
>(
nCount));
943 sheet::TableFilterField* pAry =
aSeq.getArray();
952 aField.Connection = (rEntry.
eConnect ==
SC_AND) ? sheet::FilterConnection_AND :
953 sheet::FilterConnection_OR;
954 aField.Field = rEntry.
nField;
957 aField.NumericValue = rItem.
mfVal;
963 aField.Operator = sheet::FilterOperator_EQUAL;
966 aField.Operator = sheet::FilterOperator_EMPTY;
967 aField.NumericValue = 0;
971 aField.Operator = sheet::FilterOperator_NOT_EMPTY;
972 aField.NumericValue = 0;
976 case SC_LESS: aField.Operator = sheet::FilterOperator_LESS;
break;
977 case SC_GREATER: aField.Operator = sheet::FilterOperator_GREATER;
break;
978 case SC_LESS_EQUAL: aField.Operator = sheet::FilterOperator_LESS_EQUAL;
break;
979 case SC_GREATER_EQUAL: aField.Operator = sheet::FilterOperator_GREATER_EQUAL;
break;
980 case SC_NOT_EQUAL: aField.Operator = sheet::FilterOperator_NOT_EQUAL;
break;
981 case SC_TOPVAL: aField.Operator = sheet::FilterOperator_TOP_VALUES;
break;
982 case SC_BOTVAL: aField.Operator = sheet::FilterOperator_BOTTOM_VALUES;
break;
983 case SC_TOPPERC: aField.Operator = sheet::FilterOperator_TOP_PERCENT;
break;
984 case SC_BOTPERC: aField.Operator = sheet::FilterOperator_BOTTOM_PERCENT;
break;
986 OSL_FAIL(
"wrong filter enum");
987 aField.Operator = sheet::FilterOperator_EMPTY;
997void convertQueryEntryToUno(
const ScQueryEntry& rEntry, T& rField)
999 rField.Connection = (rEntry.
eConnect ==
SC_AND) ? sheet::FilterConnection_AND : sheet::FilterConnection_OR;
1000 rField.Field = rEntry.
nField;
1004 case SC_EQUAL: rField.Operator = sheet::FilterOperator2::EQUAL;
break;
1005 case SC_LESS: rField.Operator = sheet::FilterOperator2::LESS;
break;
1006 case SC_GREATER: rField.Operator = sheet::FilterOperator2::GREATER;
break;
1007 case SC_LESS_EQUAL: rField.Operator = sheet::FilterOperator2::LESS_EQUAL;
break;
1008 case SC_GREATER_EQUAL: rField.Operator = sheet::FilterOperator2::GREATER_EQUAL;
break;
1009 case SC_NOT_EQUAL: rField.Operator = sheet::FilterOperator2::NOT_EQUAL;
break;
1010 case SC_TOPVAL: rField.Operator = sheet::FilterOperator2::TOP_VALUES;
break;
1011 case SC_BOTVAL: rField.Operator = sheet::FilterOperator2::BOTTOM_VALUES;
break;
1012 case SC_TOPPERC: rField.Operator = sheet::FilterOperator2::TOP_PERCENT;
break;
1013 case SC_BOTPERC: rField.Operator = sheet::FilterOperator2::BOTTOM_PERCENT;
break;
1014 case SC_CONTAINS: rField.Operator = sheet::FilterOperator2::CONTAINS;
break;
1015 case SC_DOES_NOT_CONTAIN: rField.Operator = sheet::FilterOperator2::DOES_NOT_CONTAIN;
break;
1016 case SC_BEGINS_WITH: rField.Operator = sheet::FilterOperator2::BEGINS_WITH;
break;
1018 case SC_ENDS_WITH: rField.Operator = sheet::FilterOperator2::ENDS_WITH;
break;
1021 OSL_FAIL(
"Unknown filter operator value.");
1022 rField.Operator = sheet::FilterOperator2::EMPTY;
1027void convertUnoToQueryEntry(
const T& rField,
ScQueryEntry& rEntry)
1031 rEntry.
nField = rField.Field;
1033 switch (rField.Operator)
1035 case sheet::FilterOperator2::EQUAL: rEntry.
eOp =
SC_EQUAL;
break;
1036 case sheet::FilterOperator2::LESS: rEntry.
eOp =
SC_LESS;
break;
1037 case sheet::FilterOperator2::GREATER: rEntry.
eOp =
SC_GREATER;
break;
1038 case sheet::FilterOperator2::LESS_EQUAL: rEntry.
eOp =
SC_LESS_EQUAL;
break;
1040 case sheet::FilterOperator2::NOT_EQUAL: rEntry.
eOp =
SC_NOT_EQUAL;
break;
1041 case sheet::FilterOperator2::TOP_VALUES: rEntry.
eOp =
SC_TOPVAL;
break;
1042 case sheet::FilterOperator2::BOTTOM_VALUES: rEntry.
eOp =
SC_BOTVAL;
break;
1043 case sheet::FilterOperator2::TOP_PERCENT: rEntry.
eOp =
SC_TOPPERC;
break;
1044 case sheet::FilterOperator2::BOTTOM_PERCENT: rEntry.
eOp =
SC_BOTPERC;
break;
1045 case sheet::FilterOperator2::CONTAINS: rEntry.
eOp =
SC_CONTAINS;
break;
1049 case sheet::FilterOperator2::ENDS_WITH: rEntry.
eOp =
SC_ENDS_WITH;
break;
1051 case sheet::FilterOperator2::EMPTY:
1054 case sheet::FilterOperator2::NOT_EMPTY:
1058 OSL_FAIL(
"Unknown filter operator type.");
1065 const uno::Sequence<sheet::TableFilterField2>& aFilterFields)
1067 size_t nCount =
static_cast<size_t>(aFilterFields.getLength());
1070 const sheet::TableFilterField2* pAry = aFilterFields.getConstArray();
1072 for (
size_t i = 0;
i <
nCount; ++
i)
1075 convertUnoToQueryEntry(pAry[i], rEntry);
1077 if (pAry[i].Operator != sheet::FilterOperator2::EMPTY && pAry[i].Operator != sheet::FilterOperator2::NOT_EMPTY)
1083 rItem.
mfVal = pAry[
i].NumericValue;
1096 for (
size_t i = nCount;
i < nParamCount; ++
i)
1102 const uno::Sequence<sheet::TableFilterField3>& aFilterFields)
1104 size_t nCount =
static_cast<size_t>(aFilterFields.getLength());
1108 const sheet::TableFilterField3* pAry = aFilterFields.getConstArray();
1109 for (
size_t i = 0;
i <
nCount; ++
i)
1112 convertUnoToQueryEntry(pAry[i], rEntry);
1114 if (pAry[i].Operator != sheet::FilterOperator2::EMPTY && pAry[i].Operator != sheet::FilterOperator2::NOT_EMPTY)
1118 const uno::Sequence<sheet::FilterFieldValue>& rVals = pAry[
i].Values;
1119 for (
const auto& rVal : rVals)
1122 switch (rVal.FilterType)
1124 case FilterFieldType::NUMERIC:
1127 case FilterFieldType::STRING:
1133 case FilterFieldType::TEXT_COLOR:
1136 case FilterFieldType::BACKGROUND_COLOR:
1140 aItem.
mfVal = rVal.NumericValue;
1152 aItem.
maColor =
Color(ColorTransparency, rVal.ColorValue);
1161 for(
const auto& rFilter : aFilterEntries )
1163 if( rFilter.GetString().startsWith(rVal.StringValue) )
1166 rItems.push_back(aItem);
1172 rItems.push_back(aItem);
1179 for (
size_t i = nCount;
i < nParamCount; ++
i)
1193 while (
nCount < nEntries &&
1197 sheet::TableFilterField2 aField;
1198 uno::Sequence<sheet::TableFilterField2>
aSeq(
static_cast<sal_Int32
>(
nCount));
1199 sheet::TableFilterField2* pAry =
aSeq.getArray();
1203 convertQueryEntryToUno(rEntry, aField);
1205 bool bByEmpty =
false;
1206 if (aField.Operator == sheet::FilterOperator2::EQUAL)
1210 aField.Operator = sheet::FilterOperator2::EMPTY;
1211 aField.NumericValue = 0;
1216 aField.Operator = sheet::FilterOperator2::NOT_EMPTY;
1217 aField.NumericValue = 0;
1227 aField.NumericValue = rItem.
mfVal;
1243 while (
nCount < nEntries &&
1247 sheet::TableFilterField3 aField;
1248 uno::Sequence<sheet::TableFilterField3>
aSeq(
static_cast<sal_Int32
>(
nCount));
1249 sheet::TableFilterField3* pAry =
aSeq.getArray();
1253 convertQueryEntryToUno(rEntry, aField);
1255 bool bByEmpty =
false;
1256 if (aField.Operator == sheet::FilterOperator2::EQUAL)
1260 aField.Operator = sheet::FilterOperator2::EMPTY;
1261 aField.Values.realloc(1);
1262 aField.Values.getArray()[0].NumericValue = 0;
1267 aField.Operator = sheet::FilterOperator2::NOT_EMPTY;
1268 aField.Values.realloc(1);
1269 aField.Values.getArray()[0].NumericValue = 0;
1277 size_t nItemCount = rItems.size();
1278 aField.Values.realloc(nItemCount);
1279 auto pValues = aField.Values.getArray();
1281 for (
const auto& rItem : rItems)
1296 const uno::Sequence<sheet::TableFilterField>& aFilterFields )
1307 const sheet::TableFilterField* pAry = aFilterFields.getConstArray();
1317 rEntry.
nField = pAry[
i].Field;
1319 rItem.
mfVal = pAry[
i].NumericValue;
1331 case sheet::FilterOperator_EQUAL: rEntry.
eOp =
SC_EQUAL;
break;
1332 case sheet::FilterOperator_LESS: rEntry.
eOp =
SC_LESS;
break;
1333 case sheet::FilterOperator_GREATER: rEntry.
eOp =
SC_GREATER;
break;
1336 case sheet::FilterOperator_NOT_EQUAL: rEntry.
eOp =
SC_NOT_EQUAL;
break;
1337 case sheet::FilterOperator_TOP_VALUES: rEntry.
eOp =
SC_TOPVAL;
break;
1338 case sheet::FilterOperator_BOTTOM_VALUES: rEntry.
eOp =
SC_BOTVAL;
break;
1339 case sheet::FilterOperator_TOP_PERCENT: rEntry.
eOp =
SC_TOPPERC;
break;
1340 case sheet::FilterOperator_BOTTOM_PERCENT: rEntry.
eOp =
SC_BOTPERC;
break;
1341 case sheet::FilterOperator_EMPTY:
1344 case sheet::FilterOperator_NOT_EMPTY:
1348 OSL_FAIL(
"Wrong query enum");
1361 const uno::Sequence<sheet::TableFilterField2>& aFilterFields )
1371 const uno::Sequence<sheet::TableFilterField3>& aFilterFields )
1387 static uno::Reference<beans::XPropertySetInfo> aRef(
1393 const OUString& aPropertyName,
const uno::Any& aValue )
1413 aParam.
bByRow = ( eOrient != table::TableOrientation_COLUMNS );
1417 table::CellAddress aAddress;
1418 if ( aValue >>= aAddress )
1454 table::TableOrientation eOrient = aParam.
bByRow ? table::TableOrientation_ROWS :
1455 table::TableOrientation_COLUMNS;
1460 table::CellAddress aOutPos;
1563 pDocShell( pDocSh ),
1573 pDocShell( pDocSh ),
1593 if ( rHint.
GetId() == SfxHintId::Dying )
1600 if (aParam == pRefreshHint->GetImportParam())
1655 table::CellRangeAddress aAddress;
1660 pData->GetArea(aRange);
1662 aAddress.StartColumn = aRange.
aStart.
Col();
1663 aAddress.StartRow = aRange.
aStart.
Row();
1664 aAddress.EndColumn = aRange.
aEnd.
Col();
1665 aAddress.EndRow = aRange.
aEnd.
Row();
1678 aNewData.
SetArea( aDataArea.Sheet,
static_cast<SCCOL>(aDataArea.StartColumn),
static_cast<SCROW>(aDataArea.StartRow),
1679 static_cast<SCCOL>(aDataArea.EndColumn),
static_cast<SCROW>(aDataArea.EndRow) );
1692 pData->GetSortParam(aParam);
1696 pData->GetArea(aDBRange);
1714 pData->GetQueryParam(rQueryParam);
1718 pData->GetArea(aDBRange);
1725 rEntry.
nField -= nFieldStart;
1738 pData->GetArea(aDBRange);
1746 rEntry.
nField += nFieldStart;
1768 pData->GetSubTotalParam(rSubTotalParam);
1772 pData->GetArea(aDBRange);
1778 if ( rSubTotalParam.
nField[
i] >= nFieldStart )
1779 rSubTotalParam.
nField[
i] = sal::static_int_cast<SCCOL>( rSubTotalParam.
nField[
i] - nFieldStart );
1781 if ( rSubTotalParam.
pSubTotals[
i][j] >= nFieldStart )
1783 sal::static_int_cast<SCCOL>( rSubTotalParam.
pSubTotals[
i][j] - nFieldStart );
1797 pData->GetArea(aDBRange);
1803 aParam.
nField[
i] = sal::static_int_cast<SCCOL>( aParam.
nField[
i] + nFieldStart );
1827 pData->GetImportParam(aParam);
1846 bool bContinue =
true;
1848 pData->GetImportParam( aImportParam );
1849 if (aImportParam.
bImport && !
pData->HasImportSelection())
1854 pData->GetArea( nTab, nDummyCol,nDummyRow,nDummyCol,nDummyRow );
1855 bContinue = aFunc.
DoImport( nTab, aImportParam,
nullptr );
1864 const uno::Reference<util::XRefreshListener >& xListener )
1875 const uno::Reference<util::XRefreshListener >& xListener )
1882 if ( rObj == xListener )
1894 lang::EventObject
aEvent;
1895 aEvent.Source = getXWeak();
1896 for (uno::Reference<util::XRefreshListener> & xRefreshListener :
aRefreshListeners)
1897 xRefreshListener->refreshed(
aEvent );
1911 pData->GetArea(aRange);
1925 static uno::Reference<beans::XPropertySetInfo> aRef(
1931 const OUString& aPropertyName,
const uno::Any& aValue )
1958 else if (!bAutoFilter)
1980 table::CellRangeAddress aRange;
1981 if (aValue >>= aRange)
1995 sal_Int32 nRefresh = 0;
1996 if (aValue >>= nRefresh)
2032 aRet <<=
pData->IsKeepFmt();
2034 aRet <<=
pData->IsDoSize();
2036 aRet <<=
pData->IsStripData();
2053 aRet <<= bAutoFilter;
2058 bool bIsAdvancedSource(
GetDBData_Impl()->GetAdvancedQuerySource(aRange));
2060 aRet <<= bIsAdvancedSource;
2064 table::CellRangeAddress aRange;
2109 return "ScDatabaseRangeObj";
2119 return {
"com.sun.star.sheet.DatabaseRange",
2141 if ( rHint.
GetId() == SfxHintId::Dying )
2163 ::std::advance(itr,
nIndex);
2177 const table::CellRangeAddress& aRange )
2185 ScRange aNameRange(
static_cast<SCCOL>(aRange.StartColumn),
static_cast<SCROW>(aRange.StartRow), aRange.Sheet,
2186 static_cast<SCCOL>(aRange.EndColumn),
static_cast<SCROW>(aRange.EndRow), aRange.Sheet );
2190 throw uno::RuntimeException();
2203 throw uno::RuntimeException();
2235 throw lang::IndexOutOfBoundsException();
2239 throw lang::IndexOutOfBoundsException();
2262 throw container::NoSuchElementException();
2279 uno::Sequence<OUString>
aSeq(rDBs.
size());
2280 auto aSeqRange = asNonConstRange(
aSeq);
2282 for (
const auto& rDB : rDBs)
2284 aSeqRange[
i] = rDB->GetName();
2327 if ( rHint.
GetId() == SfxHintId::Dying )
2342 throw lang::IndexOutOfBoundsException();
2345 ScRange aUnnamedRange(
static_cast<SCCOL>(aRange.StartColumn),
static_cast<SCROW>(aRange.StartRow), aRange.Sheet,
2346 static_cast<SCCOL>(aRange.EndColumn),
static_cast<SCROW>(aRange.EndRow), aRange.Sheet );
2350 throw uno::RuntimeException();
2357 throw uno::RuntimeException();
2360 throw lang::IndexOutOfBoundsException();
2361 uno::Reference<sheet::XDatabaseRange> xRange(
2364 throw container::NoSuchElementException();
2375 throw lang::IndexOutOfBoundsException();
const PropertyValue * pValues
size_t SCSIZE
size_t typedef to be able to find places where code was changed from USHORT to size_t and is used to ...
unotools::WeakReference< AnimationNode > mxParent
really derive cell from range?
virtual sal_Bool SAL_CALL getUseColumnHeaders() override
virtual css::table::CellAddress SAL_CALL getStartOutputPosition() override
virtual sal_Bool SAL_CALL getUseRowHeaders() override
ScConsolidateParam aParam
ScConsolidationDescriptor()
virtual ~ScConsolidationDescriptor() override
virtual css::uno::Sequence< css::table::CellRangeAddress > SAL_CALL getSources() override
virtual void SAL_CALL setUseRowHeaders(sal_Bool bUseRowHeaders) override
virtual sal_Bool SAL_CALL getInsertLinks() override
virtual void SAL_CALL setFunction(css::sheet::GeneralFunction nFunction) override
virtual void SAL_CALL setSources(const css::uno::Sequence< css::table::CellRangeAddress > &aSources) override
virtual void SAL_CALL setUseColumnHeaders(sal_Bool bUseColumnHeaders) override
virtual void SAL_CALL setInsertLinks(sal_Bool bInsertLinks) override
virtual void SAL_CALL setStartOutputPosition(const css::table::CellAddress &aStartOutputPosition) override
virtual css::sheet::GeneralFunction SAL_CALL getFunction() override
void SetParam(const ScConsolidateParam &rNew)
Stores global named database ranges.
DBsType::const_iterator const_iterator
ScDBData * findByUpperName(const OUString &rName)
const Link< Timer *, void > & GetRefreshHandler() const
void GetImportParam(ScImportParam &rImportParam) const
void GetArea(SCTAB &rTab, SCCOL &rCol1, SCROW &rRow1, SCCOL &rCol2, SCROW &rRow2) const
SC_DLLPUBLIC bool GetAdvancedQuerySource(ScRange &rSource) const
void SetAutoFilter(bool bSet)
void SetSubTotalParam(const ScSubTotalParam &rSubTotalParam)
void SetDoSize(bool bSet)
void SetTotals(bool bTotals)
SC_DLLPUBLIC void SetAdvancedQuerySource(const ScRange *pSource)
void SetHeader(bool bHasH)
void SetImportSelection(bool bSet)
void SetStripData(bool bSet)
void SetKeepFmt(bool bSet)
bool HasImportSelection() const
SC_DLLPUBLIC void SetQueryParam(const ScQueryParam &rQueryParam)
void SetArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
bool RenameDBRange(const OUString &rOld, const OUString &rNew)
bool AddDBRange(const OUString &rName, const ScRange &rRange)
void ModifyDBData(const ScDBData &rNewData)
bool DeleteDBRange(const OUString &rName)
bool RepeatDB(const OUString &rDBName, bool bApi, bool bIsUnnamed, SCTAB aTab=0)
bool DoImport(SCTAB nTab, const ScImportParam &rParam, const svx::ODataAccessDescriptor *pDescriptor)
void SetSheetDesc(const ScSheetSourceDesc &rDesc)
const ScSheetSourceDesc * GetSheetDesc() const
static SC_DLLPUBLIC ScSubTotalFunc toSubTotalFunc(ScGeneralFunction eGenFunc)
ScDataPilotFilterDescriptor(ScDocShell *pDocSh, ScDataPilotDescriptorBase *pPar)
virtual void GetData(ScQueryParam &rParam) const override
virtual void PutData(const ScQueryParam &rParam) override
virtual ~ScDataPilotFilterDescriptor() override
rtl::Reference< ScDataPilotDescriptorBase > mxParent
static css::sheet::GeneralFunction SubTotalToGeneral(ScSubTotalFunc eSubTotal)
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getImportDescriptor() override
virtual css::uno::Reference< css::sheet::XSubTotalDescriptor > SAL_CALL getSubTotalDescriptor() override
void SetQueryParam(const ScQueryParam &rQueryParam)
ScDBData * GetDBData_Impl() const
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getSortDescriptor() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual void SAL_CALL setName(const OUString &aName) override
std::vector< css::uno::Reference< css::util::XRefreshListener > > aRefreshListeners
void GetSubTotalParam(ScSubTotalParam &rSubTotalParam) const
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
virtual void SAL_CALL removeRefreshListener(const css::uno::Reference< css::util::XRefreshListener > &l) override
void SetSubTotalParam(const ScSubTotalParam &rSubTotalParam)
virtual void SAL_CALL refresh() override
virtual OUString SAL_CALL getName() override
ScDatabaseRangeObj(ScDocShell *pDocSh, OUString aNm)
virtual void SAL_CALL addRefreshListener(const css::uno::Reference< css::util::XRefreshListener > &l) override
virtual ~ScDatabaseRangeObj() override
virtual css::table::CellRangeAddress SAL_CALL getDataArea() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
SfxItemPropertySet aPropSet
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual css::uno::Reference< css::table::XCellRange > SAL_CALL getReferredCells() override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
void GetQueryParam(ScQueryParam &rQueryParam) const
virtual css::uno::Reference< css::sheet::XSheetFilterDescriptor > SAL_CALL getFilterDescriptor() override
virtual void SAL_CALL setDataArea(const css::table::CellRangeAddress &aDataArea) override
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 Index) override
virtual ~ScDatabaseRangesObj() override
ScDatabaseRangesObj(ScDocShell *pDocSh)
virtual css::uno::Type SAL_CALL getElementType() override
virtual css::uno::Any SAL_CALL getByName(const OUString &aName) override
virtual void SAL_CALL addNewByName(const OUString &aName, const css::table::CellRangeAddress &aRange) override
virtual sal_Bool SAL_CALL hasByName(const OUString &aName) override
rtl::Reference< ScDatabaseRangeObj > GetObjectByIndex_Impl(size_t nIndex)
virtual sal_Bool SAL_CALL hasElements() override
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
virtual sal_Int32 SAL_CALL getCount() override
virtual void SAL_CALL removeByName(const OUString &aName) override
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
rtl::Reference< ScDatabaseRangeObj > GetObjectByName_Impl(const OUString &aName)
const ScDocument & GetDocument() const
void PostPaint(SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, PaintPartFlags nPart, sal_uInt16 nExtFlags=0)
SC_DLLPUBLIC bool RemoveFlagsTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, ScMF nFlags)
std::unique_ptr< ScRefreshTimerControl > const & GetRefreshTimerControlAddress() const
SC_DLLPUBLIC bool ApplyFlagsTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, ScMF nFlags)
void AddUnoObject(SfxListener &rObject)
void GetFilterEntries(SCCOL nCol, SCROW nRow, SCTAB nTab, ScFilterEntries &rFilterEntries)
Get a list of unique strings to use in filtering criteria.
SC_DLLPUBLIC ScDBCollection * GetDBCollection() const
SC_DLLPUBLIC svl::SharedStringPool & GetSharedStringPool()
SC_DLLPUBLIC SvNumberFormatter * GetFormatTable() const
void RemoveUnoObject(SfxListener &rObject)
SC_DLLPUBLIC ScDBData * GetAnonymousDBData(SCTAB nTab)
SC_DLLPUBLIC SCTAB GetTableCount() const
ScFilterDescriptorBase(ScDocShell *pDocShell)
virtual void GetData(ScQueryParam &rParam) const =0
virtual void SAL_CALL setFilterFields3(const css::uno::Sequence< css::sheet::TableFilterField3 > &aFilterFields) override
virtual ~ScFilterDescriptorBase() override
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual css::uno::Sequence< css::sheet::TableFilterField3 > SAL_CALL getFilterFields3() override
virtual void SAL_CALL setFilterFields2(const css::uno::Sequence< css::sheet::TableFilterField2 > &aFilterFields) override
SfxItemPropertySet aPropSet
virtual void PutData(const ScQueryParam &rParam)=0
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
virtual css::uno::Sequence< css::sheet::TableFilterField2 > SAL_CALL getFilterFields2() override
virtual css::uno::Sequence< css::sheet::TableFilterField > SAL_CALL getFilterFields() override
virtual void SAL_CALL setFilterFields(const css::uno::Sequence< css::sheet::TableFilterField > &aFilterFields) override
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
void SetParam(const ScQueryParam &rNew)
virtual void PutData(const ScQueryParam &rParam) override
ScQueryParam aStoredParam
virtual ~ScFilterDescriptor() override
virtual void GetData(ScQueryParam &rParam) const override
static SC_DLLPUBLIC const CharClass & getCharClass()
static void FillImportParam(ScImportParam &rParam, const css::uno::Sequence< css::beans::PropertyValue > &rSeq)
static void FillProperties(css::uno::Sequence< css::beans::PropertyValue > &rSeq, const ScImportParam &rParam)
static tools::Long GetPropertyCount()
virtual void PutData(const ScQueryParam &rParam) override
rtl::Reference< ScDatabaseRangeObj > mxParent
virtual void GetData(ScQueryParam &rParam) const override
virtual ~ScRangeFilterDescriptor() override
ScRangeFilterDescriptor(ScDocShell *pDocSh, ScDatabaseRangeObj *pPar)
virtual void GetData(ScSubTotalParam &rParam) const override
virtual ~ScRangeSubTotalDescriptor() override
virtual void PutData(const ScSubTotalParam &rParam) override
rtl::Reference< ScDatabaseRangeObj > mxParent
ScRangeSubTotalDescriptor(ScDatabaseRangeObj *pPar)
void SetRefreshHandler(const Link< Timer *, void > &rLink)
void SetRefreshControl(std::unique_ptr< ScRefreshTimerControl > const *pp)
void SetRefreshDelay(sal_Int32 nSeconds)
This class contains authoritative information on the internal reference used as the data source for d...
const ScQueryParam & GetQueryParam() const
void SetQueryParam(const ScQueryParam &rParam)
static void FillProperties(css::uno::Sequence< css::beans::PropertyValue > &rSeq, const ScSortParam &rParam)
static void FillSortParam(ScSortParam &rParam, const css::uno::Sequence< css::beans::PropertyValue > &rSeq)
static tools::Long GetPropertyCount()
SortAscending needs to get out of the SheetSortDescriptor service description.
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual void GetData(ScSubTotalParam &rParam) const =0
virtual ~ScSubTotalDescriptorBase() override
virtual void PutData(const ScSubTotalParam &rParam)=0
virtual void SAL_CALL clear() override
virtual void SAL_CALL addNew(const css::uno::Sequence< css::sheet::SubTotalColumn > &aSubTotalColumns, sal_Int32 nGroupColumn) override
virtual sal_Int32 SAL_CALL getCount() override
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 Index) override
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
SfxItemPropertySet aPropSet
ScSubTotalDescriptorBase()
virtual sal_Bool SAL_CALL hasElements() override
virtual css::uno::Type SAL_CALL getElementType() override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
rtl::Reference< ScSubTotalFieldObj > GetObjectByIndex_Impl(sal_uInt16 nIndex)
virtual ~ScSubTotalDescriptor() override
virtual void PutData(const ScSubTotalParam &rParam) override
void SetParam(const ScSubTotalParam &rNew)
ScSubTotalParam aStoredParam
virtual void GetData(ScSubTotalParam &rParam) const override
ScSubTotalFieldObj(ScSubTotalDescriptorBase *pDesc, sal_uInt16 nP)
virtual css::uno::Sequence< css::sheet::SubTotalColumn > SAL_CALL getSubTotalColumns() override
virtual ~ScSubTotalFieldObj() override
virtual void SAL_CALL setSubTotalColumns(const css::uno::Sequence< css::sheet::SubTotalColumn > &aSubTotalColumns) override
virtual void SAL_CALL setGroupColumn(sal_Int32 nGroupColumn) override
rtl::Reference< ScSubTotalDescriptorBase > xParent
virtual sal_Int32 SAL_CALL getGroupColumn() override
ScUnnamedDatabaseRangesObj(ScDocShell *pDocSh)
virtual css::uno::Any SAL_CALL getByTable(sal_Int32 nTab) override
virtual sal_Bool SAL_CALL hasByTable(sal_Int32 nTab) override
virtual void SAL_CALL setByTable(const css::table::CellRangeAddress &aRange) override
virtual ~ScUnnamedDatabaseRangesObj() override
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
static void FillScRange(ScRange &rScRange, const css::table::CellRangeAddress &rApiRange)
static void FillApiRange(css::table::CellRangeAddress &rApiRange, const ScRange &rScRange)
static sal_Int32 GetEnumFromAny(const css::uno::Any &aAny)
static bool GetBoolFromAny(const css::uno::Any &aAny)
const SfxItemPropertyMap & getPropertyMap() const
const OUString & GetName() const
css::uno::Type const & get()
SharedString intern(const OUString &rStr)
const OUString & getString() const
sal_Int32 getLength() const
bool has(DataAccessDescriptorProperty _eWhich) const
void setDataSource(const OUString &_sDataSourceNameOrLocation)
static o3tl::span< const SfxItemPropertyMapEntry > lcl_GetDBRangePropertyMap()
static o3tl::span< const SfxItemPropertyMapEntry > lcl_GetSubTotalPropertyMap()
static o3tl::span< const SfxItemPropertyMapEntry > lcl_GetFilterPropertyMap()
ScGeneralFunction
the css::sheet::GeneralFunction enum is extended by constants in GeneralFunction2,...
constexpr OUStringLiteral STR_DB_LOCAL_NONAME
Sequence< sal_Int8 > aSeq
std::unique_ptr< sal_Int32[]> pData
#define SC_SIMPLE_SERVICE_INFO(ClassName, ClassNameAscii, ServiceAscii)
#define SC_IMPL_DUMMY_PROPERTY_LISTENER(ClassName)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
sal_uInt16 nDataAreaCount
std::unique_ptr< ScArea[]> pDataAreas
void SetAreas(std::unique_ptr< ScArea[]> pAreas, sal_uInt16 nCount)
svl::SharedString maString
Each instance of this struct represents a single filtering criteria.
bool IsQueryByNonEmpty() const
void SetQueryByNonEmpty()
std::vector< Item > QueryItemsType
bool IsQueryByEmpty() const
QueryItemsType & GetQueryItems()
SC_DLLPUBLIC const ScQueryEntry & GetEntry(SCSIZE n) const
utl::SearchParam::SearchType eSearchType
SC_DLLPUBLIC SCSIZE GetEntryCount() const
::std::vector< ScSortKeyState > maKeyState
OUString aCollatorAlgorithm
ScDataAreaExtras aDataAreaExtras
css::lang::Locale aCollatorLocale
sal_uInt16 GetSortKeyCount() const
bool bUserDef
sort user defined
bool bPagebreak
page break at change of group
bool bAscending
sort ascending
bool bGroupActive[MAXSUBTOTAL]
active groups
sal_uInt16 nUserIndex
index into list
SCCOL nField[MAXSUBTOTAL]
associated field
SCCOL nSubTotals[MAXSUBTOTAL]
number of SubTotals
std::unique_ptr< ScSubTotalFunc[]> pFunctions[MAXSUBTOTAL]
array of associated functions
std::unique_ptr< SCCOL[]> pSubTotals[MAXSUBTOTAL]
array of columns to be calculated
bool bIncludePattern
sort formats
constexpr OUStringLiteral SCLINKTARGET_SERVICE
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW
constexpr OUStringLiteral SC_UNONAME_CONRES
constexpr OUStringLiteral SC_UNONAME_TOKENINDEX
constexpr OUStringLiteral SC_UNONAME_OUTPOS
constexpr OUStringLiteral SC_UNONAME_SRCOBJ
constexpr OUStringLiteral SC_UNONAME_ORIENT
constexpr OUStringLiteral SC_UNONAME_COLLLOC
constexpr OUStringLiteral SC_UNONAME_CASE
constexpr OUStringLiteral SC_UNONAME_FORMATS
constexpr OUStringLiteral SC_UNONAME_SORTFLD
constexpr OUStringLiteral SC_UNONAME_USEREGEX
constexpr OUStringLiteral SC_UNONAME_TOTALSROW
constexpr OUStringLiteral SC_UNONAME_UINDEX
constexpr OUStringLiteral SC_UNONAME_COPYOUT
constexpr OUStringLiteral SC_UNONAME_ISNATIVE
constexpr OUStringLiteral SC_UNONAME_FROMSELECT
constexpr OUStringLiteral SC_UNONAME_STRIPDAT
constexpr OUStringLiteral SC_UNONAME_FLTCRT
constexpr OUStringLiteral SC_UNONAME_COLLALG
constexpr OUStringLiteral SC_UNONAME_AUTOFLT
constexpr OUStringLiteral SC_UNONAME_DBNAME
constexpr OUStringLiteral SC_UNONAME_ISUSER
constexpr OUStringLiteral SC_UNO_LINKDISPBIT
constexpr OUStringLiteral SC_UNONAME_SKIPDUP
constexpr OUStringLiteral SC_UNONAME_ISCASE
constexpr OUStringLiteral SC_UNONAME_ULIST
constexpr OUStringLiteral SC_UNONAME_SRCTYPE
constexpr OUStringLiteral SC_UNONAME_MAXFLD
constexpr OUStringLiteral SC_UNONAME_SORTASC
constexpr OUStringLiteral SC_UNONAME_INSBRK
constexpr OUStringLiteral SC_UNONAME_SAVEOUT
constexpr OUStringLiteral SC_UNONAME_REFPERIOD
constexpr OUStringLiteral SC_UNONAME_ENUSLIST
constexpr OUStringLiteral SC_UNONAME_BINDFMT
constexpr OUStringLiteral SC_UNONAME_ISSORTCOLUMNS
constexpr OUStringLiteral SC_UNONAME_USINDEX
constexpr OUStringLiteral SC_UNONAME_MOVCELLS
constexpr OUStringLiteral SC_UNO_LINKDISPNAME
constexpr OUStringLiteral SC_UNONAME_ISULIST
constexpr OUStringLiteral SC_UNONAME_KEEPFORM
constexpr OUStringLiteral SC_UNONAME_USEFLTCRT
constexpr OUStringLiteral SC_UNONAME_ENABSORT
constexpr OUStringLiteral SC_UNONAME_CONTHDR