Lines Matching refs:p
30 sal_uInt16 ImpGetUShort( const SbxValues* p ) in ImpGetUShort() argument
35 switch( +p->eType ) in ImpGetUShort()
42 nRes = p->nChar; in ImpGetUShort()
45 nRes = p->nByte; break; in ImpGetUShort()
48 if( p->nInteger < 0 ) in ImpGetUShort()
53 nRes = p->nInteger; in ImpGetUShort()
57 nRes = p->nUShort; in ImpGetUShort()
60 if( p->nLong > SbxMAXUINT ) in ImpGetUShort()
64 else if( p->nLong < 0 ) in ImpGetUShort()
69 nRes = (sal_uInt16) p->nLong; in ImpGetUShort()
72 if( p->nULong > SbxMAXUINT ) in ImpGetUShort()
77 nRes = (sal_uInt16) p->nULong; in ImpGetUShort()
80 if( p->nInt64 > SbxMAXUINT ) in ImpGetUShort()
84 else if( p->nInt64 < 0 ) in ImpGetUShort()
89 nRes = (sal_uInt16) p->nInt64; in ImpGetUShort()
92 if( p->uInt64 > SbxMAXUINT ) in ImpGetUShort()
97 nRes = (sal_uInt16) p->uInt64; in ImpGetUShort()
100 if( p->nSingle > SbxMAXUINT ) in ImpGetUShort()
104 else if( p->nSingle < 0 ) in ImpGetUShort()
109 nRes = (sal_uInt16) ( p->nSingle + 0.5 ); in ImpGetUShort()
120 if( p->eType == SbxCURRENCY ) in ImpGetUShort()
121 dVal = ImpCurrencyToDouble( p->nLong64 ); in ImpGetUShort()
122 else if( p->eType == SbxLONG64 ) in ImpGetUShort()
123 dVal = ImpINT64ToDouble( p->nLong64 ); in ImpGetUShort()
124 else if( p->eType == SbxULONG64 ) in ImpGetUShort()
125 dVal = ImpUINT64ToDouble( p->nULong64 ); in ImpGetUShort()
126 else if( p->eType == SbxDECIMAL ) in ImpGetUShort()
129 if( p->pDecimal ) in ImpGetUShort()
130 p->pDecimal->getDouble( dVal ); in ImpGetUShort()
133 dVal = p->nDouble; in ImpGetUShort()
150 if( !p->pOUString ) in ImpGetUShort()
156 if( ImpScan( *p->pOUString, d, t, NULL ) != SbxERR_OK ) in ImpGetUShort()
172 SbxValue* pVal = PTR_CAST(SbxValue,p->pObj); in ImpGetUShort()
183 nRes = *p->pByte; break; in ImpGetUShort()
186 nRes = *p->pUShort; break; in ImpGetUShort()
190 aTmp.nChar = *p->pChar; goto ref; in ImpGetUShort()
193 aTmp.nInteger = *p->pInteger; goto ref; in ImpGetUShort()
195 aTmp.nLong = *p->pLong; goto ref; in ImpGetUShort()
197 aTmp.nULong = *p->pULong; goto ref; in ImpGetUShort()
199 aTmp.nSingle = *p->pSingle; goto ref; in ImpGetUShort()
202 aTmp.nDouble = *p->pDouble; goto ref; in ImpGetUShort()
204 aTmp.nULong64 = *p->pULong64; goto ref; in ImpGetUShort()
207 aTmp.nLong64 = *p->pLong64; goto ref; in ImpGetUShort()
209 aTmp.nInt64 = *p->pnInt64; goto ref; in ImpGetUShort()
211 aTmp.uInt64 = *p->puInt64; goto ref; in ImpGetUShort()
213 aTmp.eType = SbxDataType( p->eType & 0x0FFF ); in ImpGetUShort()
214 p = &aTmp; goto start; in ImpGetUShort()
222 void ImpPutUShort( SbxValues* p, sal_uInt16 n ) in ImpPutUShort() argument
227 switch( +p->eType ) in ImpPutUShort()
231 p->nUShort = n; break; in ImpPutUShort()
233 p->nLong = n; break; in ImpPutUShort()
235 p->nULong = n; break; in ImpPutUShort()
237 p->nSingle = n; break; in ImpPutUShort()
240 p->nDouble = n; break; in ImpPutUShort()
242 p->nInt64 = n; break; in ImpPutUShort()
244 p->uInt64 = n; break; in ImpPutUShort()
246 p->nULong64 = ImpDoubleToUINT64( (double)n ); break; in ImpPutUShort()
248 p->nLong64 = ImpDoubleToINT64( (double)n ); break; in ImpPutUShort()
250 p->nLong64 = ImpDoubleToCurrency( (double)n ); break; in ImpPutUShort()
253 ImpCreateDecimal( p )->setUInt( n ); in ImpPutUShort()
258 aTmp.pChar = &p->nChar; goto direct; in ImpPutUShort()
260 aTmp.pByte = &p->nByte; goto direct; in ImpPutUShort()
263 aTmp.pInteger = &p->nInteger; in ImpPutUShort()
265 aTmp.eType = SbxDataType( p->eType | SbxBYREF ); in ImpPutUShort()
266 p = &aTmp; goto start; in ImpPutUShort()
271 if( !p->pOUString ) in ImpPutUShort()
272 p->pOUString = new ::rtl::OUString; in ImpPutUShort()
273 ImpCvtNum( (double) n, 0, *p->pOUString ); in ImpPutUShort()
277 SbxValue* pVal = PTR_CAST(SbxValue,p->pObj); in ImpPutUShort()
286 *p->pChar = (xub_Unicode) n; break; in ImpPutUShort()
292 *p->pByte = (sal_uInt8) n; break; in ImpPutUShort()
299 *p->pInteger = (sal_Int16) n; break; in ImpPutUShort()
302 *p->pUShort = n; break; in ImpPutUShort()
304 *p->pLong = n; break; in ImpPutUShort()
306 *p->pULong = n; break; in ImpPutUShort()
308 *p->pSingle = n; break; in ImpPutUShort()
311 *p->pDouble = n; break; in ImpPutUShort()
313 *p->pnInt64 = n; break; in ImpPutUShort()
315 *p->puInt64 = n; break; in ImpPutUShort()
317 *p->pULong64 = ImpDoubleToUINT64( (double)n ); break; in ImpPutUShort()
319 *p->pLong64 = ImpDoubleToINT64( (double)n ); break; in ImpPutUShort()
321 *p->pLong64 = ImpDoubleToCurrency( (double)n ); break; in ImpPutUShort()