• Miklos Vajna's avatar
    DOC import: initialize RDF metadata before importing document properties · b7c2e9ae
    Miklos Vajna yazdı
    With this, it is possible to import part of the document as RDF
    statements later when SwFltControlStack::SetAttrInDoc() gets an
    SwFltRDFMark.
    
    Previously SfxBaseModel member functions like
    getMetadataGraphsWithType() and addMetadataFile() failed, as they tried
    to find the already imported document in UCB, which failed, as the
    import was still in progress. To prevent that, do the same as the ODT
    import in XMLReader::Read(), part "RDF metadata".
    
    One trick here is the call to
    comphelper::OStorageHelper::GetTemporaryStorage(), which gives an empty
    storage. Ideally a wrapper class would be needed that works on a
    SotStorage, but implements embed::XStorage, but that would be only used
    to find that the real storage doesn't provide a manifest.rdf stream,
    which is always the case. So instead of writing such a wrapper, just
    give loadMetadataFromStorage() an empty storage, which will have the
    same result without writing lots of dead code.
    
    Change-Id: Id1897838b1477eee0489b706d51cb6f59898877b
    b7c2e9ae
CppunitTest_sw_ww8import.mk 2.1 KB