summaryrefslogtreecommitdiff
path: root/sc/source/core/tool/scmatrix.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/tool/scmatrix.cxx')
-rw-r--r--sc/source/core/tool/scmatrix.cxx23
1 files changed, 19 insertions, 4 deletions
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index 4402002593f6..998f56203be7 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -254,6 +254,7 @@ public:
bool IsString( SCSIZE nC, SCSIZE nR ) const;
bool IsEmpty( SCSIZE nC, SCSIZE nR ) const;
bool IsEmptyCell( SCSIZE nC, SCSIZE nR ) const;
+ bool IsEmptyResult( SCSIZE nC, SCSIZE nR ) const;
bool IsEmptyPath( SCSIZE nC, SCSIZE nR ) const;
bool IsValue( SCSIZE nIndex ) const;
bool IsValue( SCSIZE nC, SCSIZE nR ) const;
@@ -684,8 +685,8 @@ bool ScMatrixImpl::IsString( SCSIZE nC, SCSIZE nR ) const
bool ScMatrixImpl::IsEmpty( SCSIZE nC, SCSIZE nR ) const
{
- // Flag must indicate an empty element instead of an
- // 'empty path' element.
+ // Flag must indicate an 'empty' or 'empty cell' or 'empty result' element,
+ // but not an 'empty path' element.
ValidColRowReplicated( nC, nR );
return maMat.get_type(nR, nC) == mdds::mtm::element_empty &&
maMatFlag.get<TMatFlag>(nR, nC) != SC_MATFLAG_EMPTYPATH;
@@ -693,13 +694,22 @@ bool ScMatrixImpl::IsEmpty( SCSIZE nC, SCSIZE nR ) const
bool ScMatrixImpl::IsEmptyCell( SCSIZE nC, SCSIZE nR ) const
{
- // Flag must indicate an 'empty' element instead of an
- // 'empty result' or 'empty path' element.
+ // Flag must indicate an 'empty cell' element instead of an
+ // 'empty' or 'empty result' or 'empty path' element.
ValidColRowReplicated( nC, nR );
return maMat.get_type(nR, nC) == mdds::mtm::element_empty &&
maMatFlag.get<TMatFlag>(nR, nC) == SC_MATFLAG_EMPTYCELL;
}
+bool ScMatrixImpl::IsEmptyResult( SCSIZE nC, SCSIZE nR ) const
+{
+ // Flag must indicate an 'empty result' element instead of an
+ // 'empty' or 'empty cell' or 'empty path' element.
+ ValidColRowReplicated( nC, nR );
+ return maMat.get_type(nR, nC) == mdds::mtm::element_empty &&
+ maMatFlag.get<TMatFlag>(nR, nC) == SC_MATFLAG_EMPTYRESULT;
+}
+
bool ScMatrixImpl::IsEmptyPath( SCSIZE nC, SCSIZE nR ) const
{
// Flag must indicate an 'empty path' element.
@@ -2324,6 +2334,11 @@ bool ScMatrix::IsEmptyCell( SCSIZE nC, SCSIZE nR ) const
return pImpl->IsEmptyCell(nC, nR);
}
+bool ScMatrix::IsEmptyResult( SCSIZE nC, SCSIZE nR ) const
+{
+ return pImpl->IsEmptyResult(nC, nR);
+}
+
bool ScMatrix::IsEmptyPath( SCSIZE nC, SCSIZE nR ) const
{
return pImpl->IsEmptyPath(nC, nR);