summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-03-27 00:30:09 +0100
committerAshod Nakashian <ashnakash@gmail.com>2016-05-22 03:33:10 +0000
commit16c3defa8ff6330e4c21ba42177d92665a67ac0b (patch)
tree9817372376fe8bcb32a223ca4b722f70054134c4
parentbccu#1800 fix bogus loops in slide animations and transitions (diff)
downloadcore-16c3defa8ff6330e4c21ba42177d92665a67ac0b.tar.gz
core-16c3defa8ff6330e4c21ba42177d92665a67ac0b.zip
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> (cherry picked from commit efea43b4c4f42023a540079866b065068ae8a8e5) Reviewed-on: https://gerrit.libreoffice.org/25280 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
-rw-r--r--sc/source/core/data/fillinfo.cxx23
1 files changed, 15 insertions, 8 deletions
diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx
index e0e2623bc7c0..b30179698d8d 100644
--- a/sc/source/core/data/fillinfo.cxx
+++ b/sc/source/core/data/fillinfo.cxx
@@ -191,6 +191,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(
@@ -308,14 +322,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,