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
670c2b3c
Kaydet (Commit)
670c2b3c
authored
Şub 24, 2016
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
simply the SbxRes stuff, inheriting from OUString is icky
Change-Id: Ie9794ea164d587ad87ee13d360cb3abc18166051
üst
459e3fe7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
33 deletions
+23
-33
sbxbool.cxx
basic/source/sbx/sbxbool.cxx
+4
-4
sbxcoll.cxx
basic/source/sbx/sbxcoll.cxx
+4
-4
sbxobj.cxx
basic/source/sbx/sbxobj.cxx
+2
-2
sbxres.cxx
basic/source/sbx/sbxres.cxx
+2
-6
sbxres.hxx
basic/source/sbx/sbxres.hxx
+1
-7
sbxstr.cxx
basic/source/sbx/sbxstr.cxx
+2
-2
sbxvar.cxx
basic/source/sbx/sbxvar.cxx
+8
-8
No files found.
basic/source/sbx/sbxbool.cxx
Dosyayı görüntüle @
670c2b3c
...
@@ -70,9 +70,9 @@ enum SbxBOOL ImpGetBool( const SbxValues* p )
...
@@ -70,9 +70,9 @@ enum SbxBOOL ImpGetBool( const SbxValues* p )
nRes
=
SbxFALSE
;
nRes
=
SbxFALSE
;
if
(
p
->
pOUString
)
if
(
p
->
pOUString
)
{
{
if
(
p
->
pOUString
->
equalsIgnoreAsciiCase
(
SbxRes
(
StringId
::
True
)
)
)
if
(
p
->
pOUString
->
equalsIgnoreAsciiCase
(
Get
SbxRes
(
StringId
::
True
)
)
)
nRes
=
SbxTRUE
;
nRes
=
SbxTRUE
;
else
if
(
!
p
->
pOUString
->
equalsIgnoreAsciiCase
(
SbxRes
(
StringId
::
False
)
)
)
else
if
(
!
p
->
pOUString
->
equalsIgnoreAsciiCase
(
Get
SbxRes
(
StringId
::
False
)
)
)
{
{
// it can be convertible to a number
// it can be convertible to a number
bool
bError
=
true
;
bool
bError
=
true
;
...
@@ -174,9 +174,9 @@ void ImpPutBool( SbxValues* p, sal_Int16 n )
...
@@ -174,9 +174,9 @@ void ImpPutBool( SbxValues* p, sal_Int16 n )
case
SbxSTRING
:
case
SbxSTRING
:
case
SbxLPSTR
:
case
SbxLPSTR
:
if
(
!
p
->
pOUString
)
if
(
!
p
->
pOUString
)
p
->
pOUString
=
new
OUString
(
SbxRes
(
n
?
StringId
::
True
:
StringId
::
False
)
);
p
->
pOUString
=
new
OUString
(
Get
SbxRes
(
n
?
StringId
::
True
:
StringId
::
False
)
);
else
else
*
p
->
pOUString
=
SbxRes
(
n
?
StringId
::
True
:
StringId
::
False
);
*
p
->
pOUString
=
Get
SbxRes
(
n
?
StringId
::
True
:
StringId
::
False
);
break
;
break
;
case
SbxOBJECT
:
case
SbxOBJECT
:
...
...
basic/source/sbx/sbxcoll.cxx
Dosyayı görüntüle @
670c2b3c
...
@@ -35,10 +35,10 @@ SbxCollection::SbxCollection( const OUString& rClass )
...
@@ -35,10 +35,10 @@ SbxCollection::SbxCollection( const OUString& rClass )
{
{
if
(
!
nCountHash
)
if
(
!
nCountHash
)
{
{
pCount
=
OUString
::
createFromAscii
(
GetSbxRes
(
StringId
::
CountProp
)
);
pCount
=
GetSbxRes
(
StringId
::
CountProp
);
pAdd
=
OUString
::
createFromAscii
(
GetSbxRes
(
StringId
::
AddMeth
)
);
pAdd
=
GetSbxRes
(
StringId
::
AddMeth
);
pItem
=
OUString
::
createFromAscii
(
GetSbxRes
(
StringId
::
ItemMeth
)
);
pItem
=
GetSbxRes
(
StringId
::
ItemMeth
);
pRemove
=
OUString
::
createFromAscii
(
GetSbxRes
(
StringId
::
RemoveMeth
)
);
pRemove
=
GetSbxRes
(
StringId
::
RemoveMeth
);
nCountHash
=
MakeHashCode
(
pCount
);
nCountHash
=
MakeHashCode
(
pCount
);
nAddHash
=
MakeHashCode
(
pAdd
);
nAddHash
=
MakeHashCode
(
pAdd
);
nItemHash
=
MakeHashCode
(
pItem
);
nItemHash
=
MakeHashCode
(
pItem
);
...
...
basic/source/sbx/sbxobj.cxx
Dosyayı görüntüle @
670c2b3c
...
@@ -40,8 +40,8 @@ SbxObject::SbxObject( const OUString& rClass )
...
@@ -40,8 +40,8 @@ SbxObject::SbxObject( const OUString& rClass )
aData
.
pObj
=
this
;
aData
.
pObj
=
this
;
if
(
!
nNameHash
)
if
(
!
nNameHash
)
{
{
pNameProp
=
OUString
::
createFromAscii
(
GetSbxRes
(
StringId
::
NameProp
)
);
pNameProp
=
GetSbxRes
(
StringId
::
NameProp
);
pParentProp
=
OUString
::
createFromAscii
(
GetSbxRes
(
StringId
::
ParentProp
)
);
pParentProp
=
GetSbxRes
(
StringId
::
ParentProp
);
nNameHash
=
MakeHashCode
(
pNameProp
);
nNameHash
=
MakeHashCode
(
pNameProp
);
nParentHash
=
MakeHashCode
(
pParentProp
);
nParentHash
=
MakeHashCode
(
pParentProp
);
}
}
...
...
basic/source/sbx/sbxres.cxx
Dosyayı görüntüle @
670c2b3c
...
@@ -72,13 +72,9 @@ static const char* pSbxRes[] = {
...
@@ -72,13 +72,9 @@ static const char* pSbxRes[] = {
"True"
"True"
};
};
const
char
*
GetSbxRes
(
StringId
nId
)
OUString
GetSbxRes
(
StringId
nId
)
{
{
return
(
(
nId
>
StringId
::
LastValue
)
?
"???"
:
pSbxRes
[
static_cast
<
int
>
(
nId
)
]
);
return
OUString
::
createFromAscii
(
(
nId
>
StringId
::
LastValue
)
?
"???"
:
pSbxRes
[
static_cast
<
int
>
(
nId
)
]
);
}
}
SbxRes
::
SbxRes
(
StringId
nId
)
:
OUString
(
OUString
::
createFromAscii
(
GetSbxRes
(
nId
)
)
)
{}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
basic/source/sbx/sbxres.hxx
Dosyayı görüntüle @
670c2b3c
...
@@ -47,13 +47,7 @@ enum class StringId {
...
@@ -47,13 +47,7 @@ enum class StringId {
LastValue
=
44
LastValue
=
44
};
};
class
SbxRes
:
public
OUString
OUString
GetSbxRes
(
StringId
);
{
public
:
explicit
SbxRes
(
StringId
);
};
const
char
*
GetSbxRes
(
StringId
);
#endif
#endif
...
...
basic/source/sbx/sbxstr.cxx
Dosyayı görüntüle @
670c2b3c
...
@@ -102,8 +102,8 @@ OUString ImpGetString( const SbxValues* p )
...
@@ -102,8 +102,8 @@ OUString ImpGetString( const SbxValues* p )
}
}
case
SbxERROR
:
case
SbxERROR
:
// Here the String "Error n" is generated
// Here the String "Error n" is generated
aRes
=
SbxRes
(
StringId
::
ErrorMsg
);
aRes
=
GetSbxRes
(
StringId
::
ErrorMsg
)
+
OUString
::
number
(
p
->
nUShort
);
aRes
+=
OUString
::
number
(
p
->
nUShort
);
break
;
break
;
case
SbxDATE
:
case
SbxDATE
:
ImpPutDate
(
&
aTmp
,
p
->
nDouble
);
break
;
ImpPutDate
(
&
aTmp
,
p
->
nDouble
);
break
;
...
...
basic/source/sbx/sbxvar.cxx
Dosyayı görüntüle @
670c2b3c
...
@@ -258,11 +258,11 @@ const OUString& SbxVariable::GetName( SbxNameType t ) const
...
@@ -258,11 +258,11 @@ const OUString& SbxVariable::GetName( SbxNameType t ) const
}
}
if
(
i
->
nFlags
&
SbxFlagBits
::
Optional
)
if
(
i
->
nFlags
&
SbxFlagBits
::
Optional
)
{
{
aTmp
+=
OUString
(
SbxRes
(
StringId
::
Optional
)
);
aTmp
+=
GetSbxRes
(
StringId
::
Optional
);
}
}
if
(
i
->
eType
&
SbxBYREF
)
if
(
i
->
eType
&
SbxBYREF
)
{
{
aTmp
+=
OUString
(
SbxRes
(
StringId
::
ByRef
)
);
aTmp
+=
GetSbxRes
(
StringId
::
ByRef
);
}
}
aTmp
+=
i
->
aName
;
aTmp
+=
i
->
aName
;
cType
=
' '
;
cType
=
' '
;
...
@@ -291,14 +291,14 @@ const OUString& SbxVariable::GetName( SbxNameType t ) const
...
@@ -291,14 +291,14 @@ const OUString& SbxVariable::GetName( SbxNameType t ) const
// long type?
// long type?
if
(
t
!=
SbxNAME_SHORT
)
if
(
t
!=
SbxNAME_SHORT
)
{
{
aTmp
+=
OUString
(
SbxRes
(
StringId
::
As
)
);
aTmp
+=
GetSbxRes
(
StringId
::
As
);
if
(
nt
<
32
)
if
(
nt
<
32
)
{
{
aTmp
+=
OUString
(
SbxRes
(
static_cast
<
StringId
>
(
static_cast
<
int
>
(
StringId
::
Types
)
+
nt
)
)
);
aTmp
+=
GetSbxRes
(
static_cast
<
StringId
>
(
static_cast
<
int
>
(
StringId
::
Types
)
+
nt
)
);
}
}
else
else
{
{
aTmp
+=
OUString
(
SbxRes
(
StringId
::
Any
)
);
aTmp
+=
GetSbxRes
(
StringId
::
Any
);
}
}
}
}
}
}
...
@@ -307,14 +307,14 @@ const OUString& SbxVariable::GetName( SbxNameType t ) const
...
@@ -307,14 +307,14 @@ const OUString& SbxVariable::GetName( SbxNameType t ) const
// Long type? Then fetch it
// Long type? Then fetch it
if
(
t
==
SbxNAME_LONG_TYPES
&&
et
!=
SbxEMPTY
)
if
(
t
==
SbxNAME_LONG_TYPES
&&
et
!=
SbxEMPTY
)
{
{
aTmp
+=
OUString
(
SbxRes
(
StringId
::
As
)
);
aTmp
+=
GetSbxRes
(
StringId
::
As
);
if
(
et
<
32
)
if
(
et
<
32
)
{
{
aTmp
+=
OUString
(
SbxRes
(
static_cast
<
StringId
>
(
static_cast
<
int
>
(
StringId
::
Types
)
+
et
)
)
);
aTmp
+=
GetSbxRes
(
static_cast
<
StringId
>
(
static_cast
<
int
>
(
StringId
::
Types
)
+
et
)
);
}
}
else
else
{
{
aTmp
+=
OUString
(
SbxRes
(
StringId
::
Any
)
);
aTmp
+=
GetSbxRes
(
StringId
::
Any
);
}
}
}
}
const_cast
<
SbxVariable
*>
(
this
)
->
aToolString
=
aTmp
;
const_cast
<
SbxVariable
*>
(
this
)
->
aToolString
=
aTmp
;
...
...
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