[Libreoffice-commits] core.git: 2 commits - formula/source
Tor Lillqvist
tml at collabora.com
Wed Jun 14 11:11:17 UTC 2017
formula/source/core/api/token.cxx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 4e81314953c800c545ca73599fd3e49f60dd7ec8
Author: Tor Lillqvist <tml at collabora.com>
Date: Wed Jun 14 13:49:16 2017 +0300
Avoid use of FormulaTokenArray::First() and Next() in another place
Change-Id: I26147e53bad5f2b489a91eaa225196bb490bad27
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx
index a1bdcf731f3d..a11cc1adf023 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -1435,9 +1435,9 @@ bool FormulaTokenArray::NeedsPodfRewrite( const MissingConventionODF & rConv )
bool FormulaTokenArray::NeedsOoxmlRewrite()
{
- for ( FormulaToken *pCur = First(); pCur; pCur = Next() )
+ for ( int i = 0; i < nLen; ++i )
{
- if ( MissingConventionOOXML::isRewriteNeeded( pCur->GetOpCode()))
+ if ( MissingConventionOOXML::isRewriteNeeded( pCode[i]->GetOpCode()))
return true;
}
return false;
commit a0a72ba3d7220843efddaba5b60af8a4618fbe6f
Author: Tor Lillqvist <tml at collabora.com>
Date: Wed Jun 14 13:19:17 2017 +0300
Avoid use of FormulaTokenArray::First() and Next() in one place
Change-Id: I941c3dba2c51eb9419cfb117b02cab9617906bac
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx
index a451e2a6c107..a1bdcf731f3d 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -1425,9 +1425,9 @@ bool FormulaMissingContext::AddMissing( FormulaTokenArray *pNewArr, const Missin
bool FormulaTokenArray::NeedsPodfRewrite( const MissingConventionODF & rConv )
{
- for ( FormulaToken *pCur = First(); pCur; pCur = Next() )
+ for ( int i = 0; i < nLen; ++i )
{
- if ( rConv.isRewriteNeeded( pCur->GetOpCode()))
+ if ( rConv.isRewriteNeeded( pCode[i]->GetOpCode()))
return true;
}
return false;
More information about the Libreoffice-commits
mailing list