Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Graphics
Okular
Commits
d90db450
Commit
d90db450
authored
Nov 27, 2012
by
Fabio D'Urso
Browse files
DVI: Avoid unnecessary string operations if DEBUG_RENDER is not enabled
parent
57bc499c
Changes
1
Hide whitespace changes
Inline
Side-by-side
generators/dvi/dviRenderer_draw.cpp
View file @
d90db450
...
...
@@ -602,13 +602,14 @@ void dviRenderer::draw_part(double current_dimconv, bool is_vfmacro)
in the array */
if
(
space_encountered
&&
(
currentlyDrawnPage
->
textBoxList
.
size
()
>
last_space_index
))
{
QString
lastword
(
currentlyDrawnPage
->
textBoxList
[
last_space_index
].
text
);
for
(
int
lidx
=
last_space_index
+
1
;
lidx
<
currentlyDrawnPage
->
textBoxList
.
size
();
++
lidx
)
{
// merge two adjacent boxes which are part of the same word
lastword
+=
currentlyDrawnPage
->
textBoxList
[
lidx
].
text
;
currentlyDrawnPage
->
textBoxList
[
lidx
-
1
].
box
.
setRight
(
currentlyDrawnPage
->
textBoxList
[
lidx
].
box
.
x
());
}
#ifdef DEBUG_RENDER
QString
lastword
(
currentlyDrawnPage
->
textBoxList
[
last_space_index
].
text
);
for
(
int
lidx
=
last_space_index
+
1
;
lidx
<
currentlyDrawnPage
->
textBoxList
.
size
();
++
lidx
)
lastword
+=
currentlyDrawnPage
->
textBoxList
[
lidx
].
text
;
kDebug
(
kvs
::
dvi
)
<<
"space encountered: '"
<<
lastword
<<
"'"
;
#endif
last_space_index
=
currentlyDrawnPage
->
textBoxList
.
size
();
...
...
Write
Preview
Supports
Markdown
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