summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-08-07 19:04:53 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-08-12 19:46:27 -0400
commitf3a632c8753079a954187ea0f60f9606fdb3fe27 (patch)
tree8e2ec098073fab67541015b3ccbffdf60f497666 /sc/source
parentc3f631ea5c09072a2e6bbb1f3a71b3a331b62713 (diff)
No more RT_SHARED and RT_SHAREDMOD named range types.
Change-Id: Ic8d98b62747ae29cc968ce926e2ae42537023840
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/formulacell.cxx4
-rw-r--r--sc/source/core/tool/compiler.cxx7
-rw-r--r--sc/source/filter/excel/xename.cxx4
-rw-r--r--sc/source/filter/excel/xlformula.cxx12
-rw-r--r--sc/source/ui/docshell/docfunc.cxx8
-rw-r--r--sc/source/ui/namedlg/namemgrtable.cxx2
-rw-r--r--sc/source/ui/unoobj/nameuno.cxx15
7 files changed, 16 insertions, 36 deletions
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index c3ab5cd24039..d6254c23fef2 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -2825,8 +2825,6 @@ void ScFormulaCell::UpdateTranspose( const ScRange& rSource, const ScAddress& rD
{
if (pName->IsModified())
bRefChanged = true;
- if (pName->HasType(RT_SHAREDMOD))
- pShared = pName;
}
}
else if( t->GetType() != svIndex )
@@ -2902,8 +2900,6 @@ void ScFormulaCell::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY
{
if (pName->IsModified())
bRefChanged = true;
- if (pName->HasType(RT_SHAREDMOD))
- pShared = pName;
}
}
else if( t->GetType() != svIndex )
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 6391690a9962..547daa6ae94a 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -4302,12 +4302,7 @@ void ScCompiler::CreateStringFromIndex(OUStringBuffer& rBuffer,FormulaToken* _pT
{
ScRangeData* pData = GetRangeData( *_pTokenP);
if (pData)
- {
- if (pData->HasType(RT_SHARED))
- pData->UpdateSymbol( aBuffer, aPos, GetGrammar());
- else
- aBuffer.append(pData->GetName());
- }
+ aBuffer.append(pData->GetName());
}
break;
case ocDBArea:
diff --git a/sc/source/filter/excel/xename.cxx b/sc/source/filter/excel/xename.cxx
index 276624cd2e64..54f2e8d867db 100644
--- a/sc/source/filter/excel/xename.cxx
+++ b/sc/source/filter/excel/xename.cxx
@@ -657,7 +657,7 @@ void XclExpNameManagerImpl::CreateUserNames()
for (; itr != itrEnd; ++itr)
{
// skip definitions of shared formulas
- if (!itr->second->HasType(RT_SHARED) && !FindNamedExpIndex(SCTAB_GLOBAL, itr->second->GetIndex()))
+ if (!FindNamedExpIndex(SCTAB_GLOBAL, itr->second->GetIndex()))
CreateName(SCTAB_GLOBAL, *itr->second);
}
//look at every sheet for local range names
@@ -670,7 +670,7 @@ void XclExpNameManagerImpl::CreateUserNames()
for (; itr != itrEnd; ++itr)
{
// skip definitions of shared formulas
- if (!itr->second->HasType(RT_SHARED) && !FindNamedExpIndex(tabIt->first, itr->second->GetIndex()))
+ if (!FindNamedExpIndex(tabIt->first, itr->second->GetIndex()))
CreateName(tabIt->first, *itr->second);
}
}
diff --git a/sc/source/filter/excel/xlformula.cxx b/sc/source/filter/excel/xlformula.cxx
index 94d95947f84d..2eff9115f905 100644
--- a/sc/source/filter/excel/xlformula.cxx
+++ b/sc/source/filter/excel/xlformula.cxx
@@ -765,15 +765,9 @@ void XclTokenArrayHelper::ConvertStringToList( ScTokenArray& rScTokArr, sal_Unic
// shared formulas ------------------------------------------------------------
-const ScTokenArray* XclTokenArrayHelper::GetSharedFormula( const XclRoot& rRoot, const ScTokenArray& rScTokArr )
-{
- if( rScTokArr.GetLen() == 1 )
- if( const FormulaToken* pScToken = rScTokArr.GetArray()[ 0 ] )
- if( pScToken->GetOpCode() == ocName )
- if( ScRangeData* pData = rRoot.GetNamedRanges().findByIndex( pScToken->GetIndex() ) )
- if( pData->HasType( RT_SHARED ) )
- return pData->GetCode();
- return 0;
+const ScTokenArray* XclTokenArrayHelper::GetSharedFormula( const XclRoot& /*rRoot*/, const ScTokenArray& /*rScTokArr*/ )
+{
+ return NULL;
}
// multiple operations --------------------------------------------------------
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 9ff21c771f24..5c1b7a64e698 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -5073,7 +5073,7 @@ sal_Bool ScDocFunc::InsertNameList( const ScAddress& rStartPos, sal_Bool bApi )
for (ScRangeName::iterator itr = itrLocalBeg; itr != itrLocalEnd; ++itr)
{
const ScRangeData& r = *itr->second;
- if (!r.HasType(RT_DATABASE) && !r.HasType(RT_SHARED))
+ if (!r.HasType(RT_DATABASE))
++nValidCount;
}
ScRangeName* pList = pDoc->GetRangeName();
@@ -5081,7 +5081,7 @@ sal_Bool ScDocFunc::InsertNameList( const ScAddress& rStartPos, sal_Bool bApi )
for (ScRangeName::iterator itr = itrBeg; itr != itrEnd; ++itr)
{
const ScRangeData& r = *itr->second;
- if (!r.HasType(RT_DATABASE) && !r.HasType(RT_SHARED) && !pLocalList->findByUpperName(r.GetUpperName()))
+ if (!r.HasType(RT_DATABASE) && !pLocalList->findByUpperName(r.GetUpperName()))
++nValidCount;
}
@@ -5110,13 +5110,13 @@ sal_Bool ScDocFunc::InsertNameList( const ScAddress& rStartPos, sal_Bool bApi )
for (ScRangeName::iterator itr = itrLocalBeg; itr != itrLocalEnd; ++itr)
{
ScRangeData& r = *itr->second;
- if (!r.HasType(RT_DATABASE) && !r.HasType(RT_SHARED))
+ if (!r.HasType(RT_DATABASE))
ppSortArray[j++] = &r;
}
for (ScRangeName::iterator itr = itrBeg; itr != itrEnd; ++itr)
{
ScRangeData& r = *itr->second;
- if (!r.HasType(RT_DATABASE) && !r.HasType(RT_SHARED) && !pLocalList->findByUpperName(itr->first))
+ if (!r.HasType(RT_DATABASE) && !pLocalList->findByUpperName(itr->first))
ppSortArray[j++] = &r;
}
#ifndef ICC
diff --git a/sc/source/ui/namedlg/namemgrtable.cxx b/sc/source/ui/namedlg/namemgrtable.cxx
index fd315c0c1de1..0fee2be2973e 100644
--- a/sc/source/ui/namedlg/namemgrtable.cxx
+++ b/sc/source/ui/namedlg/namemgrtable.cxx
@@ -143,7 +143,7 @@ void ScRangeManagerTable::Init()
for (ScRangeName::const_iterator it = pLocalRangeName->begin();
it != pLocalRangeName->end(); ++it)
{
- if (!it->second->HasType(RT_DATABASE) && !it->second->HasType(RT_SHARED))
+ if (!it->second->HasType(RT_DATABASE))
{
aLine.aName = it->second->GetName();
addEntry(aLine, false);
diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx
index 0ec46ba10121..ae7a342d1ede 100644
--- a/sc/source/ui/unoobj/nameuno.cxx
+++ b/sc/source/ui/unoobj/nameuno.cxx
@@ -82,7 +82,7 @@ static bool lcl_UserVisibleName(const ScRangeData& rData)
{
//! als Methode an ScRangeData
- return !rData.HasType(RT_DATABASE) && !rData.HasType(RT_SHARED);
+ return !rData.HasType(RT_DATABASE);
}
ScNamedRangeObj::ScNamedRangeObj( rtl::Reference< ScNamedRangesObj > xParent, ScDocShell* pDocSh, const String& rNm, Reference<container::XNamed> xSheet):
@@ -378,7 +378,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScNamedRangeObj::getPropertySet
}
void SAL_CALL ScNamedRangeObj::setPropertyValue(
- const OUString& rPropertyName, const uno::Any& aValue )
+ const OUString& rPropertyName, const uno::Any& /*aValue*/ )
throw(beans::UnknownPropertyException, beans::PropertyVetoException,
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
@@ -386,12 +386,7 @@ void SAL_CALL ScNamedRangeObj::setPropertyValue(
SolarMutexGuard aGuard;
if ( rPropertyName == SC_UNONAME_ISSHAREDFMLA )
{
- bool bIsShared = false;
- if( aValue >>= bIsShared )
- {
- sal_uInt16 nNewType = bIsShared ? RT_SHARED : RT_NAME;
- Modify_Impl( NULL, NULL, NULL, NULL, &nNewType,formula::FormulaGrammar::GRAM_PODF_A1 );
- }
+ // Ignore this.
}
}
@@ -417,8 +412,8 @@ uno::Any SAL_CALL ScNamedRangeObj::getPropertyValue( const OUString& rPropertyNa
}
else if ( rPropertyName == SC_UNONAME_ISSHAREDFMLA )
{
- if( ScRangeData* pData = GetRangeData_Impl() )
- aRet <<= static_cast< bool >( pData->HasType( RT_SHARED ) );
+ if (GetRangeData_Impl())
+ aRet <<= false;
}
return aRet;
}