summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-11-04 13:37:06 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-11-07 06:39:05 +0000
commit27513d4df50f6d18b585f4cbec6a4dd3f9b432cc (patch)
tree92b1d636fae62968195b253bc02f936968734c9a /sc/source
parent7f509501e9b042aeae0cdcc8e267550a45ab43c2 (diff)
loplugin:expandablemethods in sc
Change-Id: Ib417c5e978fca563f8c0ef0dbe6b9d50fead9828 Reviewed-on: https://gerrit.libreoffice.org/30566 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/attarray.cxx10
-rw-r--r--sc/source/core/data/column.cxx23
-rw-r--r--sc/source/core/data/column2.cxx5
-rw-r--r--sc/source/core/data/dociter.cxx7
-rw-r--r--sc/source/core/data/documen2.cxx5
-rw-r--r--sc/source/core/data/documen3.cxx7
-rw-r--r--sc/source/core/data/documen9.cxx34
-rw-r--r--sc/source/core/data/dptabsrc.cxx28
-rw-r--r--sc/source/core/data/edittextiterator.cxx17
-rw-r--r--sc/source/core/data/poolhelp.cxx10
-rw-r--r--sc/source/core/inc/poolhelp.hxx2
-rw-r--r--sc/source/core/tool/chgtrack.cxx23
-rw-r--r--sc/source/core/tool/filtopt.cxx11
-rw-r--r--sc/source/filter/excel/excimp8.cxx27
-rw-r--r--sc/source/filter/excel/xepivot.cxx7
-rw-r--r--sc/source/filter/excel/xestyle.cxx12
-rw-r--r--sc/source/filter/excel/xichart.cxx12
-rw-r--r--sc/source/filter/excel/xihelper.cxx7
-rw-r--r--sc/source/filter/excel/xipivot.cxx23
-rw-r--r--sc/source/filter/excel/xistream.cxx9
-rw-r--r--sc/source/filter/excel/xistring.cxx2
-rw-r--r--sc/source/filter/excel/xistyle.cxx7
-rw-r--r--sc/source/filter/html/htmlimp.cxx2
-rw-r--r--sc/source/filter/inc/XclImpChangeTrack.hxx12
-rw-r--r--sc/source/filter/inc/excimp8.hxx4
-rw-r--r--sc/source/filter/inc/htmlimp.hxx1
-rw-r--r--sc/source/filter/inc/sheetdatabuffer.hxx4
-rw-r--r--sc/source/filter/inc/viewsettings.hxx2
-rw-r--r--sc/source/filter/inc/xepivot.hxx3
-rw-r--r--sc/source/filter/inc/xestyle.hxx11
-rw-r--r--sc/source/filter/inc/xichart.hxx10
-rw-r--r--sc/source/filter/inc/xihelper.hxx2
-rw-r--r--sc/source/filter/inc/xipivot.hxx4
-rw-r--r--sc/source/filter/inc/xistream.hxx6
-rw-r--r--sc/source/filter/inc/xistring.hxx2
-rw-r--r--sc/source/filter/inc/xistyle.hxx2
-rw-r--r--sc/source/filter/oox/pagesettings.cxx9
-rw-r--r--sc/source/filter/oox/sheetdatabuffer.cxx28
-rw-r--r--sc/source/filter/oox/viewsettings.cxx7
-rw-r--r--sc/source/filter/xcl97/XclImpChangeTrack.cxx4
-rw-r--r--sc/source/filter/xml/XMLColumnRowGroupExport.cxx7
-rw-r--r--sc/source/filter/xml/XMLColumnRowGroupExport.hxx1
-rw-r--r--sc/source/filter/xml/xmlcelli.cxx23
-rw-r--r--sc/source/filter/xml/xmlcelli.hxx2
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx16
-rw-r--r--sc/source/filter/xml/xmlexprt.hxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocument.cxx39
-rw-r--r--sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx7
-rw-r--r--sc/source/ui/dbgui/csvruler.cxx12
-rw-r--r--sc/source/ui/docshell/docsh6.cxx7
-rw-r--r--sc/source/ui/docshell/editable.cxx22
-rw-r--r--sc/source/ui/inc/AccessibleSpreadsheet.hxx1
-rw-r--r--sc/source/ui/inc/acredlin.hxx1
-rw-r--r--sc/source/ui/inc/autofmt.hxx1
-rw-r--r--sc/source/ui/inc/colrowba.hxx2
-rw-r--r--sc/source/ui/inc/csvruler.hxx2
-rw-r--r--sc/source/ui/inc/docsh.hxx1
-rw-r--r--sc/source/ui/inc/editable.hxx1
-rw-r--r--sc/source/ui/inc/mvtabdlg.hxx1
-rw-r--r--sc/source/ui/miscdlgs/acredlin.cxx48
-rw-r--r--sc/source/ui/miscdlgs/autofmt.cxx11
-rw-r--r--sc/source/ui/miscdlgs/mvtabdlg.cxx7
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx85
-rw-r--r--sc/source/ui/view/colrowba.cxx7
64 files changed, 196 insertions, 511 deletions
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index 012c94b7bef7..2afe4c3d13c1 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -1458,14 +1458,6 @@ void ScAttrArray::RemoveAreaMerge(SCROW nStartRow, SCROW nEndRow)
}
}
-/**
- * Remove field, but leave MergeFlags
- */
-void ScAttrArray::DeleteAreaSafe(SCROW nStartRow, SCROW nEndRow)
-{
- SetPatternAreaSafe( nStartRow, nEndRow, pDocument->GetDefPattern(), true );
-}
-
void ScAttrArray::SetPatternAreaSafe( SCROW nStartRow, SCROW nEndRow,
const ScPatternAttr* pWantedPattern, bool bDefault )
{
@@ -2120,7 +2112,7 @@ void ScAttrArray::DeleteArea(SCROW nStartRow, SCROW nEndRow)
if ( !HasAttrib( nStartRow, nEndRow, HasAttrFlags::Overlapped | HasAttrFlags::AutoFilter) )
SetPatternArea( nStartRow, nEndRow, pDocument->GetDefPattern() );
else
- DeleteAreaSafe( nStartRow, nEndRow ); // leave merge flags
+ SetPatternAreaSafe( nStartRow, nEndRow, pDocument->GetDefPattern(), true ); // leave merge flags
}
void ScAttrArray::DeleteHardAttr(SCROW nStartRow, SCROW nEndRow)
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 7ec45b00ac24..e8a537a15a59 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -783,7 +783,7 @@ const sc::CellTextAttr* ScColumn::GetCellTextAttr( sc::ColumnBlockConstPosition&
bool ScColumn::TestInsertCol( SCROW nStartRow, SCROW nEndRow) const
{
- if (IsEmpty())
+ if (IsEmptyData() && IsEmptyAttr())
return true;
// Return false if we have any non-empty cells between nStartRow and nEndRow inclusive.
@@ -872,11 +872,6 @@ class CopyToClipHandler
maDestPos.miCellTextAttrPos, nRow, aAttrs.begin(), aAttrs.end());
}
- void duplicateNotes(SCROW nStartRow, size_t nDataSize )
- {
- mrSrcCol.DuplicateNotes(nStartRow, nDataSize, mrDestCol, maDestPos, false);
- }
-
public:
CopyToClipHandler(const ScColumn& rSrcCol, ScColumn& rDestCol, sc::ColumnBlockPosition* pDestPos, bool bCopyNotes) :
mrSrcCol(rSrcCol), mrDestCol(rDestCol), mpDestPos(pDestPos), mbCopyNotes(bCopyNotes)
@@ -984,7 +979,7 @@ public:
setDefaultAttrsToDest(nTopRow, nDataSize);
if (mbCopyNotes)
- duplicateNotes(nTopRow, nDataSize);
+ mrSrcCol.DuplicateNotes(nTopRow, nDataSize, mrDestCol, maDestPos, false);
}
};
@@ -1283,11 +1278,6 @@ class CopyAsLinkHandler
setDefaultAttrsToDest(nTopRow, nDataSize);
}
- void duplicateNotes(SCROW nStartRow, size_t nDataSize, bool bCloneCaption )
- {
- mrSrcCol.DuplicateNotes(nStartRow, nDataSize, mrDestCol, maDestPos, bCloneCaption);
- }
-
public:
CopyAsLinkHandler(const ScColumn& rSrcCol, ScColumn& rDestCol, sc::ColumnBlockPosition* pDestPos, InsertDeleteFlags nCopyFlags) :
mrSrcCol(rSrcCol),
@@ -1327,7 +1317,7 @@ public:
if (mnCopyFlags & (InsertDeleteFlags::NOTE|InsertDeleteFlags::ADDNOTES))
{
bool bCloneCaption = (mnCopyFlags & InsertDeleteFlags::NOCAPTIONS) == InsertDeleteFlags::NONE;
- duplicateNotes(nRow, nDataSize, bCloneCaption );
+ mrSrcCol.DuplicateNotes(nRow, nDataSize, mrDestCol, maDestPos, bCloneCaption);
}
switch (aNode.type)
@@ -1493,11 +1483,6 @@ class CopyByCloneHandler
}
}
- void duplicateNotes(SCROW nStartRow, size_t nDataSize, bool bCloneCaption )
- {
- mrSrcCol.DuplicateNotes(nStartRow, nDataSize, mrDestCol, maDestPos, bCloneCaption);
- }
-
public:
CopyByCloneHandler(const ScColumn& rSrcCol, ScColumn& rDestCol, sc::ColumnBlockPosition* pDestPos,
InsertDeleteFlags nCopyFlags, svl::SharedStringPool* pSharedStringPool, bool bGlobalNamesToLocal) :
@@ -1551,7 +1536,7 @@ public:
if (mnCopyFlags & (InsertDeleteFlags::NOTE|InsertDeleteFlags::ADDNOTES))
{
bool bCloneCaption = (mnCopyFlags & InsertDeleteFlags::NOCAPTIONS) == InsertDeleteFlags::NONE;
- duplicateNotes(nRow, nDataSize, bCloneCaption );
+ mrSrcCol.DuplicateNotes(nRow, nDataSize, mrDestCol, maDestPos, bCloneCaption);
}
switch (aNode.type)
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index f86d23ef3a12..c5e136b0f7f2 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -1206,11 +1206,6 @@ bool ScColumn::IsEmptyAttr() const
return true;
}
-bool ScColumn::IsEmpty() const
-{
- return (IsEmptyData() && IsEmptyAttr());
-}
-
bool ScColumn::IsEmptyBlock(SCROW nStartRow, SCROW nEndRow) const
{
std::pair<sc::CellStoreType::const_iterator,size_t> aPos = maCells.position(nStartRow);
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index 325145abe9be..a682a5ea2a81 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -146,11 +146,6 @@ void ScValueIterator::IncPos()
IncBlock();
}
-void ScValueIterator::SetPos(size_t nPos)
-{
- maCurPos = mpCells->position(maCurPos.first, nPos);
-}
-
bool ScValueIterator::GetThis(double& rValue, FormulaError& rErr)
{
while (true)
@@ -195,7 +190,7 @@ bool ScValueIterator::GetThis(double& rValue, FormulaError& rErr)
( ( mnSubTotalFlags & SubtotalFlags::IgnoreHidden ) &&
pDoc->RowHidden( nCurRow, mnTab, nullptr, &nLastRow ) ) )
{
- SetPos(nLastRow+1);
+ maCurPos = mpCells->position(maCurPos.first, nLastRow+1);
continue;
}
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 389611d4d2c5..4e60404d613f 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -793,7 +793,7 @@ bool ScDocument::MoveTab( SCTAB nOldPos, SCTAB nNewPos, ScProgress* pProgress )
SetAllFormulasDirty(aFormulaDirtyCxt);
if (pDrawLayer)
- DrawMovePage( static_cast<sal_uInt16>(nOldPos), static_cast<sal_uInt16>(nNewPos) );
+ pDrawLayer->ScMovePage( static_cast<sal_uInt16>(nOldPos), static_cast<sal_uInt16>(nNewPos) );
bValid = true;
}
@@ -923,7 +923,8 @@ bool ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyM
SetAllFormulasDirty(aFormulaDirtyCxt);
if (pDrawLayer) // Skip cloning Note caption object
- DrawCopyPage( static_cast<sal_uInt16>(nOldPos), static_cast<sal_uInt16>(nNewPos) );
+ // page is already created in ScTable ctor
+ pDrawLayer->ScCopyPage( static_cast<sal_uInt16>(nOldPos), static_cast<sal_uInt16>(nNewPos) );
if (pDPCollection)
pDPCollection->CopyToTab(nOldPos, nNewPos);
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index eab54acab123..7a5376ee88b4 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -152,7 +152,7 @@ void ScDocument::SetAllRangeNames(const std::map<OUString, std::unique_ptr<ScRan
}
}
-void ScDocument::GetTabRangeNameMap(std::map<OUString, ScRangeName*>& aRangeNameMap)
+void ScDocument::GetRangeNameMap(std::map<OUString, ScRangeName*>& aRangeNameMap)
{
for (SCTAB i = 0; i < static_cast<SCTAB>(maTabs.size()); ++i)
{
@@ -168,11 +168,6 @@ void ScDocument::GetTabRangeNameMap(std::map<OUString, ScRangeName*>& aRangeName
maTabs[i]->GetName(aTableName);
aRangeNameMap.insert(std::pair<OUString, ScRangeName*>(aTableName,p));
}
-}
-
-void ScDocument::GetRangeNameMap(std::map<OUString, ScRangeName*>& aRangeNameMap)
-{
- GetTabRangeNameMap(aRangeNameMap);
if (!pRangeName)
{
pRangeName = new ScRangeName();
diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx
index 8cdf00e9eb47..96fd241c3610 100644
--- a/sc/source/core/data/documen9.cxx
+++ b/sc/source/core/data/documen9.cxx
@@ -70,18 +70,6 @@ void ScDocument::BeginDrawUndo()
pDrawLayer->BeginCalcUndo(false);
}
-rtl::Reference<XColorList> ScDocument::GetColorList()
-{
- if (pDrawLayer)
- return pDrawLayer->GetColorList();
- else
- {
- if (!pColorList.is())
- pColorList = XColorList::CreateStdColorList();
- return pColorList;
- }
-}
-
void ScDocument::TransferDrawPage(ScDocument* pSrcDoc, SCTAB nSrcPos, SCTAB nDestPos)
{
if (pDrawLayer && pSrcDoc->pDrawLayer)
@@ -232,7 +220,16 @@ bool ScDocument::IsChart( const SdrObject* pObject )
IMPL_LINK( ScDocument, GetUserDefinedColor, sal_uInt16, nColorIndex, Color* )
{
- return const_cast<Color*>(&(GetColorList()->GetColor(nColorIndex)->GetColor()));
+ rtl::Reference<XColorList> xColorList;
+ if (pDrawLayer)
+ xColorList = pDrawLayer->GetColorList();
+ else
+ {
+ if (!pColorList.is())
+ pColorList = XColorList::CreateStdColorList();
+ xColorList = pColorList;
+ }
+ return const_cast<Color*>(&(xColorList->GetColor(nColorIndex)->GetColor()));
}
void ScDocument::DeleteDrawLayer()
@@ -257,17 +254,6 @@ bool ScDocument::DrawGetPrintArea( ScRange& rRange, bool bSetHor, bool bSetVer )
return pDrawLayer->GetPrintArea( rRange, bSetHor, bSetVer );
}
-void ScDocument::DrawMovePage( sal_uInt16 nOldPos, sal_uInt16 nNewPos )
-{
- pDrawLayer->ScMovePage(nOldPos,nNewPos);
-}
-
-void ScDocument::DrawCopyPage( sal_uInt16 nOldPos, sal_uInt16 nNewPos )
-{
- // page is already created in ScTable ctor
- pDrawLayer->ScCopyPage( nOldPos, nNewPos );
-}
-
void ScDocument::DeleteObjectsInArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
const ScMarkData& rMark )
{
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index 390bc0e89c1c..a0e145ec8aab 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -867,7 +867,7 @@ void ScDPSource::CreateRes_Impl()
{
ScDPDimension* pDim = GetDimensionsObject()->getByIndex(*it);
if ( pDim->HasSelectedPage() )
- aInitState.AddMember(*it, GetMemberId(*it, pDim->GetSelectedData()));
+ aInitState.AddMember(*it, GetCache()->GetIdByItemData(*it, pDim->GetSelectedData()));
}
// Show grand total columns only when the option is set *and* there is at
@@ -1384,16 +1384,6 @@ sal_uInt16 ScDPDimension::getOrientation() const
return pSource->GetOrientation( nDim );
}
-void ScDPDimension::setOrientation(sal_uInt16 nNew)
-{
- pSource->SetOrientation( nDim, nNew );
-}
-
-long ScDPDimension::getPosition() const
-{
- return pSource->GetPosition( nDim );
-}
-
bool ScDPDimension::getIsDataLayoutDimension() const
{
return pSource->GetData()->getIsDataLayoutDimension( nDim );
@@ -1503,7 +1493,7 @@ void SAL_CALL ScDPDimension::setPropertyValue( const OUString& aPropertyName, co
{
sheet::DataPilotFieldOrientation eEnum;
if (aValue >>= eEnum)
- setOrientation( sal::static_int_cast<sal_uInt16>(eEnum) );
+ pSource->SetOrientation( nDim, sal::static_int_cast<sal_uInt16>(eEnum) );
}
else if ( aPropertyName == SC_UNO_DP_FUNCTION )
{
@@ -1575,7 +1565,7 @@ uno::Any SAL_CALL ScDPDimension::getPropertyValue( const OUString& aPropertyName
{
uno::Any aRet;
if ( aPropertyName == SC_UNO_DP_POSITION )
- aRet <<= (sal_Int32) getPosition();
+ aRet <<= (sal_Int32) pSource->GetPosition( nDim );
else if ( aPropertyName == SC_UNO_DP_USEDHIERARCHY )
aRet <<= (sal_Int32) getUsedHierarchy();
else if ( aPropertyName == SC_UNO_DP_ORIENTATION )
@@ -2253,7 +2243,7 @@ ScDPMembers::ScDPMembers( ScDPSource* pSrc, long nD, long nH, long nL ) :
case SC_DAPI_LEVEL_YEAR:
{
const ScDPItemData* pLastNumData = nullptr;
- for ( SCROW n = 0 ;n <GetSrcItemsCount() ; n-- )
+ for ( SCROW n = 0; n < (SCROW) pSource->GetData()->GetColumnEntries(nDim).size(); n-- )
{
const ScDPItemData* pData = GetSrcItemDataByIndex( n );
if ( pData && pData->HasStringData() )
@@ -2693,11 +2683,6 @@ const ScDPItemData* ScDPSource::GetItemDataById(long nDim, long nId)
return GetData()->GetMemberById(nDim, nId);
}
-SCROW ScDPSource::GetMemberId(long nDim, const ScDPItemData& rData)
-{
- return GetCache()->GetIdByItemData(nDim, rData);
-}
-
const ScDPItemData* ScDPMembers::GetSrcItemDataByIndex(SCROW nIndex)
{
const std::vector< SCROW >& memberIds = pSource->GetData()->GetColumnEntries( nDim );
@@ -2707,9 +2692,4 @@ const ScDPItemData* ScDPMembers::GetSrcItemDataByIndex(SCROW nIndex)
return pSource->GetItemDataById( nDim, nId );
}
-SCROW ScDPMembers::GetSrcItemsCount()
-{
- return pSource->GetData()->GetColumnEntries(nDim).size();
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/edittextiterator.cxx b/sc/source/core/data/edittextiterator.cxx
index c689ebc65f6b..e225f14af405 100644
--- a/sc/source/core/data/edittextiterator.cxx
+++ b/sc/source/core/data/edittextiterator.cxx
@@ -61,15 +61,6 @@ const EditTextObject* EditTextIterator::seek()
return sc::edittext_block::at(*maPos.first->data, maPos.second);
}
-void EditTextIterator::incPos()
-{
- if (maPos.second + 1 < maPos.first->size)
- // Increment within the block.
- ++maPos.second;
- else
- incBlock();
-}
-
void EditTextIterator::incBlock()
{
++maPos.first;
@@ -92,7 +83,13 @@ const EditTextObject* EditTextIterator::next()
if (maPos.first == miEnd)
return nullptr;
- incPos();
+ // increment position by one
+ if (maPos.second + 1 < maPos.first->size)
+ // Increment within the block.
+ ++maPos.second;
+ else
+ incBlock();
+
return seek();
}
diff --git a/sc/source/core/data/poolhelp.cxx b/sc/source/core/data/poolhelp.cxx
index 28b5ae0a9cb8..32b0bd2cb462 100644
--- a/sc/source/core/data/poolhelp.cxx
+++ b/sc/source/core/data/poolhelp.cxx
@@ -74,8 +74,10 @@ SvNumberFormatter* ScPoolHelper::GetFormTable() const
return pFormTable;
}
-void ScPoolHelper::UseDocOptions() const
+void ScPoolHelper::SetFormTableOpt(const ScDocOptions& rOpt)
{
+ aOpt = rOpt;
+ // #i105512# if the number formatter exists, update its settings
if (pFormTable)
{
sal_uInt16 d,m;
@@ -87,12 +89,6 @@ void ScPoolHelper::UseDocOptions() const
}
}
-void ScPoolHelper::SetFormTableOpt(const ScDocOptions& rOpt)
-{
- aOpt = rOpt;
- UseDocOptions(); // #i105512# if the number formatter exists, update its settings
-}
-
SvNumberFormatter* ScPoolHelper::CreateNumberFormatter() const
{
SvNumberFormatter* p = nullptr;
diff --git a/sc/source/core/inc/poolhelp.hxx b/sc/source/core/inc/poolhelp.hxx
index ff5d68b85fdd..22da03c6fcc1 100644
--- a/sc/source/core/inc/poolhelp.hxx
+++ b/sc/source/core/inc/poolhelp.hxx
@@ -43,8 +43,6 @@ private:
mutable SfxItemPool* pEnginePool; // EditEnginePool
ScDocument* m_pSourceDoc;
- void UseDocOptions() const;
-
public:
ScPoolHelper( ScDocument* pSourceDoc );
virtual ~ScPoolHelper() override;
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index b8da399901a3..c39fdfedb44a 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -284,16 +284,15 @@ bool ScChangeAction::IsMasterDelete() const
void ScChangeAction::RemoveAllLinks()
{
- RemoveAllAnyLinks();
- RemoveAllDeletedIn();
- RemoveAllDeleted();
- RemoveAllDependent();
-}
-
-void ScChangeAction::RemoveAllAnyLinks()
-{
while ( pLinkAny )
delete pLinkAny; // Moves up by itself
+
+ RemoveAllDeletedIn();
+
+ while ( pLinkDeleted )
+ delete pLinkDeleted; // Moves up by itself
+
+ RemoveAllDependent();
}
bool ScChangeAction::RemoveDeletedIn( const ScChangeAction* p )
@@ -382,7 +381,7 @@ bool ScChangeAction::HasDeleted() const
void ScChangeAction::SetDeletedIn( ScChangeAction* p )
{
- ScChangeActionLinkEntry* pLink1 = AddDeletedIn( p );
+ ScChangeActionLinkEntry* pLink1 = new ScChangeActionLinkEntry( GetDeletedInAddress(), p );
ScChangeActionLinkEntry* pLink2;
if ( GetType() == SC_CAT_CONTENT )
pLink2 = p->AddDeleted( static_cast<ScChangeActionContent*>(this)->GetTopContent() );
@@ -391,12 +390,6 @@ void ScChangeAction::SetDeletedIn( ScChangeAction* p )
pLink1->SetLink( pLink2 );
}
-void ScChangeAction::RemoveAllDeleted()
-{
- while ( pLinkDeleted )
- delete pLinkDeleted; // Moves up by itself
-}
-
void ScChangeAction::RemoveAllDependent()
{
while ( pLinkDependent )
diff --git a/sc/source/core/tool/filtopt.cxx b/sc/source/core/tool/filtopt.cxx
index 24a28ea6d6e6..06ab9010447e 100644
--- a/sc/source/core/tool/filtopt.cxx
+++ b/sc/source/core/tool/filtopt.cxx
@@ -33,20 +33,15 @@ using namespace css::uno;
#define SCFILTOPT_ROWSCALE 1
#define SCFILTOPT_WK3 2
-Sequence<OUString> ScFilterOptions::GetPropertyNames()
-{
- return {"MS_Excel/ColScale", // SCFILTOPT_COLSCALE
- "MS_Excel/RowScale", // SCFILTOPT_ROWSCALE
- "Lotus123/WK3"}; // SCFILTOPT_WK3
-}
-
ScFilterOptions::ScFilterOptions() :
ConfigItem( OUString( CFGPATH_FILTER ) ),
bWK3Flag( false ),
fExcelColScale( 0 ),
fExcelRowScale( 0 )
{
- Sequence<OUString> aNames = GetPropertyNames();
+ Sequence<OUString> aNames { "MS_Excel/ColScale", // SCFILTOPT_COLSCALE
+ "MS_Excel/RowScale", // SCFILTOPT_ROWSCALE
+ "Lotus123/WK3" }; // SCFILTOPT_WK3
Sequence<Any> aValues = GetProperties(aNames);
const Any* pValues = aValues.getConstArray();
OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx
index c83ecc7409e2..4619146ea976 100644
--- a/sc/source/filter/excel/excimp8.cxx
+++ b/sc/source/filter/excel/excimp8.cxx
@@ -446,15 +446,6 @@ void ImportExcel8::PostDocLoad()
}
// read doc info (no docshell while pasting from clipboard)
- LoadDocumentProperties();
-
- // #i45843# Pivot tables are now handled outside of PostDocLoad, so they are available
- // when formula cells are calculated, for the GETPIVOTDATA function.
-}
-
-void ImportExcel8::LoadDocumentProperties()
-{
- // no docshell while pasting from clipboard
if( SfxObjectShell* pShell = GetDocShell() )
{
// BIFF5+ without storage is possible
@@ -469,6 +460,9 @@ void ImportExcel8::LoadDocumentProperties()
{
}
}
+
+ // #i45843# Pivot tables are now handled outside of PostDocLoad, so they are available
+ // when formula cells are calculated, for the GETPIVOTDATA function.
}
// autofilter
@@ -788,17 +782,6 @@ void XclImpAutoFilterData::SetExtractPos( const ScAddress& rAddr )
void XclImpAutoFilterData::Apply()
{
- CreateScDBData();
-
- if( bActive )
- {
- InsertQueryParam();
- }
-}
-
-void XclImpAutoFilterData::CreateScDBData()
-{
-
// Create the ScDBData() object if the AutoFilter is activated
// or if we need to create the Advanced Filter.
if( bActive || bCriteria)
@@ -819,6 +802,10 @@ void XclImpAutoFilterData::CreateScDBData()
rDoc.SetAnonymousDBData(Tab(), pCurrDBData);
}
+ if( bActive )
+ {
+ InsertQueryParam();
+ }
}
void XclImpAutoFilterData::EnableRemoveFilter()
diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx
index 928a55eb0a21..62f84eb69ae5 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -723,11 +723,6 @@ void XclExpPivotCache::SaveXml( XclExpXmlStream& /*rStrm*/ )
{
}
-XclExpPCField* XclExpPivotCache::GetFieldAcc( sal_uInt16 nFieldIdx )
-{
- return maFieldList.GetRecord( nFieldIdx ).get();
-}
-
void XclExpPivotCache::AddFields( const ScDPObject& rDPObj )
{
AddStdFields( rDPObj );
@@ -760,7 +755,7 @@ void XclExpPivotCache::AddGroupFields( const ScDPObject& rDPObj )
// loop over all existing standard fields to find their group fields
for( sal_uInt16 nFieldIdx = 0; nFieldIdx < maPCInfo.mnStdFields; ++nFieldIdx )
{
- if( XclExpPCField* pCurrStdField = GetFieldAcc( nFieldIdx ) )
+ if( XclExpPCField* pCurrStdField = maFieldList.GetRecord( nFieldIdx ).get() )
{
const ScDPSaveGroupDimension* pGroupDim = pSaveDimData->GetGroupDimForBase( pCurrStdField->GetFieldName() );
XclExpPCField* pLastGroupField = pCurrStdField;
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index 6204c248e62a..f5944d581626 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -791,9 +791,9 @@ void XclExpPalette::GetMixedColors(
return mxImpl->GetMixedColors( rnXclForeIx, rnXclBackIx, rnXclPattern, nForeColorId, nBackColorId );
}
-ColorData XclExpPalette::GetColorData( sal_uInt16 nXclIndex ) const
+Color XclExpPalette::GetColor( sal_uInt16 nXclIndex ) const
{
- return mxImpl->GetColorData( nXclIndex );
+ return Color(mxImpl->GetColorData( nXclIndex ));
}
void XclExpPalette::Save( XclExpStream& rStrm )
@@ -1234,12 +1234,6 @@ sal_uInt16 XclExpFontBuffer::Insert(
}
sal_uInt16 XclExpFontBuffer::Insert(
- const vcl::Font& rFont, XclExpColorType eColorType, bool bAppFont )
-{
- return Insert( XclFontData( rFont ), eColorType, bAppFont );
-}
-
-sal_uInt16 XclExpFontBuffer::Insert(
const SvxFont& rFont, XclExpColorType eColorType )
{
return Insert( XclFontData( rFont ), eColorType );
@@ -1250,7 +1244,7 @@ sal_uInt16 XclExpFontBuffer::Insert( const SfxItemSet& rItemSet,
{
// #i17050# script type now provided by caller
vcl::Font aFont = XclExpFontHelper::GetFontFromItemSet( GetRoot(), rItemSet, nScript );
- return Insert( aFont, eColorType, bAppFont );
+ return Insert( XclFontData( aFont ), eColorType, bAppFont );
}
void XclExpFontBuffer::Save( XclExpStream& rStrm )
diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx
index ac1202102472..1dcde34ff7ff 100644
--- a/sc/source/filter/excel/xichart.cxx
+++ b/sc/source/filter/excel/xichart.cxx
@@ -2683,7 +2683,7 @@ void XclImpChTypeGroup::Finalize()
bool bStockChart =
(maType.GetRecId() == EXC_ID_CHLINE) && // must be a line chart
!mxChart3d && // must be a 2d chart
- HasHiLoLine() && // must contain hi-lo lines
+ m_ChartLines.find(EXC_CHCHARTLINE_HILO) != m_ChartLines.end() && // must contain hi-lo lines
(maSeries.size() == static_cast<XclImpChSeriesVec::size_type>(HasDropBars() ? 4 : 3)); // correct series count
maType.Finalize( bStockChart );
@@ -3293,7 +3293,7 @@ Reference< XAxis > XclImpChAxis::CreateAxis( const XclImpChTypeGroup& rTypeGroup
{
ScfPropertySet aAxisProp( xAxis );
// #i58688# axis enabled
- aAxisProp.SetBoolProperty( EXC_CHPROP_SHOW, IsActivated() );
+ aAxisProp.SetBoolProperty( EXC_CHPROP_SHOW, !mxAxisLine || mxAxisLine->IsShowAxis() );
// axis line properties
if( mxAxisLine )
@@ -3305,8 +3305,8 @@ Reference< XAxis > XclImpChAxis::CreateAxis( const XclImpChTypeGroup& rTypeGroup
// axis caption text --------------------------------------------------
// radar charts disable their category labels via chart type, not via axis
- bool bHasLabels = HasLabels() &&
- ((GetAxisType() != EXC_CHAXIS_X) || rTypeGroup.HasCategoryLabels());
+ bool bHasLabels = (!mxTick || mxTick->HasLabels()) &&
+ ((GetAxisType() != EXC_CHAXIS_X) || rTypeGroup.HasCategoryLabels());
aAxisProp.SetBoolProperty( EXC_CHPROP_DISPLAYLABELS, bHasLabels );
if( bHasLabels )
{
@@ -3377,7 +3377,7 @@ Reference< XAxis > XclImpChAxis::CreateAxis( const XclImpChTypeGroup& rTypeGroup
// main grid
ScfPropertySet aGridProp( xAxis->getGridProperties() );
- aGridProp.SetBoolProperty( EXC_CHPROP_SHOW, HasMajorGrid() );
+ aGridProp.SetBoolProperty( EXC_CHPROP_SHOW, (bool)mxMajorGrid );
if( mxMajorGrid )
mxMajorGrid->Convert( GetChRoot(), aGridProp, EXC_CHOBJTYPE_GRIDLINE );
// sub grid
@@ -3385,7 +3385,7 @@ Reference< XAxis > XclImpChAxis::CreateAxis( const XclImpChTypeGroup& rTypeGroup
if( aSubGridPropSeq.hasElements() )
{
ScfPropertySet aSubGridProp( aSubGridPropSeq[ 0 ] );
- aSubGridProp.SetBoolProperty( EXC_CHPROP_SHOW, HasMinorGrid() );
+ aSubGridProp.SetBoolProperty( EXC_CHPROP_SHOW, (bool)mxMinorGrid );
if( mxMinorGrid )
mxMinorGrid->Convert( GetChRoot(), aSubGridProp, EXC_CHOBJTYPE_GRIDLINE );
}
diff --git a/sc/source/filter/excel/xihelper.cxx b/sc/source/filter/excel/xihelper.cxx
index 24fd6bb6cb87..c20dd531b0c0 100644
--- a/sc/source/filter/excel/xihelper.cxx
+++ b/sc/source/filter/excel/xihelper.cxx
@@ -497,11 +497,6 @@ sal_uInt16 XclImpHFConverter::GetMaxLineHeight( XclImpHFPortion ePortion ) const
return (nMaxHt == 0) ? mxFontData->mnHeight : nMaxHt;
}
-sal_uInt16 XclImpHFConverter::GetCurrMaxLineHeight() const
-{
- return GetMaxLineHeight( meCurrObj );
-}
-
void XclImpHFConverter::UpdateMaxLineHeight( XclImpHFPortion ePortion )
{
sal_uInt16& rnMaxHt = maInfos[ ePortion ].mnMaxLineHt;
@@ -564,7 +559,7 @@ void XclImpHFConverter::InsertLineBreak()
mrEE.QuickInsertText( OUString('\n'), ESelection( rSel.nEndPara, rSel.nEndPos, rSel.nEndPara, rSel.nEndPos ) );
++rSel.nEndPara;
rSel.nEndPos = 0;
- GetCurrInfo().mnHeight += GetCurrMaxLineHeight();
+ GetCurrInfo().mnHeight += GetMaxLineHeight( meCurrObj );
GetCurrInfo().mnMaxLineHt = 0;
}
diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx
index 11fe5a15bde4..d8844fe65b15 100644
--- a/sc/source/filter/excel/xipivot.cxx
+++ b/sc/source/filter/excel/xipivot.cxx
@@ -596,11 +596,6 @@ XclImpPivotCache::~XclImpPivotCache()
// data access ----------------------------------------------------------------
-sal_uInt16 XclImpPivotCache::GetFieldCount() const
-{
- return static_cast< sal_uInt16 >( maFields.size() );
-}
-
const XclImpPCField* XclImpPivotCache::GetField( sal_uInt16 nFieldIdx ) const
{
return (nFieldIdx < maFields.size()) ? maFields[ nFieldIdx ].get() : nullptr;
@@ -744,7 +739,7 @@ void XclImpPivotCache::ReadPivotCacheStream( XclImpStream& rStrm )
case EXC_ID_SXFIELD:
{
xCurrField.reset();
- sal_uInt16 nNewFieldIdx = GetFieldCount();
+ sal_uInt16 nNewFieldIdx = static_cast< sal_uInt16 >( maFields.size() );
if( nNewFieldIdx < EXC_PC_MAXFIELDCOUNT )
{
xCurrField.reset( new XclImpPCField( GetRoot(), *this, nNewFieldIdx ) );
@@ -841,7 +836,7 @@ void XclImpPivotCache::ReadPivotCacheStream( XclImpStream& rStrm )
OSL_ENSURE( maPCInfo.mnTotalFields == maFields.size(),
"XclImpPivotCache::ReadPivotCacheStream - field count mismatch" );
- if (HasCacheRecords())
+ if (static_cast<bool>(maPCInfo.mnFlags & EXC_SXDB_SAVEDATA))
{
SCROW nNewEnd = maSrcRange.aStart.Row() + maPCInfo.mnSrcRecs;
maSrcRange.aEnd.SetRow(nNewEnd);
@@ -859,11 +854,6 @@ void XclImpPivotCache::ReadPivotCacheStream( XclImpStream& rStrm )
}
}
-bool XclImpPivotCache::HasCacheRecords() const
-{
- return static_cast<bool>(maPCInfo.mnFlags & EXC_SXDB_SAVEDATA);
-}
-
bool XclImpPivotCache::IsRefreshOnLoad() const
{
return static_cast<bool>(maPCInfo.mnFlags & EXC_SXDB_REFRESH_LOAD);
@@ -1141,7 +1131,8 @@ ScDPSaveDimension* XclImpPTField::ConvertRCPField( ScDPSaveData& rSaveData ) con
void XclImpPTField::ConvertFieldInfo( ScDPSaveDimension& rSaveDim ) const
{
rSaveDim.SetShowEmpty( ::get_flag( maFieldExtInfo.mnFlags, EXC_SXVDEX_SHOWALL ) );
- ConvertItems( rSaveDim );
+ for( XclImpPTItemVec::const_iterator aIt = maItems.begin(), aEnd = maItems.end(); aIt != aEnd; ++aIt )
+ (*aIt)->ConvertItem( rSaveDim );
}
void XclImpPTField::ConvertDataField( ScDPSaveDimension& rSaveDim, const XclPTDataFieldInfo& rDataInfo ) const
@@ -1184,12 +1175,6 @@ void XclImpPTField::ConvertDataFieldInfo( ScDPSaveDimension& rSaveDim, const Xcl
rSaveDim.SetReferenceValue(&aFieldRef);
}
-void XclImpPTField::ConvertItems( ScDPSaveDimension& rSaveDim ) const
-{
- for( XclImpPTItemVec::const_iterator aIt = maItems.begin(), aEnd = maItems.end(); aIt != aEnd; ++aIt )
- (*aIt)->ConvertItem( rSaveDim );
-}
-
XclImpPivotTable::XclImpPivotTable( const XclImpRoot& rRoot ) :
XclImpRoot( rRoot ),
maDataOrientField( *this, EXC_SXIVD_DATA ),
diff --git a/sc/source/filter/excel/xistream.cxx b/sc/source/filter/excel/xistream.cxx
index 4f28d9c5101f..c690970f4311 100644
--- a/sc/source/filter/excel/xistream.cxx
+++ b/sc/source/filter/excel/xistream.cxx
@@ -512,14 +512,9 @@ void XclImpStream::CopyDecrypterFrom( const XclImpStream& rStrm )
SetDecrypter( xNewDecr );
}
-bool XclImpStream::HasValidDecrypter() const
-{
- return mxDecrypter && mxDecrypter->IsValid();
-}
-
void XclImpStream::EnableDecryption( bool bEnable )
{
- mbUseDecr = bEnable && HasValidDecrypter();
+ mbUseDecr = bEnable && mxDecrypter && mxDecrypter->IsValid();
}
void XclImpStream::PushPosition()
@@ -950,7 +945,7 @@ OUString XclImpStream::ReadRawByteString( sal_uInt16 nChars )
OUString XclImpStream::ReadByteString( bool b16BitLen )
{
- return ReadRawByteString( ReadByteStrLen( b16BitLen ) );
+ return ReadRawByteString( b16BitLen ? ReaduInt16() : ReaduInt8() );
}
// private --------------------------------------------------------------------
diff --git a/sc/source/filter/excel/xistring.cxx b/sc/source/filter/excel/xistring.cxx
index 6475619f848a..959db49e4eaf 100644
--- a/sc/source/filter/excel/xistring.cxx
+++ b/sc/source/filter/excel/xistring.cxx
@@ -79,7 +79,7 @@ void XclImpString::Read( XclImpStream& rStrm, XclStrFlags nFlags )
// --- formatting ---
if( nRunCount > 0 )
- ReadFormats( rStrm, nRunCount );
+ ReadFormats( rStrm, maFormats, nRunCount );
// --- extended (FarEast) information ---
rStrm.Ignore( nExtInf );
diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx
index c0a4bb5cc9c8..6c7287a7d4ec 100644
--- a/sc/source/filter/excel/xistyle.cxx
+++ b/sc/source/filter/excel/xistyle.cxx
@@ -1910,7 +1910,7 @@ void XclImpXFRangeBuffer::SetXF( const ScAddress& rScPos, sal_uInt16 nXFIndex, X
if (pRange && (pRange->aEnd.Row() == nScRow) && (pRange->aEnd.Col() + 1 == nScCol) && (eMode == xlXFModeBlank))
pRange->aEnd.IncCol();
else if( eMode != xlXFModeBlank ) // do not merge empty cells
- SetMerge( nScCol, nScRow );
+ maMergeList.Append( ScRange( nScCol, nScRow, 0 ) );
}
}
}
@@ -1968,11 +1968,6 @@ void XclImpXFRangeBuffer::SetHyperlink( const XclRange& rXclRange, const OUStrin
maHyperlinks.push_back( XclImpHyperlinkRange( rXclRange, rUrl ) );
}
-void XclImpXFRangeBuffer::SetMerge( SCCOL nScCol, SCROW nScRow )
-{
- maMergeList.Append( ScRange( nScCol, nScRow, 0 ) );
-}
-
void XclImpXFRangeBuffer::SetMerge( SCCOL nScCol1, SCROW nScRow1, SCCOL nScCol2, SCROW nScRow2 )
{
if( (nScCol1 < nScCol2) || (nScRow1 < nScRow2) )
diff --git a/sc/source/filter/html/htmlimp.cxx b/sc/source/filter/html/htmlimp.cxx
index 7af6d8fe928c..1edc926379ab 100644
--- a/sc/source/filter/html/htmlimp.cxx
+++ b/sc/source/filter/html/htmlimp.cxx
@@ -120,7 +120,7 @@ void ScHTMLImport::WriteToDocument(
{
ScEEImport::WriteToDocument( bSizeColsRows, nOutputFactor, pFormatter, bConvertDate );
- const ScHTMLParser* pParser = GetParser();
+ const ScHTMLParser* pParser = static_cast<ScHTMLParser*>(mpParser);
const ScHTMLTable* pGlobTable = pParser->GetGlobalTable();
if( !pGlobTable )
return;
diff --git a/sc/source/filter/inc/XclImpChangeTrack.hxx b/sc/source/filter/inc/XclImpChangeTrack.hxx
index ac296e37711c..f38e53ecc5c3 100644
--- a/sc/source/filter/inc/XclImpChangeTrack.hxx
+++ b/sc/source/filter/inc/XclImpChangeTrack.hxx
@@ -72,8 +72,6 @@ private:
void DoDeleteRange( const ScRange& rRange );
inline sal_uInt8 LookAtuInt8();
- inline double ReadRK();
- inline bool ReadBool();
inline void Read2DAddress( ScAddress& rAddress );
inline void Read2DRange( ScRange& rRange );
SCTAB ReadTabNum();
@@ -118,16 +116,6 @@ inline sal_uInt8 XclImpChangeTrack::LookAtuInt8()
return nValue;
}
-inline double XclImpChangeTrack::ReadRK()
-{
- return XclTools::GetDoubleFromRK( pStrm->ReadInt32() );
-}
-
-inline bool XclImpChangeTrack::ReadBool()
-{
- return (pStrm->ReaduInt16() != 0);
-}
-
inline void XclImpChangeTrack::Read2DAddress( ScAddress& rAddress )
{
rAddress.SetRow( static_cast<SCROW>(pStrm->ReaduInt16()) );
diff --git a/sc/source/filter/inc/excimp8.hxx b/sc/source/filter/inc/excimp8.hxx
index be0c7d8b591c..4677de7ed595 100644
--- a/sc/source/filter/inc/excimp8.hxx
+++ b/sc/source/filter/inc/excimp8.hxx
@@ -60,9 +60,6 @@ public:
virtual void PostDocLoad() override;
private:
- void LoadDocumentProperties();
-
-private:
// represents codename ( and associated modules )
// not speficied directly in the binary format
std::vector<OUString> maAutoGeneratedCodeNames;
@@ -105,7 +102,6 @@ public:
void SetExtractPos( const ScAddress& rAddr );
inline void SetAutoOrAdvanced() { bAutoOrAdvanced = true; }
void Apply();
- void CreateScDBData();
void EnableRemoveFilter();
};
diff --git a/sc/source/filter/inc/htmlimp.hxx b/sc/source/filter/inc/htmlimp.hxx
index e67c0b2ccfe3..ff36053ad80d 100644
--- a/sc/source/filter/inc/htmlimp.hxx
+++ b/sc/source/filter/inc/htmlimp.hxx
@@ -31,7 +31,6 @@ private:
public:
ScHTMLImport( ScDocument* pDoc, const OUString& rBaseURL, const ScRange& rRange, bool bCalcWidthHeight );
virtual ~ScHTMLImport() override;
- const ScHTMLParser* GetParser() const { return static_cast<ScHTMLParser*>(mpParser); }
virtual void WriteToDocument( bool bSizeColsRows = false, double nOutputFactor = 1.0,
SvNumberFormatter* pFormatter = nullptr, bool bConvertDate = true ) override;
diff --git a/sc/source/filter/inc/sheetdatabuffer.hxx b/sc/source/filter/inc/sheetdatabuffer.hxx
index 9d5c54e8cb9d..9da32e68a304 100644
--- a/sc/source/filter/inc/sheetdatabuffer.hxx
+++ b/sc/source/filter/inc/sheetdatabuffer.hxx
@@ -140,10 +140,6 @@ public:
void setRowFormat( sal_Int32 nRow, sal_Int32 nXfId, bool bCustomFormat );
/** Merges the cells in the passed cell range. */
void setMergedRange( const css::table::CellRangeAddress& rRange );
- /** Sets a standard number format (constant from com.sun.star.util.NumberFormat) to the specified cell. */
- void setStandardNumFmt(
- const ScAddress& rCellAddr,
- sal_Int16 nStdNumFmt );
/** Processes the cell formatting data of the passed cell. */
void setCellFormat( const CellModel& rModel );
diff --git a/sc/source/filter/inc/viewsettings.hxx b/sc/source/filter/inc/viewsettings.hxx
index 7cbbf1a0d03c..951e0e2e3ecd 100644
--- a/sc/source/filter/inc/viewsettings.hxx
+++ b/sc/source/filter/inc/viewsettings.hxx
@@ -79,8 +79,6 @@ struct SheetViewModel
/** Returns the grid color as RGB value. */
sal_Int32 getGridColor( const ::oox::core::FilterBase& rFilter ) const;
- /** Returns the selection data, if available, otherwise 0. */
- const PaneSelectionModel* getPaneSelection( sal_Int32 nPaneId ) const;
/** Returns the selection data of the active pane. */
const PaneSelectionModel* getActiveSelection() const;
/** Returns read/write access to the selection data of the specified pane. */
diff --git a/sc/source/filter/inc/xepivot.hxx b/sc/source/filter/inc/xepivot.hxx
index c8c1fbbf02dc..8d9cd54770c1 100644
--- a/sc/source/filter/inc/xepivot.hxx
+++ b/sc/source/filter/inc/xepivot.hxx
@@ -186,9 +186,6 @@ public:
static void SaveXml( XclExpXmlStream& rStrm );
private:
- /** Returns read/write access to a pivot cache field. */
- XclExpPCField* GetFieldAcc( sal_uInt16 nFieldIdx );
-
/** Adds all pivot cache fields. */
void AddFields( const ScDPObject& rDPObj );
diff --git a/sc/source/filter/inc/xestyle.hxx b/sc/source/filter/inc/xestyle.hxx
index 364f37242cef..544b1280a03a 100644
--- a/sc/source/filter/inc/xestyle.hxx
+++ b/sc/source/filter/inc/xestyle.hxx
@@ -101,13 +101,9 @@ public:
sal_uInt16& rnXclForeIx, sal_uInt16& rnXclBackIx, sal_uInt8& rnXclPattern,
sal_uInt32 nForeColorId, sal_uInt32 nBackColorId ) const;
- /** Returns the RGB color data for a (non-zero-based) Excel palette entry.
- @return The color from current or default palette or COL_AUTO, if nothing else found. */
- ColorData GetColorData( sal_uInt16 nXclIndex ) const;
/** Returns the color for a (non-zero-based) Excel palette entry.
@return The color from current or default palette or COL_AUTO, if nothing else found. */
- inline Color GetColor( sal_uInt16 nXclIndex ) const
- { return Color( GetColorData( nXclIndex ) ); }
+ Color GetColor( sal_uInt16 nXclIndex ) const;
/** Saves the PALETTE record, if it differs from the default palette. */
virtual void Save( XclExpStream& rStrm ) override;
@@ -228,11 +224,6 @@ public:
@return The resulting Excel font index. */
sal_uInt16 Insert( const XclFontData& rFontData,
XclExpColorType eColorType, bool bAppFont = false );
- /** Inserts the font into the buffer if not present.
- @param bAppFont true = Sets the application font; false = Inserts a new font.
- @return The resulting Excel font index. */
- sal_uInt16 Insert( const vcl::Font& rFont,
- XclExpColorType eColorType, bool bAppFont );
/** Inserts the SvxFont into the buffer if not present, e.g. where escapements are used.
@return The resulting Excel font index. */
sal_uInt16 Insert( const SvxFont& rFont,
diff --git a/sc/source/filter/inc/xichart.hxx b/sc/source/filter/inc/xichart.hxx
index d97c722d387a..3a5272da7e6f 100644
--- a/sc/source/filter/inc/xichart.hxx
+++ b/sc/source/filter/inc/xichart.hxx
@@ -1021,8 +1021,6 @@ private:
/** Reads a CHDATAFORMAT record group (default series format). */
void ReadChDataFormat( XclImpStream& rStrm );
- /** Returns true, if the chart type group contains a hi-lo line format. */
- inline bool HasHiLoLine() const { return m_ChartLines.find(EXC_CHCHARTLINE_HILO) != m_ChartLines.end(); }
/** Returns true, if the chart type group contains drop bar formats. */
inline bool HasDropBars() const { return !m_DropBars.empty(); }
@@ -1149,14 +1147,6 @@ public:
inline sal_uInt16 GetAxisType() const { return maData.mnType; }
/** Returns the axis dimension index used by the chart API. */
inline sal_Int32 GetApiAxisDimension() const { return maData.GetApiAxisDimension(); }
- /** Returns true, if the axis is active. */
- inline bool IsActivated() const { return !mxAxisLine || mxAxisLine->IsShowAxis(); }
- /** Returns true, if the axis contains caption labels. */
- inline bool HasLabels() const { return !mxTick || mxTick->HasLabels(); }
- /** Returns true, if the axis shows its major grid lines. */
- inline bool HasMajorGrid() const { return static_cast< bool >(mxMajorGrid); }
- /** Returns true, if the axis shows its minor grid lines. */
- inline bool HasMinorGrid() const { return static_cast< bool >(mxMinorGrid); }
/** Creates an API axis object. */
css::uno::Reference< css::chart2::XAxis >
diff --git a/sc/source/filter/inc/xihelper.hxx b/sc/source/filter/inc/xihelper.hxx
index 6677eeb4b718..a523231f1c76 100644
--- a/sc/source/filter/inc/xihelper.hxx
+++ b/sc/source/filter/inc/xihelper.hxx
@@ -209,8 +209,6 @@ private:
/** Returns the maximum line height of the specified portion. */
sal_uInt16 GetMaxLineHeight( XclImpHFPortion ePortion ) const;
- /** Returns the current maximum line height. */
- sal_uInt16 GetCurrMaxLineHeight() const;
/** Updates the maximum line height of the specified portion, using the current font size. */
void UpdateMaxLineHeight( XclImpHFPortion ePortion );
diff --git a/sc/source/filter/inc/xipivot.hxx b/sc/source/filter/inc/xipivot.hxx
index bfdb553b2f25..8bf43053b343 100644
--- a/sc/source/filter/inc/xipivot.hxx
+++ b/sc/source/filter/inc/xipivot.hxx
@@ -153,8 +153,6 @@ public:
const OUString& GetSourceRangeName() const { return maSrcRangeName; }
- /** Returns the number of pivot cache fields. */
- sal_uInt16 GetFieldCount() const;
/** Returns read-only access to a pivot cache field. */
const XclImpPCField* GetField( sal_uInt16 nFieldIdx ) const;
@@ -174,7 +172,6 @@ public:
/** Reads the entire pivot cache stream. Uses decrypter from passed stream. */
void ReadPivotCacheStream( XclImpStream& rStrm );
- bool HasCacheRecords() const;
bool IsRefreshOnLoad() const;
bool IsValid() const;
@@ -277,7 +274,6 @@ private:
void ConvertDataField( ScDPSaveDimension& rSaveDim, const XclPTDataFieldInfo& rDataInfo ) const;
void ConvertDataFieldInfo( ScDPSaveDimension& rSaveDim, const XclPTDataFieldInfo& rDataInfo ) const;
- void ConvertItems( ScDPSaveDimension& rSaveDim ) const;
private:
typedef ::std::list< XclPTDataFieldInfo > XclPTDataFieldInfoList;
diff --git a/sc/source/filter/inc/xistream.hxx b/sc/source/filter/inc/xistream.hxx
index 3a53643ef1cf..8c5567591b1e 100644
--- a/sc/source/filter/inc/xistream.hxx
+++ b/sc/source/filter/inc/xistream.hxx
@@ -323,8 +323,6 @@ public:
void SetDecrypter( XclImpDecrypterRef const & xDecrypter );
/** Sets decrypter from another stream. */
void CopyDecrypterFrom( const XclImpStream& rStrm );
- /** Returns true, if a valid decrypter is set at the stream. */
- bool HasValidDecrypter() const;
/** Switches usage of current decryption algorithm on/off.
@descr Encryption is re-enabled automatically, if a new record is
started using the function StartNextRecord(). */
@@ -510,10 +508,6 @@ private:
@return Count of bytes really read. */
sal_uInt16 ReadRawData( void* pData, sal_uInt16 nBytes );
- /** Reads 8 bit/16 bit string length. */
- inline sal_uInt16 ReadByteStrLen( bool b16BitLen )
- { return b16BitLen ? ReaduInt16() : ReaduInt8(); }
-
private:
typedef ::std::vector< XclImpStreamPos > XclImpStreamPosStack;
diff --git a/sc/source/filter/inc/xistring.hxx b/sc/source/filter/inc/xistring.hxx
index 9105dbbbe237..0cf90c0e53d9 100644
--- a/sc/source/filter/inc/xistring.hxx
+++ b/sc/source/filter/inc/xistring.hxx
@@ -46,8 +46,6 @@ public:
inline void SetFormats( const XclFormatRunVec& rFormats ) { maFormats = rFormats; }
/** Reads and appends the formatting information (run count and runs) from stream. */
inline void ReadFormats( XclImpStream& rStrm ) { ReadFormats( rStrm, maFormats ); }
- /** Reads and appends nRunCount formatting runs from stream. */
- inline void ReadFormats( XclImpStream& rStrm, sal_uInt16 nRunCount ) { ReadFormats( rStrm, maFormats, nRunCount ); }
/** Reads and appends formatting runs from an OBJ or TXO record. */
inline void ReadObjFormats( XclImpStream& rStrm, sal_uInt16 nFormatSize ) { ReadObjFormats( rStrm, maFormats, nFormatSize ); }
diff --git a/sc/source/filter/inc/xistyle.hxx b/sc/source/filter/inc/xistyle.hxx
index f537b4916d60..eb4c0c5e618a 100644
--- a/sc/source/filter/inc/xistyle.hxx
+++ b/sc/source/filter/inc/xistyle.hxx
@@ -638,8 +638,6 @@ public:
/** Inserts a range of hyperlink cells. */
void SetHyperlink( const XclRange& rXclRange, const OUString& rUrl );
- /** Inserts the first cell of a merged cell range. */
- void SetMerge( SCCOL nScCol, SCROW nScRow );
/** Inserts a complete merged cell range. */
void SetMerge( SCCOL nScCol1, SCROW nScRow1, SCCOL nScCol2, SCROW nScRow2 );
diff --git a/sc/source/filter/oox/pagesettings.cxx b/sc/source/filter/oox/pagesettings.cxx
index ee4cf260d620..b5bd39b5c152 100644
--- a/sc/source/filter/oox/pagesettings.cxx
+++ b/sc/source/filter/oox/pagesettings.cxx
@@ -393,8 +393,6 @@ private:
/** Returns the current line height of the specified portion. */
double getCurrHeight( HFPortionId ePortion ) const;
- /** Returns the current line height. */
- double getCurrHeight() const;
/** Updates the current line height of the specified portion, using the current font size. */
void updateCurrHeight( HFPortionId ePortion );
@@ -736,11 +734,6 @@ double HeaderFooterParser::getCurrHeight( HFPortionId ePortion ) const
return (fMaxHt == 0.0) ? maFontModel.mfHeight : fMaxHt;
}
-double HeaderFooterParser::getCurrHeight() const
-{
- return getCurrHeight( meCurrPortion );
-}
-
void HeaderFooterParser::updateCurrHeight( HFPortionId ePortion )
{
double& rfMaxHt = maPortions[ ePortion ].mfCurrHeight;
@@ -782,7 +775,7 @@ void HeaderFooterParser::appendLineBreak()
{
getEndPos()->gotoEnd( false );
getEndPos()->setString( OUString( '\n' ) );
- getPortion().mfTotalHeight += getCurrHeight();
+ getPortion().mfTotalHeight += getCurrHeight( meCurrPortion ); // add the current line height.
getPortion().mfCurrHeight = 0;
}
diff --git a/sc/source/filter/oox/sheetdatabuffer.cxx b/sc/source/filter/oox/sheetdatabuffer.cxx
index ba0ff4bb7135..fd4c9f1e6ee3 100644
--- a/sc/source/filter/oox/sheetdatabuffer.cxx
+++ b/sc/source/filter/oox/sheetdatabuffer.cxx
@@ -179,7 +179,18 @@ void SheetDataBuffer::setDateTimeCell( const CellModel& rModel, const css::util:
// set appropriate number format
using namespace ::com::sun::star::util::NumberFormat;
sal_Int16 nStdFmt = (fSerial < 1.0) ? TIME : (((rDateTime.Hours > 0) || (rDateTime.Minutes > 0) || (rDateTime.Seconds > 0)) ? DATETIME : DATE);
- setStandardNumFmt( rModel.maCellAddr, nStdFmt );
+ // set number format
+ try
+ {
+ Reference< XNumberFormatsSupplier > xNumFmtsSupp( getDocument(), UNO_QUERY_THROW );
+ Reference< XNumberFormatTypes > xNumFmtTypes( xNumFmtsSupp->getNumberFormats(), UNO_QUERY_THROW );
+ sal_Int32 nIndex = xNumFmtTypes->getStandardFormat( nStdFmt, Locale() );
+ PropertySet aPropSet( getCell( rModel.maCellAddr ) );
+ aPropSet.setProperty( PROP_NumberFormat, nIndex );
+ }
+ catch( Exception& )
+ {
+ }
}
void SheetDataBuffer::setBooleanCell( const CellModel& rModel, bool bValue )
@@ -315,21 +326,6 @@ void SheetDataBuffer::setMergedRange( const CellRangeAddress& rRange )
maMergedRanges.push_back( MergedRange( rRange ) );
}
-void SheetDataBuffer::setStandardNumFmt( const ScAddress& rCellAddr, sal_Int16 nStdNumFmt )
-{
- try
- {
- Reference< XNumberFormatsSupplier > xNumFmtsSupp( getDocument(), UNO_QUERY_THROW );
- Reference< XNumberFormatTypes > xNumFmtTypes( xNumFmtsSupp->getNumberFormats(), UNO_QUERY_THROW );
- sal_Int32 nIndex = xNumFmtTypes->getStandardFormat( nStdNumFmt, Locale() );
- PropertySet aPropSet( getCell( rCellAddr ) );
- aPropSet.setProperty( PROP_NumberFormat, nIndex );
- }
- catch( Exception& )
- {
- }
-}
-
typedef std::pair<sal_Int32, sal_Int32> FormatKeyPair;
void addIfNotInMyMap( StylesBuffer& rStyles, std::map< FormatKeyPair, ApiCellRangeList >& rMap, sal_Int32 nXfId, sal_Int32 nFormatId, const ApiCellRangeList& rRangeList )
diff --git a/sc/source/filter/oox/viewsettings.cxx b/sc/source/filter/oox/viewsettings.cxx
index b8d7cdba3ea3..8a4dcaa2ffc5 100644
--- a/sc/source/filter/oox/viewsettings.cxx
+++ b/sc/source/filter/oox/viewsettings.cxx
@@ -160,14 +160,9 @@ sal_Int32 SheetViewModel::getGridColor( const FilterBase& rFilter ) const
return mbDefGridColor ? API_RGB_TRANSPARENT : maGridColor.getColor( rFilter.getGraphicHelper() );
}
-const PaneSelectionModel* SheetViewModel::getPaneSelection( sal_Int32 nPaneId ) const
-{
- return maPaneSelMap.get( nPaneId ).get();
-}
-
const PaneSelectionModel* SheetViewModel::getActiveSelection() const
{
- return getPaneSelection( mnActivePaneId );
+ return maPaneSelMap.get( mnActivePaneId ).get();
}
PaneSelectionModel& SheetViewModel::createPaneSelection( sal_Int32 nPaneId )
diff --git a/sc/source/filter/xcl97/XclImpChangeTrack.cxx b/sc/source/filter/xcl97/XclImpChangeTrack.cxx
index 86ba23c95e17..6b1b40e5c839 100644
--- a/sc/source/filter/xcl97/XclImpChangeTrack.cxx
+++ b/sc/source/filter/xcl97/XclImpChangeTrack.cxx
@@ -227,7 +227,7 @@ void XclImpChangeTrack::ReadCell(
break;
case EXC_CHTR_TYPE_RK:
{
- double fValue = ReadRK();
+ double fValue = XclTools::GetDoubleFromRK( pStrm->ReadInt32() );
if( pStrm->IsValid() )
{
rCell.meType = CELLTYPE_VALUE;
@@ -257,7 +257,7 @@ void XclImpChangeTrack::ReadCell(
break;
case EXC_CHTR_TYPE_BOOL:
{
- double fValue = (double) ReadBool();
+ double fValue = (double) (pStrm->ReaduInt16() != 0);
if( pStrm->IsValid() )
{
rCell.meType = CELLTYPE_VALUE;
diff --git a/sc/source/filter/xml/XMLColumnRowGroupExport.cxx b/sc/source/filter/xml/XMLColumnRowGroupExport.cxx
index c5bc808a120d..6ccf3cac4bc0 100644
--- a/sc/source/filter/xml/XMLColumnRowGroupExport.cxx
+++ b/sc/source/filter/xml/XMLColumnRowGroupExport.cxx
@@ -132,11 +132,6 @@ bool ScMyOpenCloseColumnRowGroup::IsGroupEnd(const sal_Int32 nField)
return bGroupEnd;
}
-void ScMyOpenCloseColumnRowGroup::CloseGroup()
-{
- rExport.EndElement( rName, true );
-}
-
void ScMyOpenCloseColumnRowGroup::CloseGroups(const sal_Int32 nField)
{
ScMyFieldGroupVec::iterator aItr(aTableEnd.begin());
@@ -145,7 +140,7 @@ void ScMyOpenCloseColumnRowGroup::CloseGroups(const sal_Int32 nField)
{
if (*aItr == nField)
{
- CloseGroup();
+ rExport.EndElement( rName, true );
aItr = aTableEnd.erase(aItr);
}
else
diff --git a/sc/source/filter/xml/XMLColumnRowGroupExport.hxx b/sc/source/filter/xml/XMLColumnRowGroupExport.hxx
index 007e8a61df70..103843f6bb91 100644
--- a/sc/source/filter/xml/XMLColumnRowGroupExport.hxx
+++ b/sc/source/filter/xml/XMLColumnRowGroupExport.hxx
@@ -47,7 +47,6 @@ class ScMyOpenCloseColumnRowGroup
ScMyFieldGroupVec aTableEnd;
void OpenGroup(const ScMyColumnRowGroup& rGroup);
- void CloseGroup();
public:
ScMyOpenCloseColumnRowGroup(ScXMLExport& rExport, sal_uInt32 nToken);
~ScMyOpenCloseColumnRowGroup();
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index 4633eb71daa6..42780fdfac98 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -331,15 +331,6 @@ void ScXMLTableRowCellContext::LockSolarMutex()
}
}
-void ScXMLTableRowCellContext::UnlockSolarMutex()
-{
- if (bSolarMutexLocked)
- {
- GetScImport().UnlockSolarMutex();
- bSolarMutexLocked = false;
- }
-}
-
namespace {
bool cellExists( const ScAddress& rCellPos )
@@ -1278,11 +1269,6 @@ void ScXMLTableRowCellContext::AddTextAndValueCell( const ScAddress& rCellPos,
}
}
-bool ScXMLTableRowCellContext::HasSpecialContent() const
-{
- return (mxAnnotationData.get() || pDetectiveObjVec || pCellRangeSource);
-}
-
bool ScXMLTableRowCellContext::CellsAreRepeated() const
{
return ( (nColsRepeated > 1) || (nRepeatedRows > 1) );
@@ -1340,7 +1326,7 @@ void ScXMLTableRowCellContext::AddNonFormulaCell( const ScAddress& rCellPos )
}
ScAddress aCurrentPos( rCellPos );
- if( HasSpecialContent() )
+ if( mxAnnotationData.get() || pDetectiveObjVec || pCellRangeSource ) // has special content
bIsEmpty = false;
AddTextAndValueCell( rCellPos, pOUText, aCurrentPos );
@@ -1526,7 +1512,12 @@ void ScXMLTableRowCellContext::EndElement()
else
AddNonFormulaCell(aCellPos);
- UnlockSolarMutex(); //if LockSolarMutex got used, we presumably need to ensure an UnlockSolarMutex
+ //if LockSolarMutex got used, we presumably need to ensure an UnlockSolarMutex
+ if (bSolarMutexLocked)
+ {
+ GetScImport().UnlockSolarMutex();
+ bSolarMutexLocked = false;
+ }
bIsMerged = false;
nMergedCols = 1;
diff --git a/sc/source/filter/xml/xmlcelli.hxx b/sc/source/filter/xml/xmlcelli.hxx
index 21a9f21b3bc6..b84be0a45a2e 100644
--- a/sc/source/filter/xml/xmlcelli.hxx
+++ b/sc/source/filter/xml/xmlcelli.hxx
@@ -103,9 +103,7 @@ class ScXMLTableRowCellContext : public ScXMLImportContext
void SetContentValidation( const ScAddress& rScCellPos );
void LockSolarMutex();
- void UnlockSolarMutex();
- bool HasSpecialContent() const;
bool CellsAreRepeated() const;
void SetFormulaCell ( ScFormulaCell* pFCell ) const;
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 77d0364eda05..2e33e84ed9fe 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -508,7 +508,7 @@ void ScXMLExport::CollectSharedData(SCTAB& nTableCount, sal_Int32& nShapesCount)
nTableCount = xIndex->getCount();
if (!pSharedData)
- CreateSharedData(nTableCount);
+ pSharedData = new ScMySharedData(nTableCount);
pCellStyles->AddNewTable(nTableCount - 1);
@@ -3742,11 +3742,6 @@ void ScXMLExport::SetRepeatAttribute(sal_Int32 nEqualCellCount, bool bIncProgres
}
}
-bool ScXMLExport::IsCellTypeEqual (const ScMyCell& aCell1, const ScMyCell& aCell2)
-{
- return (aCell1.nType == aCell2.nType);
-}
-
bool ScXMLExport::IsEditCell(ScMyCell& rCell)
{
return rCell.maBaseCell.meType == CELLTYPE_EDIT;
@@ -3774,8 +3769,8 @@ bool ScXMLExport::IsCellEqual (ScMyCell& aCell1, ScMyCell& aCell2)
{
if ((((aCell1.nStyleIndex == aCell2.nStyleIndex) && (aCell1.bIsAutoStyle == aCell2.bIsAutoStyle)) ||
((aCell1.nStyleIndex == aCell2.nStyleIndex) && (aCell1.nStyleIndex == -1))) &&
- (aCell1.nValidationIndex == aCell2.nValidationIndex) &&
- IsCellTypeEqual(aCell1, aCell2))
+ aCell1.nValidationIndex == aCell2.nValidationIndex &&
+ aCell1.nType == aCell2.nType)
{
switch ( aCell1.nType )
{
@@ -4941,11 +4936,6 @@ XMLShapeExport* ScXMLExport::CreateShapeExport()
return new ScXMLShapeExport(*this);
}
-void ScXMLExport::CreateSharedData(const sal_Int32 nTableCount)
-{
- pSharedData = new ScMySharedData(nTableCount);
-}
-
XMLNumberFormatAttributesExportHelper* ScXMLExport::GetNumberFormatAttributesExportHelper()
{
if (!pNumberFormatAttributesExportHelper)
diff --git a/sc/source/filter/xml/xmlexprt.hxx b/sc/source/filter/xml/xmlexprt.hxx
index 0e3392deab00..7c56d4efc5ee 100644
--- a/sc/source/filter/xml/xmlexprt.hxx
+++ b/sc/source/filter/xml/xmlexprt.hxx
@@ -189,7 +189,6 @@ class ScXMLExport : public SvXMLExport
void WriteTableShapes();
void SetRepeatAttribute(sal_Int32 nEqualCellCount, bool bIncProgress);
- static bool IsCellTypeEqual (const ScMyCell& aCell1, const ScMyCell& aCell2);
static bool IsEditCell(ScMyCell& rCell);
bool IsCellEqual(ScMyCell& aCell1, ScMyCell& aCell2);
@@ -253,7 +252,6 @@ public:
virtual void exportAnnotationMeta( const css::uno::Reference < css::drawing::XShape >& xShape) override;
- void CreateSharedData(const sal_Int32 nTableCount);
void SetSharedData(ScMySharedData* pTemp) { pSharedData = pTemp; }
ScMySharedData* GetSharedData() { return pSharedData; }
XMLNumberFormatAttributesExportHelper* GetNumberFormatAttributesExportHelper();
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index 8fdbd07e91aa..f919af438e80 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -316,7 +316,6 @@ private:
void FillShapes(std::vector < uno::Reference < drawing::XShape > >& rShapes) const;
bool FindSelectedShapesChanges(const css::uno::Reference<css::drawing::XShapes>& xShapes, bool bCommitChange) const;
- void FillSelectionSupplier() const;
ScAddress* GetAnchor(const uno::Reference<drawing::XShape>& xShape) const;
uno::Reference<XAccessibleRelationSet> GetRelationSet(const ScAccessibleShapeData* pData) const;
@@ -338,7 +337,23 @@ ScChildrenShapes::ScChildrenShapes(ScAccessibleDocument* pAccessibleDocument, Sc
mpAccessibleDocument(pAccessibleDocument),
meSplitPos(eSplitPos)
{
- FillSelectionSupplier();
+ if (mpViewShell)
+ {
+ SfxViewFrame* pViewFrame = mpViewShell->GetViewFrame();
+ if (pViewFrame)
+ {
+ xSelectionSupplier = uno::Reference<view::XSelectionSupplier>(pViewFrame->GetFrame().GetController(), uno::UNO_QUERY);
+ if (xSelectionSupplier.is())
+ {
+ if (mpAccessibleDocument)
+ xSelectionSupplier->addSelectionChangeListener(mpAccessibleDocument);
+ uno::Reference<drawing::XShapes> xShapes (xSelectionSupplier->getSelection(), uno::UNO_QUERY);
+ if (xShapes.is())
+ mnShapesSelected = xShapes->getCount();
+ }
+ }
+ }
+
maZOrderedShapes.push_back(nullptr); // add an element which represents the table
GetCount(); // fill list with filtered shapes (no internal shapes)
@@ -1147,26 +1162,6 @@ bool ScChildrenShapes::FindSelectedShapesChanges(const uno::Reference<drawing::X
return bResult;
}
-void ScChildrenShapes::FillSelectionSupplier() const
-{
- if (!xSelectionSupplier.is() && mpViewShell)
- {
- SfxViewFrame* pViewFrame = mpViewShell->GetViewFrame();
- if (pViewFrame)
- {
- xSelectionSupplier = uno::Reference<view::XSelectionSupplier>(pViewFrame->GetFrame().GetController(), uno::UNO_QUERY);
- if (xSelectionSupplier.is())
- {
- if (mpAccessibleDocument)
- xSelectionSupplier->addSelectionChangeListener(mpAccessibleDocument);
- uno::Reference<drawing::XShapes> xShapes (xSelectionSupplier->getSelection(), uno::UNO_QUERY);
- if (xShapes.is())
- mnShapesSelected = xShapes->getCount();
- }
- }
- }
-}
-
ScAddress* ScChildrenShapes::GetAnchor(const uno::Reference<drawing::XShape>& xShape) const
{
ScAddress* pAddress = nullptr;
diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
index 1b5a0c9452d0..b0053a33fb3e 100644
--- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
+++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
@@ -616,7 +616,7 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
if ( (!bIsDel || aMarkRange != aDelRange) &&
bNewMarked &&
nNewMarkCount > 0 &&
- !IsSameMarkCell() )
+ m_LastMarkedRanges != *mpMarkedRanges )
{
RemoveSelection(refScMarkData);
if(bNewPosCellFocus)
@@ -764,11 +764,6 @@ void ScAccessibleSpreadsheet::CommitFocusCell(const ScAddress &aNewCell)
CommitChange(aEvent);
}
-bool ScAccessibleSpreadsheet::IsSameMarkCell()
-{
- return m_LastMarkedRanges == *mpMarkedRanges;
-}
-
//===== XAccessibleTable ================================================
uno::Reference< XAccessibleTable > SAL_CALL ScAccessibleSpreadsheet::getAccessibleRowHeaders( )
diff --git a/sc/source/ui/dbgui/csvruler.cxx b/sc/source/ui/dbgui/csvruler.cxx
index 3c53c125b4f9..c0b5b197d68c 100644
--- a/sc/source/ui/dbgui/csvruler.cxx
+++ b/sc/source/ui/dbgui/csvruler.cxx
@@ -530,7 +530,10 @@ void ScCsvRuler::ImplRedraw()
ImplDrawRulerDev();
}
DrawOutDev( Point(), maWinSize, Point(), maWinSize, *maRulerDev.get() );
- ImplDrawTrackingRect();
+ /* Draws directly tracking rectangle to the column with the specified index. */
+ if( HasFocus() )
+ InvertTracking( Rectangle( 0, 0, GetWidth() - 1, GetHeight() - 2 ),
+ ShowTrackFlags::Small | ShowTrackFlags::TrackWindow );
}
}
@@ -636,13 +639,6 @@ void ScCsvRuler::ImplInvertCursor( sal_Int32 nPos )
}
}
-void ScCsvRuler::ImplDrawTrackingRect()
-{
- if( HasFocus() )
- InvertTracking( Rectangle( 0, 0, GetWidth() - 1, GetHeight() - 2 ),
- ShowTrackFlags::Small | ShowTrackFlags::TrackWindow );
-}
-
void ScCsvRuler::ImplSetMousePointer( sal_Int32 nPos )
{
SetPointer( Pointer( HasSplit( nPos ) ? PointerStyle::HSplit : PointerStyle::Arrow ) );
diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx
index a33c47d486b5..9bddf667900f 100644
--- a/sc/source/ui/docshell/docsh6.cxx
+++ b/sc/source/ui/docshell/docsh6.cxx
@@ -465,12 +465,7 @@ void ScDocShell::SetFormulaOptions( const ScFormulaOptions& rOpt, bool bForLoadi
}
// Per document interpreter settings.
- SetCalcConfig( rOpt.GetCalcConfig());
-}
-
-void ScDocShell::SetCalcConfig( const ScCalcConfig& rConfig )
-{
- aDocument.SetCalcConfig( rConfig);
+ aDocument.SetCalcConfig( rOpt.GetCalcConfig() );
}
void ScDocShell::CheckConfigOptions()
diff --git a/sc/source/ui/docshell/editable.cxx b/sc/source/ui/docshell/editable.cxx
index aab817d0d04e..05d4f19ebc89 100644
--- a/sc/source/ui/docshell/editable.cxx
+++ b/sc/source/ui/docshell/editable.cxx
@@ -64,7 +64,13 @@ ScEditableTester::ScEditableTester( ScViewFunc* pView ) :
mbIsEditable(true),
mbOnlyMatrix(true)
{
- TestView( pView );
+ bool bThisMatrix;
+ if ( !pView->SelectionEditable( &bThisMatrix ) )
+ {
+ mbIsEditable = false;
+ if ( !bThisMatrix )
+ mbOnlyMatrix = false;
+ }
}
void ScEditableTester::TestBlock( ScDocument* pDoc, SCTAB nTab,
@@ -118,20 +124,6 @@ void ScEditableTester::TestSelection( ScDocument* pDoc, const ScMarkData& rMark
}
}
-void ScEditableTester::TestView( ScViewFunc* pView )
-{
- if (mbIsEditable || mbOnlyMatrix)
- {
- bool bThisMatrix;
- if ( !pView->SelectionEditable( &bThisMatrix ) )
- {
- mbIsEditable = false;
- if ( !bThisMatrix )
- mbOnlyMatrix = false;
- }
- }
-}
-
sal_uInt16 ScEditableTester::GetMessageId() const
{
if (mbIsEditable)
diff --git a/sc/source/ui/inc/AccessibleSpreadsheet.hxx b/sc/source/ui/inc/AccessibleSpreadsheet.hxx
index 96aa87afd74c..210d7dfd43a7 100644
--- a/sc/source/ui/inc/AccessibleSpreadsheet.hxx
+++ b/sc/source/ui/inc/AccessibleSpreadsheet.hxx
@@ -290,7 +290,6 @@ private:
MAP_ADDR_XACC;
MAP_ADDR_XACC m_mapSelectionSend;
void RemoveSelection(ScMarkData &refScMarkData);
- bool IsSameMarkCell();
void CommitFocusCell(const ScAddress &aNewCell);
public:
void FireFirstCellFocus();
diff --git a/sc/source/ui/inc/acredlin.hxx b/sc/source/ui/inc/acredlin.hxx
index c12f31668e93..eff8461682fe 100644
--- a/sc/source/ui/inc/acredlin.hxx
+++ b/sc/source/ui/inc/acredlin.hxx
@@ -93,7 +93,6 @@ private:
bool bUseColor:1;
void Init();
- void InitFilter();
DECL_LINK( FilterHandle, SvxTPFilter*, void );
DECL_LINK( RefHandle, SvxTPFilter*, void );
diff --git a/sc/source/ui/inc/autofmt.hxx b/sc/source/ui/inc/autofmt.hxx
index 62ee238884f9..c274eefcf145 100644
--- a/sc/source/ui/inc/autofmt.hxx
+++ b/sc/source/ui/inc/autofmt.hxx
@@ -90,7 +90,6 @@ private:
SAL_DLLPRIVATE const SvxLineItem& GetDiagItem( size_t nCol, size_t nRow, bool bTLBR ) const;
SAL_DLLPRIVATE void DrawString(vcl::RenderContext& rRenderContext, size_t nCol, size_t nRow);
- SAL_DLLPRIVATE void DrawStrings(vcl::RenderContext& rRenderContext);
SAL_DLLPRIVATE void DrawBackground(vcl::RenderContext& rRenderContext);
SAL_DLLPRIVATE void MakeFonts(sal_uInt16 nIndex, vcl::Font& rFont,
diff --git a/sc/source/ui/inc/colrowba.hxx b/sc/source/ui/inc/colrowba.hxx
index acff8a111f7e..b5f793fea0ac 100644
--- a/sc/source/ui/inc/colrowba.hxx
+++ b/sc/source/ui/inc/colrowba.hxx
@@ -55,8 +55,6 @@ public:
virtual void DrawInvert( long nDragPos ) override;
virtual OUString GetDragHelp( long nVal ) override;
-
- bool UseNumericHeader() const;
};
class ScRowBar : public ScHeaderControl
diff --git a/sc/source/ui/inc/csvruler.hxx b/sc/source/ui/inc/csvruler.hxx
index 68be359e8375..a4885f4996c4 100644
--- a/sc/source/ui/inc/csvruler.hxx
+++ b/sc/source/ui/inc/csvruler.hxx
@@ -167,8 +167,6 @@ private:
/** Inverts the cursor bar at the specified position in maRulerDev. */
SAL_DLLPRIVATE void ImplInvertCursor( sal_Int32 nPos );
- /** Draws directly tracking rectangle to the column with the specified index. */
- SAL_DLLPRIVATE void ImplDrawTrackingRect();
/** Sets arrow or horizontal split pointer. */
SAL_DLLPRIVATE void ImplSetMousePointer( sal_Int32 nPos );
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index 2fde3629b2d0..7f42e336dfae 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -310,7 +310,6 @@ public:
void ReloadTabLinks();
void SetFormulaOptions( const ScFormulaOptions& rOpt, bool bForLoading = false );
- void SetCalcConfig( const ScCalcConfig& rConfig );
virtual void CheckConfigOptions() override;
void PostEditView( ScEditEngineDefaulter* pEditEngine, const ScAddress& rCursorPos );
diff --git a/sc/source/ui/inc/editable.hxx b/sc/source/ui/inc/editable.hxx
index 6ea8e399f8a9..10a03032c5ac 100644
--- a/sc/source/ui/inc/editable.hxx
+++ b/sc/source/ui/inc/editable.hxx
@@ -62,7 +62,6 @@ public:
const ScMarkData& rMark );
void TestRange( ScDocument* pDoc, const ScRange& rRange );
void TestSelection( ScDocument* pDoc, const ScMarkData& rMark );
- void TestView( ScViewFunc* pView );
bool IsEditable() const { return mbIsEditable; }
bool IsFormatEditable() const { return mbIsEditable || mbOnlyMatrix; }
diff --git a/sc/source/ui/inc/mvtabdlg.hxx b/sc/source/ui/inc/mvtabdlg.hxx
index 0b77c8d89aa5..f4129c8884ab 100644
--- a/sc/source/ui/inc/mvtabdlg.hxx
+++ b/sc/source/ui/inc/mvtabdlg.hxx
@@ -46,7 +46,6 @@ private:
void ResetRenameInput();
void CheckNewTabName();
ScDocument* GetSelectedDoc();
- bool IsCurrentDocSelected() const;
private:
VclPtr<RadioButton> pBtnMove;
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index 0a4923d6ea10..4aa805c34d3f 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -255,7 +255,28 @@ void ScAcceptChgDlg::Init()
pTPFilter->SetRange(aRefStr);
}
- InitFilter();
+ // init filter
+ if(pTPFilter->IsDate()||pTPFilter->IsRange()||
+ pTPFilter->IsAuthor()||pTPFilter->IsComment())
+ {
+ pTheView->SetFilterDate(pTPFilter->IsDate());
+ pTheView->SetDateTimeMode(pTPFilter->GetDateMode());
+ pTheView->SetFirstDate(pTPFilter->GetFirstDate());
+ pTheView->SetLastDate(pTPFilter->GetLastDate());
+ pTheView->SetFirstTime(pTPFilter->GetFirstTime());
+ pTheView->SetLastTime(pTPFilter->GetLastTime());
+ pTheView->SetFilterAuthor(pTPFilter->IsAuthor());
+ pTheView->SetAuthor(pTPFilter->GetSelectedAuthor());
+
+ pTheView->SetFilterComment(pTPFilter->IsComment());
+
+ utl::SearchParam aSearchParam( pTPFilter->GetComment(),
+ utl::SearchParam::SRCH_REGEXP,false );
+
+ pTheView->SetCommentParams(&aSearchParam);
+
+ pTheView->UpdateFilterTest();
+ }
}
void ScAcceptChgDlg::ClearView()
@@ -1789,31 +1810,6 @@ void ScAcceptChgDlg::FillInfo(SfxChildWinInfo& rInfo) const
rInfo.aExtraString += ")";
}
-void ScAcceptChgDlg::InitFilter()
-{
- if(pTPFilter->IsDate()||pTPFilter->IsRange()||
- pTPFilter->IsAuthor()||pTPFilter->IsComment())
- {
- pTheView->SetFilterDate(pTPFilter->IsDate());
- pTheView->SetDateTimeMode(pTPFilter->GetDateMode());
- pTheView->SetFirstDate(pTPFilter->GetFirstDate());
- pTheView->SetLastDate(pTPFilter->GetLastDate());
- pTheView->SetFirstTime(pTPFilter->GetFirstTime());
- pTheView->SetLastTime(pTPFilter->GetLastTime());
- pTheView->SetFilterAuthor(pTPFilter->IsAuthor());
- pTheView->SetAuthor(pTPFilter->GetSelectedAuthor());
-
- pTheView->SetFilterComment(pTPFilter->IsComment());
-
- utl::SearchParam aSearchParam( pTPFilter->GetComment(),
- utl::SearchParam::SRCH_REGEXP,false );
-
- pTheView->SetCommentParams(&aSearchParam);
-
- pTheView->UpdateFilterTest();
- }
-}
-
#define CALC_DATE 3
#define CALC_POS 1
diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx
index b5b49315d078..976c79eedf57 100644
--- a/sc/source/ui/miscdlgs/autofmt.cxx
+++ b/sc/source/ui/miscdlgs/autofmt.cxx
@@ -359,13 +359,6 @@ void ScAutoFmtPreview::DrawString(vcl::RenderContext& rRenderContext, size_t nCo
#undef FRAME_OFFSET
-void ScAutoFmtPreview::DrawStrings(vcl::RenderContext& rRenderContext)
-{
- for(size_t nRow = 0; nRow < 5; ++nRow)
- for(size_t nCol = 0; nCol < 5; ++nCol)
- DrawString(rRenderContext, nCol, nRow);
-}
-
void ScAutoFmtPreview::DrawBackground(vcl::RenderContext& rRenderContext)
{
if (pCurData)
@@ -396,7 +389,9 @@ void ScAutoFmtPreview::PaintCells(vcl::RenderContext& rRenderContext)
DrawBackground(rRenderContext);
// 2) values
- DrawStrings(rRenderContext);
+ for(size_t nRow = 0; nRow < 5; ++nRow)
+ for(size_t nCol = 0; nCol < 5; ++nCol)
+ DrawString(rRenderContext, nCol, nRow);
// 3) border
if (pCurData->GetIncludeFrame())
diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx
index 1fc76699c805..44593868c084 100644
--- a/sc/source/ui/miscdlgs/mvtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx
@@ -160,7 +160,7 @@ void ScMoveTableDlg::CheckNewTabName()
return;
}
- bool bMoveInCurrentDoc = (pBtnMove->IsChecked() && IsCurrentDocSelected());
+ bool bMoveInCurrentDoc = pBtnMove->IsChecked() && pLbDoc->GetSelectEntryPos() == mnCurrentDocPos;
bool bFound = false;
const sal_Int32 nLast = pLbTable->GetEntryCount();
for ( sal_uInt16 i=0; i<nLast && !bFound; ++i )
@@ -195,11 +195,6 @@ ScDocument* ScMoveTableDlg::GetSelectedDoc()
return static_cast<ScDocument*>(pLbDoc->GetEntryData(nPos));
}
-bool ScMoveTableDlg::IsCurrentDocSelected() const
-{
- return pLbDoc->GetSelectEntryPos() == mnCurrentDocPos;
-}
-
void ScMoveTableDlg::Init()
{
pBtnOk->SetClickHdl ( LINK( this, ScMoveTableDlg, OkHdl ) );
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 7268c1f14b7f..49ac5e2bf1fb 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -9427,18 +9427,6 @@ uno::Any SAL_CALL ScCellFormatsEnumeration::nextElement() throw(container::NoSuc
return uno::makeAny(uno::Reference<table::XCellRange> (NextObject_Impl()));
}
-ScUniqueCellFormatsObj::ScUniqueCellFormatsObj(ScDocShell* pDocSh, const ScRange& rRange) :
- pDocShell( pDocSh ),
- aTotalRange( rRange ),
- aRangeLists()
-{
- pDocShell->GetDocument().AddUnoObject(*this);
-
- OSL_ENSURE( aTotalRange.aStart.Tab() == aTotalRange.aEnd.Tab(), "unterschiedliche Tabellen" );
-
- GetObjects_Impl();
-}
-
ScUniqueCellFormatsObj::~ScUniqueCellFormatsObj()
{
SolarMutexGuard g;
@@ -9600,50 +9588,55 @@ struct ScUniqueFormatsOrder
}
};
-void ScUniqueCellFormatsObj::GetObjects_Impl()
+ScUniqueCellFormatsObj::ScUniqueCellFormatsObj(ScDocShell* pDocSh, const ScRange& rRange) :
+ pDocShell( pDocSh ),
+ aTotalRange( rRange ),
+ aRangeLists()
{
- if (pDocShell)
- {
- ScDocument& rDoc = pDocShell->GetDocument();
- SCTAB nTab = aTotalRange.aStart.Tab();
- ScAttrRectIterator aIter( &rDoc, nTab,
- aTotalRange.aStart.Col(), aTotalRange.aStart.Row(),
- aTotalRange.aEnd.Col(), aTotalRange.aEnd.Row() );
- SCCOL nCol1, nCol2;
- SCROW nRow1, nRow2;
+ pDocShell->GetDocument().AddUnoObject(*this);
- // Collect the ranges for each format in a hash map, to avoid nested loops
+ OSL_ENSURE( aTotalRange.aStart.Tab() == aTotalRange.aEnd.Tab(), "unterschiedliche Tabellen" );
- ScUniqueFormatsHashMap aHashMap;
- while (aIter.GetNext( nCol1, nCol2, nRow1, nRow2 ) )
- {
- ScRange aRange( nCol1, nRow1, nTab, nCol2, nRow2, nTab );
- const ScPatternAttr* pPattern = rDoc.GetPattern(nCol1, nRow1, nTab);
- aHashMap[pPattern].Join( aRange );
- }
+ ScDocument& rDoc = pDocShell->GetDocument();
+ SCTAB nTab = aTotalRange.aStart.Tab();
+ ScAttrRectIterator aIter( &rDoc, nTab,
+ aTotalRange.aStart.Col(), aTotalRange.aStart.Row(),
+ aTotalRange.aEnd.Col(), aTotalRange.aEnd.Row() );
+ SCCOL nCol1, nCol2;
+ SCROW nRow1, nRow2;
- // Fill the vector aRangeLists with the range lists from the hash map
+ // Collect the ranges for each format in a hash map, to avoid nested loops
- aRangeLists.reserve( aHashMap.size() );
- ScUniqueFormatsHashMap::iterator aMapIter( aHashMap.begin() );
- ScUniqueFormatsHashMap::iterator aMapEnd( aHashMap.end() );
- while ( aMapIter != aMapEnd )
- {
- ScUniqueFormatsEntry& rEntry = aMapIter->second;
- const ScRangeList& rRanges = rEntry.GetRanges();
- aRangeLists.push_back( rRanges ); // copy ScRangeList
- rEntry.Clear(); // free memory, don't hold both copies of all ranges
- ++aMapIter;
- }
+ ScUniqueFormatsHashMap aHashMap;
+ while (aIter.GetNext( nCol1, nCol2, nRow1, nRow2 ) )
+ {
+ ScRange aRange( nCol1, nRow1, nTab, nCol2, nRow2, nTab );
+ const ScPatternAttr* pPattern = rDoc.GetPattern(nCol1, nRow1, nTab);
+ aHashMap[pPattern].Join( aRange );
+ }
- // Sort the vector by first range's start position, to avoid random shuffling
- // due to using the ScPatterAttr pointers
+ // Fill the vector aRangeLists with the range lists from the hash map
- ScUniqueFormatsOrder aComp;
- ::std::sort( aRangeLists.begin(), aRangeLists.end(), aComp );
+ aRangeLists.reserve( aHashMap.size() );
+ ScUniqueFormatsHashMap::iterator aMapIter( aHashMap.begin() );
+ ScUniqueFormatsHashMap::iterator aMapEnd( aHashMap.end() );
+ while ( aMapIter != aMapEnd )
+ {
+ ScUniqueFormatsEntry& rEntry = aMapIter->second;
+ const ScRangeList& rRanges = rEntry.GetRanges();
+ aRangeLists.push_back( rRanges ); // copy ScRangeList
+ rEntry.Clear(); // free memory, don't hold both copies of all ranges
+ ++aMapIter;
}
+
+ // Sort the vector by first range's start position, to avoid random shuffling
+ // due to using the ScPatterAttr pointers
+
+ ScUniqueFormatsOrder aComp;
+ ::std::sort( aRangeLists.begin(), aRangeLists.end(), aComp );
}
+
// XIndexAccess
sal_Int32 SAL_CALL ScUniqueCellFormatsObj::getCount() throw(uno::RuntimeException, std::exception)
diff --git a/sc/source/ui/view/colrowba.cxx b/sc/source/ui/view/colrowba.cxx
index 105771e9570a..8ab6a41b3ce1 100644
--- a/sc/source/ui/view/colrowba.cxx
+++ b/sc/source/ui/view/colrowba.cxx
@@ -64,11 +64,6 @@ ScColBar::~ScColBar()
{
}
-inline bool ScColBar::UseNumericHeader() const
-{
- return pTabView->GetViewData().GetDocument()->GetAddressConvention() == formula::FormulaGrammar::CONV_XL_R1C1;
-}
-
SCCOLROW ScColBar::GetPos() const
{
return pTabView->GetViewData().GetPosX(meWhich);
@@ -87,7 +82,7 @@ sal_uInt16 ScColBar::GetEntrySize( SCCOLROW nEntryNo ) const
OUString ScColBar::GetEntryText( SCCOLROW nEntryNo ) const
{
- return UseNumericHeader()
+ return pTabView->GetViewData().GetDocument()->GetAddressConvention() == formula::FormulaGrammar::CONV_XL_R1C1
? OUString::number(nEntryNo + 1)
: ScColToAlpha( static_cast<SCCOL>(nEntryNo) );
}