summaryrefslogtreecommitdiff
path: root/sc/source/filter/xml
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/filter/xml')
-rw-r--r--sc/source/filter/xml/XMLExportIterator.cxx5
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx5
-rw-r--r--sc/source/filter/xml/xmlfonte.cxx4
3 files changed, 7 insertions, 7 deletions
diff --git a/sc/source/filter/xml/XMLExportIterator.cxx b/sc/source/filter/xml/XMLExportIterator.cxx
index 9f9307e2acc5..f08e4ddabf18 100644
--- a/sc/source/filter/xml/XMLExportIterator.cxx
+++ b/sc/source/filter/xml/XMLExportIterator.cxx
@@ -653,8 +653,6 @@ void ScMyNotEmptyCellsIterator::SetCellData( ScMyCell& rMyCell, const table::Cel
rMyCell.bIsMatrixCovered = false;
rMyCell.bIsMatrixBase = false;
- bool bIsMatrixBase = false;
-
switch (rMyCell.maBaseCell.meType)
{
case CELLTYPE_VALUE:
@@ -672,11 +670,14 @@ void ScMyNotEmptyCellsIterator::SetCellData( ScMyCell& rMyCell, const table::Cel
}
if (rMyCell.maBaseCell.meType == CELLTYPE_FORMULA)
+ {
+ bool bIsMatrixBase = false;
if (rExport.IsMatrix(rMyCell.maCellAddress, rMyCell.aMatrixRange, bIsMatrixBase))
{
rMyCell.bIsMatrixBase = bIsMatrixBase;
rMyCell.bIsMatrixCovered = !bIsMatrixBase;
}
+ }
}
void ScMyNotEmptyCellsIterator::HasAnnotation(ScMyCell& aCell)
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index f468fca847b2..d731f23c967e 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -937,7 +937,6 @@ void ScXMLExport::ExportColumns(const sal_Int32 nTable, const table::CellRangeAd
sal_Int32 nPrevColumn(0);
bool bPrevIsVisible (true);
bool bWasHeader (false);
- bool bIsHeader (false);
bool bIsClosed (true);
sal_Int32 nPrevIndex (-1);
sal_Int32 nColumn;
@@ -947,7 +946,7 @@ void ScXMLExport::ExportColumns(const sal_Int32 nTable, const table::CellRangeAd
bool bIsVisible(true);
nIndex = pColumnStyles->GetStyleNameIndex(nTable, nColumn, bIsVisible);
- bIsHeader = bHasColumnHeader && (aColumnHeaderRange.StartColumn <= nColumn) && (nColumn <= aColumnHeaderRange.EndColumn);
+ const bool bIsHeader = bHasColumnHeader && (aColumnHeaderRange.StartColumn <= nColumn) && (nColumn <= aColumnHeaderRange.EndColumn);
if (bIsHeader != bWasHeader)
{
if (bIsHeader)
@@ -4975,10 +4974,10 @@ XMLNumberFormatAttributesExportHelper* ScXMLExport::GetNumberFormatAttributesExp
void ScXMLExport::CollectUserDefinedNamespaces(const SfxItemPool* pPool, sal_uInt16 nAttrib)
{
- const SfxPoolItem* pItem;
sal_uInt32 nItems(pPool->GetItemCount2( nAttrib ));
for( sal_uInt32 i = 0; i < nItems; ++i )
{
+ const SfxPoolItem* pItem;
if( 0 != (pItem = pPool->GetItem2( nAttrib, i ) ) )
{
const SvXMLAttrContainerItem *pUnknown(static_cast<const SvXMLAttrContainerItem *>(pItem));
diff --git a/sc/source/filter/xml/xmlfonte.cxx b/sc/source/filter/xml/xmlfonte.cxx
index 8e514e6ca8ec..a618ff399199 100644
--- a/sc/source/filter/xml/xmlfonte.cxx
+++ b/sc/source/filter/xml/xmlfonte.cxx
@@ -45,9 +45,9 @@ public:
void ScXMLFontAutoStylePool_Impl::AddFontItems(sal_uInt16* pWhichIds, sal_uInt8 nIdCount, const SfxItemPool* pItemPool, const bool bExportDefaults)
{
- const SfxPoolItem* pItem;
for( sal_uInt16 i=0; i < nIdCount; ++i )
{
+ const SfxPoolItem* pItem;
sal_uInt16 nWhichId(pWhichIds[i]);
if (bExportDefaults && (0 != (pItem = &pItemPool->GetDefaultItem(nWhichId))))
{
@@ -107,9 +107,9 @@ ScXMLFontAutoStylePool_Impl::ScXMLFontAutoStylePool_Impl(ScXMLExport& rExportP,
{
sal_uInt16 nPageWhichId(aPageWhichIds[j]);
sal_uInt32 nPageHFItems(rPagePool.GetItemCount2(nPageWhichId));
- const ScPageHFItem* pPageItem;
for (sal_uInt32 k = 0; k < nPageHFItems; ++k)
{
+ const ScPageHFItem* pPageItem;
if (0 != (pPageItem = static_cast<const ScPageHFItem*>(rPagePool.GetItem2(nPageWhichId, k))))
{
const EditTextObject* pLeftArea(pPageItem->GetLeftArea());