Date: prev next · Thread: first prev next last
2016 Archives by date, by thread · List index


Hi,

On Fri, Mar 25, 2016 at 01:59:35PM +0200, Gülşah Köse <gulsah.1004@gmail.com> wrote:
My question is which class(es) sets svg:width and svg:height atrributes. If
you think that is very particular question, I can change my question as how
generates LibreOffice Writer the content.xml files.

It depends on how the image is anchored. So a specific case: if the
image is a Writer image (so the image is part of a Text Frame), and it's
anchored as-paragraph (that's what you get when you just insert -> image
in a new document), then it's

xmloff/source/text/txtparae.cxx:2667

You can do something like:

----
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 5310185..57922ee 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -975,6 +975,8 @@ void SvXMLExport::AddAttribute( sal_uInt16 nPrefixKey,
                                 enum XMLTokenEnum eName,
                                 const OUString& rValue )
 {
+    if (nPrefixKey == XML_NAMESPACE_SVG && eName == XML_WIDTH)
+        SAL_DEBUG("foo");
     mpAttrList->AddAttribute(
         _GetNamespaceMap().GetQNameByKey( nPrefixKey, GetXMLToken(eName) ),
         rValue );
----

and then put a breakpoint on "foo" in a debugger, and see who is the
caller.

Beware though, that the ODT export uses the UNO API, while the sw HTML
export uses the internal sw API directly, so you probably want to look
at the sw UNO API implementation as well.

Regards,

Miklos

Attachment: signature.asc
Description: Digital signature


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.