tdf#128006 allow documents inside odbs to be as trusted as their container

Change-Id: Id19d3805ef2e3282c1a8e89dd8edcccbf4ac4db6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95861
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index e9adb01..1961a72 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -1742,7 +1742,12 @@
            // 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;
}