summaryrefslogtreecommitdiff
path: root/sc/source/core/data/dpgroup.cxx
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-23 15:04:43 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-23 15:04:43 +0200
commitb4e4583b94e78d6e81ab07894cfc0e99cefa33c1 (patch)
tree26e22c8ab20d2c38bc88dfcc041c8143e0609557 /sc/source/core/data/dpgroup.cxx
parent69bb367315288b644439dc46d34743a2575a3527 (diff)
recreated tag libreoffice-3.3.1.1 which had these commits:
commit 8964ceb596c66db5e9677de1ad99f9747342b87b (tag: refs/tags/libreoffice-3.3.1.1) Author: Petr Mladek <pmladek@suse.cz> Date: Tue Feb 8 18:07:42 2011 +0100 Version 3.3.1.1, tag libreoffice-3.3.1.1 (3.3.1-rc1) commit 737b6a92adca9a8285370918671b93b56a028537 Author: Jan Holesovsky <kendy@suse.cz> Date: Mon Feb 7 21:23:21 2011 +0100 Branch libreoffice-3-3-1 This is 'libreoffice-3-3-1' - the stable branch for the 3.3.1 release. Only very safe changes, reviewed by three people are allowed. If you want to commit more complicated fix for the next 3.3.x release, please use the 'libreoffice-3-3' branch. If you want to build something cool, unstable, and risky, use master. commit d4d6a678bf169eebee2fe4d71c8ec66de6898d6e Author: Jani Monoses <jani.monoses@canonical.com> Date: Thu Jan 27 15:33:06 2011 +0200 Remove unused declaration Signed-off-by: Michael Meeks <michael.meeks@novell.com> sc/source/core/tool/token.cxx | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) commit 96bee1507119ca0525845022019d90f0694996aa Author: Kohei Yoshida <kyoshida@novell.com> Date: Thu Jan 20 23:44:52 2011 -0500 Fixed incorrect page number in page preview mode. (fdo#33155) When the window is large enough to show several 'Page X' strings, the page number was not properly incremented. This commit fixes it. sc/source/ui/view/gridwin4.cxx | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) commit ed46df1fcb5869818f5f74e0c7a5b19c65102e83 Author: Kohei Yoshida <kyoshida@novell.com> Date: Wed Jan 19 00:24:24 2011 -0500 Fixed incorrect import of cell attributes from Excel documents. When a cell with non-default formatting attribute starts with non-first row in a column, the filter would incorrectly apply the same format to all the cells above it if they didn't have any formats. This commit fixes it. sc/source/filter/excel/xistyle.cxx | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) commit af63319fcdeea3f9b5018eab83ef5a9e64905446 Author: Kohei Yoshida <kyoshida@novell.com> Date: Thu Jan 13 11:18:07 2011 -0500 Reverting the merge commit 0fe55349b05fae496a86a3fa958d184f0453916c. I created a patch between before and after the merge commit, and reverse-applied it. This is because if you revert a merge commit in git you are denying all future merges from that branch. I wasn't sure if we really wanted that. Signed-off-by: Petr Mladek <pmladek@suse.cz> sc/inc/document.hxx | 22 +------ sc/inc/drwlayer.hxx | 2 +- sc/inc/table.hxx | 16 +----- sc/source/core/data/document.cxx | 7 +-- sc/source/core/data/drwlayer.cxx | 6 +- sc/source/core/data/table1.cxx | 38 ++++-------- sc/source/core/data/table2.cxx | 91 ++++++------------------------ sc/source/core/data/table3.cxx | 71 +---------------------- sc/source/filter/xml/xmlrowi.cxx | 17 +---- sc/source/ui/docshell/externalrefmgr.cxx | 7 +- sc/source/ui/view/dbfunc.cxx | 5 +- sc/source/ui/view/tabvwshe.cxx | 4 +- 12 files changed, 52 insertions(+), 234 deletions(-) commit 5ada5635cff38af87830b091b36159cf80e4cf5d Author: Kohei Yoshida <kyoshida@novell.com> Date: Thu Jan 13 11:04:14 2011 -0500 Revert "This is also part of the merge." This reverts commit 0fe55349b05fae496a86a3fa958d184f0453916c. Signed-off-by: Petr Mladek <pmladek@suse.cz> sc/source/core/data/table3.cxx | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit c900e3db767518b7a60eaf24bdf298c94315f685 Author: Petr Mladek <pmladek@suse.cz> Date: Tue Jan 11 23:05:56 2011 +0100 Please, ignore the previous message; it was for the libreoffice-3-3-0 branch This is 'libreoffice-3-3' - the stable branch for the 3.3.x releases. Only safe changes, reviewed by anoter person are allowed. If you want to build something cool, unstable, and risky, use master. commit 15d298ba7c4e89b043b3077e17747ba027a62c43 Author: Petr Mladek <pmladek@suse.cz> Date: Tue Jan 11 22:39:06 2011 +0100 Branch libreoffice-3-3-0 This is 'libreoffice-3-3-0' - the stable branch for the 3.3.0 release. Only very safe changes, reviewed by three people are allowed. If you want to commit more complicated fix for the next 3.3.x release, please use the 'libreoffice-3-3' branch. If you want to build something cool, unstable, and risky, use master.
Notes
split repo tag: calc_libreoffice-3.3.1.1 split repo tag: calc_libreoffice-3.3.1.2
Diffstat (limited to 'sc/source/core/data/dpgroup.cxx')
-rw-r--r--sc/source/core/data/dpgroup.cxx76
1 files changed, 38 insertions, 38 deletions
diff --git a/sc/source/core/data/dpgroup.cxx b/sc/source/core/data/dpgroup.cxx
index 216d90352c9d..46e1cf73f7c6 100644
--- a/sc/source/core/data/dpgroup.cxx
+++ b/sc/source/core/data/dpgroup.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -80,8 +80,8 @@ const sal_Int32 SC_DP_DATE_FIRST = -1;
const sal_Int32 SC_DP_DATE_LAST = 10000;
// ============================================================================
-namespace
-{
+namespace
+{
BOOL lcl_Search( SCCOL nSourceDim, ScDPTableDataCache* pCache , const std::vector< SCROW >& vIdx, SCROW nNew , SCROW& rIndex)
{
rIndex = vIdx.size();
@@ -93,7 +93,7 @@ namespace
while (nLo <= nHi)
{
nIndex = (nLo + nHi) / 2;
-
+
const ScDPItemData* pData = pCache->GetItemDataById( nSourceDim, vIdx[nIndex] );
const ScDPItemData* pDataInsert = pCache->GetItemDataById( nSourceDim, nNew );
@@ -116,9 +116,9 @@ namespace
void lcl_Insert( SCCOL nSourceDim, ScDPTableDataCache* pCache , std::vector< SCROW >& vIdx, SCROW nNew )
{
- SCROW nIndex = 0;
- if ( !lcl_Search( nSourceDim, pCache, vIdx, nNew ,nIndex ) )
- vIdx.insert( vIdx.begin()+nIndex, nNew );
+ SCROW nIndex = 0;
+ if ( !lcl_Search( nSourceDim, pCache, vIdx, nNew ,nIndex ) )
+ vIdx.insert( vIdx.begin()+nIndex, nNew );
}
template<bool bUpdateData>
@@ -280,7 +280,7 @@ namespace
class ScDPGroupDateFilter : public ScDPCacheTable::FilterBase
{
public:
- ScDPGroupDateFilter(double fMatchValue, sal_Int32 nDatePart,
+ ScDPGroupDateFilter(double fMatchValue, sal_Int32 nDatePart,
const Date* pNullDate, const ScDPNumGroupInfo* pNumInfo);
// Wang Xu Ming -- 2009-8-17
@@ -299,7 +299,7 @@ private:
// ----------------------------------------------------------------------------
-ScDPGroupDateFilter::ScDPGroupDateFilter(double fMatchValue, sal_Int32 nDatePart,
+ScDPGroupDateFilter::ScDPGroupDateFilter(double fMatchValue, sal_Int32 nDatePart,
const Date* pNullDate, const ScDPNumGroupInfo* pNumInfo) :
mpNullDate(pNullDate),
mpNumInfo(pNumInfo),
@@ -317,7 +317,7 @@ bool ScDPGroupDateFilter::match( const ScDPItemData & rCellData ) const
if ( !rCellData.IsValue() )
return false;
-// ScDPCacheCell rCell( rCellData.fValue );
+// ScDPCacheCell rCell( rCellData.fValue );
if (!mpNumInfo)
return false;
@@ -330,7 +330,7 @@ bool ScDPGroupDateFilter::match( const ScDPItemData & rCellData ) const
if ( rCellData.GetValue() > mpNumInfo->End && !approxEqual(rCellData.GetValue(), mpNumInfo->End) )
return static_cast<sal_Int32>(mfMatchValue) == SC_DP_DATE_LAST;
- if (mnDatePart == DataPilotFieldGroupBy::HOURS || mnDatePart == DataPilotFieldGroupBy::MINUTES ||
+ if (mnDatePart == DataPilotFieldGroupBy::HOURS || mnDatePart == DataPilotFieldGroupBy::MINUTES ||
mnDatePart == DataPilotFieldGroupBy::SECONDS)
{
// handle time
@@ -594,7 +594,7 @@ BOOL lcl_DateContained( sal_Int32 nGroupPart, const ScDPItemData& rGroupData,
bContained = ( nGroupValue == nCompare );
}
break;
-
+
// other parts: everything is contained
}
@@ -674,16 +674,16 @@ void ScDPDateGroupHelper::FillColumnEntries( SCCOL nSourceDim, ScDPTableDataCach
for ( sal_Int32 nValue = nStart; nValue <= nEnd; nValue++ )
{
- String aName = lcl_GetDateGroupName( nDatePart, nValue, pFormatter );
+ String aName = lcl_GetDateGroupName( nDatePart, nValue, pFormatter );
lcl_InsertValue<false>( nSourceDim, pCache, rEntries, aName, nValue, nDatePart );
}
// add first/last entry (min/max)
- String aFirstName = lcl_GetSpecialDateName( aNumInfo.Start, true, pFormatter );
+ String aFirstName = lcl_GetSpecialDateName( aNumInfo.Start, true, pFormatter );
lcl_InsertValue<true>( nSourceDim, pCache, rEntries, aFirstName, SC_DP_DATE_FIRST, nDatePart );
- String aLastName = lcl_GetSpecialDateName( aNumInfo.End, false, pFormatter );
- lcl_InsertValue<true>( nSourceDim, pCache, rEntries, aLastName, SC_DP_DATE_LAST, nDatePart );
+ String aLastName = lcl_GetSpecialDateName( aNumInfo.End, false, pFormatter );
+ lcl_InsertValue<true>( nSourceDim, pCache, rEntries, aLastName, SC_DP_DATE_LAST, nDatePart );
}
// -----------------------------------------------------------------------
@@ -752,13 +752,13 @@ ScDPGroupDimension::ScDPGroupDimension( const ScDPGroupDimension& rOther ) :
nGroupDim( rOther.nGroupDim ),
aGroupName( rOther.aGroupName ),
pDateHelper( NULL ),
- aItems( rOther.aItems )
+ aItems( rOther.aItems )
{
if ( rOther.pDateHelper )
pDateHelper = new ScDPDateGroupHelper( *rOther.pDateHelper );
}
-ScDPGroupDimension& ScDPGroupDimension::operator=( const ScDPGroupDimension& rOther )
+ScDPGroupDimension& ScDPGroupDimension::operator=( const ScDPGroupDimension& rOther )
{
nSourceDim = rOther.nSourceDim;
nGroupDim = rOther.nGroupDim;
@@ -795,8 +795,8 @@ const std::vector< SCROW >& ScDPGroupDimension::GetColumnEntries( const ScDPCac
{
if ( maMemberEntries.empty() )
{
- if ( pDateHelper )
- {
+ if ( pDateHelper )
+ {
pDateHelper->FillColumnEntries( (SCCOL)GetSourceDim(), rCacheTable.GetCache(), maMemberEntries, rOriginal );
}
else
@@ -853,7 +853,7 @@ const ScDPGroupItem* ScDPGroupDimension::GetGroupByIndex( size_t nIndex ) const
void ScDPGroupDimension::DisposeData()
{
- maMemberEntries.clear();
+ maMemberEntries.clear();
}
// -----------------------------------------------------------------------
@@ -862,7 +862,7 @@ ScDPNumGroupDimension::ScDPNumGroupDimension() :
pDateHelper( NULL ),
bHasNonInteger( false ),
cDecSeparator( 0 )
-{
+{
}
ScDPNumGroupDimension::ScDPNumGroupDimension( const ScDPNumGroupInfo& rInfo ) :
@@ -872,7 +872,7 @@ ScDPNumGroupDimension::ScDPNumGroupDimension( const ScDPNumGroupInfo& rInfo ) :
cDecSeparator( 0 )
{
}
-
+
ScDPNumGroupDimension::ScDPNumGroupDimension( const ScDPNumGroupDimension& rOther ) :
aGroupInfo( rOther.aGroupInfo ),
pDateHelper( NULL ),
@@ -947,7 +947,7 @@ const std::vector< SCROW >& ScDPNumGroupDimension::GetNumEntries( SCCOL nSourceD
for (size_t nOriginalPos=0; nOriginalPos<nOriginalCount; nOriginalPos++)
{
const ScDPItemData* pItemData = pCache->GetItemDataById( nSourceDim , rOriginal[nOriginalPos] );
-
+
if ( pItemData && pItemData ->HasStringData() )
{
lcl_Insert( nSourceDim, pCache, maMemberEntries, rOriginal[nOriginalPos] );
@@ -1004,7 +1004,7 @@ const std::vector< SCROW >& ScDPNumGroupDimension::GetNumEntries( SCCOL nSourceD
{
String aName = lcl_GetNumGroupName( fLoop, aGroupInfo, bHasNonInteger, cDecSeparator, pFormatter );
// create a numerical entry to ensure proper sorting
- // (in FillMemberResults this needs special handling)
+ // (in FillMemberResults this needs special handling)
lcl_InsertValue<true>( nSourceDim, pCache, maMemberEntries, aName, fLoop );
++nLoopCount;
fLoop = aGroupInfo.Start + nLoopCount * aGroupInfo.Step;
@@ -1017,7 +1017,7 @@ const std::vector< SCROW >& ScDPNumGroupDimension::GetNumEntries( SCCOL nSourceD
lcl_InsertValue<true>( nSourceDim, pCache, maMemberEntries, aFirstName, aGroupInfo.Start - aGroupInfo.Step );
String aLastName = lcl_GetSpecialNumGroupName( aGroupInfo.End, false, cDecSeparator, aGroupInfo.DateValues, pFormatter );
- lcl_InsertValue<true>( nSourceDim, pCache, maMemberEntries, aLastName, aGroupInfo.End + aGroupInfo.Step );
+ lcl_InsertValue<true>( nSourceDim, pCache, maMemberEntries, aLastName, aGroupInfo.End + aGroupInfo.Step );
}
}
return maMemberEntries;
@@ -1092,7 +1092,7 @@ long ScDPGroupTableData::GetMembersCount( long nDim )
const std::vector< SCROW >& members = GetColumnEntries( nDim );
return members.size();
}
-const std::vector< SCROW >& ScDPGroupTableData::GetColumnEntries( long nColumn )
+const std::vector< SCROW >& ScDPGroupTableData::GetColumnEntries( long nColumn )
{
if ( nColumn >= nSourceCount )
{
@@ -1119,11 +1119,11 @@ const std::vector< SCROW >& ScDPGroupTableData::GetColumnEntries( long nColumn
}
const ScDPItemData* ScDPGroupTableData::GetMemberById( long nDim, long nId )
-{
+{
if ( nDim >= nSourceCount )
{
if ( getIsDataLayoutDimension( nDim) )
- nDim = nSourceCount;
+ nDim = nSourceCount;
else
{
const ScDPGroupDimension& rGroupDim = aGroups[nDim - nSourceCount];
@@ -1245,7 +1245,7 @@ void ScDPGroupTableData::ModifyFilterCriteria(vector<ScDPCacheTable::Criterion>&
ScDPCacheTable::Criterion aCri;
aCri.mnFieldIndex = itr->mnFieldIndex;
aCri.mpFilter.reset(new ScDPGroupDateFilter(
- pFilter->getMatchValue(), pDateHelper->GetDatePart(),
+ pFilter->getMatchValue(), pDateHelper->GetDatePart(),
pDoc->GetFormatTable()->GetNullDate(), &pDateHelper->GetNumInfo()));
aNewCriteria.push_back(aCri);
@@ -1270,7 +1270,7 @@ void ScDPGroupTableData::ModifyFilterCriteria(vector<ScDPCacheTable::Criterion>&
ScDPCacheTable::Criterion aCri;
aCri.mnFieldIndex = nSrcDim; // use the source dimension, not the group dimension.
aCri.mpFilter.reset(new ScDPGroupDateFilter(
- pFilter->getMatchValue(), pDateHelper->GetDatePart(),
+ pFilter->getMatchValue(), pDateHelper->GetDatePart(),
pDoc->GetFormatTable()->GetNullDate(), &pDateHelper->GetNumInfo()));
aNewCriteria.push_back(aCri);
@@ -1293,13 +1293,13 @@ void ScDPGroupTableData::ModifyFilterCriteria(vector<ScDPCacheTable::Criterion>&
// End Comments
if (!pGrpItem || !pGrpItem->GetName().IsCaseInsEqual(aName))
continue;
-
+
ScDPCacheTable::Criterion aCri;
aCri.mnFieldIndex = nSrcDim;
aCri.mpFilter.reset(new ScDPCacheTable::GroupFilter());
- ScDPCacheTable::GroupFilter* pGrpFilter =
+ ScDPCacheTable::GroupFilter* pGrpFilter =
static_cast<ScDPCacheTable::GroupFilter*>(aCri.mpFilter.get());
-
+
pGrpItem->FillGroupFilter(*pGrpFilter);
aNewCriteria.push_back(aCri);
}
@@ -1373,7 +1373,7 @@ void ScDPGroupTableData::FillGroupValues( /*ScDPItemData* pItemData*/ SCROW* pIt
pDateHelper = rGroupDim.GetDateHelper();
if ( !pDateHelper ) // date is handled below
{
- const ScDPGroupItem* pGroupItem = rGroupDim.GetGroupForData( *GetMemberById( nSourceDim, pItemDataIndex[nDim] ));
+ const ScDPGroupItem* pGroupItem = rGroupDim.GetGroupForData( *GetMemberById( nSourceDim, pItemDataIndex[nDim] ));
if ( pGroupItem )
pItemDataIndex[nDim] = pCache->GetAdditionalItemID( pGroupItem->GetName() );
}
@@ -1401,7 +1401,7 @@ void ScDPGroupTableData::FillGroupValues( /*ScDPItemData* pItemData*/ SCROW* pIt
}
if ( pDateHelper )
- {
+ {
const ScDPItemData* pData = GetCacheTable().GetCache()->GetItemDataById( (SCCOL)nSourceDim, pItemDataIndex[nDim]);
if ( pData ->IsValue() )
{
@@ -1410,7 +1410,7 @@ void ScDPGroupTableData::FillGroupValues( /*ScDPItemData* pItemData*/ SCROW* pIt
&pDateHelper->GetNumInfo() );
// Wang Xu Ming -- 2009-9-7
// DataPilot Migration - Cache&&Performance
- //String aName = lcl_GetDateGroupName( pDateHelper, nPartValue, pDoc->GetFormatTable() );
+ //String aName = lcl_GetDateGroupName( pDateHelper, nPartValue, pDoc->GetFormatTable() );
ScDPItemData aItemData( pDateHelper->GetDatePart(), String(), nPartValue, ScDPItemData::MK_DATA|ScDPItemData::MK_VAL|ScDPItemData::MK_DATEPART );
pItemDataIndex[nDim] = GetCacheTable().GetCache()->GetAdditionalItemID( aItemData );
// End Comments
@@ -1582,7 +1582,7 @@ long ScDPGroupTableData::GetSourceDim( long nDim )
}
long ScDPGroupTableData::Compare( long nDim, long nDataId1, long nDataId2)
{
- if ( getIsDataLayoutDimension(nDim) )
+ if ( getIsDataLayoutDimension(nDim) )
return 0;
return ScDPItemData::Compare( *GetMemberById(nDim, nDataId1),*GetMemberById(nDim, nDataId2) );
}