sc/source/core/data/fillinfo.cxx | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-)
New commits: commit efea43b4c4f42023a540079866b065068ae8a8e5 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Sun Mar 27 00:30:09 2016 +0100 extract function from ScDocument::FillInfo A first step in breaking the function into smaller pieces. Change-Id: I94aeb11fd9c44a7eaa198cb39f208b574ef2758d Reviewed-on: https://gerrit.libreoffice.org/23548 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx index eb671bf..eeadec1 100644 --- a/sc/source/core/data/fillinfo.cxx +++ b/sc/source/core/data/fillinfo.cxx @@ -195,6 +195,20 @@ public: } }; +bool isRotateItemUsed(ScDocumentPool *pPool) +{ + sal_uInt32 nRotCount = pPool->GetItemCount2( ATTR_ROTATE_VALUE ); + for (sal_uInt32 nItem=0; nItem<nRotCount; nItem++) + { + if (pPool->GetItem2( ATTR_ROTATE_VALUE, nItem )) + { + return true; + } + } + + return false; +} + } void ScDocument::FillInfo( @@ -312,14 +326,7 @@ void ScDocument::FillInfo( // Rotated text... // Is Attribute really used in document? - bool bAnyItem = false; - sal_uInt32 nRotCount = pPool->GetItemCount2( ATTR_ROTATE_VALUE ); - for (sal_uInt32 nItem=0; nItem<nRotCount; nItem++) - if (pPool->GetItem2( ATTR_ROTATE_VALUE, nItem )) - { - bAnyItem = true; - break; - } + bool bAnyItem = isRotateItemUsed(pPool); SCCOL nRotMax = nCol2; if ( bAnyItem && HasAttrib( 0,nRow1,nTab, MAXCOL,nRow2+1,nTab, _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits