summaryrefslogtreecommitdiffstats
path: root/src/ui/toolbar/text-toolbar.cpp
diff options
context:
space:
mode:
authorJabiertxof <jabier.arraiza@marker.es>2019-09-13 20:09:42 +0000
committerJabiertxof <jabier.arraiza@marker.es>2019-09-13 20:09:42 +0000
commitbf052b6e7cb79317c4f38ff144a77b6f9e49421e (patch)
tree8b5235b21eeac68e495ad60a51065aaeed4aff33 /src/ui/toolbar/text-toolbar.cpp
parentRefactor of prepare inner and some comments (diff)
downloadinkscape-bf052b6e7cb79317c4f38ff144a77b6f9e49421e.tar.gz
inkscape-bf052b6e7cb79317c4f38ff144a77b6f9e49421e.zip
Allow to paste paragraphs in SVG2 Flow then paste overflow the shape
Diffstat (limited to 'src/ui/toolbar/text-toolbar.cpp')
-rw-r--r--src/ui/toolbar/text-toolbar.cpp19
1 files changed, 3 insertions, 16 deletions
diff --git a/src/ui/toolbar/text-toolbar.cpp b/src/ui/toolbar/text-toolbar.cpp
index 839fb997b..b0af522d3 100644
--- a/src/ui/toolbar/text-toolbar.cpp
+++ b/src/ui/toolbar/text-toolbar.cpp
@@ -2293,28 +2293,15 @@ void TextToolbar::prepare_inner()
}
// Here we remove temporary the shape to allow layout calculate where are the warp_end and warpo_start
// position if one of this are hiden because the previous line height changed
- SPCSSAttr *css = nullptr;
if (text) {
- SPStyle *item_style = spitem->style;
- if (item_style->shape_inside.set) {
- SPCSSAttr *css_unset = sp_css_attr_from_style(item_style, SP_STYLE_FLAG_IFSET);
- css = sp_css_attr_from_style(item_style, SP_STYLE_FLAG_IFSET);
- sp_repr_css_unset_property(css_unset, "shape-inside");
- spitem->changeCSS(css_unset, "style");
- spitem->updateRepr();
- }
+ text->hide_shape_inside();
}
- /* if (text) {
- text->rebuildLayout();
- } else if (flowtext) {
- flowtext->rebuildLayout();
- } */
void *rawptr_start = nullptr;
void *rawptr_end = nullptr;
layout->getSourceOfCharacter(wrap_start, &rawptr_start);
layout->getSourceOfCharacter(wrap_end, &rawptr_end);
- if (css) {
- spitem->changeCSS(css, "style");
+ if (text) {
+ text->show_shape_inside();
}
if (!rawptr_start || !rawptr_end || !SP_IS_OBJECT(rawptr_start)|| !SP_IS_OBJECT(rawptr_end)) {
return;