LibreOffice Module basic (master) 1
sbxvar.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <config_features.h>
21
22#include <tools/stream.hxx>
24
25#include <basic/sbx.hxx>
26#include <runtime.hxx>
27#include "sbxres.hxx"
28#include "sbxconv.hxx"
29#include <rtlproto.hxx>
30#include <sbunoobj.hxx>
31#include <rtl/ustrbuf.hxx>
32#include <sal/log.hxx>
33#include <global.hxx>
35
36#include <com/sun/star/uno/XInterface.hpp>
37#include <utility>
38#include <filefmt.hxx>
39using namespace com::sun::star::uno;
40
41// SbxVariable
42
44{
45}
46
48 : SvRefBase( r ),
49 SbxValue( r ),
50 m_aDeclareClassName( r.m_aDeclareClassName ),
51 m_xComListener( r.m_xComListener),
52 mpPar( r.mpPar ),
53 pInfo( r.pInfo )
54{
55#if HAVE_FEATURE_SCRIPTING
56 if( r.m_xComListener.is() )
57 {
59 }
60#endif
61 if( r.CanRead() )
62 {
63 pParent = r.pParent;
65 maName = r.maName;
66 nHash = r.nHash;
67 }
68}
69
71 : SbxVariable(r)
72 , xParent(const_cast<SbxVariable&>(r).GetParent())
73{
74 assert(GetParent() == xParent.get());
75}
76
78{
79 assert(GetParent() == xParent.get());
82 assert(GetParent() == xParent.get());
83}
84
86{
87}
88
90{
91#if HAVE_FEATURE_SCRIPTING
93 {
95 }
96#endif
97 mpBroadcaster.reset();
98}
99
100// Broadcasting
101
103{
104 if( !mpBroadcaster )
105 {
106 mpBroadcaster.reset( new SfxBroadcaster );
107 }
108 return *mpBroadcaster;
109}
110
112{
113 return mpPar.get();
114}
115
116
117// Perhaps some day one could cut the parameter 0.
118// Then the copying will be dropped...
119
121{
123 return;
124
125 // Because the method could be called from outside, check the
126 // rights here again
127 if( nHintId == SfxHintId::BasicDataWanted )
128 {
129 if( !CanRead() )
130 {
131 return;
132 }
133 }
134 if( nHintId == SfxHintId::BasicDataChanged )
135 {
136 if( !CanWrite() )
137 {
138 return;
139 }
140 }
141
142 //fdo#86843 Add a ref during the following block to guard against
143 //getting deleted before completing this method
144 SbxVariableRef aBroadcastGuard(this);
145
146 // Avoid further broadcasting
147 std::unique_ptr<SfxBroadcaster> pSave = std::move(mpBroadcaster);
148 SbxFlagBits nSaveFlags = GetFlags();
150 if( mpPar.is() )
151 {
152 // Register this as element 0, but don't change over the parent!
153 mpPar->GetRef(0) = this;
154 }
155 pSave->Broadcast( SbxHint( nHintId, this ) );
156 mpBroadcaster = std::move(pSave);
157 SetFlags( nSaveFlags );
158}
159
161{
162 if( !pInfo.is() )
163 {
164 Broadcast( SfxHintId::BasicInfoWanted );
165 if( pInfo.is() )
166 {
167 SetModified( true );
168 }
169 }
170 return pInfo.get();
171}
172
173void SbxVariable::SetInfo( SbxInfo* p )
174{
175 pInfo = p;
176}
177
179{
180 mpPar = p;
181}
182
183
184// Name of the variables
185
186// static
187OUString SbxVariable::NameToCaseInsensitiveName(const OUString& rName)
188{
189 return SbGlobal::GetTransliteration().transliterate(rName, 0, rName.getLength());
190}
191
192void SbxVariable::SetName( const OUString& rName )
193{
194 maName = rName;
195 nHash = MakeHashCode( rName );
196 maNameCI.clear();
197}
198
199const OUString& SbxVariable::GetName( SbxNameType t ) const
200{
201 static const char cSuffixes[] = " %&!#@ $";
202 if( t == SbxNameType::NONE )
203 {
204 return maName;
205 }
207 {
208 if (maNameCI.isEmpty() && !maName.isEmpty())
210 return maNameCI;
211 }
212 // Request parameter-information (not for objects)
213 const_cast<SbxVariable*>(this)->GetInfo();
214 // Append nothing, if it is a simple property (no empty brackets)
215 if (!pInfo.is() || (pInfo->m_Params.empty() && GetClass() == SbxClassType::Property))
216 {
217 return maName;
218 }
219 sal_Unicode cType = ' ';
220 OUStringBuffer aTmp( maName );
221 // short type? Then fetch it, possible this is 0.
222 SbxDataType et = GetType();
224 {
225 if( et <= SbxSTRING )
226 {
227 cType = cSuffixes[ et ];
228 }
229 if( cType != ' ' )
230 {
231 aTmp.append(cType);
232 }
233 }
234 aTmp.append("(");
235
236 for (SbxParams::const_iterator iter = pInfo->m_Params.begin(); iter != pInfo->m_Params.end(); ++iter)
237 {
238 auto const& i = *iter;
239 int nt = i->eType & 0x0FFF;
240 if (iter != pInfo->m_Params.begin())
241 {
242 aTmp.append(",");
243 }
244 if( i->nFlags & SbxFlagBits::Optional )
245 {
246 aTmp.append( GetSbxRes( StringId::Optional ) );
247 }
248 if( i->eType & SbxBYREF )
249 {
250 aTmp.append( GetSbxRes( StringId::ByRef ) );
251 }
252 aTmp.append( i->aName );
253 cType = ' ';
254 // short type? Then fetch it, possible this is 0.
256 {
257 if( nt <= SbxSTRING )
258 {
259 cType = cSuffixes[ nt ];
260 }
261 }
262 if( cType != ' ' )
263 {
264 aTmp.append(cType);
265 if( i->eType & SbxARRAY )
266 {
267 aTmp.append("()");
268 }
269 }
270 else
271 {
272 if( i->eType & SbxARRAY )
273 {
274 aTmp.append("()");
275 }
276 // long type?
277 aTmp.append(GetSbxRes( StringId::As ));
278 if( nt < 32 )
279 {
280 aTmp.append(GetSbxRes( static_cast<StringId>( static_cast<int>( StringId::Types ) + nt ) ));
281 }
282 else
283 {
284 aTmp.append(GetSbxRes( StringId::Any ));
286 }
287 }
288 aTmp.append(")");
289 const_cast<SbxVariable*>(this)->aToolString = aTmp.makeStringAndClear();
290 return aToolString;
291}
292
293// Operators
294
296{
297 if (this != &r)
298 {
300 // tdf#144353 - copy information about a missing parameter. See SbiRuntime::SetIsMissing.
301 // We cannot unconditionally assign the data about a variable because we would overwrite
302 // the information about parameters (name, type, flags, and ids). For instance, in the case
303 // where a method will be initialized with a literal.
304 if (!pInfo)
305 pInfo = r.pInfo;
309#if HAVE_FEATURE_SCRIPTING
310 if( m_xComListener.is() )
311 {
313 }
314#endif
315 }
316 return *this;
317}
318
319// Conversion
320
322{
323 if( aData.eType == SbxOBJECT )
324 {
325 return aData.pObj ? aData.pObj->GetType() : SbxOBJECT;
326 }
327 else if( aData.eType == SbxVARIANT )
328 {
329 return aData.pObj ? aData.pObj->GetType() : SbxVARIANT;
330 }
331 else
332 {
333 return aData.eType;
334 }
335}
336
338{
340}
341
343{
345 {
346 return;
347 }
349 if( pParent && pParent != this ) //??? HotFix: Recursion out here MM
350 {
351 pParent->SetModified( b );
352 }
353}
354
356{
357#ifdef DBG_UTIL
358 // Will the parent of a SbxObject be set?
359 if (p && dynamic_cast<SbxObject*>(this))
360 {
361 // then this had to be a child of the new parent
362 bool bFound = false;
363 SbxArray *pChildren = p->GetObjects();
364 if ( pChildren )
365 {
366 for (sal_uInt32 nIdx = 0; !bFound && nIdx < pChildren->Count(); ++nIdx)
367 {
368 bFound = (this == pChildren->Get(nIdx));
369 }
370 }
372 !bFound, "basic.sbx",
373 "dangling: [" << GetName() << "].SetParent([" << p->GetName()
374 << "])");
375 }
376#endif
377
378 pParent = p;
379}
380
381const OUString& SbxVariable::GetDeclareClassName() const
382{
383 return m_aDeclareClassName;
384}
385
386void SbxVariable::SetDeclareClassName( const OUString& rDeclareClassName )
387{
388 m_aDeclareClassName = rDeclareClassName;
389}
390
391void SbxVariable::SetComListener( const css::uno::Reference< css::uno::XInterface >& xComListener,
392 StarBASIC* pParentBasic )
393{
394 m_xComListener = xComListener;
395 m_pComListenerParentBasic = pParentBasic;
396#if HAVE_FEATURE_SCRIPTING
397 registerComListenerVariableForBasic( this, pParentBasic );
398#endif
399}
400
402{
403 m_xComListener.clear();
404}
405
406
407// Loading/Saving
408
409bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
410{
411 sal_uInt8 cMark;
412 rStrm.ReadUChar( cMark );
413 if( cMark == 0xFF )
414 {
415 if( !SbxValue::LoadData( rStrm, nVer ) )
416 {
417 return false;
418 }
420 RTL_TEXTENCODING_ASCII_US);
421 sal_uInt32 nTemp;
422 rStrm.ReadUInt32( nTemp );
423 nUserData = nTemp;
424 }
425 else
426 {
427 sal_uInt16 nType;
428 rStrm.SeekRel( -1 );
431 RTL_TEXTENCODING_ASCII_US);
432 sal_uInt32 nTemp;
433 rStrm.ReadUInt32( nTemp );
434 nUserData = nTemp;
435 // correction: old methods have instead of SbxNULL now SbxEMPTY
437 {
438 nType = SbxEMPTY;
439 }
440 SbxValues aTmp;
441 OUString aTmpString;
442 OUString aVal;
443 aTmp.eType = aData.eType = static_cast<SbxDataType>(nType);
444 aTmp.pOUString = &aVal;
445 switch( nType )
446 {
447 case SbxBOOL:
448 case SbxERROR:
449 case SbxINTEGER:
450 rStrm.ReadInt16( aTmp.nInteger ); break;
451 case SbxLONG:
452 rStrm.ReadInt32( aTmp.nLong ); break;
453 case SbxSINGLE:
454 {
455 // Floats as ASCII
457 rStrm, RTL_TEXTENCODING_ASCII_US);
458 double d;
460 if( ImpScan( aTmpString, d, t, nullptr, !LibreOffice6FloatingPointMode() ) != ERRCODE_NONE || t == SbxDOUBLE )
461 {
462 aTmp.nSingle = 0;
463 return false;
464 }
465 aTmp.nSingle = static_cast<float>(d);
466 break;
467 }
468 case SbxDATE:
469 case SbxDOUBLE:
470 {
471 // Floats as ASCII
473 RTL_TEXTENCODING_ASCII_US);
475 if( ImpScan( aTmpString, aTmp.nDouble, t, nullptr, !LibreOffice6FloatingPointMode() ) != ERRCODE_NONE )
476 {
477 aTmp.nDouble = 0;
478 return false;
479 }
480 break;
481 }
482 case SbxSTRING:
484 RTL_TEXTENCODING_ASCII_US);
485 break;
486 case SbxEMPTY:
487 case SbxNULL:
488 break;
489 default:
491 SAL_WARN( "basic.sbx", "Loaded a non-supported data type" );
492 return false;
493 }
494 // putt value
495 if( nType != SbxNULL && nType != SbxEMPTY && !Put( aTmp ) )
496 {
497 return false;
498 }
499 }
500 rStrm.ReadUChar( cMark );
501 // cMark is also a version number!
502 // 1: initial version
503 // 2: with nUserData
504 if( cMark )
505 {
506 if( cMark > 2 )
507 {
508 return false;
509 }
510 pInfo = new SbxInfo;
511 pInfo->LoadData( rStrm, static_cast<sal_uInt16>(cMark) );
512 }
513 Broadcast( SfxHintId::BasicDataChanged );
515 SetModified( true );
516 return true;
517}
518
519std::pair<bool, sal_uInt32> SbxVariable::StoreData( SvStream& rStrm ) const
520{
521 rStrm.WriteUChar( 0xFF ); // Marker
522 bool bValStore;
523 if( dynamic_cast<const SbxMethod *>(this) != nullptr )
524 {
525 // #50200 Avoid that objects , which during the runtime
526 // as return-value are saved in the method as a value were saved
527 SbxVariable* pThis = const_cast<SbxVariable*>(this);
528 SbxFlagBits nSaveFlags = GetFlags();
529 pThis->SetFlag( SbxFlagBits::Write );
530 pThis->SbxValue::Clear();
531 pThis->SetFlags( nSaveFlags );
532
533 // So that the method will not be executed in any case!
534 // CAST, to avoid const!
536 bValStore = SbxValue::StoreData( rStrm ).first;
538 }
539 else
540 {
541 bValStore = SbxValue::StoreData( rStrm ).first;
542 }
543 if( !bValStore )
544 {
545 return { false, 0 };
546 }
548 RTL_TEXTENCODING_ASCII_US);
550 if( pInfo.is() )
551 {
552 rStrm.WriteUChar( 2 ); // Version 2: with UserData!
553 pInfo->StoreData( rStrm );
554 }
555 else
556 {
557 rStrm.WriteUChar( 0 );
558 }
559 return { true, B_IMG_VERSION_12 };
560}
561
562// SbxInfo
563
564SbxInfo::SbxInfo()
565 : nHelpId(0)
566{}
567
568SbxInfo::SbxInfo( OUString a, sal_uInt32 n )
569 : aHelpFile(std::move( a )), nHelpId( n )
570{}
571
572void SbxVariable::Dump( SvStream& rStrm, bool bFill )
573{
574 OString aBNameStr(OUStringToOString(GetName( SbxNameType::ShortTypes ), RTL_TEXTENCODING_ASCII_US));
575 rStrm.WriteOString( "Variable( " )
576 .WriteOString( OString::number(reinterpret_cast<sal_IntPtr>(this)) ).WriteOString( "==" )
577 .WriteOString( aBNameStr );
578 OString aBParentNameStr(OUStringToOString(GetParent()->GetName(), RTL_TEXTENCODING_ASCII_US));
579 if ( GetParent() )
580 {
581 rStrm.WriteOString( " in parent '" ).WriteOString( aBParentNameStr ).WriteOString( "'" );
582 }
583 else
584 {
585 rStrm.WriteOString( " no parent" );
586 }
587 rStrm.WriteOString( " ) " );
588
589 // output also the object at object-vars
590 if ( GetValues_Impl().eType == SbxOBJECT &&
591 GetValues_Impl().pObj &&
592 GetValues_Impl().pObj != this &&
593 GetValues_Impl().pObj != GetParent() )
594 {
595 rStrm.WriteOString( " contains " );
596 static_cast<SbxObject*>(GetValues_Impl().pObj)->Dump( rStrm, bFill );
597 }
598 else
599 {
600 rStrm << endl;
601 }
602}
603
604/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
XPropertyListType t
double d
static utl::TransliterationWrapper & GetTransliteration()
Definition: global.cxx:39
Definition: sbx.hxx:95
sal_uInt32 Count() const
Definition: sbxarray.cxx:87
SbxVariable * Get(sal_uInt32)
Definition: sbxarray.cxx:108
bool CanWrite() const
Definition: sbxcore.hxx:123
bool CanRead() const
Definition: sbxcore.hxx:120
void SetFlags(SbxFlagBits n)
Definition: sbxcore.hxx:102
bool IsSet(SbxFlagBits n) const
Definition: sbxcore.hxx:114
void SetFlag(SbxFlagBits n)
Definition: sbxcore.hxx:108
SbxFlagBits GetFlags() const
Definition: sbxcore.hxx:105
virtual void SetModified(bool)
Definition: sbxbase.cxx:86
virtual SbxDataType GetType() const
Definition: sbxbase.cxx:76
void ResetFlag(SbxFlagBits n)
Definition: sbxcore.hxx:111
virtual void SetParent(SbxObject *p) override
Definition: sbxvar.cxx:77
SbxEnsureParentVariable(const SbxVariable &r)
Definition: sbxvar.cxx:70
SbxObjectRef xParent
Definition: sbxvar.hxx:328
Definition: sbx.hxx:81
SbxValues aData
Definition: sbxvar.hxx:99
OUString aToolString
Definition: sbxvar.hxx:101
virtual std::pair< bool, sal_uInt32 > StoreData(SvStream &) const override
Definition: sbxvalue.cxx:1470
SbxValue & operator=(const SbxValue &)
Definition: sbxvalue.cxx:89
virtual bool LoadData(SvStream &, sal_uInt16) override
Definition: sbxvalue.cxx:1308
const SbxValues & GetValues_Impl() const
Definition: sbxvar.hxx:135
bool Put(const SbxValues &)
Definition: sbxvalue.cxx:393
SbxVariable & operator=(const SbxVariable &)
Definition: sbxvar.cxx:295
const SbxObject * GetParent() const
Definition: sbxvar.hxx:296
StarBASIC * m_pComListenerParentBasic
Definition: sbxvar.hxx:248
const OUString & GetDeclareClassName() const
Definition: sbxvar.cxx:381
void ClearComListener()
Definition: sbxvar.cxx:401
virtual SbxClassType GetClass() const
Definition: sbxvar.cxx:337
virtual bool LoadData(SvStream &, sal_uInt16) override
Definition: sbxvar.cxx:409
SfxBroadcaster & GetBroadcaster()
Definition: sbxvar.cxx:102
void SetName(const OUString &)
Definition: sbxvar.cxx:192
OUString maName
Definition: sbxvar.hxx:250
virtual ~SbxVariable() override
Definition: sbxvar.cxx:89
virtual void Broadcast(SfxHintId nHintId) override
Definition: sbxvar.cxx:120
void SetInfo(SbxInfo *p)
Definition: sbxvar.cxx:173
void SetParameters(SbxArray *p)
Definition: sbxvar.cxx:178
virtual SbxDataType GetType() const override
Definition: sbxvar.cxx:321
SbxArray * GetParameters() const
Definition: sbxvar.cxx:111
SbxArrayRef mpPar
Definition: sbxvar.hxx:252
sal_uInt32 nUserData
Definition: sbxvar.hxx:257
void Dump(SvStream &, bool bDumpAll)
Definition: sbxvar.cxx:572
const OUString & GetName(SbxNameType=SbxNameType::NONE) const
Definition: sbxvar.cxx:199
css::uno::Reference< css::uno::XInterface > m_xComListener
Definition: sbxvar.hxx:247
OUString maNameCI
Definition: sbxvar.hxx:251
SbxVariable()
Definition: sbxvar.cxx:43
std::unique_ptr< SfxBroadcaster > mpBroadcaster
Definition: sbxvar.hxx:249
void SetDeclareClassName(const OUString &)
Definition: sbxvar.cxx:386
static constexpr sal_uInt16 MakeHashCode(std::u16string_view aName)
Definition: sbxvar.hxx:307
virtual std::pair< bool, sal_uInt32 > StoreData(SvStream &) const override
Definition: sbxvar.cxx:519
void SetComListener(const css::uno::Reference< css::uno::XInterface > &xComListener, StarBASIC *pParentBasic)
Definition: sbxvar.cxx:391
virtual SbxInfo * GetInfo()
Definition: sbxvar.cxx:160
SbxInfoRef pInfo
Definition: sbxvar.hxx:256
static OUString NameToCaseInsensitiveName(const OUString &rName)
Definition: sbxvar.cxx:187
virtual void SetParent(SbxObject *)
Definition: sbxvar.cxx:355
OUString m_aDeclareClassName
Definition: sbxvar.hxx:246
virtual void SetModified(bool) override
Definition: sbxvar.cxx:342
SbxObject * pParent
Definition: sbxvar.hxx:258
sal_uInt16 nHash
Definition: sbxvar.hxx:253
SvStream & ReadInt16(sal_Int16 &rInt16)
SvStream & WriteUChar(unsigned char nChar)
SvStream & WriteOString(std::string_view rStr)
SvStream & WriteUInt32(sal_uInt32 nUInt32)
SvStream & ReadUInt32(sal_uInt32 &rUInt32)
SvStream & ReadInt32(sal_Int32 &rInt32)
sal_uInt64 SeekRel(sal_Int64 nPos)
SvStream & ReadUInt16(sal_uInt16 &rUInt16)
SvStream & ReadUChar(unsigned char &rChar)
T * get() const
bool is() const
OUString transliterate(const OUString &rStr, sal_Int32 nStart, sal_Int32 nLen) const
#define ERRCODE_NONE
#define B_IMG_VERSION_12
Definition: filefmt.hxx:48
DocumentType eType
SfxHintId
void * p
sal_Int64 n
uno_Any a
#define SAL_INFO_IF(condition, area, stream)
#define SAL_WARN(area, stream)
int i
void SvStream & rStrm
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
QPRO_FUNC_TYPE nType
bool LibreOffice6FloatingPointMode()
Definition: methods1.cxx:2946
void removeDimAsNewRecoverItem(SbxVariable *pVar)
Definition: runtime.cxx:1790
void registerComListenerVariableForBasic(SbxVariable *pVar, StarBASIC *pBasic)
Definition: sbunoobj.cxx:4437
ErrCode ImpScan(const OUString &rSrc, double &nVal, SbxDataType &rType, sal_uInt16 *pLen, bool bOnlyIntntl)
Definition: sbxscan.cxx:71
tools::SvRef< SbxObject > SbxObjectRef
Definition: sbxcore.hxx:46
SbxNameType
Definition: sbxdef.hxx:123
SbxBOOL
Definition: sbxdef.hxx:215
SbxDataType
Definition: sbxdef.hxx:37
@ SbxOBJECT
Definition: sbxdef.hxx:47
@ SbxLONG
Definition: sbxdef.hxx:41
@ SbxARRAY
Definition: sbxdef.hxx:80
@ SbxNULL
Definition: sbxdef.hxx:39
@ SbxEMPTY
Definition: sbxdef.hxx:38
@ SbxERROR
Definition: sbxdef.hxx:48
@ SbxDATE
Definition: sbxdef.hxx:45
@ SbxVARIANT
Definition: sbxdef.hxx:51
@ SbxSINGLE
Definition: sbxdef.hxx:42
@ SbxBYREF
Definition: sbxdef.hxx:81
@ SbxSTRING
Definition: sbxdef.hxx:46
@ SbxINTEGER
Definition: sbxdef.hxx:40
@ SbxDOUBLE
Definition: sbxdef.hxx:43
SbxClassType
Definition: sbxdef.hxx:27
SbxFlagBits
Definition: sbxdef.hxx:131
OUString GetSbxRes(StringId nId)
Definition: sbxres.cxx:75
StringId
Definition: sbxres.hxx:28
OUString read_uInt16_lenPrefixed_uInt8s_ToOUString(SvStream &rStrm, rtl_TextEncoding eEnc)
TOOLS_DLLPUBLIC SvStream & endl(SvStream &rStr)
std::size_t write_uInt16_lenPrefixed_uInt8s_FromOUString(SvStream &rStrm, std::u16string_view rStr, rtl_TextEncoding eEnc)
float nSingle
Definition: sbxvar.hxx:55
sal_Int32 nLong
Definition: sbxvar.hxx:49
OUString * pOUString
Definition: sbxvar.hxx:58
SbxBase * pObj
Definition: sbxvar.hxx:61
sal_Int16 nInteger
Definition: sbxvar.hxx:47
double nDouble
Definition: sbxvar.hxx:56
SbxDataType eType
Definition: sbxvar.hxx:77
unsigned char sal_uInt8
sal_uInt16 sal_Unicode