summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/inc/compare.hxx1
-rw-r--r--sc/source/core/tool/compare.cxx65
-rw-r--r--unusedcode.easy1
3 files changed, 0 insertions, 67 deletions
diff --git a/sc/inc/compare.hxx b/sc/inc/compare.hxx
index 485f882878b5..9f09e6b5d760 100644
--- a/sc/inc/compare.hxx
+++ b/sc/inc/compare.hxx
@@ -66,7 +66,6 @@ private:
NULL means case sensitivity document option is to be used!
*/
double CompareFunc( const Compare::Cell& rCell1, const Compare::Cell& rCell2, bool bIgnoreCase, CompareOptions* pOptions = NULL );
-double CompareFunc( double fCell1, const Compare::Cell& rCell2, CompareOptions* pOptions = NULL );
double CompareFunc( const Compare::Cell& rCell1, double fCell2, CompareOptions* pOptions = NULL );
double CompareFunc( double fCell1, double fCell2 );
diff --git a/sc/source/core/tool/compare.cxx b/sc/source/core/tool/compare.cxx
index 11936b66d941..8c0f1f74223c 100644
--- a/sc/source/core/tool/compare.cxx
+++ b/sc/source/core/tool/compare.cxx
@@ -208,71 +208,6 @@ double CompareFunc( const Compare::Cell& rCell1, const Compare::Cell& rCell2, bo
return fRes;
}
-double CompareFunc( double fCell1, const Compare::Cell& rCell2, CompareOptions* pOptions )
-{
- // Keep DoubleError if encountered
- // #i40539# if bEmpty is set, bVal/nVal are uninitialized
- if (!rtl::math::isFinite(fCell1))
- return fCell1;
- if (!rCell2.mbEmpty && rCell2.mbValue && !rtl::math::isFinite(rCell2.mfValue))
- return rCell2.mfValue;
-
- bool bStringQuery = false;
- double fRes = 0;
- if (rCell2.mbEmpty)
- {
- if (fCell1 != 0.0)
- {
- if (fCell1 < 0.0)
- fRes = -1; // -x < empty cell
- else
- fRes = 1; // x > empty cell
- }
- // else: empty cell == 0.0
- }
- else
- {
- if (rCell2.mbValue)
- {
- if (!rtl::math::approxEqual(fCell1, rCell2.mfValue))
- {
- if (fCell1 - rCell2.mfValue < 0)
- fRes = -1;
- else
- fRes = 1;
- }
- }
- else
- {
- fRes = -1; // number is less than string
- bStringQuery = true;
- }
- }
-
- if (bStringQuery && pOptions)
- {
- const ScQueryEntry& rEntry = pOptions->aQueryEntry;
- const ScQueryEntry::QueryItemsType& rItems = rEntry.GetQueryItems();
- if (!rItems.empty())
- {
- const ScQueryEntry::Item& rItem = rItems[0];
- if (rItem.meType != ScQueryEntry::ByString && !rItem.maString.isEmpty() &&
- (rEntry.eOp == SC_EQUAL || rEntry.eOp == SC_NOT_EQUAL))
- {
- // As in ScTable::ValidQuery() match a numeric string for a
- // number query that originated from a string, e.g. in SUMIF
- // and COUNTIF. Transliteration is not needed here.
- bool bEqual = rCell2.maStr == rItem.maString;
-
- // match => fRes=0, else fRes=1
- fRes = double((rEntry.eOp == SC_NOT_EQUAL) ? bEqual : !bEqual);
- }
- }
- }
-
- return fRes;
-}
-
double CompareFunc( const Compare::Cell& rCell1, double fCell2, CompareOptions* pOptions )
{
// Keep DoubleError if encountered
diff --git a/unusedcode.easy b/unusedcode.easy
index fcfe54cce915..1cf802e6b0df 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -267,7 +267,6 @@ sc::CLBuildKernelThread::consume()
sc::CLBuildKernelThread::produce()
sc::CellTextAttr::CellTextAttr(unsigned short, unsigned char)
sc::ColumnSet::has(short, short) const
-sc::CompareFunc(double, sc::Compare::Cell const&, sc::CompareOptions*)
sd::LeftDrawPaneShell::RegisterInterface(SfxModule*)
sd::LeftImpressPaneShell::RegisterInterface(SfxModule*)
std::_Rb_tree<rtl::OUString, std::pair<rtl::OUString const, (anonymous namespace)::TemplateId>, std::_Select1st<std::pair<rtl::OUString const, (anonymous namespace)::TemplateId> >, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, (anonymous namespace)::TemplateId> > >::_Rb_tree(std::_Rb_tree<rtl::OUString, std::pair<rtl::OUString const, (anonymous namespace)::TemplateId>, std::_Select1st<std::pair<rtl::OUString const, (anonymous namespace)::TemplateId> >, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, (anonymous namespace)::TemplateId> > >&&)