26 #include <com/sun/star/sdb/CommandType.hpp>
34 #include <docfunc.hxx>
35 #include <globstr.hrc>
52 #include <progress.hxx>
73 std::unique_ptr<ScDBCollection> pUndoColl;
108 std::make_unique<ScUndoDBData>( &
rDocShell, std::move(pUndoColl),
109 std::make_unique<ScDBCollection>( *pDocColl ) ) );
126 if (iter != rDBs.
end())
130 std::unique_ptr<ScDBCollection> pUndoColl;
141 std::make_unique<ScUndoDBData>( &
rDocShell, std::move(pUndoColl),
142 std::make_unique<ScDBCollection>( *pDocColl ) ) );
162 if (iterOld != rDBs.
end() && !pNew)
166 std::unique_ptr<ScDBData> pNewData(
new ScDBData(rNew, **iterOld));
168 std::unique_ptr<ScDBCollection> pUndoColl(
new ScDBCollection( *pDocColl ) );
172 bool bInserted = rDBs.
insert(std::move(pNewData));
185 std::make_unique<ScUndoDBData>( &
rDocShell, std::move(pUndoColl),
186 std::make_unique<ScDBCollection>( *pDocColl ) ) );
224 bool bAreaChanged = ( aOldRange != aNewRange );
226 std::unique_ptr<ScDBCollection> pUndoColl;
237 std::make_unique<ScUndoDBData>( &
rDocShell, std::move(pUndoColl),
238 std::make_unique<ScDBCollection>( *pDocColl ) ) );
249 std::unique_ptr<ScDBCollection> pUndoColl;
252 for (
const auto& rDelArea : rDelAreaList)
255 const ScAddress& rStart = rDelArea.aStart;
277 std::make_unique<ScUndoDBData>(&
rDocShell, std::move(pUndoColl),
278 std::make_unique<ScDBCollection>(rNewColl)));
311 bool bSort = aSortParam.
maKeyState[0].bDoSort;
317 if ( bQuery || bSort || bSubTotal )
319 bool bQuerySize =
false;
322 if (bQuery && !aQueryParam.
bInplace)
338 pDBData->
GetArea( nTab, nStartCol, nStartRow, nEndCol, nEndRow );
343 std::unique_ptr<ScOutlineTable> pUndoTab;
344 std::unique_ptr<ScRangeName> pUndoRange;
345 std::unique_ptr<ScDBCollection> pUndoDB;
362 pUndoDoc->InitUndo( rDoc, nTab, nTab,
true,
true );
364 nTab, static_cast<SCCOL>(nOutEndCol), rDoc.
MaxRow(), nTab,
367 nTab, rDoc.
MaxCol(),
static_cast<SCROW>(nOutEndRow), nTab,
368 InsertDeleteFlags::NONE,
false, *pUndoDoc);
371 pUndoDoc->InitUndo( rDoc, nTab, nTab,
false,
true );
381 if (!pDocRange->
empty())
384 if (!pDocDB->
empty())
388 if (bSort && bSubTotal)
399 (
void)
Sort( nTab, aSortParam,
false,
false, bApi );
406 Query( nTab, aQueryParam, &aAdvSource,
false, bApi );
408 Query( nTab, aQueryParam,
nullptr,
false, bApi );
427 pDBData->
GetArea( nDummyTab, nDummyCol,nDummyRow, nDummyCol,nNewEndRow );
444 std::make_unique<ScUndoRepeatDB>( &
rDocShell, nTab,
445 nStartCol, nStartRow, nEndCol, nEndRow,
448 nStartCol, nStartRow,
449 std::move(pUndoDoc), std::move(pUndoTab),
450 std::move(pUndoRange), std::move(pUndoDB),
466 bool bRecord,
bool bPaint,
bool bApi )
478 OSL_FAIL(
"Sort: no DBData" );
495 bool bRet = rDocFunc.
MoveBlock(aSrcRange, aDestPos,
false, bRecord, bPaint, bApi);
511 nStartingRowToEdit++;
513 nStartingColToEdit++;
515 ScEditableTester aTester( rDoc, nTab, nStartingColToEdit, nStartingRowToEdit,
527 bool bShrunk =
false;
537 aLocalParam.
nCol1, nStartRow , nTab,
557 aLocalParam.
nRow2-nStartRow+1);
560 bool bUniformRowHeight =
563 bool bRepeatQuery =
false;
577 rDoc.
Sort(nTab, aLocalParam, bRepeatQuery, bUpdateRefs, &aProgress, &aUndoParam);
584 std::make_unique<sc::UndoSort>(&
rDocShell, aUndoParam));
599 if (pTabViewShell && pTabViewShell->
GetDocId() == pSomeViewForThisDoc->
GetDocId())
607 pSomeViewForThisDoc,
false ,
true ,
true ,
608 true ,
true ,
true , nTab);
611 if (nStartRow <= aLocalParam.
nRow2)
614 aLocalParam.
nCol1, nStartRow, nTab,
635 if (!bUniformRowHeight && nStartRow <= aLocalParam.
nRow2)
644 const ScRange* pAdvSource,
bool bRecord,
bool bApi )
662 OSL_FAIL(
"Query: no DBData" );
681 Query( nTab, aOldQuery,
nullptr, bRecord, bApi );
688 bool bDoSize =
false;
689 SCCOL nFormulaCols = 0;
690 bool bKeepFmt =
false;
696 SCTAB nDestTab = nTab;
721 pDestData->
GetArea( aOldDest );
736 while ( nTestCol <= rDoc.
MaxCol() &&
745 if ( bDoSize && !rDoc.
CanFitBlock( aOldDest, aDestTotal ) )
758 bool bKeepSub =
false;
769 std::unique_ptr<ScDBCollection> pUndoDB;
777 pUndoDoc->InitUndo( rDoc, nDestTab, nDestTab,
false,
true );
779 aLocalParam.
nCol2, aLocalParam.
nRow2, nDestTab,
791 pUndoDoc->InitUndo( rDoc, nTab, nTab,
false,
true );
797 if (!pDocDB->
empty())
803 std::unique_ptr<ScDocument> pAttribDoc;
810 aAttribRange = aOldDest;
820 pAttribDoc->InitUndo( rDoc, nDestTab, nDestTab,
false,
true );
825 rDoc.
FitBlock( aOldDest, aDestTotal );
835 aLocalParam.
nRow2 = aLocalParam.
nRow1 + nCount;
845 aLocalParam.
nCol2, aLocalParam.
nRow2, nDestTab );
846 rDoc.
FitBlock( aDestTotal, aNewDest,
false );
848 if ( nFormulaCols > 0 )
854 aLocalParam.
nCol2+nFormulaCols, aLocalParam.
nRow2, nDestTab );
857 rDoc.
FitBlock( aOldForm, aNewForm,
false );
864 nProgCount *= aLocalParam.
nRow2 - nFStartY;
866 ScResId(STR_FILL_SERIES_PROGRESS), nProgCount, true );
868 rDoc.
Fill( aLocalParam.
nCol2+1, nFStartY,
869 aLocalParam.
nCol2+nFormulaCols, nFStartY, &aProgress, aMark,
870 aLocalParam.
nRow2 - nFStartY,
880 ScRange aHdrRange = aAttribRange;
888 for (
SCCOL nCol = aAttribRange.
aStart.
Col(); nCol<=nAttrEndCol; nCol++)
891 nCol, nAttrRow, nDestTab );
892 OSL_ENSURE(pSrcPattern,
"Pattern is 0");
896 nDestTab, *pSrcPattern );
925 pNewData = pDestData;
929 aLocalParam.
nCol2, aLocalParam.
nRow2, nDestTab ),
942 OSL_FAIL(
"Target are not available");
960 std::make_unique<ScUndoQuery>( &
rDocShell, nTab, rQueryParam, std::move(pUndoDoc), std::move(pUndoDB),
961 pOld, bDoSize, pAdvSource ) );
979 if ( aOldDest.
aEnd.
Col() > nEndX )
981 if ( aOldDest.
aEnd.
Row() > nEndY )
1000 bool bRecord,
bool bApi )
1016 OSL_FAIL(
"SubTotals: no DBData" );
1021 if (!aTester.IsEditable())
1042 VclMessageType::Question,
1043 VclButtonsType::YesNo,
ScResId(STR_MSSG_DOSUBTOTALS_1)));
1044 xBox->set_title(
ScResId(STR_MSSG_DOSUBTOTALS_0));
1057 std::unique_ptr<ScOutlineTable> pUndoTab;
1058 std::unique_ptr<ScRangeName> pUndoRange;
1059 std::unique_ptr<ScDBCollection> pUndoDB;
1063 bool bOldFilter = bDo && rParam.
bDoSort;
1078 pUndoDoc->InitUndo( rDoc, nTab, nTab,
true,
true );
1083 pUndoDoc->InitUndo( rDoc, nTab, nTab,
false, bOldFilter );
1095 if (!pDocRange->
empty())
1098 if (!pDocDB->
empty())
1109 bool bSuccess =
true;
1123 Sort( nTab, aSortParam,
false,
false, bApi );
1131 rDoc.
SetDirty( aDirtyRange,
true );
1137 std::make_unique<ScUndoSubTotals>( &
rDocShell, nTab,
1138 rParam, aNewParam.
nRow2,
1139 std::move(pUndoDoc), std::move(pUndoTab),
1140 std::move(pUndoRange), std::move(pUndoDB) ) );
1165 for (
bool bHasCell = aIter.first(); bHasCell; bHasCell = aIter.next())
1167 if (!aIter.isEmpty())
1169 if (!rExcept.
In(aIter.GetPos()))
1189 for (
size_t i = 0, n = rRanges.
size();
i <
n; ++
i)
1193 if (!aTester.IsEditable())
1209 pUndoDoc->InitUndo(rDoc, nTab, nTab);
1217 bool bOverflow =
false;
1244 if (!aTester.IsEditable())
1259 bool bRecord,
bool bApi,
bool bAllowMove )
1272 if (pOldObj == pNewObj)
1275 OSL_ASSERT(pOldObj && pNewObj && pOldObj != pNewObj);
1283 if (!isEditable(rDocShell, aRanges, bApi))
1296 createUndoDoc(pOldUndoDoc, rDoc, pOldObj->
GetOutRange());
1301 OSL_ENSURE( pData,
"no SaveData from living DPObject" );
1311 if (pOldObj->
GetName().isEmpty())
1315 if (!checkNewOutputRange(*pOldObj, rDocShell, aNewOut, bApi))
1317 *pOldObj = aUndoDPObj;
1325 if (!lcl_EmptyExcept(rDoc, aNewOut, pOldObj->
GetOutRange()))
1328 VclMessageType::Question, VclButtonsType::YesNo,
1329 ScResId(STR_PIVOT_NOTEMPTY)));
1330 xQueryBox->set_default_response(
RET_YES);
1331 if (xQueryBox->run() ==
RET_NO)
1334 *pOldObj = aUndoDPObj;
1341 createUndoDoc(pNewUndoDoc, rDoc, aNewOut);
1349 std::make_unique<ScUndoDataPilot>(
1350 &rDocShell, std::move(pOldUndoDoc), std::move(pNewUndoDoc), &aUndoDPObj, pOldObj, bAllowMove));
1365 if (!isEditable(rDocShell, rDPObj.
GetOutRange(), bApi))
1373 std::vector<SdrOle2Obj*> aListOfObjects =
1378 if (pModel && !aListOfObjects.empty())
1381 VclMessageType::Question, VclButtonsType::YesNo,
1382 ScResId(STR_PIVOT_REMOVE_PIVOTCHART)));
1383 xQueryBox->set_default_response(
RET_YES);
1384 if (xQueryBox->run() ==
RET_NO)
1390 for (
SdrOle2Obj* pChartObject : aListOfObjects)
1393 pModel->AddUndo(std::make_unique<SdrUndoDelObj>(*pChartObject));
1394 pChartObject->getSdrPageFromSdrObject()->RemoveObject(pChartObject->GetOrdNum());
1401 std::unique_ptr<ScDPObject> pUndoDPObj;
1415 createUndoDoc(pOldUndoDoc, rDoc, aRange);
1432 std::make_unique<ScUndoDataPilot>(
1433 &rDocShell, std::move(pOldUndoDoc),
nullptr, pUndoDPObj.get(),
nullptr,
false));
1458 std::unique_ptr<ScDPObject> pDestObj(
new ScDPObject(rDPObj));
1487 if (rDestObj.
GetName().isEmpty())
1490 bool bOverflow =
false;
1523 VclMessageType::Question, VclButtonsType::YesNo,
1524 ScResId(STR_PIVOT_NOTEMPTY)));
1525 xQueryBox->set_default_response(
RET_YES);
1526 if (xQueryBox->run() ==
RET_NO)
1535 createUndoDoc(pNewUndoDoc, rDoc, aNewOut);
1543 std::make_unique<ScUndoDataPilot>(&rDocShell,
nullptr, std::move(pNewUndoDoc),
nullptr, &rDestObj,
false));
1558 if (!isEditable(rDocShell, rDPObj.
GetOutRange(), bApi))
1571 createUndoDoc(pOldUndoDoc, rDoc, rDPObj.
GetOutRange());
1581 if (rDPObj.
GetName().isEmpty())
1585 if (!checkNewOutputRange(rDPObj, rDocShell, aNewOut, bApi))
1587 rDPObj = aUndoDPObj;
1594 if (!lcl_EmptyExcept(rDoc, aNewOut, rDPObj.
GetOutRange()))
1597 VclMessageType::Question, VclButtonsType::YesNo,
1598 ScResId(STR_PIVOT_NOTEMPTY)));
1599 xQueryBox->set_default_response(
RET_YES);
1600 if (xQueryBox->run() ==
RET_NO)
1602 rDPObj = aUndoDPObj;
1609 createUndoDoc(pNewUndoDoc, rDoc, aNewOut);
1617 std::make_unique<ScUndoDataPilot>(
1618 &rDocShell, std::move(pOldUndoDoc), std::move(pNewUndoDoc), &aUndoDPObj, &rDPObj,
false));
1634 const char* pErrId = pDPs->
ReloadCache(pDPObj, aRefs);
1676 pSaveData = pObj->GetSaveData();
1698 VclMessageType::Info, VclButtonsType::Ok,
1699 ScResId(STR_TARGETNOTFOUND)));
1707 pData->
GetArea( nTab, nDummyCol,nDummyRow,nDummyCol,nDummyRow );
1714 sal_Int32 nCommandType = 0;
1719 aImportParam.
aDBName = sDBName;
1720 aImportParam.
bSql = ( nCommandType == sdb::CommandType::COMMAND );
1726 bool bContinue =
DoImport( nTab, aImportParam, &rDescriptor );
::std::vector< ScSortKeyState > maKeyState
bool bGroupActive[MAXSUBTOTAL]
active groups
const ScDPDimensionSaveData * GetExistingDimensionData() const
bool CanFitBlock(const ScRange &rOld, const ScRange &rNew)
void UpdatePageBreaks(SCTAB nTab, const ScRange *pUserArea=nullptr)
bool insert(std::unique_ptr< ScDBData > p)
Takes ownership of p and attempts to insert it into the collection.
SC_DLLPUBLIC void ApplyStyleAreaTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, const ScStyleSheet &rStyle)
void ReloadGroupTableData()
void FitBlock(const ScRange &rOld, const ScRange &rNew, bool bClear=true)
SC_DLLPUBLIC bool HasQueryParam() const
SC_DLLPUBLIC ScDBCollection * GetDBCollection() const
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
This class has to do with handling exclusively grouped dimensions? TODO: Find out what this class doe...
SC_DLLPUBLIC ScDBData * GetAnonymousDBData(SCTAB nTab)
SC_DLLPUBLIC void SetSortParam(const ScSortParam &rSortParam)
bool AdjustRowHeight(SCROW nStartRow, SCROW nEndRow, SCTAB nTab)
merge with docfunc
void WriteSourceDataTo(ScDPObject &rDest) const
SCSIZE Query(SCTAB nTab, const ScQueryParam &rQueryParam, bool bKeepSub)
std::unique_ptr< ContentProperties > pData
static weld::Window * GetActiveDialogParent()
SC_DLLPUBLIC void GetSortParam(ScSortParam &rSortParam) const
SC_DLLPUBLIC void SetAnonymousDBData(SCTAB nTab, std::unique_ptr< ScDBData > pDBData)
void MarkRange(const ScRange &rRange, bool bSetCursor=true, bool bContinue=false)
SC_DLLPUBLIC void SetDrawPageSize(SCTAB nTab)
SC_DLLPUBLIC bool Intersects(const ScRange &rRange) const
SC_DLLPUBLIC bool GetReferenceGroups(const ScDPObject &rDPObj, const ScDPDimensionSaveData **pGroups) const
SC_DLLPUBLIC void CompileHybridFormula()
Call this immediately after updating named ranges.
#define STR_DB_LOCAL_NONAME
SC_DLLPUBLIC ScRangeName * GetRangeName(SCTAB nTab) const
SC_DLLPUBLIC ScDPCollection * GetDPCollection()
ViewShellDocId GetDocId() const override
bool DoImport(SCTAB nTab, const ScImportParam &rParam, const svx::ODataAccessDescriptor *pDescriptor)
void RefreshPivotTables(const ScRange &rSource)
SC_DLLPUBLIC const ScDBData * GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const
void SetAllowMove(bool bSet)
bool HasSubTotalParam() const
ScDBData * GetDBData(const ScRange &rMarked, ScGetDBMode eMode, ScGetDBSelection eSel)
bool DoSubTotals(SCTAB nTab, ScSubTotalParam &rParam)
SC_DLLPUBLIC void Fill(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScProgress *pProgress, const ScMarkData &rMark, sal_uLong nFillCount, FillDir eFillDir=FILL_TO_BOTTOM, FillCmd eFillCmd=FILL_LINEAR, FillDateCmd eFillDateCmd=FILL_DAY, double nStepValue=1.0, double nMaxValue=1E307)
SC_DLLPUBLIC bool HasAttrib(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, HasAttrFlags nMask) const
ScDPObject * GetByName(std::u16string_view rName) const
bool has(const ScDBData *p) const
static void notifyAllViewsSheetGeomInvalidation(const SfxViewShell *pForViewShell, bool bColumns, bool bRows, bool bSizes, bool bHidden, bool bFiltered, bool bGroups, SCTAB nCurrentTabIndex)
Emits a LOK_CALLBACK_INVALIDATE_SHEET_GEOMETRY for all views whose current tab is equal to nCurrentTa...
SfxApplication * SfxGetpApp()
Internal use only (d&d undo): do not delete caption objects of cell notes.
bool UpdatePivotTable(ScDPObject &rDPObj, bool bRecord, bool bApi)
void Sort(SCTAB nTab, const ScSortParam &rSortParam, bool bKeepQuery, bool bUpdateRefs, ScProgress *pProgress, sc::ReorderParam *pUndo)
Sort a range of data.
virtual SfxUndoManager * GetUndoManager() override
OUString CreateNewName() const
Create a new name that's not yet used by any existing data pilot objects.
bool RepeatDB(const OUString &rDBName, bool bApi, bool bIsUnnamed, SCTAB aTab=0)
void RefreshPivotTables(const ScDPObject *pDPObj, bool bApi)
Reload the referenced pivot cache, and refresh all pivot tables that reference the cache...
const ScRange & GetOutRange() const
SC_DLLPUBLIC SCROW MaxRow() const
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 ...
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW
SC_DLLPUBLIC SCTAB GetTableCount() const
static SfxViewShell * GetNext(const SfxViewShell &rPrev, bool bOnlyVisible=true, const std::function< bool(const SfxViewShell *)> &isViewShell=nullptr)
SC_DLLPUBLIC SCSIZE GetEntryCount() const
void CopyToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, InsertDeleteFlags nFlags, bool bMarked, ScDocument &rDestDoc, const ScMarkData *pMarks=nullptr, bool bColRowFlags=true)
void push_back(const ScRange &rRange)
SC_DLLPUBLIC const ScQueryEntry & GetEntry(SCSIZE n) const
void UpdateScriptTypes(const ScAddress &rPos, SCCOL nColSize, SCROW nRowSize)
Walk through all cells in an area.
bool SyncAllDimensionMembers()
Remove in the save data entries for members that don't exist anymore.
SC_DLLPUBLIC void SetQueryParam(const ScQueryParam &rQueryParam)
bool ReloadGroupsInCache(const ScDPObject *pDPObj, o3tl::sorted_vector< ScDPObject * > &rRefs)
SC_DLLPUBLIC const ScRange & GetSourceRange() const
Get the range that contains the source data.
bool DeleteDBRange(const OUString &rName)
bool bIncludeGraphicObjects
void Output(const ScAddress &rPos)
ScViewData & GetViewData()
ScChangeTrack * GetChangeTrack() const
void GetRange(SCCOLROW &rStart, SCCOLROW &rEnd) const
create "untitled" (if necessary)
void SetName(const OUString &rNew)
void SetArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
const char * GetMessageId() const
void CalcSaveFilteredCount(SCSIZE nNonFilteredRowCount)
SC_DLLPUBLIC ScDrawLayer * GetDrawLayer()
SC_DLLPUBLIC SCCOL MaxCol() const
void RepeatDB(bool bRecord=true)
bool ShrinkToUsedDataArea(bool &o_bShrunk, SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow, SCCOL &rEndCol, SCROW &rEndRow, bool bColumnsOnly, bool bStickyTopRow=false, bool bStickyLeftCol=false, bool bConsiderCellNotes=false, bool bConsiderCellDrawObjects=false) const
Shrink a range to only include used data area.
virtual void AddUndoAction(std::unique_ptr< SfxUndoAction > pAction, bool bTryMerg=false)
void InvalidatePageBreaks(SCTAB nTab)
void SetDBCollection(std::unique_ptr< ScDBCollection > pNewDBCollection, bool bRemoveAutoFilter=false)
bool IsImportingXML() const
void DBAreaDeleted(SCTAB nTab, SCCOL nX1, SCROW nY1, SCCOL nX2)
SC_DLLPUBLIC void SetDimensionData(const ScDPDimensionSaveData *pNew)
bool HasUniformRowHeight(SCTAB nTab, SCROW nRow1, SCROW nRow2) const
void UpdateFromSortParam(const ScSortParam &rSortParam)
Remember some more settings of ScSortParam, only to be called at anonymous DB ranges as it at least o...
bool RenameDBRange(const OUString &rOld, const OUString &rNew)
void invalidateByIndex(index_type nIndex)
std::unique_ptr< ScDocument, o3tl::default_delete< ScDocument > > ScDocumentUniquePtr
const ScOutlineArray & GetRowArray() const
const ScOutlineArray & GetColArray() const
bool DataPilotUpdate(ScDPObject *pOldObj, const ScDPObject *pNewObj, bool bRecord, bool bApi, bool bAllowMove=false)
void OnLOKShowHideColRow(bool bColumns, SCCOLROW nStartRow)
bool HasSortParam() const
void SetSaveData(const ScDPSaveData &rData)
SC_DLLPUBLIC void SetAdvancedQuerySource(const ScRange *pSource)
ScSheetLimits & GetSheetLimits() const
const ScStyleSheet * GetStyleSheet() const
const OUString & GetName() const
void IncRow(SCROW nDelta=1)
void SelectOneTable(SCTAB nTab)
OUString ScResId(const char *pId)
const OUString & GetName() const
void GetImportParam(ScImportParam &rImportParam) const
SC_DLLPUBLIC void ApplyPatternAreaTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, const ScPatternAttr &rAttr)
void removeByName(const OUString &rName)
ScDPSaveData * GetSaveData() const
void BroadcastUno(const SfxHint &rHint)
SC_DLLPUBLIC ScDPObject * InsertNewTable(std::unique_ptr< ScDPObject > pDPObj)
void SetSubTotalCellsDirty(const ScRange &rDirtyRange)
bool IsBlockEmpty(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool bIgnoreNotes=false) const
bool In(const ScAddress &) const
is Address& in Range?
static SfxViewShell * GetFirst(bool bOnlyVisible=true, const std::function< bool(const SfxViewShell *)> &isViewShell=nullptr)
void PostPaint(SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, PaintPartFlags nPart, sal_uInt16 nExtFlags=0)
void GetArea(SCTAB &rTab, SCCOL &rCol1, SCROW &rRow1, SCCOL &rCol2, SCROW &rRow2) const
void SetHeader(bool bHasH)
void GetSubTotalParam(ScSubTotalParam &rSubTotalParam) const
const char * ReloadCache(const ScDPObject *pDPObj, o3tl::sorted_vector< ScDPObject * > &rRefs)
ScDBData * findByUpperName(const OUString &rName)
void RemoveSubTotals(SCTAB nTab, ScSubTotalParam &rParam)
SC_DLLPUBLIC bool Query(SCTAB nTab, const ScQueryParam &rQueryParam, const ScRange *pAdvSource, bool bRecord, bool bApi)
OUString getDataSource() const
bool bReplace
replace existing results
bool ValidColRow(SCCOL nCol, SCROW nRow) const
Stores global named database ranges.
Behave as if the range corresponding to a ScDBData area was selected, for API use.
bool RemovePivotTable(ScDPObject &rDPObj, bool bRecord, bool bApi)
void erase(const iterator &itr)
SC_DLLPUBLIC bool Sort(SCTAB nTab, const ScSortParam &rSortParam, bool bRecord, bool bPaint, bool bApi)
void SetDirty(const ScRange &, bool bIncludeEmptyCells)
bool ValidRow(SCROW nRow) const
void DoSubTotals(SCTAB nTab, const ScSubTotalParam &rParam, bool bRecord, bool bApi)
SC_DLLPUBLIC bool HasTable(const ScDPObject *pDPObj) const
const OUString & GetUpperName() const
void ErrorMessage(const char *pGlobStrId)
sal_uInt16 GetSortKeyCount() const
SC_DLLPUBLIC bool RemoveFlagsTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, ScMF nFlags)
void ModifyAllDBData(const ScDBCollection &rNewColl, const std::vector< ScRange > &rDelAreaList)
const ScSheetSourceDesc * GetSheetDesc() const
SC_DLLPUBLIC ScOutlineTable * GetOutlineTable(SCTAB nTab, bool bCreate=false)
static SC_DLLPUBLIC const CharClass * getCharClassPtr()
SC_DLLPUBLIC ScChartListenerCollection * GetChartListenerCollection() const
const ScDocument & GetDocument() const
SC_DLLPUBLIC void PreprocessDBDataUpdate()
SC_DLLPUBLIC void GetQueryParam(ScQueryParam &rQueryParam) const
bool TestRemoveSubTotals(SCTAB nTab, const ScSubTotalParam &rParam)
static bool isAnyEditViewInRange(const SfxViewShell *pForViewShell, bool bColumns, SCCOLROW nStart, SCCOLROW nEnd)
iterator findByUpperName2(const OUString &rName)
void SetDocumentModified()
void UpdateImport(const OUString &rTarget, const svx::ODataAccessDescriptor &rDescriptor)
void SetSubTotalParam(const ScSubTotalParam &rSubTotalParam)
SfxObjectShell * GetDocumentShell() const
void ModifyDBData(const ScDBData &rNewData)
SC_DLLPUBLIC bool GetAdvancedQuerySource(ScRange &rSource) const
bool IsUndoEnabled() const
ScTabViewShell * GetBestViewShell(bool bOnlyVisible=true)
bool MoveBlock(const ScRange &rSource, const ScAddress &rDestPos, bool bCut, bool bRecord, bool bPaint, bool bApi)
ScPositionHelper & GetLOKHeightHelper()
const ScDBData * GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, ScDBDataPortion ePortion) const
void RefreshPivotTableGroups(ScDPObject *pDPObj)
Refresh the group dimensions of all pivot tables referencing the same cache.
SC_DLLPUBLIC void DeleteAreaTab(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCTAB nTab, InsertDeleteFlags nDelFlag)
bool AddDBRange(const OUString &rName, const ScRange &rRange)
ScRange GetNewOutputRange(bool &rOverflow)
This class contains authoritative information on the internal reference used as the data source for d...
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, bool bMobile=false)
Create before modifications of the document and destroy thereafter.
SC_DLLPUBLIC void GetCellType(SCCOL nCol, SCROW nRow, SCTAB nTab, CellType &rCellType) const
void FreeTable(const ScDPObject *pDPObj)
bool CreatePivotTable(const ScDPObject &rDPObj, bool bRecord, bool bApi)