https://bugs.freedesktop.org/show_bug.cgi?id=57631
--- Comment #7 from [email protected] --- Commenting on this particular bug for greater visibility, and to say the problem is still there in LibreOffice Version 4.0.1.2 (Build ID: 84102822e3d61eb989ddd325abf1ac077904985). What is described here is not limited to PDF export (which ignores control settings different to those as default), as the problem also takes places when saving the file to normal .odg LibreOffice's own format. The problem can be reproduced as follows: 1. Open LibreOffice Draw application 2. Create a single "Form Control", of type "Text Box" 3. Right click on the form control , select "Control..." and edit some control general properties (for example, "Font", "Alignment" and "Border") 4. Save the drawing to default .odg format 5. Close and open LibreOffice again 6. Load the saved file on step 4 7. The form is shown without any of the non-default "Font", "Alignment" and "Border" settings you would expect after performing 3. and saving the document However, the steps above work fine when run from Writer. That and writing to non-optimized XML format gives some clues about what is going on. Creating a Writer document with a single "text box" control as mentioned above, with nothing but the defaults (writer-default.odt), and another one with the control settings changed to either text alignment set to center (writer-center.odt) XOR frame changed to "flat" (writer-flatframe.odt), it is clear where in the .odt file those settings are stored: --- writer-default/content.xml 2013-03-13 19:24:50.000000000 +0100 +++ writer-center/content.xml 2013-03-13 19:25:12.000000000 +0100 @@ -17,7 +17,7 @@ <style:text-properties fo:hyphenate="false"/> </style:style> <style:style style:name="P2" style:family="paragraph"> - <style:paragraph-properties fo:text-align="start"/> + <style:paragraph-properties fo:text-align="center"/> <style:text-properties style:text-line-through-style="none" style:font-name="Arial" fo:font-size="12pt" fo:font-style="normal" style:text-underline-style="none" fo:font-weight="normal"/> </style:style> <style:style style:name="T1" style:family="text"> --- writer-default/content.xml 2013-03-13 19:24:50.000000000 +0100 +++ writer-flatframe/content.xml 2013-03-13 19:25:38.000000000 +0100 @@ -24,7 +24,7 @@ <style:text-properties style:use-window-font-color="true" style:text-outline="false" style:text-line-through-style="none" style:text-position="0% 100%" style:font-name="Times New Roman" fo:font-size="12pt" fo:letter-spacing="normal" fo:language="es" fo:country="ES" fo:font-style="normal" fo:text-shadow="none" style:text-underline-style="none" fo:font-weight="normal" style:text-underline-mode="continuous" style:text-overline-mode="continuous" style:text-line-through-mode="continuous" style:letter-kerning="true" style:font-name-asian="DejaVu Sans" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-style-asian="normal" style:font-weight-asian="normal" style:font-name-complex="Lohit Hindi" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" style:font-style-complex="normal" style:font-weight-complex="normal" style:text-scale="100%" style:font-relief="none"/> </style:style> <style:style style:name="gr1" style:family="graphic"> - <style:graphic-properties style:wrap="run-through" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top" style:vertical-rel="paragraph" style:horizontal-pos="from-left" style:horizontal-rel="paragraph"/> + <style:graphic-properties fo:border="solid" style:wrap="run-through" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top" style:vertical-rel="paragraph" style:horizontal-pos="from-left" style:horizontal-rel="paragraph"/> </style:style> </office:automatic-styles> <office:body> Trying the same thing but using Draw (test file with a text box control, "draw-default.odg", the same with centered text, "draw-center.odg", and the original one with a flat frame, "draw-flatframe.odg"), you can see there is information missing when saving the file to native format: --- draw-default/content.xml 2013-03-13 19:31:20.000000000 +0100 +++ draw-center/content.xml 2013-03-13 19:31:44.000000000 +0100 @@ -10,9 +10,6 @@ </style:paragraph-properties> <style:text-properties fo:hyphenate="false"/> </style:style> - <style:style style:name="P2" style:family="paragraph"> - <style:paragraph-properties fo:text-align="start"/> - </style:style> <style:style style:name="T1" style:family="text"> <style:text-properties style:use-window-font-color="true" style:text-outline="false" style:text-line-through-style="none" style:text-position="0% 100%" fo:font-family="Arial" style:font-family-generic="roman" style:font-pitch="variable" fo:font-size="18pt" fo:letter-spacing="normal" fo:language="es" fo:country="ES" fo:font-style="normal" fo:text-shadow="none" style:text-underline-style="none" fo:font-weight="normal" style:text-underline-mode="continuous" style:text-overline-mode="continuous" style:text-line-through-mode="continuous" style:letter-kerning="true" style:font-family-asian="'DejaVu Sans'" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="18pt" style:language-asian="zh" style:country-asian="CN" style:font-style-asian="normal" style:font-weight-asian="normal" style:font-family-complex="'Lohit Hindi'" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="18pt" style:language-complex="hi" style:country-complex="IN" style:font-style-complex="normal" style:font-weight-complex="normal" style:text-scale="100%" style:font-relief="none"/> </style:style> @@ -33,7 +30,7 @@ </form:textarea> </form:form> </office:forms> - <draw:control draw:style-name="standard" draw:text-style-name="P2" draw:layer="controls" svg:width="12.907cm" svg:height="3.227cm" svg:x="3.775cm" svg:y="4.517cm" draw:control="control1"/> + <draw:control draw:style-name="standard" draw:layer="controls" svg:width="12.907cm" svg:height="3.227cm" svg:x="3.775cm" svg:y="4.517cm" draw:control="control1"/> </draw:page> </office:drawing> </office:body> For the "text align" property for the control, the whole style is removed when saving the modified document (instead of setting fo:text-align="center"). It is curious, but if instead of having a saved Draw file with a control , that you later change and then save under a different name, you create the Draw file and modify the control and save it to some file, there is no difference between a file created for a control with all settings to default, or the file for the modified control. Tried that for the control border frame, and these are the differences: --- draw-default/content.xml 2013-03-13 19:31:20.000000000 +0100 +++ draw-flatframe/content.xml 2013-03-13 19:38:28.000000000 +0100 @@ -33,7 +33,7 @@ </form:textarea> </form:form> </office:forms> - <draw:control draw:style-name="standard" draw:text-style-name="P2" draw:layer="controls" svg:width="12.907cm" svg:height="3.227cm" svg:x="3.775cm" svg:y="4.517cm" draw:control="control1"/> + <draw:control draw:style-name="standard" draw:text-style-name="P2" draw:layer="controls" svg:width="13.1cm" svg:height="4.259cm" svg:x="3.937cm" svg:y="4.614cm" draw:control="control1"/> </draw:page> </office:drawing> </office:body> As I manually created the controls without setting the same sizes or positions, the only difference if the coordinates and sizes stored. Basically, Dray completely ignored the control settings when storing the file, and from other testing mentioned, at some other points in the code it seems to simply remove the corresponding styles, instead of modifying them. It seems the code is there to support this options being stored to the native LibreOffice file formats, and PDF export works fine as far as I have been able to test. There seems to be Bug 59898 , which described a subset of the problems described here. May be good to mark that other one as a duplicate of this one. -- You are receiving this mail because: You are the assignee for the bug.
_______________________________________________ Libreoffice-bugs mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
