Files
libreoffice/comphelper/source/container/embeddedobjectcontainer.cxx

1588 lines
61 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2012-06-29 14:02:24 +01:00
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/embed/EmbeddedObjectCreator.hpp>
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
#include <com/sun/star/embed/XLinkCreator.hpp>
#include <com/sun/star/embed/XEmbedPersist.hpp>
#include <com/sun/star/embed/XLinkageSupport.hpp>
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
#include <com/sun/star/embed/XTransactedObject.hpp>
#include <com/sun/star/embed/XOptimizedStorage.hpp>
#include <com/sun/star/embed/EntryInitModes.hpp>
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
#include <com/sun/star/util/XCloseable.hpp>
#include <com/sun/star/util/XModifiable.hpp>
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
#include <com/sun/star/embed/EmbedStates.hpp>
#include <com/sun/star/datatransfer/XTransferable.hpp>
#include <com/sun/star/beans/XPropertySetInfo.hpp>
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/embed/Aspects.hpp>
#include <com/sun/star/embed/EmbedMisc.hpp>
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
#include <comphelper/seqstream.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/storagehelper.hxx>
#include <comphelper/embeddedobjectcontainer.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/propertysequence.hxx>
#include <cppuhelper/weakref.hxx>
#include <sal/log.hxx>
#include <algorithm>
#include <unordered_map>
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
using namespace ::com::sun::star;
namespace comphelper {
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
typedef std::unordered_map<OUString, uno::Reference <embed::XEmbeddedObject>, OUStringHash>
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
EmbeddedObjectContainerNameMap;
struct EmbedImpl
{
// TODO/LATER: remove objects from temp. Container storage when object is disposed
EmbeddedObjectContainerNameMap maObjectContainer;
uno::Reference < embed::XStorage > mxStorage;
EmbeddedObjectContainer* mpTempObjectContainer;
uno::Reference < embed::XStorage > mxImageStorage;
uno::WeakReference < uno::XInterface > m_xModel;
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
//EmbeddedObjectContainerNameMap maTempObjectContainer;
//uno::Reference < embed::XStorage > mxTempStorage;
bool mbOwnsStorage : 1;
bool mbUserAllowsLinkUpdate : 1;
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
const uno::Reference < embed::XStorage >& GetReplacements();
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
};
const uno::Reference < embed::XStorage >& EmbedImpl::GetReplacements()
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
if ( !mxImageStorage.is() )
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
try
{
mxImageStorage = mxStorage->openStorageElement(
"ObjectReplacements", embed::ElementModes::READWRITE );
}
2012-01-03 10:10:37 +00:00
catch (const uno::Exception&)
{
mxImageStorage = mxStorage->openStorageElement(
"ObjectReplacements", embed::ElementModes::READ );
}
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
if ( !mxImageStorage.is() )
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
throw io::IOException();
return mxImageStorage;
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
EmbeddedObjectContainer::EmbeddedObjectContainer()
: pImpl(new EmbedImpl)
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
pImpl->mxStorage = ::comphelper::OStorageHelper::GetTemporaryStorage();
pImpl->mbOwnsStorage = true;
pImpl->mbUserAllowsLinkUpdate = true;
pImpl->mpTempObjectContainer = nullptr;
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
EmbeddedObjectContainer::EmbeddedObjectContainer( const uno::Reference < embed::XStorage >& rStor )
: pImpl(new EmbedImpl)
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
pImpl->mxStorage = rStor;
pImpl->mbOwnsStorage = false;
pImpl->mbUserAllowsLinkUpdate = true;
pImpl->mpTempObjectContainer = nullptr;
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
EmbeddedObjectContainer::EmbeddedObjectContainer( const uno::Reference < embed::XStorage >& rStor, const uno::Reference < uno::XInterface >& xModel )
: pImpl(new EmbedImpl)
{
pImpl->mxStorage = rStor;
pImpl->mbOwnsStorage = false;
pImpl->mbUserAllowsLinkUpdate = true;
pImpl->mpTempObjectContainer = nullptr;
pImpl->m_xModel = xModel;
}
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
void EmbeddedObjectContainer::SwitchPersistence( const uno::Reference < embed::XStorage >& rStor )
{
ReleaseImageSubStorage();
if ( pImpl->mbOwnsStorage )
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
pImpl->mxStorage->dispose();
pImpl->mxStorage = rStor;
pImpl->mbOwnsStorage = false;
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
bool EmbeddedObjectContainer::CommitImageSubStorage()
{
if ( pImpl->mxImageStorage.is() )
{
try
{
bool bReadOnlyMode = true;
uno::Reference < beans::XPropertySet > xSet(pImpl->mxImageStorage,uno::UNO_QUERY);
if ( xSet.is() )
{
// get the open mode from the parent storage
sal_Int32 nMode = 0;
uno::Any aAny = xSet->getPropertyValue("OpenMode");
if ( aAny >>= nMode )
bReadOnlyMode = !(nMode & embed::ElementModes::WRITE );
} // if ( xSet.is() )
if ( !bReadOnlyMode )
{
uno::Reference< embed::XTransactedObject > xTransact( pImpl->mxImageStorage, uno::UNO_QUERY_THROW );
xTransact->commit();
}
}
2012-01-03 10:10:37 +00:00
catch (const uno::Exception&)
{
return false;
}
}
return true;
}
void EmbeddedObjectContainer::ReleaseImageSubStorage()
{
CommitImageSubStorage();
if ( pImpl->mxImageStorage.is() )
{
try
{
pImpl->mxImageStorage->dispose();
pImpl->mxImageStorage.clear();
}
2012-01-03 10:10:37 +00:00
catch (const uno::Exception&)
{
SAL_WARN( "comphelper.container", "Problems releasing image substorage!\n" );
}
}
}
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
EmbeddedObjectContainer::~EmbeddedObjectContainer()
{
ReleaseImageSubStorage();
if ( pImpl->mbOwnsStorage )
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
pImpl->mxStorage->dispose();
delete pImpl->mpTempObjectContainer;
}
void EmbeddedObjectContainer::CloseEmbeddedObjects()
{
for( const auto& rObj : pImpl->maObjectContainer )
{
uno::Reference < util::XCloseable > xClose( rObj.second, uno::UNO_QUERY );
if( xClose.is() )
{
try
{
xClose->close( true );
}
2012-01-03 10:10:37 +00:00
catch (const uno::Exception&)
{
}
}
}
}
OUString EmbeddedObjectContainer::CreateUniqueObjectName()
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
OUString aPersistName("Object ");
OUString aStr;
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
sal_Int32 i=1;
do
{
aStr = aPersistName + OUString::number( i++ );
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
while( HasEmbeddedObject( aStr ) );
// TODO/LATER: should we consider deleted objects?
return aStr;
}
uno::Sequence < OUString > EmbeddedObjectContainer::GetObjectNames()
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
return comphelper::mapKeysToSequence(pImpl->maObjectContainer);
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
bool EmbeddedObjectContainer::HasEmbeddedObjects()
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
return pImpl->maObjectContainer.size() != 0;
}
bool EmbeddedObjectContainer::HasEmbeddedObject( const OUString& rName )
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
EmbeddedObjectContainerNameMap::iterator aIt = pImpl->maObjectContainer.find( rName );
if ( aIt == pImpl->maObjectContainer.end() )
{
uno::Reference < container::XNameAccess > xAccess( pImpl->mxStorage, uno::UNO_QUERY );
return xAccess->hasByName(rName);
}
else
return true;
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
bool EmbeddedObjectContainer::HasEmbeddedObject( const uno::Reference < embed::XEmbeddedObject >& xObj )
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
for( const auto& rObj : pImpl->maObjectContainer )
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
if( rObj.second == xObj )
return true;
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
return false;
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
bool EmbeddedObjectContainer::HasInstantiatedEmbeddedObject( const OUString& rName )
{
// allows to detect whether the object was already instantiated
// currently the filter instantiate it on loading, so this method allows
// to avoid objects pointing to the same persistence
EmbeddedObjectContainerNameMap::iterator aIt = pImpl->maObjectContainer.find( rName );
return ( aIt != pImpl->maObjectContainer.end() );
}
OUString EmbeddedObjectContainer::GetEmbeddedObjectName( const css::uno::Reference < css::embed::XEmbeddedObject >& xObj )
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
for( const auto& rObj : pImpl->maObjectContainer )
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
if( rObj.second == xObj )
return rObj.first;
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
SAL_WARN( "comphelper.container", "Unknown object!" );
return OUString();
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
uno::Reference< embed::XEmbeddedObject>
EmbeddedObjectContainer::GetEmbeddedObject(
const OUString& rName, OUString const*const pBaseURL)
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
SAL_WARN_IF( rName.isEmpty(), "comphelper.container", "Empty object name!");
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
uno::Reference < embed::XEmbeddedObject > xObj;
EmbeddedObjectContainerNameMap::iterator aIt = pImpl->maObjectContainer.find( rName );
#if OSL_DEBUG_LEVEL > 1
uno::Reference < container::XNameAccess > xAccess( pImpl->mxStorage, uno::UNO_QUERY );
uno::Sequence< OUString> aSeq = xAccess->getElementNames();
const OUString* pIter = aSeq.getConstArray();
const OUString* pEnd = pIter + aSeq.getLength();
for(;pIter != pEnd;++pIter)
{
(void)*pIter;
}
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
OSL_ENSURE( aIt != pImpl->maObjectContainer.end() || xAccess->hasByName(rName), "Could not return object!" );
#endif
// check if object was already created
if ( aIt != pImpl->maObjectContainer.end() )
xObj = (*aIt).second;
else
xObj = Get_Impl(rName, uno::Reference<embed::XEmbeddedObject>(), pBaseURL);
return xObj;
}
uno::Reference<embed::XEmbeddedObject> EmbeddedObjectContainer::Get_Impl(
const OUString& rName,
const uno::Reference<embed::XEmbeddedObject>& xCopy,
rtl::OUString const*const pBaseURL)
{
uno::Reference < embed::XEmbeddedObject > xObj;
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
try
{
// create the object from the storage
uno::Reference < beans::XPropertySet > xSet( pImpl->mxStorage, uno::UNO_QUERY );
bool bReadOnlyMode = true;
if ( xSet.is() )
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
// get the open mode from the parent storage
sal_Int32 nMode = 0;
uno::Any aAny = xSet->getPropertyValue("OpenMode");
if ( aAny >>= nMode )
bReadOnlyMode = !(nMode & embed::ElementModes::WRITE );
}
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
// object was not added until now - should happen only by calling this method from "inside"
//TODO/LATER: it would be good to detect an error when an object should be created already, but isn't (not an "inside" call)
uno::Reference < embed::XEmbeddedObjectCreator > xFactory = embed::EmbeddedObjectCreator::create( ::comphelper::getProcessComponentContext() );
uno::Sequence< beans::PropertyValue > aObjDescr(1 + (xCopy.is() ? 1 : 0) + (pBaseURL ? 1 : 0));
aObjDescr[0].Name = "Parent";
aObjDescr[0].Value <<= pImpl->m_xModel.get();
sal_Int32 i = 1;
if (pBaseURL)
{
aObjDescr[i].Name = "DefaultParentBaseURL";
aObjDescr[i].Value <<= *pBaseURL;
++i;
}
if ( xCopy.is() )
{
aObjDescr[i].Name = "CloneFrom";
aObjDescr[i].Value <<= xCopy;
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
uno::Sequence< beans::PropertyValue > aMediaDescr( 1 );
aMediaDescr[0].Name = "ReadOnly";
aMediaDescr[0].Value <<= bReadOnlyMode;
xObj.set( xFactory->createInstanceInitFromEntry(
pImpl->mxStorage, rName,
aMediaDescr, aObjDescr ), uno::UNO_QUERY );
// insert object into my list
AddEmbeddedObject( xObj, rName );
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
catch (uno::Exception const& e)
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
SAL_WARN("comphelper.container", "EmbeddedObjectContainer::Get_Impl: exception caught: " << e.Message);
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
return xObj;
}
uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::CreateEmbeddedObject( const uno::Sequence < sal_Int8 >& rClassId,
const uno::Sequence < beans::PropertyValue >& rArgs, OUString& rNewName, OUString const* pBaseURL )
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
if ( rNewName.isEmpty() )
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
rNewName = CreateUniqueObjectName();
SAL_WARN_IF( HasEmbeddedObject(rNewName), "comphelper.container", "Object to create already exists!");
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
// create object from classid by inserting it into storage
uno::Reference < embed::XEmbeddedObject > xObj;
try
{
uno::Reference < embed::XEmbeddedObjectCreator > xFactory = embed::EmbeddedObjectCreator::create( ::comphelper::getProcessComponentContext() );
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
const size_t nExtraArgs = pBaseURL ? 2 : 1;
uno::Sequence< beans::PropertyValue > aObjDescr( rArgs.getLength() + nExtraArgs );
aObjDescr[0].Name = "Parent";
aObjDescr[0].Value <<= pImpl->m_xModel.get();
if (pBaseURL)
{
aObjDescr[1].Name = "DefaultParentBaseURL";
aObjDescr[1].Value <<= *pBaseURL;
}
::std::copy( rArgs.begin(), rArgs.end(), aObjDescr.getArray() + nExtraArgs );
xObj.set( xFactory->createInstanceInitNew(
rClassId, OUString(), pImpl->mxStorage, rNewName,
aObjDescr ), uno::UNO_QUERY );
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
AddEmbeddedObject( xObj, rNewName );
OSL_ENSURE( !xObj.is() || xObj->getCurrentState() != embed::EmbedStates::LOADED,
"A freshly create object should be running always!\n" );
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
catch (uno::Exception const& e)
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
SAL_WARN("comphelper.container", "EmbeddedObjectContainer::CreateEmbeddedObject: exception caught: " << e.Message);
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
return xObj;
}
uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::CreateEmbeddedObject( const uno::Sequence < sal_Int8 >& rClassId, OUString& rNewName, OUString const* pBaseURL )
{
return CreateEmbeddedObject( rClassId, uno::Sequence < beans::PropertyValue >(), rNewName, pBaseURL );
}
void EmbeddedObjectContainer::AddEmbeddedObject( const css::uno::Reference < css::embed::XEmbeddedObject >& xObj, const OUString& rName )
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
#if OSL_DEBUG_LEVEL > 1
SAL_WARN_IF( rName.isEmpty(), "comphelper.container", "Added object doesn't have a name!");
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
uno::Reference < container::XNameAccess > xAccess( pImpl->mxStorage, uno::UNO_QUERY );
uno::Reference < embed::XEmbedPersist > xEmb( xObj, uno::UNO_QUERY );
uno::Reference < embed::XLinkageSupport > xLink( xEmb, uno::UNO_QUERY );
2014-03-29 18:15:35 +01:00
// if the object has a persistence and the object is not a link than it must have persistence entry in the storage
OSL_ENSURE( !( xEmb.is() && ( !xLink.is() || !xLink->isLink() ) ) || xAccess->hasByName(rName),
"Added element not in storage!" );
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
#endif
// remember object - it needs to be in storage already
EmbeddedObjectContainerNameMap::iterator aIt = pImpl->maObjectContainer.find( rName );
OSL_ENSURE( aIt == pImpl->maObjectContainer.end(), "Element already inserted!" );
pImpl->maObjectContainer[ rName ] = xObj;
uno::Reference < container::XChild > xChild( xObj, uno::UNO_QUERY );
if ( xChild.is() && xChild->getParent() != pImpl->m_xModel.get() )
xChild->setParent( pImpl->m_xModel.get() );
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
2014-03-29 18:25:27 +01:00
// look for object in temporary container
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
if ( pImpl->mpTempObjectContainer )
{
EmbeddedObjectContainerNameMap::iterator aEnd = pImpl->mpTempObjectContainer->pImpl->maObjectContainer.end();
for( EmbeddedObjectContainerNameMap::iterator aIter = pImpl->mpTempObjectContainer->pImpl->maObjectContainer.begin();
aIter != aEnd;
++aIter )
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
if ( aIter->second == xObj )
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
// copy replacement image from temporary container (if there is any)
OUString aTempName = aIter->first;
OUString aMediaType;
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
uno::Reference < io::XInputStream > xStream = pImpl->mpTempObjectContainer->GetGraphicStream( xObj, &aMediaType );
if ( xStream.is() )
{
InsertGraphicStream( xStream, rName, aMediaType );
xStream = nullptr;
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
pImpl->mpTempObjectContainer->RemoveGraphicStream( aTempName );
}
// remove object from storage of temporary container
uno::Reference < embed::XEmbedPersist > xPersist( xObj, uno::UNO_QUERY );
if ( xPersist.is() )
{
try
{
pImpl->mpTempObjectContainer->pImpl->mxStorage->removeElement( aTempName );
}
2012-01-03 10:10:37 +00:00
catch (const uno::Exception&)
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
}
}
// temp. container needs to forget the object
pImpl->mpTempObjectContainer->pImpl->maObjectContainer.erase( aIter );
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
break;
}
}
}
}
bool EmbeddedObjectContainer::StoreEmbeddedObject(
const uno::Reference < embed::XEmbeddedObject >& xObj, OUString& rName, bool bCopy,
const OUString& rSrcShellID, const OUString& rDestShellID )
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
uno::Reference < embed::XEmbedPersist > xPersist( xObj, uno::UNO_QUERY );
if ( rName.isEmpty() )
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
rName = CreateUniqueObjectName();
#if OSL_DEBUG_LEVEL > 1
uno::Reference < container::XNameAccess > xAccess( pImpl->mxStorage, uno::UNO_QUERY );
OSL_ENSURE( !xPersist.is() || !xAccess->hasByName(rName), "Inserting element already present in storage!" );
OSL_ENSURE( xPersist.is() || xObj->getCurrentState() == embed::EmbedStates::RUNNING, "Non persistent object inserted!");
#endif
// insert objects' storage into the container storage (if object has one)
try
{
if ( xPersist.is() )
{
uno::Sequence < beans::PropertyValue > aSeq;
if ( bCopy )
{
auto aObjArgs(::comphelper::InitPropertySequence({
{ "SourceShellID", uno::makeAny(rSrcShellID) },
{ "DestinationShellID", uno::makeAny(rDestShellID) }
}));
xPersist->storeToEntry(pImpl->mxStorage, rName, aSeq, aObjArgs);
}
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
else
{
2014-03-29 18:13:39 +01:00
//TODO/LATER: possible optimization, don't store immediately
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
//xPersist->setPersistentEntry( pImpl->mxStorage, rName, embed::EntryInitModes::ENTRY_NO_INIT, aSeq, aSeq );
xPersist->storeAsEntry( pImpl->mxStorage, rName, aSeq, aSeq );
xPersist->saveCompleted( true );
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
}
}
catch (uno::Exception const& e)
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
SAL_WARN("comphelper.container", "EmbeddedObjectContainer::StoreEmbeddedObject: exception caught: " << e.Message);
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
// TODO/LATER: better error recovery should keep storage intact
return false;
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
return true;
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
bool EmbeddedObjectContainer::InsertEmbeddedObject( const uno::Reference < embed::XEmbeddedObject >& xObj, OUString& rName )
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
// store it into the container storage
if (StoreEmbeddedObject(xObj, rName, false, OUString(), OUString()))
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
// remember object
AddEmbeddedObject( xObj, rName );
return true;
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
else
return false;
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::InsertEmbeddedObject( const uno::Reference < io::XInputStream >& xStm, OUString& rNewName )
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
if ( rNewName.isEmpty() )
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
rNewName = CreateUniqueObjectName();
// store it into the container storage
bool bIsStorage = false;
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
try
{
// first try storage persistence
uno::Reference < embed::XStorage > xStore = ::comphelper::OStorageHelper::GetStorageFromInputStream( xStm );
// storage was created from stream successfully
bIsStorage = true;
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
uno::Reference < embed::XStorage > xNewStore = pImpl->mxStorage->openStorageElement( rNewName, embed::ElementModes::READWRITE );
xStore->copyToStorage( xNewStore );
}
2012-01-03 10:10:37 +00:00
catch (const uno::Exception&)
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
if ( bIsStorage )
// it is storage persistence, but opening of new substorage or copying to it failed
return uno::Reference < embed::XEmbeddedObject >();
// stream didn't contain a storage, now try stream persistence
try
{
uno::Reference < io::XStream > xNewStream = pImpl->mxStorage->openStreamElement( rNewName, embed::ElementModes::READWRITE );
::comphelper::OStorageHelper::CopyInputToOutput( xStm, xNewStream->getOutputStream() );
// No mediatype is provided so the default for OLE objects value is used
// it is correct so for now, but what if somebody introduces a new stream based embedded object?
// Probably introducing of such an object must be restricted ( a storage must be used! ).
uno::Reference< beans::XPropertySet > xProps( xNewStream, uno::UNO_QUERY_THROW );
xProps->setPropertyValue("MediaType",
uno::makeAny( OUString( "application/vnd.sun.star.oleobject" ) ) );
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
catch (uno::Exception const& e)
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
// complete disaster!
SAL_WARN("comphelper.container", "EmbeddedObjectContainer::InsertEmbeddedObject: exception caught: " << e.Message);
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
return uno::Reference < embed::XEmbeddedObject >();
}
}
// stream was copied into the container storage in either way, now try to open something form it
uno::Reference < embed::XEmbeddedObject > xRet = GetEmbeddedObject( rNewName );
try
{
if ( !xRet.is() )
// no object could be created, so withdraw insertion
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
pImpl->mxStorage->removeElement( rNewName );
}
2012-01-03 10:10:37 +00:00
catch (const uno::Exception&)
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
}
return xRet;
}
uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::InsertEmbeddedObject( const css::uno::Sequence < css::beans::PropertyValue >& aMedium, OUString& rNewName, OUString const* pBaseURL )
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
if ( rNewName.isEmpty() )
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
rNewName = CreateUniqueObjectName();
uno::Reference < embed::XEmbeddedObject > xObj;
try
{
uno::Reference < embed::XEmbeddedObjectCreator > xFactory = embed::EmbeddedObjectCreator::create( ::comphelper::getProcessComponentContext() );
uno::Sequence< beans::PropertyValue > aObjDescr(pBaseURL ? 2 : 1);
aObjDescr[0].Name = "Parent";
aObjDescr[0].Value <<= pImpl->m_xModel.get();
if (pBaseURL)
{
aObjDescr[1].Name = "DefaultParentBaseURL";
aObjDescr[1].Value <<= *pBaseURL;
}
xObj.set( xFactory->createInstanceInitFromMediaDescriptor(
pImpl->mxStorage, rNewName, aMedium, aObjDescr ), uno::UNO_QUERY );
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
uno::Reference < embed::XEmbedPersist > xPersist( xObj, uno::UNO_QUERY );
OSL_ENSURE( !xObj.is() || xObj->getCurrentState() != embed::EmbedStates::LOADED,
"A freshly create object should be running always!\n" );
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
// possible optimization: store later!
if ( xPersist.is())
xPersist->storeOwn();
AddEmbeddedObject( xObj, rNewName );
}
2012-01-03 10:10:37 +00:00
catch (const uno::Exception&)
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
}
return xObj;
}
uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::InsertEmbeddedLink( const css::uno::Sequence < css::beans::PropertyValue >& aMedium, OUString& rNewName )
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
if ( rNewName.isEmpty() )
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
rNewName = CreateUniqueObjectName();
uno::Reference < embed::XEmbeddedObject > xObj;
try
{
uno::Reference < embed::XEmbeddedObjectCreator > xFactory = embed::EmbeddedObjectCreator::create(::comphelper::getProcessComponentContext());
uno::Sequence< beans::PropertyValue > aObjDescr( 1 );
aObjDescr[0].Name = "Parent";
aObjDescr[0].Value <<= pImpl->m_xModel.get();
xObj.set( xFactory->createInstanceLink( pImpl->mxStorage, rNewName, aMedium, aObjDescr ), uno::UNO_QUERY );
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
uno::Reference < embed::XEmbedPersist > xPersist( xObj, uno::UNO_QUERY );
OSL_ENSURE( !xObj.is() || xObj->getCurrentState() != embed::EmbedStates::LOADED,
"A freshly create object should be running always!\n" );
// possible optimization: store later!
if ( xPersist.is())
xPersist->storeOwn();
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
AddEmbeddedObject( xObj, rNewName );
}
catch (uno::Exception const& e)
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
SAL_WARN("comphelper", "EmbeddedObjectContainer::InsertEmbeddedLink: "
"exception caught: " << e.Message);
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
return xObj;
}
bool EmbeddedObjectContainer::TryToCopyGraphReplacement( EmbeddedObjectContainer& rSrc,
const OUString& aOrigName,
const OUString& aTargetName )
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
bool bResult = false;
if ( ( &rSrc != this || !aOrigName.equals( aTargetName ) ) && !aOrigName.isEmpty() && !aTargetName.isEmpty() )
{
OUString aMediaType;
uno::Reference < io::XInputStream > xGrStream = rSrc.GetGraphicStream( aOrigName, &aMediaType );
if ( xGrStream.is() )
bResult = InsertGraphicStream( xGrStream, aTargetName, aMediaType );
}
return bResult;
}
uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::CopyAndGetEmbeddedObject(
EmbeddedObjectContainer& rSrc, const uno::Reference <embed::XEmbeddedObject>& xObj, OUString& rName,
const OUString& rSrcShellID, const OUString& rDestShellID )
{
uno::Reference< embed::XEmbeddedObject > xResult;
// TODO/LATER: For now only objects that implement XEmbedPersist have a replacement image, it might change in future
// do an incompatible change so that object name is provided in all the move and copy methods
OUString aOrigName;
try
{
uno::Reference < embed::XEmbedPersist > xPersist( xObj, uno::UNO_QUERY_THROW );
aOrigName = xPersist->getEntryName();
}
2012-01-03 10:10:37 +00:00
catch (const uno::Exception&)
{
}
if ( rName.isEmpty() )
rName = CreateUniqueObjectName();
2014-03-29 18:15:35 +01:00
// objects without persistence are not really stored by the method
if (xObj.is() && StoreEmbeddedObject(xObj, rName, true, rSrcShellID, rDestShellID))
{
SAL_INFO_IF(rDestShellID.isEmpty(), "comphelper.container",
"SfxObjectShell with no base URL?"); // every shell has a base URL, except the clipboard SwDocShell
xResult = Get_Impl(rName, xObj, &rDestShellID);
if ( !xResult.is() )
{
// this is a case when object has no real persistence
// in such cases a new object should be explicitly created and initialized with the data of the old one
try
{
uno::Reference< embed::XLinkageSupport > xOrigLinkage( xObj, uno::UNO_QUERY );
if ( xOrigLinkage.is() && xOrigLinkage->isLink() )
{
// this is a OOo link, it has no persistence
OUString aURL = xOrigLinkage->getLinkURL();
if ( aURL.isEmpty() )
throw uno::RuntimeException();
// create new linked object from the URL the link is based on
uno::Reference < embed::XEmbeddedObjectCreator > xCreator =
embed::EmbeddedObjectCreator::create( ::comphelper::getProcessComponentContext() );
uno::Sequence< beans::PropertyValue > aMediaDescr( 1 );
aMediaDescr[0].Name = "URL";
aMediaDescr[0].Value <<= aURL;
uno::Sequence< beans::PropertyValue > aObjDescr( 1 );
aObjDescr[0].Name = "Parent";
aObjDescr[0].Value <<= pImpl->m_xModel.get();
xResult.set(xCreator->createInstanceLink(
pImpl->mxStorage,
rName,
aMediaDescr,
aObjDescr ),
uno::UNO_QUERY_THROW );
}
else
{
// the component is required for copying of this object
if ( xObj->getCurrentState() == embed::EmbedStates::LOADED )
xObj->changeState( embed::EmbedStates::RUNNING );
// this must be an object based on properties, otherwise we can not copy it currently
uno::Reference< beans::XPropertySet > xOrigProps( xObj->getComponent(), uno::UNO_QUERY_THROW );
2014-03-29 18:16:18 +01:00
// use object class ID to create a new one and transfer all the properties
uno::Reference < embed::XEmbeddedObjectCreator > xCreator =
embed::EmbeddedObjectCreator::create( ::comphelper::getProcessComponentContext() );
uno::Sequence< beans::PropertyValue > aObjDescr( 1 );
aObjDescr[0].Name = "Parent";
aObjDescr[0].Value <<= pImpl->m_xModel.get();
xResult.set(xCreator->createInstanceInitNew(
xObj->getClassID(),
xObj->getClassName(),
pImpl->mxStorage,
rName,
aObjDescr ),
uno::UNO_QUERY_THROW );
if ( xResult->getCurrentState() == embed::EmbedStates::LOADED )
xResult->changeState( embed::EmbedStates::RUNNING );
uno::Reference< beans::XPropertySet > xTargetProps( xResult->getComponent(), uno::UNO_QUERY_THROW );
// copy all the properties from xOrigProps to xTargetProps
uno::Reference< beans::XPropertySetInfo > xOrigInfo = xOrigProps->getPropertySetInfo();
if ( !xOrigInfo.is() )
throw uno::RuntimeException();
uno::Sequence< beans::Property > aPropertiesList = xOrigInfo->getProperties();
for ( sal_Int32 nInd = 0; nInd < aPropertiesList.getLength(); nInd++ )
{
try
{
xTargetProps->setPropertyValue(
aPropertiesList[nInd].Name,
xOrigProps->getPropertyValue( aPropertiesList[nInd].Name ) );
}
2012-01-03 10:10:37 +00:00
catch (const beans::PropertyVetoException&)
{
// impossibility to copy readonly property is not treated as an error for now
// but the assertion is helpful to detect such scenarios and review them
SAL_WARN( "comphelper.container", "Could not copy readonly property!\n" );
}
}
}
if ( xResult.is() )
AddEmbeddedObject( xResult, rName );
}
2012-01-03 10:10:37 +00:00
catch (const uno::Exception&)
{
if ( xResult.is() )
{
try
{
xResult->close( true );
}
2012-01-03 10:10:37 +00:00
catch (const uno::Exception&)
{
}
xResult.clear();
}
}
}
}
2014-03-29 18:15:35 +01:00
SAL_WARN_IF( !xResult.is(), "comphelper.container", "Can not copy embedded object that has no persistence!\n" );
if ( xResult.is() )
{
// the object is successfully copied, try to copy graphical replacement
if ( !aOrigName.isEmpty() )
TryToCopyGraphReplacement( rSrc, aOrigName, rName );
// the object might need the size to be set
try
{
if ( xResult->getStatus( embed::Aspects::MSOLE_CONTENT ) & embed::EmbedMisc::EMBED_NEEDSSIZEONLOAD )
xResult->setVisualAreaSize( embed::Aspects::MSOLE_CONTENT,
xObj->getVisualAreaSize( embed::Aspects::MSOLE_CONTENT ) );
}
2012-01-03 10:10:37 +00:00
catch (const uno::Exception&)
{
}
}
return xResult;
}
bool EmbeddedObjectContainer::MoveEmbeddedObject( EmbeddedObjectContainer& rSrc, const uno::Reference < embed::XEmbeddedObject >& xObj, OUString& rName )
{
// get the object name before(!) it is assigned to a new storage
uno::Reference < embed::XEmbedPersist > xPersist( xObj, uno::UNO_QUERY );
OUString aName;
if ( xPersist.is() )
aName = xPersist->getEntryName();
// now move the object to the new container; the returned name is the new persist name in this container
bool bRet;
try
{
bRet = InsertEmbeddedObject( xObj, rName );
if ( bRet )
TryToCopyGraphReplacement( rSrc, aName, rName );
}
2012-01-03 10:10:37 +00:00
catch (const uno::Exception&)
{
SAL_WARN( "comphelper.container", "Failed to insert embedded object into storage!" );
bRet = false;
}
if ( bRet )
{
// now remove the object from the former container
bRet = false;
EmbeddedObjectContainerNameMap::iterator aEnd = rSrc.pImpl->maObjectContainer.end();
for( EmbeddedObjectContainerNameMap::iterator aIter = rSrc.pImpl->maObjectContainer.begin();
aIter != aEnd;
++aIter )
{
if ( aIter->second == xObj )
{
rSrc.pImpl->maObjectContainer.erase( aIter );
bRet = true;
break;
}
}
SAL_WARN_IF( !bRet, "comphelper.container", "Object not found for removal!" );
if ( xPersist.is() )
{
// now it's time to remove the storage from the container storage
try
{
if ( xPersist.is() )
rSrc.pImpl->mxStorage->removeElement( aName );
}
2012-01-03 10:10:37 +00:00
catch (const uno::Exception&)
{
SAL_WARN( "comphelper.container", "Failed to remove object from storage!" );
bRet = false;
}
}
// rSrc.RemoveGraphicStream( aName );
}
return bRet;
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
// #i119941, bKeepToTempStorage: use to specify whether store the removed object to temporary storage+
bool EmbeddedObjectContainer::RemoveEmbeddedObject( const OUString& rName, bool bKeepToTempStorage )
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
uno::Reference < embed::XEmbeddedObject > xObj = GetEmbeddedObject( rName );
if ( xObj.is() )
return RemoveEmbeddedObject( xObj, bKeepToTempStorage );
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
else
return false;
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
bool EmbeddedObjectContainer::MoveEmbeddedObject( const OUString& rName, EmbeddedObjectContainer& rCnt )
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
// find object entry
EmbeddedObjectContainerNameMap::iterator aIt2 = rCnt.pImpl->maObjectContainer.find( rName );
OSL_ENSURE( aIt2 == rCnt.pImpl->maObjectContainer.end(), "Object does already exist in target container!" );
if ( aIt2 != rCnt.pImpl->maObjectContainer.end() )
return false;
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
uno::Reference < embed::XEmbeddedObject > xObj;
EmbeddedObjectContainerNameMap::iterator aIt = pImpl->maObjectContainer.find( rName );
if ( aIt != pImpl->maObjectContainer.end() )
{
xObj = (*aIt).second;
try
{
if ( xObj.is() )
{
// move object
OUString aName( rName );
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
rCnt.InsertEmbeddedObject( xObj, aName );
pImpl->maObjectContainer.erase( aIt );
uno::Reference < embed::XEmbedPersist > xPersist( xObj, uno::UNO_QUERY );
if ( xPersist.is() )
pImpl->mxStorage->removeElement( rName );
}
else
{
// copy storages; object *must* have persistence!
uno::Reference < embed::XStorage > xOld = pImpl->mxStorage->openStorageElement( rName, embed::ElementModes::READ );
uno::Reference < embed::XStorage > xNew = rCnt.pImpl->mxStorage->openStorageElement( rName, embed::ElementModes::READWRITE );
xOld->copyToStorage( xNew );
}
rCnt.TryToCopyGraphReplacement( *this, rName, rName );
// RemoveGraphicStream( rName );
return true;
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
2012-01-03 10:10:37 +00:00
catch (const uno::Exception&)
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
SAL_WARN( "comphelper.container", "Could not move object!");
return false;
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
}
else
SAL_WARN( "comphelper.container", "Unknown object!");
return false;
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
// #i119941, bKeepToTempStorage: use to specify whether store the removed object to temporary storage+
bool EmbeddedObjectContainer::RemoveEmbeddedObject( const uno::Reference < embed::XEmbeddedObject >& xObj, bool bKeepToTempStorage )
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
uno::Reference < embed::XEmbedPersist > xPersist( xObj, uno::UNO_QUERY );
OUString aName;
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
if ( xPersist.is() )
aName = xPersist->getEntryName();
#if OSL_DEBUG_LEVEL > 1
uno::Reference < container::XNameAccess > xAccess( pImpl->mxStorage, uno::UNO_QUERY );
uno::Reference < embed::XLinkageSupport > xLink( xPersist, uno::UNO_QUERY );
sal_Bool bIsNotEmbedded = !xPersist.is() || ( xLink.is() && xLink->isLink() );
2014-03-29 18:15:35 +01:00
// if the object has a persistence and the object is not a link than it must have persistence entry in the storage
OSL_ENSURE( bIsNotEmbedded || xAccess->hasByName(aName), "Removing element not present in storage!" );
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
#endif
// somebody still needs the object, so we must assign a temporary persistence
try
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
if ( xPersist.is() && bKeepToTempStorage ) // #i119941
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
if ( !pImpl->mpTempObjectContainer )
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
pImpl->mpTempObjectContainer = new EmbeddedObjectContainer();
try
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
// TODO/LATER: in future probably the temporary container will have two storages ( of two formats )
// the media type will be provided with object insertion
OUString aOrigStorMediaType;
uno::Reference< beans::XPropertySet > xStorProps( pImpl->mxStorage, uno::UNO_QUERY_THROW );
static const OUStringLiteral s_sMediaType("MediaType");
xStorProps->getPropertyValue( s_sMediaType ) >>= aOrigStorMediaType;
SAL_WARN_IF( aOrigStorMediaType.isEmpty(), "comphelper.container", "No valuable media type in the storage!\n" );
uno::Reference< beans::XPropertySet > xTargetStorProps(
pImpl->mpTempObjectContainer->pImpl->mxStorage,
uno::UNO_QUERY_THROW );
xTargetStorProps->setPropertyValue( s_sMediaType,uno::makeAny( aOrigStorMediaType ) );
}
catch (const uno::Exception&)
{
SAL_WARN( "comphelper.container", "Can not set the new media type to a storage!\n" );
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
}
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
OUString aTempName, aMediaType;
pImpl->mpTempObjectContainer->InsertEmbeddedObject( xObj, aTempName );
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
uno::Reference < io::XInputStream > xStream = GetGraphicStream( xObj, &aMediaType );
if ( xStream.is() )
pImpl->mpTempObjectContainer->InsertGraphicStream( xStream, aTempName, aMediaType );
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
// object is stored, so at least it can be set to loaded state
xObj->changeState( embed::EmbedStates::LOADED );
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
else
// objects without persistence need to stay in running state if they shall not be closed
xObj->changeState( embed::EmbedStates::RUNNING );
}
catch (const uno::Exception&)
{
return false;
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
bool bFound = false;
EmbeddedObjectContainerNameMap::iterator aEnd = pImpl->maObjectContainer.end();
for( EmbeddedObjectContainerNameMap::iterator aIter = pImpl->maObjectContainer.begin();
aIter != aEnd;
++aIter )
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
if ( aIter->second == xObj )
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
pImpl->maObjectContainer.erase( aIter );
bFound = true;
uno::Reference < container::XChild > xChild( xObj, uno::UNO_QUERY );
if ( xChild.is() )
xChild->setParent( uno::Reference < uno::XInterface >() );
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
break;
}
}
SAL_WARN_IF( !bFound,"comphelper.container", "Object not found for removal!" );
2011-01-24 10:57:21 +00:00
(void)bFound;
if ( xPersist.is() && bKeepToTempStorage ) // #i119941#
{
// remove replacement image (if there is one)
RemoveGraphicStream( aName );
// now it's time to remove the storage from the container storage
try
{
#if OSL_DEBUG_LEVEL > 1
2014-03-29 18:15:35 +01:00
// if the object has a persistence and the object is not a link than it must have persistence entry in storage
OSL_ENSURE( bIsNotEmbedded || pImpl->mxStorage->hasByName( aName ), "The object has no persistence entry in the storage!" );
#endif
if ( xPersist.is() && pImpl->mxStorage->hasByName( aName ) )
pImpl->mxStorage->removeElement( aName );
}
2012-01-03 10:10:37 +00:00
catch (const uno::Exception&)
{
SAL_WARN( "comphelper.container", "Failed to remove object from storage!" );
return false;
}
}
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
return true;
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
bool EmbeddedObjectContainer::CloseEmbeddedObject( const uno::Reference < embed::XEmbeddedObject >& xObj )
{
// disconnect the object from the container and close it if possible
bool bFound = false;
EmbeddedObjectContainerNameMap::iterator aEnd = pImpl->maObjectContainer.end();
for( EmbeddedObjectContainerNameMap::iterator aIter = pImpl->maObjectContainer.begin();
aIter != aEnd;
++aIter )
{
if ( aIter->second == xObj )
{
pImpl->maObjectContainer.erase( aIter );
bFound = true;
break;
}
}
if ( bFound )
{
uno::Reference < ::util::XCloseable > xClose( xObj, uno::UNO_QUERY );
try
{
xClose->close( true );
}
2012-01-03 10:10:37 +00:00
catch (const uno::Exception&)
{
// it is no problem if the object is already closed
// TODO/LATER: what if the object can not be closed?
}
}
return bFound;
}
uno::Reference < io::XInputStream > EmbeddedObjectContainer::GetGraphicStream( const OUString& aName, OUString* pMediaType )
{
uno::Reference < io::XInputStream > xStream;
SAL_WARN_IF( aName.isEmpty(), "comphelper.container", "Retrieving graphic for unknown object!" );
if ( !aName.isEmpty() )
{
try
{
uno::Reference < embed::XStorage > xReplacements = pImpl->GetReplacements();
uno::Reference < io::XStream > xGraphicStream = xReplacements->openStreamElement( aName, embed::ElementModes::READ );
xStream = xGraphicStream->getInputStream();
if ( pMediaType )
{
uno::Reference < beans::XPropertySet > xSet( xStream, uno::UNO_QUERY );
if ( xSet.is() )
{
uno::Any aAny = xSet->getPropertyValue("MediaType");
aAny >>= *pMediaType;
}
}
}
catch (uno::Exception const& e)
{
SAL_INFO("comphelper.container",
"EmbeddedObjectContainer::GetGraphicStream(): exception: " << e.Message);
}
}
return xStream;
}
uno::Reference < io::XInputStream > EmbeddedObjectContainer::GetGraphicStream( const css::uno::Reference < css::embed::XEmbeddedObject >& xObj, OUString* pMediaType )
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
// try to load it from the container storage
return GetGraphicStream( GetEmbeddedObjectName( xObj ), pMediaType );
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
bool EmbeddedObjectContainer::InsertGraphicStream( const css::uno::Reference < css::io::XInputStream >& rStream, const OUString& rObjectName, const OUString& rMediaType )
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
try
{
uno::Reference < embed::XStorage > xReplacements = pImpl->GetReplacements();
// store it into the subfolder
uno::Reference < io::XOutputStream > xOutStream;
uno::Reference < io::XStream > xGraphicStream = xReplacements->openStreamElement( rObjectName,
embed::ElementModes::READWRITE | embed::ElementModes::TRUNCATE );
xOutStream = xGraphicStream->getOutputStream();
::comphelper::OStorageHelper::CopyInputToOutput( rStream, xOutStream );
xOutStream->flush();
uno::Reference< beans::XPropertySet > xPropSet( xGraphicStream, uno::UNO_QUERY );
if ( !xPropSet.is() )
throw uno::RuntimeException();
xPropSet->setPropertyValue("UseCommonStoragePasswordEncryption",
uno::makeAny( true ) );
xPropSet->setPropertyValue("MediaType", uno::Any(rMediaType) );
xPropSet->setPropertyValue("Compressed",
uno::makeAny( true ) );
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
2012-01-03 10:10:37 +00:00
catch (const uno::Exception&)
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
return false;
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
return true;
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
bool EmbeddedObjectContainer::InsertGraphicStreamDirectly( const css::uno::Reference < css::io::XInputStream >& rStream, const OUString& rObjectName, const OUString& rMediaType )
{
try
{
uno::Reference < embed::XStorage > xReplacement = pImpl->GetReplacements();
uno::Reference < embed::XOptimizedStorage > xOptRepl( xReplacement, uno::UNO_QUERY_THROW );
// store it into the subfolder
uno::Sequence< beans::PropertyValue > aProps( 3 );
aProps[0].Name = "MediaType";
aProps[0].Value <<= rMediaType;
aProps[1].Name = "UseCommonStoragePasswordEncryption";
aProps[1].Value <<= true;
aProps[2].Name = "Compressed";
aProps[2].Value <<= true;
if ( xReplacement->hasByName( rObjectName ) )
xReplacement->removeElement( rObjectName );
xOptRepl->insertStreamElementDirect( rObjectName, rStream, aProps );
}
2012-01-03 10:10:37 +00:00
catch (const uno::Exception&)
{
return false;
}
return true;
}
bool EmbeddedObjectContainer::RemoveGraphicStream( const OUString& rObjectName )
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
try
{
uno::Reference < embed::XStorage > xReplacements = pImpl->GetReplacements();
xReplacements->removeElement( rObjectName );
}
2012-01-03 10:10:37 +00:00
catch (const uno::Exception&)
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
{
return false;
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
return true;
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
namespace {
void InsertStreamIntoPicturesStorage_Impl( const uno::Reference< embed::XStorage >& xDocStor,
const uno::Reference< io::XInputStream >& xInStream,
const OUString& aStreamName )
{
OSL_ENSURE( !aStreamName.isEmpty() && xInStream.is() && xDocStor.is(), "Misuse of the method!\n" );
try
{
uno::Reference< embed::XStorage > xPictures = xDocStor->openStorageElement(
"Pictures",
embed::ElementModes::READWRITE );
uno::Reference< io::XStream > xObjReplStr = xPictures->openStreamElement(
aStreamName,
embed::ElementModes::READWRITE | embed::ElementModes::TRUNCATE );
uno::Reference< io::XOutputStream > xOutStream(
xObjReplStr->getInputStream(), uno::UNO_QUERY_THROW );
::comphelper::OStorageHelper::CopyInputToOutput( xInStream, xOutStream );
xOutStream->closeOutput();
uno::Reference< embed::XTransactedObject > xTransact( xPictures, uno::UNO_QUERY );
if ( xTransact.is() )
xTransact->commit();
}
2012-01-03 10:10:37 +00:00
catch (const uno::Exception&)
{
SAL_WARN( "comphelper.container", "The pictures storage is not available!\n" );
}
}
}
bool EmbeddedObjectContainer::StoreAsChildren(bool _bOasisFormat,bool _bCreateEmbedded,const uno::Reference < embed::XStorage >& _xStorage)
{
bool bResult = false;
try
{
comphelper::EmbeddedObjectContainer aCnt( _xStorage );
const uno::Sequence < OUString > aNames = GetObjectNames();
const OUString* pIter = aNames.getConstArray();
const OUString* pEnd = pIter + aNames.getLength();
for(;pIter != pEnd;++pIter)
{
uno::Reference < embed::XEmbeddedObject > xObj = GetEmbeddedObject( *pIter );
SAL_WARN_IF( !xObj.is(), "comphelper.container", "An empty entry in the embedded objects list!\n" );
if ( xObj.is() )
{
bool bSwitchBackToLoaded = false;
uno::Reference< embed::XLinkageSupport > xLink( xObj, uno::UNO_QUERY );
uno::Reference < io::XInputStream > xStream;
OUString aMediaType;
sal_Int32 nCurState = xObj->getCurrentState();
if ( nCurState == embed::EmbedStates::LOADED || nCurState == embed::EmbedStates::RUNNING )
{
// means that the object is not active
// copy replacement image from old to new container
xStream = GetGraphicStream( xObj, &aMediaType );
}
if ( !xStream.is() && getUserAllowsLinkUpdate() )
{
// the image must be regenerated
// TODO/LATER: another aspect could be used
if ( xObj->getCurrentState() == embed::EmbedStates::LOADED )
bSwitchBackToLoaded = true;
xStream = GetGraphicReplacementStream(
embed::Aspects::MSOLE_CONTENT,
xObj,
&aMediaType );
}
CWS-TOOLING: integrate CWS cmcfixes51 2008-12-08 10:12:55 +0100 cmc r264975 : #i96203# protect with ifdefs to avoid unused symbol on mac 2008-12-05 12:23:47 +0100 cmc r264898 : CWS-TOOLING: rebase CWS cmcfixes51 to trunk@264807 (milestone: DEV300:m37) 2008-12-01 14:45:17 +0100 cmc r264606 : #i76655# ehlos apparently required 2008-11-28 17:49:30 +0100 cmc r264567 : #i96655# remove newly unused method 2008-11-28 10:41:28 +0100 cmc r264531 : #i96647# better ppc-bridges flushCode impl 2008-11-27 12:58:40 +0100 cmc r264478 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 12:32:49 +0100 cmc r264476 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 12:26:02 +0100 cmc r264475 : #i96655# redundant old table export helpers 2008-11-27 11:49:06 +0100 cmc r264473 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 11:38:35 +0100 cmc r264471 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 11:14:21 +0100 cmc r264467 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 11:06:22 +0100 cmc r264464 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 10:58:18 +0100 cmc r264462 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 10:41:44 +0100 cmc r264461 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 10:19:24 +0100 cmc r264460 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 10:13:39 +0100 cmc r264459 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 10:06:14 +0100 cmc r264458 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 09:59:54 +0100 cmc r264457 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 09:52:51 +0100 cmc r264456 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 09:48:26 +0100 cmc r264454 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 09:40:20 +0100 cmc r264452 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 09:35:26 +0100 cmc r264451 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 09:31:00 +0100 cmc r264450 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 09:24:08 +0100 cmc r264449 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 00:26:15 +0100 cmc r264443 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 00:21:01 +0100 cmc r264442 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 00:09:40 +0100 cmc r264441 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-26 23:51:56 +0100 cmc r264440 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-26 23:49:09 +0100 cmc r264439 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-26 18:09:54 +0100 cmc r264432 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-26 18:07:40 +0100 cmc r264431 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-26 17:28:02 +0100 cmc r264429 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-26 17:27:39 +0100 cmc r264428 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-26 17:18:36 +0100 cmc r264426 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-26 16:22:16 +0100 cmc r264415 : #i96624# make implicit braces and brackets explicit to avoid warnings 2008-11-26 16:00:23 +0100 cmc r264409 : #i90426# remove warnings from svtools 2008-11-26 15:59:17 +0100 cmc r264408 : #i90426# remove warnings 2008-11-26 15:47:32 +0100 cmc r264404 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-26 14:46:57 +0100 cmc r264394 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-26 14:19:50 +0100 cmc r264387 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-26 14:15:26 +0100 cmc r264386 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-26 14:11:26 +0100 cmc r264384 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-26 13:44:23 +0100 cmc r264380 : #i96084# comfirm existing logic with explicit brackets to remove new gcc warnings 2008-11-26 13:12:24 +0100 cmc r264372 : #i96604# silence new warnings 2008-11-26 12:35:02 +0100 cmc r264369 : #i96203# make qstarter work in 3-layer land 2008-11-26 12:33:04 +0100 cmc r264368 : #i96170# ensure gtypes are up and running
2008-12-11 07:05:03 +00:00
if ( _bOasisFormat || (xLink.is() && xLink->isLink()) )
{
if ( xStream.is() )
{
if ( _bOasisFormat )
{
// if it is an embedded object or the optimized inserting fails the normal inserting should be done
if ( _bCreateEmbedded
|| !aCnt.InsertGraphicStreamDirectly( xStream, *pIter, aMediaType ) )
aCnt.InsertGraphicStream( xStream, *pIter, aMediaType );
}
else
{
// it is a linked object exported into SO7 format
InsertStreamIntoPicturesStorage_Impl( _xStorage, xStream, *pIter );
}
}
}
uno::Reference< embed::XEmbedPersist > xPersist( xObj, uno::UNO_QUERY );
if ( xPersist.is() )
{
uno::Sequence< beans::PropertyValue > aArgs( _bOasisFormat ? 2 : 3 );
aArgs[0].Name = "StoreVisualReplacement";
aArgs[0].Value <<= !_bOasisFormat;
// if it is an embedded object or the optimized inserting fails the normal inserting should be done
aArgs[1].Name = "CanTryOptimization";
aArgs[1].Value <<= !_bCreateEmbedded;
if ( !_bOasisFormat )
{
// if object has no cached replacement it will use this one
aArgs[2].Name = "VisualReplacement";
aArgs[2].Value <<= xStream;
}
try
{
xPersist->storeAsEntry( _xStorage, xPersist->getEntryName(), uno::Sequence< beans::PropertyValue >(), aArgs );
}
catch (const embed::WrongStateException&)
{
SAL_WARN("comphelper.container", "failed to store '" << *pIter << "'");
}
}
if ( bSwitchBackToLoaded )
// switch back to loaded state; that way we have a minimum cache confusion
xObj->changeState( embed::EmbedStates::LOADED );
}
}
bResult = aCnt.CommitImageSubStorage();
}
catch (const uno::Exception& e)
{
// TODO/LATER: error handling
bResult = false;
SAL_WARN("comphelper.container", "failed. Message: " << e.Message);
}
// the old SO6 format does not store graphical replacements
if ( !_bOasisFormat && bResult )
{
try
{
// the substorage still can not be locked by the embedded object container
OUString aObjReplElement( "ObjectReplacements" );
if ( _xStorage->hasByName( aObjReplElement ) && _xStorage->isStorageElement( aObjReplElement ) )
_xStorage->removeElement( aObjReplElement );
}
2012-01-03 10:10:37 +00:00
catch (const uno::Exception&)
{
// TODO/LATER: error handling;
bResult = false;
}
}
return bResult;
}
bool EmbeddedObjectContainer::StoreChildren(bool _bOasisFormat,bool _bObjectsOnly)
{
bool bResult = true;
const uno::Sequence < OUString > aNames = GetObjectNames();
const OUString* pIter = aNames.getConstArray();
const OUString* pEnd = pIter + aNames.getLength();
for(;pIter != pEnd;++pIter)
{
uno::Reference < embed::XEmbeddedObject > xObj = GetEmbeddedObject( *pIter );
SAL_WARN_IF( !xObj.is(), "comphelper.container", "An empty entry in the embedded objects list!\n" );
if ( xObj.is() )
{
sal_Int32 nCurState = xObj->getCurrentState();
if ( _bOasisFormat && nCurState != embed::EmbedStates::LOADED && nCurState != embed::EmbedStates::RUNNING )
{
// means that the object is active
// the image must be regenerated
OUString aMediaType;
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
// TODO/LATER: another aspect could be used
uno::Reference < io::XInputStream > xStream =
GetGraphicReplacementStream(
embed::Aspects::MSOLE_CONTENT,
xObj,
&aMediaType );
if ( xStream.is() )
{
if ( !InsertGraphicStreamDirectly( xStream, *pIter, aMediaType ) )
InsertGraphicStream( xStream, *pIter, aMediaType );
}
}
// TODO/LATER: currently the object by default does not cache replacement image
// that means that if somebody loads SO7 document and store its objects using
// this method the images might be lost.
// Currently this method is only used on storing to alien formats, that means
// that SO7 documents storing does not use it, and all other filters are
// based on OASIS format. But if it changes the method must be fixed. The fix
// must be done only on demand since it can affect performance.
uno::Reference< embed::XEmbedPersist > xPersist( xObj, uno::UNO_QUERY );
if ( xPersist.is() )
{
try
{
//TODO/LATER: only storing if changed!
//xPersist->storeOwn(); //commented, i120168
// begin:all charts will be persisted as xml format on disk when saving, which is time consuming.
// '_bObjectsOnly' mean we are storing to alien formats.
// 'isStorageElement' mean current object is NOT an MS OLE format. (may also include in future), i120168
if (_bObjectsOnly && (nCurState == embed::EmbedStates::LOADED || nCurState == embed::EmbedStates::RUNNING)
&& (pImpl->mxStorage->isStorageElement( *pIter ) ))
{
uno::Reference< util::XModifiable > xModifiable( xObj->getComponent(), uno::UNO_QUERY );
if ( xModifiable.is() && xModifiable->isModified())
{
xPersist->storeOwn();
}
else
{
Many spelling fixes: directories a* - g*. Attempt to clean up most but certainly not all the spelling mistakes that found home in OpenOffice through decades. We could probably blame the international nature of the code but it is somewhat shameful that this wasn't done before. (cherry picked from commit a6efc99d19d533fcf53106b6667bafba4d364370) Conflicts: accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.java accessibility/bridge/org/openoffice/java/accessibility/Component.java accessibility/bridge/org/openoffice/java/accessibility/Container.java accessibility/bridge/org/openoffice/java/accessibility/DescendantManager.java accessibility/bridge/org/openoffice/java/accessibility/Dialog.java accessibility/bridge/org/openoffice/java/accessibility/Frame.java accessibility/bridge/org/openoffice/java/accessibility/List.java accessibility/bridge/org/openoffice/java/accessibility/Menu.java accessibility/bridge/org/openoffice/java/accessibility/Table.java accessibility/bridge/org/openoffice/java/accessibility/Tree.java accessibility/bridge/org/openoffice/java/accessibility/Window.java accessibility/bridge/source/java/WindowsAccessBridgeAdapter.cxx accessibility/inc/accessibility/extended/AccessibleBrowseBoxBase.hxx accessibility/inc/accessibility/extended/AccessibleGridControlBase.hxx accessibility/inc/accessibility/standard/vclxaccessiblebox.hxx accessibility/source/extended/accessibleiconchoicectrlentry.cxx accessibility/source/extended/accessiblelistboxentry.cxx accessibility/source/extended/accessibletablistbox.cxx accessibility/source/extended/accessibletablistboxtable.cxx accessibility/workben/org/openoffice/accessibility/awb/canvas/Canvas.java accessibility/workben/org/openoffice/accessibility/misc/OfficeConnection.java apple_remote/AppleRemote.m autodoc/inc/ary/cpp/c_gate.hxx autodoc/inc/ary/cpp/cp_ce.hxx autodoc/inc/ary/cpp/cp_def.hxx autodoc/inc/ary/cpp/cp_type.hxx autodoc/inc/ary/doc/d_parametrized.hxx autodoc/inc/ary/idl/i_type.hxx autodoc/source/ary/inc/cross_refs.hxx autodoc/source/ary/inc/sorted_idset.hxx autodoc/source/display/html/outfile.hxx autodoc/source/display/html/pagemake.cxx autodoc/source/display/idl/hi_env.hxx autodoc/source/parser/inc/tokens/tokproct.hxx autodoc/source/parser_i/inc/s2_luidl/tokproct.hxx autodoc/source/parser_i/inc/tokens/tkp2.hxx automation/inc/automation/commtypes.hxx automation/inc/automation/simplecm.hxx automation/source/server/recorder.cxx automation/source/server/recorder.hxx automation/source/server/statemnt.cxx automation/source/simplecm/packethandler.hxx automation/source/simplecm/simplecm.cxx avmedia/source/framework/soundhandler.cxx basegfx/inc/basegfx/range/rangeexpander.hxx basic/inc/basic/sbxdef.hxx basic/source/classes/sbunoobj.cxx basic/source/classes/sbxmod.cxx basic/source/comp/dim.cxx basic/source/comp/exprgen.cxx basic/source/runtime/step1.cxx basic/source/runtime/step2.cxx basic/source/sbx/sbxint.cxx basic/source/uno/namecont.cxx basic/workben/mgrtest.cxx bean/com/sun/star/beans/LocalOfficeConnection.java bean/com/sun/star/beans/LocalOfficeWindow.java bean/com/sun/star/comp/beans/LocalOfficeConnection.java bean/com/sun/star/comp/beans/LocalOfficeWindow.java bean/com/sun/star/comp/beans/OOoBean.java bridges/inc/bridges/cpp_uno/bridge.hxx bridges/source/cpp_uno/cc50_solaris_intel/cpp2uno.cxx bridges/source/cpp_uno/cc50_solaris_intel/except.cxx bridges/source/cpp_uno/cc50_solaris_intel/uno2cpp.cxx bridges/source/cpp_uno/cc50_solaris_sparc/cpp2uno.cxx bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx bridges/source/cpp_uno/cc50_solaris_sparc/uno2cpp.cxx bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx bridges/source/cpp_uno/gcc3_macosx_powerpc/cpp2uno.cxx bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx bridges/source/cpp_uno/gcc3_netbsd_intel/cpp2uno.cxx bridges/source/cpp_uno/gcc3_netbsd_intel/except.cxx bridges/source/cpp_uno/gcc3_netbsd_intel/uno2cpp.cxx bridges/source/cpp_uno/gcc3_os2_intel/cpp2uno.cxx bridges/source/cpp_uno/gcc3_os2_intel/except.cxx bridges/source/cpp_uno/gcc3_os2_intel/uno2cpp.cxx bridges/source/cpp_uno/mingw_x86-64/uno2cpp.cxx bridges/source/cpp_uno/msvc_win32_intel/except.cxx bridges/source/cpp_uno/s5abi_macosx_x86-64/except.cxx bridges/source/cpp_uno/shared/component.cxx bridges/source/jni_uno/jni_base.h bridges/source/jni_uno/jni_bridge.cxx bridges/source/jni_uno/jni_java2uno.cxx bridges/source/jni_uno/jni_uno2java.cxx canvas/inc/canvas/base/doublebitmapbase.hxx canvas/inc/canvas/base/floatbitmapbase.hxx canvas/inc/canvas/base/integerbitmapbase.hxx canvas/source/cairo/cairo_canvasbitmap.cxx canvas/source/cairo/cairo_textlayout.cxx chart2/source/controller/dialogs/ObjectNameProvider.cxx chart2/source/view/diagram/VDiagram.cxx chart2/source/view/main/ChartView.cxx cli_ure/source/native/makefile.mk cli_ure/source/uno_bridge/cli_data.cxx codemaker/source/javamaker/javatype.cxx comphelper/inc/comphelper/componentcontext.hxx comphelper/inc/comphelper/interaction.hxx comphelper/inc/comphelper/locale.hxx comphelper/inc/comphelper/string.hxx comphelper/source/container/embeddedobjectcontainer.cxx comphelper/source/misc/accessiblecontexthelper.cxx comphelper/source/misc/asyncnotification.cxx comphelper/source/misc/locale.cxx comphelper/source/misc/mediadescriptor.cxx comphelper/source/misc/numberedcollection.cxx comphelper/source/misc/proxyaggregation.cxx comphelper/source/misc/scopeguard.cxx comphelper/source/misc/sequenceashashmap.cxx configure.in connectivity/source/commontools/parameters.cxx connectivity/source/drivers/dbase/DTable.cxx connectivity/source/drivers/evoab2/NStatement.cxx connectivity/source/drivers/file/FPreparedStatement.cxx connectivity/source/drivers/jdbc/DatabaseMetaData.cxx connectivity/source/inc/flat/ETable.hxx connectivity/source/parse/sqlnode.cxx cosv/inc/cosv/persist.hxx cosv/inc/cosv/ploc_dir.hxx cosv/inc/cosv/tpl/dyn.hxx cppu/source/LogBridge/LogBridge.cxx cppu/source/uno/data.cxx cppuhelper/source/bootstrap.cxx cppuhelper/source/component_context.cxx cppuhelper/source/propshlp.cxx cppuhelper/source/servicefactory.cxx cpputools/source/registercomponent/registercomponent.cxx cui/source/customize/acccfg.cxx cui/source/dialogs/about.cxx cui/source/dialogs/commonlingui.hxx cui/source/dialogs/showcols.cxx cui/source/inc/cuihyperdlg.hxx cui/source/inc/cuitabline.hxx cui/source/options/optsave.src cui/source/tabpages/tpline.cxx cui/source/tabpages/transfrm.cxx dbaccess/source/core/api/CacheSet.cxx dbaccess/source/core/api/KeySet.cxx dbaccess/source/core/api/RowSet.cxx dbaccess/source/core/api/RowSet.hxx dbaccess/source/core/api/RowSetBase.cxx dbaccess/source/core/api/RowSetBase.hxx dbaccess/source/core/api/RowSetCache.cxx dbaccess/source/core/api/querycomposer.cxx dbaccess/source/ext/adabas/Acomponentmodule.hxx dbaccess/source/ui/app/AppControllerDnD.cxx dbaccess/source/ui/app/AppDetailView.cxx dbaccess/source/ui/browser/brwctrlr.cxx dbaccess/source/ui/browser/sbagrid.cxx dbaccess/source/ui/browser/unodatbr.cxx dbaccess/source/ui/dlg/AdabasStat.hxx dbaccess/source/ui/dlg/UserAdmin.cxx dbaccess/source/ui/dlg/directsql.cxx dbaccess/source/ui/dlg/generalpage.hxx dbaccess/source/ui/dlg/tablespage.cxx dbaccess/source/ui/inc/JoinTableView.hxx dbaccess/source/ui/inc/TableController.hxx dbaccess/source/ui/inc/UITools.hxx dbaccess/source/ui/inc/brwctrlr.hxx dbaccess/source/ui/inc/datasourcemap.hxx dbaccess/source/ui/querydesign/JoinTableView.cxx dbaccess/source/ui/querydesign/QueryDesignView.cxx dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx dbaccess/source/ui/querydesign/TableWindow.cxx dbaccess/source/ui/querydesign/querycontroller.cxx dbaccess/source/ui/relationdesign/RelationTableView.cxx dbaccess/source/ui/tabledesign/TableController.cxx desktop/source/app/app.cxx desktop/source/app/appinit.cxx desktop/source/app/langselect.cxx desktop/source/app/officeipcthread.cxx desktop/source/deployment/manager/dp_extensionmanager.cxx desktop/source/deployment/misc/dp_misc.cxx desktop/source/deployment/misc/dp_resource.cxx desktop/source/deployment/registry/dp_backend.cxx desktop/source/deployment/registry/package/dp_package.cxx desktop/source/migration/cfgfilter.cxx desktop/source/migration/migration.cxx desktop/source/splash/splash.cxx desktop/win32/source/QuickStart/QuickStart.cpp desktop/win32/source/setup/setup.cpp drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx dtrans/source/win32/clipb/MtaOleClipb.hxx dtrans/source/win32/clipb/WinClipbImpl.cxx editeng/source/editeng/editview.cxx editeng/source/editeng/impedit2.cxx editeng/source/editeng/impedit3.cxx editeng/source/editeng/impedit4.cxx editeng/source/editeng/textconv.hxx editeng/source/misc/unolingu.cxx embeddedobj/source/commonembedding/persistence.cxx embeddedobj/source/general/dummyobject.cxx embeddedobj/source/msole/olecomponent.cxx embeddedobj/source/msole/olepersist.cxx embeddedobj/test/Container1/NativeView.java extensions/source/bibliography/framectr.cxx extensions/source/macosx/spotlight/OOoContentDataParser.m extensions/source/macosx/spotlight/unzip.h extensions/source/macosx/spotlight/unzip.m extensions/source/oooimprovement/myconfigurationhelper.hxx extensions/source/propctrlr/eventhandler.cxx extensions/source/propctrlr/formcomponenthandler.cxx extensions/source/propctrlr/pcrcomponentcontext.hxx extensions/source/scanner/twain.cxx extensions/source/update/check/updatecheckconfig.hxx external/mingwheaders/mingw_atl_headers.patch extras/source/misc_config/wizard/web/layouts/source.xml.xsl fileaccess/source/FileAccess.cxx filter/inc/filter/msfilter/msocximex.hxx filter/inc/filter/msfilter/svxmsbas.hxx filter/qa/complex/filter/detection/typeDetection/Helper.java filter/source/config/cache/basecontainer.cxx filter/source/config/cache/cacheitem.hxx filter/source/config/cache/contenthandlerfactory.cxx filter/source/config/cache/filtercache.cxx filter/source/config/cache/filtercache.hxx filter/source/config/cache/filterfactory.cxx filter/source/config/cache/frameloaderfactory.cxx filter/source/config/cache/querytokenizer.hxx filter/source/config/cache/typedetection.cxx filter/source/config/cache/typedetection.hxx filter/source/config/cache/versions.hxx filter/source/config/fragments/makefile.mk filter/source/config/tools/merge/pyAltFCFGMerge filter/source/flash/swfwriter.cxx filter/source/flash/swfwriter1.cxx filter/source/msfilter/msdffimp.cxx filter/source/msfilter/msocximex.cxx filter/source/msfilter/msvbahelper.cxx filter/source/msfilter/svxmsbas.cxx filter/source/xmlfilterdetect/filterdetect.cxx filter/source/xslt/import/uof2/uof2odf.xsl filter/source/xslt/odf2xhtml/export/xhtml/body.xsl filter/source/xsltfilter/com/sun/star/comp/xsltfilter/Base64.java forms/source/xforms/convert.hxx forms/source/xforms/model.cxx fpicker/source/aqua/SalAquaFilePicker.mm fpicker/source/office/fpinteraction.cxx fpicker/source/unx/gnome/SalGtkFolderPicker.cxx fpicker/source/unx/kde4/KDE4FilePicker.cxx fpicker/source/win32/filepicker/PreviewCtrl.cxx fpicker/source/win32/filepicker/PreviewCtrl.hxx fpicker/source/win32/filepicker/VistaFilePicker.cxx fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx fpicker/source/win32/filepicker/helppopupwindow.hxx fpicker/source/win32/folderpicker/MtaFop.hxx framework/inc/classes/droptargetlistener.hxx framework/inc/classes/filtercache.hxx framework/inc/classes/filtercachedata.hxx framework/inc/classes/protocolhandlercache.hxx framework/inc/classes/servicemanager.hxx framework/inc/commands.h framework/inc/dispatch/basedispatcher.hxx framework/inc/dispatch/blankdispatcher.hxx framework/inc/dispatch/closedispatcher.hxx framework/inc/dispatch/createdispatcher.hxx framework/inc/dispatch/dispatchprovider.hxx framework/inc/dispatch/helpagentdispatcher.hxx framework/inc/dispatch/mailtodispatcher.hxx framework/inc/dispatch/menudispatcher.hxx framework/inc/dispatch/oxt_handler.hxx framework/inc/dispatch/popupmenudispatcher.hxx framework/inc/dispatch/selfdispatcher.hxx framework/inc/dispatch/servicehandler.hxx framework/inc/dispatch/startmoduledispatcher.hxx framework/inc/dispatch/systemexec.hxx framework/inc/helper/fixeddocumentproperties.hxx framework/inc/helper/ocomponentaccess.hxx framework/inc/helper/oframes.hxx framework/inc/helper/otasksenumeration.hxx framework/inc/helper/persistentwindowstate.hxx framework/inc/helper/statusindicator.hxx framework/inc/helper/statusindicatorfactory.hxx framework/inc/helper/tagwindowasmodified.hxx framework/inc/helper/titlebarupdate.hxx framework/inc/helper/vclstatusindicator.hxx framework/inc/interaction/quietinteraction.hxx framework/inc/jobs/helponstartup.hxx framework/inc/jobs/job.hxx framework/inc/jobs/jobdata.hxx framework/inc/jobs/jobexecutor.hxx framework/inc/loadstate.h framework/inc/macros/debug/assertion.hxx framework/inc/macros/debug/event.hxx framework/inc/macros/debug/filterdbg.hxx framework/inc/macros/debug/memorymeasure.hxx framework/inc/macros/debug/timemeasure.hxx framework/inc/macros/xserviceinfo.hxx framework/inc/queries.h framework/inc/recording/dispatchrecordersupplier.hxx framework/inc/services/autorecovery.hxx framework/inc/services/backingcomp.hxx framework/inc/services/contenthandlerfactory.hxx framework/inc/services/desktop.hxx framework/inc/services/detectorfactory.hxx framework/inc/services/frame.hxx framework/inc/services/frameloaderfactory.hxx framework/inc/services/layoutmanager.hxx framework/inc/services/license.hxx framework/inc/services/logindialog.hxx framework/inc/services/modulemanager.hxx framework/inc/services/pathsettings.hxx framework/inc/services/pluginframe.hxx framework/inc/services/substitutepathvars.hxx framework/inc/services/task.hxx framework/inc/services/taskcreatorsrv.hxx framework/inc/stdtypes.h framework/inc/threadhelp/fairrwlock.hxx framework/inc/threadhelp/inoncopyable.h framework/inc/threadhelp/itransactionmanager.h framework/inc/threadhelp/lockhelper.hxx framework/inc/threadhelp/readguard.hxx framework/inc/threadhelp/resetableguard.hxx framework/inc/threadhelp/transactionguard.hxx framework/inc/threadhelp/writeguard.hxx framework/inc/uifactory/uielementfactorymanager.hxx framework/inc/xml/acceleratorconfigurationreader.hxx framework/qa/complex/dispatches/checkdispatchapi.java framework/qa/complex/framework/autosave/AutoSave.java framework/qa/complex/framework/autosave/Protocol.java framework/qa/complex/framework/recovery/RecoveryTest.java framework/qa/complex/loadAllDocuments/StreamSimulator.java framework/source/accelerators/acceleratorconfiguration.cxx framework/source/accelerators/acceleratorexecute.cxx framework/source/accelerators/acceleratorexecute.hxx framework/source/accelerators/keymapping.cxx framework/source/accelerators/presethandler.cxx framework/source/application/framework.cxx framework/source/application/login.cxx framework/source/classes/framecontainer.cxx framework/source/classes/menumanager.cxx framework/source/classes/taskcreator.cxx framework/source/dispatch/closedispatcher.cxx framework/source/dispatch/dispatchprovider.cxx framework/source/dispatch/helpagentdispatcher.cxx framework/source/dispatch/interceptionhelper.cxx framework/source/dispatch/mailtodispatcher.cxx framework/source/dispatch/menudispatcher.cxx framework/source/dispatch/oxt_handler.cxx framework/source/dispatch/servicehandler.cxx framework/source/fwe/classes/framelistanalyzer.cxx framework/source/fwe/dispatch/interaction.cxx framework/source/fwe/helper/titlehelper.cxx framework/source/fwe/helper/undomanagerhelper.cxx framework/source/fwe/xml/eventsdocumenthandler.cxx framework/source/fwe/xml/statusbardocumenthandler.cxx framework/source/fwe/xml/toolboxdocumenthandler.cxx framework/source/fwi/classes/protocolhandlercache.cxx framework/source/fwi/threadhelp/lockhelper.cxx framework/source/fwi/threadhelp/transactionmanager.cxx framework/source/helper/persistentwindowstate.cxx framework/source/helper/statusindicatorfactory.cxx framework/source/helper/vclstatusindicator.cxx framework/source/inc/accelerators/acceleratorcache.hxx framework/source/inc/accelerators/acceleratorconfiguration.hxx framework/source/inc/accelerators/presethandler.hxx framework/source/inc/accelerators/storageholder.hxx framework/source/inc/loadenv/actionlockguard.hxx framework/source/inc/loadenv/loadenv.hxx framework/source/inc/loadenv/loadenvexception.hxx framework/source/inc/pattern/frame.hxx framework/source/inc/pattern/storages.hxx framework/source/inc/pattern/window.hxx framework/source/jobs/helponstartup.cxx framework/source/jobs/job.cxx framework/source/jobs/jobdata.cxx framework/source/jobs/jobdispatch.cxx framework/source/jobs/jobresult.cxx framework/source/jobs/joburl.cxx framework/source/jobs/shelljob.cxx framework/source/loadenv/loadenv.cxx framework/source/services/autorecovery.cxx framework/source/services/backingwindow.cxx framework/source/services/desktop.cxx framework/source/services/frame.cxx framework/source/services/modulemanager.cxx framework/source/services/pathsettings.cxx framework/source/services/substitutepathvars.cxx framework/source/uiconfiguration/moduleuicfgsupplier.cxx framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx framework/source/uiconfiguration/uicategorydescription.cxx framework/source/uiconfiguration/uiconfigurationmanagerimpl.cxx framework/source/uiconfiguration/windowstateconfiguration.cxx framework/source/uielement/uicommanddescription.cxx framework/source/unotypes/fwk.xml framework/source/xml/imagesdocumenthandler.cxx framework/test/test.cxx framework/test/test_componentenumeration.bas framework/test/test_statusindicatorfactory.bas framework/test/threadtest.cxx framework/test/threadtest/threadtest.cxx framework/test/typecfg/cfgview.cxx framework/test/typecfg/xml2xcd.cxx include/basegfx/polygon/b2dpolygon.hxx include/canvas/base/graphicdevicebase.hxx include/canvas/canvastools.hxx include/comphelper/configurationhelper.hxx include/comphelper/embeddedobjectcontainer.hxx include/comphelper/propagg.hxx include/comphelper/sequenceashashmap.hxx include/connectivity/sqlerror.hxx include/connectivity/sqlnode.hxx include/cppuhelper/propshlp.hxx include/editeng/AccessibleContextBase.hxx include/framework/framelistanalyzer.hxx sfx2/source/dialog/backingcomp.cxx vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx Change-Id: I2618bf83c0e30f68f23ff25f6eb466df04d34c6d
2014-04-29 19:05:05 +00:00
//do nothing. Embedded model is not modified, no need to persist.
}
}
Many spelling fixes: directories a* - g*. Attempt to clean up most but certainly not all the spelling mistakes that found home in OpenOffice through decades. We could probably blame the international nature of the code but it is somewhat shameful that this wasn't done before. (cherry picked from commit a6efc99d19d533fcf53106b6667bafba4d364370) Conflicts: accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.java accessibility/bridge/org/openoffice/java/accessibility/Component.java accessibility/bridge/org/openoffice/java/accessibility/Container.java accessibility/bridge/org/openoffice/java/accessibility/DescendantManager.java accessibility/bridge/org/openoffice/java/accessibility/Dialog.java accessibility/bridge/org/openoffice/java/accessibility/Frame.java accessibility/bridge/org/openoffice/java/accessibility/List.java accessibility/bridge/org/openoffice/java/accessibility/Menu.java accessibility/bridge/org/openoffice/java/accessibility/Table.java accessibility/bridge/org/openoffice/java/accessibility/Tree.java accessibility/bridge/org/openoffice/java/accessibility/Window.java accessibility/bridge/source/java/WindowsAccessBridgeAdapter.cxx accessibility/inc/accessibility/extended/AccessibleBrowseBoxBase.hxx accessibility/inc/accessibility/extended/AccessibleGridControlBase.hxx accessibility/inc/accessibility/standard/vclxaccessiblebox.hxx accessibility/source/extended/accessibleiconchoicectrlentry.cxx accessibility/source/extended/accessiblelistboxentry.cxx accessibility/source/extended/accessibletablistbox.cxx accessibility/source/extended/accessibletablistboxtable.cxx accessibility/workben/org/openoffice/accessibility/awb/canvas/Canvas.java accessibility/workben/org/openoffice/accessibility/misc/OfficeConnection.java apple_remote/AppleRemote.m autodoc/inc/ary/cpp/c_gate.hxx autodoc/inc/ary/cpp/cp_ce.hxx autodoc/inc/ary/cpp/cp_def.hxx autodoc/inc/ary/cpp/cp_type.hxx autodoc/inc/ary/doc/d_parametrized.hxx autodoc/inc/ary/idl/i_type.hxx autodoc/source/ary/inc/cross_refs.hxx autodoc/source/ary/inc/sorted_idset.hxx autodoc/source/display/html/outfile.hxx autodoc/source/display/html/pagemake.cxx autodoc/source/display/idl/hi_env.hxx autodoc/source/parser/inc/tokens/tokproct.hxx autodoc/source/parser_i/inc/s2_luidl/tokproct.hxx autodoc/source/parser_i/inc/tokens/tkp2.hxx automation/inc/automation/commtypes.hxx automation/inc/automation/simplecm.hxx automation/source/server/recorder.cxx automation/source/server/recorder.hxx automation/source/server/statemnt.cxx automation/source/simplecm/packethandler.hxx automation/source/simplecm/simplecm.cxx avmedia/source/framework/soundhandler.cxx basegfx/inc/basegfx/range/rangeexpander.hxx basic/inc/basic/sbxdef.hxx basic/source/classes/sbunoobj.cxx basic/source/classes/sbxmod.cxx basic/source/comp/dim.cxx basic/source/comp/exprgen.cxx basic/source/runtime/step1.cxx basic/source/runtime/step2.cxx basic/source/sbx/sbxint.cxx basic/source/uno/namecont.cxx basic/workben/mgrtest.cxx bean/com/sun/star/beans/LocalOfficeConnection.java bean/com/sun/star/beans/LocalOfficeWindow.java bean/com/sun/star/comp/beans/LocalOfficeConnection.java bean/com/sun/star/comp/beans/LocalOfficeWindow.java bean/com/sun/star/comp/beans/OOoBean.java bridges/inc/bridges/cpp_uno/bridge.hxx bridges/source/cpp_uno/cc50_solaris_intel/cpp2uno.cxx bridges/source/cpp_uno/cc50_solaris_intel/except.cxx bridges/source/cpp_uno/cc50_solaris_intel/uno2cpp.cxx bridges/source/cpp_uno/cc50_solaris_sparc/cpp2uno.cxx bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx bridges/source/cpp_uno/cc50_solaris_sparc/uno2cpp.cxx bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx bridges/source/cpp_uno/gcc3_macosx_powerpc/cpp2uno.cxx bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx bridges/source/cpp_uno/gcc3_netbsd_intel/cpp2uno.cxx bridges/source/cpp_uno/gcc3_netbsd_intel/except.cxx bridges/source/cpp_uno/gcc3_netbsd_intel/uno2cpp.cxx bridges/source/cpp_uno/gcc3_os2_intel/cpp2uno.cxx bridges/source/cpp_uno/gcc3_os2_intel/except.cxx bridges/source/cpp_uno/gcc3_os2_intel/uno2cpp.cxx bridges/source/cpp_uno/mingw_x86-64/uno2cpp.cxx bridges/source/cpp_uno/msvc_win32_intel/except.cxx bridges/source/cpp_uno/s5abi_macosx_x86-64/except.cxx bridges/source/cpp_uno/shared/component.cxx bridges/source/jni_uno/jni_base.h bridges/source/jni_uno/jni_bridge.cxx bridges/source/jni_uno/jni_java2uno.cxx bridges/source/jni_uno/jni_uno2java.cxx canvas/inc/canvas/base/doublebitmapbase.hxx canvas/inc/canvas/base/floatbitmapbase.hxx canvas/inc/canvas/base/integerbitmapbase.hxx canvas/source/cairo/cairo_canvasbitmap.cxx canvas/source/cairo/cairo_textlayout.cxx chart2/source/controller/dialogs/ObjectNameProvider.cxx chart2/source/view/diagram/VDiagram.cxx chart2/source/view/main/ChartView.cxx cli_ure/source/native/makefile.mk cli_ure/source/uno_bridge/cli_data.cxx codemaker/source/javamaker/javatype.cxx comphelper/inc/comphelper/componentcontext.hxx comphelper/inc/comphelper/interaction.hxx comphelper/inc/comphelper/locale.hxx comphelper/inc/comphelper/string.hxx comphelper/source/container/embeddedobjectcontainer.cxx comphelper/source/misc/accessiblecontexthelper.cxx comphelper/source/misc/asyncnotification.cxx comphelper/source/misc/locale.cxx comphelper/source/misc/mediadescriptor.cxx comphelper/source/misc/numberedcollection.cxx comphelper/source/misc/proxyaggregation.cxx comphelper/source/misc/scopeguard.cxx comphelper/source/misc/sequenceashashmap.cxx configure.in connectivity/source/commontools/parameters.cxx connectivity/source/drivers/dbase/DTable.cxx connectivity/source/drivers/evoab2/NStatement.cxx connectivity/source/drivers/file/FPreparedStatement.cxx connectivity/source/drivers/jdbc/DatabaseMetaData.cxx connectivity/source/inc/flat/ETable.hxx connectivity/source/parse/sqlnode.cxx cosv/inc/cosv/persist.hxx cosv/inc/cosv/ploc_dir.hxx cosv/inc/cosv/tpl/dyn.hxx cppu/source/LogBridge/LogBridge.cxx cppu/source/uno/data.cxx cppuhelper/source/bootstrap.cxx cppuhelper/source/component_context.cxx cppuhelper/source/propshlp.cxx cppuhelper/source/servicefactory.cxx cpputools/source/registercomponent/registercomponent.cxx cui/source/customize/acccfg.cxx cui/source/dialogs/about.cxx cui/source/dialogs/commonlingui.hxx cui/source/dialogs/showcols.cxx cui/source/inc/cuihyperdlg.hxx cui/source/inc/cuitabline.hxx cui/source/options/optsave.src cui/source/tabpages/tpline.cxx cui/source/tabpages/transfrm.cxx dbaccess/source/core/api/CacheSet.cxx dbaccess/source/core/api/KeySet.cxx dbaccess/source/core/api/RowSet.cxx dbaccess/source/core/api/RowSet.hxx dbaccess/source/core/api/RowSetBase.cxx dbaccess/source/core/api/RowSetBase.hxx dbaccess/source/core/api/RowSetCache.cxx dbaccess/source/core/api/querycomposer.cxx dbaccess/source/ext/adabas/Acomponentmodule.hxx dbaccess/source/ui/app/AppControllerDnD.cxx dbaccess/source/ui/app/AppDetailView.cxx dbaccess/source/ui/browser/brwctrlr.cxx dbaccess/source/ui/browser/sbagrid.cxx dbaccess/source/ui/browser/unodatbr.cxx dbaccess/source/ui/dlg/AdabasStat.hxx dbaccess/source/ui/dlg/UserAdmin.cxx dbaccess/source/ui/dlg/directsql.cxx dbaccess/source/ui/dlg/generalpage.hxx dbaccess/source/ui/dlg/tablespage.cxx dbaccess/source/ui/inc/JoinTableView.hxx dbaccess/source/ui/inc/TableController.hxx dbaccess/source/ui/inc/UITools.hxx dbaccess/source/ui/inc/brwctrlr.hxx dbaccess/source/ui/inc/datasourcemap.hxx dbaccess/source/ui/querydesign/JoinTableView.cxx dbaccess/source/ui/querydesign/QueryDesignView.cxx dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx dbaccess/source/ui/querydesign/TableWindow.cxx dbaccess/source/ui/querydesign/querycontroller.cxx dbaccess/source/ui/relationdesign/RelationTableView.cxx dbaccess/source/ui/tabledesign/TableController.cxx desktop/source/app/app.cxx desktop/source/app/appinit.cxx desktop/source/app/langselect.cxx desktop/source/app/officeipcthread.cxx desktop/source/deployment/manager/dp_extensionmanager.cxx desktop/source/deployment/misc/dp_misc.cxx desktop/source/deployment/misc/dp_resource.cxx desktop/source/deployment/registry/dp_backend.cxx desktop/source/deployment/registry/package/dp_package.cxx desktop/source/migration/cfgfilter.cxx desktop/source/migration/migration.cxx desktop/source/splash/splash.cxx desktop/win32/source/QuickStart/QuickStart.cpp desktop/win32/source/setup/setup.cpp drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx dtrans/source/win32/clipb/MtaOleClipb.hxx dtrans/source/win32/clipb/WinClipbImpl.cxx editeng/source/editeng/editview.cxx editeng/source/editeng/impedit2.cxx editeng/source/editeng/impedit3.cxx editeng/source/editeng/impedit4.cxx editeng/source/editeng/textconv.hxx editeng/source/misc/unolingu.cxx embeddedobj/source/commonembedding/persistence.cxx embeddedobj/source/general/dummyobject.cxx embeddedobj/source/msole/olecomponent.cxx embeddedobj/source/msole/olepersist.cxx embeddedobj/test/Container1/NativeView.java extensions/source/bibliography/framectr.cxx extensions/source/macosx/spotlight/OOoContentDataParser.m extensions/source/macosx/spotlight/unzip.h extensions/source/macosx/spotlight/unzip.m extensions/source/oooimprovement/myconfigurationhelper.hxx extensions/source/propctrlr/eventhandler.cxx extensions/source/propctrlr/formcomponenthandler.cxx extensions/source/propctrlr/pcrcomponentcontext.hxx extensions/source/scanner/twain.cxx extensions/source/update/check/updatecheckconfig.hxx external/mingwheaders/mingw_atl_headers.patch extras/source/misc_config/wizard/web/layouts/source.xml.xsl fileaccess/source/FileAccess.cxx filter/inc/filter/msfilter/msocximex.hxx filter/inc/filter/msfilter/svxmsbas.hxx filter/qa/complex/filter/detection/typeDetection/Helper.java filter/source/config/cache/basecontainer.cxx filter/source/config/cache/cacheitem.hxx filter/source/config/cache/contenthandlerfactory.cxx filter/source/config/cache/filtercache.cxx filter/source/config/cache/filtercache.hxx filter/source/config/cache/filterfactory.cxx filter/source/config/cache/frameloaderfactory.cxx filter/source/config/cache/querytokenizer.hxx filter/source/config/cache/typedetection.cxx filter/source/config/cache/typedetection.hxx filter/source/config/cache/versions.hxx filter/source/config/fragments/makefile.mk filter/source/config/tools/merge/pyAltFCFGMerge filter/source/flash/swfwriter.cxx filter/source/flash/swfwriter1.cxx filter/source/msfilter/msdffimp.cxx filter/source/msfilter/msocximex.cxx filter/source/msfilter/msvbahelper.cxx filter/source/msfilter/svxmsbas.cxx filter/source/xmlfilterdetect/filterdetect.cxx filter/source/xslt/import/uof2/uof2odf.xsl filter/source/xslt/odf2xhtml/export/xhtml/body.xsl filter/source/xsltfilter/com/sun/star/comp/xsltfilter/Base64.java forms/source/xforms/convert.hxx forms/source/xforms/model.cxx fpicker/source/aqua/SalAquaFilePicker.mm fpicker/source/office/fpinteraction.cxx fpicker/source/unx/gnome/SalGtkFolderPicker.cxx fpicker/source/unx/kde4/KDE4FilePicker.cxx fpicker/source/win32/filepicker/PreviewCtrl.cxx fpicker/source/win32/filepicker/PreviewCtrl.hxx fpicker/source/win32/filepicker/VistaFilePicker.cxx fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx fpicker/source/win32/filepicker/helppopupwindow.hxx fpicker/source/win32/folderpicker/MtaFop.hxx framework/inc/classes/droptargetlistener.hxx framework/inc/classes/filtercache.hxx framework/inc/classes/filtercachedata.hxx framework/inc/classes/protocolhandlercache.hxx framework/inc/classes/servicemanager.hxx framework/inc/commands.h framework/inc/dispatch/basedispatcher.hxx framework/inc/dispatch/blankdispatcher.hxx framework/inc/dispatch/closedispatcher.hxx framework/inc/dispatch/createdispatcher.hxx framework/inc/dispatch/dispatchprovider.hxx framework/inc/dispatch/helpagentdispatcher.hxx framework/inc/dispatch/mailtodispatcher.hxx framework/inc/dispatch/menudispatcher.hxx framework/inc/dispatch/oxt_handler.hxx framework/inc/dispatch/popupmenudispatcher.hxx framework/inc/dispatch/selfdispatcher.hxx framework/inc/dispatch/servicehandler.hxx framework/inc/dispatch/startmoduledispatcher.hxx framework/inc/dispatch/systemexec.hxx framework/inc/helper/fixeddocumentproperties.hxx framework/inc/helper/ocomponentaccess.hxx framework/inc/helper/oframes.hxx framework/inc/helper/otasksenumeration.hxx framework/inc/helper/persistentwindowstate.hxx framework/inc/helper/statusindicator.hxx framework/inc/helper/statusindicatorfactory.hxx framework/inc/helper/tagwindowasmodified.hxx framework/inc/helper/titlebarupdate.hxx framework/inc/helper/vclstatusindicator.hxx framework/inc/interaction/quietinteraction.hxx framework/inc/jobs/helponstartup.hxx framework/inc/jobs/job.hxx framework/inc/jobs/jobdata.hxx framework/inc/jobs/jobexecutor.hxx framework/inc/loadstate.h framework/inc/macros/debug/assertion.hxx framework/inc/macros/debug/event.hxx framework/inc/macros/debug/filterdbg.hxx framework/inc/macros/debug/memorymeasure.hxx framework/inc/macros/debug/timemeasure.hxx framework/inc/macros/xserviceinfo.hxx framework/inc/queries.h framework/inc/recording/dispatchrecordersupplier.hxx framework/inc/services/autorecovery.hxx framework/inc/services/backingcomp.hxx framework/inc/services/contenthandlerfactory.hxx framework/inc/services/desktop.hxx framework/inc/services/detectorfactory.hxx framework/inc/services/frame.hxx framework/inc/services/frameloaderfactory.hxx framework/inc/services/layoutmanager.hxx framework/inc/services/license.hxx framework/inc/services/logindialog.hxx framework/inc/services/modulemanager.hxx framework/inc/services/pathsettings.hxx framework/inc/services/pluginframe.hxx framework/inc/services/substitutepathvars.hxx framework/inc/services/task.hxx framework/inc/services/taskcreatorsrv.hxx framework/inc/stdtypes.h framework/inc/threadhelp/fairrwlock.hxx framework/inc/threadhelp/inoncopyable.h framework/inc/threadhelp/itransactionmanager.h framework/inc/threadhelp/lockhelper.hxx framework/inc/threadhelp/readguard.hxx framework/inc/threadhelp/resetableguard.hxx framework/inc/threadhelp/transactionguard.hxx framework/inc/threadhelp/writeguard.hxx framework/inc/uifactory/uielementfactorymanager.hxx framework/inc/xml/acceleratorconfigurationreader.hxx framework/qa/complex/dispatches/checkdispatchapi.java framework/qa/complex/framework/autosave/AutoSave.java framework/qa/complex/framework/autosave/Protocol.java framework/qa/complex/framework/recovery/RecoveryTest.java framework/qa/complex/loadAllDocuments/StreamSimulator.java framework/source/accelerators/acceleratorconfiguration.cxx framework/source/accelerators/acceleratorexecute.cxx framework/source/accelerators/acceleratorexecute.hxx framework/source/accelerators/keymapping.cxx framework/source/accelerators/presethandler.cxx framework/source/application/framework.cxx framework/source/application/login.cxx framework/source/classes/framecontainer.cxx framework/source/classes/menumanager.cxx framework/source/classes/taskcreator.cxx framework/source/dispatch/closedispatcher.cxx framework/source/dispatch/dispatchprovider.cxx framework/source/dispatch/helpagentdispatcher.cxx framework/source/dispatch/interceptionhelper.cxx framework/source/dispatch/mailtodispatcher.cxx framework/source/dispatch/menudispatcher.cxx framework/source/dispatch/oxt_handler.cxx framework/source/dispatch/servicehandler.cxx framework/source/fwe/classes/framelistanalyzer.cxx framework/source/fwe/dispatch/interaction.cxx framework/source/fwe/helper/titlehelper.cxx framework/source/fwe/helper/undomanagerhelper.cxx framework/source/fwe/xml/eventsdocumenthandler.cxx framework/source/fwe/xml/statusbardocumenthandler.cxx framework/source/fwe/xml/toolboxdocumenthandler.cxx framework/source/fwi/classes/protocolhandlercache.cxx framework/source/fwi/threadhelp/lockhelper.cxx framework/source/fwi/threadhelp/transactionmanager.cxx framework/source/helper/persistentwindowstate.cxx framework/source/helper/statusindicatorfactory.cxx framework/source/helper/vclstatusindicator.cxx framework/source/inc/accelerators/acceleratorcache.hxx framework/source/inc/accelerators/acceleratorconfiguration.hxx framework/source/inc/accelerators/presethandler.hxx framework/source/inc/accelerators/storageholder.hxx framework/source/inc/loadenv/actionlockguard.hxx framework/source/inc/loadenv/loadenv.hxx framework/source/inc/loadenv/loadenvexception.hxx framework/source/inc/pattern/frame.hxx framework/source/inc/pattern/storages.hxx framework/source/inc/pattern/window.hxx framework/source/jobs/helponstartup.cxx framework/source/jobs/job.cxx framework/source/jobs/jobdata.cxx framework/source/jobs/jobdispatch.cxx framework/source/jobs/jobresult.cxx framework/source/jobs/joburl.cxx framework/source/jobs/shelljob.cxx framework/source/loadenv/loadenv.cxx framework/source/services/autorecovery.cxx framework/source/services/backingwindow.cxx framework/source/services/desktop.cxx framework/source/services/frame.cxx framework/source/services/modulemanager.cxx framework/source/services/pathsettings.cxx framework/source/services/substitutepathvars.cxx framework/source/uiconfiguration/moduleuicfgsupplier.cxx framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx framework/source/uiconfiguration/uicategorydescription.cxx framework/source/uiconfiguration/uiconfigurationmanagerimpl.cxx framework/source/uiconfiguration/windowstateconfiguration.cxx framework/source/uielement/uicommanddescription.cxx framework/source/unotypes/fwk.xml framework/source/xml/imagesdocumenthandler.cxx framework/test/test.cxx framework/test/test_componentenumeration.bas framework/test/test_statusindicatorfactory.bas framework/test/threadtest.cxx framework/test/threadtest/threadtest.cxx framework/test/typecfg/cfgview.cxx framework/test/typecfg/xml2xcd.cxx include/basegfx/polygon/b2dpolygon.hxx include/canvas/base/graphicdevicebase.hxx include/canvas/canvastools.hxx include/comphelper/configurationhelper.hxx include/comphelper/embeddedobjectcontainer.hxx include/comphelper/propagg.hxx include/comphelper/sequenceashashmap.hxx include/connectivity/sqlerror.hxx include/connectivity/sqlnode.hxx include/cppuhelper/propshlp.hxx include/editeng/AccessibleContextBase.hxx include/framework/framelistanalyzer.hxx sfx2/source/dialog/backingcomp.cxx vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx Change-Id: I2618bf83c0e30f68f23ff25f6eb466df04d34c6d
2014-04-29 19:05:05 +00:00
else //the embedded object is in active status, always store back it.
{
xPersist->storeOwn();
}
//end i120168
}
2012-01-03 10:10:37 +00:00
catch (const uno::Exception&)
{
// TODO/LATER: error handling
bResult = false;
break;
}
}
if ( !_bOasisFormat && !_bObjectsOnly )
{
// copy replacement images for linked objects
try
{
uno::Reference< embed::XLinkageSupport > xLink( xObj, uno::UNO_QUERY );
if ( xLink.is() && xLink->isLink() )
{
OUString aMediaType;
uno::Reference < io::XInputStream > xInStream = GetGraphicStream( xObj, &aMediaType );
if ( xInStream.is() )
InsertStreamIntoPicturesStorage_Impl( pImpl->mxStorage, xInStream, *pIter );
}
}
2012-01-03 10:10:37 +00:00
catch (const uno::Exception&)
{
}
}
}
}
if ( bResult && _bOasisFormat )
bResult = CommitImageSubStorage();
if ( bResult && !_bObjectsOnly )
{
try
{
ReleaseImageSubStorage();
OUString aObjReplElement( "ObjectReplacements" );
if ( !_bOasisFormat && pImpl->mxStorage->hasByName( aObjReplElement ) && pImpl->mxStorage->isStorageElement( aObjReplElement ) )
pImpl->mxStorage->removeElement( aObjReplElement );
}
2012-01-03 10:10:37 +00:00
catch (const uno::Exception&)
{
// TODO/LATER: error handling
bResult = false;
}
}
return bResult;
}
uno::Reference< io::XInputStream > EmbeddedObjectContainer::GetGraphicReplacementStream(
sal_Int64 nViewAspect,
const uno::Reference< embed::XEmbeddedObject >& xObj,
OUString* pMediaType )
{
uno::Reference< io::XInputStream > xInStream;
if ( xObj.is() )
{
try
{
// retrieving of the visual representation can switch object to running state
embed::VisualRepresentation aRep = xObj->getPreferredVisualRepresentation( nViewAspect );
if ( pMediaType )
*pMediaType = aRep.Flavor.MimeType;
uno::Sequence < sal_Int8 > aSeq;
aRep.Data >>= aSeq;
xInStream = new ::comphelper::SequenceInputStream( aSeq );
}
2012-01-03 10:10:37 +00:00
catch (const uno::Exception&)
{
}
}
return xInStream;
}
bool EmbeddedObjectContainer::SetPersistentEntries(const uno::Reference< embed::XStorage >& _xStorage,bool _bClearModifedFlag)
{
bool bError = false;
const uno::Sequence < OUString > aNames = GetObjectNames();
const OUString* pIter = aNames.getConstArray();
const OUString* pEnd = pIter + aNames.getLength();
for(;pIter != pEnd;++pIter)
{
uno::Reference < embed::XEmbeddedObject > xObj = GetEmbeddedObject( *pIter );
SAL_WARN_IF( !xObj.is(), "comphelper.container", "An empty entry in the embedded objects list!\n" );
if ( xObj.is() )
{
uno::Reference< embed::XEmbedPersist > xPersist( xObj, uno::UNO_QUERY );
if ( xPersist.is() )
{
try
{
xPersist->setPersistentEntry( _xStorage,
*pIter,
embed::EntryInitModes::NO_INIT,
uno::Sequence< beans::PropertyValue >(),
uno::Sequence< beans::PropertyValue >() );
}
2012-01-03 10:10:37 +00:00
catch (const uno::Exception&)
{
// TODO/LATER: error handling
bError = true;
break;
}
}
if ( _bClearModifedFlag )
{
// if this method is used as part of SaveCompleted the object must stay unmodified after execution
try
{
uno::Reference< util::XModifiable > xModif( xObj->getComponent(), uno::UNO_QUERY_THROW );
if ( xModif->isModified() )
xModif->setModified( false );
}
2012-01-03 10:10:37 +00:00
catch (const uno::Exception&)
{
}
}
}
}
return bError;
}
bool EmbeddedObjectContainer::getUserAllowsLinkUpdate() const
{
return pImpl->mbUserAllowsLinkUpdate;
}
void EmbeddedObjectContainer::setUserAllowsLinkUpdate(bool bNew)
{
if(pImpl->mbUserAllowsLinkUpdate != bNew)
{
pImpl->mbUserAllowsLinkUpdate = bNew;
}
}
INTEGRATION: CWS mav09 (1.1.2); FILE ADDED 2004/09/01 13:30:37 mav 1.1.2.21: #i27773# check if running state is available 2004/09/01 13:28:03 mav 1.1.2.20: #i27773# check if running state is available 2004/08/23 09:24:41 mav 1.1.2.19: #i27773# adopt to linux 2004/08/20 10:56:26 mav 1.1.2.18: #i27773# clear image storage reference 2004/08/16 10:30:57 mav 1.1.2.17: #i27773# storage format 2004/08/16 10:15:34 mav 1.1.2.16: #i27773# storage format 2004/07/15 10:27:55 mba 1.1.2.15: #i27773#: method for removing of graphic streams; improved handling of deleted objects 2004/07/06 16:50:11 mba 1.1.2.14: #i27773#: work on TODOs 2004/07/02 08:46:24 mba 1.1.2.13: #i27773#: HasEmbeddedObject must consider storage 2004/06/28 09:37:38 mav 1.1.2.12: #i27773# commit substorage with graphical representations 2004/06/25 11:48:39 mav 1.1.2.11: #i27773# linkage support 2004/06/18 14:07:32 mba 1.1.2.10: #i27773#: fixed debug code 2004/06/14 13:23:47 mav 1.1.2.9: #i27773# use namespace name 2004/06/10 16:49:16 mba 1.1.2.8: #i27773#: improve handling of graphical reps 2004/06/02 11:49:41 mba 1.1.2.7: #i27773#: CopyEmbeddedObject failed when copied inside the same container 2004/05/27 09:51:20 mav 1.1.2.6: #i27773# encrypt graphical stream 2004/05/24 09:02:22 mba 1.1.2.5: #i27773#: some changes about MapUnit 2004/05/20 15:31:52 mba 1.1.2.4: #i27773#: some constant names have changed 2004/05/18 17:11:22 mba 1.1.2.3: #i27773#: new method MoveEmbeddedObject 2004/05/18 11:52:40 mav 1.1.2.2: #i27773# resolve resync problems 2004/05/16 17:25:57 mba 1.1.2.1: #i27773#: new EmbeddedObjectContainer
2004-10-04 20:06:29 +00:00
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */