summaryrefslogtreecommitdiff
path: root/officecfg
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2019-07-03 15:33:35 +0300
committerJustin Luth <justin_luth@sil.org>2019-07-22 06:07:29 +0200
commit82c3e68642de445064313e353812b54df76c7fe9 (patch)
treeaffbde4996b940f506cd40409fc077d095b11f01 /officecfg
parent382aceb80d3c0f420d51762e1f88eee2334ff11b (diff)
tdf#118370 Draw: add option to consolidate multiple textObjs
This gives the user a tool to consolidate multiple textboxes into a single textbox. First the user selects a group of textframes, and then runs the consolidate text function. This will REPLACE the marked textframes with a single textbox combining all of the text. The function inspects the text fragments to see if they end in sentence-ending punctuation. If not, then the next textbox's content is appended to it instead of starting a new pargraph. It is the user's responsibility to afterwards fix up paragraphing, and set paragraph properties. The rational for this patch is to simplify making major text changes on PDFs imported into Draw, since each paragraph is currently broken into tiny character-property textbox fragments. Copy/paste from the PDF itself doesn't keep character attributes, so it is hard for a user to re-create the text. This is related to tdf#32249, but as a comment says, a better solution would be to write an entire text-focused PDF import, rather than just pick up the pieces. And I agree, but considering this simple patch took me a couple of weeks of frustration, I'm obviously not the person to do that. And since the bug has been open for 9 years, likely no one else will either. Thus, this pick-up-the-pieces tool to help the end user. This initial patch works only with textFrames, but can easily be adjusted to consolidate other HasText() SdrObjects. However, that tended to produce unexpected results, so everything other than OBJ_TEXT is explicitly excluded. (Thus general shapes with text, callouts, text-along-path etc are ignored.) Change-Id: I68a9a5b187bf320a8e671414c5cb22b07725fd52 Reviewed-on: https://gerrit.libreoffice.org/75043 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'officecfg')
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu11
1 files changed, 11 insertions, 0 deletions
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
index 2facd9bee872..abe7e7162e06 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
@@ -856,6 +856,17 @@
<value>1</value>
</prop>
</node>
+ <node oor:name=".uno:TextCombine" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Consolidate Text</value>
+ </prop>
+ <prop oor:name="TooltipLabel" oor:type="xs:string">
+ <value xml:lang="en-US">Merges text fragments from selected objects into one new textbox</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
<node oor:name=".uno:Combine" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Comb~ine</value>