Files
libreoffice/svx/source/svdraw/svdoole2.cxx

2238 lines
80 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2000-09-18 16:07:07 +00:00
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2000-09-18 16:07:07 +00:00
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
2000-09-18 16:07:07 +00:00
*
* OpenOffice.org - a multi-platform office productivity suite
2000-09-18 16:07:07 +00:00
*
* This file is part of OpenOffice.org.
2000-09-18 16:07:07 +00:00
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
2000-09-18 16:07:07 +00:00
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
2000-09-18 16:07:07 +00:00
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
2000-09-18 16:07:07 +00:00
*
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
#include <svx/svdoole2.hxx>
2000-09-18 16:07:07 +00:00
#include <com/sun/star/util/XModifyBroadcaster.hpp>
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
#include <com/sun/star/util/XModifiable.hpp>
#include <com/sun/star/embed/EmbedStates.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
#include <com/sun/star/embed/EmbedMisc.hpp>
#include <com/sun/star/embed/Aspects.hpp>
#include <com/sun/star/embed/XInplaceClient.hpp>
#include <com/sun/star/embed/XInplaceObject.hpp>
#include <com/sun/star/embed/XLinkageSupport.hpp>
#include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
#include <com/sun/star/embed/XWindowSupplier.hpp>
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
#include <com/sun/star/document/XEventListener.hpp>
#include <com/sun/star/container/XChild.hpp>
#include "com/sun/star/document/XStorageBasedDocument.hpp"
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
#include <comphelper/processfactory.hxx>
#include <cppuhelper/exc_hlp.hxx>
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
#include <unotools/ucbstreamhelper.hxx>
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
#include <toolkit/helper/vclunohelper.hxx>
#include <toolkit/awt/vclxwindow.hxx>
#include <toolkit/helper/convert.hxx>
#include <svtools/filter.hxx>
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
#include <svtools/embedhlp.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/ipclient.hxx>
#include <sfx2/lnkbase.hxx>
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
#include <tools/stream.hxx>
#include <comphelper/anytostring.hxx>
#include <svx/svdpagv.hxx>
2000-09-18 16:07:07 +00:00
#include <tools/globname.hxx>
#include <vcl/jobset.hxx>
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
#include <sot/clsids.hxx>
2000-09-18 16:07:07 +00:00
#include <sot/formats.hxx>
2010-01-13 22:25:07 +01:00
#include <sfx2/linkmgr.hxx>
2001-06-22 14:46:24 +00:00
#include <svtools/transfer.hxx>
#include <cppuhelper/implbase5.hxx>
2000-09-18 16:07:07 +00:00
#include <svl/solar.hrc>
#include <svl/urihelper.hxx>
#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <svx/svdpagv.hxx>
#include <svx/svdmodel.hxx>
2000-09-18 16:07:07 +00:00
#include "svdglob.hxx" // Stringcache
#include "svdstr.hrc" // Objektname
#include <svx/svdetc.hxx>
#include <svx/svdview.hxx>
2000-09-18 16:07:07 +00:00
#include "unomlstr.hxx"
2008-08-19 22:24:05 +00:00
#include <svtools/chartprettypainter.hxx>
#include <svx/sdr/contact/viewcontactofsdrole2obj.hxx>
CWS-TOOLING: integrate CWS aw059 2008-12-16 16:15:40 +0100 aw r265557 : #i95645# avoid expensive tries to stream in graphic data when stream is at end anyways 2008-12-15 16:49:58 +0100 wg r265512 : i97278 2008-12-12 16:02:15 +0100 aw r265427 : #i95645# new formulation was wrong in two places; thanks go to THB. Thanks! 2008-12-12 15:49:06 +0100 aw r265425 : #i95645# refined formulation of AA on/off constraints for VCLCanvas 2008-12-12 14:51:26 +0100 aw r265420 : #i95645# workaround for DrawTransparent of button hilighting when remote displayed; somehow GDI+ does bad dithering in that case 2008-12-12 13:23:00 +0100 aw r265414 : removed temporary build hack; it made it's way in using the rebase; with SVN the rebase is not based on pure checkouts, but uses local changes. 2008-12-11 19:35:59 +0100 aw r265352 : #i95645# need to switch off AA for WNT and UNX, the VCLCanvas is currently not able to handle AA correctly 2008-12-11 16:05:17 +0100 thb r265327 : #i95645# Changed defaults to on; as for the while svx dialog is not changed 2008-12-10 13:40:38 +0100 aw r265180 : #i95645# changed pixel snap to basegfx::fround 2008-12-10 13:25:45 +0100 aw r265177 : corrected linux warning 2008-12-10 12:28:02 +0100 aw r265167 : #i95645# added support for pixel snap/linux resp. no AA for mac (also pixel snap) when AA is switched off to the basegfx::B2DPolyPolygon painting VCL methods; needed for e.g. selection in SC and SW 2008-12-09 18:44:39 +0100 aw r265136 : #i95645# corrected filled path construction 2008-12-09 18:12:40 +0100 aw r265133 : #i95645# added support for non-AAd transparent paints 2008-12-09 18:11:58 +0100 aw r265132 : #i95645# forced selection without AA 2008-12-09 18:11:29 +0100 aw r265131 : #i88893# smoothed/corrected SW selection rects for transparent selection, forced selection without AA 2008-12-09 15:21:39 +0100 aw r265094 : #i95645# corrected FormControl full drag 2008-12-09 15:11:26 +0100 aw r265093 : #i95645# make gdiplus usages more safe when no line or fill color is selected 2008-12-09 14:30:09 +0100 aw r265085 : #i95645# added GDIPlus support 2008-12-09 13:41:06 +0100 aw r265081 : #i95645# added simple AA using GDIPlis to VCL 2008-12-09 13:40:46 +0100 aw r265080 : #i95645# added simple AA using GDIPlis to VCL 2008-12-09 13:40:29 +0100 aw r265079 : #i95645# added simple AA using GDIPlis to VCL 2008-12-09 13:33:16 +0100 aw r265078 : #i95645# changes to requirements, discussed with FPE 2008-12-08 14:11:39 +0100 aw r264995 : #i95646# added missing extra-wireframe for SdrDragObjOwn implementations when object has no border 2008-12-08 14:11:00 +0100 aw r264994 : #i95646# corrected RenderMarkerArrayPrimitive2D OutDev usage in VclProcessor2D 2008-12-08 12:15:10 +0100 ufi r264987 : aw059 2008-12-08 12:14:40 +0100 ufi r264986 : aw059 2008-12-05 13:16:18 +0100 aw r264905 : CWS-TOOLING: rebase CWS aw059 to trunk@264807 (milestone: DEV300:m37) 2008-12-04 11:29:48 +0100 aw r264827 : #i95645# corrected warning 2008-12-03 14:43:39 +0100 aw r264783 : #i95645# simplified overlay manager and objects to stl vector; added stuff to render some more overlay to primitive renderer to get AA support for WIN32 2008-12-03 14:42:43 +0100 aw r264782 : #i95645# added test for WIN32 for AA if cairo canvas is available 2008-12-03 14:42:13 +0100 aw r264781 : #i95645# removed unused options for writer selection overlay 2008-12-03 14:41:51 +0100 aw r264780 : #i95645# removed unused options for calc overlay 2008-12-03 14:41:21 +0100 aw r264779 : #i95645# small corrections in canvas renderer 2008-12-02 18:32:31 +0100 aw r264730 : #i95646# merged cairo version from THB's CWS cairosource01 2008-12-02 15:25:45 +0100 aw r264705 : #i95645# added helpers for the MarkerArrayPrimitive2D change which support buffered creation of the most used markers 2008-12-02 12:50:01 +0100 aw r264690 : #i95645# added a non-saved method IsAAPossibleOnThisSystem to SvtOptionsDrawinglayer to quickly test if AA can be offered on the system, added buffering of that check. 2008-12-02 12:48:51 +0100 aw r264689 : #i95645# unified MarkerArrayPrimitive2D to work bitmap-orientated, adapted usages. Added buffered preparation for needed markers. Minor adaptions for AA 2008-12-02 12:47:53 +0100 aw r264688 : #i95645# unified MarkerArrayPrimitive2D to no longer work on a enum and types of markers, but to use a BitmapEx (or any other Bitmap object) which will be displayed centerd and in discrete coordinates at positions. Adapted decomposition and all usages. Corrected minor stuff with grid primitive 2008-11-28 17:11:12 +0100 thb r264565 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities 2008-11-28 17:03:27 +0100 thb r264563 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities 2008-11-28 17:00:07 +0100 thb r264562 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities 2008-11-28 16:59:51 +0100 thb r264561 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities 2008-11-27 19:13:42 +0100 aw r264519 : #i95646# optimized getLength() a little bit 2008-11-27 19:12:50 +0100 aw r264518 : #i95646# corrected AA expansion of invalidate frame; buffered discrete distance at OM 2008-11-27 18:50:05 +0100 aw r264516 : #i95646# corrected fit to frame texts for WIN32 2008-11-27 15:32:15 +0100 aw r264496 : #i95646# helplines corrected 2008-11-27 15:32:05 +0100 aw r264495 : #i95646# helplines corrected 2008-11-27 15:01:30 +0100 aw r264492 : #i95646# enable AA support for old polygons, especially to get support for MetaFile output 2008-11-27 14:33:28 +0100 aw r264489 : #i95646# AA support for wireframe overlays 2008-11-27 13:40:54 +0100 aw r264485 : #i95646# added full repaint when AA option changes 2008-11-27 13:29:19 +0100 aw r264482 : #i95646# corrected handling of bSolidDragging config entries 2008-11-27 13:29:08 +0100 aw r264481 : #i95646# corrected handling of bSolidDragging config entries 2008-11-27 11:30:12 +0100 aw r264469 : #i95646# corrected IsAAPossibleOnThisSystem implementation 2008-11-26 16:33:04 +0100 aw r264420 : #i95646# adapted OfaViewTabPage to use disable mechanism for AA and HWAccel 2008-11-26 15:49:19 +0100 aw r264406 : #i95646# added DlgEdObj::getFullDragClone() to create specialized simple SdrUnoObj clones for solid dragging 2008-11-26 15:48:11 +0100 aw r264405 : #i95646# changed derivation of ViewObjectContactOfUnoControl to get a valid isPrimitiveVisible() implementation 2008-11-26 14:11:37 +0100 aw r264385 : #i88893# added new look for selection in sw 2008-11-26 11:32:33 +0100 aw r264360 : corrected compiler warning 2008-11-25 18:46:29 +0100 aw r264328 : #i95646# snapshot with FullDrag clones 2008-11-25 18:46:07 +0100 aw r264327 : #i95646# snapshot with FullDrag clones 2008-11-25 18:45:43 +0100 aw r264326 : #i95646# snapshot with FullDrag clones 2008-11-25 18:19:04 +0100 thb r264324 : #i96585# Added missing inline specifier 2008-11-25 13:16:25 +0100 aw r264285 : #i95646# next snapshot 2008-11-25 13:15:33 +0100 aw r264284 : #i95646# next snapshot 2008-11-25 13:15:12 +0100 aw r264283 : #i95646# next snapshot 2008-11-25 13:14:51 +0100 aw r264282 : #i95646# next snapshot 2008-11-20 13:40:49 +0100 aw r264045 : #i95646# stable snapshot 2008-11-20 13:40:29 +0100 aw r264044 : #i95646# stable snapshot 2008-11-20 13:40:06 +0100 aw r264043 : #i95646# stable snapshot 2008-11-20 13:39:45 +0100 aw r264042 : #i95646# stable snapshot 2008-11-18 11:53:39 +0100 aw r263758 : #i95646# snapshot for linux test build 2008-11-18 11:52:54 +0100 aw r263757 : #i95646# snapshot for linux test build 2008-11-18 11:52:02 +0100 aw r263756 : #i95646# snapshot for linux test build 2008-11-14 18:17:49 +0100 aw r263692 : #i95646# snapshot with most stuff working 2008-11-14 18:14:26 +0100 aw r263691 : #i95646# snapshot with most stuff working 2008-11-14 18:12:50 +0100 aw r263690 : #i95646# snapshot with most stuff working 2008-11-14 18:12:16 +0100 aw r263689 : #i95646# snapshot with most stuff working 2008-11-14 18:11:41 +0100 aw r263688 : #i95646# snapshot with most stuff working 2008-11-07 18:44:22 +0100 aw r263479 : #i95968# better support PrefMapMode; special for MAP_PIXEL was missing 2008-11-05 17:39:15 +0100 aw r263356 : #i95644# #i95645# #i95646# bigger change done, saving for another experiment 2008-11-05 17:39:02 +0100 aw r263355 : #i95644# #i95645# #i95646# bigger change done, saving for another experiment 2008-11-05 12:28:32 +0100 aw r263350 : #i95644# #i95645# #i95646# in-between state before bigger change 2008-11-05 12:27:51 +0100 aw r263349 : #i95644# #i95645# #i95646# in-between state before bigger change 2008-11-05 12:26:58 +0100 aw r263348 : #i95644# #i95645# #i95646# in-between state before bigger change 2008-11-05 12:26:17 +0100 aw r263347 : #i95644# #i95645# #i95646# in-between state before bigger change 2008-11-05 12:25:55 +0100 aw r263346 : #i95644# #i95645# #i95646# in-between state before bigger change
2009-01-05 13:44:12 +00:00
#include <svx/svdograf.hxx>
#include <svx/sdr/properties/oleproperties.hxx>
2000-09-18 16:07:07 +00:00
// #i100710#
#include <svx/xlnclit.hxx>
#include <svx/xbtmpit.hxx>
#include <svx/xflbmtit.hxx>
#include <svx/xflbstit.hxx>
2000-09-18 16:07:07 +00:00
using namespace ::rtl;
using namespace ::com::sun::star;
uno::Reference < beans::XPropertySet > lcl_getFrame_throw(const SdrOle2Obj* _pObject)
{
uno::Reference < beans::XPropertySet > xFrame;
if ( _pObject )
{
uno::Reference< frame::XController> xController = _pObject->GetParentXModel()->getCurrentController();
if ( xController.is() )
{
xFrame.set( xController->getFrame(),uno::UNO_QUERY_THROW);
}
} // if ( _pObject )
return xFrame;
}
class SdrLightEmbeddedClient_Impl : public ::cppu::WeakImplHelper5
< embed::XStateChangeListener
, document::XEventListener
, embed::XInplaceClient
, embed::XEmbeddedClient
, embed::XWindowSupplier
>
{
uno::Reference< awt::XWindow > m_xWindow;
SdrOle2Obj* mpObj;
Fraction m_aScaleWidth;
Fraction m_aScaleHeight;
public:
SdrLightEmbeddedClient_Impl( SdrOle2Obj* pObj );
void Release();
void SetSizeScale( const Fraction& aScaleWidth, const Fraction& aScaleHeight )
{
m_aScaleWidth = aScaleWidth;
m_aScaleHeight = aScaleHeight;
}
Fraction GetScaleWidth() const { return m_aScaleWidth; }
Fraction GetScaleHeight() const { return m_aScaleHeight; }
void setWindow(const uno::Reference< awt::XWindow >& _xWindow);
private:
Rectangle impl_getScaledRect_nothrow() const;
// XStateChangeListener
virtual void SAL_CALL changingState( const ::com::sun::star::lang::EventObject& aEvent, ::sal_Int32 nOldState, ::sal_Int32 nNewState ) throw (::com::sun::star::embed::WrongStateException, ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL stateChanged( const ::com::sun::star::lang::EventObject& aEvent, ::sal_Int32 nOldState, ::sal_Int32 nNewState ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException);
// document::XEventListener
virtual void SAL_CALL notifyEvent( const document::EventObject& aEvent ) throw( uno::RuntimeException );
// XEmbeddedClient
virtual void SAL_CALL saveObject() throw ( embed::ObjectSaveVetoException, uno::Exception, uno::RuntimeException );
virtual void SAL_CALL visibilityChanged( sal_Bool bVisible ) throw ( embed::WrongStateException, uno::RuntimeException );
// XComponentSupplier
virtual uno::Reference< util::XCloseable > SAL_CALL getComponent() throw ( uno::RuntimeException );
// XInplaceClient
virtual sal_Bool SAL_CALL canInplaceActivate() throw ( uno::RuntimeException );
virtual void SAL_CALL activatingInplace() throw ( embed::WrongStateException, uno::RuntimeException );
virtual void SAL_CALL activatingUI() throw ( embed::WrongStateException, uno::RuntimeException );
virtual void SAL_CALL deactivatedInplace() throw ( embed::WrongStateException, uno::RuntimeException );
virtual void SAL_CALL deactivatedUI() throw ( embed::WrongStateException, uno::RuntimeException );
virtual uno::Reference< ::com::sun::star::frame::XLayoutManager > SAL_CALL getLayoutManager() throw ( embed::WrongStateException, uno::RuntimeException );
virtual uno::Reference< frame::XDispatchProvider > SAL_CALL getInplaceDispatchProvider() throw ( embed::WrongStateException, uno::RuntimeException );
virtual awt::Rectangle SAL_CALL getPlacement() throw ( embed::WrongStateException, uno::RuntimeException );
virtual awt::Rectangle SAL_CALL getClipRectangle() throw ( embed::WrongStateException, uno::RuntimeException );
virtual void SAL_CALL translateAccelerators( const uno::Sequence< awt::KeyEvent >& aKeys ) throw ( embed::WrongStateException, uno::RuntimeException );
virtual void SAL_CALL scrollObject( const awt::Size& aOffset ) throw ( embed::WrongStateException, uno::RuntimeException );
virtual void SAL_CALL changedPlacement( const awt::Rectangle& aPosRect ) throw ( embed::WrongStateException, uno::Exception, uno::RuntimeException );
// XWindowSupplier
virtual uno::Reference< awt::XWindow > SAL_CALL getWindow() throw ( uno::RuntimeException );
};
//--------------------------------------------------------------------
SdrLightEmbeddedClient_Impl::SdrLightEmbeddedClient_Impl( SdrOle2Obj* pObj )
: mpObj( pObj )
{
}
Rectangle SdrLightEmbeddedClient_Impl::impl_getScaledRect_nothrow() const
{
Rectangle aLogicRect( mpObj->GetLogicRect() );
// apply scaling to object area and convert to pixels
aLogicRect.SetSize( Size( Fraction( aLogicRect.GetWidth() ) * m_aScaleWidth,
Fraction( aLogicRect.GetHeight() ) * m_aScaleHeight ) );
return aLogicRect;
}
//--------------------------------------------------------------------
void SAL_CALL SdrLightEmbeddedClient_Impl::changingState( const ::com::sun::star::lang::EventObject& /*aEvent*/, ::sal_Int32 /*nOldState*/, ::sal_Int32 /*nNewState*/ ) throw (::com::sun::star::embed::WrongStateException, ::com::sun::star::uno::RuntimeException)
{
}
//--------------------------------------------------------------------
void SdrLightEmbeddedClient_Impl::Release()
{
{
SolarMutexGuard aGuard;
mpObj = NULL;
}
release();
}
//--------------------------------------------------------------------
void SAL_CALL SdrLightEmbeddedClient_Impl::stateChanged( const ::com::sun::star::lang::EventObject& /*aEvent*/, ::sal_Int32 nOldState, ::sal_Int32 nNewState ) throw (::com::sun::star::uno::RuntimeException)
{
SolarMutexGuard aGuard;
if ( mpObj && nOldState == embed::EmbedStates::LOADED && nNewState == embed::EmbedStates::RUNNING )
{
mpObj->ObjectLoaded();
GetSdrGlobalData().GetOLEObjCache().InsertObj(mpObj);
}
else if ( mpObj && nNewState == embed::EmbedStates::LOADED && nOldState == embed::EmbedStates::RUNNING )
{
GetSdrGlobalData().GetOLEObjCache().RemoveObj(mpObj);
}
}
//--------------------------------------------------------------------
void SAL_CALL SdrLightEmbeddedClient_Impl::disposing( const ::com::sun::star::lang::EventObject& /*aEvent*/ ) throw (::com::sun::star::uno::RuntimeException)
{
SolarMutexGuard aGuard;
GetSdrGlobalData().GetOLEObjCache().RemoveObj(mpObj);
}
//--------------------------------------------------------------------
void SAL_CALL SdrLightEmbeddedClient_Impl::notifyEvent( const document::EventObject& aEvent ) throw( uno::RuntimeException )
{
// TODO/LATER: when writer uses this implementation the code could be shared with SfxInPlaceClient_Impl
SolarMutexGuard aGuard;
// the code currently makes sence only in case there is no other client
if ( mpObj && mpObj->GetAspect() != embed::Aspects::MSOLE_ICON && aEvent.EventName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("OnVisAreaChanged"))
&& mpObj->GetObjRef().is() && mpObj->GetObjRef()->getClientSite() == uno::Reference< embed::XEmbeddedClient >( this ) )
{
try
{
MapUnit aContainerMapUnit( MAP_100TH_MM );
uno::Reference< embed::XVisualObject > xParentVis( mpObj->GetParentXModel(), uno::UNO_QUERY );
if ( xParentVis.is() )
aContainerMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xParentVis->getMapUnit( mpObj->GetAspect() ) );
MapUnit aObjMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( mpObj->GetObjRef()->getMapUnit( mpObj->GetAspect() ) );
Rectangle aVisArea;
awt::Size aSz;
try
{
aSz = mpObj->GetObjRef()->getVisualAreaSize( mpObj->GetAspect() );
}
catch( embed::NoVisualAreaSizeException& )
{
OSL_ENSURE( sal_False, "No visual area size!\n" );
aSz.Width = 5000;
aSz.Height = 5000;
}
catch( uno::Exception& )
{
OSL_ENSURE( sal_False, "Unexpected exception!\n" );
aSz.Width = 5000;
aSz.Height = 5000;
}
aVisArea.SetSize( Size( aSz.Width, aSz.Height ) );
aVisArea = OutputDevice::LogicToLogic( aVisArea, aObjMapUnit, aContainerMapUnit );
Size aScaledSize( static_cast< long >( m_aScaleWidth * Fraction( aVisArea.GetWidth() ) ),
static_cast< long >( m_aScaleHeight * Fraction( aVisArea.GetHeight() ) ) );
Rectangle aLogicRect( mpObj->GetLogicRect() );
// react to the change if the difference is bigger than one pixel
Size aPixelDiff =
Application::GetDefaultDevice()->LogicToPixel(
Size( aLogicRect.GetWidth() - aScaledSize.Width(),
aLogicRect.GetHeight() - aScaledSize.Height() ),
aContainerMapUnit );
if( aPixelDiff.Width() || aPixelDiff.Height() )
{
mpObj->SetLogicRect( Rectangle( aLogicRect.TopLeft(), aScaledSize ) );
mpObj->BroadcastObjectChange();
}
else
mpObj->ActionChanged();
}
catch( uno::Exception& )
{
OSL_ENSURE( sal_False, "Unexpected exception!\n" );
}
}
}
//--------------------------------------------------------------------
void SAL_CALL SdrLightEmbeddedClient_Impl::saveObject()
throw ( embed::ObjectSaveVetoException,
uno::Exception,
uno::RuntimeException )
{
// TODO/LATER: when writer uses this implementation the code could be shared with SfxInPlaceClient_Impl
uno::Reference< embed::XCommonEmbedPersist > xPersist;
uno::Reference< util::XModifiable > xModifiable;
{
SolarMutexGuard aGuard;
if ( !mpObj )
throw embed::ObjectSaveVetoException();
// the common persistance is supported by objects and links
xPersist = uno::Reference< embed::XCommonEmbedPersist >( mpObj->GetObjRef(), uno::UNO_QUERY_THROW );
xModifiable = uno::Reference< util::XModifiable >( mpObj->GetParentXModel(), uno::UNO_QUERY );
}
xPersist->storeOwn();
if ( xModifiable.is() )
xModifiable->setModified( sal_True );
}
//--------------------------------------------------------------------
void SAL_CALL SdrLightEmbeddedClient_Impl::visibilityChanged( sal_Bool /*bVisible*/ )
throw ( embed::WrongStateException,
uno::RuntimeException )
{
// nothing to do currently
// TODO/LATER: when writer uses this implementation the code could be shared with SfxInPlaceClient_Impl
if ( mpObj )
{
Rectangle aLogicRect( mpObj->GetLogicRect() );
Size aLogicSize( aLogicRect.GetWidth(), aLogicRect.GetHeight() );
if( mpObj->IsChart() )
{
//charts never should be stretched see #i84323# for example
mpObj->SetLogicRect( Rectangle( aLogicRect.TopLeft(), aLogicSize ) );
mpObj->BroadcastObjectChange();
} // if( mpObj->IsChart() )
}
}
//--------------------------------------------------------------------
uno::Reference< util::XCloseable > SAL_CALL SdrLightEmbeddedClient_Impl::getComponent()
throw ( uno::RuntimeException )
{
uno::Reference< util::XCloseable > xResult;
SolarMutexGuard aGuard;
if ( mpObj )
xResult = uno::Reference< util::XCloseable >( mpObj->GetParentXModel(), uno::UNO_QUERY );
return xResult;
}
// XInplaceClient
//--------------------------------------------------------------------
sal_Bool SAL_CALL SdrLightEmbeddedClient_Impl::canInplaceActivate()
throw ( uno::RuntimeException )
{
sal_Bool bRet = sal_False;
SolarMutexGuard aGuard;
if ( mpObj )
{
uno::Reference< embed::XEmbeddedObject > xObject = mpObj->GetObjRef();
if ( !xObject.is() )
throw uno::RuntimeException();
// we don't want to switch directly from outplace to inplace mode
bRet = !( xObject->getCurrentState() == embed::EmbedStates::ACTIVE || mpObj->GetAspect() == embed::Aspects::MSOLE_ICON );
} // if ( mpObj )
return bRet;
}
//--------------------------------------------------------------------
void SAL_CALL SdrLightEmbeddedClient_Impl::activatingInplace()
throw ( embed::WrongStateException,
uno::RuntimeException )
{
}
//--------------------------------------------------------------------
void SAL_CALL SdrLightEmbeddedClient_Impl::activatingUI()
throw ( embed::WrongStateException,
uno::RuntimeException )
{
SolarMutexGuard aGuard;
uno::Reference < beans::XPropertySet > xFrame( lcl_getFrame_throw(mpObj));
uno::Reference < frame::XFrame > xOwnFrame( xFrame,uno::UNO_QUERY);
uno::Reference < frame::XFramesSupplier > xParentFrame( xOwnFrame->getCreator(), uno::UNO_QUERY );
if ( xParentFrame.is() )
xParentFrame->setActiveFrame( xOwnFrame );
OLEObjCache& rObjCache = GetSdrGlobalData().GetOLEObjCache();
const ULONG nCount = rObjCache.Count();
for(sal_Int32 i = nCount-1 ; i >= 0;--i)
{
SdrOle2Obj* pObj = reinterpret_cast<SdrOle2Obj*>(rObjCache.GetObject(i));
if ( pObj != mpObj )
{
// only deactivate ole objects which belongs to the same frame
if ( xFrame == lcl_getFrame_throw(pObj) )
{
uno::Reference< embed::XEmbeddedObject > xObject = pObj->GetObjRef();
try
{
if ( xObject->getStatus( pObj->GetAspect() ) & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE )
xObject->changeState( embed::EmbedStates::INPLACE_ACTIVE );
else
{
// the links should not stay in running state for long time because of locking
uno::Reference< embed::XLinkageSupport > xLink( xObject, uno::UNO_QUERY );
if ( xLink.is() && xLink->isLink() )
xObject->changeState( embed::EmbedStates::LOADED );
else
xObject->changeState( embed::EmbedStates::RUNNING );
}
}
catch (com::sun::star::uno::Exception& )
{}
}
}
} // for(sal_Int32 i = nCount-1 ; i >= 0;--i)
//m_pClient->GetViewShell()->UIActivating( m_pClient );
}
//--------------------------------------------------------------------
void SAL_CALL SdrLightEmbeddedClient_Impl::deactivatedInplace()
throw ( embed::WrongStateException,
uno::RuntimeException )
{
}
//--------------------------------------------------------------------
void SAL_CALL SdrLightEmbeddedClient_Impl::deactivatedUI()
throw ( embed::WrongStateException,
uno::RuntimeException )
{
SolarMutexGuard aGuard;
com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager > xLayoutManager(getLayoutManager());
if ( xLayoutManager.is() )
{
const static rtl::OUString aMenuBarURL( RTL_CONSTASCII_USTRINGPARAM( "private:resource/menubar/menubar" ));
if ( !xLayoutManager->isElementVisible( aMenuBarURL ) )
xLayoutManager->createElement( aMenuBarURL );
}
}
//--------------------------------------------------------------------
uno::Reference< ::com::sun::star::frame::XLayoutManager > SAL_CALL SdrLightEmbeddedClient_Impl::getLayoutManager()
throw ( embed::WrongStateException,
uno::RuntimeException )
{
uno::Reference< ::com::sun::star::frame::XLayoutManager > xMan;
SolarMutexGuard aGuard;
uno::Reference < beans::XPropertySet > xFrame( lcl_getFrame_throw(mpObj));
try
{
xMan.set(xFrame->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LayoutManager")) ),uno::UNO_QUERY);
}
catch ( uno::Exception& )
{
throw uno::RuntimeException();
}
return xMan;
}
//--------------------------------------------------------------------
uno::Reference< frame::XDispatchProvider > SAL_CALL SdrLightEmbeddedClient_Impl::getInplaceDispatchProvider()
throw ( embed::WrongStateException,
uno::RuntimeException )
{
SolarMutexGuard aGuard;
return uno::Reference < frame::XDispatchProvider >( lcl_getFrame_throw(mpObj), uno::UNO_QUERY_THROW );
}
//--------------------------------------------------------------------
awt::Rectangle SAL_CALL SdrLightEmbeddedClient_Impl::getPlacement()
throw ( embed::WrongStateException,
uno::RuntimeException )
{
SolarMutexGuard aGuard;
if ( !mpObj )
throw uno::RuntimeException();
Rectangle aLogicRect = impl_getScaledRect_nothrow();
MapUnit aContainerMapUnit( MAP_100TH_MM );
uno::Reference< embed::XVisualObject > xParentVis( mpObj->GetParentXModel(), uno::UNO_QUERY );
if ( xParentVis.is() )
aContainerMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xParentVis->getMapUnit( mpObj->GetAspect() ) );
aLogicRect = Application::GetDefaultDevice()->LogicToPixel(aLogicRect,aContainerMapUnit);
return AWTRectangle( aLogicRect );
}
//--------------------------------------------------------------------
awt::Rectangle SAL_CALL SdrLightEmbeddedClient_Impl::getClipRectangle()
throw ( embed::WrongStateException,
uno::RuntimeException )
{
return getPlacement();
}
//--------------------------------------------------------------------
void SAL_CALL SdrLightEmbeddedClient_Impl::translateAccelerators( const uno::Sequence< awt::KeyEvent >& /*aKeys*/ )
throw ( embed::WrongStateException,
uno::RuntimeException )
{
}
//--------------------------------------------------------------------
void SAL_CALL SdrLightEmbeddedClient_Impl::scrollObject( const awt::Size& /*aOffset*/ )
throw ( embed::WrongStateException,
uno::RuntimeException )
{
}
//--------------------------------------------------------------------
void SAL_CALL SdrLightEmbeddedClient_Impl::changedPlacement( const awt::Rectangle& aPosRect )
throw ( embed::WrongStateException,
uno::Exception,
uno::RuntimeException )
{
SolarMutexGuard aGuard;
if ( !mpObj )
throw uno::RuntimeException();
uno::Reference< embed::XInplaceObject > xInplace( mpObj->GetObjRef(), uno::UNO_QUERY );
if ( !xInplace.is() )
throw uno::RuntimeException();
// check if the change is at least one pixel in size
awt::Rectangle aOldRect = getPlacement();
Rectangle aNewPixelRect = VCLRectangle( aPosRect );
Rectangle aOldPixelRect = VCLRectangle( aOldRect );
if ( aOldPixelRect == aNewPixelRect )
// nothing has changed
return;
// new scaled object area
MapUnit aContainerMapUnit( MAP_100TH_MM );
uno::Reference< embed::XVisualObject > xParentVis( mpObj->GetParentXModel(), uno::UNO_QUERY );
if ( xParentVis.is() )
aContainerMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xParentVis->getMapUnit( mpObj->GetAspect() ) );
Rectangle aNewLogicRect = Application::GetDefaultDevice()->PixelToLogic(aNewPixelRect,aContainerMapUnit);
Rectangle aLogicRect = impl_getScaledRect_nothrow();
if ( aNewLogicRect != aLogicRect )
{
// the calculation of the object area has not changed the object size
// it should be done here then
//SfxBooleanFlagGuard aGuard( m_bResizeNoScale, sal_True );
// new size of the object area without scaling
Size aNewObjSize( Fraction( aNewLogicRect.GetWidth() ) / m_aScaleWidth,
Fraction( aNewLogicRect.GetHeight() ) / m_aScaleHeight );
// now remove scaling from new placement and keep this a the new object area
aNewLogicRect.SetSize( aNewObjSize );
// react to the change if the difference is bigger than one pixel
Size aPixelDiff =
Application::GetDefaultDevice()->LogicToPixel(
Size( aLogicRect.GetWidth() - aNewObjSize.Width(),
aLogicRect.GetHeight() - aNewObjSize.Height() ),
aContainerMapUnit );
if( aPixelDiff.Width() || aPixelDiff.Height() )
{
mpObj->SetLogicRect( Rectangle( aLogicRect.TopLeft(), aNewObjSize ) );
mpObj->BroadcastObjectChange();
}
else
mpObj->ActionChanged();
// let the window size be recalculated
//SizeHasChanged(); // TODO: OJ
}
}
// XWindowSupplier
//--------------------------------------------------------------------
uno::Reference< awt::XWindow > SAL_CALL SdrLightEmbeddedClient_Impl::getWindow()
throw ( uno::RuntimeException )
{
SolarMutexGuard aGuard;
uno::Reference< awt::XWindow > xCurrent = m_xWindow;
if ( !xCurrent.is() )
{
if ( !mpObj )
throw uno::RuntimeException();
uno::Reference< frame::XFrame> xFrame(lcl_getFrame_throw(mpObj),uno::UNO_QUERY_THROW);
xCurrent = xFrame->getComponentWindow();
} // if ( !xCurrent.is() )
return xCurrent;
}
void SdrLightEmbeddedClient_Impl::setWindow(const uno::Reference< awt::XWindow >& _xWindow)
{
m_xWindow = _xWindow;
}
2000-09-18 16:07:07 +00:00
////////////////////////////////////////////////////////////////////////////////////////////////////
class SdrEmbedObjectLink : public sfx2::SvBaseLink
{
SdrOle2Obj* pObj;
public:
SdrEmbedObjectLink(SdrOle2Obj* pObj);
virtual ~SdrEmbedObjectLink();
virtual void Closed();
virtual void DataChanged( const String& rMimeType,
const ::com::sun::star::uno::Any & rValue );
sal_Bool Connect() { return GetRealObject() != NULL; }
};
// -----------------------------------------------------------------------------
SdrEmbedObjectLink::SdrEmbedObjectLink(SdrOle2Obj* pObject):
::sfx2::SvBaseLink( ::sfx2::LINKUPDATE_ONCALL, SOT_FORMATSTR_ID_SVXB ),
pObj(pObject)
{
SetSynchron( FALSE );
}
// -----------------------------------------------------------------------------
SdrEmbedObjectLink::~SdrEmbedObjectLink()
{
}
// -----------------------------------------------------------------------------
void SdrEmbedObjectLink::DataChanged( const String& /*rMimeType*/,
const ::com::sun::star::uno::Any & /*rValue*/ )
{
if ( !pObj->UpdateLinkURL_Impl() )
{
// the link URL was not changed
uno::Reference< embed::XEmbeddedObject > xObject = pObj->GetObjRef();
OSL_ENSURE( xObject.is(), "The object must exist always!\n" );
if ( xObject.is() )
{
// let the object reload the link
// TODO/LATER: reload call could be used for this case
try
{
sal_Int32 nState = xObject->getCurrentState();
if ( nState != embed::EmbedStates::LOADED )
{
// in some cases the linked file probably is not locked so it could be changed
xObject->changeState( embed::EmbedStates::LOADED );
xObject->changeState( nState );
}
}
catch ( uno::Exception& )
{
}
}
}
pObj->GetNewReplacement();
pObj->SetChanged();
}
// -----------------------------------------------------------------------------
void SdrEmbedObjectLink::Closed()
{
pObj->BreakFileLink_Impl();
SvBaseLink::Closed();
}
////////////////////////////////////////////////////////////////////////////////////////////////////
class SdrOle2ObjImpl
{
public:
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
// TODO/LATER: do we really need this pointer?
GraphicObject* pGraphicObject;
String aPersistName; // name of object in persist
SdrLightEmbeddedClient_Impl* pLightClient; // must be registered as client only using AddOwnLightClient() call
// #107645#
// New local var to avoid repeated loading if load of OLE2 fails
sal_Bool mbLoadingOLEObjectFailed;
sal_Bool mbConnected;
SdrEmbedObjectLink* mpObjectLink;
String maLinkURL;
SdrOle2ObjImpl()
: pGraphicObject( NULL )
2011-01-05 12:15:24 +01:00
, pLightClient ( NULL )
// #107645#
// init to start situation, loading did not fail
, mbLoadingOLEObjectFailed( sal_False )
, mbConnected( sal_False )
, mpObjectLink( NULL )
{
}
};
2000-09-18 16:07:07 +00:00
////////////////////////////////////////////////////////////////////////////////////////////////////
// Predicate determining whether the given OLE is an internal math
// object
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
static bool ImplIsMathObj( const uno::Reference < embed::XEmbeddedObject >& rObjRef )
{
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
if ( !rObjRef.is() )
return false;
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
SvGlobalName aClassName( rObjRef->getClassID() );
if( aClassName == SvGlobalName(SO3_SM_CLASSID_30) ||
aClassName == SvGlobalName(SO3_SM_CLASSID_40) ||
aClassName == SvGlobalName(SO3_SM_CLASSID_50) ||
aClassName == SvGlobalName(SO3_SM_CLASSID_60) ||
aClassName == SvGlobalName(SO3_SM_CLASSID) )
{
return true;
}
else
{
return false;
}
}
//////////////////////////////////////////////////////////////////////////////
// BaseProperties section
sdr::properties::BaseProperties* SdrOle2Obj::CreateObjectSpecificProperties()
{
return new sdr::properties::OleProperties(*this);
}
2008-08-19 22:24:05 +00:00
//////////////////////////////////////////////////////////////////////////////
// DrawContact section
sdr::contact::ViewContact* SdrOle2Obj::CreateObjectSpecificViewContact()
{
return new sdr::contact::ViewContactOfSdrOle2Obj(*this);
}
// -----------------------------------------------------------------------------
2000-09-18 16:07:07 +00:00
TYPEINIT1(SdrOle2Obj,SdrRectObj);
DBG_NAME(SdrOle2Obj)
2010-10-05 07:57:54 -05:00
SdrOle2Obj::SdrOle2Obj(bool bFrame_) : m_bTypeAsked(false)
,m_bChart(false)
2000-09-18 16:07:07 +00:00
{
DBG_CTOR( SdrOle2Obj,NULL);
bInDestruction = FALSE;
2000-09-18 16:07:07 +00:00
Init();
bFrame=bFrame_;
}
// -----------------------------------------------------------------------------
2010-10-05 07:57:54 -05:00
SdrOle2Obj::SdrOle2Obj( const svt::EmbeddedObjectRef& rNewObjRef, bool bFrame_)
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
: xObjRef( rNewObjRef )
, m_bTypeAsked(false)
, m_bChart(false)
2000-09-18 16:07:07 +00:00
{
DBG_CTOR( SdrOle2Obj,NULL);
bInDestruction = FALSE;
2000-09-18 16:07:07 +00:00
Init();
bFrame=bFrame_;
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
if ( xObjRef.is() && (xObjRef->getStatus( GetAspect() ) & embed::EmbedMisc::EMBED_NEVERRESIZE ) )
2000-09-18 16:07:07 +00:00
SetResizeProtect(TRUE);
// #108759# For math objects, set closed state to transparent
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
if( ImplIsMathObj( xObjRef.GetObject() ) )
SetClosedObj( false );
2000-09-18 16:07:07 +00:00
}
// -----------------------------------------------------------------------------
2010-10-05 07:57:54 -05:00
SdrOle2Obj::SdrOle2Obj( const svt::EmbeddedObjectRef& rNewObjRef, const XubString& rNewObjName, bool bFrame_)
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
: xObjRef( rNewObjRef )
, m_bTypeAsked(false)
, m_bChart(false)
2000-09-18 16:07:07 +00:00
{
DBG_CTOR( SdrOle2Obj,NULL);
bInDestruction = FALSE;
2000-09-18 16:07:07 +00:00
Init();
mpImpl->aPersistName = rNewObjName;
2000-09-18 16:07:07 +00:00
bFrame=bFrame_;
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
if ( xObjRef.is() && (xObjRef->getStatus( GetAspect() ) & embed::EmbedMisc::EMBED_NEVERRESIZE ) )
2000-09-18 16:07:07 +00:00
SetResizeProtect(TRUE);
// #108759# For math objects, set closed state to transparent
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
if( ImplIsMathObj( xObjRef.GetObject() ) )
SetClosedObj( false );
2000-09-18 16:07:07 +00:00
}
// -----------------------------------------------------------------------------
2010-10-05 07:57:54 -05:00
SdrOle2Obj::SdrOle2Obj( const svt::EmbeddedObjectRef& rNewObjRef, const XubString& rNewObjName, const Rectangle& rNewRect, bool bFrame_)
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
: SdrRectObj(rNewRect)
, xObjRef( rNewObjRef )
, m_bTypeAsked(false)
, m_bChart(false)
2000-09-18 16:07:07 +00:00
{
DBG_CTOR( SdrOle2Obj,NULL);
bInDestruction = FALSE;
2000-09-18 16:07:07 +00:00
Init();
mpImpl->aPersistName = rNewObjName;
2000-09-18 16:07:07 +00:00
bFrame=bFrame_;
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
if ( xObjRef.is() && (xObjRef->getStatus( GetAspect() ) & embed::EmbedMisc::EMBED_NEVERRESIZE ) )
2000-09-18 16:07:07 +00:00
SetResizeProtect(TRUE);
// #108759# For math objects, set closed state to transparent
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
if( ImplIsMathObj( xObjRef.GetObject() ) )
SetClosedObj( false );
2000-09-18 16:07:07 +00:00
}
// -----------------------------------------------------------------------------
2000-09-18 16:07:07 +00:00
void SdrOle2Obj::Init()
{
mpImpl = new SdrOle2ObjImpl;
2000-09-18 16:07:07 +00:00
pModifyListener = NULL;
pGraphic=NULL;
mpImpl->pGraphicObject=NULL;
mpImpl->pLightClient = 0;
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
xObjRef.Lock( TRUE );
2000-09-18 16:07:07 +00:00
}
// -----------------------------------------------------------------------------
2000-09-18 16:07:07 +00:00
SdrOle2Obj::~SdrOle2Obj()
{
DBG_DTOR( SdrOle2Obj,NULL);
bInDestruction = TRUE;
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
if ( mpImpl->mbConnected )
Disconnect();
2000-09-18 16:07:07 +00:00
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
if( pGraphic!=NULL )
2000-09-18 16:07:07 +00:00
delete pGraphic;
if(mpImpl->pGraphicObject!=NULL)
delete mpImpl->pGraphicObject;
2000-09-18 16:07:07 +00:00
if(pModifyListener)
{
pModifyListener->invalidate();
pModifyListener->release();
}
DisconnectFileLink_Impl();
if ( mpImpl->pLightClient )
{
mpImpl->pLightClient->Release();
mpImpl->pLightClient = NULL;
}
delete mpImpl;
2000-09-18 16:07:07 +00:00
}
// -----------------------------------------------------------------------------
void SdrOle2Obj::SetAspect( sal_Int64 nAspect )
{
xObjRef.SetViewAspect( nAspect );
}
// -----------------------------------------------------------------------------
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
void SdrOle2Obj::SetGraphic_Impl(const Graphic* pGrf)
2000-09-18 16:07:07 +00:00
{
if ( pGraphic )
{
delete pGraphic;
pGraphic = NULL;
delete mpImpl->pGraphicObject;
mpImpl->pGraphicObject = NULL;
2000-09-18 16:07:07 +00:00
}
if (pGrf!=NULL)
{
2000-09-18 16:07:07 +00:00
pGraphic = new Graphic(*pGrf);
mpImpl->pGraphicObject = new GraphicObject( *pGraphic );
}
2000-09-18 16:07:07 +00:00
SetChanged();
BroadcastObjectChange();
//if ( ppObjRef->Is() && pGrf )
// BroadcastObjectChange();
2000-09-18 16:07:07 +00:00
}
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
void SdrOle2Obj::SetGraphic(const Graphic* pGrf)
{
// only for setting a preview graphic
SetGraphic_Impl( pGrf );
}
// -----------------------------------------------------------------------------
2010-10-05 07:57:54 -05:00
bool SdrOle2Obj::IsEmpty() const
2000-09-18 16:07:07 +00:00
{
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
return !(xObjRef.is());
2000-09-18 16:07:07 +00:00
}
// -----------------------------------------------------------------------------
2001-04-12 09:06:03 +00:00
void SdrOle2Obj::Connect()
2000-09-18 16:07:07 +00:00
{
if( IsEmptyPresObj() )
return;
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
if( mpImpl->mbConnected )
2000-09-18 16:07:07 +00:00
{
// mba: currently there are situations where it seems to be unavoidable to have multiple connects
// changing this would need a larger code rewrite, so for now I remove the assertion
// DBG_ERROR("Connect() called on connected object!");
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
return;
}
2001-04-12 09:06:03 +00:00
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
Connect_Impl();
AddListeners_Impl();
}
2000-09-18 16:07:07 +00:00
// -----------------------------------------------------------------------------
sal_Bool SdrOle2Obj::UpdateLinkURL_Impl()
{
sal_Bool bResult = sal_False;
if ( mpImpl->mpObjectLink )
{
2010-01-13 22:25:07 +01:00
sfx2::LinkManager* pLinkManager = pModel ? pModel->GetLinkManager() : NULL;
if ( pLinkManager )
{
String aNewLinkURL;
pLinkManager->GetDisplayNames( mpImpl->mpObjectLink, 0, &aNewLinkURL, 0, 0 );
if ( !aNewLinkURL.EqualsIgnoreCaseAscii( mpImpl->maLinkURL ) )
{
const_cast<SdrOle2Obj*>(this)->GetObjRef_Impl();
uno::Reference< embed::XCommonEmbedPersist > xPersObj( xObjRef.GetObject(), uno::UNO_QUERY );
OSL_ENSURE( xPersObj.is(), "The object must exist!\n" );
if ( xPersObj.is() )
{
try
{
sal_Int32 nCurState = xObjRef->getCurrentState();
if ( nCurState != embed::EmbedStates::LOADED )
xObjRef->changeState( embed::EmbedStates::LOADED );
// TODO/LATER: there should be possible to get current mediadescriptor settings from the object
uno::Sequence< beans::PropertyValue > aArgs( 1 );
aArgs[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" ) );
aArgs[0].Value <<= ::rtl::OUString( aNewLinkURL );
xPersObj->reload( aArgs, uno::Sequence< beans::PropertyValue >() );
mpImpl->maLinkURL = aNewLinkURL;
bResult = sal_True;
if ( nCurState != embed::EmbedStates::LOADED )
xObjRef->changeState( nCurState );
}
catch( ::com::sun::star::uno::Exception& e )
{
(void)e;
DBG_ERROR(
(OString("SdrOle2Obj::UpdateLinkURL_Impl(), "
"exception caught: ") +
rtl::OUStringToOString(
comphelper::anyToString( cppu::getCaughtException() ),
RTL_TEXTENCODING_UTF8 )).getStr() );
}
}
if ( !bResult )
{
// TODO/LATER: return the old name to the link manager, is it possible?
}
}
}
}
return bResult;
}
// -----------------------------------------------------------------------------
void SdrOle2Obj::BreakFileLink_Impl()
{
uno::Reference<document::XStorageBasedDocument> xDoc;
if ( pModel )
xDoc.set( pModel->getUnoModel(),uno::UNO_QUERY);
if ( xDoc.is() )
{
uno::Reference< embed::XStorage > xStorage = xDoc->getDocumentStorage();
if ( xStorage.is() )
{
try
{
uno::Reference< embed::XLinkageSupport > xLinkSupport( xObjRef.GetObject(), uno::UNO_QUERY_THROW );
xLinkSupport->breakLink( xStorage, mpImpl->aPersistName );
DisconnectFileLink_Impl();
mpImpl->maLinkURL = String();
}
catch( ::com::sun::star::uno::Exception& e )
{
(void)e;
DBG_ERROR(
(OString("SdrOle2Obj::BreakFileLink_Impl(), "
"exception caught: ") +
rtl::OUStringToOString(
comphelper::anyToString( cppu::getCaughtException() ),
RTL_TEXTENCODING_UTF8 )).getStr() );
}
}
}
}
// -----------------------------------------------------------------------------
void SdrOle2Obj::DisconnectFileLink_Impl()
{
2010-01-13 22:25:07 +01:00
sfx2::LinkManager* pLinkManager = pModel ? pModel->GetLinkManager() : NULL;
if ( pLinkManager && mpImpl->mpObjectLink )
{
pLinkManager->Remove( mpImpl->mpObjectLink );
mpImpl->mpObjectLink = NULL;
}
}
// -----------------------------------------------------------------------------
void SdrOle2Obj::CheckFileLink_Impl()
{
if ( pModel && xObjRef.GetObject().is() && !mpImpl->mpObjectLink )
{
try
{
uno::Reference< embed::XLinkageSupport > xLinkSupport( xObjRef.GetObject(), uno::UNO_QUERY );
if ( xLinkSupport.is() && xLinkSupport->isLink() )
{
String aLinkURL = xLinkSupport->getLinkURL();
if ( aLinkURL.Len() )
{
// this is a file link so the model link manager should handle it
2010-01-13 22:25:07 +01:00
sfx2::LinkManager* pLinkManager = pModel->GetLinkManager();
if ( pLinkManager )
{
mpImpl->mpObjectLink = new SdrEmbedObjectLink( this );
mpImpl->maLinkURL = aLinkURL;
pLinkManager->InsertFileLink( *mpImpl->mpObjectLink, OBJECT_CLIENT_OLE, aLinkURL, NULL, NULL );
mpImpl->mpObjectLink->Connect();
}
}
}
}
catch( ::com::sun::star::uno::Exception& e )
{
(void)e;
DBG_ERROR(
(OString("SdrOle2Obj::CheckFileLink_Impl(), "
"exception caught: ") +
rtl::OUStringToOString(
comphelper::anyToString( cppu::getCaughtException() ),
RTL_TEXTENCODING_UTF8 )).getStr() );
}
}
}
// -----------------------------------------------------------------------------
void SdrOle2Obj::Reconnect_Impl()
{
DBG_ASSERT( mpImpl->mbConnected, "Assigned unconnected object?!" );
Connect_Impl();
}
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
void SdrOle2Obj::Connect_Impl()
{
if( pModel && mpImpl->aPersistName.Len() )
{
try
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
{
::comphelper::IEmbeddedHelper* pPers = pModel->GetPersist();
if ( pPers )
2000-09-18 16:07:07 +00:00
{
comphelper::EmbeddedObjectContainer& rContainer = pPers->getEmbeddedObjectContainer();
if ( !rContainer.HasEmbeddedObject( mpImpl->aPersistName )
|| ( xObjRef.is() && !rContainer.HasEmbeddedObject( xObjRef.GetObject() ) ) )
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
{
// object not known to container document
// No object -> disaster!
DBG_ASSERT( xObjRef.is(), "No object in connect!");
if ( xObjRef.is() )
{
// object came from the outside, now add it to the container
::rtl::OUString aTmp;
rContainer.InsertEmbeddedObject( xObjRef.GetObject(), aTmp );
mpImpl->aPersistName = aTmp;
}
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
}
else if ( !xObjRef.is() )
{
xObjRef.Assign( rContainer.GetEmbeddedObject( mpImpl->aPersistName ), xObjRef.GetViewAspect() );
m_bTypeAsked = false;
}
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
if ( xObjRef.GetObject().is() )
{
xObjRef.AssignToContainer( &rContainer, mpImpl->aPersistName );
mpImpl->mbConnected = true;
xObjRef.Lock( TRUE );
}
2000-09-18 16:07:07 +00:00
}
if ( xObjRef.is() )
{
if ( !mpImpl->pLightClient )
{
mpImpl->pLightClient = new SdrLightEmbeddedClient_Impl( this );
mpImpl->pLightClient->acquire();
}
xObjRef->addStateChangeListener( mpImpl->pLightClient );
xObjRef->addEventListener( uno::Reference< document::XEventListener >( mpImpl->pLightClient ) );
if ( xObjRef->getCurrentState() != embed::EmbedStates::LOADED )
GetSdrGlobalData().GetOLEObjCache().InsertObj(this);
CheckFileLink_Impl();
uno::Reference< container::XChild > xChild( xObjRef.GetObject(), uno::UNO_QUERY );
if( xChild.is() )
{
uno::Reference< uno::XInterface > xParent( pModel->getUnoModel());
if( xParent.is())
xChild->setParent( pModel->getUnoModel() );
}
}
}
catch( ::com::sun::star::uno::Exception& e )
{
(void)e;
DBG_ERROR(
(OString("SdrOle2Obj::Connect_Impl(), "
"exception caught: ") +
rtl::OUStringToOString(
comphelper::anyToString( cppu::getCaughtException() ),
RTL_TEXTENCODING_UTF8 )).getStr() );
}
2000-09-18 16:07:07 +00:00
}
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
//TODO/LATER: wait for definition of MiscStatus RESIZEONPRINTERCHANGE
//if ( xObjRef.is() && (*ppObjRef)->GetMiscStatus() & SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE )
2000-09-18 16:07:07 +00:00
{
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
//TODO/LATER: needs a new handling for OnPrinterChanged
/*
2000-09-18 16:07:07 +00:00
if (pModel && pModel->GetRefDevice() &&
pModel->GetRefDevice()->GetOutDevType() == OUTDEV_PRINTER)
{
// Kein RefDevice oder RefDevice kein Printer
BOOL bModified = (*ppObjRef)->IsModified();
Printer* pPrinter = (Printer*) pModel->GetRefDevice();
(*ppObjRef)->OnDocumentPrinterChanged( pPrinter );
(*ppObjRef)->SetModified( bModified );
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
}*/
2000-09-18 16:07:07 +00:00
}
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
}
2000-09-18 16:07:07 +00:00
void SdrOle2Obj::ObjectLoaded()
{
AddListeners_Impl();
}
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
void SdrOle2Obj::AddListeners_Impl()
{
if( xObjRef.is() && xObjRef->getCurrentState() != embed::EmbedStates::LOADED )
2000-09-18 16:07:07 +00:00
{
// register modify listener
if( !pModifyListener )
2000-09-18 16:07:07 +00:00
{
((SdrOle2Obj*)this)->pModifyListener = new SvxUnoShapeModifyListener( (SdrOle2Obj*)this );
pModifyListener->acquire();
}
uno::Reference< util::XModifyBroadcaster > xBC( getXModel(), uno::UNO_QUERY );
if( xBC.is() && pModifyListener )
{
uno::Reference< util::XModifyListener > xListener( pModifyListener );
xBC->addModifyListener( xListener );
}
}
}
// -----------------------------------------------------------------------------
2001-04-12 09:06:03 +00:00
void SdrOle2Obj::Disconnect()
2000-09-18 16:07:07 +00:00
{
if( IsEmptyPresObj() )
return;
if( !mpImpl->mbConnected )
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
{
DBG_ERROR("Disconnect() called on disconnected object!");
return;
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
}
RemoveListeners_Impl();
Disconnect_Impl();
}
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
void SdrOle2Obj::RemoveListeners_Impl()
{
if( xObjRef.is() && mpImpl->aPersistName.Len() )
2000-09-18 16:07:07 +00:00
{
try
2000-09-18 16:07:07 +00:00
{
sal_Int32 nState = xObjRef->getCurrentState();
if ( nState != embed::EmbedStates::LOADED )
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
{
uno::Reference< util::XModifyBroadcaster > xBC( getXModel(), uno::UNO_QUERY );
if( xBC.is() && pModifyListener )
{
uno::Reference< util::XModifyListener > xListener( pModifyListener );
xBC->removeModifyListener( xListener );
}
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
}
2000-09-18 16:07:07 +00:00
}
catch( ::com::sun::star::uno::Exception& e )
{
(void)e;
DBG_ERROR(
(OString("SdrOle2Obj::RemoveListeners_Impl(), "
"exception caught: ") +
rtl::OUStringToOString(
comphelper::anyToString( cppu::getCaughtException() ),
RTL_TEXTENCODING_UTF8 )).getStr() );
}
2000-09-18 16:07:07 +00:00
}
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
}
2000-09-18 16:07:07 +00:00
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
void SdrOle2Obj::Disconnect_Impl()
{
try
2000-09-18 16:07:07 +00:00
{
if ( pModel && mpImpl->aPersistName.Len() )
{
if( pModel->IsInDestruction() )
{
// TODO/LATER: here we must assume that the destruction of the model is enough to make clear that we will not
// remove the object from the container, even if the DrawingObject itself is not destroyed (unfortunately this
// There is no real need to do the following removing of the object from the container
// in case the model has correct persistance, but in case of problems such a removing
// would make the behaviour of the office more stable
comphelper::EmbeddedObjectContainer* pContainer = xObjRef.GetContainer();
if ( pContainer )
{
pContainer->CloseEmbeddedObject( xObjRef.GetObject() );
xObjRef.AssignToContainer( NULL, mpImpl->aPersistName );
}
// happens later than the destruction of the model, so we can't assert that).
//DBG_ASSERT( bInDestruction, "Model is destroyed, but not me?!" );
//TODO/LATER: should be make sure that the ObjectShell also forgets the object, because we will close it soon?
/*
uno::Reference < util::XCloseable > xClose( xObjRef, uno::UNO_QUERY );
if ( xClose.is() )
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
{
try
{
xClose->close( sal_True );
}
catch ( util::CloseVetoException& )
{
// there's still someone who needs the object!
}
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
}
xObjRef = NULL;*/
}
else if ( xObjRef.is() )
{
if ( pModel->getUnoModel().is() )
{
// remove object, but don't close it (that's up to someone else)
comphelper::EmbeddedObjectContainer* pContainer = xObjRef.GetContainer();
if ( pContainer )
{
pContainer->RemoveEmbeddedObject( xObjRef.GetObject(), sal_False);
// TODO/LATER: mpImpl->aPersistName contains outdated information, to have it uptodate
// it should be returned from RemoveEmbeddedObject call. Currently it is no problem,
// since no container is adjusted, actually the empty string could be provided as a name here
xObjRef.AssignToContainer( NULL, mpImpl->aPersistName );
}
DisconnectFileLink_Impl();
}
}
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
}
if ( xObjRef.is() && mpImpl->pLightClient )
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
{
xObjRef->removeStateChangeListener ( mpImpl->pLightClient );
xObjRef->removeEventListener( uno::Reference< document::XEventListener >( mpImpl->pLightClient ) );
xObjRef->setClientSite( NULL );
GetSdrGlobalData().GetOLEObjCache().RemoveObj(this);
2000-09-18 16:07:07 +00:00
}
}
catch( ::com::sun::star::uno::Exception& e )
{
(void)e;
DBG_ERROR(
(OString("SdrOle2Obj::Disconnect_Impl(), "
"exception caught: ") +
rtl::OUStringToOString(
comphelper::anyToString( cppu::getCaughtException() ),
RTL_TEXTENCODING_UTF8 )).getStr() );
2000-09-18 16:07:07 +00:00
}
mpImpl->mbConnected = false;
2000-09-18 16:07:07 +00:00
}
// -----------------------------------------------------------------------------
2000-09-18 16:07:07 +00:00
void SdrOle2Obj::SetModel(SdrModel* pNewModel)
{
::comphelper::IEmbeddedHelper* pDestPers = pNewModel ? pNewModel->GetPersist() : 0;
::comphelper::IEmbeddedHelper* pSrcPers = pModel ? pModel->GetPersist() : 0;
2000-09-18 16:07:07 +00:00
if ( pNewModel == pModel )
{
// don't know if this is necessary or if it will ever happen, but who know?!
SdrRectObj::SetModel( pNewModel );
return;
}
2000-09-18 16:07:07 +00:00
// assignment to model has changed
DBG_ASSERT( pSrcPers || !mpImpl->mbConnected, "Connected object without a model?!" );
DBG_ASSERT( pDestPers, "The destination model must have a persistence! Please submit an issue!" );
DBG_ASSERT( pDestPers != pSrcPers, "The source and the destination models should have different persistences! Problems are possible!" );
// this is a bug if the target model has no persistence
// no error handling is possible so just do nothing in this method
if ( !pDestPers )
return;
RemoveListeners_Impl();
2000-09-18 16:07:07 +00:00
if( pDestPers && pSrcPers && !IsEmptyPresObj() )
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
{
try
{
// move the objects' storage; ObjectRef remains the same, but PersistName may change
::rtl::OUString aTmp;
comphelper::EmbeddedObjectContainer& rContainer = pSrcPers->getEmbeddedObjectContainer();
uno::Reference < embed::XEmbeddedObject > xObj = rContainer.GetEmbeddedObject( mpImpl->aPersistName );
DBG_ASSERT( !xObjRef.is() || xObjRef.GetObject() == xObj, "Wrong object identity!" );
if ( xObj.is() )
{
pDestPers->getEmbeddedObjectContainer().MoveEmbeddedObject( rContainer, xObj, aTmp );
mpImpl->aPersistName = aTmp;
xObjRef.AssignToContainer( &pDestPers->getEmbeddedObjectContainer(), aTmp );
}
DBG_ASSERT( aTmp.getLength(), "Copying embedded object failed!" );
}
catch( ::com::sun::star::uno::Exception& e )
{
(void)e;
DBG_ERROR(
(OString("SdrOle2Obj::SetModel(), "
"exception caught: ") +
rtl::OUStringToOString(
comphelper::anyToString( cppu::getCaughtException() ),
RTL_TEXTENCODING_UTF8 )).getStr() );
}
2000-09-18 16:07:07 +00:00
}
SdrRectObj::SetModel( pNewModel );
// #i43086#
// #i85304 redo the change for charts for the above bugfix, as #i43086# does not ocur anymore
//so maybe the ImpSetVisAreaSize call can be removed here completely
//Nevertheless I leave it in for other objects as I am not sure about the side effects when removing now
if( pModel && !pModel->isLocked() && !IsChart() )
ImpSetVisAreaSize();
if( pDestPers && !IsEmptyPresObj() )
{
if ( !pSrcPers || IsEmptyPresObj() )
// object wasn't connected, now it should
Connect_Impl();
else
Reconnect_Impl();
}
AddListeners_Impl();
2000-09-18 16:07:07 +00:00
}
// -----------------------------------------------------------------------------
2000-09-18 16:07:07 +00:00
void SdrOle2Obj::SetPage(SdrPage* pNewPage)
{
2010-10-05 07:57:54 -05:00
bool bRemove=pNewPage==NULL && pPage!=NULL;
bool bInsert=pNewPage!=NULL && pPage==NULL;
2000-09-18 16:07:07 +00:00
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
if (bRemove && mpImpl->mbConnected )
Disconnect();
2000-09-18 16:07:07 +00:00
SdrRectObj::SetPage(pNewPage);
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
if (bInsert && !mpImpl->mbConnected )
Connect();
2000-09-18 16:07:07 +00:00
}
// -----------------------------------------------------------------------------
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
void SdrOle2Obj::SetObjRef( const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject >& rNewObjRef )
2000-09-18 16:07:07 +00:00
{
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
DBG_ASSERT( !rNewObjRef.is() || !xObjRef.GetObject().is(), "SetObjRef called on already initialized object!");
if( rNewObjRef == xObjRef.GetObject() )
return;
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
// MBA: the caller of the method is responsible to control the old object, it will not be closed here
// Otherwise WW8 import crashes because it tranfers control to OLENode by this method
if ( xObjRef.GetObject().is() )
xObjRef.Lock( FALSE );
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
// MBA: avoid removal of object in Disconnect! It is definitely a HACK to call SetObjRef(0)!
// This call will try to close the objects; so if anybody else wants to keep it, it must be locked by a CloseListener
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
xObjRef.Clear();
2000-09-18 16:07:07 +00:00
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
if ( mpImpl->mbConnected )
Disconnect();
xObjRef.Assign( rNewObjRef, GetAspect() );
m_bTypeAsked = false;
2000-09-18 16:07:07 +00:00
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
if ( xObjRef.is() )
2000-09-18 16:07:07 +00:00
{
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
DELETEZ( pGraphic );
2000-09-18 16:07:07 +00:00
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
if ( (xObjRef->getStatus( GetAspect() ) & embed::EmbedMisc::EMBED_NEVERRESIZE ) )
SetResizeProtect(TRUE);
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
// #108759# For math objects, set closed state to transparent
if( ImplIsMathObj( rNewObjRef ) )
SetClosedObj( false );
Connect();
}
2000-09-18 16:07:07 +00:00
SetChanged();
BroadcastObjectChange();
2000-09-18 16:07:07 +00:00
}
// -----------------------------------------------------------------------------
void SdrOle2Obj::SetClosedObj( bool bIsClosed )
{
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
// TODO/LATER: do we still need this hack?
// #108759# Allow changes to the closed state of OLE objects
bClosedObj = bIsClosed;
}
// -----------------------------------------------------------------------------
2009-05-19 16:14:08 +00:00
SdrObject* SdrOle2Obj::getFullDragClone() const
{
// special handling for OLE. The default handling works, but is too
// slow when the whole OLE needs to be cloned. Get the Metafile and
// create a graphic object with it
Graphic* pOLEGraphic = GetGraphic();
SdrObject* pClone = 0;
if(pOLEGraphic)
{
pClone = new SdrGrafObj(*pOLEGraphic, GetSnapRect());
// this would be the place where to copy all attributes
// when OLE will support fill and line style
// pClone->SetMergedItem(pOleObject->GetMergedItemSet());
}
else
{
// #i100710# pOLEGraphic may be zero (no visualisation available),
// so we need to use the OLE replacement graphic
pClone = new SdrRectObj(GetSnapRect());
// gray outline
pClone->SetMergedItem(XLineStyleItem(XLINE_SOLID));
const svtools::ColorConfig aColorConfig;
const svtools::ColorConfigValue aColor(aColorConfig.GetColorValue(svtools::OBJECTBOUNDARIES));
pClone->SetMergedItem(XLineColorItem(String(), aColor.nColor));
// bitmap fill
pClone->SetMergedItem(XFillStyleItem(XFILL_BITMAP));
pClone->SetMergedItem(XFillBitmapItem(String(), GetEmtyOLEReplacementBitmap()));
pClone->SetMergedItem(XFillBmpTileItem(false));
pClone->SetMergedItem(XFillBmpStretchItem(false));
}
return pClone;
}
CWS-TOOLING: integrate CWS aw059 2008-12-16 16:15:40 +0100 aw r265557 : #i95645# avoid expensive tries to stream in graphic data when stream is at end anyways 2008-12-15 16:49:58 +0100 wg r265512 : i97278 2008-12-12 16:02:15 +0100 aw r265427 : #i95645# new formulation was wrong in two places; thanks go to THB. Thanks! 2008-12-12 15:49:06 +0100 aw r265425 : #i95645# refined formulation of AA on/off constraints for VCLCanvas 2008-12-12 14:51:26 +0100 aw r265420 : #i95645# workaround for DrawTransparent of button hilighting when remote displayed; somehow GDI+ does bad dithering in that case 2008-12-12 13:23:00 +0100 aw r265414 : removed temporary build hack; it made it's way in using the rebase; with SVN the rebase is not based on pure checkouts, but uses local changes. 2008-12-11 19:35:59 +0100 aw r265352 : #i95645# need to switch off AA for WNT and UNX, the VCLCanvas is currently not able to handle AA correctly 2008-12-11 16:05:17 +0100 thb r265327 : #i95645# Changed defaults to on; as for the while svx dialog is not changed 2008-12-10 13:40:38 +0100 aw r265180 : #i95645# changed pixel snap to basegfx::fround 2008-12-10 13:25:45 +0100 aw r265177 : corrected linux warning 2008-12-10 12:28:02 +0100 aw r265167 : #i95645# added support for pixel snap/linux resp. no AA for mac (also pixel snap) when AA is switched off to the basegfx::B2DPolyPolygon painting VCL methods; needed for e.g. selection in SC and SW 2008-12-09 18:44:39 +0100 aw r265136 : #i95645# corrected filled path construction 2008-12-09 18:12:40 +0100 aw r265133 : #i95645# added support for non-AAd transparent paints 2008-12-09 18:11:58 +0100 aw r265132 : #i95645# forced selection without AA 2008-12-09 18:11:29 +0100 aw r265131 : #i88893# smoothed/corrected SW selection rects for transparent selection, forced selection without AA 2008-12-09 15:21:39 +0100 aw r265094 : #i95645# corrected FormControl full drag 2008-12-09 15:11:26 +0100 aw r265093 : #i95645# make gdiplus usages more safe when no line or fill color is selected 2008-12-09 14:30:09 +0100 aw r265085 : #i95645# added GDIPlus support 2008-12-09 13:41:06 +0100 aw r265081 : #i95645# added simple AA using GDIPlis to VCL 2008-12-09 13:40:46 +0100 aw r265080 : #i95645# added simple AA using GDIPlis to VCL 2008-12-09 13:40:29 +0100 aw r265079 : #i95645# added simple AA using GDIPlis to VCL 2008-12-09 13:33:16 +0100 aw r265078 : #i95645# changes to requirements, discussed with FPE 2008-12-08 14:11:39 +0100 aw r264995 : #i95646# added missing extra-wireframe for SdrDragObjOwn implementations when object has no border 2008-12-08 14:11:00 +0100 aw r264994 : #i95646# corrected RenderMarkerArrayPrimitive2D OutDev usage in VclProcessor2D 2008-12-08 12:15:10 +0100 ufi r264987 : aw059 2008-12-08 12:14:40 +0100 ufi r264986 : aw059 2008-12-05 13:16:18 +0100 aw r264905 : CWS-TOOLING: rebase CWS aw059 to trunk@264807 (milestone: DEV300:m37) 2008-12-04 11:29:48 +0100 aw r264827 : #i95645# corrected warning 2008-12-03 14:43:39 +0100 aw r264783 : #i95645# simplified overlay manager and objects to stl vector; added stuff to render some more overlay to primitive renderer to get AA support for WIN32 2008-12-03 14:42:43 +0100 aw r264782 : #i95645# added test for WIN32 for AA if cairo canvas is available 2008-12-03 14:42:13 +0100 aw r264781 : #i95645# removed unused options for writer selection overlay 2008-12-03 14:41:51 +0100 aw r264780 : #i95645# removed unused options for calc overlay 2008-12-03 14:41:21 +0100 aw r264779 : #i95645# small corrections in canvas renderer 2008-12-02 18:32:31 +0100 aw r264730 : #i95646# merged cairo version from THB's CWS cairosource01 2008-12-02 15:25:45 +0100 aw r264705 : #i95645# added helpers for the MarkerArrayPrimitive2D change which support buffered creation of the most used markers 2008-12-02 12:50:01 +0100 aw r264690 : #i95645# added a non-saved method IsAAPossibleOnThisSystem to SvtOptionsDrawinglayer to quickly test if AA can be offered on the system, added buffering of that check. 2008-12-02 12:48:51 +0100 aw r264689 : #i95645# unified MarkerArrayPrimitive2D to work bitmap-orientated, adapted usages. Added buffered preparation for needed markers. Minor adaptions for AA 2008-12-02 12:47:53 +0100 aw r264688 : #i95645# unified MarkerArrayPrimitive2D to no longer work on a enum and types of markers, but to use a BitmapEx (or any other Bitmap object) which will be displayed centerd and in discrete coordinates at positions. Adapted decomposition and all usages. Corrected minor stuff with grid primitive 2008-11-28 17:11:12 +0100 thb r264565 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities 2008-11-28 17:03:27 +0100 thb r264563 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities 2008-11-28 17:00:07 +0100 thb r264562 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities 2008-11-28 16:59:51 +0100 thb r264561 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities 2008-11-27 19:13:42 +0100 aw r264519 : #i95646# optimized getLength() a little bit 2008-11-27 19:12:50 +0100 aw r264518 : #i95646# corrected AA expansion of invalidate frame; buffered discrete distance at OM 2008-11-27 18:50:05 +0100 aw r264516 : #i95646# corrected fit to frame texts for WIN32 2008-11-27 15:32:15 +0100 aw r264496 : #i95646# helplines corrected 2008-11-27 15:32:05 +0100 aw r264495 : #i95646# helplines corrected 2008-11-27 15:01:30 +0100 aw r264492 : #i95646# enable AA support for old polygons, especially to get support for MetaFile output 2008-11-27 14:33:28 +0100 aw r264489 : #i95646# AA support for wireframe overlays 2008-11-27 13:40:54 +0100 aw r264485 : #i95646# added full repaint when AA option changes 2008-11-27 13:29:19 +0100 aw r264482 : #i95646# corrected handling of bSolidDragging config entries 2008-11-27 13:29:08 +0100 aw r264481 : #i95646# corrected handling of bSolidDragging config entries 2008-11-27 11:30:12 +0100 aw r264469 : #i95646# corrected IsAAPossibleOnThisSystem implementation 2008-11-26 16:33:04 +0100 aw r264420 : #i95646# adapted OfaViewTabPage to use disable mechanism for AA and HWAccel 2008-11-26 15:49:19 +0100 aw r264406 : #i95646# added DlgEdObj::getFullDragClone() to create specialized simple SdrUnoObj clones for solid dragging 2008-11-26 15:48:11 +0100 aw r264405 : #i95646# changed derivation of ViewObjectContactOfUnoControl to get a valid isPrimitiveVisible() implementation 2008-11-26 14:11:37 +0100 aw r264385 : #i88893# added new look for selection in sw 2008-11-26 11:32:33 +0100 aw r264360 : corrected compiler warning 2008-11-25 18:46:29 +0100 aw r264328 : #i95646# snapshot with FullDrag clones 2008-11-25 18:46:07 +0100 aw r264327 : #i95646# snapshot with FullDrag clones 2008-11-25 18:45:43 +0100 aw r264326 : #i95646# snapshot with FullDrag clones 2008-11-25 18:19:04 +0100 thb r264324 : #i96585# Added missing inline specifier 2008-11-25 13:16:25 +0100 aw r264285 : #i95646# next snapshot 2008-11-25 13:15:33 +0100 aw r264284 : #i95646# next snapshot 2008-11-25 13:15:12 +0100 aw r264283 : #i95646# next snapshot 2008-11-25 13:14:51 +0100 aw r264282 : #i95646# next snapshot 2008-11-20 13:40:49 +0100 aw r264045 : #i95646# stable snapshot 2008-11-20 13:40:29 +0100 aw r264044 : #i95646# stable snapshot 2008-11-20 13:40:06 +0100 aw r264043 : #i95646# stable snapshot 2008-11-20 13:39:45 +0100 aw r264042 : #i95646# stable snapshot 2008-11-18 11:53:39 +0100 aw r263758 : #i95646# snapshot for linux test build 2008-11-18 11:52:54 +0100 aw r263757 : #i95646# snapshot for linux test build 2008-11-18 11:52:02 +0100 aw r263756 : #i95646# snapshot for linux test build 2008-11-14 18:17:49 +0100 aw r263692 : #i95646# snapshot with most stuff working 2008-11-14 18:14:26 +0100 aw r263691 : #i95646# snapshot with most stuff working 2008-11-14 18:12:50 +0100 aw r263690 : #i95646# snapshot with most stuff working 2008-11-14 18:12:16 +0100 aw r263689 : #i95646# snapshot with most stuff working 2008-11-14 18:11:41 +0100 aw r263688 : #i95646# snapshot with most stuff working 2008-11-07 18:44:22 +0100 aw r263479 : #i95968# better support PrefMapMode; special for MAP_PIXEL was missing 2008-11-05 17:39:15 +0100 aw r263356 : #i95644# #i95645# #i95646# bigger change done, saving for another experiment 2008-11-05 17:39:02 +0100 aw r263355 : #i95644# #i95645# #i95646# bigger change done, saving for another experiment 2008-11-05 12:28:32 +0100 aw r263350 : #i95644# #i95645# #i95646# in-between state before bigger change 2008-11-05 12:27:51 +0100 aw r263349 : #i95644# #i95645# #i95646# in-between state before bigger change 2008-11-05 12:26:58 +0100 aw r263348 : #i95644# #i95645# #i95646# in-between state before bigger change 2008-11-05 12:26:17 +0100 aw r263347 : #i95644# #i95645# #i95646# in-between state before bigger change 2008-11-05 12:25:55 +0100 aw r263346 : #i95644# #i95645# #i95646# in-between state before bigger change
2009-01-05 13:44:12 +00:00
// -----------------------------------------------------------------------------
void SdrOle2Obj::SetPersistName( const String& rPersistName )
{
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
DBG_ASSERT( !mpImpl->aPersistName.Len(), "Persist name changed!");
mpImpl->aPersistName = rPersistName;
mpImpl->mbLoadingOLEObjectFailed = false;
Connect();
SetChanged();
}
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
void SdrOle2Obj::AbandonObject()
{
mpImpl->aPersistName.Erase();
mpImpl->mbLoadingOLEObjectFailed = false;
SetObjRef(0);
}
// -----------------------------------------------------------------------------
String SdrOle2Obj::GetPersistName() const
{
return mpImpl->aPersistName;
}
// -----------------------------------------------------------------------------
2000-09-18 16:07:07 +00:00
void SdrOle2Obj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
{
rInfo.bRotateFreeAllowed=FALSE;
rInfo.bRotate90Allowed =FALSE;
rInfo.bMirrorFreeAllowed=FALSE;
rInfo.bMirror45Allowed =FALSE;
rInfo.bMirror90Allowed =FALSE;
rInfo.bTransparenceAllowed = FALSE;
rInfo.bGradientAllowed = FALSE;
rInfo.bShearAllowed =FALSE;
rInfo.bEdgeRadiusAllowed=FALSE;
2000-09-18 16:07:07 +00:00
rInfo.bNoOrthoDesired =FALSE;
rInfo.bCanConvToPath =FALSE;
rInfo.bCanConvToPoly =FALSE;
rInfo.bCanConvToPathLineToArea=FALSE;
rInfo.bCanConvToPolyLineToArea=FALSE;
rInfo.bCanConvToContour = FALSE;
}
// -----------------------------------------------------------------------------
2000-09-18 16:07:07 +00:00
UINT16 SdrOle2Obj::GetObjIdentifier() const
{
return bFrame ? UINT16(OBJ_FRAME) : UINT16(OBJ_OLE2);
}
// -----------------------------------------------------------------------------
2000-09-18 16:07:07 +00:00
void SdrOle2Obj::TakeObjNameSingul(XubString& rName) const
{
rName = ImpGetResStr(bFrame ? STR_ObjNameSingulFrame : STR_ObjNameSingulOLE2);
2000-09-18 16:07:07 +00:00
const String aName(GetName());
if( aName.Len() )
2000-09-18 16:07:07 +00:00
{
rName.AppendAscii(" '");
rName += aName;
rName += sal_Unicode('\'');
}
}
// -----------------------------------------------------------------------------
2000-09-18 16:07:07 +00:00
void SdrOle2Obj::TakeObjNamePlural(XubString& rName) const
{
rName=ImpGetResStr(bFrame ? STR_ObjNamePluralFrame : STR_ObjNamePluralOLE2);
2000-09-18 16:07:07 +00:00
}
// -----------------------------------------------------------------------------
void SdrOle2Obj::operator=(const SdrObject& rObj)
{
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
//TODO/LATER: who takes over control of my old object?!
if( &rObj != this )
{
// #116235#
// ImpAssign( rObj );
const SdrOle2Obj& rOle2Obj = static_cast< const SdrOle2Obj& >( rObj );
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
uno::Reference < util::XCloseable > xClose( xObjRef.GetObject(), uno::UNO_QUERY );
if( pModel && mpImpl->mbConnected )
Disconnect();
SdrRectObj::operator=( rObj );
// #108867# Manually copying bClosedObj attribute
SetClosedObj( rObj.IsClosedObj() );
mpImpl->aPersistName = rOle2Obj.mpImpl->aPersistName;
aProgName = rOle2Obj.aProgName;
bFrame = rOle2Obj.bFrame;
if( rOle2Obj.pGraphic )
{
if( pGraphic )
{
delete pGraphic;
delete mpImpl->pGraphicObject;
}
pGraphic = new Graphic( *rOle2Obj.pGraphic );
mpImpl->pGraphicObject = new GraphicObject( *pGraphic );
}
if( pModel && rObj.GetModel() && !IsEmptyPresObj() )
{
::comphelper::IEmbeddedHelper* pDestPers = pModel->GetPersist();
::comphelper::IEmbeddedHelper* pSrcPers = rObj.GetModel()->GetPersist();
if( pDestPers && pSrcPers )
{
DBG_ASSERT( !xObjRef.is(), "Object already existing!" );
comphelper::EmbeddedObjectContainer& rContainer = pSrcPers->getEmbeddedObjectContainer();
uno::Reference < embed::XEmbeddedObject > xObj = rContainer.GetEmbeddedObject( mpImpl->aPersistName );
if ( xObj.is() )
{
::rtl::OUString aTmp;
xObjRef.Assign( pDestPers->getEmbeddedObjectContainer().CopyAndGetEmbeddedObject( rContainer, xObj, aTmp ), rOle2Obj.GetAspect() );
m_bTypeAsked = false;
mpImpl->aPersistName = aTmp;
CheckFileLink_Impl();
}
Connect();
/* only needed for MSOLE-Objects, now handled inside implementation of Object
if ( xObjRef.is() && rOle2Obj.xObjRef.is() && rOle2Obj.GetAspect() != embed::Aspects::MSOLE_ICON )
{
try
{
awt::Size aVisSize = rOle2Obj.xObjRef->getVisualAreaSize( rOle2Obj.GetAspect() );
if( rOle2Obj.xObjRef->getMapUnit( rOle2Obj.GetAspect() ) == xObjRef->getMapUnit( GetAspect() ) )
xObjRef->setVisualAreaSize( GetAspect(), aVisSize );
}
catch ( embed::WrongStateException& )
{
// setting of VisArea not necessary for objects that don't cache it in loaded state
}
catch( embed::NoVisualAreaSizeException& )
{
// objects my not have visual areas
}
catch( uno::Exception& e )
{
(void)e;
2011-01-04 08:51:03 +01:00
DBG_ERROR( "SdrOle2Obj::operator=(), unexpected exception caught!" );
}
} */
}
}
}
}
// -----------------------------------------------------------------------------
2000-09-18 16:07:07 +00:00
void SdrOle2Obj::ImpSetVisAreaSize()
{
// currently there is no need to recalculate scaling for iconified objects
// TODO/LATER: it might be needed in future when it is possible to change the icon
if ( GetAspect() == embed::Aspects::MSOLE_ICON )
return;
// the object area of an embedded object was changed, e.g. by user interaction an a selected object
GetObjRef();
if ( xObjRef.is() )
2000-09-18 16:07:07 +00:00
{
OSL_ASSERT( pModel );
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
sal_Int64 nMiscStatus = xObjRef->getStatus( GetAspect() );
2000-09-18 16:07:07 +00:00
// the client is required to get access to scaling
SfxInPlaceClient* pClient = SfxInPlaceClient::GetClient( dynamic_cast<SfxObjectShell*>(pModel->GetPersist()), xObjRef.GetObject() );
sal_Bool bHasOwnClient =
( mpImpl->pLightClient
&& xObjRef->getClientSite() == uno::Reference< embed::XEmbeddedClient >( mpImpl->pLightClient ) );
if ( pClient || bHasOwnClient )
{
// TODO/LATER: IMHO we need to do similar things when object is UIActive or OutplaceActive?! (MBA)
if ( ((nMiscStatus & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) &&
svt::EmbeddedObjectRef::TryRunningState( xObjRef.GetObject() ))
|| xObjRef->getCurrentState() == embed::EmbedStates::INPLACE_ACTIVE
)
{
Fraction aScaleWidth;
Fraction aScaleHeight;
if ( pClient )
{
aScaleWidth = pClient->GetScaleWidth();
aScaleHeight = pClient->GetScaleHeight();
}
else
{
aScaleWidth = mpImpl->pLightClient->GetScaleWidth();
aScaleHeight = mpImpl->pLightClient->GetScaleHeight();
}
// The object wants to resize itself (f.e. Chart wants to recalculate the layout)
// or object is inplace active and so has a window that must be resized also
// In these cases the change in the object area size will be reflected in a change of the
// objects' visual area. The scaling will not change, but it might exist already and must
// be used in calculations
MapUnit aMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObjRef->getMapUnit( GetAspect() ) );
Size aVisSize( (long)( Fraction( aRect.GetWidth() ) / aScaleWidth ),
(long)( Fraction( aRect.GetHeight() ) / aScaleHeight ) );
aVisSize = OutputDevice::LogicToLogic( aVisSize, pModel->GetScaleUnit(), aMapUnit);
awt::Size aSz;
aSz.Width = aVisSize.Width();
aSz.Height = aVisSize.Height();
xObjRef->setVisualAreaSize( GetAspect(), aSz );
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
try
{
aSz = xObjRef->getVisualAreaSize( GetAspect() );
}
catch( embed::NoVisualAreaSizeException& )
{}
Rectangle aAcceptedVisArea;
aAcceptedVisArea.SetSize( Size( (long)( Fraction( long( aSz.Width ) ) * aScaleWidth ),
(long)( Fraction( long( aSz.Height ) ) * aScaleHeight ) ) );
if (aVisSize != aAcceptedVisArea.GetSize())
{
// server changed VisArea to its liking and the VisArea is different than the suggested one
// store the new value as given by the object
MapUnit aNewMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObjRef->getMapUnit( GetAspect() ) );
aRect.SetSize(OutputDevice::LogicToLogic( aAcceptedVisArea.GetSize(), aNewMapUnit, pModel->GetScaleUnit()));
}
// make the new object area known to the client
// compared to the "else" branch aRect might have been changed by the object and no additional scaling was applied
// OJ: WHY this -> OSL_ASSERT( pClient );
if( pClient )
pClient->SetObjArea(aRect);
// we need a new replacement image as the object has resized itself
//#i79578# don't request a new replacement image for charts to often
//a chart sends a modified call to the framework if it was changed
//thus the replacement update is already handled there
if( !IsChart() )
xObjRef.UpdateReplacement();
}
else
2000-09-18 16:07:07 +00:00
{
// The object isn't active and does not want to resize itself so the changed object area size
// will be reflected in a changed object scaling
Fraction aScaleWidth;
Fraction aScaleHeight;
Size aObjAreaSize;
if ( CalculateNewScaling( aScaleWidth, aScaleHeight, aObjAreaSize ) )
{
if ( pClient )
{
Rectangle aScaleRect(aRect.TopLeft(), aObjAreaSize);
pClient->SetObjAreaAndScale( aScaleRect, aScaleWidth, aScaleHeight);
}
else
{
mpImpl->pLightClient->SetSizeScale( aScaleWidth, aScaleHeight );
}
}
2000-09-18 16:07:07 +00:00
}
}
else if( (nMiscStatus & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) &&
svt::EmbeddedObjectRef::TryRunningState( xObjRef.GetObject() ) )
{
//also handle not sfx based ole objects e.g. charts
//#i83860# resizing charts in impress distorts fonts
uno::Reference< embed::XVisualObject > xVisualObject( this->getXModel(), uno::UNO_QUERY );
if( xVisualObject.is() )
{
MapUnit aMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObjRef->getMapUnit( GetAspect() ) );
Point aTL( aRect.TopLeft() );
Point aBR( aRect.BottomRight() );
Point aTL2( OutputDevice::LogicToLogic( aTL, pModel->GetScaleUnit(), aMapUnit) );
Point aBR2( OutputDevice::LogicToLogic( aBR, pModel->GetScaleUnit(), aMapUnit) );
Rectangle aNewRect( aTL2, aBR2 );
xVisualObject->setVisualAreaSize( GetAspect(), awt::Size( aNewRect.GetWidth(), aNewRect.GetHeight() ) );
}
}
2000-09-18 16:07:07 +00:00
}
}
// -----------------------------------------------------------------------------
2000-09-18 16:07:07 +00:00
void SdrOle2Obj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
{
if( pModel && !pModel->isLocked() )
{
GetObjRef();
if ( xObjRef.is() && ( xObjRef->getStatus( GetAspect() ) & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE ) )
{
// if the object needs recompose on resize
// the client site should be created before the resize will take place
// check whether there is no client site and create it if necessary
AddOwnLightClient();
}
}
2000-09-18 16:07:07 +00:00
SdrRectObj::NbcResize(rRef,xFact,yFact);
if (aGeo.nShearWink!=0 || aGeo.nDrehWink!=0) { // kleine Korrekturen
if (aGeo.nDrehWink>=9000 && aGeo.nDrehWink<27000) {
aRect.Move(aRect.Left()-aRect.Right(),aRect.Top()-aRect.Bottom());
}
aGeo.nDrehWink=0;
aGeo.nShearWink=0;
aGeo.nSin=0.0;
aGeo.nCos=1.0;
aGeo.nTan=0.0;
SetRectsDirty();
}
if( pModel && !pModel->isLocked() )
2001-07-24 07:51:46 +00:00
ImpSetVisAreaSize();
2000-09-18 16:07:07 +00:00
}
// -----------------------------------------------------------------------------
2000-09-18 16:07:07 +00:00
void SdrOle2Obj::SetGeoData(const SdrObjGeoData& rGeo)
{
SdrRectObj::SetGeoData(rGeo);
if( pModel && !pModel->isLocked() )
2001-07-24 07:51:46 +00:00
ImpSetVisAreaSize();
2000-09-18 16:07:07 +00:00
}
// -----------------------------------------------------------------------------
2000-09-18 16:07:07 +00:00
void SdrOle2Obj::NbcSetSnapRect(const Rectangle& rRect)
{
SdrRectObj::NbcSetSnapRect(rRect);
if( pModel && !pModel->isLocked() )
2001-07-24 07:51:46 +00:00
ImpSetVisAreaSize();
if ( xObjRef.is() && IsChart() )
{
//#i103460# charts do not necessaryly have an own size within ODF files,
//for this case they need to use the size settings from the surrounding frame,
//which is made available with this method as there is no other way
xObjRef.SetDefaultSizeForChart( Size( rRect.GetWidth(), rRect.GetHeight() ) );
}
2000-09-18 16:07:07 +00:00
}
// -----------------------------------------------------------------------------
2000-09-18 16:07:07 +00:00
void SdrOle2Obj::NbcSetLogicRect(const Rectangle& rRect)
{
SdrRectObj::NbcSetLogicRect(rRect);
if( pModel && !pModel->isLocked() )
2001-07-24 07:51:46 +00:00
ImpSetVisAreaSize();
2000-09-18 16:07:07 +00:00
}
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
Graphic* SdrOle2Obj::GetGraphic() const
2000-09-18 16:07:07 +00:00
{
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
if ( xObjRef.is() )
return xObjRef.GetGraphic();
return pGraphic;
2000-09-18 16:07:07 +00:00
}
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
void SdrOle2Obj::GetNewReplacement()
2000-09-18 16:07:07 +00:00
{
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
if ( xObjRef.is() )
xObjRef.UpdateReplacement();
2000-09-18 16:07:07 +00:00
}
// -----------------------------------------------------------------------------
Size SdrOle2Obj::GetOrigObjSize( MapMode* pTargetMapMode ) const
{
return xObjRef.GetSize( pTargetMapMode );
}
// -----------------------------------------------------------------------------
2000-09-18 16:07:07 +00:00
void SdrOle2Obj::NbcMove(const Size& rSize)
{
SdrRectObj::NbcMove(rSize);
if( pModel && !pModel->isLocked() )
2001-07-24 07:51:46 +00:00
ImpSetVisAreaSize();
2000-09-18 16:07:07 +00:00
}
// -----------------------------------------------------------------------------
CWS-TOOLING: integrate CWS fwk103 2009-05-26 12:44:25 +0200 mst r272292 : #i100727# - svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx: + fix warning: rename method to prevent overloading 2009-05-19 13:42:31 +0200 mav r272075 : #i101356# add comment 2009-05-19 10:56:24 +0200 mav r272062 : #i101356# register the singleton correctly 2009-05-19 10:25:42 +0200 mav r272060 : #i101356# register the singleton correctly 2009-05-18 12:48:48 +0200 mav r272013 : #i91306# fix the typo 2009-05-14 08:50:06 +0200 mav r271871 : #i101356# reduce the amount of macros 2009-05-13 13:26:08 +0200 mav r271858 : #i101356# reduce the amount of macros 2009-05-13 11:29:16 +0200 mav r271849 : #i101356# reduce the amount of macros 2009-05-12 12:09:42 +0200 mav r271815 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 12:03:20 +0200 mav r271814 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:58:48 +0200 mav r271813 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:53:05 +0200 mav r271812 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:48:36 +0200 mav r271810 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:43:45 +0200 mav r271809 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:39:38 +0200 mav r271808 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:37:38 +0200 mav r271806 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:33:58 +0200 mav r271805 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:30:01 +0200 mav r271804 : #i101356# allow to generate a small log if a document can not be stored 2009-05-06 17:43:38 +0200 mst r271607 : #i100727# - svtools/source/svhtml/parhtml.cxx: + adapt code to renaming of HTML constants (sb107) 2009-05-05 11:14:18 +0200 mav r271507 : #i101222# avoid warning 2009-05-05 10:27:23 +0200 mav r271505 : #i101426# send the modified() notification only when the document can be modified 2009-05-05 10:25:07 +0200 mav r271504 : #i101426# send the modified() notification only when the document is modified 2009-05-05 08:42:48 +0200 mav r271497 : CWS-TOOLING: rebase CWS fwk103 to trunk@271427 (milestone: DEV300:m47) 2009-04-30 13:32:11 +0200 mav r271412 : #i100518# check the template folders quietly 2009-04-29 20:04:25 +0200 mst r271393 : - sw/source/filter/html/swhtml.cxx: + fix wrong initialization order in constructor 2009-04-28 12:28:46 +0200 mav r271319 : #i99142# set the error correctly 2009-04-28 08:44:48 +0200 mav r271305 : #i99050# clear hidden flag if necessary 2009-04-28 08:40:10 +0200 mav r271304 : #i99050# avoid crash 2009-04-22 07:40:11 +0200 mav r271056 : #i101093# lets not affect the performance 2009-04-15 09:30:47 +0200 cd r270820 : #i99771# Fix warnings for gcc 4.4 2009-04-15 09:19:52 +0200 cd r270819 : #i99771# Fix warnings for gcc 4.4 2009-04-15 08:42:34 +0200 cd r270817 : #i99771# Fix warnings for gcc 4.4 2009-04-14 14:31:01 +0200 mav r270768 : #i99493# fix typo 2009-04-01 12:45:43 +0200 mst r270317 : fix #i100727# - svtools/inc/svtools/svparser.hxx, svtools/source/svrtf/svparser.cxx, sfx2/inc/sfx2/docfile.hxx, sfx2/source/doc/{objmisc.cxx,docfile.cxx}: + move SvKeyValue stuff from sfx2 to svtools - svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx, sfx2/inc/sfx2/sfxhtml.hxx, sfx2/source/bastyp/sfxhtml.cxx: + move ParseMetaOptions() and GetEncodingByMIME() from SfxHTMLParser (sfx2) to HTMLParser (svtools) + make HTMLParser::ParseMetaOptions() a virtual function + HTMLParser::ParseMetaOptions() calls GetExtendedCompatibilityTextEncoding() + new template method HTMLParser::AddMetaUserDefined() - svtools/source/svhtml/makefile.mk: + enable exceptions for parhtml.cxx - dbaccess/source/ui/misc/HtmlReader.cxx, sc/source/filter/html/htmlpars.cxx: + remove encoding related code duplication - sw/source/filter/html/{swhtml{.hxx,.cxx},htmlfld.cxx}: + new SwHTMLParser::AddMetaUserDefined() for import of DOCINFO field subtypes INFO[1-4] + do not use DocumentInfo for import of DOCINFO field subtypes INFO[1-4] 2009-03-31 17:01:35 +0200 mav r270288 : #i91214# fix typo 2009-03-31 15:19:41 +0200 mav r270285 : #i100123# allow to turn OOo locking mechanics off 2009-03-31 15:00:36 +0200 mav r270284 : #i100123# allow to turn OOo locking mechanics off 2009-03-31 12:19:13 +0200 mav r270270 : #i100123# taking the lock file over throws no exception 2009-03-30 13:57:21 +0200 mav r270227 : #i100351# fix the typo 2009-03-30 13:47:26 +0200 mav r270225 : #i99885# let OK be default button 2009-03-29 19:38:55 +0200 mav r270190 : CWS-TOOLING: rebase CWS fwk103 to trunk@270033 (milestone: DEV300:m45) 2009-03-16 16:39:48 +0100 mav r269558 : #i93558# convert the attributes as well 2009-03-13 15:35:55 +0100 mav r269488 : #i93558# improve manifest.xml parsing 2009-03-13 08:47:00 +0100 mav r269454 : #i96205# allow to remove password on SaveAs 2009-03-12 13:36:07 +0100 mav r269398 : #i91306# show special error in case of shared document 2009-03-12 13:33:35 +0100 mav r269397 : #i91306# introduce the new error-message 2009-03-12 11:40:42 +0100 mst r269378 : fix #i90877# - svtools/source/uno/unoevent.cxx: + use proper operator delete[] 2009-02-26 15:23:10 +0100 mav r268526 : #i91214# do not use ATL 2009-02-26 14:19:06 +0100 mav r268516 : #i98909# integrate the patch 2009-02-10 17:29:52 +0100 cd r267568 : #i98649# Make sure that we catch the NoSuchElementException when a module is not installed.
2009-06-16 16:15:54 +00:00
sal_Bool SdrOle2Obj::CanUnloadRunningObj( const uno::Reference< embed::XEmbeddedObject >& xObj, sal_Int64 nAspect )
{
sal_Bool bResult = sal_False;
sal_Int32 nState = xObj->getCurrentState();
if ( nState == embed::EmbedStates::LOADED )
{
CWS-TOOLING: integrate CWS fwk103 2009-05-26 12:44:25 +0200 mst r272292 : #i100727# - svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx: + fix warning: rename method to prevent overloading 2009-05-19 13:42:31 +0200 mav r272075 : #i101356# add comment 2009-05-19 10:56:24 +0200 mav r272062 : #i101356# register the singleton correctly 2009-05-19 10:25:42 +0200 mav r272060 : #i101356# register the singleton correctly 2009-05-18 12:48:48 +0200 mav r272013 : #i91306# fix the typo 2009-05-14 08:50:06 +0200 mav r271871 : #i101356# reduce the amount of macros 2009-05-13 13:26:08 +0200 mav r271858 : #i101356# reduce the amount of macros 2009-05-13 11:29:16 +0200 mav r271849 : #i101356# reduce the amount of macros 2009-05-12 12:09:42 +0200 mav r271815 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 12:03:20 +0200 mav r271814 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:58:48 +0200 mav r271813 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:53:05 +0200 mav r271812 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:48:36 +0200 mav r271810 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:43:45 +0200 mav r271809 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:39:38 +0200 mav r271808 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:37:38 +0200 mav r271806 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:33:58 +0200 mav r271805 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:30:01 +0200 mav r271804 : #i101356# allow to generate a small log if a document can not be stored 2009-05-06 17:43:38 +0200 mst r271607 : #i100727# - svtools/source/svhtml/parhtml.cxx: + adapt code to renaming of HTML constants (sb107) 2009-05-05 11:14:18 +0200 mav r271507 : #i101222# avoid warning 2009-05-05 10:27:23 +0200 mav r271505 : #i101426# send the modified() notification only when the document can be modified 2009-05-05 10:25:07 +0200 mav r271504 : #i101426# send the modified() notification only when the document is modified 2009-05-05 08:42:48 +0200 mav r271497 : CWS-TOOLING: rebase CWS fwk103 to trunk@271427 (milestone: DEV300:m47) 2009-04-30 13:32:11 +0200 mav r271412 : #i100518# check the template folders quietly 2009-04-29 20:04:25 +0200 mst r271393 : - sw/source/filter/html/swhtml.cxx: + fix wrong initialization order in constructor 2009-04-28 12:28:46 +0200 mav r271319 : #i99142# set the error correctly 2009-04-28 08:44:48 +0200 mav r271305 : #i99050# clear hidden flag if necessary 2009-04-28 08:40:10 +0200 mav r271304 : #i99050# avoid crash 2009-04-22 07:40:11 +0200 mav r271056 : #i101093# lets not affect the performance 2009-04-15 09:30:47 +0200 cd r270820 : #i99771# Fix warnings for gcc 4.4 2009-04-15 09:19:52 +0200 cd r270819 : #i99771# Fix warnings for gcc 4.4 2009-04-15 08:42:34 +0200 cd r270817 : #i99771# Fix warnings for gcc 4.4 2009-04-14 14:31:01 +0200 mav r270768 : #i99493# fix typo 2009-04-01 12:45:43 +0200 mst r270317 : fix #i100727# - svtools/inc/svtools/svparser.hxx, svtools/source/svrtf/svparser.cxx, sfx2/inc/sfx2/docfile.hxx, sfx2/source/doc/{objmisc.cxx,docfile.cxx}: + move SvKeyValue stuff from sfx2 to svtools - svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx, sfx2/inc/sfx2/sfxhtml.hxx, sfx2/source/bastyp/sfxhtml.cxx: + move ParseMetaOptions() and GetEncodingByMIME() from SfxHTMLParser (sfx2) to HTMLParser (svtools) + make HTMLParser::ParseMetaOptions() a virtual function + HTMLParser::ParseMetaOptions() calls GetExtendedCompatibilityTextEncoding() + new template method HTMLParser::AddMetaUserDefined() - svtools/source/svhtml/makefile.mk: + enable exceptions for parhtml.cxx - dbaccess/source/ui/misc/HtmlReader.cxx, sc/source/filter/html/htmlpars.cxx: + remove encoding related code duplication - sw/source/filter/html/{swhtml{.hxx,.cxx},htmlfld.cxx}: + new SwHTMLParser::AddMetaUserDefined() for import of DOCINFO field subtypes INFO[1-4] + do not use DocumentInfo for import of DOCINFO field subtypes INFO[1-4] 2009-03-31 17:01:35 +0200 mav r270288 : #i91214# fix typo 2009-03-31 15:19:41 +0200 mav r270285 : #i100123# allow to turn OOo locking mechanics off 2009-03-31 15:00:36 +0200 mav r270284 : #i100123# allow to turn OOo locking mechanics off 2009-03-31 12:19:13 +0200 mav r270270 : #i100123# taking the lock file over throws no exception 2009-03-30 13:57:21 +0200 mav r270227 : #i100351# fix the typo 2009-03-30 13:47:26 +0200 mav r270225 : #i99885# let OK be default button 2009-03-29 19:38:55 +0200 mav r270190 : CWS-TOOLING: rebase CWS fwk103 to trunk@270033 (milestone: DEV300:m45) 2009-03-16 16:39:48 +0100 mav r269558 : #i93558# convert the attributes as well 2009-03-13 15:35:55 +0100 mav r269488 : #i93558# improve manifest.xml parsing 2009-03-13 08:47:00 +0100 mav r269454 : #i96205# allow to remove password on SaveAs 2009-03-12 13:36:07 +0100 mav r269398 : #i91306# show special error in case of shared document 2009-03-12 13:33:35 +0100 mav r269397 : #i91306# introduce the new error-message 2009-03-12 11:40:42 +0100 mst r269378 : fix #i90877# - svtools/source/uno/unoevent.cxx: + use proper operator delete[] 2009-02-26 15:23:10 +0100 mav r268526 : #i91214# do not use ATL 2009-02-26 14:19:06 +0100 mav r268516 : #i98909# integrate the patch 2009-02-10 17:29:52 +0100 cd r267568 : #i98649# Make sure that we catch the NoSuchElementException when a module is not installed.
2009-06-16 16:15:54 +00:00
// the object is already unloaded
bResult = sal_True;
}
else
{
uno::Reference < util::XModifiable > xModifiable( xObj->getComponent(), uno::UNO_QUERY );
CWS-TOOLING: integrate CWS fwk103 2009-05-26 12:44:25 +0200 mst r272292 : #i100727# - svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx: + fix warning: rename method to prevent overloading 2009-05-19 13:42:31 +0200 mav r272075 : #i101356# add comment 2009-05-19 10:56:24 +0200 mav r272062 : #i101356# register the singleton correctly 2009-05-19 10:25:42 +0200 mav r272060 : #i101356# register the singleton correctly 2009-05-18 12:48:48 +0200 mav r272013 : #i91306# fix the typo 2009-05-14 08:50:06 +0200 mav r271871 : #i101356# reduce the amount of macros 2009-05-13 13:26:08 +0200 mav r271858 : #i101356# reduce the amount of macros 2009-05-13 11:29:16 +0200 mav r271849 : #i101356# reduce the amount of macros 2009-05-12 12:09:42 +0200 mav r271815 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 12:03:20 +0200 mav r271814 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:58:48 +0200 mav r271813 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:53:05 +0200 mav r271812 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:48:36 +0200 mav r271810 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:43:45 +0200 mav r271809 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:39:38 +0200 mav r271808 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:37:38 +0200 mav r271806 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:33:58 +0200 mav r271805 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:30:01 +0200 mav r271804 : #i101356# allow to generate a small log if a document can not be stored 2009-05-06 17:43:38 +0200 mst r271607 : #i100727# - svtools/source/svhtml/parhtml.cxx: + adapt code to renaming of HTML constants (sb107) 2009-05-05 11:14:18 +0200 mav r271507 : #i101222# avoid warning 2009-05-05 10:27:23 +0200 mav r271505 : #i101426# send the modified() notification only when the document can be modified 2009-05-05 10:25:07 +0200 mav r271504 : #i101426# send the modified() notification only when the document is modified 2009-05-05 08:42:48 +0200 mav r271497 : CWS-TOOLING: rebase CWS fwk103 to trunk@271427 (milestone: DEV300:m47) 2009-04-30 13:32:11 +0200 mav r271412 : #i100518# check the template folders quietly 2009-04-29 20:04:25 +0200 mst r271393 : - sw/source/filter/html/swhtml.cxx: + fix wrong initialization order in constructor 2009-04-28 12:28:46 +0200 mav r271319 : #i99142# set the error correctly 2009-04-28 08:44:48 +0200 mav r271305 : #i99050# clear hidden flag if necessary 2009-04-28 08:40:10 +0200 mav r271304 : #i99050# avoid crash 2009-04-22 07:40:11 +0200 mav r271056 : #i101093# lets not affect the performance 2009-04-15 09:30:47 +0200 cd r270820 : #i99771# Fix warnings for gcc 4.4 2009-04-15 09:19:52 +0200 cd r270819 : #i99771# Fix warnings for gcc 4.4 2009-04-15 08:42:34 +0200 cd r270817 : #i99771# Fix warnings for gcc 4.4 2009-04-14 14:31:01 +0200 mav r270768 : #i99493# fix typo 2009-04-01 12:45:43 +0200 mst r270317 : fix #i100727# - svtools/inc/svtools/svparser.hxx, svtools/source/svrtf/svparser.cxx, sfx2/inc/sfx2/docfile.hxx, sfx2/source/doc/{objmisc.cxx,docfile.cxx}: + move SvKeyValue stuff from sfx2 to svtools - svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx, sfx2/inc/sfx2/sfxhtml.hxx, sfx2/source/bastyp/sfxhtml.cxx: + move ParseMetaOptions() and GetEncodingByMIME() from SfxHTMLParser (sfx2) to HTMLParser (svtools) + make HTMLParser::ParseMetaOptions() a virtual function + HTMLParser::ParseMetaOptions() calls GetExtendedCompatibilityTextEncoding() + new template method HTMLParser::AddMetaUserDefined() - svtools/source/svhtml/makefile.mk: + enable exceptions for parhtml.cxx - dbaccess/source/ui/misc/HtmlReader.cxx, sc/source/filter/html/htmlpars.cxx: + remove encoding related code duplication - sw/source/filter/html/{swhtml{.hxx,.cxx},htmlfld.cxx}: + new SwHTMLParser::AddMetaUserDefined() for import of DOCINFO field subtypes INFO[1-4] + do not use DocumentInfo for import of DOCINFO field subtypes INFO[1-4] 2009-03-31 17:01:35 +0200 mav r270288 : #i91214# fix typo 2009-03-31 15:19:41 +0200 mav r270285 : #i100123# allow to turn OOo locking mechanics off 2009-03-31 15:00:36 +0200 mav r270284 : #i100123# allow to turn OOo locking mechanics off 2009-03-31 12:19:13 +0200 mav r270270 : #i100123# taking the lock file over throws no exception 2009-03-30 13:57:21 +0200 mav r270227 : #i100351# fix the typo 2009-03-30 13:47:26 +0200 mav r270225 : #i99885# let OK be default button 2009-03-29 19:38:55 +0200 mav r270190 : CWS-TOOLING: rebase CWS fwk103 to trunk@270033 (milestone: DEV300:m45) 2009-03-16 16:39:48 +0100 mav r269558 : #i93558# convert the attributes as well 2009-03-13 15:35:55 +0100 mav r269488 : #i93558# improve manifest.xml parsing 2009-03-13 08:47:00 +0100 mav r269454 : #i96205# allow to remove password on SaveAs 2009-03-12 13:36:07 +0100 mav r269398 : #i91306# show special error in case of shared document 2009-03-12 13:33:35 +0100 mav r269397 : #i91306# introduce the new error-message 2009-03-12 11:40:42 +0100 mst r269378 : fix #i90877# - svtools/source/uno/unoevent.cxx: + use proper operator delete[] 2009-02-26 15:23:10 +0100 mav r268526 : #i91214# do not use ATL 2009-02-26 14:19:06 +0100 mav r268516 : #i98909# integrate the patch 2009-02-10 17:29:52 +0100 cd r267568 : #i98649# Make sure that we catch the NoSuchElementException when a module is not installed.
2009-06-16 16:15:54 +00:00
if ( !xModifiable.is() )
bResult = sal_True;
else
{
CWS-TOOLING: integrate CWS fwk103 2009-05-26 12:44:25 +0200 mst r272292 : #i100727# - svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx: + fix warning: rename method to prevent overloading 2009-05-19 13:42:31 +0200 mav r272075 : #i101356# add comment 2009-05-19 10:56:24 +0200 mav r272062 : #i101356# register the singleton correctly 2009-05-19 10:25:42 +0200 mav r272060 : #i101356# register the singleton correctly 2009-05-18 12:48:48 +0200 mav r272013 : #i91306# fix the typo 2009-05-14 08:50:06 +0200 mav r271871 : #i101356# reduce the amount of macros 2009-05-13 13:26:08 +0200 mav r271858 : #i101356# reduce the amount of macros 2009-05-13 11:29:16 +0200 mav r271849 : #i101356# reduce the amount of macros 2009-05-12 12:09:42 +0200 mav r271815 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 12:03:20 +0200 mav r271814 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:58:48 +0200 mav r271813 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:53:05 +0200 mav r271812 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:48:36 +0200 mav r271810 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:43:45 +0200 mav r271809 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:39:38 +0200 mav r271808 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:37:38 +0200 mav r271806 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:33:58 +0200 mav r271805 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:30:01 +0200 mav r271804 : #i101356# allow to generate a small log if a document can not be stored 2009-05-06 17:43:38 +0200 mst r271607 : #i100727# - svtools/source/svhtml/parhtml.cxx: + adapt code to renaming of HTML constants (sb107) 2009-05-05 11:14:18 +0200 mav r271507 : #i101222# avoid warning 2009-05-05 10:27:23 +0200 mav r271505 : #i101426# send the modified() notification only when the document can be modified 2009-05-05 10:25:07 +0200 mav r271504 : #i101426# send the modified() notification only when the document is modified 2009-05-05 08:42:48 +0200 mav r271497 : CWS-TOOLING: rebase CWS fwk103 to trunk@271427 (milestone: DEV300:m47) 2009-04-30 13:32:11 +0200 mav r271412 : #i100518# check the template folders quietly 2009-04-29 20:04:25 +0200 mst r271393 : - sw/source/filter/html/swhtml.cxx: + fix wrong initialization order in constructor 2009-04-28 12:28:46 +0200 mav r271319 : #i99142# set the error correctly 2009-04-28 08:44:48 +0200 mav r271305 : #i99050# clear hidden flag if necessary 2009-04-28 08:40:10 +0200 mav r271304 : #i99050# avoid crash 2009-04-22 07:40:11 +0200 mav r271056 : #i101093# lets not affect the performance 2009-04-15 09:30:47 +0200 cd r270820 : #i99771# Fix warnings for gcc 4.4 2009-04-15 09:19:52 +0200 cd r270819 : #i99771# Fix warnings for gcc 4.4 2009-04-15 08:42:34 +0200 cd r270817 : #i99771# Fix warnings for gcc 4.4 2009-04-14 14:31:01 +0200 mav r270768 : #i99493# fix typo 2009-04-01 12:45:43 +0200 mst r270317 : fix #i100727# - svtools/inc/svtools/svparser.hxx, svtools/source/svrtf/svparser.cxx, sfx2/inc/sfx2/docfile.hxx, sfx2/source/doc/{objmisc.cxx,docfile.cxx}: + move SvKeyValue stuff from sfx2 to svtools - svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx, sfx2/inc/sfx2/sfxhtml.hxx, sfx2/source/bastyp/sfxhtml.cxx: + move ParseMetaOptions() and GetEncodingByMIME() from SfxHTMLParser (sfx2) to HTMLParser (svtools) + make HTMLParser::ParseMetaOptions() a virtual function + HTMLParser::ParseMetaOptions() calls GetExtendedCompatibilityTextEncoding() + new template method HTMLParser::AddMetaUserDefined() - svtools/source/svhtml/makefile.mk: + enable exceptions for parhtml.cxx - dbaccess/source/ui/misc/HtmlReader.cxx, sc/source/filter/html/htmlpars.cxx: + remove encoding related code duplication - sw/source/filter/html/{swhtml{.hxx,.cxx},htmlfld.cxx}: + new SwHTMLParser::AddMetaUserDefined() for import of DOCINFO field subtypes INFO[1-4] + do not use DocumentInfo for import of DOCINFO field subtypes INFO[1-4] 2009-03-31 17:01:35 +0200 mav r270288 : #i91214# fix typo 2009-03-31 15:19:41 +0200 mav r270285 : #i100123# allow to turn OOo locking mechanics off 2009-03-31 15:00:36 +0200 mav r270284 : #i100123# allow to turn OOo locking mechanics off 2009-03-31 12:19:13 +0200 mav r270270 : #i100123# taking the lock file over throws no exception 2009-03-30 13:57:21 +0200 mav r270227 : #i100351# fix the typo 2009-03-30 13:47:26 +0200 mav r270225 : #i99885# let OK be default button 2009-03-29 19:38:55 +0200 mav r270190 : CWS-TOOLING: rebase CWS fwk103 to trunk@270033 (milestone: DEV300:m45) 2009-03-16 16:39:48 +0100 mav r269558 : #i93558# convert the attributes as well 2009-03-13 15:35:55 +0100 mav r269488 : #i93558# improve manifest.xml parsing 2009-03-13 08:47:00 +0100 mav r269454 : #i96205# allow to remove password on SaveAs 2009-03-12 13:36:07 +0100 mav r269398 : #i91306# show special error in case of shared document 2009-03-12 13:33:35 +0100 mav r269397 : #i91306# introduce the new error-message 2009-03-12 11:40:42 +0100 mst r269378 : fix #i90877# - svtools/source/uno/unoevent.cxx: + use proper operator delete[] 2009-02-26 15:23:10 +0100 mav r268526 : #i91214# do not use ATL 2009-02-26 14:19:06 +0100 mav r268516 : #i98909# integrate the patch 2009-02-10 17:29:52 +0100 cd r267568 : #i98649# Make sure that we catch the NoSuchElementException when a module is not installed.
2009-06-16 16:15:54 +00:00
sal_Int64 nMiscStatus = xObj->getStatus( nAspect );
if ( embed::EmbedMisc::MS_EMBED_ALWAYSRUN != ( nMiscStatus & embed::EmbedMisc::MS_EMBED_ALWAYSRUN ) &&
embed::EmbedMisc::EMBED_ACTIVATEIMMEDIATELY != ( nMiscStatus & embed::EmbedMisc::EMBED_ACTIVATEIMMEDIATELY ) &&
!( xModifiable.is() && xModifiable->isModified() ) &&
!( nState == embed::EmbedStates::INPLACE_ACTIVE || nState == embed::EmbedStates::UI_ACTIVE || nState == embed::EmbedStates::ACTIVE ) )
{
bResult = sal_True;
}
CWS-TOOLING: integrate CWS fwk103 2009-05-26 12:44:25 +0200 mst r272292 : #i100727# - svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx: + fix warning: rename method to prevent overloading 2009-05-19 13:42:31 +0200 mav r272075 : #i101356# add comment 2009-05-19 10:56:24 +0200 mav r272062 : #i101356# register the singleton correctly 2009-05-19 10:25:42 +0200 mav r272060 : #i101356# register the singleton correctly 2009-05-18 12:48:48 +0200 mav r272013 : #i91306# fix the typo 2009-05-14 08:50:06 +0200 mav r271871 : #i101356# reduce the amount of macros 2009-05-13 13:26:08 +0200 mav r271858 : #i101356# reduce the amount of macros 2009-05-13 11:29:16 +0200 mav r271849 : #i101356# reduce the amount of macros 2009-05-12 12:09:42 +0200 mav r271815 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 12:03:20 +0200 mav r271814 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:58:48 +0200 mav r271813 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:53:05 +0200 mav r271812 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:48:36 +0200 mav r271810 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:43:45 +0200 mav r271809 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:39:38 +0200 mav r271808 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:37:38 +0200 mav r271806 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:33:58 +0200 mav r271805 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:30:01 +0200 mav r271804 : #i101356# allow to generate a small log if a document can not be stored 2009-05-06 17:43:38 +0200 mst r271607 : #i100727# - svtools/source/svhtml/parhtml.cxx: + adapt code to renaming of HTML constants (sb107) 2009-05-05 11:14:18 +0200 mav r271507 : #i101222# avoid warning 2009-05-05 10:27:23 +0200 mav r271505 : #i101426# send the modified() notification only when the document can be modified 2009-05-05 10:25:07 +0200 mav r271504 : #i101426# send the modified() notification only when the document is modified 2009-05-05 08:42:48 +0200 mav r271497 : CWS-TOOLING: rebase CWS fwk103 to trunk@271427 (milestone: DEV300:m47) 2009-04-30 13:32:11 +0200 mav r271412 : #i100518# check the template folders quietly 2009-04-29 20:04:25 +0200 mst r271393 : - sw/source/filter/html/swhtml.cxx: + fix wrong initialization order in constructor 2009-04-28 12:28:46 +0200 mav r271319 : #i99142# set the error correctly 2009-04-28 08:44:48 +0200 mav r271305 : #i99050# clear hidden flag if necessary 2009-04-28 08:40:10 +0200 mav r271304 : #i99050# avoid crash 2009-04-22 07:40:11 +0200 mav r271056 : #i101093# lets not affect the performance 2009-04-15 09:30:47 +0200 cd r270820 : #i99771# Fix warnings for gcc 4.4 2009-04-15 09:19:52 +0200 cd r270819 : #i99771# Fix warnings for gcc 4.4 2009-04-15 08:42:34 +0200 cd r270817 : #i99771# Fix warnings for gcc 4.4 2009-04-14 14:31:01 +0200 mav r270768 : #i99493# fix typo 2009-04-01 12:45:43 +0200 mst r270317 : fix #i100727# - svtools/inc/svtools/svparser.hxx, svtools/source/svrtf/svparser.cxx, sfx2/inc/sfx2/docfile.hxx, sfx2/source/doc/{objmisc.cxx,docfile.cxx}: + move SvKeyValue stuff from sfx2 to svtools - svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx, sfx2/inc/sfx2/sfxhtml.hxx, sfx2/source/bastyp/sfxhtml.cxx: + move ParseMetaOptions() and GetEncodingByMIME() from SfxHTMLParser (sfx2) to HTMLParser (svtools) + make HTMLParser::ParseMetaOptions() a virtual function + HTMLParser::ParseMetaOptions() calls GetExtendedCompatibilityTextEncoding() + new template method HTMLParser::AddMetaUserDefined() - svtools/source/svhtml/makefile.mk: + enable exceptions for parhtml.cxx - dbaccess/source/ui/misc/HtmlReader.cxx, sc/source/filter/html/htmlpars.cxx: + remove encoding related code duplication - sw/source/filter/html/{swhtml{.hxx,.cxx},htmlfld.cxx}: + new SwHTMLParser::AddMetaUserDefined() for import of DOCINFO field subtypes INFO[1-4] + do not use DocumentInfo for import of DOCINFO field subtypes INFO[1-4] 2009-03-31 17:01:35 +0200 mav r270288 : #i91214# fix typo 2009-03-31 15:19:41 +0200 mav r270285 : #i100123# allow to turn OOo locking mechanics off 2009-03-31 15:00:36 +0200 mav r270284 : #i100123# allow to turn OOo locking mechanics off 2009-03-31 12:19:13 +0200 mav r270270 : #i100123# taking the lock file over throws no exception 2009-03-30 13:57:21 +0200 mav r270227 : #i100351# fix the typo 2009-03-30 13:47:26 +0200 mav r270225 : #i99885# let OK be default button 2009-03-29 19:38:55 +0200 mav r270190 : CWS-TOOLING: rebase CWS fwk103 to trunk@270033 (milestone: DEV300:m45) 2009-03-16 16:39:48 +0100 mav r269558 : #i93558# convert the attributes as well 2009-03-13 15:35:55 +0100 mav r269488 : #i93558# improve manifest.xml parsing 2009-03-13 08:47:00 +0100 mav r269454 : #i96205# allow to remove password on SaveAs 2009-03-12 13:36:07 +0100 mav r269398 : #i91306# show special error in case of shared document 2009-03-12 13:33:35 +0100 mav r269397 : #i91306# introduce the new error-message 2009-03-12 11:40:42 +0100 mst r269378 : fix #i90877# - svtools/source/uno/unoevent.cxx: + use proper operator delete[] 2009-02-26 15:23:10 +0100 mav r268526 : #i91214# do not use ATL 2009-02-26 14:19:06 +0100 mav r268516 : #i98909# integrate the patch 2009-02-10 17:29:52 +0100 cd r267568 : #i98649# Make sure that we catch the NoSuchElementException when a module is not installed.
2009-06-16 16:15:54 +00:00
}
}
return bResult;
}
// -----------------------------------------------------------------------------
sal_Bool SdrOle2Obj::Unload( const uno::Reference< embed::XEmbeddedObject >& xObj, sal_Int64 nAspect )
{
sal_Bool bResult = sal_False;
if ( CanUnloadRunningObj( xObj, nAspect ) )
{
try
{
xObj->changeState( embed::EmbedStates::LOADED );
bResult = sal_True;
}
catch( ::com::sun::star::uno::Exception& e )
{
(void)e;
DBG_ERROR(
(OString("SdrOle2Obj::Unload=(), "
"exception caught: ") +
rtl::OUStringToOString(
comphelper::anyToString( cppu::getCaughtException() ),
RTL_TEXTENCODING_UTF8 )).getStr() );
}
}
return bResult;
}
// -----------------------------------------------------------------------------
2000-09-18 16:07:07 +00:00
BOOL SdrOle2Obj::Unload()
{
BOOL bUnloaded = FALSE;
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
if( xObjRef.is() )
2000-09-18 16:07:07 +00:00
{
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
//TODO/LATER: no refcounting tricks anymore!
//"customers" must register as state change listeners
2000-09-18 16:07:07 +00:00
//Nicht notwendig im Doc DTor (MM)
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
//ULONG nRefCount = (*ppObjRef)->GetRefCount();
2000-09-18 16:07:07 +00:00
// prevent Unload if there are external references
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
//if( nRefCount > 2 )
// return FALSE;
//DBG_ASSERT( nRefCount == 2, "Wrong RefCount for unload" );
2000-09-18 16:07:07 +00:00
}
2001-04-12 09:06:03 +00:00
else
bUnloaded = TRUE;
2000-09-18 16:07:07 +00:00
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
if ( pModel && xObjRef.is() )
2000-09-18 16:07:07 +00:00
{
bUnloaded = Unload( xObjRef.GetObject(), GetAspect() );
2000-09-18 16:07:07 +00:00
}
return bUnloaded;
}
// -----------------------------------------------------------------------------
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
void SdrOle2Obj::GetObjRef_Impl()
2000-09-18 16:07:07 +00:00
{
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
if ( !xObjRef.is() && mpImpl->aPersistName.Len() && pModel && pModel->GetPersist() )
2000-09-18 16:07:07 +00:00
{
// #107645#
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
// Only try loading if it did not went wrong up to now
if(!mpImpl->mbLoadingOLEObjectFailed)
{
xObjRef.Assign( pModel->GetPersist()->getEmbeddedObjectContainer().GetEmbeddedObject( mpImpl->aPersistName ), GetAspect() );
m_bTypeAsked = false;
CheckFileLink_Impl();
// #107645#
// If loading of OLE object failed, remember that to not invoke a endless
// loop trying to load it again and again.
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
if( xObjRef.is() )
{
mpImpl->mbLoadingOLEObjectFailed = sal_True;
}
// #108759# For math objects, set closed state to transparent
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
if( ImplIsMathObj( xObjRef.GetObject() ) )
SetClosedObj( false );
}
2000-09-18 16:07:07 +00:00
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
if ( xObjRef.is() )
2000-09-18 16:07:07 +00:00
{
if( !IsEmptyPresObj() )
{
// #75637# remember modified status of model
const sal_Bool bWasChanged(pModel ? pModel->IsChanged() : sal_False);
2000-09-18 16:07:07 +00:00
// perhaps preview not valid anymore
// #75637# This line changes the modified state of the model
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
SetGraphic_Impl( NULL );
2000-09-18 16:07:07 +00:00
// #75637# if status was not set before, force it back
// to not set, so that SetGraphic(0L) above does not
// set the modified state of the model.
if(!bWasChanged && pModel && pModel->IsChanged())
{
pModel->SetChanged( sal_False );
}
2000-09-18 16:07:07 +00:00
}
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
sal_Int64 nMiscStatus = xObjRef->getStatus( GetAspect() );
(void)nMiscStatus;
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
//TODO/LATER: wait until ResizeOnPrinterChange is defined
//if ( nMiscStatus & SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE )
2000-09-18 16:07:07 +00:00
{
if (pModel && pModel->GetRefDevice() &&
pModel->GetRefDevice()->GetOutDevType() == OUTDEV_PRINTER)
{
if(!bInDestruction)
{
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
//TODO/LATER: printerchange notification
/*
// prevent SetModified (don't want no update here)
sal_Bool bWasEnabled = (*ppObjRef)->IsEnableSetModified();
if ( bWasEnabled )
(*ppObjRef)->EnableSetModified( sal_False );
// Kein RefDevice oder RefDevice kein Printer
Printer* pPrinter = (Printer*) pModel->GetRefDevice();
(*ppObjRef)->OnDocumentPrinterChanged( pPrinter );
// reset state
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
(*ppObjRef)->EnableSetModified( bWasEnabled );*/
}
2000-09-18 16:07:07 +00:00
}
}
}
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
if ( xObjRef.is() )
Connect();
2000-09-18 16:07:07 +00:00
}
if ( mpImpl->mbConnected )
// move object to first position in cache
GetSdrGlobalData().GetOLEObjCache().InsertObj(this);
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
}
2000-09-18 16:07:07 +00:00
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
uno::Reference < embed::XEmbeddedObject > SdrOle2Obj::GetObjRef() const
{
const_cast<SdrOle2Obj*>(this)->GetObjRef_Impl();
return xObjRef.GetObject();
2000-09-18 16:07:07 +00:00
}
CWS-TOOLING: integrate CWS fwk92 2008-12-04 14:43:28 +0100 oc r264844 : #i96788# 2008-12-03 02:15:17 +0100 fredrikh r264734 : i96817 2008-12-02 16:42:46 +0100 tbo r264720 : #i96763# changes to password dialog for framework, math, global 2008-11-26 16:26:28 +0100 mav r264418 : #i93617# fix typo 2008-11-26 16:13:03 +0100 mav r264411 : #i93617# fix the linux scenario 2008-11-25 17:58:01 +0100 mav r264323 : #i93617# fix the windows problems 2008-11-25 17:51:33 +0100 mav r264321 : #i93617# fix the windows problems 2008-11-21 16:01:18 +0100 mav r264145 : #i78753# integrate the patch 2008-11-21 14:08:32 +0100 mav r264136 : #i93617# integrate the patch 2008-11-21 13:01:56 +0100 mav r264127 : #i82947# integrate the patch 2008-11-20 18:14:19 +0100 mav r264092 : #i95793# look for import filter 2008-11-18 15:23:44 +0100 pb r263776 : fix: #i92579# #i92583# SvxSecurity/SearchPage: more space for controls 2008-11-18 15:21:39 +0100 pb r263774 : fix: #i92579# #i92583# SvxSecurity/SearchPage: more space for controls 2008-11-18 15:18:54 +0100 pb r263772 : fix: #i92583# SvxSearchPage::InitControls_Impl() added 2008-11-18 15:16:07 +0100 pb r263771 : fix: #i92579# columns calculated newly 2008-11-18 11:09:28 +0100 mav r263751 : #i21923# small fixes 2008-11-17 17:22:04 +0100 mav r263730 : #i21923# integrate the patch 2008-11-17 14:29:02 +0100 mav r263723 : #i21923# integrate the patch 2008-11-13 16:46:08 +0100 mav r263653 : #i88127# integrate the patch 2008-11-13 14:46:56 +0100 mav r263645 : #i54638# integrate the patch 2008-11-11 13:11:03 +0100 pb r263554 : fix: #i93142# disable maRecommReadOnlyCB on read-only documents 2008-11-10 13:30:58 +0100 pb r263516 : fix: #i93833# Mozilla Plug-in -> Browser Plug-in 2008-11-10 13:29:10 +0100 pb r263515 : fix: #i93833# Mozilla Plug-in -> Browser Plug-in 2008-11-10 06:10:11 +0100 pb r263505 : fix: #i94937# now .uno.ExtendedHelp without image 2008-11-04 20:52:50 +0100 mav r263337 : migrate cws fwk92 to svn
2008-12-12 12:52:51 +00:00
uno::Reference < embed::XEmbeddedObject > SdrOle2Obj::GetObjRef_NoInit() const
{
return xObjRef.GetObject();
}
// -----------------------------------------------------------------------------
2000-09-18 16:07:07 +00:00
uno::Reference< frame::XModel > SdrOle2Obj::getXModel() const
{
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
GetObjRef();
if ( svt::EmbeddedObjectRef::TryRunningState(xObjRef.GetObject()) )
INTEGRATION: CWS mav09 (1.42.58); FILE MERGED 2004/09/08 10:22:11 mav 1.42.58.25: #i27773# do not try to retrieve object if there is no persist name 2004/09/07 15:19:37 mav 1.42.58.24: #i27773# paint embedded objects 2004/09/03 11:13:03 mba 1.42.58.23: #i27773#: use one single method to clear on SdrOleObject 2004/09/01 14:29:39 mba 1.42.58.22: #i27773#: COM-Objects on Linux must work in Loaded state 2004/08/30 17:06:32 mav 1.42.58.21: #i27773# chart update 2004/07/15 12:17:08 mba 1.42.58.20: #i27773#: cleaning up todos 2004/07/06 16:19:29 mba 1.42.58.19: #i27773#: work on TODOs 2004/07/06 16:12:00 mav 1.42.58.18: #i27773# shading of outplace activated objects 2004/07/02 08:44:36 mba 1.42.58.17: #i27773#: some ToDos 2004/06/10 16:47:05 mba 1.42.58.16: #i27773#: some fixed to make InPlace Editing work; fixed for MS import 2004/06/02 11:48:59 mba 1.42.58.15: #i27773#: SetObjRef shouldn't close objects, the control is taken over by the caller 2004/06/01 08:11:48 mba 1.42.58.14: #i27773#: new embedding API 2004/05/28 16:18:27 mba 1.42.58.13: #27773#: Maintain ViewAspect on SdrOleObject 2004/05/19 14:28:52 mav 1.42.58.12: #i27773# resolve resync problems 2004/05/17 20:56:53 mav 1.42.58.11: RESYNC: (1.43-1.44); FILE MERGED 2004/05/16 17:29:05 mba 1.42.58.10: #i27773#: new EmbeddedObjectContainer 2004/05/10 08:08:23 mba 1.42.58.9: #i27773#: some work done for proper object sharing 2004/05/06 16:48:35 mba 1.42.58.8: #i27773#: always use graphic objects instead of MetaFiles 2004/05/05 12:02:19 mba 1.42.58.7: #i27773#: retrieve new Metafile after OLE object has been saved 2004/05/04 14:04:34 mba 1.42.58.6: #i27773#: remove so3 2004/04/29 20:16:33 mav 1.42.58.5: RESYNC: (1.42-1.43); FILE MERGED 2004/04/26 11:55:37 mba 1.42.58.4: #i27773#: new embedding API 2004/04/23 17:01:50 mba 1.42.58.3: #i27773#: work with new embedding API 2004/04/21 14:45:29 mba 1.42.58.2: #i27773#: new storage and embedding API 2004/04/14 14:10:53 mba 1.42.58.1: #i27773#: remove so3; new storage API
2004-10-04 16:54:47 +00:00
return uno::Reference< frame::XModel >( xObjRef->getComponent(), uno::UNO_QUERY );
else
return uno::Reference< frame::XModel >();
2000-09-18 16:07:07 +00:00
}
// -----------------------------------------------------------------------------
// #109985#
sal_Bool SdrOle2Obj::IsChart() const
{
if ( !m_bTypeAsked )
{
m_bChart = ChartPrettyPainter::IsChart(xObjRef);
m_bTypeAsked = true;
}
return m_bChart;
}
// -----------------------------------------------------------------------------
void SdrOle2Obj::SetGraphicToObj( const Graphic& aGraphic, const ::rtl::OUString& aMediaType )
{
xObjRef.SetGraphic( aGraphic, aMediaType );
}
// -----------------------------------------------------------------------------
void SdrOle2Obj::SetGraphicToObj( const uno::Reference< io::XInputStream >& xGrStream, const ::rtl::OUString& aMediaType )
{
xObjRef.SetGraphicStream( xGrStream, aMediaType );
}
// -----------------------------------------------------------------------------
sal_Bool SdrOle2Obj::IsCalc() const
{
if ( !xObjRef.is() )
return false;
SvGlobalName aObjClsId( xObjRef->getClassID() );
if( SvGlobalName(SO3_SC_CLASSID_30) == aObjClsId
|| SvGlobalName(SO3_SC_CLASSID_40) == aObjClsId
|| SvGlobalName(SO3_SC_CLASSID_50) == aObjClsId
|| SvGlobalName(SO3_SC_CLASSID_60) == aObjClsId
|| SvGlobalName(SO3_SC_OLE_EMBED_CLASSID_60) == aObjClsId
|| SvGlobalName(SO3_SC_OLE_EMBED_CLASSID_8) == aObjClsId
|| SvGlobalName(SO3_SC_CLASSID) == aObjClsId )
{
return sal_True;
}
return sal_False;
}
// -----------------------------------------------------------------------------
uno::Reference< frame::XModel > SdrOle2Obj::GetParentXModel() const
{
uno::Reference< frame::XModel > xDoc;
if ( pModel )
xDoc.set( pModel->getUnoModel(),uno::UNO_QUERY);
return xDoc;
}
// -----------------------------------------------------------------------------
sal_Bool SdrOle2Obj::CalculateNewScaling( Fraction& aScaleWidth, Fraction& aScaleHeight, Size& aObjAreaSize )
{
// TODO/LEAN: to avoid rounding errors scaling always uses the VisArea.
// If we don't cache it for own objects also we must load the object here
if ( !xObjRef.is() || !pModel )
return sal_False;
MapMode aMapMode( pModel->GetScaleUnit() );
aObjAreaSize = xObjRef.GetSize( &aMapMode );
Size aSize = aRect.GetSize();
aScaleWidth = Fraction(aSize.Width(), aObjAreaSize.Width() );
aScaleHeight = Fraction(aSize.Height(), aObjAreaSize.Height() );
// reduce to 10 binary digits
Kuerzen(aScaleHeight, 10);
Kuerzen(aScaleWidth, 10);
return sal_True;
}
// -----------------------------------------------------------------------------
sal_Bool SdrOle2Obj::AddOwnLightClient()
{
// The Own Light Client must be registered in object only using this method!
if ( !SfxInPlaceClient::GetClient( dynamic_cast<SfxObjectShell*>(pModel->GetPersist()), xObjRef.GetObject() )
&& !( mpImpl->pLightClient && xObjRef->getClientSite() == uno::Reference< embed::XEmbeddedClient >( mpImpl->pLightClient ) ) )
{
Connect();
if ( xObjRef.is() && mpImpl->pLightClient )
{
Fraction aScaleWidth;
Fraction aScaleHeight;
Size aObjAreaSize;
if ( CalculateNewScaling( aScaleWidth, aScaleHeight, aObjAreaSize ) )
{
mpImpl->pLightClient->SetSizeScale( aScaleWidth, aScaleHeight );
try {
xObjRef->setClientSite( mpImpl->pLightClient );
return sal_True;
} catch( uno::Exception& )
{}
}
}
return sal_False;
}
return sal_True;
}
2008-08-19 22:24:05 +00:00
//////////////////////////////////////////////////////////////////////////////
CWS-TOOLING: integrate CWS aw075 2009-08-12 18:26:05 +0200 aw r274912 : #i97672# use SelectionMaximumLuminancePercent to limit the hilight color to be not too invisible 2009-08-12 18:25:53 +0200 aw r274911 : #i97672# use SelectionMaximumLuminancePercent to limit the hilight color to be not too invisible 2009-08-12 18:25:20 +0200 aw r274910 : #i97672# Added SelectionMaximumLuminancePercent to decide which maximum luminance for the selection color to accept from the system 2009-08-12 18:00:17 +0200 aw r274908 : #i97672# added SelectionMaximumLuminancePercent which limits the luminance of the system's selection color to a maximum luminance (default is 70) 2009-08-11 14:01:07 +0200 aw r274859 : #i104150# take over values from transparence percent field even when disabled 2009-08-11 13:59:33 +0200 aw r274858 : #i103500# corrected the transparent SC overlay pixel alignment 2009-08-11 12:42:46 +0200 jsk r274854 : #i103937# Added two new controls to options/view page for transparency and opacity 2009-08-10 16:20:02 +0200 aw r274823 : #i97672# Adapting MF_SELECTION to #i35956# 2009-08-04 17:50:42 +0200 aw r274626 : #i102109# need to use AlphaMask instead of Bitmap 2009-08-04 17:03:25 +0200 aw r274624 : #i103982# corrected OutlinerParaObject owvership in GetBackgroundTextForwarder() 2009-08-04 12:18:11 +0200 aw r274614 : #i97672# corrected warning due to member initialisation 2009-08-03 11:54:16 +0200 aw r274571 : #i99268# corrected SdrExchangeView::GetObjGraphic 2009-07-31 14:22:57 +0200 aw r274529 : #i101520# added support for not correct 3d polygons for 3D polygon object which is used over API from chart directly 2009-07-31 13:25:20 +0200 aw r274527 : #i97672# added disabling selection options when system does not support them; slightly corrected positions 2009-07-31 13:20:32 +0200 aw r274526 : #i102706# Do not merge closed polygons when converting MetaFiles to SdrObjects 2009-07-30 18:03:07 +0200 aw r274499 : #i102175# corrected 1870 degree rotation situation for MetaFile paints 2009-07-30 17:06:31 +0200 aw r274496 : #i103709# corrected HitTest for callouts and DrawingLayer text objects 2009-07-29 18:55:22 +0200 aw r274465 : #i102956# corrected CutFindProcessor to back-transform all found cuts to the starting 3D coordinate system 2009-07-29 13:38:40 +0200 aw r274448 : #i103720# corrected mpAsynchLoadEvent usage 2009-07-29 12:48:12 +0200 aw r274447 : #i96762# cleanup: spaces 2009-07-28 19:11:31 +0200 aw r274427 : #97672# first version of reworked selection with changeable transparency and frame 2009-07-28 19:09:39 +0200 aw r274425 : #97672# first version of reworked selection with changeable transparency and frame 2009-07-28 19:09:27 +0200 aw r274424 : #97672# first version of reworked selection with changeable transparency and frame 2009-07-28 19:09:14 +0200 aw r274423 : #97672# first version of reworked selection with changeable transparency and frame 2009-07-28 19:08:59 +0200 aw r274422 : #97672# first version of reworked selection with changeable transparency and frame 2009-07-28 19:08:47 +0200 aw r274421 : #97672# first version of reworked selection with changeable transparency and frame 2009-07-28 15:44:50 +0200 aw r274411 : #i102556# corrected TextLayouterDevice::getTextBoundRect implementation and usage; empty Rectangles were not handled correctly 2009-07-23 17:48:36 +0200 aw r274277 : #i102063# implemented in-between OLE content holder (SdrOleContentPrimitive2D) and it's decomposition. Cleaned up diverse OLE graphic preparations 2009-07-22 12:55:12 +0200 aw r274227 : #i102109# extended OutputDevice::DrawTransparent (the version with TransparenceGradient) to work correctly with AntiAliased content 2009-07-21 13:31:12 +0200 aw r274191 : #i102611# changed scaling of Z-Range for Z-Buffer for ZBufferProcessor3D 2009-07-20 20:06:46 +0200 aw r274155 : #i103500# moved OverlayObjectCell back to use discrete coordinates for rectangle list 2009-07-16 17:33:26 +0200 aw r274065 : #i103530# corrected parameter preparation for MetaFile::Rotate call
2009-08-26 14:41:39 +00:00
Bitmap SdrOle2Obj::GetEmtyOLEReplacementBitmap()
2008-08-19 22:24:05 +00:00
{
return Bitmap(ResId(BMP_SVXOLEOBJ, *ImpGetResMgr()));
}
//////////////////////////////////////////////////////////////////////////////
void SdrOle2Obj::SetWindow(const com::sun::star::uno::Reference < com::sun::star::awt::XWindow >& _xWindow)
{
if ( xObjRef.is() && mpImpl->pLightClient )
{
mpImpl->pLightClient->setWindow(_xWindow);
}
}
2008-08-19 22:24:05 +00:00
//////////////////////////////////////////////////////////////////////////////
// eof
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */