Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
c979adad
Kaydet (Commit)
c979adad
authored
Nis 09, 2013
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sal_Bool to bool
Change-Id: I2d9baed5032e267ac5053267d367723999526c8f
üst
104c9cc2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
50 deletions
+49
-50
addincol.hxx
sc/inc/addincol.hxx
+19
-20
addincol.cxx
sc/source/core/tool/addincol.cxx
+30
-30
No files found.
sc/inc/addincol.hxx
Dosyayı görüntüle @
c979adad
...
@@ -27,7 +27,6 @@
...
@@ -27,7 +27,6 @@
#include <com/sun/star/sheet/ResultEvent.hpp>
#include <com/sun/star/sheet/ResultEvent.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/reflection/XIdlMethod.hpp>
#include <com/sun/star/reflection/XIdlMethod.hpp>
#include <com/sun/star/sheet/LocalizedName.hpp>
#include <i18nlangtag/lang.h>
#include <i18nlangtag/lang.h>
#include <rtl/ustring.h>
#include <rtl/ustring.h>
#include "scdllapi.h"
#include "scdllapi.h"
...
@@ -71,7 +70,7 @@ struct ScAddInArgDesc
...
@@ -71,7 +70,7 @@ struct ScAddInArgDesc
OUString
aName
;
OUString
aName
;
OUString
aDescription
;
OUString
aDescription
;
ScAddInArgumentType
eType
;
ScAddInArgumentType
eType
;
sal_Bool
bOptional
;
bool
bOptional
;
};
};
class
ScUnoAddInFuncData
class
ScUnoAddInFuncData
...
@@ -99,7 +98,7 @@ private:
...
@@ -99,7 +98,7 @@ private:
sal_uInt16
nCategory
;
sal_uInt16
nCategory
;
OString
sHelpId
;
OString
sHelpId
;
mutable
::
std
::
vector
<
LocalizedName
>
maCompNames
;
mutable
::
std
::
vector
<
LocalizedName
>
maCompNames
;
mutable
sal_B
ool
bCompInitialized
;
mutable
b
ool
bCompInitialized
;
public
:
public
:
ScUnoAddInFuncData
(
const
OUString
&
rNam
,
const
OUString
&
rLoc
,
ScUnoAddInFuncData
(
const
OUString
&
rNam
,
const
OUString
&
rLoc
,
...
@@ -127,7 +126,7 @@ public:
...
@@ -127,7 +126,7 @@ public:
const
OString
GetHelpId
()
const
{
return
sHelpId
;
}
const
OString
GetHelpId
()
const
{
return
sHelpId
;
}
const
::
std
::
vector
<
LocalizedName
>&
GetCompNames
()
const
;
const
::
std
::
vector
<
LocalizedName
>&
GetCompNames
()
const
;
sal_B
ool
GetExcelName
(
LanguageType
eDestLang
,
OUString
&
rRetExcelName
)
const
;
b
ool
GetExcelName
(
LanguageType
eDestLang
,
OUString
&
rRetExcelName
)
const
;
void
SetFunction
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
reflection
::
XIdlMethod
>&
rNewFunc
,
void
SetFunction
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
reflection
::
XIdlMethod
>&
rNewFunc
,
const
com
::
sun
::
star
::
uno
::
Any
&
rNewObj
);
const
com
::
sun
::
star
::
uno
::
Any
&
rNewObj
);
...
@@ -146,7 +145,7 @@ private:
...
@@ -146,7 +145,7 @@ private:
ScAddInHashMap
*
pExactHashMap
;
///< exact internal name
ScAddInHashMap
*
pExactHashMap
;
///< exact internal name
ScAddInHashMap
*
pNameHashMap
;
///< internal name upper
ScAddInHashMap
*
pNameHashMap
;
///< internal name upper
ScAddInHashMap
*
pLocalHashMap
;
///< localized name upper
ScAddInHashMap
*
pLocalHashMap
;
///< localized name upper
sal_Bool
bInitialized
;
bool
bInitialized
;
void
Initialize
();
void
Initialize
();
void
ReadConfiguration
();
void
ReadConfiguration
();
...
@@ -162,7 +161,7 @@ public:
...
@@ -162,7 +161,7 @@ public:
~
ScUnoAddInCollection
();
~
ScUnoAddInCollection
();
/// User enetered name. rUpperName MUST already be upper case!
/// User enetered name. rUpperName MUST already be upper case!
OUString
FindFunction
(
const
OUString
&
rUpperName
,
sal_B
ool
bLocalFirst
);
OUString
FindFunction
(
const
OUString
&
rUpperName
,
b
ool
bLocalFirst
);
/** Only if bComplete is set, the function reference and argument types
/** Only if bComplete is set, the function reference and argument types
are initialized (component may have to be loaded).
are initialized (component may have to be loaded).
...
@@ -180,13 +179,13 @@ public:
...
@@ -180,13 +179,13 @@ public:
void
LocalizeString
(
OUString
&
rName
);
///< modify rName - input: exact name
void
LocalizeString
(
OUString
&
rName
);
///< modify rName - input: exact name
long
GetFuncCount
();
long
GetFuncCount
();
sal_Bool
FillFunctionDesc
(
long
nFunc
,
ScFuncDesc
&
rDesc
);
bool
FillFunctionDesc
(
long
nFunc
,
ScFuncDesc
&
rDesc
);
static
sal_Bool
FillFunctionDescFromData
(
const
ScUnoAddInFuncData
&
rFuncData
,
ScFuncDesc
&
rDesc
);
static
bool
FillFunctionDescFromData
(
const
ScUnoAddInFuncData
&
rFuncData
,
ScFuncDesc
&
rDesc
);
/// leave rRetExcelName unchanged, if no matching name is found
/// leave rRetExcelName unchanged, if no matching name is found
sal_B
ool
GetExcelName
(
const
OUString
&
rCalcName
,
LanguageType
eDestLang
,
OUString
&
rRetExcelName
);
b
ool
GetExcelName
(
const
OUString
&
rCalcName
,
LanguageType
eDestLang
,
OUString
&
rRetExcelName
);
/// leave rRetCalcName unchanged, if no matching name is found
/// leave rRetCalcName unchanged, if no matching name is found
sal_B
ool
GetCalcName
(
const
OUString
&
rExcelName
,
OUString
&
rRetCalcName
);
b
ool
GetCalcName
(
const
OUString
&
rExcelName
,
OUString
&
rRetCalcName
);
};
};
...
@@ -197,12 +196,12 @@ private:
...
@@ -197,12 +196,12 @@ private:
com
::
sun
::
star
::
uno
::
Sequence
<
com
::
sun
::
star
::
uno
::
Any
>
aArgs
;
com
::
sun
::
star
::
uno
::
Sequence
<
com
::
sun
::
star
::
uno
::
Any
>
aArgs
;
com
::
sun
::
star
::
uno
::
Sequence
<
com
::
sun
::
star
::
uno
::
Any
>
aVarArg
;
com
::
sun
::
star
::
uno
::
Sequence
<
com
::
sun
::
star
::
uno
::
Any
>
aVarArg
;
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
uno
::
XInterface
>
xCaller
;
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
uno
::
XInterface
>
xCaller
;
sal_B
ool
bValidCount
;
b
ool
bValidCount
;
// result:
// result:
sal_uInt16
nErrCode
;
sal_uInt16
nErrCode
;
sal_B
ool
bHasString
;
b
ool
bHasString
;
double
fValue
;
double
fValue
;
OUString
aString
;
OUString
aString
;
ScMatrixRef
xMatrix
;
ScMatrixRef
xMatrix
;
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
sheet
::
XVolatileResult
>
xVarRes
;
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
sheet
::
XVolatileResult
>
xVarRes
;
...
@@ -215,12 +214,12 @@ public:
...
@@ -215,12 +214,12 @@ public:
long
nParamCount
);
long
nParamCount
);
~
ScUnoAddInCall
();
~
ScUnoAddInCall
();
sal_B
ool
NeedsCaller
()
const
;
b
ool
NeedsCaller
()
const
;
void
SetCaller
(
const
com
::
sun
::
star
::
uno
::
Reference
<
void
SetCaller
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
uno
::
XInterface
>&
rInterface
);
com
::
sun
::
star
::
uno
::
XInterface
>&
rInterface
);
void
SetCallerFromObjectShell
(
SfxObjectShell
*
pSh
);
void
SetCallerFromObjectShell
(
SfxObjectShell
*
pSh
);
sal_B
ool
ValidParamCount
();
b
ool
ValidParamCount
();
ScAddInArgumentType
GetArgType
(
long
nPos
);
ScAddInArgumentType
GetArgType
(
long
nPos
);
void
SetParam
(
long
nPos
,
const
com
::
sun
::
star
::
uno
::
Any
&
rValue
);
void
SetParam
(
long
nPos
,
const
com
::
sun
::
star
::
uno
::
Any
&
rValue
);
...
@@ -228,12 +227,12 @@ public:
...
@@ -228,12 +227,12 @@ public:
void
SetResult
(
const
com
::
sun
::
star
::
uno
::
Any
&
rNewRes
);
void
SetResult
(
const
com
::
sun
::
star
::
uno
::
Any
&
rNewRes
);
sal_uInt16
GetErrCode
()
const
{
return
nErrCode
;
}
sal_uInt16
GetErrCode
()
const
{
return
nErrCode
;
}
sal_B
ool
HasString
()
const
{
return
bHasString
;
}
b
ool
HasString
()
const
{
return
bHasString
;
}
bool
HasMatrix
()
const
{
return
xMatrix
.
get
();
}
bool
HasMatrix
()
const
{
return
xMatrix
.
get
();
}
sal_B
ool
HasVarRes
()
const
{
return
(
xVarRes
.
is
()
);
}
b
ool
HasVarRes
()
const
{
return
(
xVarRes
.
is
()
);
}
double
GetValue
()
const
{
return
fValue
;
}
double
GetValue
()
const
{
return
fValue
;
}
const
OUString
&
GetString
()
const
{
return
aString
;
}
const
OUString
&
GetString
()
const
{
return
aString
;
}
ScMatrixRef
GetMatrix
()
const
{
return
xMatrix
;
}
ScMatrixRef
GetMatrix
()
const
{
return
xMatrix
;
}
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
sheet
::
XVolatileResult
>
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
sheet
::
XVolatileResult
>
GetVarRes
()
const
{
return
xVarRes
;
}
GetVarRes
()
const
{
return
xVarRes
;
}
...
...
sc/source/core/tool/addincol.cxx
Dosyayı görüntüle @
c979adad
...
@@ -121,7 +121,7 @@ const ::std::vector<ScUnoAddInFuncData::LocalizedName>& ScUnoAddInFuncData::GetC
...
@@ -121,7 +121,7 @@ const ::std::vector<ScUnoAddInFuncData::LocalizedName>& ScUnoAddInFuncData::GetC
}
}
}
}
bCompInitialized
=
sal_T
rue
;
// also if not successful
bCompInitialized
=
t
rue
;
// also if not successful
}
}
return
maCompNames
;
return
maCompNames
;
}
}
...
@@ -132,10 +132,10 @@ void ScUnoAddInFuncData::SetCompNames( const ::std::vector< ScUnoAddInFuncData::
...
@@ -132,10 +132,10 @@ void ScUnoAddInFuncData::SetCompNames( const ::std::vector< ScUnoAddInFuncData::
maCompNames
=
rNew
;
maCompNames
=
rNew
;
bCompInitialized
=
sal_T
rue
;
bCompInitialized
=
t
rue
;
}
}
sal_B
ool
ScUnoAddInFuncData
::
GetExcelName
(
LanguageType
eDestLang
,
OUString
&
rRetExcelName
)
const
b
ool
ScUnoAddInFuncData
::
GetExcelName
(
LanguageType
eDestLang
,
OUString
&
rRetExcelName
)
const
{
{
const
::
std
::
vector
<
LocalizedName
>&
rCompNames
=
GetCompNames
();
const
::
std
::
vector
<
LocalizedName
>&
rCompNames
=
GetCompNames
();
if
(
!
rCompNames
.
empty
()
)
if
(
!
rCompNames
.
empty
()
)
...
@@ -194,7 +194,7 @@ sal_Bool ScUnoAddInFuncData::GetExcelName( LanguageType eDestLang, OUString& rRe
...
@@ -194,7 +194,7 @@ sal_Bool ScUnoAddInFuncData::GetExcelName( LanguageType eDestLang, OUString& rRe
// Third, last resort, use first (default) entry.
// Third, last resort, use first (default) entry.
rRetExcelName
=
rCompNames
[
0
].
maName
;
rRetExcelName
=
rCompNames
[
0
].
maName
;
return
sal_T
rue
;
return
t
rue
;
}
}
return
false
;
return
false
;
}
}
...
@@ -319,7 +319,7 @@ void ScUnoAddInCollection::Initialize()
...
@@ -319,7 +319,7 @@ void ScUnoAddInCollection::Initialize()
// when argument information is needed).
// when argument information is needed).
ReadConfiguration
();
ReadConfiguration
();
bInitialized
=
sal_T
rue
;
// with or without functions
bInitialized
=
t
rue
;
// with or without functions
}
}
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
...
@@ -610,7 +610,7 @@ void ScUnoAddInCollection::LoadComponent( const ScUnoAddInFuncData& rFuncData )
...
@@ -610,7 +610,7 @@ void ScUnoAddInCollection::LoadComponent( const ScUnoAddInFuncData& rFuncData )
}
}
}
}
sal_B
ool
ScUnoAddInCollection
::
GetExcelName
(
const
OUString
&
rCalcName
,
b
ool
ScUnoAddInCollection
::
GetExcelName
(
const
OUString
&
rCalcName
,
LanguageType
eDestLang
,
OUString
&
rRetExcelName
)
LanguageType
eDestLang
,
OUString
&
rRetExcelName
)
{
{
const
ScUnoAddInFuncData
*
pFuncData
=
GetFuncData
(
rCalcName
);
const
ScUnoAddInFuncData
*
pFuncData
=
GetFuncData
(
rCalcName
);
...
@@ -619,7 +619,7 @@ sal_Bool ScUnoAddInCollection::GetExcelName( const OUString& rCalcName,
...
@@ -619,7 +619,7 @@ sal_Bool ScUnoAddInCollection::GetExcelName( const OUString& rCalcName,
return
false
;
return
false
;
}
}
sal_B
ool
ScUnoAddInCollection
::
GetCalcName
(
const
OUString
&
rExcelName
,
OUString
&
rRetCalcName
)
b
ool
ScUnoAddInCollection
::
GetCalcName
(
const
OUString
&
rExcelName
,
OUString
&
rRetCalcName
)
{
{
if
(
!
bInitialized
)
if
(
!
bInitialized
)
Initialize
();
Initialize
();
...
@@ -643,7 +643,7 @@ sal_Bool ScUnoAddInCollection::GetCalcName( const OUString& rExcelName, OUString
...
@@ -643,7 +643,7 @@ sal_Bool ScUnoAddInCollection::GetCalcName( const OUString& rExcelName, OUString
// use the first function that has this name for any language
// use the first function that has this name for any language
rRetCalcName
=
pFuncData
->
GetOriginalName
();
rRetCalcName
=
pFuncData
->
GetOriginalName
();
return
sal_T
rue
;
return
t
rue
;
}
}
}
}
}
}
...
@@ -652,12 +652,12 @@ sal_Bool ScUnoAddInCollection::GetCalcName( const OUString& rExcelName, OUString
...
@@ -652,12 +652,12 @@ sal_Bool ScUnoAddInCollection::GetCalcName( const OUString& rExcelName, OUString
return
false
;
return
false
;
}
}
inline
sal_B
ool
IsTypeName
(
const
OUString
&
rName
,
const
uno
::
Type
&
rType
)
inline
b
ool
IsTypeName
(
const
OUString
&
rName
,
const
uno
::
Type
&
rType
)
{
{
return
rName
==
rType
.
getTypeName
();
return
rName
==
rType
.
getTypeName
();
}
}
static
sal_B
ool
lcl_ValidReturnType
(
const
uno
::
Reference
<
reflection
::
XIdlClass
>&
xClass
)
static
b
ool
lcl_ValidReturnType
(
const
uno
::
Reference
<
reflection
::
XIdlClass
>&
xClass
)
{
{
// this must match with ScUnoAddInCall::SetResult
// this must match with ScUnoAddInCall::SetResult
...
@@ -677,7 +677,7 @@ static sal_Bool lcl_ValidReturnType( const uno::Reference<reflection::XIdlClass>
...
@@ -677,7 +677,7 @@ static sal_Bool lcl_ValidReturnType( const uno::Reference<reflection::XIdlClass>
case
uno
:
:
TypeClass_FLOAT
:
case
uno
:
:
TypeClass_FLOAT
:
case
uno
:
:
TypeClass_DOUBLE
:
case
uno
:
:
TypeClass_DOUBLE
:
case
uno
:
:
TypeClass_STRING
:
case
uno
:
:
TypeClass_STRING
:
return
sal_T
rue
;
// values or string
return
t
rue
;
// values or string
case
uno
:
:
TypeClass_INTERFACE
:
case
uno
:
:
TypeClass_INTERFACE
:
{
{
...
@@ -811,7 +811,7 @@ void ScUnoAddInCollection::ReadFromAddIn( const uno::Reference<uno::XInterface>&
...
@@ -811,7 +811,7 @@ void ScUnoAddInCollection::ReadFromAddIn( const uno::Reference<uno::XInterface>&
// leave out internal functions
// leave out internal functions
uno
::
Reference
<
reflection
::
XIdlClass
>
xClass
=
uno
::
Reference
<
reflection
::
XIdlClass
>
xClass
=
xFunc
->
getDeclaringClass
();
xFunc
->
getDeclaringClass
();
sal_Bool
bSkip
=
sal_T
rue
;
bool
bSkip
=
t
rue
;
if
(
xClass
.
is
()
)
if
(
xClass
.
is
()
)
{
{
//! XIdlClass needs getType() method!
//! XIdlClass needs getType() method!
...
@@ -831,7 +831,7 @@ void ScUnoAddInCollection::ReadFromAddIn( const uno::Reference<uno::XInterface>&
...
@@ -831,7 +831,7 @@ void ScUnoAddInCollection::ReadFromAddIn( const uno::Reference<uno::XInterface>&
uno
::
Reference
<
reflection
::
XIdlClass
>
xReturn
=
uno
::
Reference
<
reflection
::
XIdlClass
>
xReturn
=
xFunc
->
getReturnType
();
xFunc
->
getReturnType
();
if
(
!
lcl_ValidReturnType
(
xReturn
)
)
if
(
!
lcl_ValidReturnType
(
xReturn
)
)
bSkip
=
sal_T
rue
;
bSkip
=
t
rue
;
}
}
if
(
!
bSkip
)
if
(
!
bSkip
)
{
{
...
@@ -844,7 +844,7 @@ void ScUnoAddInCollection::ReadFromAddIn( const uno::Reference<uno::XInterface>&
...
@@ -844,7 +844,7 @@ void ScUnoAddInCollection::ReadFromAddIn( const uno::Reference<uno::XInterface>&
aFuncNameBuffer
.
append
(
aFuncU
);
aFuncNameBuffer
.
append
(
aFuncU
);
OUString
aFuncName
=
aFuncNameBuffer
.
makeStringAndClear
();
OUString
aFuncName
=
aFuncNameBuffer
.
makeStringAndClear
();
sal_Bool
bValid
=
sal_T
rue
;
bool
bValid
=
t
rue
;
long
nVisibleCount
=
0
;
long
nVisibleCount
=
0
;
long
nCallerPos
=
SC_CALLERPOS_NONE
;
long
nCallerPos
=
SC_CALLERPOS_NONE
;
...
@@ -930,7 +930,7 @@ void ScUnoAddInCollection::ReadFromAddIn( const uno::Reference<uno::XInterface>&
...
@@ -930,7 +930,7 @@ void ScUnoAddInCollection::ReadFromAddIn( const uno::Reference<uno::XInterface>&
aArgDesc
=
"###"
;
aArgDesc
=
"###"
;
}
}
sal_B
ool
bOptional
=
b
ool
bOptional
=
(
eArgType
==
SC_ADDINARG_VALUE_OR_ARRAY
||
(
eArgType
==
SC_ADDINARG_VALUE_OR_ARRAY
||
eArgType
==
SC_ADDINARG_VARARGS
);
eArgType
==
SC_ADDINARG_VARARGS
);
...
@@ -1059,7 +1059,7 @@ void ScUnoAddInCollection::UpdateFromAddIn( const uno::Reference<uno::XInterface
...
@@ -1059,7 +1059,7 @@ void ScUnoAddInCollection::UpdateFromAddIn( const uno::Reference<uno::XInterface
// Local names and descriptions from pOldData are looked up using the
// Local names and descriptions from pOldData are looked up using the
// internal argument name.
// internal argument name.
sal_Bool
bValid
=
sal_T
rue
;
bool
bValid
=
t
rue
;
long
nVisibleCount
=
0
;
long
nVisibleCount
=
0
;
long
nCallerPos
=
SC_CALLERPOS_NONE
;
long
nCallerPos
=
SC_CALLERPOS_NONE
;
...
@@ -1107,7 +1107,7 @@ void ScUnoAddInCollection::UpdateFromAddIn( const uno::Reference<uno::XInterface
...
@@ -1107,7 +1107,7 @@ void ScUnoAddInCollection::UpdateFromAddIn( const uno::Reference<uno::XInterface
else
else
aDesc
.
aName
=
aDesc
.
aDescription
=
"###"
;
aDesc
.
aName
=
aDesc
.
aDescription
=
"###"
;
sal_B
ool
bOptional
=
b
ool
bOptional
=
(
eArgType
==
SC_ADDINARG_VALUE_OR_ARRAY
||
(
eArgType
==
SC_ADDINARG_VALUE_OR_ARRAY
||
eArgType
==
SC_ADDINARG_VARARGS
);
eArgType
==
SC_ADDINARG_VARARGS
);
...
@@ -1137,7 +1137,7 @@ void ScUnoAddInCollection::UpdateFromAddIn( const uno::Reference<uno::XInterface
...
@@ -1137,7 +1137,7 @@ void ScUnoAddInCollection::UpdateFromAddIn( const uno::Reference<uno::XInterface
}
}
}
}
OUString
ScUnoAddInCollection
::
FindFunction
(
const
OUString
&
rUpperName
,
sal_B
ool
bLocalFirst
)
OUString
ScUnoAddInCollection
::
FindFunction
(
const
OUString
&
rUpperName
,
b
ool
bLocalFirst
)
{
{
if
(
!
bInitialized
)
if
(
!
bInitialized
)
Initialize
();
Initialize
();
...
@@ -1224,7 +1224,7 @@ long ScUnoAddInCollection::GetFuncCount()
...
@@ -1224,7 +1224,7 @@ long ScUnoAddInCollection::GetFuncCount()
return
nFuncCount
;
return
nFuncCount
;
}
}
sal_B
ool
ScUnoAddInCollection
::
FillFunctionDesc
(
long
nFunc
,
ScFuncDesc
&
rDesc
)
b
ool
ScUnoAddInCollection
::
FillFunctionDesc
(
long
nFunc
,
ScFuncDesc
&
rDesc
)
{
{
if
(
!
bInitialized
)
if
(
!
bInitialized
)
Initialize
();
Initialize
();
...
@@ -1237,11 +1237,11 @@ sal_Bool ScUnoAddInCollection::FillFunctionDesc( long nFunc, ScFuncDesc& rDesc )
...
@@ -1237,11 +1237,11 @@ sal_Bool ScUnoAddInCollection::FillFunctionDesc( long nFunc, ScFuncDesc& rDesc )
return
FillFunctionDescFromData
(
rFuncData
,
rDesc
);
return
FillFunctionDescFromData
(
rFuncData
,
rDesc
);
}
}
sal_B
ool
ScUnoAddInCollection
::
FillFunctionDescFromData
(
const
ScUnoAddInFuncData
&
rFuncData
,
ScFuncDesc
&
rDesc
)
b
ool
ScUnoAddInCollection
::
FillFunctionDescFromData
(
const
ScUnoAddInFuncData
&
rFuncData
,
ScFuncDesc
&
rDesc
)
{
{
rDesc
.
Clear
();
rDesc
.
Clear
();
sal_B
ool
bIncomplete
=
!
rFuncData
.
GetFunction
().
is
();
//! extra flag?
b
ool
bIncomplete
=
!
rFuncData
.
GetFunction
().
is
();
//! extra flag?
long
nArgCount
=
rFuncData
.
GetArgumentCount
();
long
nArgCount
=
rFuncData
.
GetArgumentCount
();
if
(
nArgCount
>
USHRT_MAX
)
if
(
nArgCount
>
USHRT_MAX
)
...
@@ -1266,7 +1266,7 @@ sal_Bool ScUnoAddInCollection::FillFunctionDescFromData( const ScUnoAddInFuncDat
...
@@ -1266,7 +1266,7 @@ sal_Bool ScUnoAddInCollection::FillFunctionDescFromData( const ScUnoAddInFuncDat
rDesc
.
nArgCount
=
(
sal_uInt16
)
nArgCount
;
rDesc
.
nArgCount
=
(
sal_uInt16
)
nArgCount
;
if
(
nArgCount
)
if
(
nArgCount
)
{
{
sal_B
ool
bMultiple
=
false
;
b
ool
bMultiple
=
false
;
const
ScAddInArgDesc
*
pArgs
=
rFuncData
.
GetArguments
();
const
ScAddInArgDesc
*
pArgs
=
rFuncData
.
GetArguments
();
rDesc
.
ppDefArgNames
=
new
OUString
*
[
nArgCount
];
rDesc
.
ppDefArgNames
=
new
OUString
*
[
nArgCount
];
...
@@ -1289,7 +1289,7 @@ sal_Bool ScUnoAddInCollection::FillFunctionDescFromData( const ScUnoAddInFuncDat
...
@@ -1289,7 +1289,7 @@ sal_Bool ScUnoAddInCollection::FillFunctionDescFromData( const ScUnoAddInFuncDat
// last argument repeated?
// last argument repeated?
if
(
nArg
+
1
==
nArgCount
&&
(
pArgs
[
nArg
].
eType
==
SC_ADDINARG_VARARGS
)
)
if
(
nArg
+
1
==
nArgCount
&&
(
pArgs
[
nArg
].
eType
==
SC_ADDINARG_VARARGS
)
)
bMultiple
=
sal_T
rue
;
bMultiple
=
t
rue
;
}
}
if
(
bMultiple
)
if
(
bMultiple
)
...
@@ -1298,7 +1298,7 @@ sal_Bool ScUnoAddInCollection::FillFunctionDescFromData( const ScUnoAddInFuncDat
...
@@ -1298,7 +1298,7 @@ sal_Bool ScUnoAddInCollection::FillFunctionDescFromData( const ScUnoAddInFuncDat
rDesc
.
bIncomplete
=
bIncomplete
;
rDesc
.
bIncomplete
=
bIncomplete
;
return
sal_T
rue
;
return
t
rue
;
}
}
...
@@ -1308,7 +1308,7 @@ ScUnoAddInCall::ScUnoAddInCall( ScUnoAddInCollection& rColl, const OUString& rNa
...
@@ -1308,7 +1308,7 @@ ScUnoAddInCall::ScUnoAddInCall( ScUnoAddInCollection& rColl, const OUString& rNa
long
nParamCount
)
:
long
nParamCount
)
:
bValidCount
(
false
),
bValidCount
(
false
),
nErrCode
(
errNoCode
),
// before function was called
nErrCode
(
errNoCode
),
// before function was called
bHasString
(
sal_T
rue
),
bHasString
(
t
rue
),
fValue
(
0.0
),
fValue
(
0.0
),
xMatrix
(
NULL
)
xMatrix
(
NULL
)
{
{
...
@@ -1325,12 +1325,12 @@ ScUnoAddInCall::ScUnoAddInCall( ScUnoAddInCollection& rColl, const OUString& rNa
...
@@ -1325,12 +1325,12 @@ ScUnoAddInCall::ScUnoAddInCall( ScUnoAddInCollection& rColl, const OUString& rNa
{
{
long
nVarCount
=
nParamCount
-
(
nDescCount
-
1
);
// size of last argument
long
nVarCount
=
nParamCount
-
(
nDescCount
-
1
);
// size of last argument
aVarArg
.
realloc
(
nVarCount
);
aVarArg
.
realloc
(
nVarCount
);
bValidCount
=
sal_T
rue
;
bValidCount
=
t
rue
;
}
}
else
if
(
nParamCount
<=
nDescCount
)
else
if
(
nParamCount
<=
nDescCount
)
{
{
// all args behind nParamCount must be optional
// all args behind nParamCount must be optional
bValidCount
=
sal_T
rue
;
bValidCount
=
t
rue
;
for
(
long
i
=
nParamCount
;
i
<
nDescCount
;
i
++
)
for
(
long
i
=
nParamCount
;
i
<
nDescCount
;
i
++
)
if
(
!
pArgs
[
i
].
bOptional
)
if
(
!
pArgs
[
i
].
bOptional
)
bValidCount
=
false
;
bValidCount
=
false
;
...
@@ -1347,7 +1347,7 @@ ScUnoAddInCall::~ScUnoAddInCall()
...
@@ -1347,7 +1347,7 @@ ScUnoAddInCall::~ScUnoAddInCall()
// pFuncData is deleted with ScUnoAddInCollection
// pFuncData is deleted with ScUnoAddInCollection
}
}
sal_B
ool
ScUnoAddInCall
::
ValidParamCount
()
b
ool
ScUnoAddInCall
::
ValidParamCount
()
{
{
return
bValidCount
;
return
bValidCount
;
}
}
...
@@ -1369,7 +1369,7 @@ ScAddInArgumentType ScUnoAddInCall::GetArgType( long nPos )
...
@@ -1369,7 +1369,7 @@ ScAddInArgumentType ScUnoAddInCall::GetArgType( long nPos )
return
SC_ADDINARG_VALUE_OR_ARRAY
;
//! error code !!!!
return
SC_ADDINARG_VALUE_OR_ARRAY
;
//! error code !!!!
}
}
sal_B
ool
ScUnoAddInCall
::
NeedsCaller
()
const
b
ool
ScUnoAddInCall
::
NeedsCaller
()
const
{
{
return
pFuncData
&&
pFuncData
->
GetCallerPos
()
!=
SC_CALLERPOS_NONE
;
return
pFuncData
&&
pFuncData
->
GetCallerPos
()
!=
SC_CALLERPOS_NONE
;
}
}
...
@@ -1546,7 +1546,7 @@ void ScUnoAddInCall::SetResult( const uno::Any& rNewRes )
...
@@ -1546,7 +1546,7 @@ void ScUnoAddInCall::SetResult( const uno::Any& rNewRes )
case
uno
:
:
TypeClass_STRING
:
case
uno
:
:
TypeClass_STRING
:
{
{
rNewRes
>>=
aString
;
rNewRes
>>=
aString
;
bHasString
=
sal_T
rue
;
bHasString
=
t
rue
;
}
}
break
;
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment