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
dc1df1b8
Kaydet (Commit)
dc1df1b8
authored
Haz 21, 2016
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
simplify parser
Change-Id: If6b9ed2a0cb373c8bec5d3ff20488f5ee00231ff
üst
380a646b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
24 deletions
+15
-24
parser.cxx
idl/source/prj/parser.cxx
+15
-24
No files found.
idl/source/prj/parser.cxx
Dosyayı görüntüle @
dc1df1b8
...
...
@@ -182,10 +182,8 @@ void SvIdlParser::ReadStruct()
xStruct
->
SetType
(
MetaTypeType
::
Struct
);
xStruct
->
SetName
(
ReadIdentifier
()
);
Read
(
'{'
);
sal_uInt32
nBeginPos
=
0
;
// can not happen with Tell
while
(
nBeginPos
!=
rInStm
.
Tell
()
)
while
(
true
)
{
nBeginPos
=
rInStm
.
Tell
();
tools
::
SvRef
<
SvMetaAttribute
>
xAttr
(
new
SvMetaAttribute
()
);
xAttr
->
aType
=
ReadKnownType
();
xAttr
->
SetName
(
ReadIdentifier
());
...
...
@@ -293,25 +291,20 @@ void SvIdlParser::ReadInterfaceOrShell( SvMetaModule& rModule, MetaTypeType aMet
void
SvIdlParser
::
ReadInterfaceOrShellEntry
(
SvMetaClass
&
rClass
)
{
sal_uInt32
nTokPos
=
rInStm
.
Tell
();
SvToken
&
rTok
=
rInStm
.
GetToken_Next
();
if
(
rTok
.
Is
(
SvHash_import
()
)
)
if
(
ReadIf
(
SvHash_import
()
)
)
{
SvMetaClass
*
pClass
=
ReadKnownClass
();
SvClassElement
aEle
(
pClass
);
rTok
=
rInStm
.
GetToken
();
SvToken
&
rTok
=
rInStm
.
GetToken
();
if
(
rTok
.
IsString
()
)
{
aEle
.
SetPrefix
(
rTok
.
GetString
()
);
rInStm
.
GetToken_Next
();
}
rClass
.
aClassElementList
.
push_back
(
aEle
);
return
;
}
else
{
rInStm
.
Seek
(
nTokPos
);
SvMetaType
*
pType
=
rBase
.
ReadKnownType
(
rInStm
);
tools
::
SvRef
<
SvMetaAttribute
>
xAttr
;
bool
bOk
=
false
;
...
...
@@ -335,10 +328,8 @@ void SvIdlParser::ReadInterfaceOrShellEntry(SvMetaClass& rClass)
if
(
!
xAttr
->
GetSlotId
().
IsSet
()
)
xAttr
->
SetSlotId
(
SvIdentifier
(
rBase
.
GetUniqueId
())
);
rClass
.
aAttrList
.
push_back
(
xAttr
);
return
;
}
}
rInStm
.
Seek
(
nTokPos
);
}
bool
SvIdlParser
::
ReadInterfaceOrShellSlot
(
SvMetaSlot
&
rSlot
)
...
...
@@ -402,20 +393,22 @@ void SvIdlParser::ReadInterfaceOrShellMethodOrAttribute( SvMetaAttribute& rAttr
tools
::
SvRef
<
SvMetaType
>
xT
(
new
SvMetaType
()
);
xT
->
SetRef
(
rAttr
.
GetType
()
);
rAttr
.
aType
=
xT
;
sal_uInt32
nBeginPos
=
0
;
// can not happen with Tell
while
(
nBeginPos
!=
rInStm
.
Tell
()
)
rAttr
.
aType
->
SetType
(
MetaTypeType
::
Method
);
if
(
!
ReadIf
(
')'
)
)
{
nBeginPos
=
rInStm
.
Tell
();
tools
::
SvRef
<
SvMetaAttribute
>
xAttr
(
new
SvMetaAttribute
()
);
if
(
xAttr
->
ReadSvIdl
(
rBase
,
rInStm
)
)
while
(
true
)
{
if
(
xAttr
->
Test
(
rInStm
)
)
rAttr
.
aType
->
GetAttrList
().
push_back
(
xAttr
);
tools
::
SvRef
<
SvMetaAttribute
>
xAttr
(
new
SvMetaAttribute
()
);
if
(
!
xAttr
->
ReadSvIdl
(
rBase
,
rInStm
)
)
throw
SvParseException
(
rInStm
,
"ReadSvIdl in method argument parsing failed"
);
if
(
!
xAttr
->
Test
(
rInStm
)
)
throw
SvParseException
(
rInStm
,
"test in method argument parsing failed"
);
rAttr
.
aType
->
GetAttrList
().
push_back
(
xAttr
);
if
(
!
ReadIfDelimiter
())
break
;
}
Read
IfDelimiter
(
);
Read
(
')'
);
}
Read
(
')'
);
rAttr
.
aType
->
SetType
(
MetaTypeType
::
Method
);
}
SvMetaClass
*
SvIdlParser
::
ReadKnownClass
()
...
...
@@ -433,9 +426,7 @@ SvMetaType * SvIdlParser::ReadKnownType()
for
(
const
auto
&
aType
:
rBase
.
GetTypeList
()
)
{
if
(
aType
->
GetName
()
==
aName
)
{
return
aType
;
}
}
throw
SvParseException
(
rInStm
,
"wrong typedef: "
);
}
...
...
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