Update of /cvsroot/objecthandler/ObjectHandler/ohxl
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28265/ohxl
Modified Files:
conversions.cpp conversions.hpp
Log Message:
ohDependsOn() - validate only that inputs are valid range references
Index: conversions.cpp
===================================================================
RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/conversions.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** conversions.cpp 29 Oct 2006 14:11:38 -0000 1.11
--- conversions.cpp 30 Oct 2006 18:39:18 -0000 1.12
***************
*** 31,55 ****
}
! DLL_API void validateReference(const OPER *xReference, const std::string &name) {
! if (xReference->xltype == xltypeErr) {
std::ostringstream msg;
msg << "parameter '" << name << "' has error value";
throw Exception(msg.str());
! } else if (xReference->xltype == xltypeMulti) {
! if (!validateMulti(xReference)) {
std::ostringstream msg;
msg << "parameter '" << name << "' has error value";
throw Exception(msg.str());
}
! //} else if (xReference->xltype == xltypeRef || xReference->xltype == xltypeSRef) {
! // XLOPER xMulti;
! // Excel(xlCoerce, &xMulti, 1, xReference, TempInt(xltypeMulti));
! // bool isValid = validateMulti(&xMulti);
! // Excel(xlFree, 0, 1, &xMulti);
! // if (!isValid) {
! // std::ostringstream msg;
! // msg << "parameter '" << name << "' has error value";
! // throw Exception(msg.str());
! // }
}
}
--- 31,55 ----
}
! DLL_API void validateRange(const OPER *xRange, const std::string &name) {
! if (xRange->xltype == xltypeErr) {
std::ostringstream msg;
msg << "parameter '" << name << "' has error value";
throw Exception(msg.str());
! } else if (xRange->xltype == xltypeMulti) {
! if (!validateMulti(xRange)) {
std::ostringstream msg;
msg << "parameter '" << name << "' has error value";
throw Exception(msg.str());
}
! }
! }
!
! DLL_API void validateReference(const XLOPER *xReference, const std::string &name) {
! if (xReference->xltype != xltypeMissing
! && xReference->xltype != xltypeRef
! && xReference->xltype != xltypeSRef) {
! std::ostringstream msg;
! msg << "parameter '" << name << "' is not a valid range reference";
! throw Exception(msg.str());
}
}
Index: conversions.hpp
===================================================================
RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/conversions.hpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** conversions.hpp 29 Oct 2006 14:11:38 -0000 1.12
--- conversions.hpp 30 Oct 2006 18:39:18 -0000 1.13
***************
*** 28,32 ****
namespace ObjHandler {
! DLL_API void validateReference(const OPER *xReference, const std::string &name);
DLL_API void stringToChar(char *c, const std::string &s);
void operToOper(OPER *xTarget, const OPER *xSource);
--- 28,33 ----
namespace ObjHandler {
! DLL_API void validateRange(const OPER *xRange, const std::string &name);
! DLL_API void validateReference(const XLOPER *xReference, const std::string &name);
DLL_API void stringToChar(char *c, const std::string &s);
void operToOper(OPER *xTarget, const OPER *xSource);
|