Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
41482dcc
Commit
41482dcc
authored
Jan 23, 2011
by
Erwan Tulou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
skins2: cleanup and remove a now highly dubious useDTD parameter
parent
fe659105
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
29 deletions
+17
-29
modules/gui/skins2/parser/skin_parser.cpp
modules/gui/skins2/parser/skin_parser.cpp
+4
-6
modules/gui/skins2/parser/skin_parser.hpp
modules/gui/skins2/parser/skin_parser.hpp
+1
-2
modules/gui/skins2/parser/xmlparser.cpp
modules/gui/skins2/parser/xmlparser.cpp
+11
-19
modules/gui/skins2/parser/xmlparser.hpp
modules/gui/skins2/parser/xmlparser.hpp
+1
-2
No files found.
modules/gui/skins2/parser/skin_parser.cpp
View file @
41482dcc
...
...
@@ -27,9 +27,9 @@
#include <math.h>
SkinParser
::
SkinParser
(
intf_thread_t
*
pIntf
,
const
string
&
rFileName
,
const
string
&
rPath
,
bool
useDTD
,
BuilderData
*
pData
)
:
XMLParser
(
pIntf
,
rFileName
,
useDTD
),
m_path
(
rPath
),
m_pData
(
pData
),
m_ownData
(
pData
==
NULL
),
m_xOffset
(
0
),
m_yOffset
(
0
)
const
string
&
rPath
,
BuilderData
*
pData
)
:
XMLParser
(
pIntf
,
rFileName
),
m_path
(
rPath
),
m_pData
(
pData
),
m_ownData
(
pData
==
NULL
),
m_xOffset
(
0
),
m_yOffset
(
0
)
{
// Make sure the data is allocated
if
(
m_pData
==
NULL
)
...
...
@@ -76,9 +76,7 @@ void SkinParser::handleBeginElement( const string &rName, AttrList_t &attr )
OSFactory
*
pFactory
=
OSFactory
::
instance
(
getIntf
()
);
string
fullPath
=
m_path
+
pFactory
->
getDirSeparator
()
+
attr
[
"file"
];
msg_Dbg
(
getIntf
(),
"opening included XML file: %s"
,
fullPath
.
c_str
()
);
// FIXME: We do not use the DTD to validate the included XML file,
// as the parser seems to dislike it otherwise...
SkinParser
subParser
(
getIntf
(),
fullPath
.
c_str
(),
m_path
,
false
,
m_pData
);
SkinParser
subParser
(
getIntf
(),
fullPath
.
c_str
(),
m_path
,
m_pData
);
subParser
.
parse
();
}
...
...
modules/gui/skins2/parser/skin_parser.hpp
View file @
41482dcc
...
...
@@ -44,8 +44,7 @@ public:
};
SkinParser
(
intf_thread_t
*
pIntf
,
const
string
&
rFileName
,
const
string
&
rPath
,
bool
useDTD
=
true
,
BuilderData
*
pData
=
NULL
);
const
string
&
rPath
,
BuilderData
*
pData
=
NULL
);
virtual
~
SkinParser
();
const
BuilderData
&
getData
()
const
{
return
*
m_pData
;
}
...
...
modules/gui/skins2/parser/xmlparser.cpp
View file @
41482dcc
...
...
@@ -29,35 +29,28 @@
# include <sys/stat.h>
#endif
XMLParser
::
XMLParser
(
intf_thread_t
*
pIntf
,
const
string
&
rFileName
,
bool
useDTD
)
:
SkinObject
(
pIntf
)
XMLParser
::
XMLParser
(
intf_thread_t
*
pIntf
,
const
string
&
rFileName
)
:
SkinObject
(
pIntf
),
m_pXML
(
NULL
),
m_pReader
(
NULL
),
m_pStream
(
NULL
)
{
m_pReader
=
NULL
;
m_pStream
=
NULL
;
if
(
useDTD
)
m_pXML
=
xml_Create
(
pIntf
);
if
(
!
m_pXML
)
{
m_pXML
=
xml_Create
(
pIntf
);
if
(
m_pXML
)
LoadCatalog
();
else
msg_Err
(
getIntf
(),
"DTD not supported"
);
msg_Err
(
getIntf
(),
"cannot initialize xml"
);
return
;
}
else
m_pXML
=
NULL
;
LoadCatalog
()
;
char
*
psz_uri
=
make_URI
(
rFileName
.
c_str
(),
NULL
);
m_pStream
=
stream_UrlNew
(
pIntf
,
psz_uri
);
free
(
psz_uri
);
if
(
!
m_pStream
)
{
msg_Err
(
getIntf
(),
"failed to open %s for reading"
,
rFileName
.
c_str
()
);
m_pReader
=
NULL
;
return
;
}
m_pReader
=
xml_ReaderCreate
(
m_pXML
,
m_pStream
);
if
(
!
m_pReader
)
{
...
...
@@ -66,8 +59,7 @@ XMLParser::XMLParser( intf_thread_t *pIntf, const string &rFileName,
return
;
}
if
(
m_pXML
)
xml_ReaderUseDTD
(
m_pReader
);
xml_ReaderUseDTD
(
m_pReader
);
}
...
...
@@ -105,7 +97,7 @@ void XMLParser::LoadCatalog()
if
(
it
==
resPath
.
end
()
)
{
// Ok, try the default one
xml_CatalogLoad
(
m_pXML
,
0
);
xml_CatalogLoad
(
m_pXML
,
NULL
);
}
for
(
it
=
resPath
.
begin
();
it
!=
resPath
.
end
();
++
it
)
...
...
modules/gui/skins2/parser/xmlparser.hpp
View file @
41482dcc
...
...
@@ -37,8 +37,7 @@
class
XMLParser
:
public
SkinObject
{
public:
XMLParser
(
intf_thread_t
*
pIntf
,
const
string
&
rFileName
,
bool
useDTD
=
true
);
XMLParser
(
intf_thread_t
*
pIntf
,
const
string
&
rFileName
);
virtual
~
XMLParser
();
/// Parse the file. Returns true on success
...
...
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