summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-07-22 16:10:32 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-07-23 06:46:41 +0200
commitea20fcce1dac735a9730ab6672bf60ccec595e71 (patch)
treedf8f25ec6a90f47fb878236e239f8a23e679943c /sc
parenta17b19726d723b16dacb49db7a8efd5fee9cb4cf (diff)
close some more holes in structures
and improve the pahole script so I can just run it once over the whole codebase Change-Id: I7e1775974a3a61f8c0e40646158f01163ace60cc Reviewed-on: https://gerrit.libreoffice.org/76122 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/colorscale.hxx4
-rw-r--r--sc/inc/pivot.hxx12
-rw-r--r--sc/source/core/data/colorscale.cxx18
-rw-r--r--sc/source/core/data/pivot2.cxx10
-rw-r--r--sc/source/filter/inc/condformatbuffer.hxx12
5 files changed, 27 insertions, 29 deletions
diff --git a/sc/inc/colorscale.hxx b/sc/inc/colorscale.hxx
index aa3e6f6e7e60..236dac698c54 100644
--- a/sc/inc/colorscale.hxx
+++ b/sc/inc/colorscale.hxx
@@ -43,11 +43,11 @@ class SC_DLLPUBLIC ScColorScaleEntry
{
private:
double mnVal;
- Color maColor;
std::unique_ptr<ScFormulaCell> mpCell;
std::unique_ptr<ScFormulaListener> mpListener;
- ScColorScaleEntryType meType;
ScConditionalFormat* mpFormat;
+ Color maColor;
+ ScColorScaleEntryType meType;
void setListener();
diff --git a/sc/inc/pivot.hxx b/sc/inc/pivot.hxx
index c374c952641e..2dcb9b2f1e0b 100644
--- a/sc/inc/pivot.hxx
+++ b/sc/inc/pivot.hxx
@@ -114,13 +114,13 @@ typedef std::vector< std::unique_ptr<ScDPLabelData> > ScDPLabelDataVector;
struct ScPivotField
{
- SCCOL nCol; ///< 0-based dimension index (not source column index)
+ css::sheet::DataPilotFieldReference maFieldRef;
+
long mnOriginalDim; ///< >= 0 for duplicated field.
PivotFunc nFuncMask;
+ SCCOL nCol; ///< 0-based dimension index (not source column index)
sal_uInt8 mnDupCount;
- css::sheet::DataPilotFieldReference maFieldRef;
-
explicit ScPivotField( SCCOL nNewCol = 0 );
ScPivotField( const ScPivotField& r );
@@ -156,13 +156,13 @@ struct ScPivotParam
struct ScPivotFuncData
{
- SCCOL mnCol;
+ css::sheet::DataPilotFieldReference maFieldRef;
+
long mnOriginalDim;
PivotFunc mnFuncMask;
+ SCCOL mnCol;
sal_uInt8 mnDupCount;
- css::sheet::DataPilotFieldReference maFieldRef;
-
explicit ScPivotFuncData( SCCOL nCol, PivotFunc nFuncMask );
#if DEBUG_PIVOT_TABLE
diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx
index 1a932df73b53..3fa03b5b6988 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -151,24 +151,24 @@ bool ScFormulaListener::NeedsRepaint() const
ScColorScaleEntry::ScColorScaleEntry():
mnVal(0),
- meType(COLORSCALE_VALUE),
- mpFormat(nullptr)
+ mpFormat(nullptr),
+ meType(COLORSCALE_VALUE)
{
}
ScColorScaleEntry::ScColorScaleEntry(double nVal, const Color& rCol, ScColorScaleEntryType eType):
mnVal(nVal),
+ mpFormat(nullptr),
maColor(rCol),
- meType(eType),
- mpFormat(nullptr)
+ meType(eType)
{
}
ScColorScaleEntry::ScColorScaleEntry(const ScColorScaleEntry& rEntry):
mnVal(rEntry.mnVal),
+ mpFormat(rEntry.mpFormat),
maColor(rEntry.maColor),
- meType(rEntry.meType),
- mpFormat(rEntry.mpFormat)
+ meType(rEntry.meType)
{
setListener();
if(rEntry.mpCell)
@@ -181,10 +181,10 @@ ScColorScaleEntry::ScColorScaleEntry(const ScColorScaleEntry& rEntry):
ScColorScaleEntry::ScColorScaleEntry(ScDocument* pDoc, const ScColorScaleEntry& rEntry):
mnVal(rEntry.mnVal),
- maColor(rEntry.maColor),
mpCell(),
- meType(rEntry.meType),
- mpFormat(rEntry.mpFormat)
+ mpFormat(rEntry.mpFormat),
+ maColor(rEntry.maColor),
+ meType(rEntry.meType)
{
setListener();
if(rEntry.mpCell)
diff --git a/sc/source/core/data/pivot2.cxx b/sc/source/core/data/pivot2.cxx
index 03c3e16259be..3c1ce479a845 100644
--- a/sc/source/core/data/pivot2.cxx
+++ b/sc/source/core/data/pivot2.cxx
@@ -74,18 +74,18 @@ OUString const & ScDPLabelData::getDisplayName() const
// ScPivotField
ScPivotField::ScPivotField(SCCOL nNewCol) :
- nCol(nNewCol),
mnOriginalDim(-1),
nFuncMask(PivotFunc::NONE),
+ nCol(nNewCol),
mnDupCount(0)
{}
ScPivotField::ScPivotField( const ScPivotField& rPivotField ) :
- nCol(rPivotField.nCol),
+ maFieldRef(rPivotField.maFieldRef),
mnOriginalDim(rPivotField.mnOriginalDim),
nFuncMask(rPivotField.nFuncMask),
- mnDupCount(rPivotField.mnDupCount),
- maFieldRef(rPivotField.maFieldRef)
+ nCol(rPivotField.nCol),
+ mnDupCount(rPivotField.mnDupCount)
{}
long ScPivotField::getOriginalDim() const
@@ -151,9 +151,9 @@ ScPivotParam& ScPivotParam::operator=( const ScPivotParam& rPivotParam )
// ScPivotFuncData
ScPivotFuncData::ScPivotFuncData( SCCOL nCol, PivotFunc nFuncMask ) :
- mnCol( nCol ),
mnOriginalDim(-1),
mnFuncMask(nFuncMask),
+ mnCol( nCol ),
mnDupCount(0)
{}
diff --git a/sc/source/filter/inc/condformatbuffer.hxx b/sc/source/filter/inc/condformatbuffer.hxx
index 8fbca5c0febf..0c79374a203f 100644
--- a/sc/source/filter/inc/condformatbuffer.hxx
+++ b/sc/source/filter/inc/condformatbuffer.hxx
@@ -235,17 +235,15 @@ private:
struct ExCfRuleModel
{
- ExCfRuleModel() : mbGradient( false ), mnAxisColor( UNSIGNED_RGB_TRANSPARENT ), mnNegativeColor( UNSIGNED_RGB_TRANSPARENT ), mbIsLower( true ) {}
- // DataBar
- bool mbGradient;
- OUString maAxisPosition;
+ ExCfRuleModel() : mnAxisColor( UNSIGNED_RGB_TRANSPARENT ), mnNegativeColor( UNSIGNED_RGB_TRANSPARENT ), mbGradient( false ), mbIsLower( true ) {}
// AxisColor
::Color mnAxisColor;
// NegativeFillColor
::Color mnNegativeColor;
- // Cfvo
- bool mbIsLower;
- OUString maColorScaleType;
+ OUString maAxisPosition; // DataBar
+ OUString maColorScaleType; // Cfvo
+ bool mbGradient; // DataBar
+ bool mbIsLower; // Cfvo
};
class ExtCfDataBarRule : public WorksheetHelper