summaryrefslogtreecommitdiff
path: root/sc/source/filter
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/filter')
-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
33 files changed, 55 insertions, 215 deletions
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();