Ask Your Question

Tool to compare element styles? (or: text frame will not align in Impress) [closed]

asked 2014-03-09 15:42:10 +0200

sdaau gravatar image

updated 2014-03-09 16:11:18 +0200

I am copying a text frame from one Impress presentation to another, when suddenly I realized a problem with the alignment of the text inside the frame. So I made a file demonstrating the problem: it is posted as test.odp ; and also exported as Flat XML odp format: test-f.odp (NB: .fodp is currently not allowed for upload, see Add fodp, fodt ... to allowed upload filename extensions for Ask.LibO - so after downloading test-f.odp, rename it to test.fodp; for more on Flat XML, see Exporting an office document as single, flat, plain-text XML file?)

Anyways, the problem can be seen more clearly here (note: composited image in Gimp - otherwise, if you select two textframes in Impress, Impress will not show their bounding boxes individually, just the total):


Note that the "This aligns center" text to the right (which was added to the .odp manually through the Text tool), aligns center by using the whole width of the text frame, as expected; however, the "This text here \n Will not align center" text to the left (which was pasted from another .odp, which may have previously had content pasted or converted from PowerPoint), while it does align center according to the width of the longest line of text - it does not align according to the text frame width!

So, I thought, that must be some sort of a problematic style entry, so I tried right-clicking on the text frame to the left, and choosing "Edit Style...", and what I get is this:


... and I find this absolutely overwhelming - in terms of easily finding exactly what is the problem. To make it worse, LO uses "modal dialogs", so I cannot open another "Edit Style" properties for the other text frame, so as to compare the styles to the correctly formatted text frame. (and I'm pretty sure soffice will not allow being ran in two instances, nor will it allow two Impress windows for the same document).

So my questions are:

  • Is there a GUI tool - either inside LibreOffice or standalone, which could accept references to document elements/objects as inputs, and show a side-by-side comparison of their styles?
  • Why does the problematic alignment happen, and how can I fix it using the LibreOffice GUI?

I guess the only other thing I can do, is compare the raw XML of the elements (hence the export to "Flat XML" - besides ... (more)

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2016-02-20 06:48:01.637660

2 Answers

Sort by » oldest newest most voted

answered 2014-03-09 16:58:43 +0200

sdaau gravatar image

Ok, found at least the GUI part - but it is tedious. Basically, from the XML analysis in the OP edit, I know I should delete/change something corresponding to the attribute draw:textarea-horizontal-align="left".

To begin width, it seems that the LibreOffice Impress GUI cannot differentiate between: styles applied to a text frame; and styles applied to paragraph text inside. For instance, if I right-click the left text frame, and choose "Edit Styles...", I get this:


Note that this is (probably) property of the text inside - even if I right-clicked on the text frame!

The only way I've found to get to the style of the frame: select the frame, then in "Styles and Formatting", click the "New Style from Selection" button:


You'll get another window, enter a name here (say, "copyframe") and OK. It should then show in the "Styles and Formatting" tree; right-click on this new node in the tree, select "Modify..." - now in the styles editor window, you'll get this (nb: composite image):


Here you should just click "Full width" checkmark, and the Text anchor will go from Left to Center automatically. Since the new style is now linked to the originating object, as soon as we click OK to confirm, _finally_ the text frame renders with proper center alignment:


Pheeew..... damn it... I really wonder, how did the designers of this GUI expect, that typical users would be able to troubleshoot a problem like this? I mean, most will hardly ever go through digging through XML and such... And also - if you have separate text frame and text paragraph objects, and they have their own specific attributes - why not clearly stating in the GUI, which style applies to each type of object? Actually, why not render the actual hierarchy of XML objects in the Navigator (which for this .doc, just shows four objects "Shape 1" to ".. 4")?

In any case, this is why a tool to compare elements' styles in a document (or between documents, even) is still an open question...

edit flag offensive delete link more

answered 2014-03-09 16:18:21 +0200

m.a.riosv gravatar image

Hi @sdaau you can install several versions in parallel, so you can compare the options in the screen.

Installing several versions of LibreOffice in parallel

edit flag offensive delete link more


Thanks for the answer, @mariosv - however, I find installing two versions of the same software, just to start two instances of it, a bit overkill. I would much more appreciate if soffice had a command line switch like, say, the text editor Geany has: -i, --new-instance Don't open files in a running instance, force opening a new instance. Cheers!

sdaau gravatar imagesdaau ( 2014-03-09 16:23:22 +0200 )edit

Question Tools

1 follower


Asked: 2014-03-09 15:42:10 +0200

Seen: 477 times

Last updated: Mar 09 '14