From 02e20dfa733d050e9d37285ad36323b2aad46ffe Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 8 Jun 2020 21:22:58 +0100 Subject: tdf#128006 allow documents inside odbs to be as trusted as their container MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Id19d3805ef2e3282c1a8e89dd8edcccbf4ac4db6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95861 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- sfx2/source/doc/objmisc.cxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sfx2') diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index e9adb018eae0..1961a7282ef5 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -1742,7 +1742,12 @@ OUString SfxObjectShell_Impl::getDocumentLocation() const // for documents made from a template: get the name of the template sLocation = rDocShell.getDocProperties()->getTemplateURL(); } + + // tdf#128006 take document base url as location + if (sLocation.isEmpty()) + sLocation = rDocShell.getDocumentBaseURL(); } + return sLocation; } -- cgit