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