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
5a39ad3b
Kaydet (Commit)
5a39ad3b
authored
Mar 11, 2016
tarafından
Noel Grandin
Kaydeden (comit)
Noel Grandin
Haz 22, 2016
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
move the method param parsing code into SvParser
Change-Id: I5718c309acd213f94e96efc2e9a98ab0344fe341
üst
dc1df1b8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
18 deletions
+22
-18
parser.hxx
idl/inc/parser.hxx
+2
-1
parser.cxx
idl/source/prj/parser.cxx
+20
-17
No files found.
idl/inc/parser.hxx
Dosyayı görüntüle @
5a39ad3b
...
@@ -45,11 +45,12 @@ public:
...
@@ -45,11 +45,12 @@ public:
void
ReadInterfaceOrShell
(
SvMetaModule
&
rModule
,
MetaTypeType
aMetaTypeType
);
void
ReadInterfaceOrShell
(
SvMetaModule
&
rModule
,
MetaTypeType
aMetaTypeType
);
void
ReadInterfaceOrShellEntry
(
SvMetaClass
&
rClass
);
void
ReadInterfaceOrShellEntry
(
SvMetaClass
&
rClass
);
bool
ReadInterfaceOrShellSlot
(
SvMetaSlot
&
rSlot
);
bool
ReadInterfaceOrShellSlot
(
SvMetaSlot
&
rSlot
);
void
ReadInterfaceOrShellMethod
OrAttribute
(
SvMetaAttribute
&
rAttr
);
void
ReadInterfaceOrShellMethod
(
SvMetaAttribute
&
rAttr
);
void
ReadItem
();
void
ReadItem
();
void
ReadStruct
();
void
ReadStruct
();
void
ReadEnum
();
void
ReadEnum
();
void
ReadEnumValue
(
SvMetaTypeEnum
&
rEnum
);
void
ReadEnumValue
(
SvMetaTypeEnum
&
rEnum
);
void
ReadSlotId
(
SvIdentifier
&
rSlotId
);
SvMetaClass
*
ReadKnownClass
();
SvMetaClass
*
ReadKnownClass
();
SvMetaType
*
ReadKnownType
();
SvMetaType
*
ReadKnownType
();
void
Read
(
char
cChar
);
void
Read
(
char
cChar
);
...
...
idl/source/prj/parser.cxx
Dosyayı görüntüle @
5a39ad3b
...
@@ -316,7 +316,7 @@ void SvIdlParser::ReadInterfaceOrShellEntry(SvMetaClass& rClass)
...
@@ -316,7 +316,7 @@ void SvIdlParser::ReadInterfaceOrShellEntry(SvMetaClass& rClass)
else
else
{
{
xAttr
=
new
SvMetaAttribute
(
pType
);
xAttr
=
new
SvMetaAttribute
(
pType
);
ReadInterfaceOrShellMethod
OrAttribute
(
*
xAttr
);
ReadInterfaceOrShellMethod
(
*
xAttr
);
bOk
=
true
;
bOk
=
true
;
}
}
if
(
bOk
)
if
(
bOk
)
...
@@ -354,7 +354,7 @@ bool SvIdlParser::ReadInterfaceOrShellSlot(SvMetaSlot& rSlot)
...
@@ -354,7 +354,7 @@ bool SvIdlParser::ReadInterfaceOrShellSlot(SvMetaSlot& rSlot)
rSlot
.
ReadAttributesSvIdl
(
rBase
,
rInStm
);
rSlot
.
ReadAttributesSvIdl
(
rBase
,
rInStm
);
ReadIfDelimiter
();
ReadIfDelimiter
();
}
}
bOk
=
ReadIf
(
']'
);
Read
(
']'
);
}
}
}
}
else
else
...
@@ -379,17 +379,13 @@ bool SvIdlParser::ReadInterfaceOrShellSlot(SvMetaSlot& rSlot)
...
@@ -379,17 +379,13 @@ bool SvIdlParser::ReadInterfaceOrShellSlot(SvMetaSlot& rSlot)
return
bOk
;
return
bOk
;
}
}
void
SvIdlParser
::
ReadInterfaceOrShellMethod
OrAttribute
(
SvMetaAttribute
&
rAttr
)
void
SvIdlParser
::
ReadInterfaceOrShellMethod
(
SvMetaAttribute
&
rAttr
)
{
{
rAttr
.
SetName
(
ReadIdentifier
()
);
rAttr
.
SetName
(
ReadIdentifier
()
);
rAttr
.
aSlotId
.
setString
(
ReadIdentifier
()
);
ReadSlotId
(
rAttr
.
aSlotId
);
sal_uLong
n
;
if
(
!
rBase
.
FindId
(
rAttr
.
aSlotId
.
getString
(),
&
n
)
)
throw
SvParseException
(
rInStm
,
"no value for identifier <"
+
rAttr
.
aSlotId
.
getString
()
+
"> "
);
rAttr
.
aSlotId
.
SetValue
(
n
);
Read
(
'('
);
// read method arguments
// read method arguments
Read
(
'('
);
tools
::
SvRef
<
SvMetaType
>
xT
(
new
SvMetaType
()
);
tools
::
SvRef
<
SvMetaType
>
xT
(
new
SvMetaType
()
);
xT
->
SetRef
(
rAttr
.
GetType
()
);
xT
->
SetRef
(
rAttr
.
GetType
()
);
rAttr
.
aType
=
xT
;
rAttr
.
aType
=
xT
;
...
@@ -398,12 +394,11 @@ void SvIdlParser::ReadInterfaceOrShellMethodOrAttribute( SvMetaAttribute& rAttr
...
@@ -398,12 +394,11 @@ void SvIdlParser::ReadInterfaceOrShellMethodOrAttribute( SvMetaAttribute& rAttr
{
{
while
(
true
)
while
(
true
)
{
{
tools
::
SvRef
<
SvMetaAttribute
>
xAttr
(
new
SvMetaAttribute
()
);
tools
::
SvRef
<
SvMetaAttribute
>
xParamAttr
(
new
SvMetaAttribute
()
);
if
(
!
xAttr
->
ReadSvIdl
(
rBase
,
rInStm
)
)
xParamAttr
->
aType
=
ReadKnownType
();
throw
SvParseException
(
rInStm
,
"ReadSvIdl in method argument parsing failed"
);
xParamAttr
->
SetName
(
ReadIdentifier
()
);
if
(
!
xAttr
->
Test
(
rInStm
)
)
ReadSlotId
(
xParamAttr
->
aSlotId
);
throw
SvParseException
(
rInStm
,
"test in method argument parsing failed"
);
rAttr
.
aType
->
GetAttrList
().
push_back
(
xParamAttr
);
rAttr
.
aType
->
GetAttrList
().
push_back
(
xAttr
);
if
(
!
ReadIfDelimiter
())
if
(
!
ReadIfDelimiter
())
break
;
break
;
}
}
...
@@ -411,6 +406,15 @@ void SvIdlParser::ReadInterfaceOrShellMethodOrAttribute( SvMetaAttribute& rAttr
...
@@ -411,6 +406,15 @@ void SvIdlParser::ReadInterfaceOrShellMethodOrAttribute( SvMetaAttribute& rAttr
}
}
}
}
void
SvIdlParser
::
ReadSlotId
(
SvIdentifier
&
rSlotId
)
{
rSlotId
.
setString
(
ReadIdentifier
()
);
sal_uLong
n
;
if
(
!
rBase
.
FindId
(
rSlotId
.
getString
(),
&
n
)
)
throw
SvParseException
(
rInStm
,
"no value for identifier <"
+
rSlotId
.
getString
()
+
"> "
);
rSlotId
.
SetValue
(
n
);
}
SvMetaClass
*
SvIdlParser
::
ReadKnownClass
()
SvMetaClass
*
SvIdlParser
::
ReadKnownClass
()
{
{
OString
aName
(
ReadIdentifier
());
OString
aName
(
ReadIdentifier
());
...
@@ -470,9 +474,8 @@ OString SvIdlParser::ReadString()
...
@@ -470,9 +474,8 @@ OString SvIdlParser::ReadString()
void
SvIdlParser
::
Read
(
char
cChar
)
void
SvIdlParser
::
Read
(
char
cChar
)
{
{
if
(
!
(
rInStm
.
GetToken
().
IsChar
()
&&
rInStm
.
GetToken
().
GetChar
()
==
cChar
)
)
if
(
!
ReadIf
(
cChar
)
)
throw
SvParseException
(
rInStm
,
"expected char '"
+
OString
(
cChar
)
+
"'"
);
throw
SvParseException
(
rInStm
,
"expected char '"
+
OString
(
cChar
)
+
"'"
);
rInStm
.
GetToken_Next
();
}
}
bool
SvIdlParser
::
ReadIf
(
char
cChar
)
bool
SvIdlParser
::
ReadIf
(
char
cChar
)
...
...
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