summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f11c59c)
raw | patch | inline | side by side (parent: f11c59c)
author | Johan Engelen <goejendaagh@zonnet.nl> | |
Thu, 8 Apr 2010 21:05:52 +0000 (23:05 +0200) | ||
committer | Johan Engelen <goejendaagh@zonnet.nl> | |
Thu, 8 Apr 2010 21:05:52 +0000 (23:05 +0200) |
src/extension/internal/latex-text-renderer.cpp | patch | blob | history |
diff --git a/src/extension/internal/latex-text-renderer.cpp b/src/extension/internal/latex-text-renderer.cpp
index 28bba1bebcec4271a54e4cfa7e434525d024825d..c6c597b7a15cf69bb286c2abcb9721588ef41df6 100644 (file)
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
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 :)