diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2011-04-26 14:33:32 -0400 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2011-04-26 14:33:32 -0400 |
commit | d5f16e508ff60ad04362472d796c4e7730f26e9f (patch) | |
tree | b7d4b17d69fc8a4595554a88ca46bb6a1849c8ef /sc/source/core/data/dpoutput.cxx | |
parent | 423904ecc6858b39b10316113ebedd33a611f38e (diff) |
Put more source local functions into anonymous namespace.
Diffstat (limited to 'sc/source/core/data/dpoutput.cxx')
-rw-r--r-- | sc/source/core/data/dpoutput.cxx | 60 |
1 files changed, 29 insertions, 31 deletions
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx index a1c0ec2d7840..625a79fb4f8b 100644 --- a/sc/source/core/data/dpoutput.cxx +++ b/sc/source/core/data/dpoutput.cxx @@ -95,6 +95,33 @@ using ::rtl::OUString; #define SC_DPOUT_MAXLEVELS 256 +struct ScDPOutLevelData +{ + long nDim; + long nHier; + long nLevel; + long nDimPos; + uno::Sequence<sheet::MemberResult> aResult; + String maName; /// Name is the internal field name. + String aCaption; /// Caption is the name visible in the output table. + bool mbHasHiddenMember; + + ScDPOutLevelData() + { + nDim = nHier = nLevel = nDimPos = -1; + mbHasHiddenMember = false; + } + + sal_Bool operator<(const ScDPOutLevelData& r) const + { return nDimPos<r.nDimPos || ( nDimPos==r.nDimPos && nHier<r.nHier ) || + ( nDimPos==r.nDimPos && nHier==r.nHier && nLevel<r.nLevel ); } + + void Swap(ScDPOutLevelData& r) + { ScDPOutLevelData aTemp; aTemp = r; r = *this; *this = aTemp; } + + //! bug (73840) in uno::Sequence - copy and then assign doesn't work! +}; + namespace { bool lcl_compareColfuc ( SCCOL i, SCCOL j) { return (i<j); } @@ -277,37 +304,6 @@ void ScDPOutputImpl::OutputBlockFrame ( SCCOL nStartCol, SCROW nStartRow, SCCOL } -} - -struct ScDPOutLevelData -{ - long nDim; - long nHier; - long nLevel; - long nDimPos; - uno::Sequence<sheet::MemberResult> aResult; - String maName; /// Name is the internal field name. - String aCaption; /// Caption is the name visible in the output table. - bool mbHasHiddenMember; - - ScDPOutLevelData() - { - nDim = nHier = nLevel = nDimPos = -1; - mbHasHiddenMember = false; - } - - sal_Bool operator<(const ScDPOutLevelData& r) const - { return nDimPos<r.nDimPos || ( nDimPos==r.nDimPos && nHier<r.nHier ) || - ( nDimPos==r.nDimPos && nHier==r.nHier && nLevel<r.nLevel ); } - - void Swap(ScDPOutLevelData& r) - { ScDPOutLevelData aTemp; aTemp = r; r = *this; *this = aTemp; } - - //! bug (73840) in uno::Sequence - copy and then assign doesn't work! -}; - -// ----------------------------------------------------------------------- - void lcl_SetStyleById( ScDocument* pDoc, SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, sal_uInt16 nStrId ) @@ -534,6 +530,8 @@ uno::Sequence<sheet::MemberResult> lcl_GetSelectedPageAsResult( const uno::Refer return aRet; } +} + ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsSupplier>& xSrc, const ScAddress& rPos, bool bFilter ) : pDoc( pD ), |