Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kumir2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
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
kumir
kumir2
Commits
99291ca7
Commit
99291ca7
authored
May 22, 2013
by
Victor Yacovlev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DocBookViewer: fixed handling XREF
parent
cf45ab2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
src/shared/docbookviewer/contentview.cpp
src/shared/docbookviewer/contentview.cpp
+8
-4
No files found.
src/shared/docbookviewer/contentview.cpp
View file @
99291ca7
...
...
@@ -699,9 +699,7 @@ QString ContentView::renderSection(ModelPtr data) const
data
->
sectionLevel
()
-
onePageParentModel
(
data
)
->
sectionLevel
();
const
QString
tag
=
QString
::
fromAscii
(
"h%1"
).
arg
(
thisSectionLevel
+
1
);
const
QString
anchor
=
data
->
id
().
length
()
>
0
?
data
->
id
()
:
modelToLink
(
data
);
const
QString
anchor
=
modelToLink
(
data
);
QString
result
=
"<a name='"
+
anchor
+
"'><"
+
tag
+
+
" class=
\"
title
\"
>"
+
normalizeText
(
data
->
title
())
+
"</"
+
tag
+
"></a>
\n
"
;
...
...
@@ -729,6 +727,10 @@ QString ContentView::renderXref(ModelPtr data) const
const
QString
&
linkEnd
=
data
->
xrefLinkEnd
();
const
QString
&
endTerm
=
data
->
xrefEndTerm
();
ModelPtr
target
=
findModelById
(
topLevelModel
(
data
),
linkEnd
);
ModelPtr
term
;
if
(
endTerm
.
length
()
>
0
)
{
term
=
findModelById
(
topLevelModel
(
data
),
linkEnd
);
}
if
(
target
)
{
QString
href
;
if
(
hasModelOnThisPage
(
target
))
{
...
...
@@ -743,7 +745,9 @@ QString ContentView::renderXref(ModelPtr data) const
modelToLink
(
container
);
}
}
const
QString
targetTitle
=
normalizeText
(
target
->
title
());
const
QString
targetTitle
=
normalizeText
(
term
?
term
->
title
()
:
target
->
title
()
);
if
(
href
.
length
()
>
0
)
{
result
+=
tr
(
"(see <a href=
\"
%1
\"
>%2</a>)"
)
.
arg
(
href
)
...
...
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