66#include <osl/thread.h>
67#include <rtl/ustrbuf.hxx>
88 double Constant =
m_pObjStrm->QuickReadDouble();
90 m_aStack.push_back( std::make_unique<LwpFormulaConst>(Constant) );
99 sal_uInt16 nStrLen =
m_pObjStrm->QuickReadInt16();
101 std::vector<char>
aBuf(nStrLen + 1);
104 OUString aText =
"\"" +
105 OUString(
aBuf.data(), nStrLen, osl_getThreadTextEncoding()) +
108 m_aStack.push_back(std::make_unique<LwpFormulaText>(aText));
133 m_aStack.push_back( std::make_unique<LwpFormulaCellRangeAddr>(pStartCellAddr->GetCol(),
134 pStartCellAddr->GetRow(),
135 pEndCellAddr->GetCol(),
136 pEndCellAddr->GetRow()) );
154 throw std::runtime_error(
"error reading expression");
184 m_aStack.push_back(std::move(xFunc));
249 sal_uInt16 NumberOfArguments =
m_pObjStrm->QuickReaduInt16();
254 sal_uInt16 ArgumentDiskLength =
m_pObjStrm->QuickReaduInt16();
255 bool bArgument =
true;
304 SAL_WARN(
"lwp",
"missing row list");
327 aFormula =
m_aStack[0]->ToString(pCellsMap);
342 OUString aFormula =
Convert(pCellsMap);
343 if (!aFormula.isEmpty())
357 return OUString::number(
m_dVal);
365 : m_aCol(aCol), m_aRow(aRow)
379 : m_aStartCol(aStartCol), m_aStartRow(aStartRow),
380 m_aEndCol(aEndCol), m_aEndRow(aEndRow)
389 OUString aCellAddr =
"<"
405 m_aArgs.push_back(std::move(pArg));
412 return "(" +
ToString(pCellsMap) +
")";
419 OUStringBuffer aFormula;
422 aFormula.append(aFuncName +
426 for (
auto const& elem :
m_aArgs)
428 aFormula.append(elem->ToArgString(pCellsMap) +
"|");
434 aFormula.setLength(aFormula.getLength()-1);
441 return aFormula.makeStringAndClear();
452 aFormula +=
m_aArgs[1]->ToArgString(pCellsMap) +
" ";
455 aFormula += aFuncName +
" " +
456 m_aArgs[0]->ToArgString(pCellsMap);
474 aFormula += aFuncName +
475 m_aArgs[0]->ToArgString(pCellsMap);
571 assert( -1==nRow || -1==
static_cast<sal_Int8>(nCol));
void Read() override
@descr Read LwpDLVList data from object stream
virtual void Convert(XFCell *pCell, LwpTableLayout *pCellsMap=nullptr)
sal_uInt8 ColumnID(sal_uInt8 FormulaColumn)
void QuickRead(LwpObjectStream *pStrm)
LwpFormulaText(OUString aText)
void Read(LwpObjectStream *pObjStrm)
rtl::Reference< LwpObject > obj(VO_TYPE tag=VO_INVALID) const
@descr get object from object factory per the object id
std::unique_ptr< LwpObjectStream > m_pObjStrm
sal_uInt16 GetRowID() const
void QuickRead(LwpObjectStream *pStrm)
sal_uInt16 RowID(sal_uInt16 FormulaRow)
encapsulate XInputStream to provide SvStream like interfaces
VO_TABLELAYOUT object and functions for registering styles and converting tables.
XFCell * GetCellsMap(sal_uInt16 nRow, sal_uInt8 nCol)
get cell map info
@descr Table cell object.
void SetFormula(const OUString &formula)
@descr Set cell formula.
OUString GetCellName()
@descr Return cell name.
#define SAL_WARN(area, stream)
For LWP filter architecture prototype - table layouts.
For LWP filter architecture prototype - table object.