Prefix variable nMaxFieldIndex
Prefix variable nMaxFieldIndex with m_ to show it's a data member of the class. Change-Id: I207b3552f460b3433af6892abb6c4693e990d7bb Reviewed-on: https://gerrit.libreoffice.org/68887 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
This commit is contained in:
@@ -65,7 +65,7 @@ public:
|
|||||||
CPPUNIT_TEST_SUITE_END();
|
CPPUNIT_TEST_SUITE_END();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const int nMaxFieldIndex = 6;
|
static const int m_nMaxFieldIndex = 6;
|
||||||
uno::Reference<lang::XComponent> m_xComponent;
|
uno::Reference<lang::XComponent> m_xComponent;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -78,7 +78,7 @@ ScDataPilotFieldGroupItemObj::ScDataPilotFieldGroupItemObj()
|
|||||||
|
|
||||||
uno::Reference<uno::XInterface> ScDataPilotFieldGroupItemObj::init()
|
uno::Reference<uno::XInterface> ScDataPilotFieldGroupItemObj::init()
|
||||||
{
|
{
|
||||||
table::CellRangeAddress aCellRangeAddress(0, 1, 0, nMaxFieldIndex - 1, nMaxFieldIndex - 1);
|
table::CellRangeAddress aCellRangeAddress(0, 1, 0, m_nMaxFieldIndex - 1, m_nMaxFieldIndex - 1);
|
||||||
table::CellAddress aCellAddress(0, 7, 8);
|
table::CellAddress aCellAddress(0, 7, 8);
|
||||||
|
|
||||||
uno::Reference<sheet::XSpreadsheetDocument> xDoc(m_xComponent, uno::UNO_QUERY_THROW);
|
uno::Reference<sheet::XSpreadsheetDocument> xDoc(m_xComponent, uno::UNO_QUERY_THROW);
|
||||||
@@ -89,7 +89,7 @@ uno::Reference<uno::XInterface> ScDataPilotFieldGroupItemObj::init()
|
|||||||
uno::Reference<sheet::XSpreadsheet> xSheet0(xIA->getByIndex(0), uno::UNO_QUERY_THROW);
|
uno::Reference<sheet::XSpreadsheet> xSheet0(xIA->getByIndex(0), uno::UNO_QUERY_THROW);
|
||||||
uno::Reference<sheet::XSpreadsheet> xSheet1(xIA->getByIndex(1), uno::UNO_QUERY_THROW);
|
uno::Reference<sheet::XSpreadsheet> xSheet1(xIA->getByIndex(1), uno::UNO_QUERY_THROW);
|
||||||
|
|
||||||
for (auto i = 1; i < nMaxFieldIndex; ++i)
|
for (auto i = 1; i < m_nMaxFieldIndex; ++i)
|
||||||
{
|
{
|
||||||
xSheet0->getCellByPosition(i, 0)->setFormula("Col" + OUString::number(i));
|
xSheet0->getCellByPosition(i, 0)->setFormula("Col" + OUString::number(i));
|
||||||
xSheet0->getCellByPosition(0, i)->setFormula("Row" + OUString::number(i));
|
xSheet0->getCellByPosition(0, i)->setFormula("Row" + OUString::number(i));
|
||||||
@@ -97,9 +97,9 @@ uno::Reference<uno::XInterface> ScDataPilotFieldGroupItemObj::init()
|
|||||||
xSheet1->getCellByPosition(0, i)->setFormula("Row" + OUString::number(i));
|
xSheet1->getCellByPosition(0, i)->setFormula("Row" + OUString::number(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto i = 1; i < nMaxFieldIndex; ++i)
|
for (auto i = 1; i < m_nMaxFieldIndex; ++i)
|
||||||
{
|
{
|
||||||
for (auto j = 1; j < nMaxFieldIndex; ++j)
|
for (auto j = 1; j < m_nMaxFieldIndex; ++j)
|
||||||
{
|
{
|
||||||
xSheet0->getCellByPosition(i, j)->setValue(i * (j + 1));
|
xSheet0->getCellByPosition(i, j)->setValue(i * (j + 1));
|
||||||
xSheet1->getCellByPosition(i, j)->setValue(i * (j + 2));
|
xSheet1->getCellByPosition(i, j)->setValue(i * (j + 2));
|
||||||
|
@@ -92,7 +92,7 @@ public:
|
|||||||
CPPUNIT_TEST_SUITE_END();
|
CPPUNIT_TEST_SUITE_END();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const int nMaxFieldIndex = 6;
|
static const int m_nMaxFieldIndex = 6;
|
||||||
uno::Reference<lang::XComponent> m_xComponent;
|
uno::Reference<lang::XComponent> m_xComponent;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -108,7 +108,7 @@ ScDataPilotFieldGroupsObj::ScDataPilotFieldGroupsObj()
|
|||||||
|
|
||||||
uno::Reference<uno::XInterface> ScDataPilotFieldGroupsObj::init()
|
uno::Reference<uno::XInterface> ScDataPilotFieldGroupsObj::init()
|
||||||
{
|
{
|
||||||
table::CellRangeAddress aCellRangeAddress(0, 1, 0, nMaxFieldIndex - 1, nMaxFieldIndex - 1);
|
table::CellRangeAddress aCellRangeAddress(0, 1, 0, m_nMaxFieldIndex - 1, m_nMaxFieldIndex - 1);
|
||||||
table::CellAddress aCellAddress(0, 7, 8);
|
table::CellAddress aCellAddress(0, 7, 8);
|
||||||
|
|
||||||
uno::Reference<sheet::XSpreadsheetDocument> xDoc(m_xComponent, uno::UNO_QUERY_THROW);
|
uno::Reference<sheet::XSpreadsheetDocument> xDoc(m_xComponent, uno::UNO_QUERY_THROW);
|
||||||
@@ -119,7 +119,7 @@ uno::Reference<uno::XInterface> ScDataPilotFieldGroupsObj::init()
|
|||||||
uno::Reference<sheet::XSpreadsheet> xSheet0(xIA->getByIndex(0), uno::UNO_QUERY_THROW);
|
uno::Reference<sheet::XSpreadsheet> xSheet0(xIA->getByIndex(0), uno::UNO_QUERY_THROW);
|
||||||
uno::Reference<sheet::XSpreadsheet> xSheet1(xIA->getByIndex(1), uno::UNO_QUERY_THROW);
|
uno::Reference<sheet::XSpreadsheet> xSheet1(xIA->getByIndex(1), uno::UNO_QUERY_THROW);
|
||||||
|
|
||||||
for (auto i = 1; i < nMaxFieldIndex; ++i)
|
for (auto i = 1; i < m_nMaxFieldIndex; ++i)
|
||||||
{
|
{
|
||||||
xSheet0->getCellByPosition(i, 0)->setFormula("Col" + OUString::number(i));
|
xSheet0->getCellByPosition(i, 0)->setFormula("Col" + OUString::number(i));
|
||||||
xSheet0->getCellByPosition(0, i)->setFormula("Row" + OUString::number(i));
|
xSheet0->getCellByPosition(0, i)->setFormula("Row" + OUString::number(i));
|
||||||
@@ -127,9 +127,9 @@ uno::Reference<uno::XInterface> ScDataPilotFieldGroupsObj::init()
|
|||||||
xSheet1->getCellByPosition(0, i)->setFormula("Row" + OUString::number(i));
|
xSheet1->getCellByPosition(0, i)->setFormula("Row" + OUString::number(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto i = 1; i < nMaxFieldIndex; ++i)
|
for (auto i = 1; i < m_nMaxFieldIndex; ++i)
|
||||||
{
|
{
|
||||||
for (auto j = 1; j < nMaxFieldIndex; ++j)
|
for (auto j = 1; j < m_nMaxFieldIndex; ++j)
|
||||||
{
|
{
|
||||||
xSheet0->getCellByPosition(i, j)->setValue(i * (j + 1));
|
xSheet0->getCellByPosition(i, j)->setValue(i * (j + 1));
|
||||||
xSheet1->getCellByPosition(i, j)->setValue(i * (j + 2));
|
xSheet1->getCellByPosition(i, j)->setValue(i * (j + 2));
|
||||||
|
@@ -48,7 +48,7 @@ public:
|
|||||||
CPPUNIT_TEST_SUITE_END();
|
CPPUNIT_TEST_SUITE_END();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const int nMaxFieldIndex = 6;
|
static const int m_nMaxFieldIndex = 6;
|
||||||
uno::Reference< lang::XComponent > mxComponent;
|
uno::Reference< lang::XComponent > mxComponent;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@ ScDataPilotItemObj::ScDataPilotItemObj()
|
|||||||
|
|
||||||
uno::Reference< uno::XInterface > ScDataPilotItemObj::init()
|
uno::Reference< uno::XInterface > ScDataPilotItemObj::init()
|
||||||
{
|
{
|
||||||
table::CellRangeAddress sCellRangeAddress(0, 1, 0, nMaxFieldIndex - 1, nMaxFieldIndex - 1);
|
table::CellRangeAddress sCellRangeAddress(0, 1, 0, m_nMaxFieldIndex - 1, m_nMaxFieldIndex - 1);
|
||||||
table::CellAddress sCellAddress(0, 7, 8);
|
table::CellAddress sCellAddress(0, 7, 8);
|
||||||
|
|
||||||
uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, uno::UNO_QUERY_THROW);
|
uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, uno::UNO_QUERY_THROW);
|
||||||
@@ -72,7 +72,7 @@ uno::Reference< uno::XInterface > ScDataPilotItemObj::init()
|
|||||||
uno::Reference< sheet::XSpreadsheet > xSheet1( xIndex->getByIndex(0), uno::UNO_QUERY_THROW);
|
uno::Reference< sheet::XSpreadsheet > xSheet1( xIndex->getByIndex(0), uno::UNO_QUERY_THROW);
|
||||||
uno::Reference< sheet::XSpreadsheet > xSheet2( xIndex->getByIndex(1), uno::UNO_QUERY_THROW);
|
uno::Reference< sheet::XSpreadsheet > xSheet2( xIndex->getByIndex(1), uno::UNO_QUERY_THROW);
|
||||||
|
|
||||||
for (auto i = 1; i < nMaxFieldIndex; i++)
|
for (auto i = 1; i < m_nMaxFieldIndex; i++)
|
||||||
{
|
{
|
||||||
xSheet1->getCellByPosition(i, 0)->setFormula(OUString("Col" + OUString::number(i)));
|
xSheet1->getCellByPosition(i, 0)->setFormula(OUString("Col" + OUString::number(i)));
|
||||||
xSheet1->getCellByPosition(0, 1)->setFormula(OUString("Row" + OUString::number(i)));
|
xSheet1->getCellByPosition(0, 1)->setFormula(OUString("Row" + OUString::number(i)));
|
||||||
@@ -80,8 +80,8 @@ uno::Reference< uno::XInterface > ScDataPilotItemObj::init()
|
|||||||
xSheet2->getCellByPosition(0, 1)->setFormula(OUString("Row" + OUString::number(i)));
|
xSheet2->getCellByPosition(0, 1)->setFormula(OUString("Row" + OUString::number(i)));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto i = 1; i < nMaxFieldIndex; i++)
|
for (auto i = 1; i < m_nMaxFieldIndex; i++)
|
||||||
for (auto j = 1; j < nMaxFieldIndex; j++)
|
for (auto j = 1; j < m_nMaxFieldIndex; j++)
|
||||||
{
|
{
|
||||||
xSheet1->getCellByPosition(i, j)->setValue(i * (j + 2));
|
xSheet1->getCellByPosition(i, j)->setValue(i * (j + 2));
|
||||||
xSheet2->getCellByPosition(i, j)->setValue(i * (j + 2));
|
xSheet2->getCellByPosition(i, j)->setValue(i * (j + 2));
|
||||||
|
@@ -80,7 +80,7 @@ public:
|
|||||||
CPPUNIT_TEST_SUITE_END();
|
CPPUNIT_TEST_SUITE_END();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const int nMaxFieldIndex = 6;
|
static const int m_nMaxFieldIndex = 6;
|
||||||
uno::Reference<lang::XComponent> m_xComponent;
|
uno::Reference<lang::XComponent> m_xComponent;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ ScDataPilotItemsObj::ScDataPilotItemsObj()
|
|||||||
|
|
||||||
uno::Reference<uno::XInterface> ScDataPilotItemsObj::init()
|
uno::Reference<uno::XInterface> ScDataPilotItemsObj::init()
|
||||||
{
|
{
|
||||||
table::CellRangeAddress aCellRangeAddress(0, 1, 0, nMaxFieldIndex - 1, nMaxFieldIndex - 1);
|
table::CellRangeAddress aCellRangeAddress(0, 1, 0, m_nMaxFieldIndex - 1, m_nMaxFieldIndex - 1);
|
||||||
table::CellAddress aCellAddress(0, 7, 8);
|
table::CellAddress aCellAddress(0, 7, 8);
|
||||||
|
|
||||||
uno::Reference<sheet::XSpreadsheetDocument> xDoc(m_xComponent, uno::UNO_QUERY_THROW);
|
uno::Reference<sheet::XSpreadsheetDocument> xDoc(m_xComponent, uno::UNO_QUERY_THROW);
|
||||||
@@ -106,7 +106,7 @@ uno::Reference<uno::XInterface> ScDataPilotItemsObj::init()
|
|||||||
uno::Reference<sheet::XSpreadsheet> xSheet0(xIA->getByIndex(0), uno::UNO_QUERY_THROW);
|
uno::Reference<sheet::XSpreadsheet> xSheet0(xIA->getByIndex(0), uno::UNO_QUERY_THROW);
|
||||||
uno::Reference<sheet::XSpreadsheet> xSheet1(xIA->getByIndex(1), uno::UNO_QUERY_THROW);
|
uno::Reference<sheet::XSpreadsheet> xSheet1(xIA->getByIndex(1), uno::UNO_QUERY_THROW);
|
||||||
|
|
||||||
for (auto i = 1; i < nMaxFieldIndex; ++i)
|
for (auto i = 1; i < m_nMaxFieldIndex; ++i)
|
||||||
{
|
{
|
||||||
xSheet0->getCellByPosition(i, 0)->setFormula("Col" + OUString::number(i));
|
xSheet0->getCellByPosition(i, 0)->setFormula("Col" + OUString::number(i));
|
||||||
xSheet0->getCellByPosition(0, i)->setFormula("Row" + OUString::number(i));
|
xSheet0->getCellByPosition(0, i)->setFormula("Row" + OUString::number(i));
|
||||||
@@ -114,9 +114,9 @@ uno::Reference<uno::XInterface> ScDataPilotItemsObj::init()
|
|||||||
xSheet1->getCellByPosition(0, i)->setFormula("Row" + OUString::number(i));
|
xSheet1->getCellByPosition(0, i)->setFormula("Row" + OUString::number(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto i = 1; i < nMaxFieldIndex; ++i)
|
for (auto i = 1; i < m_nMaxFieldIndex; ++i)
|
||||||
{
|
{
|
||||||
for (auto j = 1; j < nMaxFieldIndex; ++j)
|
for (auto j = 1; j < m_nMaxFieldIndex; ++j)
|
||||||
{
|
{
|
||||||
xSheet0->getCellByPosition(i, j)->setValue(i * (j + 1));
|
xSheet0->getCellByPosition(i, j)->setValue(i * (j + 1));
|
||||||
xSheet1->getCellByPosition(i, j)->setValue(i * (j + 2));
|
xSheet1->getCellByPosition(i, j)->setValue(i * (j + 2));
|
||||||
|
@@ -53,7 +53,7 @@ public:
|
|||||||
CPPUNIT_TEST_SUITE_END();
|
CPPUNIT_TEST_SUITE_END();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const int nMaxFieldIndex = 6;
|
static const int m_nMaxFieldIndex = 6;
|
||||||
uno::Reference<lang::XComponent> m_xComponent;
|
uno::Reference<lang::XComponent> m_xComponent;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@ ScIndexEnumeration_DataPilotItemsEnumeration::ScIndexEnumeration_DataPilotItemsE
|
|||||||
|
|
||||||
uno::Reference<uno::XInterface> ScIndexEnumeration_DataPilotItemsEnumeration::init()
|
uno::Reference<uno::XInterface> ScIndexEnumeration_DataPilotItemsEnumeration::init()
|
||||||
{
|
{
|
||||||
table::CellRangeAddress aCellRangeAddress(0, 1, 0, nMaxFieldIndex - 1, nMaxFieldIndex - 1);
|
table::CellRangeAddress aCellRangeAddress(0, 1, 0, m_nMaxFieldIndex - 1, m_nMaxFieldIndex - 1);
|
||||||
table::CellAddress aCellAddress(0, 7, 8);
|
table::CellAddress aCellAddress(0, 7, 8);
|
||||||
|
|
||||||
uno::Reference<sheet::XSpreadsheetDocument> xDoc(m_xComponent, uno::UNO_QUERY_THROW);
|
uno::Reference<sheet::XSpreadsheetDocument> xDoc(m_xComponent, uno::UNO_QUERY_THROW);
|
||||||
@@ -77,7 +77,7 @@ uno::Reference<uno::XInterface> ScIndexEnumeration_DataPilotItemsEnumeration::in
|
|||||||
uno::Reference<sheet::XSpreadsheet> xSheet0(xIA->getByIndex(0), uno::UNO_QUERY_THROW);
|
uno::Reference<sheet::XSpreadsheet> xSheet0(xIA->getByIndex(0), uno::UNO_QUERY_THROW);
|
||||||
uno::Reference<sheet::XSpreadsheet> xSheet1(xIA->getByIndex(1), uno::UNO_QUERY_THROW);
|
uno::Reference<sheet::XSpreadsheet> xSheet1(xIA->getByIndex(1), uno::UNO_QUERY_THROW);
|
||||||
|
|
||||||
for (auto i = 1; i < nMaxFieldIndex; ++i)
|
for (auto i = 1; i < m_nMaxFieldIndex; ++i)
|
||||||
{
|
{
|
||||||
xSheet0->getCellByPosition(i, 0)->setFormula("Col" + OUString::number(i));
|
xSheet0->getCellByPosition(i, 0)->setFormula("Col" + OUString::number(i));
|
||||||
xSheet0->getCellByPosition(0, i)->setFormula("Row" + OUString::number(i));
|
xSheet0->getCellByPosition(0, i)->setFormula("Row" + OUString::number(i));
|
||||||
@@ -85,9 +85,9 @@ uno::Reference<uno::XInterface> ScIndexEnumeration_DataPilotItemsEnumeration::in
|
|||||||
xSheet1->getCellByPosition(0, i)->setFormula("Row" + OUString::number(i));
|
xSheet1->getCellByPosition(0, i)->setFormula("Row" + OUString::number(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto i = 1; i < nMaxFieldIndex; ++i)
|
for (auto i = 1; i < m_nMaxFieldIndex; ++i)
|
||||||
{
|
{
|
||||||
for (auto j = 1; j < nMaxFieldIndex; ++j)
|
for (auto j = 1; j < m_nMaxFieldIndex; ++j)
|
||||||
{
|
{
|
||||||
xSheet0->getCellByPosition(i, j)->setValue(i * (j + 1));
|
xSheet0->getCellByPosition(i, j)->setValue(i * (j + 1));
|
||||||
xSheet1->getCellByPosition(i, j)->setValue(i * (j + 2));
|
xSheet1->getCellByPosition(i, j)->setValue(i * (j + 2));
|
||||||
|
Reference in New Issue
Block a user