2010-10-27 06:43:08 -05:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2000-09-18 11:07:07 -05:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 12:56:46 -05:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2010-02-12 08:01:35 -06:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 12:56:46 -05:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 12:56:46 -05:00
|
|
|
* This file is part of OpenOffice.org.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 12:56:46 -05:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 12:56:46 -05:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 12:56:46 -05:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
#ifndef SC_SUBTOTAL_HXX
|
|
|
|
#define SC_SUBTOTAL_HXX
|
|
|
|
|
|
|
|
#include "global.hxx"
|
|
|
|
|
|
|
|
class SubTotal
|
|
|
|
{
|
2008-09-30 00:48:28 -05:00
|
|
|
public:
|
|
|
|
|
2011-01-17 06:20:22 -06:00
|
|
|
static sal_Bool SafePlus( double& fVal1, double fVal2);
|
|
|
|
static sal_Bool SafeMult( double& fVal1, double fVal2);
|
|
|
|
static sal_Bool SafeDiv( double& fVal1, double fVal2);
|
2000-09-18 11:07:07 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2011-03-13 13:39:41 -05:00
|
|
|
struct ScFunctionData // to calculate single functions
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
|
|
|
ScSubTotalFunc eFunc;
|
|
|
|
double nVal;
|
|
|
|
long nCount;
|
2011-01-17 06:20:22 -06:00
|
|
|
sal_Bool bError;
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
ScFunctionData( ScSubTotalFunc eFn ) :
|
2011-03-10 15:55:21 -06:00
|
|
|
eFunc(eFn), nVal(0.0), nCount(0), bError(false) {}
|
2000-09-18 11:07:07 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2010-10-27 06:43:08 -05:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|