From ac49b8abb40098edb8f650037a2b5742b35c415f Mon Sep 17 00:00:00 2001 From: Lionel Elie Mamane Date: Thu, 4 Dec 2014 19:14:52 +0100 Subject: fdo#65163 reintroduce embedded picture for form components but not for report components (fdo#53001) Change-Id: Ie07e1c2993304d4deb2124e72baa7a326b587918 --- extensions/source/propctrlr/formcomponenthandler.cxx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'extensions') diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index 63688cbd0065..41c955dad78d 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -69,6 +69,7 @@ #include #include #include +#include #include #include @@ -127,6 +128,7 @@ namespace pcr using namespace sdb; using namespace sdbc; using namespace sdbcx; + using namespace report; using namespace container; using namespace ui::dialogs; using namespace inspection; @@ -2775,8 +2777,17 @@ namespace pcr aFileDlg.SetTitle(aStrTrans); // non-linked images ( e.g. those located in the document // stream ) only if document is available - Reference< XModel > xModel( impl_getContextDocument_nothrow() ); - bool bHandleNonLink = false; + bool bHandleNonLink; + { + Reference< XModel > xModel( impl_getContextDocument_nothrow() ); + bHandleNonLink = xModel.is(); + // Not implemented in reports + if (bHandleNonLink) + { + Reference< XReportDefinition > xReportDef( xModel, ::com::sun::star::uno::UNO_QUERY ); + bHandleNonLink = !xReportDef.is(); + } + } Reference< XFilePickerControlAccess > xController(aFileDlg.GetFilePicker(), UNO_QUERY); DBG_ASSERT(xController.is(), "FormComponentPropertyHandler::impl_browseForImage_nothrow: missing the controller interface on the file picker!"); -- cgit