[Libreoffice-commits] core.git: Branch 'feature/formula-core-rework' - sc/inc sc/source
Kohei Yoshida
kohei.yoshida at gmail.com
Tue Jul 23 08:16:32 PDT 2013
sc/inc/refdata.hxx | 36 +++++++-----------------------------
sc/source/core/tool/refdata.cxx | 32 ++++++++++++++++++++++++++++++++
2 files changed, 39 insertions(+), 29 deletions(-)
New commits:
commit d46a4ac204ff0d85f94d64d196c75e701d9187d0
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Tue Jul 23 11:16:46 2013 -0400
Make these non-inline.
Change-Id: I99cf45edfe584f69fb6465de84cdcff5842e37a6
diff --git a/sc/inc/refdata.hxx b/sc/inc/refdata.hxx
index 145da50..ccbc1c5 100644
--- a/sc/inc/refdata.hxx
+++ b/sc/inc/refdata.hxx
@@ -78,9 +78,9 @@ struct SC_DLLPUBLIC ScSingleRefData
inline void SetRelName( bool bVal ) { Flags.bRelName = (bVal ? true : false ); }
inline bool IsRelName() const { return Flags.bRelName; }
- inline bool Valid() const;
+ bool Valid() const;
/// In external references nTab is -1
- inline bool ValidExternal() const;
+ bool ValidExternal() const;
ScAddress toAbs( const ScAddress& rPos ) const;
void SetAddress( const ScAddress& rAddr, const ScAddress& rPos );
@@ -96,20 +96,6 @@ struct SC_DLLPUBLIC ScSingleRefData
#endif
};
-inline bool ScSingleRefData::Valid() const
-{
- return nCol >= 0 && nCol <= MAXCOL &&
- nRow >= 0 && nRow <= MAXROW &&
- nTab >= 0 && nTab <= MAXTAB;
-}
-
-inline bool ScSingleRefData::ValidExternal() const
-{
- return nCol >= 0 && nCol <= MAXCOL &&
- nRow >= 0 && nRow <= MAXROW &&
- nTab == -1;
-}
-
/// Complex reference (a range) into the sheet
struct ScComplexRefData
{
@@ -134,13 +120,13 @@ struct ScComplexRefData
Ref1.InitAddress( nCol1, nRow1, nTab1 );
Ref2.InitAddress( nCol2, nRow2, nTab2 );
}
- inline bool IsDeleted() const
- { return Ref1.IsDeleted() || Ref2.IsDeleted(); }
- inline bool Valid() const
- { return Ref1.Valid() && Ref2.Valid(); }
+
+ bool IsDeleted() const;
+ bool Valid() const;
+
/** In external references nTab is -1 for the start tab and -1 for the end
tab if one sheet, or >=0 if more than one sheets. */
- inline bool ValidExternal() const;
+ bool ValidExternal() const;
SC_DLLPUBLIC ScRange toAbs( const ScAddress& rPos ) const;
void SetRange( const ScRange& rRange, const ScAddress& rPos );
@@ -160,14 +146,6 @@ struct ScComplexRefData
#endif
};
-inline bool ScComplexRefData::ValidExternal() const
-{
- return Ref1.ValidExternal() &&
- Ref2.nCol >= 0 && Ref2.nCol <= MAXCOL &&
- Ref2.nRow >= 0 && Ref2.nRow <= MAXROW &&
- Ref2.nTab >= Ref1.nTab;
-}
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/refdata.cxx b/sc/source/core/tool/refdata.cxx
index 3d49fa8..a804838 100644
--- a/sc/source/core/tool/refdata.cxx
+++ b/sc/source/core/tool/refdata.cxx
@@ -75,6 +75,20 @@ bool ScSingleRefData::IsDeleted() const
return IsColDeleted() || IsRowDeleted() || IsTabDeleted();
}
+bool ScSingleRefData::Valid() const
+{
+ return nCol >= 0 && nCol <= MAXCOL &&
+ nRow >= 0 && nRow <= MAXROW &&
+ nTab >= 0 && nTab <= MAXTAB;
+}
+
+bool ScSingleRefData::ValidExternal() const
+{
+ return nCol >= 0 && nCol <= MAXCOL &&
+ nRow >= 0 && nRow <= MAXROW &&
+ nTab == -1;
+}
+
ScAddress ScSingleRefData::toAbs( const ScAddress& rPos ) const
{
SCCOL nRetCol = Flags.bColRel ? nRelCol + rPos.Col() : nCol;
@@ -292,6 +306,24 @@ ScComplexRefData& ScComplexRefData::Extend( const ScComplexRefData & rRef, const
return Extend( rRef.Ref1, rPos).Extend( rRef.Ref2, rPos);
}
+bool ScComplexRefData::IsDeleted() const
+{
+ return Ref1.IsDeleted() || Ref2.IsDeleted();
+}
+
+bool ScComplexRefData::Valid() const
+{
+ return Ref1.Valid() && Ref2.Valid();
+}
+
+bool ScComplexRefData::ValidExternal() const
+{
+ return Ref1.ValidExternal() &&
+ Ref2.nCol >= 0 && Ref2.nCol <= MAXCOL &&
+ Ref2.nRow >= 0 && Ref2.nRow <= MAXROW &&
+ Ref2.nTab >= Ref1.nTab;
+}
+
ScRange ScComplexRefData::toAbs( const ScAddress& rPos ) const
{
return ScRange(Ref1.toAbs(rPos), Ref2.toAbs(rPos));
More information about the Libreoffice-commits
mailing list