summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2014-12-04 19:14:52 +0100
committerTor Lillqvist <tml@collabora.com>2014-12-15 13:51:52 +0200
commit9a1a108857740bce4c2227c92e7b27344e17a9e9 (patch)
tree312a62fbcf7ebd4b7e18a5478f5022aab388facd
parentRevert "coverity#735424 Logically dead code" (diff)
downloadcore-9a1a108857740bce4c2227c92e7b27344e17a9e9.tar.gz
core-9a1a108857740bce4c2227c92e7b27344e17a9e9.zip
fdo#65163 reintroduce embedded picture for form components
but not for report components (fdo#53001) Change-Id: Ie07e1c2993304d4deb2124e72baa7a326b587918 Reviewed-on: https://gerrit.libreoffice.org/13303 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--extensions/source/propctrlr/formcomponenthandler.cxx15
1 files changed, 13 insertions, 2 deletions
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index f3ae47c69b6a..84dda3288d11 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -69,6 +69,7 @@
#include <com/sun/star/inspection/PropertyLineElement.hpp>
#include <com/sun/star/resource/XStringResourceManager.hpp>
#include <com/sun/star/resource/MissingResourceException.hpp>
+#include <com/sun/star/report/XReportDefinition.hpp>
#include <com/sun/star/graphic/GraphicObject.hpp>
#include <com/sun/star/text/WritingMode2.hpp>
@@ -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!");