summaryrefslogtreecommitdiff
path: root/sc/source/filter/excel
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-06-27 06:36:44 +0200
committerEike Rathke <erack@redhat.com>2016-07-13 15:05:24 +0000
commit17722af09e527641db7c080013a94ea13f904377 (patch)
treeb32e36a36a5dcfdb922b9fdb5194bb623fb6a9a3 /sc/source/filter/excel
parentce2a1922f1159369cd28ee60b2999e0652c6abac (diff)
loplugin:singlevalfields in sc(part3)
Change-Id: I7309e7e30bd892f0b1bd47c44cdbba79da5e5a9f Reviewed-on: https://gerrit.libreoffice.org/26686 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc/source/filter/excel')
-rw-r--r--sc/source/filter/excel/excform.cxx32
-rw-r--r--sc/source/filter/excel/excform8.cxx4
-rw-r--r--sc/source/filter/excel/namebuff.cxx10
-rw-r--r--sc/source/filter/excel/xecontent.cxx7
-rw-r--r--sc/source/filter/excel/xeescher.cxx1
-rw-r--r--sc/source/filter/excel/xepivot.cxx26
6 files changed, 14 insertions, 66 deletions
diff --git a/sc/source/filter/excel/excform.cxx b/sc/source/filter/excel/excform.cxx
index c3190550a68c..a084fb163ab0 100644
--- a/sc/source/filter/excel/excform.cxx
+++ b/sc/source/filter/excel/excform.cxx
@@ -184,7 +184,6 @@ void ImportExcel::Formula(
ExcelToSc::ExcelToSc( XclImpRoot& rRoot ) :
ExcelConverterBase(rRoot.GetDocImport().getDoc().GetSharedStringPool(), 512),
XclImpRoot( rRoot ),
- bExternName( false ),
maFuncProv( rRoot ),
meBiff( rRoot.GetBiff() )
{
@@ -220,8 +219,6 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s
ScComplexRefData aCRD;
ExtensionTypeVec aExtensions;
- bExternName = false;
-
if( eStatus != ConvOK )
{
aIn.Ignore( nFormulaLen );
@@ -711,25 +708,7 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s
sal_uInt16 nUINT16 = aIn.ReaduInt16();
if( nINT16 >= 0 )
{
- const ExtName* pExtName = rR.pExtNameBuff->GetNameByIndex( nINT16, nUINT16 );
- if( pExtName && pExtName->IsDDE() &&
- rR.pExtSheetBuff->IsLink( ( sal_uInt16 ) nINT16 ) )
- {
- OUString aAppl, aExtDoc;
- TokenId nPar1, nPar2;
-
- rR.pExtSheetBuff->GetLink( ( sal_uInt16 ) nINT16 , aAppl, aExtDoc );
- nPar1 = aPool.Store( aAppl );
- nPar2 = aPool.Store( aExtDoc );
- nMerk0 = aPool.Store( pExtName->aName );
- aPool << ocDde << ocOpen << nPar1 << ocSep << nPar2 << ocSep
- << nMerk0 << ocClose;
-
- GetDoc().CreateDdeLink( aAppl, aExtDoc, pExtName->aName, SC_DDE_DEFAULT, ScMatrixRef() );
- }
- else
- aPool << ocBad;
-
+ aPool << ocBad;
aPool >> aStack;
}
else
@@ -898,11 +877,6 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s
pErgebnis = aPool[ aStack.Get() ];
eRet = ConvErrCount;
}
- else if( bExternName )
- {
- pErgebnis = aPool[ aStack.Get() ];
- eRet = ConvErrExternal;
- }
else if( bArrayFormula )
{
pErgebnis = nullptr;
@@ -939,8 +913,6 @@ ConvErr ExcelToSc::Convert( ScRangeListTabs& rRangeList, XclImpStream& aIn, sal_
aCRD.Ref1.SetAbsTab(aEingPos.Tab());
aCRD.Ref2.SetAbsTab(aEingPos.Tab());
- bExternName = false;
-
if( eStatus != ConvOK )
{
aIn.Ignore( nFormulaLen );
@@ -1345,8 +1317,6 @@ ConvErr ExcelToSc::Convert( ScRangeListTabs& rRangeList, XclImpStream& aIn, sal_
eRet = ConvErrNi;
else if( aIn.GetRecPos() != nEndPos )
eRet = ConvErrCount;
- else if( bExternName )
- eRet = ConvErrExternal;
else
eRet = ConvOK;
diff --git a/sc/source/filter/excel/excform8.cxx b/sc/source/filter/excel/excform8.cxx
index bea8ba395a8c..65007527c71a 100644
--- a/sc/source/filter/excel/excform8.cxx
+++ b/sc/source/filter/excel/excform8.cxx
@@ -966,8 +966,6 @@ ConvErr ExcelToSc8::Convert( ScRangeListTabs& rRangeList, XclImpStream& aIn, sal
ScSingleRefData aSRD;
ScComplexRefData aCRD;
- bExternName = false;
-
if( eStatus != ConvOK )
{
aIn.Ignore( nFormulaLen );
@@ -1291,8 +1289,6 @@ ConvErr ExcelToSc8::Convert( ScRangeListTabs& rRangeList, XclImpStream& aIn, sal
eRet = ConvErrNi;
else if( aIn.GetRecPos() != nEndPos )
eRet = ConvErrCount;
- else if( bExternName )
- eRet = ConvErrExternal;
else
eRet = ConvOK;
diff --git a/sc/source/filter/excel/namebuff.cxx b/sc/source/filter/excel/namebuff.cxx
index 888e005128ea..3b12910187a3 100644
--- a/sc/source/filter/excel/namebuff.cxx
+++ b/sc/source/filter/excel/namebuff.cxx
@@ -157,16 +157,6 @@ bool ExtSheetBuffer::GetScTabIndex( sal_uInt16 nExcIndex, sal_uInt16& rScIndex )
return false;
}
-bool ExtSheetBuffer::IsLink( const sal_uInt16 nExcIndex ) const
-{
- OSL_ENSURE( nExcIndex > 0, "*ExtSheetBuffer::IsLink(): Index has to be >0!" );
-
- if (!nExcIndex || nExcIndex > maEntries.size() )
- return false;
-
- return maEntries[ nExcIndex -1 ].bLink;
-}
-
void ExtSheetBuffer::GetLink( const sal_uInt16 nExcIndex, OUString& rAppl, OUString& rDoc ) const
{
OSL_ENSURE( nExcIndex > 0, "*ExtSheetBuffer::GetLink(): Index has to be >0!" );
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index 8bef80753b5e..86a19f7582af 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -321,8 +321,7 @@ XclExpHyperlink::XclExpHyperlink( const XclExpRoot& rRoot, const SvxURLField& rU
XclExpRecord( EXC_ID_HLINK ),
maScPos( rScPos ),
mxVarData( new SvMemoryStream ),
- mnFlags( 0 ),
- mbSetDisplay( true )
+ mnFlags( 0 )
{
const OUString& rUrl = rUrlField.GetURL();
const OUString& rRepr = rUrlField.GetRepresentation();
@@ -514,9 +513,7 @@ void XclExpHyperlink::SaveXml( XclExpXmlStream& rStrm )
? XclXmlUtils::ToOString( *mxTextMark ).getStr()
: nullptr,
// OOXTODO: XML_tooltip, from record HLinkTooltip 800h wzTooltip
- XML_display, mbSetDisplay
- ? XclXmlUtils::ToOString(m_Repr).getStr()
- : nullptr,
+ XML_display, XclXmlUtils::ToOString(m_Repr).getStr(),
FSEND );
}
diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx
index 8c538b939463..47334e4751b4 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -1199,7 +1199,6 @@ XclExpNote::XclExpNote( const XclExpRoot& rRoot, const ScAddress& rScPos,
// AutoFill style would change if Postit.cxx object creation values are changed
OUString aCol(((XFillColorItem &)GETITEM(aItemSet, XFillColorItem , XATTR_FILLCOLOR)).GetValue());
mbAutoFill = aCol.isEmpty() && (GETITEMVALUE(aItemSet, XFillStyleItem, XATTR_FILLSTYLE, sal_uLong) == drawing::FillStyle_SOLID);
- mbAutoLine = true;
mbRowHidden = (rRoot.GetDoc().RowHidden(maScPos.Row(),maScPos.Tab()));
mbColHidden = (rRoot.GetDoc().ColHidden(maScPos.Col(),maScPos.Tab()));
}
diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx
index e496dc224518..897651fe7d4c 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -1623,8 +1623,7 @@ void XclExpPivotRecWrapper::Save( XclExpStream& rStrm )
} // namespace
XclExpPivotTableManager::XclExpPivotTableManager( const XclExpRoot& rRoot ) :
- XclExpRoot( rRoot ),
- mbShareCaches( true )
+ XclExpRoot( rRoot )
{
}
@@ -1671,22 +1670,19 @@ const XclExpPivotCache* XclExpPivotTableManager::CreatePivotCache( const ScDPObj
(i.e. grouping info, calculated fields). If the passed DataPilot object
or the found cache contains this data, do not share the cache with
multiple pivot tables. */
- if( mbShareCaches )
+ if( const ScDPSaveData* pSaveData = rDPObj.GetSaveData() )
{
- if( const ScDPSaveData* pSaveData = rDPObj.GetSaveData() )
+ const ScDPDimensionSaveData* pDimSaveData = pSaveData->GetExistingDimensionData();
+ // no dimension save data at all or save data does not contain grouping info
+ if( !pDimSaveData || !pDimSaveData->HasGroupDimensions() )
{
- const ScDPDimensionSaveData* pDimSaveData = pSaveData->GetExistingDimensionData();
- // no dimension save data at all or save data does not contain grouping info
- if( !pDimSaveData || !pDimSaveData->HasGroupDimensions() )
+ // check all existing pivot caches
+ for( size_t nPos = 0, nSize = maPCacheList.GetSize(); nPos < nSize; ++nPos )
{
- // check all existing pivot caches
- for( size_t nPos = 0, nSize = maPCacheList.GetSize(); nPos < nSize; ++nPos )
- {
- XclExpPivotCacheRef xPCache = maPCacheList.GetRecord( nPos );
- // pivot cache does not have grouping info and source data is equal
- if( !xPCache->HasAddFields() && xPCache->HasEqualDataSource( rDPObj ) )
- return xPCache.get();
- }
+ XclExpPivotCacheRef xPCache = maPCacheList.GetRecord( nPos );
+ // pivot cache does not have grouping info and source data is equal
+ if( !xPCache->HasAddFields() && xPCache->HasEqualDataSource( rDPObj ) )
+ return xPCache.get();
}
}
}