26#include <com/sun/star/sdb/CommandType.hpp>
29#include <osl/diagnose.h>
53#include <progress.hxx>
74 std::unique_ptr<ScDBCollection> pUndoColl;
109 std::make_unique<ScUndoDBData>( &
rDocShell, std::move(pUndoColl),
110 std::make_unique<ScDBCollection>( *pDocColl ) ) );
127 if (iter != rDBs.
end())
131 std::unique_ptr<ScDBCollection> pUndoColl;
142 std::make_unique<ScUndoDBData>( &
rDocShell, std::move(pUndoColl),
143 std::make_unique<ScDBCollection>( *pDocColl ) ) );
163 if (iterOld != rDBs.
end() && !pNew)
167 std::unique_ptr<ScDBData> pNewData(
new ScDBData(rNew, **iterOld));
169 std::unique_ptr<ScDBCollection> pUndoColl(
new ScDBCollection( *pDocColl ) );
173 bool bInserted = rDBs.
insert(std::move(pNewData));
186 std::make_unique<ScUndoDBData>( &
rDocShell, std::move(pUndoColl),
187 std::make_unique<ScDBCollection>( *pDocColl ) ) );
223 pData->GetArea(aOldRange);
225 bool bAreaChanged = ( aOldRange != aNewRange );
227 std::unique_ptr<ScDBCollection> pUndoColl;
238 std::make_unique<ScUndoDBData>( &
rDocShell, std::move(pUndoColl),
239 std::make_unique<ScDBCollection>( *pDocColl ) ) );
250 std::unique_ptr<ScDBCollection> pUndoColl;
253 for (
const auto& rDelArea : rDelAreaList)
256 const ScAddress& rStart = rDelArea.aStart;
278 std::make_unique<ScUndoDBData>(&
rDocShell, std::move(pUndoColl),
279 std::make_unique<ScDBCollection>(rNewColl)));
312 bool bSort = aSortParam.
maKeyState[0].bDoSort;
318 if ( bQuery || bSort || bSubTotal )
320 bool bQuerySize =
false;
323 if (bQuery && !aQueryParam.
bInplace)
339 pDBData->
GetArea( nTab, nStartCol, nStartRow, nEndCol, nEndRow );
344 std::unique_ptr<ScOutlineTable> pUndoTab;
345 std::unique_ptr<ScRangeName> pUndoRange;
346 std::unique_ptr<ScDBCollection> pUndoDB;
363 pUndoDoc->InitUndo( rDoc, nTab, nTab,
true,
true );
365 nTab,
static_cast<SCCOL>(nOutEndCol), rDoc.
MaxRow(), nTab,
368 nTab, rDoc.
MaxCol(),
static_cast<SCROW>(nOutEndRow), nTab,
372 pUndoDoc->InitUndo( rDoc, nTab, nTab,
false,
true );
382 if (!pDocRange->
empty())
385 if (!pDocDB->
empty())
389 if (bSort && bSubTotal)
400 (void)
Sort( nTab, aSortParam,
false,
false, bApi );
407 Query( nTab, aQueryParam, &aAdvSource,
false, bApi );
409 Query( nTab, aQueryParam,
nullptr,
false, bApi );
428 pDBData->
GetArea( nDummyTab, nDummyCol,nDummyRow, nDummyCol,nNewEndRow );
445 std::make_unique<ScUndoRepeatDB>( &
rDocShell, nTab,
446 nStartCol, nStartRow, nEndCol, nEndRow,
449 nStartCol, nStartRow,
450 std::move(pUndoDoc), std::move(pUndoTab),
451 std::move(pUndoRange), std::move(pUndoDB),
467 bool bRecord,
bool bPaint,
bool bApi )
479 OSL_FAIL(
"Sort: no DBData" );
496 bool bRet = rDocFunc.
MoveBlock(aSrcRange, aDestPos,
false, bRecord, bPaint, bApi);
512 nStartingRowToEdit++;
514 nStartingColToEdit++;
516 ScEditableTester aTester( rDoc, nTab, nStartingColToEdit, nStartingRowToEdit,
533 bool bShrunk =
false;
565 aLocalParam.
nCol1 = nOverallCol1;
566 aLocalParam.
nRow1 = nOverallRow1;
567 aLocalParam.
nCol2 = nOverallCol2;
568 aLocalParam.
nRow2 = nOverallRow2;
573 && rDoc.
HasAttrib( nOverallCol1, nStartRow, nTab, nOverallCol2, nOverallRow2, nTab,
592 aLocalParam.
nRow2-nStartRow+1);
597 bool bRepeatQuery =
false;
611 rDoc.
Sort(nTab, aLocalParam, bRepeatQuery, bUpdateRefs, &aProgress, &aUndoParam);
618 std::make_unique<sc::UndoSort>(&
rDocShell, aUndoParam));
633 if (pTabViewShell && pTabViewShell->
GetDocId() == pSomeViewForThisDoc->
GetDocId())
636 pPosHelper->invalidateByIndex(nStartRow);
642 pSomeViewForThisDoc,
false ,
true ,
true ,
643 true ,
true ,
true , nTab);
646 if (nStartRow <= aLocalParam.
nRow2)
649 aLocalParam.
nCol1, nStartRow, nTab,
657 SCCOL nStartX = nOverallCol1;
658 SCROW nStartY = nOverallRow1;
659 SCCOL nEndX = nOverallCol2;
660 SCROW nEndY = nOverallRow2;
670 if (!bUniformRowHeight && nStartRow <= nOverallRow2)
679 const ScRange* pAdvSource,
bool bRecord,
bool bApi )
697 OSL_FAIL(
"Query: no DBData" );
716 Query( nTab, aOldQuery,
nullptr, bRecord, bApi );
723 bool bDoSize =
false;
724 SCCOL nFormulaCols = 0;
725 bool bKeepFmt =
false;
731 SCTAB nDestTab = nTab;
756 pDestData->
GetArea( aOldDest );
771 while ( nTestCol <= rDoc.
MaxCol() &&
780 if ( bDoSize && !rDoc.
CanFitBlock( aOldDest, aDestTotal ) )
793 bool bKeepSub =
false;
804 std::unique_ptr<ScDBCollection> pUndoDB;
812 pUndoDoc->InitUndo( rDoc, nDestTab, nDestTab,
false,
true );
814 aLocalParam.
nCol2, aLocalParam.
nRow2, nDestTab,
826 pUndoDoc->InitUndo( rDoc, nTab, nTab,
false,
true );
832 if (!pDocDB->
empty())
838 std::unique_ptr<ScDocument> pAttribDoc;
845 aAttribRange = aOldDest;
855 pAttribDoc->InitUndo( rDoc, nDestTab, nDestTab,
false,
true );
860 rDoc.
FitBlock( aOldDest, aDestTotal );
880 aLocalParam.
nCol2, aLocalParam.
nRow2, nDestTab );
881 rDoc.
FitBlock( aDestTotal, aNewDest,
false );
883 if ( nFormulaCols > 0 )
889 aLocalParam.
nCol2+nFormulaCols, aLocalParam.
nRow2, nDestTab );
892 rDoc.
FitBlock( aOldForm, aNewForm,
false );
899 nProgCount *= aLocalParam.
nRow2 - nFStartY;
901 ScResId(STR_FILL_SERIES_PROGRESS), nProgCount,
true );
903 rDoc.
Fill( aLocalParam.
nCol2+1, nFStartY,
904 aLocalParam.
nCol2+nFormulaCols, nFStartY, &aProgress, aMark,
905 aLocalParam.
nRow2 - nFStartY,
915 ScRange aHdrRange = aAttribRange;
923 for (
SCCOL nCol = aAttribRange.
aStart.
Col(); nCol<=nAttrEndCol; nCol++)
926 nCol, nAttrRow, nDestTab );
927 OSL_ENSURE(pSrcPattern,
"Pattern is 0");
931 nDestTab, *pSrcPattern );
960 pNewData = pDestData;
964 aLocalParam.
nCol2, aLocalParam.
nRow2, nDestTab ),
977 OSL_FAIL(
"Target are not available");
995 std::make_unique<ScUndoQuery>( &
rDocShell, nTab, rQueryParam, std::move(pUndoDoc), std::move(pUndoDB),
996 pOld, bDoSize, pAdvSource ) );
1014 if ( aOldDest.
aEnd.
Col() > nEndX )
1016 if ( aOldDest.
aEnd.
Row() > nEndY )
1026 ScRange(aLocalParam.
nCol1, aLocalParam.
nRow1, nDestTab, nEndX, nEndY, nDestTab),
1039 bool bRecord,
bool bApi )
1055 OSL_FAIL(
"SubTotals: no DBData" );
1081 VclMessageType::Question,
1082 VclButtonsType::YesNo,
ScResId(STR_MSSG_DOSUBTOTALS_1)));
1083 xBox->set_title(
ScResId(STR_MSSG_DOSUBTOTALS_0));
1096 std::unique_ptr<ScOutlineTable> pUndoTab;
1097 std::unique_ptr<ScRangeName> pUndoRange;
1098 std::unique_ptr<ScDBCollection> pUndoDB;
1102 bool bOldFilter = bDo && rParam.
bDoSort;
1117 pUndoDoc->InitUndo( rDoc, nTab, nTab,
true,
true );
1122 pUndoDoc->InitUndo( rDoc, nTab, nTab,
false, bOldFilter );
1134 if (!pDocRange->
empty())
1137 if (!pDocDB->
empty())
1144 pOut->GetRowArray().RemoveAll();
1148 bool bSuccess =
true;
1162 Sort( nTab, aSortParam,
false,
false, bApi );
1170 rDoc.
SetDirty( aDirtyRange,
true );
1176 std::make_unique<ScUndoSubTotals>( &
rDocShell, nTab,
1177 rParam, aNewParam.
nRow2,
1178 std::move(pUndoDoc), std::move(pUndoTab),
1179 std::move(pUndoRange), std::move(pUndoDB) ) );
1204 for (
bool bHasCell = aIter.first(); bHasCell; bHasCell = aIter.next())
1206 if (!aIter.isEmpty())
1208 if (!rExcept.
Contains(aIter.GetPos()))
1228 for (
size_t i = 0, n = rRanges.
size(); i < n; ++i)
1232 if (!aTester.IsEditable())
1248 pUndoDoc->InitUndo(rDoc, nTab, nTab);
1256 bool bOverflow =
false;
1283 if (!aTester.IsEditable())
1298 bool bRecord,
bool bApi,
bool bAllowMove )
1311 if (pOldObj == pNewObj)
1314 OSL_ASSERT(pOldObj && pNewObj && pOldObj != pNewObj);
1322 if (!isEditable(
rDocShell, aRanges, bApi))
1335 createUndoDoc(pOldUndoDoc, rDoc, pOldObj->
GetOutRange());
1340 OSL_ENSURE(
pData,
"no SaveData from living DPObject" );
1350 if (pOldObj->
GetName().isEmpty())
1354 if (!checkNewOutputRange(*pOldObj,
rDocShell, aNewOut, bApi))
1356 *pOldObj = aUndoDPObj;
1364 if (!lcl_EmptyExcept(rDoc, aNewOut, pOldObj->
GetOutRange()))
1367 VclMessageType::Question, VclButtonsType::YesNo,
1368 ScResId(STR_PIVOT_NOTEMPTY)));
1369 xQueryBox->set_default_response(
RET_YES);
1370 if (xQueryBox->run() ==
RET_NO)
1373 *pOldObj = aUndoDPObj;
1380 createUndoDoc(pNewUndoDoc, rDoc, aNewOut);
1388 std::make_unique<ScUndoDataPilot>(
1389 &
rDocShell, std::move(pOldUndoDoc), std::move(pNewUndoDoc), &aUndoDPObj, pOldObj, bAllowMove));
1412 std::vector<SdrOle2Obj*> aListOfObjects =
1417 if (pModel && !aListOfObjects.empty())
1420 VclMessageType::Question, VclButtonsType::YesNo,
1421 ScResId(STR_PIVOT_REMOVE_PIVOTCHART)));
1422 xQueryBox->set_default_response(
RET_YES);
1423 if (xQueryBox->run() ==
RET_NO)
1429 for (
SdrOle2Obj* pChartObject : aListOfObjects)
1432 pModel->
AddUndo(std::make_unique<SdrUndoDelObj>(*pChartObject));
1433 pChartObject->getSdrPageFromSdrObject()->RemoveObject(pChartObject->GetOrdNum());
1440 std::unique_ptr<ScDPObject> pUndoDPObj;
1454 createUndoDoc(pOldUndoDoc, rDoc, aRange);
1471 std::make_unique<ScUndoDataPilot>(
1472 &
rDocShell, std::move(pOldUndoDoc),
nullptr, pUndoDPObj.get(),
nullptr,
false));
1497 std::unique_ptr<ScDPObject> pDestObj(
new ScDPObject(rDPObj));
1526 if (rDestObj.
GetName().isEmpty())
1529 bool bOverflow =
false;
1562 VclMessageType::Question, VclButtonsType::YesNo,
1563 ScResId(STR_PIVOT_NOTEMPTY)));
1564 xQueryBox->set_default_response(
RET_YES);
1565 if (xQueryBox->run() ==
RET_NO)
1574 createUndoDoc(pNewUndoDoc, rDoc, aNewOut);
1582 std::make_unique<ScUndoDataPilot>(&
rDocShell,
nullptr, std::move(pNewUndoDoc),
nullptr, &rDestObj,
false));
1610 createUndoDoc(pOldUndoDoc, rDoc, rDPObj.
GetOutRange());
1620 if (rDPObj.
GetName().isEmpty())
1624 if (!checkNewOutputRange(rDPObj,
rDocShell, aNewOut, bApi))
1626 rDPObj = aUndoDPObj;
1633 if (!lcl_EmptyExcept(rDoc, aNewOut, rDPObj.
GetOutRange()))
1636 VclMessageType::Question, VclButtonsType::YesNo,
1637 ScResId(STR_PIVOT_NOTEMPTY)));
1638 xQueryBox->set_default_response(
RET_YES);
1639 if (xQueryBox->run() ==
RET_NO)
1641 rDPObj = aUndoDPObj;
1648 createUndoDoc(pNewUndoDoc, rDoc, aNewOut);
1656 std::make_unique<ScUndoDataPilot>(
1657 &
rDocShell, std::move(pOldUndoDoc), std::move(pNewUndoDoc), &aUndoDPObj, &rDPObj,
false));
1715 pSaveData = pObj->GetSaveData();
1737 VclMessageType::Info, VclButtonsType::Ok,
1738 ScResId(STR_TARGETNOTFOUND)));
1746 pData->GetArea( nTab, nDummyCol,nDummyRow,nDummyCol,nDummyRow );
1749 pData->GetImportParam( aImportParam );
1753 sal_Int32 nCommandType = 0;
1758 aImportParam.
aDBName = sDBName;
1759 aImportParam.
bSql = ( nCommandType == sdb::CommandType::COMMAND );
1765 bool bContinue =
DoImport( nTab, aImportParam, &rDescriptor );
1774 pData->GetArea(aRange);
1781 if (
pData->HasQueryParam() ||
pData->HasSortParam() ||
pData->HasSubTotalParam() )
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 ...
SfxApplication * SfxGetpApp()
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
void IncRow(SCROW nDelta=1)
Walk through all cells in an area.
void removeByName(const OUString &rName)
bool has(const ScDBData *p) const
Stores global named database ranges.
iterator erase(const iterator &itr)
bool insert(std::unique_ptr< ScDBData > p)
Takes ownership of p and attempts to insert it into the collection.
iterator findByUpperName2(const OUString &rName)
ScDBData * findByUpperName(const OUString &rName)
SC_DLLPUBLIC bool HasQueryParam() const
const OUString & GetName() const
void GetArea(SCTAB &rTab, SCCOL &rCol1, SCROW &rRow1, SCCOL &rCol2, SCROW &rRow2) const
SC_DLLPUBLIC bool GetAdvancedQuerySource(ScRange &rSource) const
void CalcSaveFilteredCount(SCSIZE nNonFilteredRowCount)
const OUString & GetUpperName() const
void SetSubTotalParam(const ScSubTotalParam &rSubTotalParam)
SC_DLLPUBLIC void SetAdvancedQuerySource(const ScRange *pSource)
SC_DLLPUBLIC void GetSortParam(ScSortParam &rSortParam) const
void SetHeader(bool bHasH)
SC_DLLPUBLIC void SetSortParam(const ScSortParam &rSortParam)
void UpdateFromSortParam(const ScSortParam &rSortParam)
Remember some more settings of ScSortParam, only to be called at anonymous DB ranges as it at least o...
SC_DLLPUBLIC void GetQueryParam(ScQueryParam &rQueryParam) const
SC_DLLPUBLIC void SetQueryParam(const ScQueryParam &rQueryParam)
void GetSubTotalParam(ScSubTotalParam &rSubTotalParam) const
void SetArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
bool RenameDBRange(const OUString &rOld, const OUString &rNew)
bool RemovePivotTable(const ScDPObject &rDPObj, bool bRecord, bool bApi)
bool AddDBRange(const OUString &rName, const ScRange &rRange)
void ModifyDBData(const ScDBData &rNewData)
void RefreshPivotTables(const ScDPObject *pDPObj, bool bApi)
Reload the referenced pivot cache, and refresh all pivot tables that reference the cache.
bool UpdatePivotTable(ScDPObject &rDPObj, bool bRecord, bool bApi)
SC_DLLPUBLIC bool Sort(SCTAB nTab, const ScSortParam &rSortParam, bool bRecord, bool bPaint, bool bApi)
SC_DLLPUBLIC bool Query(SCTAB nTab, const ScQueryParam &rQueryParam, const ScRange *pAdvSource, bool bRecord, bool bApi)
bool DeleteDBRange(const OUString &rName)
void DoSubTotals(SCTAB nTab, const ScSubTotalParam &rParam, bool bRecord, bool bApi)
void UpdateImport(const OUString &rTarget, const svx::ODataAccessDescriptor &rDescriptor)
bool RepeatDB(const OUString &rDBName, bool bApi, bool bIsUnnamed, SCTAB aTab=0)
bool DoImport(SCTAB nTab, const ScImportParam &rParam, const svx::ODataAccessDescriptor *pDescriptor)
bool DataPilotUpdate(ScDPObject *pOldObj, const ScDPObject *pNewObj, bool bRecord, bool bApi, bool bAllowMove=false)
void RefreshPivotTableGroups(ScDPObject *pDPObj)
Refresh the group dimensions of all pivot tables referencing the same cache.
bool CreatePivotTable(const ScDPObject &rDPObj, bool bRecord, bool bApi)
void ModifyAllDBData(const ScDBCollection &rNewColl, const std::vector< ScRange > &rDelAreaList)
void OnLOKShowHideColRow(bool bColumns, SCCOLROW nStartRow)
void RepeatDB(bool bRecord=true)
SC_DLLPUBLIC ScDPObject * InsertNewTable(std::unique_ptr< ScDPObject > pDPObj)
void FreeTable(const ScDPObject *pDPObj)
ScDPObject * GetByName(std::u16string_view rName) const
TranslateId ReloadCache(const ScDPObject *pDPObj, o3tl::sorted_vector< ScDPObject * > &rRefs)
OUString CreateNewName() const
Create a new name that's not yet used by any existing data pilot objects.
SC_DLLPUBLIC bool GetReferenceGroups(const ScDPObject &rDPObj, const ScDPDimensionSaveData **pGroups) const
bool ReloadGroupsInCache(const ScDPObject *pDPObj, o3tl::sorted_vector< ScDPObject * > &rRefs)
SC_DLLPUBLIC bool HasTable(const ScDPObject *pDPObj) const
This class has to do with handling exclusively grouped dimensions? TODO: Find out what this class doe...
const ScRange & GetOutRange() const
bool SyncAllDimensionMembers()
Remove in the save data entries for members that don't exist anymore.
void SetName(const OUString &rNew)
ScRange GetNewOutputRange(bool &rOverflow)
void SetSaveData(const ScDPSaveData &rData)
void SetAllowMove(bool bSet)
void Output(const ScAddress &rPos)
const ScSheetSourceDesc * GetSheetDesc() const
void ReloadGroupTableData()
ScDPSaveData * GetSaveData() const
const OUString & GetName() const
void WriteSourceDataTo(ScDPObject &rDest) const
const ScDPDimensionSaveData * GetExistingDimensionData() const
SC_DLLPUBLIC void SetDimensionData(const ScDPDimensionSaveData *pNew)
bool MoveBlock(const ScRange &rSource, const ScAddress &rDestPos, bool bCut, bool bRecord, bool bPaint, bool bApi)
Create before modifications of the document and destroy thereafter.
void SetDocumentModified()
static weld::Window * GetActiveDialogParent()
void ErrorMessage(TranslateId pGlobStrId)
const ScDocument & GetDocument() const
ScTabViewShell * GetBestViewShell(bool bOnlyVisible=true)
ScDBData * GetDBData(const ScRange &rMarked, ScGetDBMode eMode, ScGetDBSelection eSel)
void PostPaint(SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, PaintPartFlags nPart, sal_uInt16 nExtFlags=0)
void DBAreaDeleted(SCTAB nTab, SCCOL nX1, SCROW nY1, SCCOL nX2)
bool AdjustRowHeight(SCROW nStartRow, SCROW nEndRow, SCTAB nTab)
merge with docfunc
virtual SfxUndoManager * GetUndoManager() override
void RefreshPivotTables(const ScRange &rSource)
SC_DLLPUBLIC bool RemoveFlagsTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, ScMF nFlags)
ScSheetLimits & GetSheetLimits() const
bool ValidRow(SCROW nRow) const
void UpdatePageBreaks(SCTAB nTab, const ScRange *pUserArea=nullptr)
SC_DLLPUBLIC void Fill(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScProgress *pProgress, const ScMarkData &rMark, sal_uInt64 nFillCount, FillDir eFillDir=FILL_TO_BOTTOM, FillCmd eFillCmd=FILL_LINEAR, FillDateCmd eFillDateCmd=FILL_DAY, double nStepValue=1.0, double nMaxValue=1E307)
SC_DLLPUBLIC void CompileHybridFormula()
Call this immediately after updating named ranges.
void RemoveSubTotals(SCTAB nTab, ScSubTotalParam &rParam)
void InvalidatePageBreaks(SCTAB nTab)
SC_DLLPUBLIC SCCOL MaxCol() const
const ScDBData * GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, ScDBDataPortion ePortion) const
bool HasUniformRowHeight(SCTAB nTab, SCROW nRow1, SCROW nRow2) const
SC_DLLPUBLIC void ApplyPatternAreaTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, const ScPatternAttr &rAttr)
SC_DLLPUBLIC SCROW MaxRow() const
SC_DLLPUBLIC ScChartListenerCollection * GetChartListenerCollection() const
bool DoSubTotals(SCTAB nTab, ScSubTotalParam &rParam)
SC_DLLPUBLIC const ScDBData * GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const
SC_DLLPUBLIC void PreprocessDBDataUpdate()
bool ShrinkToUsedDataArea(bool &o_bShrunk, SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow, SCCOL &rEndCol, SCROW &rEndRow, bool bColumnsOnly, bool bStickyTopRow=false, bool bStickyLeftCol=false, ScDataAreaExtras *pDataAreaExtras=nullptr) const
Shrink a range to only include used data area.
void SetSubTotalCellsDirty(const ScRange &rDirtyRange)
SC_DLLPUBLIC void SetDrawPageSize(SCTAB nTab)
SC_DLLPUBLIC ScDrawLayer * GetDrawLayer()
SC_DLLPUBLIC bool HasAttrib(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, HasAttrFlags nMask) const
void UpdateScriptTypes(const ScAddress &rPos, SCCOL nColSize, SCROW nRowSize)
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)
SC_DLLPUBLIC ScDBCollection * GetDBCollection() const
void FitBlock(const ScRange &rOld, const ScRange &rNew, bool bClear=true)
SfxObjectShell * GetDocumentShell() const
SC_DLLPUBLIC ScOutlineTable * GetOutlineTable(SCTAB nTab, bool bCreate=false)
SCSIZE Query(SCTAB nTab, const ScQueryParam &rQueryParam, bool bKeepSub)
bool TestRemoveSubTotals(SCTAB nTab, const ScSubTotalParam &rParam)
SC_DLLPUBLIC ScRangeName * GetRangeName(SCTAB nTab) const
SC_DLLPUBLIC bool HasHiddenRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
SC_DLLPUBLIC void DeleteAreaTab(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCTAB nTab, InsertDeleteFlags nDelFlag)
void SetDBCollection(std::unique_ptr< ScDBCollection > pNewDBCollection, bool bRemoveAutoFilter=false)
ScChangeTrack * GetChangeTrack() const
SC_DLLPUBLIC CellType GetCellType(SCCOL nCol, SCROW nRow, SCTAB nTab) const
bool IsBlockEmpty(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab) const
SC_DLLPUBLIC ScDBData * GetAnonymousDBData(SCTAB nTab)
SC_DLLPUBLIC void ApplyStyleAreaTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, const ScStyleSheet &rStyle)
bool IsUndoEnabled() const
void SetDirty(const ScRange &, bool bIncludeEmptyCells)
bool CanFitBlock(const ScRange &rOld, const ScRange &rNew)
SC_DLLPUBLIC ScDPCollection * GetDPCollection()
void Sort(SCTAB nTab, const ScSortParam &rSortParam, bool bKeepQuery, bool bUpdateRefs, ScProgress *pProgress, sc::ReorderParam *pUndo)
Sort a range of data.
SC_DLLPUBLIC void SetAnonymousDBData(SCTAB nTab, std::unique_ptr< ScDBData > pDBData)
bool IsImportingXML() const
void BroadcastUno(const SfxHint &rHint)
SC_DLLPUBLIC SCTAB GetTableCount() const
bool ValidColRow(SCCOL nCol, SCROW nRow) const
TranslateId GetMessageId() const
static SC_DLLPUBLIC const CharClass & getCharClass()
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
void SelectOneTable(SCTAB nTab)
void GetRange(SCCOLROW &rStart, SCCOLROW &rEnd) const
const ScOutlineArray & GetColArray() const
const ScOutlineArray & GetRowArray() const
const ScStyleSheet * GetStyleSheet() const
void push_back(const ScRange &rRange)
bool Intersects(const ScRange &rRange) const
bool Contains(const ScAddress &) const
is Address& fully in Range?
This class contains authoritative information on the internal reference used as the data source for d...
SC_DLLPUBLIC const ScRange & GetSourceRange() const
Get the range that contains the source data.
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...
static bool isAnyEditViewInRange(const SfxViewShell *pForViewShell, bool bColumns, SCCOLROW nStart, SCCOLROW nEnd)
void MarkRange(const ScRange &rRange, bool bSetCursor=true, bool bContinue=false)
ScViewData & GetViewData()
ScPositionHelper & GetLOKHeightHelper()
void AddUndo(std::unique_ptr< SdrUndoAction > pUndo)
virtual void AddUndoAction(std::unique_ptr< SfxUndoAction > pAction, bool bTryMerg=false)
ViewShellDocId GetDocId() const override
static SAL_WARN_UNUSED_RESULT SfxViewShell * GetNext(const SfxViewShell &rPrev, bool bOnlyVisible=true, const std::function< bool(const SfxViewShell *)> &isViewShell=nullptr)
static SAL_WARN_UNUSED_RESULT SfxViewShell * GetFirst(bool bOnlyVisible=true, const std::function< bool(const SfxViewShell *)> &isViewShell=nullptr)
OUString getDataSource() const
@ TOP_LEFT
top left cell of area
std::unique_ptr< ScDocument, o3tl::default_delete< ScDocument > > ScDocumentUniquePtr
@ ATTRIB
Internal use only (d&d undo): do not delete caption objects of cell notes.
@ ForceMark
Behave as if the range corresponding to a ScDBData area was selected, for API use.
@ SC_DB_MAKE
create "untitled" (if necessary)
constexpr OUStringLiteral STR_DB_LOCAL_NONAME
std::unique_ptr< sal_Int32[]> pData
OUString ScResId(TranslateId aId)
SC_DLLPUBLIC const ScQueryEntry & GetEntry(SCSIZE n) const
SC_DLLPUBLIC SCSIZE GetEntryCount() const
::std::vector< ScSortKeyState > maKeyState
ScDataAreaExtras aDataAreaExtras
sal_uInt16 GetSortKeyCount() const
bool bGroupActive[MAXSUBTOTAL]
active groups
bool bReplace
replace existing results
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW