diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-05-26 13:20:47 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-06-02 10:55:23 +0200 |
commit | 30391deaf6e1726450378bbe5d320bfbbd213abf (patch) | |
tree | e88f5aa782b897150f7f451750ed906041bbad91 /sc/source/ui/uitest/uiobject.cxx | |
parent | 730e6fa063fccbd12913362dd5d3c74ea14957be (diff) |
uitest: sc: check whether current row/column/table has data
Since 41b991ea0cf3f8ce36cbdbf16b9c2c6d2bb16b5d
"tdf#153709 Adapt message for Delete Sheet"
when a sheet with no data is deleted the confirmation
dialog is not prompted anymore.
Adding this so the code in dev-tools/uitest/mass-testing
can make use of it
Change-Id: I5b9846982cffeb11d6bcded691255b96a98f5a11
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152303
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc/source/ui/uitest/uiobject.cxx')
-rw-r--r-- | sc/source/ui/uitest/uiobject.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sc/source/ui/uitest/uiobject.cxx b/sc/source/ui/uitest/uiobject.cxx index e0671110fecc..e38035b2fca9 100644 --- a/sc/source/ui/uitest/uiobject.cxx +++ b/sc/source/ui/uitest/uiobject.cxx @@ -89,6 +89,16 @@ StringMap ScGridWinUIObject::get_state() aMap["CurrentCellCommentText"] = pNote->GetText(); } + SCCOL nCol; + SCROW nRow; + aMap["CurrentTableHasData"] = OUString::boolean( rDoc.GetDataStart( mxGridWindow->getViewData().GetTabNo(), nCol, nRow ) ); + nCol = mxGridWindow->getViewData().GetCurX(); + nRow = 0; + aMap["CurrentColumnHasData"] = OUString::boolean( rDoc.GetPrintAreaVer( mxGridWindow->getViewData().GetTabNo(), nCol, nCol, nRow, true ) ); + nRow = mxGridWindow->getViewData().GetCurY(); + nCol = 0; + aMap["CurrentRowHasData"] = OUString::boolean( rDoc.GetPrintAreaHor( mxGridWindow->getViewData().GetTabNo(), nRow, nRow, nCol ) ); + ScAppOptions aOpt = SC_MOD()->GetAppOptions(); aMap["Zoom"] = OUString::number( aOpt.GetZoom() ); return aMap; |