diff options
author | Eike Rathke <erack@redhat.com> | 2015-05-01 01:08:13 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2015-05-01 02:42:44 +0200 |
commit | 5a24b94662414fb9470be9c5d9c8b28c6ad42b5b (patch) | |
tree | 28c92a86ca06e8d3dfc7f6149e51c12c934ce53d /sc | |
parent | a1fed7b55e44fd2a2dd525ebf6459f452210b15c (diff) |
add totals to ScDBData ctor
Change-Id: I798376268b15f8b2f340d48fd2e38d68e53dbc6f
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/dbdata.hxx | 2 | ||||
-rw-r--r-- | sc/source/core/tool/dbdata.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/dbgui/dbnamdlg.cxx | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/sc/inc/dbdata.hxx b/sc/inc/dbdata.hxx index 2da067aa22b8..30c1106669e0 100644 --- a/sc/inc/dbdata.hxx +++ b/sc/inc/dbdata.hxx @@ -79,7 +79,7 @@ public: SC_DLLPUBLIC ScDBData(const OUString& rName, SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - bool bByR = true, bool bHasH = true); + bool bByR = true, bool bHasH = true, bool bTotals = false); ScDBData(const ScDBData& rData); ScDBData(const OUString& rName, const ScDBData& rData); virtual ~ScDBData(); diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx index 64bb3842568b..56b0bc80be94 100644 --- a/sc/source/core/tool/dbdata.cxx +++ b/sc/source/core/tool/dbdata.cxx @@ -51,7 +51,7 @@ bool ScDBData::less::operator() (const ScDBData& left, const ScDBData& right) co ScDBData::ScDBData( const OUString& rName, SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - bool bByR, bool bHasH) : + bool bByR, bool bHasH, bool bTotals) : mpSortParam(new ScSortParam), mpQueryParam(new ScQueryParam), mpSubTotal(new ScSubTotalParam), @@ -65,7 +65,7 @@ ScDBData::ScDBData( const OUString& rName, nEndRow (nRow2), bByRow (bByR), bHasHeader (bHasH), - bHasTotals (false), + bHasTotals (bTotals), bDoSize (false), bKeepFmt (false), bStripData (false), @@ -783,7 +783,7 @@ ScDBData* ScDBCollection::AnonDBs::getByRange(const ScRange& rRange) OUString aName(STR_DB_GLOBAL_NONAME); ::std::unique_ptr<ScDBData> pNew(new ScDBData( aName, rRange.aStart.Tab(), rRange.aStart.Col(), rRange.aStart.Row(), - rRange.aEnd.Col(), rRange.aEnd.Row(), true, false)); + rRange.aEnd.Col(), rRange.aEnd.Row(), true, false, false)); pData = pNew.get(); o3tl::ptr_container::push_back(maDBs, std::move(pNew)); } diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx index ed7d7ad72b05..ca24f23fa763 100644 --- a/sc/source/ui/dbgui/dbnamdlg.cxx +++ b/sc/source/ui/dbgui/dbnamdlg.cxx @@ -456,8 +456,8 @@ IMPL_LINK_NOARG(ScDbNameDlg, AddBtnHdl) ScDBData* pNewEntry = new ScDBData( aNewName, aStart.Tab(), aStart.Col(), aStart.Row(), aEnd.Col(), aEnd.Row(), - true, m_pBtnHeader->IsChecked() ); - pNewEntry->SetTotals( m_pBtnTotals->IsChecked() ); + true, m_pBtnHeader->IsChecked(), + m_pBtnTotals->IsChecked() ); pNewEntry->SetDoSize( m_pBtnDoSize->IsChecked() ); pNewEntry->SetKeepFmt( m_pBtnKeepFmt->IsChecked() ); pNewEntry->SetStripData( m_pBtnStripData->IsChecked() ); |