• Michael Stahl's avatar
    sw: ODF import: prevent shapes from inheriting paragraph default margins · 2e39e519
    Michael Stahl yazdı
    The problem is that even with the vertical-pos default fix,
    we don't render ShapesWithWrapping.odt the same as Word does:
    
    https://beta.opendocumentformat.org/rendercompare/upload/223/86/191/1
    
    The shape still has a spurious bottom margin, which should not exist.
    
    This has a surprising cause: the default-style family="paragraph"
    has the attribute fo:margin-bottom="0.1388in" on paragraph-properties,
    which gets imported as the pool's default item of RES_UL_SPACE;
    there is nothing that prevents the shape from using this pool default
    item if it doesn't have a margin set on itself.
    
    Prevent that by overriding the pool default in
    SwDoc::mpDfltFrameFormat, which already carries a XFillStyleItem
    for similar reasons.
    
    The mpDfltFrameFormat is used by a lot more than just shapes,
    but none of that stuff should inherit paragraph defaults.
    
    As an aside the fo:margin-* properties are also allowed on
    style:graphic-properties, but it turns out that the implementation
    of the default-style family="graphic", in
    SvxUnoDrawPool/SwSvxUnoDrawPool, does not have the corresponding
    properties, hence cannot import these.
    
    Not sure if it would be better to have multiple SvxULSpace items
    with different IDs, so the paragraphs and shapes and etc. can have
    separate defaults.
    
    Change-Id: Ie6a196db567beb7a48b4176f383c88490dcfb8e7
    2e39e519
Adı
Son kayıt (commit)
Son güncelleme
..
data Loading commit data...
odfimport.cxx Loading commit data...