diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-03-27 00:30:09 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-03-27 12:52:30 +0000 |
commit | efea43b4c4f42023a540079866b065068ae8a8e5 (patch) | |
tree | 1c86b413ce611c8d2381e65d52fbe53ec1509e9b /sc | |
parent | c90f1f339330644ec34c76247b5c299a18d318b4 (diff) |
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 <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/fillinfo.cxx | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx index eb671bfa8be8..eeadec1e9254 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, |