dbaccess/source/core/dataaccess/databasedocument.cxx | 7 ++++++- sw/source/uibase/dbui/dbmgr.cxx | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-)
New commits: commit 0b2c324d79ef24913846d64ee5f9be516fd2d660 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Fri Jun 5 12:42:24 2015 +0200 SwDBManager: fix relative reference of embedded data source When the MM wizard creates an embedded data source definition, then we used to always write absolute references to e.g. the data source Calc file. Pass BaseURI to the filter, so in case the document and the data source is in the same directory, relative references can be written. Change-Id: Iaa316adaf435f82bb574c7e5085ac04bf13a71f8 diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index be81dce..a95fa52 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -2635,7 +2635,8 @@ OUString SwDBManager::LoadAndRegisterDataSource(const DBConnURITypes type, const aSequence = comphelper::InitPropertySequence( { {"TargetStorage", uno::makeAny(xStorage)}, - {"StreamRelPath", uno::makeAny(aStreamRelPath)} + {"StreamRelPath", uno::makeAny(aStreamRelPath)}, + {"BaseURI", uno::makeAny(aOwnURL)} }); // Refer to the sub-storage name in the document settings, so commit 1f1ad7ac0d1f60fb4db0b937fdac551118091ebc Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Fri Jun 5 12:38:50 2015 +0200 dbaccess: let ODatabaseDocument::impl_writeStorage_throw() respect BaseURI Change-Id: Id30aaa624b9a1b0bbef016ef0b35bd39f19f6439 diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx index 84a592e..43aa283 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.cxx +++ b/dbaccess/source/core/dataaccess/databasedocument.cxx @@ -1658,7 +1658,12 @@ void ODatabaseDocument::impl_writeStorage_throw( const Reference< XStorage >& _r SvtSaveOptions aSaveOpt; xInfoSet->setPropertyValue("UsePrettyPrinting", uno::makeAny(aSaveOpt.IsPrettyPrinting())); if ( aSaveOpt.IsSaveRelFSys() ) - xInfoSet->setPropertyValue("BaseURI", uno::makeAny(_rMediaDescriptor.getOrDefault("URL",OUString()))); + { + OUString sBaseURI = _rMediaDescriptor.getOrDefault("BaseURI", OUString()); + if (sBaseURI.isEmpty()) + sBaseURI = _rMediaDescriptor.getOrDefault("URL",OUString()); + xInfoSet->setPropertyValue("BaseURI", uno::makeAny(sBaseURI)); + } // Set TargetStorage, so it doesn't have to be re-constructed based on possibly empty URL. xInfoSet->setPropertyValue("TargetStorage", uno::makeAny(m_pImpl->getRootStorage())); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits