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
cd3bb304
Kaydet (Commit)
cd3bb304
authored
Şub 16, 2016
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
move some more slot parsing to SvIdlParser
Change-Id: I186e80ed0446585aceaf4d25f32ecca7e8ed396c
üst
0f8f733e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
32 deletions
+46
-32
object.hxx
idl/inc/object.hxx
+1
-0
parser.hxx
idl/inc/parser.hxx
+20
-19
parser.cxx
idl/source/prj/parser.cxx
+25
-13
No files found.
idl/inc/object.hxx
Dosyayı görüntüle @
cd3bb304
...
@@ -33,6 +33,7 @@ class SvClassElement
...
@@ -33,6 +33,7 @@ class SvClassElement
tools
::
SvRef
<
SvMetaClass
>
xClass
;
tools
::
SvRef
<
SvMetaClass
>
xClass
;
public
:
public
:
SvClassElement
();
SvClassElement
();
SvClassElement
(
SvMetaClass
*
pClass
)
{
xClass
=
pClass
;
}
void
SetPrefix
(
const
OString
&
rPrefix
)
void
SetPrefix
(
const
OString
&
rPrefix
)
{
aPrefix
=
rPrefix
;
}
{
aPrefix
=
rPrefix
;
}
...
...
idl/inc/parser.hxx
Dosyayı görüntüle @
cd3bb304
...
@@ -37,25 +37,26 @@ class SvIdlParser
...
@@ -37,25 +37,26 @@ class SvIdlParser
SvTokenStream
&
rInStm
;
SvTokenStream
&
rInStm
;
public
:
public
:
SvIdlParser
(
SvIdlDataBase
&
rBase_
,
SvTokenStream
&
rInStrm_
)
:
rBase
(
rBase_
),
rInStm
(
rInStrm_
)
{}
SvIdlParser
(
SvIdlDataBase
&
rBase_
,
SvTokenStream
&
rInStrm_
)
:
rBase
(
rBase_
),
rInStm
(
rInStrm_
)
{}
void
ReadSvIdl
(
bool
bImported
,
const
OUString
&
rPath
);
void
ReadSvIdl
(
bool
bImported
,
const
OUString
&
rPath
);
void
ReadModuleHeader
(
SvMetaModule
&
rModule
);
void
ReadModuleHeader
(
SvMetaModule
&
rModule
);
void
ReadModuleBody
(
SvMetaModule
&
rModule
);
void
ReadModuleBody
(
SvMetaModule
&
rModule
);
void
ReadModuleElement
(
SvMetaModule
&
rModule
);
void
ReadModuleElement
(
SvMetaModule
&
rModule
);
void
ReadInclude
(
SvMetaModule
&
rModule
);
void
ReadInclude
(
SvMetaModule
&
rModule
);
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
);
bool
ReadInterfaceOrShellMethodOrAttribute
(
SvMetaAttribute
&
rAttr
);
bool
ReadInterfaceOrShellMethodOrAttribute
(
SvMetaAttribute
&
rAttr
);
void
ReadItem
();
void
ReadItem
();
void
ReadStruct
();
void
ReadStruct
();
void
ReadEnum
();
void
ReadEnum
();
void
ReadEnumValue
(
SvMetaTypeEnum
&
rEnum
);
void
ReadEnumValue
(
SvMetaTypeEnum
&
rEnum
);
SvMetaType
*
ReadKnownType
();
SvMetaClass
*
ReadKnownClass
();
void
ReadChar
(
char
cChar
);
SvMetaType
*
ReadKnownType
();
void
ReadDelimiter
();
void
ReadChar
(
char
cChar
);
OString
ReadIdentifier
();
void
ReadDelimiter
();
OString
ReadString
();
OString
ReadIdentifier
();
void
ReadToken
(
SvStringHashEntry
*
);
OString
ReadString
();
void
ReadToken
(
SvStringHashEntry
*
);
};
};
#endif // INCLUDED_IDL_INC_PARSER_HXX
#endif // INCLUDED_IDL_INC_PARSER_HXX
...
...
idl/source/prj/parser.cxx
Dosyayı görüntüle @
cd3bb304
...
@@ -282,9 +282,7 @@ void SvIdlParser::ReadInterfaceOrShell( SvMetaModule& rModule, MetaTypeType aMet
...
@@ -282,9 +282,7 @@ void SvIdlParser::ReadInterfaceOrShell( SvMetaModule& rModule, MetaTypeType aMet
if
(
rInStm
.
ReadIf
(
':'
)
)
if
(
rInStm
.
ReadIf
(
':'
)
)
{
{
aClass
->
aSuperClass
=
rBase
.
ReadKnownClass
(
rInStm
);
aClass
->
aSuperClass
=
ReadKnownClass
();
if
(
!
aClass
->
aSuperClass
.
Is
()
)
throw
SvParseException
(
rInStm
,
"unknown super class"
);
}
}
if
(
rInStm
.
ReadIf
(
'{'
)
)
if
(
rInStm
.
ReadIf
(
'{'
)
)
{
{
...
@@ -309,19 +307,15 @@ void SvIdlParser::ReadInterfaceOrShellEntry(SvMetaClass& rClass)
...
@@ -309,19 +307,15 @@ void SvIdlParser::ReadInterfaceOrShellEntry(SvMetaClass& rClass)
if
(
rTok
.
Is
(
SvHash_import
()
)
)
if
(
rTok
.
Is
(
SvHash_import
()
)
)
{
{
SvMetaClass
*
pClass
=
rBase
.
ReadKnownClass
(
rInStm
);
SvMetaClass
*
pClass
=
ReadKnownClass
();
if
(
!
pClass
)
SvClassElement
xEle
(
pClass
);
throw
SvParseException
(
rInStm
,
"unknown imported interface"
);
SvClassElement
xEle
;
xEle
.
SetClass
(
pClass
);
rClass
.
aClassElementList
.
push_back
(
xEle
);
rTok
=
rInStm
.
GetToken
();
rTok
=
rInStm
.
GetToken
();
if
(
rTok
.
IsString
()
)
if
(
rTok
.
IsString
()
)
{
{
xEle
.
SetPrefix
(
rTok
.
GetString
()
);
xEle
.
SetPrefix
(
rTok
.
GetString
()
);
rInStm
.
GetToken_Next
();
rInStm
.
GetToken_Next
();
}
}
rClass
.
aClassElementList
.
push_back
(
xEle
);
return
;
return
;
}
}
else
else
...
@@ -363,12 +357,22 @@ bool SvIdlParser::ReadInterfaceOrShellSlot(SvMetaSlot& rSlot)
...
@@ -363,12 +357,22 @@ bool SvIdlParser::ReadInterfaceOrShellSlot(SvMetaSlot& rSlot)
SvMetaAttribute
*
pAttr
=
rBase
.
ReadKnownAttr
(
rInStm
,
rSlot
.
GetType
()
);
SvMetaAttribute
*
pAttr
=
rBase
.
ReadKnownAttr
(
rInStm
,
rSlot
.
GetType
()
);
if
(
pAttr
)
if
(
pAttr
)
{
{
SvMetaSlot
*
pKnownSlot
=
dynamic_cast
<
SvMetaSlot
*>
(
pAttr
);
SvMetaSlot
*
pKnownSlot
=
dynamic_cast
<
SvMetaSlot
*>
(
pAttr
);
if
(
!
pKnownSlot
)
if
(
!
pKnownSlot
)
throw
SvParseException
(
rInStm
,
"attribute "
+
pAttr
->
GetName
()
+
" is method or variable but not a slot"
);
throw
SvParseException
(
rInStm
,
"attribute "
+
pAttr
->
GetName
()
+
" is method or variable but not a slot"
);
rSlot
.
SetRef
(
pKnownSlot
);
rSlot
.
SetRef
(
pKnownSlot
);
rSlot
.
SetName
(
pKnownSlot
->
GetName
()
);
rSlot
.
SetName
(
pKnownSlot
->
GetName
()
);
bOk
=
rSlot
.
SvMetaObject
::
ReadSvIdl
(
rBase
,
rInStm
);
if
(
rInStm
.
ReadIf
(
'['
)
)
{
sal_uInt32
nBeginPos
=
0
;
// can not happen with Tell
while
(
nBeginPos
!=
rInStm
.
Tell
()
)
{
nBeginPos
=
rInStm
.
Tell
();
rSlot
.
ReadAttributesSvIdl
(
rBase
,
rInStm
);
rInStm
.
ReadIfDelimiter
();
}
bOk
=
rInStm
.
ReadIf
(
']'
);
}
}
}
else
else
{
{
...
@@ -376,7 +380,7 @@ bool SvIdlParser::ReadInterfaceOrShellSlot(SvMetaSlot& rSlot)
...
@@ -376,7 +380,7 @@ bool SvIdlParser::ReadInterfaceOrShellSlot(SvMetaSlot& rSlot)
SvMetaAttribute
*
pAttr2
=
rBase
.
SearchKnownAttr
(
rSlot
.
GetSlotId
()
);
SvMetaAttribute
*
pAttr2
=
rBase
.
SearchKnownAttr
(
rSlot
.
GetSlotId
()
);
if
(
pAttr2
)
if
(
pAttr2
)
{
{
SvMetaSlot
*
pKnownSlot
=
dynamic_cast
<
SvMetaSlot
*>
(
pAttr2
);
SvMetaSlot
*
pKnownSlot
=
dynamic_cast
<
SvMetaSlot
*>
(
pAttr2
);
if
(
!
pKnownSlot
)
if
(
!
pKnownSlot
)
throw
SvParseException
(
rInStm
,
"attribute "
+
pAttr2
->
GetName
()
+
" is method or variable but not a slot"
);
throw
SvParseException
(
rInStm
,
"attribute "
+
pAttr2
->
GetName
()
+
" is method or variable but not a slot"
);
rSlot
.
SetRef
(
pKnownSlot
);
rSlot
.
SetRef
(
pKnownSlot
);
...
@@ -435,6 +439,14 @@ bool SvIdlParser::ReadInterfaceOrShellMethodOrAttribute( SvMetaAttribute& rAttr
...
@@ -435,6 +439,14 @@ bool SvIdlParser::ReadInterfaceOrShellMethodOrAttribute( SvMetaAttribute& rAttr
return
bOk
;
return
bOk
;
}
}
SvMetaClass
*
SvIdlParser
::
ReadKnownClass
()
{
SvMetaClass
*
pClass
=
rBase
.
ReadKnownClass
(
rInStm
);
if
(
!
pClass
)
throw
SvParseException
(
rInStm
,
"unknown class"
);
return
pClass
;
}
SvMetaType
*
SvIdlParser
::
ReadKnownType
()
SvMetaType
*
SvIdlParser
::
ReadKnownType
()
{
{
OString
aName
=
ReadIdentifier
();
OString
aName
=
ReadIdentifier
();
...
...
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