Kaydet (Commit) 131ebdeb authored tarafından Michael Stahl's avatar Michael Stahl

reportdesign: try harder in getDocumentBaseURL()

OReportDefinition is always an embedded object, and may contain embedded
objects itself.  Try to get a base URL for loading the nested embedded
objects from the parent.  We actually need it before setParent() is
called, so search the media descriptor too.

Change-Id: I319127cd5938d4a79778345fce65a4d58bd54877
üst 0fadfd3c
......@@ -2549,7 +2549,23 @@ bool OReportDefinition::isEnableSetModified() const
OUString OReportDefinition::getDocumentBaseURL() const
{
return const_cast<OReportDefinition*>(this)->getURL();
// TODO: should this be in getURL()? not sure...
uno::Reference<frame::XModel> const xParent(
const_cast<OReportDefinition*>(this)->getParent(), uno::UNO_QUERY);
if (xParent.is())
{
return xParent->getURL();
}
::osl::MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed);
for (beans::PropertyValue const& it : m_pImpl->m_aArgs)
{
if (it.Name == "DocumentBaseURL")
return it.Value.get<OUString>();
}
return OUString();
}
uno::Reference< frame::XTitle > OReportDefinition::impl_getTitleHelper_throw()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment