From b7c2e9ae95ff41570f752ca43c361b249a65da77 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 9 Dec 2015 15:43:34 +0100 Subject: DOC import: initialize RDF metadata before importing document properties 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 --- sw/CppunitTest_sw_ww8import.mk | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sw/CppunitTest_sw_ww8import.mk') diff --git a/sw/CppunitTest_sw_ww8import.mk b/sw/CppunitTest_sw_ww8import.mk index 63230e47021e..ed28ae9d641c 100644 --- a/sw/CppunitTest_sw_ww8import.mk +++ b/sw/CppunitTest_sw_ww8import.mk @@ -58,6 +58,7 @@ $(eval $(call gb_CppunitTest_use_components,sw_ww8import,\ i18npool/util/i18npool \ linguistic/source/lng \ package/util/package2 \ + package/source/xstor/xstor \ sw/util/msword \ sw/util/sw \ sw/util/swd \ @@ -67,6 +68,9 @@ $(eval $(call gb_CppunitTest_use_components,sw_ww8import,\ toolkit/util/tk \ ucb/source/core/ucb1 \ ucb/source/ucp/file/ucpfile1 \ + ucb/source/ucp/tdoc/ucptdoc1 \ + unotools/util/utl \ + unoxml/source/rdf/unordf \ unoxml/source/service/unoxml \ $(if $(filter DESKTOP,$(BUILD_TYPE)),xmlhelp/util/ucpchelp1) \ )) -- cgit