summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2010-04-08 21:05:52 +0000
committerJohan Engelen <goejendaagh@zonnet.nl>2010-04-08 21:05:52 +0000
commit7557c867cfcd841cf46935e7bf7fbee53709c150 (patch)
tree423b3cc15c9f6a96ff5bb0090c83496995ff011d /src
parentCleanup of device internal handling and API. (diff)
downloadinkscape-7557c867cfcd841cf46935e7bf7fbee53709c150.tar.gz
inkscape-7557c867cfcd841cf46935e7bf7fbee53709c150.zip
PDF+LaTeX: fix bug 555488, and fix bug with missing space after setting justification
Fixed bugs: - https://launchpad.net/bugs/555488 (bzr r9301)
Diffstat (limited to 'src')
-rw-r--r--src/extension/internal/latex-text-renderer.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/extension/internal/latex-text-renderer.cpp b/src/extension/internal/latex-text-renderer.cpp
index 28bba1beb..c6c597b7a 100644
--- a/src/extension/internal/latex-text-renderer.cpp
+++ b/src/extension/internal/latex-text-renderer.cpp
@@ -350,13 +350,13 @@ Flowing in rectangle is possible, not in arb shape.
g_free(strtext);
g_strfreev(splitstr);
- if (!flowtext->has_internal_frame()) {
- // has_internal_frame includes a check that frame is a SPRect
+ SPItem *frame_item = flowtext->get_frame(NULL);
+ if (!frame_item || !SP_IS_RECT(frame_item)) {
g_warning("LaTeX export: non-rectangular flowed text shapes are not supported, skipping text.");
return; // don't know how to handle non-rect frames yet. is quite uncommon for latex users i think
}
- SPRect *frame = SP_RECT(flowtext->get_frame(NULL));
+ SPRect *frame = SP_RECT(frame_item);
Geom::Rect framebox = sp_rect_get_rect(frame) * transform();
// get position and alignment
@@ -365,13 +365,13 @@ Flowing in rectangle is possible, not in arb shape.
gchar const *justification = "";
switch (flowtext->layout.paragraphAlignment(flowtext->layout.begin())) {
case Inkscape::Text::Layout::LEFT:
- justification = "\\raggedright";
+ justification = "\\raggedright ";
break;
case Inkscape::Text::Layout::RIGHT:
- justification = "\\raggedleft";
+ justification = "\\raggedleft ";
break;
case Inkscape::Text::Layout::CENTER:
- justification = "\\centering";
+ justification = "\\centering ";
case Inkscape::Text::Layout::FULL:
default:
// no need to add LaTeX code for standard justified output :)