2010-10-12 15:53:47 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-11-21 22:06:52 +00:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2012-11-21 22:06:52 +00:00
|
|
|
* 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/.
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2012-11-21 22:06:52 +00:00
|
|
|
* This file incorporates work covered by the following license notice:
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2012-11-21 22:06:52 +00:00
|
|
|
* 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 .
|
|
|
|
*/
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2007-06-27 18:07:18 +00:00
|
|
|
#include <svx/svdoole2.hxx>
|
2014-09-12 12:54:11 +02:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
#include <com/sun/star/util/XModifyBroadcaster.hpp>
|
2004-10-04 16:54:47 +00:00
|
|
|
#include <com/sun/star/util/XModifiable.hpp>
|
2014-09-12 12:54:11 +02:00
|
|
|
#include <com/sun/star/chart2/XChartDocument.hpp>
|
2004-10-04 16:54:47 +00:00
|
|
|
#include <com/sun/star/embed/EmbedStates.hpp>
|
|
|
|
#include <com/sun/star/embed/ElementModes.hpp>
|
|
|
|
#include <com/sun/star/embed/EmbedMisc.hpp>
|
|
|
|
#include <com/sun/star/embed/Aspects.hpp>
|
2014-07-11 10:50:29 -04:00
|
|
|
#include <com/sun/star/embed/XEmbedPersist2.hpp>
|
2008-06-16 11:27:42 +00:00
|
|
|
#include <com/sun/star/embed/XInplaceClient.hpp>
|
|
|
|
#include <com/sun/star/embed/XInplaceObject.hpp>
|
2005-01-18 14:01:22 +00:00
|
|
|
#include <com/sun/star/embed/XLinkageSupport.hpp>
|
2005-03-15 10:31:56 +00:00
|
|
|
#include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
|
2008-06-16 11:27:42 +00:00
|
|
|
#include <com/sun/star/embed/XWindowSupplier.hpp>
|
2004-10-04 16:54:47 +00:00
|
|
|
#include <com/sun/star/document/XEventListener.hpp>
|
2005-11-10 15:42:56 +00:00
|
|
|
#include <com/sun/star/container/XChild.hpp>
|
2014-09-12 12:54:11 +02:00
|
|
|
#include <com/sun/star/document/XStorageBasedDocument.hpp>
|
2008-06-16 11:27:42 +00:00
|
|
|
|
2004-10-04 16:54:47 +00:00
|
|
|
#include <comphelper/processfactory.hxx>
|
2005-02-24 14:11:49 +00:00
|
|
|
#include <cppuhelper/exc_hlp.hxx>
|
2004-10-04 16:54:47 +00:00
|
|
|
#include <unotools/ucbstreamhelper.hxx>
|
2008-06-16 11:27:42 +00:00
|
|
|
|
2004-10-04 16:54:47 +00:00
|
|
|
#include <toolkit/helper/vclunohelper.hxx>
|
2008-06-16 11:27:42 +00:00
|
|
|
#include <toolkit/awt/vclxwindow.hxx>
|
|
|
|
#include <toolkit/helper/convert.hxx>
|
|
|
|
|
2013-01-02 22:07:41 +01:00
|
|
|
#include <vcl/graphicfilter.hxx>
|
2004-10-04 16:54:47 +00:00
|
|
|
#include <svtools/embedhlp.hxx>
|
|
|
|
|
|
|
|
#include <sfx2/objsh.hxx>
|
|
|
|
#include <sfx2/ipclient.hxx>
|
2005-01-18 14:01:22 +00:00
|
|
|
#include <sfx2/lnkbase.hxx>
|
2004-10-04 16:54:47 +00:00
|
|
|
#include <tools/stream.hxx>
|
2005-02-24 14:11:49 +00:00
|
|
|
#include <comphelper/anytostring.hxx>
|
2007-06-27 18:07:18 +00:00
|
|
|
#include <svx/svdpagv.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
#include <tools/globname.hxx>
|
|
|
|
#include <vcl/jobset.hxx>
|
2013-04-19 18:08:13 -04:00
|
|
|
#include <comphelper/classids.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2001-03-08 20:28:23 +00:00
|
|
|
#include <sot/formats.hxx>
|
2010-01-13 22:25:07 +01:00
|
|
|
#include <sfx2/linkmgr.hxx>
|
2001-06-22 14:46:24 +00:00
|
|
|
#include <svtools/transfer.hxx>
|
2008-06-16 11:27:42 +00:00
|
|
|
#include <cppuhelper/implbase5.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/solar.hrc>
|
|
|
|
#include <svl/urihelper.hxx>
|
2010-10-16 03:18:35 -05:00
|
|
|
#include <osl/mutex.hxx>
|
2006-11-14 12:46:22 +00:00
|
|
|
#include <vcl/svapp.hxx>
|
|
|
|
|
2014-09-12 12:54:11 +02:00
|
|
|
#include <svx/charthelper.hxx>
|
2007-06-27 18:07:18 +00:00
|
|
|
#include <svx/svdmodel.hxx>
|
2014-05-06 14:35:49 +03:00
|
|
|
#include "svdglob.hxx"
|
2013-10-22 15:58:57 +03:00
|
|
|
#include "svx/svdstr.hrc"
|
2007-06-27 18:07:18 +00:00
|
|
|
#include <svx/svdetc.hxx>
|
|
|
|
#include <svx/svdview.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
#include "unomlstr.hxx"
|
2014-05-06 14:52:33 +03:00
|
|
|
#include <sdr/contact/viewcontactofsdrole2obj.hxx>
|
CWS-TOOLING: integrate CWS aw059
2008-12-16 16:15:40 +0100 aw r265557 : #i95645# avoid expensive tries to stream in graphic data when stream is at end anyways
2008-12-15 16:49:58 +0100 wg r265512 : i97278
2008-12-12 16:02:15 +0100 aw r265427 : #i95645# new formulation was wrong in two places; thanks go to THB. Thanks!
2008-12-12 15:49:06 +0100 aw r265425 : #i95645# refined formulation of AA on/off constraints for VCLCanvas
2008-12-12 14:51:26 +0100 aw r265420 : #i95645# workaround for DrawTransparent of button hilighting when remote displayed; somehow GDI+ does bad dithering in that case
2008-12-12 13:23:00 +0100 aw r265414 : removed temporary build hack; it made it's way in using the rebase; with SVN the rebase is not based on pure checkouts, but uses local changes.
2008-12-11 19:35:59 +0100 aw r265352 : #i95645# need to switch off AA for WNT and UNX, the VCLCanvas is currently not able to handle AA correctly
2008-12-11 16:05:17 +0100 thb r265327 : #i95645# Changed defaults to on; as for the while svx dialog is not changed
2008-12-10 13:40:38 +0100 aw r265180 : #i95645# changed pixel snap to basegfx::fround
2008-12-10 13:25:45 +0100 aw r265177 : corrected linux warning
2008-12-10 12:28:02 +0100 aw r265167 : #i95645# added support for pixel snap/linux resp. no AA for mac (also pixel snap) when AA is switched off to the basegfx::B2DPolyPolygon painting VCL methods; needed for e.g. selection in SC and SW
2008-12-09 18:44:39 +0100 aw r265136 : #i95645# corrected filled path construction
2008-12-09 18:12:40 +0100 aw r265133 : #i95645# added support for non-AAd transparent paints
2008-12-09 18:11:58 +0100 aw r265132 : #i95645# forced selection without AA
2008-12-09 18:11:29 +0100 aw r265131 : #i88893# smoothed/corrected SW selection rects for transparent selection, forced selection without AA
2008-12-09 15:21:39 +0100 aw r265094 : #i95645# corrected FormControl full drag
2008-12-09 15:11:26 +0100 aw r265093 : #i95645# make gdiplus usages more safe when no line or fill color is selected
2008-12-09 14:30:09 +0100 aw r265085 : #i95645# added GDIPlus support
2008-12-09 13:41:06 +0100 aw r265081 : #i95645# added simple AA using GDIPlis to VCL
2008-12-09 13:40:46 +0100 aw r265080 : #i95645# added simple AA using GDIPlis to VCL
2008-12-09 13:40:29 +0100 aw r265079 : #i95645# added simple AA using GDIPlis to VCL
2008-12-09 13:33:16 +0100 aw r265078 : #i95645# changes to requirements, discussed with FPE
2008-12-08 14:11:39 +0100 aw r264995 : #i95646# added missing extra-wireframe for SdrDragObjOwn implementations when object has no border
2008-12-08 14:11:00 +0100 aw r264994 : #i95646# corrected RenderMarkerArrayPrimitive2D OutDev usage in VclProcessor2D
2008-12-08 12:15:10 +0100 ufi r264987 : aw059
2008-12-08 12:14:40 +0100 ufi r264986 : aw059
2008-12-05 13:16:18 +0100 aw r264905 : CWS-TOOLING: rebase CWS aw059 to trunk@264807 (milestone: DEV300:m37)
2008-12-04 11:29:48 +0100 aw r264827 : #i95645# corrected warning
2008-12-03 14:43:39 +0100 aw r264783 : #i95645# simplified overlay manager and objects to stl vector; added stuff to render some more overlay to primitive renderer to get AA support for WIN32
2008-12-03 14:42:43 +0100 aw r264782 : #i95645# added test for WIN32 for AA if cairo canvas is available
2008-12-03 14:42:13 +0100 aw r264781 : #i95645# removed unused options for writer selection overlay
2008-12-03 14:41:51 +0100 aw r264780 : #i95645# removed unused options for calc overlay
2008-12-03 14:41:21 +0100 aw r264779 : #i95645# small corrections in canvas renderer
2008-12-02 18:32:31 +0100 aw r264730 : #i95646# merged cairo version from THB's CWS cairosource01
2008-12-02 15:25:45 +0100 aw r264705 : #i95645# added helpers for the MarkerArrayPrimitive2D change which support buffered creation of the most used markers
2008-12-02 12:50:01 +0100 aw r264690 : #i95645# added a non-saved method IsAAPossibleOnThisSystem to SvtOptionsDrawinglayer to quickly test if AA can be offered on the system, added buffering of that check.
2008-12-02 12:48:51 +0100 aw r264689 : #i95645# unified MarkerArrayPrimitive2D to work bitmap-orientated, adapted usages. Added buffered preparation for needed markers. Minor adaptions for AA
2008-12-02 12:47:53 +0100 aw r264688 : #i95645# unified MarkerArrayPrimitive2D to no longer work on a enum and types of markers, but to use a BitmapEx (or any other Bitmap object) which will be displayed centerd and in discrete coordinates at positions. Adapted decomposition and all usages. Corrected minor stuff with grid primitive
2008-11-28 17:11:12 +0100 thb r264565 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-28 17:03:27 +0100 thb r264563 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-28 17:00:07 +0100 thb r264562 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-28 16:59:51 +0100 thb r264561 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-27 19:13:42 +0100 aw r264519 : #i95646# optimized getLength() a little bit
2008-11-27 19:12:50 +0100 aw r264518 : #i95646# corrected AA expansion of invalidate frame; buffered discrete distance at OM
2008-11-27 18:50:05 +0100 aw r264516 : #i95646# corrected fit to frame texts for WIN32
2008-11-27 15:32:15 +0100 aw r264496 : #i95646# helplines corrected
2008-11-27 15:32:05 +0100 aw r264495 : #i95646# helplines corrected
2008-11-27 15:01:30 +0100 aw r264492 : #i95646# enable AA support for old polygons, especially to get support for MetaFile output
2008-11-27 14:33:28 +0100 aw r264489 : #i95646# AA support for wireframe overlays
2008-11-27 13:40:54 +0100 aw r264485 : #i95646# added full repaint when AA option changes
2008-11-27 13:29:19 +0100 aw r264482 : #i95646# corrected handling of bSolidDragging config entries
2008-11-27 13:29:08 +0100 aw r264481 : #i95646# corrected handling of bSolidDragging config entries
2008-11-27 11:30:12 +0100 aw r264469 : #i95646# corrected IsAAPossibleOnThisSystem implementation
2008-11-26 16:33:04 +0100 aw r264420 : #i95646# adapted OfaViewTabPage to use disable mechanism for AA and HWAccel
2008-11-26 15:49:19 +0100 aw r264406 : #i95646# added DlgEdObj::getFullDragClone() to create specialized simple SdrUnoObj clones for solid dragging
2008-11-26 15:48:11 +0100 aw r264405 : #i95646# changed derivation of ViewObjectContactOfUnoControl to get a valid isPrimitiveVisible() implementation
2008-11-26 14:11:37 +0100 aw r264385 : #i88893# added new look for selection in sw
2008-11-26 11:32:33 +0100 aw r264360 : corrected compiler warning
2008-11-25 18:46:29 +0100 aw r264328 : #i95646# snapshot with FullDrag clones
2008-11-25 18:46:07 +0100 aw r264327 : #i95646# snapshot with FullDrag clones
2008-11-25 18:45:43 +0100 aw r264326 : #i95646# snapshot with FullDrag clones
2008-11-25 18:19:04 +0100 thb r264324 : #i96585# Added missing inline specifier
2008-11-25 13:16:25 +0100 aw r264285 : #i95646# next snapshot
2008-11-25 13:15:33 +0100 aw r264284 : #i95646# next snapshot
2008-11-25 13:15:12 +0100 aw r264283 : #i95646# next snapshot
2008-11-25 13:14:51 +0100 aw r264282 : #i95646# next snapshot
2008-11-20 13:40:49 +0100 aw r264045 : #i95646# stable snapshot
2008-11-20 13:40:29 +0100 aw r264044 : #i95646# stable snapshot
2008-11-20 13:40:06 +0100 aw r264043 : #i95646# stable snapshot
2008-11-20 13:39:45 +0100 aw r264042 : #i95646# stable snapshot
2008-11-18 11:53:39 +0100 aw r263758 : #i95646# snapshot for linux test build
2008-11-18 11:52:54 +0100 aw r263757 : #i95646# snapshot for linux test build
2008-11-18 11:52:02 +0100 aw r263756 : #i95646# snapshot for linux test build
2008-11-14 18:17:49 +0100 aw r263692 : #i95646# snapshot with most stuff working
2008-11-14 18:14:26 +0100 aw r263691 : #i95646# snapshot with most stuff working
2008-11-14 18:12:50 +0100 aw r263690 : #i95646# snapshot with most stuff working
2008-11-14 18:12:16 +0100 aw r263689 : #i95646# snapshot with most stuff working
2008-11-14 18:11:41 +0100 aw r263688 : #i95646# snapshot with most stuff working
2008-11-07 18:44:22 +0100 aw r263479 : #i95968# better support PrefMapMode; special for MAP_PIXEL was missing
2008-11-05 17:39:15 +0100 aw r263356 : #i95644# #i95645# #i95646# bigger change done, saving for another experiment
2008-11-05 17:39:02 +0100 aw r263355 : #i95644# #i95645# #i95646# bigger change done, saving for another experiment
2008-11-05 12:28:32 +0100 aw r263350 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:27:51 +0100 aw r263349 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:26:58 +0100 aw r263348 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:26:17 +0100 aw r263347 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:25:55 +0100 aw r263346 : #i95644# #i95645# #i95646# in-between state before bigger change
2009-01-05 13:44:12 +00:00
|
|
|
#include <svx/svdograf.hxx>
|
2014-05-06 14:52:33 +03:00
|
|
|
#include <sdr/properties/oleproperties.hxx>
|
2009-04-13 07:39:27 +00:00
|
|
|
#include <svx/xlnclit.hxx>
|
|
|
|
#include <svx/xbtmpit.hxx>
|
|
|
|
#include <svx/xflbmtit.hxx>
|
|
|
|
#include <svx/xflbstit.hxx>
|
2012-11-21 22:06:52 +00:00
|
|
|
#include <basegfx/matrix/b2dhommatrix.hxx>
|
|
|
|
#include <basegfx/polygon/b2dpolypolygon.hxx>
|
|
|
|
#include <editeng/outlobj.hxx>
|
2012-05-31 13:23:45 +00:00
|
|
|
#include <svx/svdpage.hxx>
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
using namespace ::com::sun::star;
|
|
|
|
|
2012-10-12 13:33:22 +02:00
|
|
|
static uno::Reference < beans::XPropertySet > lcl_getFrame_throw(const SdrOle2Obj* _pObject)
|
2008-06-16 11:27:42 +00:00
|
|
|
{
|
|
|
|
uno::Reference < beans::XPropertySet > xFrame;
|
|
|
|
if ( _pObject )
|
|
|
|
{
|
|
|
|
uno::Reference< frame::XController> xController = _pObject->GetParentXModel()->getCurrentController();
|
|
|
|
if ( xController.is() )
|
|
|
|
{
|
|
|
|
xFrame.set( xController->getFrame(),uno::UNO_QUERY_THROW);
|
|
|
|
}
|
|
|
|
} // if ( _pObject )
|
|
|
|
return xFrame;
|
|
|
|
}
|
|
|
|
|
|
|
|
class SdrLightEmbeddedClient_Impl : public ::cppu::WeakImplHelper5
|
2006-10-13 10:23:44 +00:00
|
|
|
< embed::XStateChangeListener
|
|
|
|
, document::XEventListener
|
2008-06-16 11:27:42 +00:00
|
|
|
, embed::XInplaceClient
|
|
|
|
, embed::XEmbeddedClient
|
|
|
|
, embed::XWindowSupplier
|
|
|
|
>
|
2004-11-26 15:33:16 +00:00
|
|
|
{
|
2008-06-16 11:27:42 +00:00
|
|
|
uno::Reference< awt::XWindow > m_xWindow;
|
2004-11-26 15:33:16 +00:00
|
|
|
SdrOle2Obj* mpObj;
|
2006-10-13 10:23:44 +00:00
|
|
|
|
2014-10-23 17:41:47 +02:00
|
|
|
Fraction m_aScaleWidth;
|
|
|
|
Fraction m_aScaleHeight;
|
2006-10-13 10:23:44 +00:00
|
|
|
|
|
|
|
|
2004-11-26 15:33:16 +00:00
|
|
|
public:
|
2015-05-27 10:53:55 +01:00
|
|
|
explicit SdrLightEmbeddedClient_Impl( SdrOle2Obj* pObj );
|
2004-11-26 15:33:16 +00:00
|
|
|
void Release();
|
2006-10-13 10:23:44 +00:00
|
|
|
|
2014-10-23 17:41:47 +02:00
|
|
|
void SetSizeScale( const Fraction& aScaleWidth, const Fraction& aScaleHeight )
|
2006-10-13 10:23:44 +00:00
|
|
|
{
|
|
|
|
m_aScaleWidth = aScaleWidth;
|
|
|
|
m_aScaleHeight = aScaleHeight;
|
|
|
|
}
|
|
|
|
|
2014-10-23 17:41:47 +02:00
|
|
|
Fraction GetScaleWidth() const { return m_aScaleWidth; }
|
|
|
|
Fraction GetScaleHeight() const { return m_aScaleHeight; }
|
2008-06-16 11:27:42 +00:00
|
|
|
|
|
|
|
void setWindow(const uno::Reference< awt::XWindow >& _xWindow);
|
2006-10-13 10:23:44 +00:00
|
|
|
|
2008-06-16 11:27:42 +00:00
|
|
|
private:
|
|
|
|
Rectangle impl_getScaledRect_nothrow() const;
|
2006-10-13 10:23:44 +00:00
|
|
|
// XStateChangeListener
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual void SAL_CALL changingState( const ::com::sun::star::lang::EventObject& aEvent, ::sal_Int32 nOldState, ::sal_Int32 nNewState ) throw (::com::sun::star::embed::WrongStateException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
|
|
virtual void SAL_CALL stateChanged( const ::com::sun::star::lang::EventObject& aEvent, ::sal_Int32 nOldState, ::sal_Int32 nNewState ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
|
|
virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
2006-10-13 10:23:44 +00:00
|
|
|
|
|
|
|
// document::XEventListener
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual void SAL_CALL notifyEvent( const document::EventObject& aEvent ) throw( uno::RuntimeException, std::exception ) SAL_OVERRIDE;
|
2006-10-13 10:23:44 +00:00
|
|
|
|
|
|
|
// XEmbeddedClient
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual void SAL_CALL saveObject() throw ( embed::ObjectSaveVetoException, uno::Exception, uno::RuntimeException, std::exception ) SAL_OVERRIDE;
|
|
|
|
virtual void SAL_CALL visibilityChanged( sal_Bool bVisible ) throw ( embed::WrongStateException, uno::RuntimeException, std::exception ) SAL_OVERRIDE;
|
2006-10-13 10:23:44 +00:00
|
|
|
|
|
|
|
// XComponentSupplier
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual uno::Reference< util::XCloseable > SAL_CALL getComponent() throw ( uno::RuntimeException, std::exception ) SAL_OVERRIDE;
|
2008-06-16 11:27:42 +00:00
|
|
|
|
|
|
|
// XInplaceClient
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual sal_Bool SAL_CALL canInplaceActivate() throw ( uno::RuntimeException, std::exception ) SAL_OVERRIDE;
|
|
|
|
virtual void SAL_CALL activatingInplace() throw ( embed::WrongStateException, uno::RuntimeException, std::exception ) SAL_OVERRIDE;
|
|
|
|
virtual void SAL_CALL activatingUI() throw ( embed::WrongStateException, uno::RuntimeException, std::exception ) SAL_OVERRIDE;
|
|
|
|
virtual void SAL_CALL deactivatedInplace() throw ( embed::WrongStateException, uno::RuntimeException, std::exception ) SAL_OVERRIDE;
|
|
|
|
virtual void SAL_CALL deactivatedUI() throw ( embed::WrongStateException, uno::RuntimeException, std::exception ) SAL_OVERRIDE;
|
|
|
|
virtual uno::Reference< ::com::sun::star::frame::XLayoutManager > SAL_CALL getLayoutManager() throw ( embed::WrongStateException, uno::RuntimeException, std::exception ) SAL_OVERRIDE;
|
|
|
|
virtual uno::Reference< frame::XDispatchProvider > SAL_CALL getInplaceDispatchProvider() throw ( embed::WrongStateException, uno::RuntimeException, std::exception ) SAL_OVERRIDE;
|
|
|
|
virtual awt::Rectangle SAL_CALL getPlacement() throw ( embed::WrongStateException, uno::RuntimeException, std::exception ) SAL_OVERRIDE;
|
|
|
|
virtual awt::Rectangle SAL_CALL getClipRectangle() throw ( embed::WrongStateException, uno::RuntimeException, std::exception ) SAL_OVERRIDE;
|
|
|
|
virtual void SAL_CALL translateAccelerators( const uno::Sequence< awt::KeyEvent >& aKeys ) throw ( embed::WrongStateException, uno::RuntimeException, std::exception ) SAL_OVERRIDE;
|
|
|
|
virtual void SAL_CALL scrollObject( const awt::Size& aOffset ) throw ( embed::WrongStateException, uno::RuntimeException, std::exception ) SAL_OVERRIDE;
|
|
|
|
virtual void SAL_CALL changedPlacement( const awt::Rectangle& aPosRect ) throw ( embed::WrongStateException, uno::Exception, uno::RuntimeException, std::exception ) SAL_OVERRIDE;
|
2008-06-16 11:27:42 +00:00
|
|
|
|
|
|
|
// XWindowSupplier
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual uno::Reference< awt::XWindow > SAL_CALL getWindow() throw ( uno::RuntimeException, std::exception ) SAL_OVERRIDE;
|
2004-11-26 15:33:16 +00:00
|
|
|
};
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2006-10-13 10:23:44 +00:00
|
|
|
SdrLightEmbeddedClient_Impl::SdrLightEmbeddedClient_Impl( SdrOle2Obj* pObj )
|
2004-11-26 15:33:16 +00:00
|
|
|
: mpObj( pObj )
|
|
|
|
{
|
|
|
|
}
|
2008-06-16 11:27:42 +00:00
|
|
|
Rectangle SdrLightEmbeddedClient_Impl::impl_getScaledRect_nothrow() const
|
|
|
|
{
|
|
|
|
Rectangle aLogicRect( mpObj->GetLogicRect() );
|
|
|
|
// apply scaling to object area and convert to pixels
|
2014-10-23 17:41:47 +02:00
|
|
|
aLogicRect.SetSize( Size( Fraction( aLogicRect.GetWidth() ) * m_aScaleWidth,
|
|
|
|
Fraction( aLogicRect.GetHeight() ) * m_aScaleHeight ) );
|
2008-06-16 11:27:42 +00:00
|
|
|
return aLogicRect;
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2014-02-25 21:31:58 +01:00
|
|
|
void SAL_CALL SdrLightEmbeddedClient_Impl::changingState( const ::com::sun::star::lang::EventObject& /*aEvent*/, ::sal_Int32 /*nOldState*/, ::sal_Int32 /*nNewState*/ ) throw (::com::sun::star::embed::WrongStateException, ::com::sun::star::uno::RuntimeException, std::exception)
|
2004-11-26 15:33:16 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2006-10-13 10:23:44 +00:00
|
|
|
void SdrLightEmbeddedClient_Impl::Release()
|
2004-11-26 15:33:16 +00:00
|
|
|
{
|
2006-10-13 10:23:44 +00:00
|
|
|
{
|
2010-10-13 02:47:36 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2006-10-13 10:23:44 +00:00
|
|
|
mpObj = NULL;
|
|
|
|
}
|
|
|
|
|
2004-11-26 15:33:16 +00:00
|
|
|
release();
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2014-02-25 21:31:58 +01:00
|
|
|
void SAL_CALL SdrLightEmbeddedClient_Impl::stateChanged( const ::com::sun::star::lang::EventObject& /*aEvent*/, ::sal_Int32 nOldState, ::sal_Int32 nNewState ) throw (::com::sun::star::uno::RuntimeException, std::exception)
|
2004-11-26 15:33:16 +00:00
|
|
|
{
|
2010-10-13 02:47:36 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2006-10-13 10:23:44 +00:00
|
|
|
|
2004-11-26 15:33:16 +00:00
|
|
|
if ( mpObj && nOldState == embed::EmbedStates::LOADED && nNewState == embed::EmbedStates::RUNNING )
|
|
|
|
{
|
|
|
|
mpObj->ObjectLoaded();
|
|
|
|
GetSdrGlobalData().GetOLEObjCache().InsertObj(mpObj);
|
|
|
|
}
|
|
|
|
else if ( mpObj && nNewState == embed::EmbedStates::LOADED && nOldState == embed::EmbedStates::RUNNING )
|
|
|
|
{
|
|
|
|
GetSdrGlobalData().GetOLEObjCache().RemoveObj(mpObj);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2014-02-25 21:31:58 +01:00
|
|
|
void SAL_CALL SdrLightEmbeddedClient_Impl::disposing( const ::com::sun::star::lang::EventObject& /*aEvent*/ ) throw (::com::sun::star::uno::RuntimeException, std::exception)
|
2004-11-26 15:33:16 +00:00
|
|
|
{
|
2010-10-13 02:47:36 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2006-10-13 10:23:44 +00:00
|
|
|
|
2004-11-26 15:33:16 +00:00
|
|
|
GetSdrGlobalData().GetOLEObjCache().RemoveObj(mpObj);
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2014-02-25 21:31:58 +01:00
|
|
|
void SAL_CALL SdrLightEmbeddedClient_Impl::notifyEvent( const document::EventObject& aEvent ) throw( uno::RuntimeException, std::exception )
|
2006-10-13 10:23:44 +00:00
|
|
|
{
|
|
|
|
// TODO/LATER: when writer uses this implementation the code could be shared with SfxInPlaceClient_Impl
|
|
|
|
|
2010-10-13 02:47:36 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2006-10-13 10:23:44 +00:00
|
|
|
|
2011-11-28 14:14:12 +01:00
|
|
|
// the code currently makes sense only in case there is no other client
|
2012-04-06 19:49:53 +02:00
|
|
|
if ( mpObj && mpObj->GetAspect() != embed::Aspects::MSOLE_ICON && aEvent.EventName == "OnVisAreaChanged"
|
2006-10-13 10:23:44 +00:00
|
|
|
&& mpObj->GetObjRef().is() && mpObj->GetObjRef()->getClientSite() == uno::Reference< embed::XEmbeddedClient >( this ) )
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
MapUnit aContainerMapUnit( MAP_100TH_MM );
|
|
|
|
uno::Reference< embed::XVisualObject > xParentVis( mpObj->GetParentXModel(), uno::UNO_QUERY );
|
|
|
|
if ( xParentVis.is() )
|
|
|
|
aContainerMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xParentVis->getMapUnit( mpObj->GetAspect() ) );
|
|
|
|
|
|
|
|
MapUnit aObjMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( mpObj->GetObjRef()->getMapUnit( mpObj->GetAspect() ) );
|
|
|
|
|
|
|
|
Rectangle aVisArea;
|
|
|
|
awt::Size aSz;
|
|
|
|
try
|
|
|
|
{
|
|
|
|
aSz = mpObj->GetObjRef()->getVisualAreaSize( mpObj->GetAspect() );
|
|
|
|
}
|
|
|
|
catch( embed::NoVisualAreaSizeException& )
|
|
|
|
{
|
2011-03-19 14:09:49 +01:00
|
|
|
OSL_FAIL( "No visual area size!\n" );
|
2006-10-13 10:23:44 +00:00
|
|
|
aSz.Width = 5000;
|
|
|
|
aSz.Height = 5000;
|
|
|
|
}
|
|
|
|
catch( uno::Exception& )
|
|
|
|
{
|
2011-03-19 14:09:49 +01:00
|
|
|
OSL_FAIL( "Unexpected exception!\n" );
|
2006-10-13 10:23:44 +00:00
|
|
|
aSz.Width = 5000;
|
|
|
|
aSz.Height = 5000;
|
|
|
|
}
|
|
|
|
|
|
|
|
aVisArea.SetSize( Size( aSz.Width, aSz.Height ) );
|
|
|
|
aVisArea = OutputDevice::LogicToLogic( aVisArea, aObjMapUnit, aContainerMapUnit );
|
2014-10-23 17:41:47 +02:00
|
|
|
Size aScaledSize( static_cast< long >( m_aScaleWidth * Fraction( aVisArea.GetWidth() ) ),
|
|
|
|
static_cast< long >( m_aScaleHeight * Fraction( aVisArea.GetHeight() ) ) );
|
2008-06-16 11:27:42 +00:00
|
|
|
Rectangle aLogicRect( mpObj->GetLogicRect() );
|
2006-10-13 10:23:44 +00:00
|
|
|
|
|
|
|
// react to the change if the difference is bigger than one pixel
|
|
|
|
Size aPixelDiff =
|
|
|
|
Application::GetDefaultDevice()->LogicToPixel(
|
|
|
|
Size( aLogicRect.GetWidth() - aScaledSize.Width(),
|
|
|
|
aLogicRect.GetHeight() - aScaledSize.Height() ),
|
|
|
|
aContainerMapUnit );
|
|
|
|
if( aPixelDiff.Width() || aPixelDiff.Height() )
|
|
|
|
{
|
|
|
|
mpObj->SetLogicRect( Rectangle( aLogicRect.TopLeft(), aScaledSize ) );
|
|
|
|
mpObj->BroadcastObjectChange();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
mpObj->ActionChanged();
|
|
|
|
}
|
|
|
|
catch( uno::Exception& )
|
|
|
|
{
|
2011-03-19 14:09:49 +01:00
|
|
|
OSL_FAIL( "Unexpected exception!\n" );
|
2006-10-13 10:23:44 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2006-10-13 10:23:44 +00:00
|
|
|
void SAL_CALL SdrLightEmbeddedClient_Impl::saveObject()
|
|
|
|
throw ( embed::ObjectSaveVetoException,
|
|
|
|
uno::Exception,
|
2014-02-25 21:31:58 +01:00
|
|
|
uno::RuntimeException, std::exception )
|
2006-10-13 10:23:44 +00:00
|
|
|
{
|
|
|
|
// TODO/LATER: when writer uses this implementation the code could be shared with SfxInPlaceClient_Impl
|
|
|
|
uno::Reference< embed::XCommonEmbedPersist > xPersist;
|
|
|
|
uno::Reference< util::XModifiable > xModifiable;
|
|
|
|
|
|
|
|
{
|
2010-10-13 02:47:36 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2006-10-13 10:23:44 +00:00
|
|
|
|
|
|
|
if ( !mpObj )
|
|
|
|
throw embed::ObjectSaveVetoException();
|
|
|
|
|
2011-11-28 14:14:12 +01:00
|
|
|
// the common persistence is supported by objects and links
|
2006-10-13 10:23:44 +00:00
|
|
|
xPersist = uno::Reference< embed::XCommonEmbedPersist >( mpObj->GetObjRef(), uno::UNO_QUERY_THROW );
|
|
|
|
xModifiable = uno::Reference< util::XModifiable >( mpObj->GetParentXModel(), uno::UNO_QUERY );
|
|
|
|
}
|
|
|
|
|
|
|
|
xPersist->storeOwn();
|
|
|
|
|
|
|
|
if ( xModifiable.is() )
|
2014-03-10 11:09:59 +02:00
|
|
|
xModifiable->setModified( true );
|
2006-10-13 10:23:44 +00:00
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2006-10-13 10:23:44 +00:00
|
|
|
void SAL_CALL SdrLightEmbeddedClient_Impl::visibilityChanged( sal_Bool /*bVisible*/ )
|
|
|
|
throw ( embed::WrongStateException,
|
2014-02-25 21:31:58 +01:00
|
|
|
uno::RuntimeException, std::exception )
|
2006-10-13 10:23:44 +00:00
|
|
|
{
|
|
|
|
// nothing to do currently
|
|
|
|
// TODO/LATER: when writer uses this implementation the code could be shared with SfxInPlaceClient_Impl
|
2008-06-16 11:27:42 +00:00
|
|
|
if ( mpObj )
|
|
|
|
{
|
|
|
|
Rectangle aLogicRect( mpObj->GetLogicRect() );
|
|
|
|
Size aLogicSize( aLogicRect.GetWidth(), aLogicRect.GetHeight() );
|
|
|
|
|
|
|
|
if( mpObj->IsChart() )
|
|
|
|
{
|
|
|
|
//charts never should be stretched see #i84323# for example
|
|
|
|
mpObj->SetLogicRect( Rectangle( aLogicRect.TopLeft(), aLogicSize ) );
|
|
|
|
mpObj->BroadcastObjectChange();
|
|
|
|
} // if( mpObj->IsChart() )
|
|
|
|
}
|
2006-10-13 10:23:44 +00:00
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2006-10-13 10:23:44 +00:00
|
|
|
uno::Reference< util::XCloseable > SAL_CALL SdrLightEmbeddedClient_Impl::getComponent()
|
2014-02-25 21:31:58 +01:00
|
|
|
throw ( uno::RuntimeException, std::exception )
|
2006-10-13 10:23:44 +00:00
|
|
|
{
|
|
|
|
uno::Reference< util::XCloseable > xResult;
|
|
|
|
|
2010-10-13 02:47:36 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2006-10-13 10:23:44 +00:00
|
|
|
if ( mpObj )
|
|
|
|
xResult = uno::Reference< util::XCloseable >( mpObj->GetParentXModel(), uno::UNO_QUERY );
|
|
|
|
|
|
|
|
return xResult;
|
|
|
|
}
|
2008-06-16 11:27:42 +00:00
|
|
|
// XInplaceClient
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2008-06-16 11:27:42 +00:00
|
|
|
sal_Bool SAL_CALL SdrLightEmbeddedClient_Impl::canInplaceActivate()
|
2014-02-25 21:31:58 +01:00
|
|
|
throw ( uno::RuntimeException, std::exception )
|
2008-06-16 11:27:42 +00:00
|
|
|
{
|
2014-04-14 16:15:22 +02:00
|
|
|
bool bRet = false;
|
2010-10-13 02:47:36 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2008-06-16 11:27:42 +00:00
|
|
|
if ( mpObj )
|
|
|
|
{
|
|
|
|
uno::Reference< embed::XEmbeddedObject > xObject = mpObj->GetObjRef();
|
|
|
|
if ( !xObject.is() )
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
// we don't want to switch directly from outplace to inplace mode
|
|
|
|
bRet = !( xObject->getCurrentState() == embed::EmbedStates::ACTIVE || mpObj->GetAspect() == embed::Aspects::MSOLE_ICON );
|
|
|
|
} // if ( mpObj )
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2008-06-16 11:27:42 +00:00
|
|
|
void SAL_CALL SdrLightEmbeddedClient_Impl::activatingInplace()
|
|
|
|
throw ( embed::WrongStateException,
|
2014-02-25 21:31:58 +01:00
|
|
|
uno::RuntimeException, std::exception )
|
2008-06-16 11:27:42 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2008-06-16 11:27:42 +00:00
|
|
|
void SAL_CALL SdrLightEmbeddedClient_Impl::activatingUI()
|
|
|
|
throw ( embed::WrongStateException,
|
2014-02-25 21:31:58 +01:00
|
|
|
uno::RuntimeException, std::exception )
|
2008-06-16 11:27:42 +00:00
|
|
|
{
|
2010-10-13 02:47:36 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2008-06-16 11:27:42 +00:00
|
|
|
|
|
|
|
uno::Reference < beans::XPropertySet > xFrame( lcl_getFrame_throw(mpObj));
|
|
|
|
uno::Reference < frame::XFrame > xOwnFrame( xFrame,uno::UNO_QUERY);
|
|
|
|
uno::Reference < frame::XFramesSupplier > xParentFrame( xOwnFrame->getCreator(), uno::UNO_QUERY );
|
|
|
|
if ( xParentFrame.is() )
|
|
|
|
xParentFrame->setActiveFrame( xOwnFrame );
|
|
|
|
|
|
|
|
OLEObjCache& rObjCache = GetSdrGlobalData().GetOLEObjCache();
|
2012-08-14 14:47:34 +02:00
|
|
|
const sal_uIntPtr nCount = rObjCache.size();
|
2008-06-16 11:27:42 +00:00
|
|
|
for(sal_Int32 i = nCount-1 ; i >= 0;--i)
|
|
|
|
{
|
2012-08-14 14:47:34 +02:00
|
|
|
SdrOle2Obj* pObj = rObjCache[i];
|
2008-06-16 11:27:42 +00:00
|
|
|
if ( pObj != mpObj )
|
|
|
|
{
|
|
|
|
// only deactivate ole objects which belongs to the same frame
|
|
|
|
if ( xFrame == lcl_getFrame_throw(pObj) )
|
|
|
|
{
|
|
|
|
uno::Reference< embed::XEmbeddedObject > xObject = pObj->GetObjRef();
|
|
|
|
try
|
|
|
|
{
|
2014-08-11 09:54:20 +02:00
|
|
|
if ( (xObject->getStatus( pObj->GetAspect() ) & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE) ||
|
|
|
|
svt::EmbeddedObjectRef::IsGLChart(xObject) )
|
2008-06-16 11:27:42 +00:00
|
|
|
xObject->changeState( embed::EmbedStates::INPLACE_ACTIVE );
|
|
|
|
else
|
2009-04-23 13:48:24 +00:00
|
|
|
{
|
|
|
|
// the links should not stay in running state for long time because of locking
|
|
|
|
uno::Reference< embed::XLinkageSupport > xLink( xObject, uno::UNO_QUERY );
|
|
|
|
if ( xLink.is() && xLink->isLink() )
|
|
|
|
xObject->changeState( embed::EmbedStates::LOADED );
|
|
|
|
else
|
|
|
|
xObject->changeState( embed::EmbedStates::RUNNING );
|
|
|
|
}
|
2008-06-16 11:27:42 +00:00
|
|
|
}
|
|
|
|
catch (com::sun::star::uno::Exception& )
|
|
|
|
{}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} // for(sal_Int32 i = nCount-1 ; i >= 0;--i)
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2008-06-16 11:27:42 +00:00
|
|
|
void SAL_CALL SdrLightEmbeddedClient_Impl::deactivatedInplace()
|
|
|
|
throw ( embed::WrongStateException,
|
2014-02-25 21:31:58 +01:00
|
|
|
uno::RuntimeException, std::exception )
|
2008-06-16 11:27:42 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2008-06-16 11:27:42 +00:00
|
|
|
void SAL_CALL SdrLightEmbeddedClient_Impl::deactivatedUI()
|
|
|
|
throw ( embed::WrongStateException,
|
2014-02-25 21:31:58 +01:00
|
|
|
uno::RuntimeException, std::exception )
|
2008-06-16 11:27:42 +00:00
|
|
|
{
|
2010-10-13 02:47:36 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2008-06-16 11:27:42 +00:00
|
|
|
com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager > xLayoutManager(getLayoutManager());
|
|
|
|
if ( xLayoutManager.is() )
|
|
|
|
{
|
2014-11-03 14:03:54 +02:00
|
|
|
static const char aMenuBarURL[] = "private:resource/menubar/menubar";
|
2008-06-16 11:27:42 +00:00
|
|
|
if ( !xLayoutManager->isElementVisible( aMenuBarURL ) )
|
|
|
|
xLayoutManager->createElement( aMenuBarURL );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2008-06-16 11:27:42 +00:00
|
|
|
uno::Reference< ::com::sun::star::frame::XLayoutManager > SAL_CALL SdrLightEmbeddedClient_Impl::getLayoutManager()
|
|
|
|
throw ( embed::WrongStateException,
|
2014-02-25 21:31:58 +01:00
|
|
|
uno::RuntimeException, std::exception )
|
2008-06-16 11:27:42 +00:00
|
|
|
{
|
|
|
|
uno::Reference< ::com::sun::star::frame::XLayoutManager > xMan;
|
2010-10-13 02:47:36 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2008-06-16 11:27:42 +00:00
|
|
|
uno::Reference < beans::XPropertySet > xFrame( lcl_getFrame_throw(mpObj));
|
|
|
|
try
|
|
|
|
{
|
2013-06-29 21:24:12 +02:00
|
|
|
xMan.set(xFrame->getPropertyValue("LayoutManager"),uno::UNO_QUERY);
|
2008-06-16 11:27:42 +00:00
|
|
|
}
|
|
|
|
catch ( uno::Exception& )
|
|
|
|
{
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
}
|
|
|
|
|
|
|
|
return xMan;
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2008-06-16 11:27:42 +00:00
|
|
|
uno::Reference< frame::XDispatchProvider > SAL_CALL SdrLightEmbeddedClient_Impl::getInplaceDispatchProvider()
|
|
|
|
throw ( embed::WrongStateException,
|
2014-02-25 21:31:58 +01:00
|
|
|
uno::RuntimeException, std::exception )
|
2008-06-16 11:27:42 +00:00
|
|
|
{
|
2010-10-13 02:47:36 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2008-06-16 11:27:42 +00:00
|
|
|
return uno::Reference < frame::XDispatchProvider >( lcl_getFrame_throw(mpObj), uno::UNO_QUERY_THROW );
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2008-06-16 11:27:42 +00:00
|
|
|
awt::Rectangle SAL_CALL SdrLightEmbeddedClient_Impl::getPlacement()
|
|
|
|
throw ( embed::WrongStateException,
|
2014-02-25 21:31:58 +01:00
|
|
|
uno::RuntimeException, std::exception )
|
2008-06-16 11:27:42 +00:00
|
|
|
{
|
2010-10-13 02:47:36 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2008-06-16 11:27:42 +00:00
|
|
|
if ( !mpObj )
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
|
|
|
|
Rectangle aLogicRect = impl_getScaledRect_nothrow();
|
|
|
|
MapUnit aContainerMapUnit( MAP_100TH_MM );
|
|
|
|
uno::Reference< embed::XVisualObject > xParentVis( mpObj->GetParentXModel(), uno::UNO_QUERY );
|
|
|
|
if ( xParentVis.is() )
|
|
|
|
aContainerMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xParentVis->getMapUnit( mpObj->GetAspect() ) );
|
|
|
|
|
|
|
|
aLogicRect = Application::GetDefaultDevice()->LogicToPixel(aLogicRect,aContainerMapUnit);
|
|
|
|
return AWTRectangle( aLogicRect );
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2008-06-16 11:27:42 +00:00
|
|
|
awt::Rectangle SAL_CALL SdrLightEmbeddedClient_Impl::getClipRectangle()
|
|
|
|
throw ( embed::WrongStateException,
|
2014-02-25 21:31:58 +01:00
|
|
|
uno::RuntimeException, std::exception )
|
2008-06-16 11:27:42 +00:00
|
|
|
{
|
|
|
|
return getPlacement();
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2008-06-16 11:27:42 +00:00
|
|
|
void SAL_CALL SdrLightEmbeddedClient_Impl::translateAccelerators( const uno::Sequence< awt::KeyEvent >& /*aKeys*/ )
|
|
|
|
throw ( embed::WrongStateException,
|
2014-02-25 21:31:58 +01:00
|
|
|
uno::RuntimeException, std::exception )
|
2008-06-16 11:27:42 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2008-06-16 11:27:42 +00:00
|
|
|
void SAL_CALL SdrLightEmbeddedClient_Impl::scrollObject( const awt::Size& /*aOffset*/ )
|
|
|
|
throw ( embed::WrongStateException,
|
2014-02-25 21:31:58 +01:00
|
|
|
uno::RuntimeException, std::exception )
|
2008-06-16 11:27:42 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2008-06-16 11:27:42 +00:00
|
|
|
void SAL_CALL SdrLightEmbeddedClient_Impl::changedPlacement( const awt::Rectangle& aPosRect )
|
|
|
|
throw ( embed::WrongStateException,
|
|
|
|
uno::Exception,
|
2014-02-25 21:31:58 +01:00
|
|
|
uno::RuntimeException, std::exception )
|
2008-06-16 11:27:42 +00:00
|
|
|
{
|
2010-10-13 02:47:36 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2008-06-16 11:27:42 +00:00
|
|
|
if ( !mpObj )
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
|
|
|
|
uno::Reference< embed::XInplaceObject > xInplace( mpObj->GetObjRef(), uno::UNO_QUERY );
|
|
|
|
if ( !xInplace.is() )
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
|
|
|
|
// check if the change is at least one pixel in size
|
|
|
|
awt::Rectangle aOldRect = getPlacement();
|
|
|
|
Rectangle aNewPixelRect = VCLRectangle( aPosRect );
|
|
|
|
Rectangle aOldPixelRect = VCLRectangle( aOldRect );
|
|
|
|
if ( aOldPixelRect == aNewPixelRect )
|
|
|
|
// nothing has changed
|
|
|
|
return;
|
|
|
|
|
|
|
|
// new scaled object area
|
|
|
|
MapUnit aContainerMapUnit( MAP_100TH_MM );
|
|
|
|
uno::Reference< embed::XVisualObject > xParentVis( mpObj->GetParentXModel(), uno::UNO_QUERY );
|
|
|
|
if ( xParentVis.is() )
|
|
|
|
aContainerMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xParentVis->getMapUnit( mpObj->GetAspect() ) );
|
|
|
|
|
|
|
|
Rectangle aNewLogicRect = Application::GetDefaultDevice()->PixelToLogic(aNewPixelRect,aContainerMapUnit);
|
|
|
|
Rectangle aLogicRect = impl_getScaledRect_nothrow();
|
|
|
|
|
|
|
|
if ( aNewLogicRect != aLogicRect )
|
|
|
|
{
|
|
|
|
// the calculation of the object area has not changed the object size
|
|
|
|
// it should be done here then
|
2014-03-10 11:09:59 +02:00
|
|
|
//SfxBooleanFlagGuard aGuard( m_bResizeNoScale, true );
|
2008-06-16 11:27:42 +00:00
|
|
|
|
|
|
|
// new size of the object area without scaling
|
2014-10-23 17:41:47 +02:00
|
|
|
Size aNewObjSize( Fraction( aNewLogicRect.GetWidth() ) / m_aScaleWidth,
|
|
|
|
Fraction( aNewLogicRect.GetHeight() ) / m_aScaleHeight );
|
2008-06-16 11:27:42 +00:00
|
|
|
|
|
|
|
// now remove scaling from new placement and keep this a the new object area
|
|
|
|
aNewLogicRect.SetSize( aNewObjSize );
|
|
|
|
// react to the change if the difference is bigger than one pixel
|
|
|
|
Size aPixelDiff =
|
|
|
|
Application::GetDefaultDevice()->LogicToPixel(
|
|
|
|
Size( aLogicRect.GetWidth() - aNewObjSize.Width(),
|
|
|
|
aLogicRect.GetHeight() - aNewObjSize.Height() ),
|
|
|
|
aContainerMapUnit );
|
|
|
|
if( aPixelDiff.Width() || aPixelDiff.Height() )
|
|
|
|
{
|
|
|
|
mpObj->SetLogicRect( Rectangle( aLogicRect.TopLeft(), aNewObjSize ) );
|
|
|
|
mpObj->BroadcastObjectChange();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
mpObj->ActionChanged();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// XWindowSupplier
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2008-06-16 11:27:42 +00:00
|
|
|
uno::Reference< awt::XWindow > SAL_CALL SdrLightEmbeddedClient_Impl::getWindow()
|
2014-02-25 21:31:58 +01:00
|
|
|
throw ( uno::RuntimeException, std::exception )
|
2008-06-16 11:27:42 +00:00
|
|
|
{
|
2010-10-13 02:47:36 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2008-06-16 11:27:42 +00:00
|
|
|
uno::Reference< awt::XWindow > xCurrent = m_xWindow;
|
|
|
|
if ( !xCurrent.is() )
|
|
|
|
{
|
|
|
|
if ( !mpObj )
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
uno::Reference< frame::XFrame> xFrame(lcl_getFrame_throw(mpObj),uno::UNO_QUERY_THROW);
|
|
|
|
xCurrent = xFrame->getComponentWindow();
|
|
|
|
} // if ( !xCurrent.is() )
|
|
|
|
return xCurrent;
|
|
|
|
}
|
|
|
|
void SdrLightEmbeddedClient_Impl::setWindow(const uno::Reference< awt::XWindow >& _xWindow)
|
|
|
|
{
|
|
|
|
m_xWindow = _xWindow;
|
|
|
|
}
|
2006-10-13 10:23:44 +00:00
|
|
|
|
2014-02-25 20:51:35 +01:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2005-01-18 14:01:22 +00:00
|
|
|
class SdrEmbedObjectLink : public sfx2::SvBaseLink
|
|
|
|
{
|
|
|
|
SdrOle2Obj* pObj;
|
|
|
|
|
|
|
|
public:
|
2015-05-27 10:53:55 +01:00
|
|
|
explicit SdrEmbedObjectLink(SdrOle2Obj* pObj);
|
2005-01-18 14:01:22 +00:00
|
|
|
virtual ~SdrEmbedObjectLink();
|
|
|
|
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual void Closed() SAL_OVERRIDE;
|
2011-05-25 14:48:41 -04:00
|
|
|
virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
|
2014-03-27 18:12:18 +01:00
|
|
|
const OUString& rMimeType, const ::com::sun::star::uno::Any & rValue ) SAL_OVERRIDE;
|
2005-01-18 14:01:22 +00:00
|
|
|
|
2013-04-07 23:05:56 +09:00
|
|
|
bool Connect() { return GetRealObject() != NULL; }
|
2005-01-18 14:01:22 +00:00
|
|
|
};
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2005-01-18 14:01:22 +00:00
|
|
|
|
|
|
|
SdrEmbedObjectLink::SdrEmbedObjectLink(SdrOle2Obj* pObject):
|
2015-03-23 14:23:01 +02:00
|
|
|
::sfx2::SvBaseLink( ::SfxLinkUpdateMode::ONCALL, SotClipboardFormatId::SVXB ),
|
2005-01-18 14:01:22 +00:00
|
|
|
pObj(pObject)
|
|
|
|
{
|
2014-03-10 11:09:59 +02:00
|
|
|
SetSynchron( false );
|
2005-01-18 14:01:22 +00:00
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2005-01-18 14:01:22 +00:00
|
|
|
|
|
|
|
SdrEmbedObjectLink::~SdrEmbedObjectLink()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2005-01-18 14:01:22 +00:00
|
|
|
|
2011-05-25 14:48:41 -04:00
|
|
|
::sfx2::SvBaseLink::UpdateResult SdrEmbedObjectLink::DataChanged(
|
2013-08-23 17:23:52 +02:00
|
|
|
const OUString& /*rMimeType*/, const ::com::sun::star::uno::Any & /*rValue*/ )
|
2005-01-18 14:01:22 +00:00
|
|
|
{
|
|
|
|
if ( !pObj->UpdateLinkURL_Impl() )
|
|
|
|
{
|
|
|
|
// the link URL was not changed
|
|
|
|
uno::Reference< embed::XEmbeddedObject > xObject = pObj->GetObjRef();
|
|
|
|
OSL_ENSURE( xObject.is(), "The object must exist always!\n" );
|
|
|
|
if ( xObject.is() )
|
|
|
|
{
|
|
|
|
// let the object reload the link
|
|
|
|
// TODO/LATER: reload call could be used for this case
|
|
|
|
|
|
|
|
try
|
|
|
|
{
|
|
|
|
sal_Int32 nState = xObject->getCurrentState();
|
2009-04-23 13:48:24 +00:00
|
|
|
if ( nState != embed::EmbedStates::LOADED )
|
2005-01-18 14:01:22 +00:00
|
|
|
{
|
|
|
|
// in some cases the linked file probably is not locked so it could be changed
|
|
|
|
xObject->changeState( embed::EmbedStates::LOADED );
|
|
|
|
xObject->changeState( nState );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch ( uno::Exception& )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
pObj->GetNewReplacement();
|
|
|
|
pObj->SetChanged();
|
2011-05-25 14:48:41 -04:00
|
|
|
|
|
|
|
return SUCCESS;
|
2005-01-18 14:01:22 +00:00
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2005-01-18 14:01:22 +00:00
|
|
|
|
|
|
|
void SdrEmbedObjectLink::Closed()
|
|
|
|
{
|
|
|
|
pObj->BreakFileLink_Impl();
|
|
|
|
SvBaseLink::Closed();
|
|
|
|
}
|
|
|
|
|
2014-02-25 20:51:35 +01:00
|
|
|
|
2005-01-18 14:01:22 +00:00
|
|
|
|
2001-06-14 15:30:17 +00:00
|
|
|
class SdrOle2ObjImpl
|
|
|
|
{
|
|
|
|
public:
|
2014-07-10 13:08:07 -04:00
|
|
|
svt::EmbeddedObjectRef mxObjRef;
|
|
|
|
|
2014-07-10 13:48:36 -04:00
|
|
|
Graphic* mpGraphic;
|
2004-10-04 16:54:47 +00:00
|
|
|
// TODO/LATER: do we really need this pointer?
|
2014-07-10 13:49:37 -04:00
|
|
|
GraphicObject* mpGraphicObject;
|
2014-07-10 13:53:37 -04:00
|
|
|
OUString maProgName;
|
2013-09-02 11:40:43 +02:00
|
|
|
OUString aPersistName; // name of object in persist
|
2006-10-13 10:23:44 +00:00
|
|
|
SdrLightEmbeddedClient_Impl* pLightClient; // must be registered as client only using AddOwnLightClient() call
|
2003-03-27 14:06:05 +00:00
|
|
|
|
2014-07-10 14:11:02 -04:00
|
|
|
bool mbFrame:1; // Due to compatibility at SdrTextObj for now
|
|
|
|
bool mbInDestruction:1;
|
|
|
|
bool mbSuppressSetVisAreaSize:1; // #i118524#
|
|
|
|
mutable bool mbTypeAsked:1;
|
|
|
|
mutable bool mbIsChart:1;
|
|
|
|
bool mbLoadingOLEObjectFailed:1; // New local var to avoid repeated loading if load of OLE2 fails
|
|
|
|
bool mbConnected:1;
|
2005-01-18 14:01:22 +00:00
|
|
|
|
|
|
|
SdrEmbedObjectLink* mpObjectLink;
|
2013-09-04 13:43:19 +02:00
|
|
|
OUString maLinkURL;
|
2005-01-18 14:01:22 +00:00
|
|
|
|
2014-07-10 14:11:02 -04:00
|
|
|
SvxUnoShapeModifyListener* mpModifyListener;
|
|
|
|
|
2015-05-27 10:53:55 +01:00
|
|
|
explicit SdrOle2ObjImpl( bool bFrame ) :
|
2014-07-10 13:48:36 -04:00
|
|
|
mpGraphic(NULL),
|
2014-07-10 13:49:37 -04:00
|
|
|
mpGraphicObject(NULL),
|
2014-07-10 13:08:07 -04:00
|
|
|
pLightClient (NULL),
|
2014-07-10 14:11:02 -04:00
|
|
|
mbFrame(bFrame),
|
|
|
|
mbInDestruction(false),
|
|
|
|
mbSuppressSetVisAreaSize(false),
|
|
|
|
mbTypeAsked(false),
|
|
|
|
mbIsChart(false),
|
2014-07-10 13:08:07 -04:00
|
|
|
mbLoadingOLEObjectFailed(false),
|
|
|
|
mbConnected(false),
|
2014-07-10 14:11:02 -04:00
|
|
|
mpObjectLink(NULL),
|
|
|
|
mpModifyListener(NULL)
|
2014-07-10 13:08:07 -04:00
|
|
|
{
|
|
|
|
mxObjRef.Lock(true);
|
|
|
|
}
|
|
|
|
|
2014-07-10 14:11:02 -04:00
|
|
|
SdrOle2ObjImpl( bool bFrame, const svt::EmbeddedObjectRef& rObjRef ) :
|
2014-07-10 13:08:07 -04:00
|
|
|
mxObjRef(rObjRef),
|
2014-07-10 13:48:36 -04:00
|
|
|
mpGraphic(NULL),
|
2014-07-10 13:49:37 -04:00
|
|
|
mpGraphicObject(NULL),
|
2014-07-10 13:08:07 -04:00
|
|
|
pLightClient (NULL),
|
2014-07-10 14:11:02 -04:00
|
|
|
mbFrame(bFrame),
|
|
|
|
mbInDestruction(false),
|
|
|
|
mbSuppressSetVisAreaSize(false),
|
|
|
|
mbTypeAsked(false),
|
|
|
|
mbIsChart(false),
|
2014-07-10 13:08:07 -04:00
|
|
|
mbLoadingOLEObjectFailed(false),
|
|
|
|
mbConnected(false),
|
2014-07-10 14:11:02 -04:00
|
|
|
mpObjectLink(NULL),
|
|
|
|
mpModifyListener(NULL)
|
2005-01-18 14:01:22 +00:00
|
|
|
{
|
2014-07-10 13:08:07 -04:00
|
|
|
mxObjRef.Lock(true);
|
2005-01-18 14:01:22 +00:00
|
|
|
}
|
2014-07-10 13:48:36 -04:00
|
|
|
|
|
|
|
~SdrOle2ObjImpl()
|
|
|
|
{
|
|
|
|
delete mpGraphic;
|
2014-07-10 13:49:37 -04:00
|
|
|
delete mpGraphicObject;
|
2014-07-10 14:11:02 -04:00
|
|
|
|
|
|
|
if (mpModifyListener)
|
|
|
|
{
|
|
|
|
mpModifyListener->invalidate();
|
|
|
|
mpModifyListener->release();
|
|
|
|
}
|
2014-07-10 13:48:36 -04:00
|
|
|
}
|
2001-06-14 15:30:17 +00:00
|
|
|
};
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-02-25 20:51:35 +01:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2003-04-24 13:49:28 +00:00
|
|
|
// Predicate determining whether the given OLE is an internal math
|
|
|
|
// object
|
2004-10-04 16:54:47 +00:00
|
|
|
static bool ImplIsMathObj( const uno::Reference < embed::XEmbeddedObject >& rObjRef )
|
2003-04-24 13:49:28 +00:00
|
|
|
{
|
2004-10-04 16:54:47 +00:00
|
|
|
if ( !rObjRef.is() )
|
2003-04-24 13:49:28 +00:00
|
|
|
return false;
|
|
|
|
|
2004-10-04 16:54:47 +00:00
|
|
|
SvGlobalName aClassName( rObjRef->getClassID() );
|
2003-04-24 13:49:28 +00:00
|
|
|
if( aClassName == SvGlobalName(SO3_SM_CLASSID_30) ||
|
|
|
|
aClassName == SvGlobalName(SO3_SM_CLASSID_40) ||
|
|
|
|
aClassName == SvGlobalName(SO3_SM_CLASSID_50) ||
|
|
|
|
aClassName == SvGlobalName(SO3_SM_CLASSID_60) ||
|
|
|
|
aClassName == SvGlobalName(SO3_SM_CLASSID) )
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-02-25 20:51:35 +01:00
|
|
|
|
2010-01-28 17:21:44 +01:00
|
|
|
// BaseProperties section
|
|
|
|
|
|
|
|
sdr::properties::BaseProperties* SdrOle2Obj::CreateObjectSpecificProperties()
|
|
|
|
{
|
|
|
|
return new sdr::properties::OleProperties(*this);
|
|
|
|
}
|
|
|
|
|
2014-02-25 20:51:35 +01:00
|
|
|
|
2008-08-19 22:24:05 +00:00
|
|
|
// DrawContact section
|
|
|
|
|
|
|
|
sdr::contact::ViewContact* SdrOle2Obj::CreateObjectSpecificViewContact()
|
|
|
|
{
|
|
|
|
return new sdr::contact::ViewContactOfSdrOle2Obj(*this);
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2003-04-24 13:49:28 +00:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
TYPEINIT1(SdrOle2Obj,SdrRectObj);
|
|
|
|
|
2014-07-10 12:51:04 -04:00
|
|
|
SdrOle2Obj::SdrOle2Obj( bool bFrame_ ) :
|
2014-07-10 14:11:02 -04:00
|
|
|
mpImpl(new SdrOle2ObjImpl(bFrame_))
|
2014-07-10 12:51:04 -04:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
SdrOle2Obj::SdrOle2Obj( const svt::EmbeddedObjectRef& rNewObjRef, const OUString& rNewObjName, const Rectangle& rNewRect, bool bFrame_ ) :
|
|
|
|
SdrRectObj(rNewRect),
|
2014-07-10 14:11:02 -04:00
|
|
|
mpImpl(new SdrOle2ObjImpl(bFrame_, rNewObjRef))
|
2014-07-10 12:51:04 -04:00
|
|
|
{
|
2001-09-10 10:38:27 +00:00
|
|
|
mpImpl->aPersistName = rNewObjName;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-07-10 13:08:07 -04:00
|
|
|
if (mpImpl->mxObjRef.is() && (mpImpl->mxObjRef->getStatus( GetAspect() ) & embed::EmbedMisc::EMBED_NEVERRESIZE ) )
|
2014-01-28 19:57:37 +01:00
|
|
|
SetResizeProtect(true);
|
2003-04-24 13:49:28 +00:00
|
|
|
|
2011-05-12 11:03:28 +02:00
|
|
|
// For math objects, set closed state to transparent
|
2014-07-10 13:08:07 -04:00
|
|
|
SetClosedObj(!ImplIsMathObj( mpImpl->mxObjRef.GetObject() ));
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2013-11-27 13:03:45 +00:00
|
|
|
OUString SdrOle2Obj::GetStyleString()
|
|
|
|
{
|
|
|
|
OUString strStyle;
|
2014-07-10 13:08:07 -04:00
|
|
|
if (mpImpl->mxObjRef.is() && mpImpl->mxObjRef.IsChart())
|
2013-11-27 13:03:45 +00:00
|
|
|
{
|
2014-07-10 13:08:07 -04:00
|
|
|
strStyle = mpImpl->mxObjRef.GetChartType();
|
2013-11-27 13:03:45 +00:00
|
|
|
}
|
|
|
|
return strStyle;
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2013-11-27 13:03:45 +00:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
SdrOle2Obj::~SdrOle2Obj()
|
|
|
|
{
|
2014-07-10 14:11:02 -04:00
|
|
|
mpImpl->mbInDestruction = true;
|
2003-04-24 15:45:53 +00:00
|
|
|
|
2004-10-04 16:54:47 +00:00
|
|
|
if ( mpImpl->mbConnected )
|
|
|
|
Disconnect();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2005-01-18 14:01:22 +00:00
|
|
|
DisconnectFileLink_Impl();
|
|
|
|
|
2006-10-13 10:23:44 +00:00
|
|
|
if ( mpImpl->pLightClient )
|
|
|
|
{
|
|
|
|
mpImpl->pLightClient->Release();
|
|
|
|
mpImpl->pLightClient = NULL;
|
|
|
|
}
|
2004-11-26 15:33:16 +00:00
|
|
|
|
2001-06-14 15:30:17 +00:00
|
|
|
delete mpImpl;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2006-10-13 10:23:44 +00:00
|
|
|
void SdrOle2Obj::SetAspect( sal_Int64 nAspect )
|
|
|
|
{
|
2014-07-10 13:08:07 -04:00
|
|
|
mpImpl->mxObjRef.SetViewAspect( nAspect );
|
|
|
|
}
|
|
|
|
|
|
|
|
const svt::EmbeddedObjectRef& SdrOle2Obj::getEmbeddedObjectRef() const
|
|
|
|
{
|
|
|
|
return mpImpl->mxObjRef;
|
2006-10-13 10:23:44 +00:00
|
|
|
}
|
|
|
|
|
2014-07-10 13:08:07 -04:00
|
|
|
sal_Int64 SdrOle2Obj::GetAspect() const
|
|
|
|
{
|
|
|
|
return mpImpl->mxObjRef.GetViewAspect();
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2012-11-21 22:06:52 +00:00
|
|
|
bool SdrOle2Obj::isInplaceActive() const
|
|
|
|
{
|
2014-07-10 13:08:07 -04:00
|
|
|
return mpImpl->mxObjRef.is() && embed::EmbedStates::INPLACE_ACTIVE == mpImpl->mxObjRef->getCurrentState();
|
2012-11-21 22:06:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool SdrOle2Obj::isUiActive() const
|
|
|
|
{
|
2014-07-10 13:08:07 -04:00
|
|
|
return mpImpl->mxObjRef.is() && embed::EmbedStates::UI_ACTIVE == mpImpl->mxObjRef->getCurrentState();
|
2012-11-21 22:06:52 +00:00
|
|
|
}
|
|
|
|
|
2004-10-04 16:54:47 +00:00
|
|
|
void SdrOle2Obj::SetGraphic_Impl(const Graphic* pGrf)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-07-10 13:48:36 -04:00
|
|
|
if (mpImpl->mpGraphic)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-07-10 13:48:36 -04:00
|
|
|
delete mpImpl->mpGraphic;
|
|
|
|
mpImpl->mpGraphic = NULL;
|
2014-07-10 13:49:37 -04:00
|
|
|
delete mpImpl->mpGraphicObject;
|
|
|
|
mpImpl->mpGraphicObject = NULL;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2014-07-10 13:48:36 -04:00
|
|
|
if (pGrf)
|
2001-06-14 15:30:17 +00:00
|
|
|
{
|
2014-07-10 13:48:36 -04:00
|
|
|
mpImpl->mpGraphic = new Graphic(*pGrf);
|
2014-07-10 13:49:37 -04:00
|
|
|
mpImpl->mpGraphicObject = new GraphicObject(*mpImpl->mpGraphic);
|
2001-06-14 15:30:17 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
SetChanged();
|
2003-11-24 15:57:52 +00:00
|
|
|
BroadcastObjectChange();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2004-10-04 16:54:47 +00:00
|
|
|
void SdrOle2Obj::SetGraphic(const Graphic* pGrf)
|
|
|
|
{
|
|
|
|
// only for setting a preview graphic
|
|
|
|
SetGraphic_Impl( pGrf );
|
|
|
|
}
|
|
|
|
|
2014-07-10 13:53:37 -04:00
|
|
|
void SdrOle2Obj::SetProgName( const OUString& rName )
|
|
|
|
{
|
|
|
|
mpImpl->maProgName = rName;
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2014-07-10 13:53:37 -04:00
|
|
|
const OUString& SdrOle2Obj::GetProgName() const
|
|
|
|
{
|
|
|
|
return mpImpl->maProgName;
|
|
|
|
}
|
2001-09-10 11:59:59 +00:00
|
|
|
|
2010-10-05 07:57:54 -05:00
|
|
|
bool SdrOle2Obj::IsEmpty() const
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-07-10 13:08:07 -04:00
|
|
|
return !mpImpl->mxObjRef.is();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-09-10 11:59:59 +00:00
|
|
|
|
2001-04-12 09:06:03 +00:00
|
|
|
void SdrOle2Obj::Connect()
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2005-02-16 16:05:07 +00:00
|
|
|
if( IsEmptyPresObj() )
|
|
|
|
return;
|
|
|
|
|
2004-10-04 16:54:47 +00:00
|
|
|
if( mpImpl->mbConnected )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2011-05-12 11:03:28 +02:00
|
|
|
// currently there are situations where it seems to be unavoidable to have multiple connects
|
2005-04-18 13:40:00 +00:00
|
|
|
// changing this would need a larger code rewrite, so for now I remove the assertion
|
2011-03-01 19:07:44 +01:00
|
|
|
// OSL_FAIL("Connect() called on connected object!");
|
2004-10-04 16:54:47 +00:00
|
|
|
return;
|
|
|
|
}
|
2001-04-12 09:06:03 +00:00
|
|
|
|
2004-10-04 16:54:47 +00:00
|
|
|
Connect_Impl();
|
|
|
|
AddListeners_Impl();
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2005-01-18 14:01:22 +00:00
|
|
|
|
2014-03-10 11:09:59 +02:00
|
|
|
bool SdrOle2Obj::UpdateLinkURL_Impl()
|
2005-01-18 14:01:22 +00:00
|
|
|
{
|
2014-03-10 11:09:59 +02:00
|
|
|
bool bResult = false;
|
2005-01-18 14:01:22 +00:00
|
|
|
|
|
|
|
if ( mpImpl->mpObjectLink )
|
|
|
|
{
|
2010-01-13 22:25:07 +01:00
|
|
|
sfx2::LinkManager* pLinkManager = pModel ? pModel->GetLinkManager() : NULL;
|
2005-01-18 14:01:22 +00:00
|
|
|
if ( pLinkManager )
|
|
|
|
{
|
2013-08-26 15:22:55 +02:00
|
|
|
OUString aNewLinkURL;
|
2015-04-13 13:50:56 +02:00
|
|
|
sfx2::LinkManager::GetDisplayNames( mpImpl->mpObjectLink, 0, &aNewLinkURL, 0, 0 );
|
2013-08-26 15:22:55 +02:00
|
|
|
if ( !aNewLinkURL.equalsIgnoreAsciiCase( mpImpl->maLinkURL ) )
|
2005-01-18 14:01:22 +00:00
|
|
|
{
|
2015-05-29 12:04:55 +02:00
|
|
|
GetObjRef_Impl();
|
2014-07-10 13:08:07 -04:00
|
|
|
uno::Reference<embed::XCommonEmbedPersist> xPersObj( mpImpl->mxObjRef.GetObject(), uno::UNO_QUERY );
|
2005-01-18 14:01:22 +00:00
|
|
|
OSL_ENSURE( xPersObj.is(), "The object must exist!\n" );
|
|
|
|
if ( xPersObj.is() )
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
2014-07-10 13:08:07 -04:00
|
|
|
sal_Int32 nCurState = mpImpl->mxObjRef->getCurrentState();
|
2005-01-18 14:01:22 +00:00
|
|
|
if ( nCurState != embed::EmbedStates::LOADED )
|
2014-07-10 13:08:07 -04:00
|
|
|
mpImpl->mxObjRef->changeState(embed::EmbedStates::LOADED);
|
2005-01-18 14:01:22 +00:00
|
|
|
|
|
|
|
// TODO/LATER: there should be possible to get current mediadescriptor settings from the object
|
|
|
|
uno::Sequence< beans::PropertyValue > aArgs( 1 );
|
2013-11-15 11:05:19 +02:00
|
|
|
aArgs[0].Name = "URL";
|
2013-04-07 12:06:47 +02:00
|
|
|
aArgs[0].Value <<= OUString( aNewLinkURL );
|
2005-01-18 14:01:22 +00:00
|
|
|
xPersObj->reload( aArgs, uno::Sequence< beans::PropertyValue >() );
|
|
|
|
|
|
|
|
mpImpl->maLinkURL = aNewLinkURL;
|
2014-03-10 11:09:59 +02:00
|
|
|
bResult = true;
|
2005-01-18 14:01:22 +00:00
|
|
|
|
|
|
|
if ( nCurState != embed::EmbedStates::LOADED )
|
2014-07-10 13:08:07 -04:00
|
|
|
mpImpl->mxObjRef->changeState(nCurState);
|
2005-01-18 14:01:22 +00:00
|
|
|
}
|
2012-01-06 00:03:58 +09:00
|
|
|
catch( ::com::sun::star::uno::Exception& )
|
2005-02-24 14:11:49 +00:00
|
|
|
{
|
2011-03-03 15:27:26 +01:00
|
|
|
OSL_FAIL(
|
2012-12-02 22:35:57 +01:00
|
|
|
OString(OString("SdrOle2Obj::UpdateLinkURL_Impl(), "
|
2005-02-24 14:11:49 +00:00
|
|
|
"exception caught: ") +
|
2013-04-07 12:06:47 +02:00
|
|
|
OUStringToOString(
|
2005-02-24 14:11:49 +00:00
|
|
|
comphelper::anyToString( cppu::getCaughtException() ),
|
|
|
|
RTL_TEXTENCODING_UTF8 )).getStr() );
|
|
|
|
}
|
2005-01-18 14:01:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if ( !bResult )
|
|
|
|
{
|
|
|
|
// TODO/LATER: return the old name to the link manager, is it possible?
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return bResult;
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2005-01-18 14:01:22 +00:00
|
|
|
|
|
|
|
void SdrOle2Obj::BreakFileLink_Impl()
|
|
|
|
{
|
2008-03-11 06:34:36 +00:00
|
|
|
uno::Reference<document::XStorageBasedDocument> xDoc;
|
|
|
|
if ( pModel )
|
|
|
|
xDoc.set( pModel->getUnoModel(),uno::UNO_QUERY);
|
2005-01-18 14:01:22 +00:00
|
|
|
|
2008-03-05 16:01:19 +00:00
|
|
|
if ( xDoc.is() )
|
2005-01-18 14:01:22 +00:00
|
|
|
{
|
2008-03-05 16:01:19 +00:00
|
|
|
uno::Reference< embed::XStorage > xStorage = xDoc->getDocumentStorage();
|
2005-01-18 14:01:22 +00:00
|
|
|
if ( xStorage.is() )
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
2014-07-10 13:08:07 -04:00
|
|
|
uno::Reference< embed::XLinkageSupport > xLinkSupport( mpImpl->mxObjRef.GetObject(), uno::UNO_QUERY_THROW );
|
2005-01-18 14:01:22 +00:00
|
|
|
xLinkSupport->breakLink( xStorage, mpImpl->aPersistName );
|
|
|
|
DisconnectFileLink_Impl();
|
2014-12-18 13:34:45 +01:00
|
|
|
mpImpl->maLinkURL.clear();
|
2005-01-18 14:01:22 +00:00
|
|
|
}
|
2012-01-06 00:03:58 +09:00
|
|
|
catch( ::com::sun::star::uno::Exception& )
|
2005-01-18 14:01:22 +00:00
|
|
|
{
|
2011-03-03 15:27:26 +01:00
|
|
|
OSL_FAIL(
|
2012-12-02 22:35:57 +01:00
|
|
|
OString(OString("SdrOle2Obj::BreakFileLink_Impl(), "
|
2005-02-24 14:11:49 +00:00
|
|
|
"exception caught: ") +
|
2013-04-07 12:06:47 +02:00
|
|
|
OUStringToOString(
|
2005-02-24 14:11:49 +00:00
|
|
|
comphelper::anyToString( cppu::getCaughtException() ),
|
|
|
|
RTL_TEXTENCODING_UTF8 )).getStr() );
|
2005-01-18 14:01:22 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2005-01-18 14:01:22 +00:00
|
|
|
|
|
|
|
void SdrOle2Obj::DisconnectFileLink_Impl()
|
|
|
|
{
|
2010-01-13 22:25:07 +01:00
|
|
|
sfx2::LinkManager* pLinkManager = pModel ? pModel->GetLinkManager() : NULL;
|
2005-01-18 14:01:22 +00:00
|
|
|
if ( pLinkManager && mpImpl->mpObjectLink )
|
|
|
|
{
|
|
|
|
pLinkManager->Remove( mpImpl->mpObjectLink );
|
|
|
|
mpImpl->mpObjectLink = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2005-01-18 14:01:22 +00:00
|
|
|
|
|
|
|
void SdrOle2Obj::CheckFileLink_Impl()
|
|
|
|
{
|
2014-07-10 13:08:07 -04:00
|
|
|
if (pModel && mpImpl->mxObjRef.GetObject().is() && !mpImpl->mpObjectLink)
|
2005-01-18 14:01:22 +00:00
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
2014-07-10 13:08:07 -04:00
|
|
|
uno::Reference< embed::XLinkageSupport > xLinkSupport( mpImpl->mxObjRef.GetObject(), uno::UNO_QUERY );
|
2005-07-12 11:14:10 +00:00
|
|
|
if ( xLinkSupport.is() && xLinkSupport->isLink() )
|
2005-01-18 14:01:22 +00:00
|
|
|
{
|
2013-09-04 13:43:19 +02:00
|
|
|
OUString aLinkURL = xLinkSupport->getLinkURL();
|
|
|
|
if ( !aLinkURL.isEmpty() )
|
2005-01-18 14:01:22 +00:00
|
|
|
{
|
|
|
|
// this is a file link so the model link manager should handle it
|
2010-01-13 22:25:07 +01:00
|
|
|
sfx2::LinkManager* pLinkManager = pModel->GetLinkManager();
|
2005-01-18 14:01:22 +00:00
|
|
|
if ( pLinkManager )
|
|
|
|
{
|
|
|
|
mpImpl->mpObjectLink = new SdrEmbedObjectLink( this );
|
|
|
|
mpImpl->maLinkURL = aLinkURL;
|
|
|
|
pLinkManager->InsertFileLink( *mpImpl->mpObjectLink, OBJECT_CLIENT_OLE, aLinkURL, NULL, NULL );
|
|
|
|
mpImpl->mpObjectLink->Connect();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2012-01-06 00:03:58 +09:00
|
|
|
catch( ::com::sun::star::uno::Exception& )
|
2005-01-18 14:01:22 +00:00
|
|
|
{
|
2011-03-03 15:27:26 +01:00
|
|
|
OSL_FAIL(
|
2012-12-02 22:35:57 +01:00
|
|
|
OString(OString("SdrOle2Obj::CheckFileLink_Impl(), "
|
2005-02-24 14:11:49 +00:00
|
|
|
"exception caught: ") +
|
2013-04-07 12:06:47 +02:00
|
|
|
OUStringToOString(
|
2005-02-24 14:11:49 +00:00
|
|
|
comphelper::anyToString( cppu::getCaughtException() ),
|
|
|
|
RTL_TEXTENCODING_UTF8 )).getStr() );
|
2005-01-18 14:01:22 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2005-01-18 14:01:22 +00:00
|
|
|
|
2004-11-26 15:33:16 +00:00
|
|
|
void SdrOle2Obj::Reconnect_Impl()
|
|
|
|
{
|
|
|
|
DBG_ASSERT( mpImpl->mbConnected, "Assigned unconnected object?!" );
|
|
|
|
Connect_Impl();
|
|
|
|
}
|
|
|
|
|
2004-10-04 16:54:47 +00:00
|
|
|
void SdrOle2Obj::Connect_Impl()
|
|
|
|
{
|
2013-09-02 11:40:43 +02:00
|
|
|
if( pModel && !mpImpl->aPersistName.isEmpty() )
|
2004-10-04 16:54:47 +00:00
|
|
|
{
|
2005-02-24 14:11:49 +00:00
|
|
|
try
|
2004-10-04 16:54:47 +00:00
|
|
|
{
|
2008-03-05 16:01:19 +00:00
|
|
|
::comphelper::IEmbeddedHelper* pPers = pModel->GetPersist();
|
2005-02-24 14:11:49 +00:00
|
|
|
if ( pPers )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2008-03-05 16:01:19 +00:00
|
|
|
comphelper::EmbeddedObjectContainer& rContainer = pPers->getEmbeddedObjectContainer();
|
2007-12-12 12:19:36 +00:00
|
|
|
if ( !rContainer.HasEmbeddedObject( mpImpl->aPersistName )
|
2014-07-10 13:08:07 -04:00
|
|
|
|| ( mpImpl->mxObjRef.is() && !rContainer.HasEmbeddedObject( mpImpl->mxObjRef.GetObject() ) ) )
|
2004-10-04 16:54:47 +00:00
|
|
|
{
|
2005-02-24 14:11:49 +00:00
|
|
|
// object not known to container document
|
|
|
|
// No object -> disaster!
|
2014-07-10 13:08:07 -04:00
|
|
|
DBG_ASSERT( mpImpl->mxObjRef.is(), "No object in connect!");
|
|
|
|
if ( mpImpl->mxObjRef.is() )
|
2005-02-24 14:11:49 +00:00
|
|
|
{
|
|
|
|
// object came from the outside, now add it to the container
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString aTmp;
|
2014-07-10 13:08:07 -04:00
|
|
|
rContainer.InsertEmbeddedObject( mpImpl->mxObjRef.GetObject(), aTmp );
|
2005-02-24 14:11:49 +00:00
|
|
|
mpImpl->aPersistName = aTmp;
|
|
|
|
}
|
2004-10-04 16:54:47 +00:00
|
|
|
}
|
2014-07-10 13:08:07 -04:00
|
|
|
else if ( !mpImpl->mxObjRef.is() )
|
2008-06-16 11:27:42 +00:00
|
|
|
{
|
2014-07-10 13:08:07 -04:00
|
|
|
mpImpl->mxObjRef.Assign( rContainer.GetEmbeddedObject( mpImpl->aPersistName ), mpImpl->mxObjRef.GetViewAspect() );
|
2014-07-10 14:11:02 -04:00
|
|
|
mpImpl->mbTypeAsked = false;
|
2008-06-16 11:27:42 +00:00
|
|
|
}
|
2004-10-04 16:54:47 +00:00
|
|
|
|
2014-07-10 13:08:07 -04:00
|
|
|
if ( mpImpl->mxObjRef.GetObject().is() )
|
2005-02-24 14:11:49 +00:00
|
|
|
{
|
2014-07-10 13:08:07 -04:00
|
|
|
mpImpl->mxObjRef.AssignToContainer( &rContainer, mpImpl->aPersistName );
|
2005-02-24 14:11:49 +00:00
|
|
|
mpImpl->mbConnected = true;
|
2014-07-10 13:08:07 -04:00
|
|
|
mpImpl->mxObjRef.Lock( true );
|
2005-02-24 14:11:49 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2014-07-10 13:08:07 -04:00
|
|
|
if ( mpImpl->mxObjRef.is() )
|
2004-11-26 15:33:16 +00:00
|
|
|
{
|
2006-10-13 10:23:44 +00:00
|
|
|
if ( !mpImpl->pLightClient )
|
2005-02-24 14:11:49 +00:00
|
|
|
{
|
2006-10-13 10:23:44 +00:00
|
|
|
mpImpl->pLightClient = new SdrLightEmbeddedClient_Impl( this );
|
|
|
|
mpImpl->pLightClient->acquire();
|
2005-02-24 14:11:49 +00:00
|
|
|
}
|
2004-11-26 15:33:16 +00:00
|
|
|
|
2014-07-10 13:08:07 -04:00
|
|
|
mpImpl->mxObjRef->addStateChangeListener( mpImpl->pLightClient );
|
|
|
|
mpImpl->mxObjRef->addEventListener( uno::Reference< document::XEventListener >( mpImpl->pLightClient ) );
|
2006-10-13 10:23:44 +00:00
|
|
|
|
2014-07-10 13:08:07 -04:00
|
|
|
if ( mpImpl->mxObjRef->getCurrentState() != embed::EmbedStates::LOADED )
|
2005-02-24 14:11:49 +00:00
|
|
|
GetSdrGlobalData().GetOLEObjCache().InsertObj(this);
|
2005-01-18 14:01:22 +00:00
|
|
|
|
2005-02-24 14:11:49 +00:00
|
|
|
CheckFileLink_Impl();
|
2005-11-10 15:42:56 +00:00
|
|
|
|
2014-07-10 13:08:07 -04:00
|
|
|
uno::Reference< container::XChild > xChild( mpImpl->mxObjRef.GetObject(), uno::UNO_QUERY );
|
2005-11-10 15:42:56 +00:00
|
|
|
if( xChild.is() )
|
2007-05-22 14:20:35 +00:00
|
|
|
{
|
|
|
|
uno::Reference< uno::XInterface > xParent( pModel->getUnoModel());
|
|
|
|
if( xParent.is())
|
|
|
|
xChild->setParent( pModel->getUnoModel() );
|
|
|
|
}
|
|
|
|
|
2005-02-24 14:11:49 +00:00
|
|
|
}
|
|
|
|
}
|
2012-01-06 00:03:58 +09:00
|
|
|
catch( ::com::sun::star::uno::Exception& )
|
2005-02-24 14:11:49 +00:00
|
|
|
{
|
2011-03-03 15:27:26 +01:00
|
|
|
OSL_FAIL(
|
2012-12-02 22:35:57 +01:00
|
|
|
OString(OString("SdrOle2Obj::Connect_Impl(), "
|
2005-02-24 14:11:49 +00:00
|
|
|
"exception caught: ") +
|
2013-04-07 12:06:47 +02:00
|
|
|
OUStringToOString(
|
2005-02-24 14:11:49 +00:00
|
|
|
comphelper::anyToString( cppu::getCaughtException() ),
|
|
|
|
RTL_TEXTENCODING_UTF8 )).getStr() );
|
2004-11-26 15:33:16 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2004-10-04 16:54:47 +00:00
|
|
|
//TODO/LATER: wait for definition of MiscStatus RESIZEONPRINTERCHANGE
|
|
|
|
//if ( xObjRef.is() && (*ppObjRef)->GetMiscStatus() & SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-10-04 16:54:47 +00:00
|
|
|
//TODO/LATER: needs a new handling for OnPrinterChanged
|
|
|
|
/*
|
2000-09-18 16:07:07 +00:00
|
|
|
if (pModel && pModel->GetRefDevice() &&
|
|
|
|
pModel->GetRefDevice()->GetOutDevType() == OUTDEV_PRINTER)
|
|
|
|
{
|
|
|
|
// Kein RefDevice oder RefDevice kein Printer
|
2014-03-10 11:09:59 +02:00
|
|
|
bool bModified = (*ppObjRef)->IsModified();
|
2000-09-18 16:07:07 +00:00
|
|
|
Printer* pPrinter = (Printer*) pModel->GetRefDevice();
|
|
|
|
(*ppObjRef)->OnDocumentPrinterChanged( pPrinter );
|
|
|
|
(*ppObjRef)->SetModified( bModified );
|
2004-10-04 16:54:47 +00:00
|
|
|
}*/
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2004-10-04 16:54:47 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-11-26 15:33:16 +00:00
|
|
|
void SdrOle2Obj::ObjectLoaded()
|
|
|
|
{
|
|
|
|
AddListeners_Impl();
|
|
|
|
}
|
|
|
|
|
2004-10-04 16:54:47 +00:00
|
|
|
void SdrOle2Obj::AddListeners_Impl()
|
|
|
|
{
|
2014-07-10 13:08:07 -04:00
|
|
|
if( mpImpl->mxObjRef.is() && mpImpl->mxObjRef->getCurrentState() != embed::EmbedStates::LOADED )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
// register modify listener
|
2014-07-10 14:11:02 -04:00
|
|
|
if (!mpImpl->mpModifyListener)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-07-10 14:11:02 -04:00
|
|
|
mpImpl->mpModifyListener = new SvxUnoShapeModifyListener(this);
|
|
|
|
mpImpl->mpModifyListener->acquire();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
uno::Reference< util::XModifyBroadcaster > xBC( getXModel(), uno::UNO_QUERY );
|
2014-07-10 14:11:02 -04:00
|
|
|
if (xBC.is() && mpImpl->mpModifyListener)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-07-10 14:11:02 -04:00
|
|
|
uno::Reference<util::XModifyListener> xListener(mpImpl->mpModifyListener);
|
2000-09-18 16:07:07 +00:00
|
|
|
xBC->addModifyListener( xListener );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-09-10 11:59:59 +00:00
|
|
|
|
2001-04-12 09:06:03 +00:00
|
|
|
void SdrOle2Obj::Disconnect()
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2005-02-16 16:05:07 +00:00
|
|
|
if( IsEmptyPresObj() )
|
|
|
|
return;
|
|
|
|
|
2003-05-26 08:06:45 +00:00
|
|
|
if( !mpImpl->mbConnected )
|
2004-10-04 16:54:47 +00:00
|
|
|
{
|
2011-03-01 19:07:44 +01:00
|
|
|
OSL_FAIL("Disconnect() called on disconnected object!");
|
2003-05-26 08:06:45 +00:00
|
|
|
return;
|
2004-10-04 16:54:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
RemoveListeners_Impl();
|
|
|
|
Disconnect_Impl();
|
|
|
|
}
|
2003-05-26 08:06:45 +00:00
|
|
|
|
2004-10-04 16:54:47 +00:00
|
|
|
void SdrOle2Obj::RemoveListeners_Impl()
|
|
|
|
{
|
2014-07-10 13:08:07 -04:00
|
|
|
if ( mpImpl->mxObjRef.is() && !mpImpl->aPersistName.isEmpty() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2005-02-24 14:11:49 +00:00
|
|
|
try
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-07-10 13:08:07 -04:00
|
|
|
sal_Int32 nState = mpImpl->mxObjRef->getCurrentState();
|
2005-02-24 14:11:49 +00:00
|
|
|
if ( nState != embed::EmbedStates::LOADED )
|
2004-10-04 16:54:47 +00:00
|
|
|
{
|
2005-02-24 14:11:49 +00:00
|
|
|
uno::Reference< util::XModifyBroadcaster > xBC( getXModel(), uno::UNO_QUERY );
|
2014-07-10 14:11:02 -04:00
|
|
|
if (xBC.is() && mpImpl->mpModifyListener)
|
2005-02-24 14:11:49 +00:00
|
|
|
{
|
2014-07-10 14:11:02 -04:00
|
|
|
uno::Reference<util::XModifyListener> xListener(mpImpl->mpModifyListener);
|
2005-02-24 14:11:49 +00:00
|
|
|
xBC->removeModifyListener( xListener );
|
|
|
|
}
|
2004-10-04 16:54:47 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2012-01-06 00:03:58 +09:00
|
|
|
catch( ::com::sun::star::uno::Exception& )
|
2005-02-24 14:11:49 +00:00
|
|
|
{
|
2011-03-03 15:27:26 +01:00
|
|
|
OSL_FAIL(
|
2012-12-02 22:35:57 +01:00
|
|
|
OString(OString("SdrOle2Obj::RemoveListeners_Impl(), "
|
2005-02-24 14:11:49 +00:00
|
|
|
"exception caught: ") +
|
2013-04-07 12:06:47 +02:00
|
|
|
OUStringToOString(
|
2005-02-24 14:11:49 +00:00
|
|
|
comphelper::anyToString( cppu::getCaughtException() ),
|
|
|
|
RTL_TEXTENCODING_UTF8 )).getStr() );
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2004-10-04 16:54:47 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-10-04 16:54:47 +00:00
|
|
|
void SdrOle2Obj::Disconnect_Impl()
|
|
|
|
{
|
2005-02-24 14:11:49 +00:00
|
|
|
try
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-09-02 11:40:43 +02:00
|
|
|
if ( pModel && !mpImpl->aPersistName.isEmpty() )
|
2003-04-24 15:45:53 +00:00
|
|
|
{
|
2005-02-24 14:11:49 +00:00
|
|
|
if( pModel->IsInDestruction() )
|
2003-04-24 15:45:53 +00:00
|
|
|
{
|
2005-02-24 14:11:49 +00:00
|
|
|
// TODO/LATER: here we must assume that the destruction of the model is enough to make clear that we will not
|
|
|
|
// remove the object from the container, even if the DrawingObject itself is not destroyed (unfortunately this
|
2005-10-19 11:11:48 +00:00
|
|
|
// There is no real need to do the following removing of the object from the container
|
2011-11-28 14:14:12 +01:00
|
|
|
// in case the model has correct persistence, but in case of problems such a removing
|
|
|
|
// would make the behavior of the office more stable
|
2005-10-19 11:11:48 +00:00
|
|
|
|
2014-07-10 13:08:07 -04:00
|
|
|
comphelper::EmbeddedObjectContainer* pContainer = mpImpl->mxObjRef.GetContainer();
|
2005-10-19 11:11:48 +00:00
|
|
|
if ( pContainer )
|
|
|
|
{
|
2014-07-10 13:08:07 -04:00
|
|
|
pContainer->CloseEmbeddedObject( mpImpl->mxObjRef.GetObject() );
|
|
|
|
mpImpl->mxObjRef.AssignToContainer( NULL, mpImpl->aPersistName );
|
2005-10-19 11:11:48 +00:00
|
|
|
}
|
|
|
|
|
2005-02-24 14:11:49 +00:00
|
|
|
// happens later than the destruction of the model, so we can't assert that).
|
|
|
|
//DBG_ASSERT( bInDestruction, "Model is destroyed, but not me?!" );
|
|
|
|
//TODO/LATER: should be make sure that the ObjectShell also forgets the object, because we will close it soon?
|
|
|
|
/*
|
|
|
|
uno::Reference < util::XCloseable > xClose( xObjRef, uno::UNO_QUERY );
|
|
|
|
if ( xClose.is() )
|
2004-10-04 16:54:47 +00:00
|
|
|
{
|
2005-02-24 14:11:49 +00:00
|
|
|
try
|
|
|
|
{
|
2014-03-10 11:09:59 +02:00
|
|
|
xClose->close( true );
|
2005-02-24 14:11:49 +00:00
|
|
|
}
|
|
|
|
catch ( util::CloseVetoException& )
|
|
|
|
{
|
|
|
|
// there's still someone who needs the object!
|
|
|
|
}
|
2004-10-04 16:54:47 +00:00
|
|
|
}
|
2005-02-24 14:11:49 +00:00
|
|
|
|
|
|
|
xObjRef = NULL;*/
|
|
|
|
}
|
2014-07-10 13:08:07 -04:00
|
|
|
else if ( mpImpl->mxObjRef.is() )
|
2005-02-24 14:11:49 +00:00
|
|
|
{
|
2008-03-05 16:01:19 +00:00
|
|
|
if ( pModel->getUnoModel().is() )
|
2003-04-24 15:45:53 +00:00
|
|
|
{
|
2005-02-24 14:11:49 +00:00
|
|
|
// remove object, but don't close it (that's up to someone else)
|
2014-07-10 13:08:07 -04:00
|
|
|
comphelper::EmbeddedObjectContainer* pContainer = mpImpl->mxObjRef.GetContainer();
|
2005-07-12 11:14:10 +00:00
|
|
|
if ( pContainer )
|
|
|
|
{
|
2014-07-10 13:08:07 -04:00
|
|
|
pContainer->RemoveEmbeddedObject( mpImpl->mxObjRef.GetObject(), false);
|
2005-07-12 11:14:10 +00:00
|
|
|
|
2011-11-28 14:14:12 +01:00
|
|
|
// TODO/LATER: mpImpl->aPersistName contains outdated information, to keep it updated
|
2005-07-12 11:14:10 +00:00
|
|
|
// it should be returned from RemoveEmbeddedObject call. Currently it is no problem,
|
|
|
|
// since no container is adjusted, actually the empty string could be provided as a name here
|
2014-07-10 13:08:07 -04:00
|
|
|
mpImpl->mxObjRef.AssignToContainer( NULL, mpImpl->aPersistName );
|
2005-07-12 11:14:10 +00:00
|
|
|
}
|
|
|
|
|
2005-02-24 14:11:49 +00:00
|
|
|
DisconnectFileLink_Impl();
|
2003-04-24 15:45:53 +00:00
|
|
|
}
|
|
|
|
}
|
2004-10-04 16:54:47 +00:00
|
|
|
}
|
2005-02-24 14:11:49 +00:00
|
|
|
|
2014-07-10 13:08:07 -04:00
|
|
|
if ( mpImpl->mxObjRef.is() && mpImpl->pLightClient )
|
2004-10-04 16:54:47 +00:00
|
|
|
{
|
2014-07-10 13:08:07 -04:00
|
|
|
mpImpl->mxObjRef->removeStateChangeListener ( mpImpl->pLightClient );
|
|
|
|
mpImpl->mxObjRef->removeEventListener( uno::Reference< document::XEventListener >( mpImpl->pLightClient ) );
|
|
|
|
mpImpl->mxObjRef->setClientSite( NULL );
|
2006-10-13 10:23:44 +00:00
|
|
|
|
2005-02-24 14:11:49 +00:00
|
|
|
GetSdrGlobalData().GetOLEObjCache().RemoveObj(this);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2004-11-26 15:33:16 +00:00
|
|
|
}
|
2012-01-06 00:03:58 +09:00
|
|
|
catch( ::com::sun::star::uno::Exception& )
|
2004-11-26 15:33:16 +00:00
|
|
|
{
|
2011-03-03 15:27:26 +01:00
|
|
|
OSL_FAIL(
|
2012-12-02 22:35:57 +01:00
|
|
|
OString(OString("SdrOle2Obj::Disconnect_Impl(), "
|
2005-02-24 14:11:49 +00:00
|
|
|
"exception caught: ") +
|
2013-04-07 12:06:47 +02:00
|
|
|
OUStringToOString(
|
2005-02-24 14:11:49 +00:00
|
|
|
comphelper::anyToString( cppu::getCaughtException() ),
|
|
|
|
RTL_TEXTENCODING_UTF8 )).getStr() );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2003-05-26 08:06:45 +00:00
|
|
|
|
|
|
|
mpImpl->mbConnected = false;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-09-10 11:59:59 +00:00
|
|
|
|
2012-11-21 22:06:52 +00:00
|
|
|
SdrObject* SdrOle2Obj::createSdrGrafObjReplacement(bool bAddText, bool /* bUseHCGraphic */) const
|
|
|
|
{
|
2013-01-17 14:28:41 -05:00
|
|
|
const Graphic* pOLEGraphic = GetGraphic();
|
2012-11-21 22:06:52 +00:00
|
|
|
|
|
|
|
if(pOLEGraphic)
|
|
|
|
{
|
|
|
|
// #i118485# allow creating a SdrGrafObj representation
|
|
|
|
SdrGrafObj* pClone = new SdrGrafObj(*pOLEGraphic);
|
|
|
|
pClone->SetModel(GetModel());
|
|
|
|
|
|
|
|
// copy transformation
|
|
|
|
basegfx::B2DHomMatrix aMatrix;
|
|
|
|
basegfx::B2DPolyPolygon aPolyPolygon;
|
|
|
|
|
|
|
|
TRGetBaseGeometry(aMatrix, aPolyPolygon);
|
|
|
|
pClone->TRSetBaseGeometry(aMatrix, aPolyPolygon);
|
|
|
|
|
|
|
|
// copy all attributes to support graphic styles for OLEs
|
|
|
|
pClone->SetStyleSheet(GetStyleSheet(), false);
|
|
|
|
pClone->SetMergedItemSet(GetMergedItemSet());
|
|
|
|
|
|
|
|
if(bAddText)
|
|
|
|
{
|
|
|
|
// #i118485# copy text (Caution! Model needed, as guaranteed in aw080)
|
|
|
|
OutlinerParaObject* pOPO = GetOutlinerParaObject();
|
|
|
|
|
|
|
|
if(pOPO && GetModel())
|
|
|
|
{
|
|
|
|
pClone->NbcSetOutlinerParaObject(new OutlinerParaObject(*pOPO));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return pClone;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// #i100710# pOLEGraphic may be zero (no visualisation available),
|
|
|
|
// so we need to use the OLE replacement graphic
|
|
|
|
SdrRectObj* pClone = new SdrRectObj(GetSnapRect());
|
|
|
|
pClone->SetModel(GetModel());
|
|
|
|
|
|
|
|
// gray outline
|
2014-11-21 20:48:11 +02:00
|
|
|
pClone->SetMergedItem(XLineStyleItem(com::sun::star::drawing::LineStyle_SOLID));
|
2012-11-21 22:06:52 +00:00
|
|
|
const svtools::ColorConfig aColorConfig;
|
|
|
|
const svtools::ColorConfigValue aColor(aColorConfig.GetColorValue(svtools::OBJECTBOUNDARIES));
|
2013-09-20 09:49:51 +02:00
|
|
|
pClone->SetMergedItem(XLineColorItem(OUString(), aColor.nColor));
|
2012-11-21 22:06:52 +00:00
|
|
|
|
|
|
|
// bitmap fill
|
2014-07-18 18:07:36 +02:00
|
|
|
pClone->SetMergedItem(XFillStyleItem(drawing::FillStyle_BITMAP));
|
2013-09-20 09:49:51 +02:00
|
|
|
pClone->SetMergedItem(XFillBitmapItem(OUString(), GetEmptyOLEReplacementGraphic()));
|
2012-11-21 22:06:52 +00:00
|
|
|
pClone->SetMergedItem(XFillBmpTileItem(false));
|
|
|
|
pClone->SetMergedItem(XFillBmpStretchItem(false));
|
|
|
|
|
|
|
|
return pClone;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-03-10 11:09:59 +02:00
|
|
|
SdrObject* SdrOle2Obj::DoConvertToPolyObj(bool bBezier, bool bAddText) const
|
2012-11-21 22:06:52 +00:00
|
|
|
{
|
|
|
|
// #i118485# missing converter added
|
|
|
|
if(GetModel())
|
|
|
|
{
|
|
|
|
SdrObject* pRetval = createSdrGrafObjReplacement(true, false);
|
|
|
|
|
|
|
|
if(pRetval)
|
|
|
|
{
|
|
|
|
SdrObject* pRetval2 = pRetval->DoConvertToPolyObj(bBezier, bAddText);
|
|
|
|
SdrObject::Free(pRetval);
|
|
|
|
|
|
|
|
return pRetval2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2012-11-21 22:06:52 +00:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
void SdrOle2Obj::SetModel(SdrModel* pNewModel)
|
|
|
|
{
|
2008-03-05 16:01:19 +00:00
|
|
|
::comphelper::IEmbeddedHelper* pDestPers = pNewModel ? pNewModel->GetPersist() : 0;
|
|
|
|
::comphelper::IEmbeddedHelper* pSrcPers = pModel ? pModel->GetPersist() : 0;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-11-26 15:33:16 +00:00
|
|
|
if ( pNewModel == pModel )
|
|
|
|
{
|
2011-11-28 14:14:12 +01:00
|
|
|
// don't know if this is necessary or if it will ever happen, but who knows?!
|
2004-11-26 15:33:16 +00:00
|
|
|
SdrRectObj::SetModel( pNewModel );
|
|
|
|
return;
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-11-26 15:33:16 +00:00
|
|
|
// assignment to model has changed
|
|
|
|
DBG_ASSERT( pSrcPers || !mpImpl->mbConnected, "Connected object without a model?!" );
|
2005-10-19 11:11:48 +00:00
|
|
|
|
|
|
|
DBG_ASSERT( pDestPers, "The destination model must have a persistence! Please submit an issue!" );
|
|
|
|
DBG_ASSERT( pDestPers != pSrcPers, "The source and the destination models should have different persistences! Problems are possible!" );
|
|
|
|
|
|
|
|
// this is a bug if the target model has no persistence
|
|
|
|
// no error handling is possible so just do nothing in this method
|
|
|
|
if ( !pDestPers )
|
|
|
|
return;
|
|
|
|
|
2004-11-26 15:33:16 +00:00
|
|
|
RemoveListeners_Impl();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2005-02-16 16:05:07 +00:00
|
|
|
if( pDestPers && pSrcPers && !IsEmptyPresObj() )
|
2004-10-04 16:54:47 +00:00
|
|
|
{
|
2005-02-24 14:11:49 +00:00
|
|
|
try
|
2004-11-26 15:33:16 +00:00
|
|
|
{
|
2011-11-28 14:14:12 +01:00
|
|
|
// move the object's storage; ObjectRef remains the same, but PersistName may change
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString aTmp;
|
2008-03-05 16:01:19 +00:00
|
|
|
comphelper::EmbeddedObjectContainer& rContainer = pSrcPers->getEmbeddedObjectContainer();
|
2005-02-24 14:11:49 +00:00
|
|
|
uno::Reference < embed::XEmbeddedObject > xObj = rContainer.GetEmbeddedObject( mpImpl->aPersistName );
|
2014-07-10 13:08:07 -04:00
|
|
|
DBG_ASSERT( !mpImpl->mxObjRef.is() || mpImpl->mxObjRef.GetObject() == xObj, "Wrong object identity!" );
|
2005-02-24 14:11:49 +00:00
|
|
|
if ( xObj.is() )
|
2005-01-18 14:01:22 +00:00
|
|
|
{
|
2008-03-05 16:01:19 +00:00
|
|
|
pDestPers->getEmbeddedObjectContainer().MoveEmbeddedObject( rContainer, xObj, aTmp );
|
2005-02-24 14:11:49 +00:00
|
|
|
mpImpl->aPersistName = aTmp;
|
2014-07-10 13:08:07 -04:00
|
|
|
mpImpl->mxObjRef.AssignToContainer( &pDestPers->getEmbeddedObjectContainer(), aTmp );
|
2005-02-24 14:11:49 +00:00
|
|
|
}
|
2012-01-14 12:10:39 -02:00
|
|
|
DBG_ASSERT( !aTmp.isEmpty(), "Copying embedded object failed!" );
|
2005-02-24 14:11:49 +00:00
|
|
|
}
|
2012-01-06 00:03:58 +09:00
|
|
|
catch( ::com::sun::star::uno::Exception& )
|
2005-02-24 14:11:49 +00:00
|
|
|
{
|
2011-03-03 15:27:26 +01:00
|
|
|
OSL_FAIL(
|
2012-12-02 22:35:57 +01:00
|
|
|
OString(OString("SdrOle2Obj::SetModel(), "
|
2005-02-24 14:11:49 +00:00
|
|
|
"exception caught: ") +
|
2013-04-07 12:06:47 +02:00
|
|
|
OUStringToOString(
|
2005-02-24 14:11:49 +00:00
|
|
|
comphelper::anyToString( cppu::getCaughtException() ),
|
|
|
|
RTL_TEXTENCODING_UTF8 )).getStr() );
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2001-09-10 11:59:59 +00:00
|
|
|
SdrRectObj::SetModel( pNewModel );
|
2001-09-10 10:38:27 +00:00
|
|
|
|
2005-03-03 16:34:09 +00:00
|
|
|
// #i43086#
|
2011-11-28 14:14:12 +01:00
|
|
|
// #i85304 redo the change for charts for the above bugfix, as #i43086# does not occur anymore
|
2008-01-29 12:39:20 +00:00
|
|
|
//so maybe the ImpSetVisAreaSize call can be removed here completely
|
|
|
|
//Nevertheless I leave it in for other objects as I am not sure about the side effects when removing now
|
|
|
|
if( pModel && !pModel->isLocked() && !IsChart() )
|
2005-03-03 16:34:09 +00:00
|
|
|
ImpSetVisAreaSize();
|
|
|
|
|
2005-02-16 16:05:07 +00:00
|
|
|
if( pDestPers && !IsEmptyPresObj() )
|
2004-11-26 15:33:16 +00:00
|
|
|
{
|
2005-02-17 08:54:15 +00:00
|
|
|
if ( !pSrcPers || IsEmptyPresObj() )
|
2011-11-28 14:14:12 +01:00
|
|
|
// object wasn't connected, now it should be
|
2004-11-26 15:33:16 +00:00
|
|
|
Connect_Impl();
|
|
|
|
else
|
|
|
|
Reconnect_Impl();
|
|
|
|
}
|
|
|
|
|
|
|
|
AddListeners_Impl();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-09-10 11:59:59 +00:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
void SdrOle2Obj::SetPage(SdrPage* pNewPage)
|
|
|
|
{
|
2010-10-05 07:57:54 -05:00
|
|
|
bool bRemove=pNewPage==NULL && pPage!=NULL;
|
|
|
|
bool bInsert=pNewPage!=NULL && pPage==NULL;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-10-04 16:54:47 +00:00
|
|
|
if (bRemove && mpImpl->mbConnected )
|
|
|
|
Disconnect();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-03-15 13:51:11 +00:00
|
|
|
if(!pModel && !GetStyleSheet() && pNewPage && pNewPage->GetModel())
|
2012-05-31 13:23:45 +00:00
|
|
|
{
|
|
|
|
// #i119287# Set default StyleSheet for SdrGrafObj here, it is different from 'Default'. This
|
|
|
|
// needs to be done before the style 'Default' is set from the :SetModel() call which is triggered
|
|
|
|
// from the following :SetPage().
|
|
|
|
// TTTT: Needs to be moved in branch aw080 due to having a SdrModel from the beginning, is at this
|
|
|
|
// place for convenience currently (works in both versions, is not in the way)
|
|
|
|
SfxStyleSheet* pSheet = pNewPage->GetModel()->GetDefaultStyleSheetForSdrGrafObjAndSdrOle2Obj();
|
|
|
|
|
|
|
|
if(pSheet)
|
|
|
|
{
|
|
|
|
SetStyleSheet(pSheet, false);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2014-07-18 18:07:36 +02:00
|
|
|
SetMergedItem(XFillStyleItem(drawing::FillStyle_NONE));
|
2014-11-21 20:48:11 +02:00
|
|
|
SetMergedItem(XLineStyleItem(drawing::LineStyle_NONE));
|
2012-05-31 13:23:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
SdrRectObj::SetPage(pNewPage);
|
|
|
|
|
2004-10-04 16:54:47 +00:00
|
|
|
if (bInsert && !mpImpl->mbConnected )
|
|
|
|
Connect();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-09-10 11:59:59 +00:00
|
|
|
|
2004-10-04 16:54:47 +00:00
|
|
|
void SdrOle2Obj::SetObjRef( const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject >& rNewObjRef )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-07-10 13:08:07 -04:00
|
|
|
DBG_ASSERT( !rNewObjRef.is() || !mpImpl->mxObjRef.GetObject().is(), "SetObjRef called on already initialized object!");
|
|
|
|
if( rNewObjRef == mpImpl->mxObjRef.GetObject() )
|
2003-05-26 08:06:45 +00:00
|
|
|
return;
|
|
|
|
|
2011-05-12 11:03:28 +02:00
|
|
|
// the caller of the method is responsible to control the old object, it will not be closed here
|
2011-11-28 14:14:12 +01:00
|
|
|
// Otherwise WW8 import crashes because it transfers control to OLENode by this method
|
2014-07-10 13:08:07 -04:00
|
|
|
if ( mpImpl->mxObjRef.GetObject().is() )
|
|
|
|
mpImpl->mxObjRef.Lock( false );
|
2003-04-24 15:45:53 +00:00
|
|
|
|
2011-05-12 11:03:28 +02:00
|
|
|
// avoid removal of object in Disconnect! It is definitely a HACK to call SetObjRef(0)!
|
2004-11-26 15:33:16 +00:00
|
|
|
// This call will try to close the objects; so if anybody else wants to keep it, it must be locked by a CloseListener
|
2014-07-10 13:08:07 -04:00
|
|
|
mpImpl->mxObjRef.Clear();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-10-04 16:54:47 +00:00
|
|
|
if ( mpImpl->mbConnected )
|
|
|
|
Disconnect();
|
|
|
|
|
2014-07-10 13:08:07 -04:00
|
|
|
mpImpl->mxObjRef.Assign( rNewObjRef, GetAspect() );
|
2014-07-10 14:11:02 -04:00
|
|
|
mpImpl->mbTypeAsked = false;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-07-10 13:08:07 -04:00
|
|
|
if ( mpImpl->mxObjRef.is() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-07-10 13:48:36 -04:00
|
|
|
DELETEZ(mpImpl->mpGraphic);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-07-10 13:08:07 -04:00
|
|
|
if ( (mpImpl->mxObjRef->getStatus( GetAspect() ) & embed::EmbedMisc::EMBED_NEVERRESIZE ) )
|
2014-01-28 19:57:37 +01:00
|
|
|
SetResizeProtect(true);
|
2003-04-24 13:49:28 +00:00
|
|
|
|
2011-05-12 11:03:28 +02:00
|
|
|
// For math objects, set closed state to transparent
|
2013-01-09 14:49:01 +00:00
|
|
|
SetClosedObj(!ImplIsMathObj( rNewObjRef ));
|
2004-10-04 16:54:47 +00:00
|
|
|
|
|
|
|
Connect();
|
|
|
|
}
|
2003-11-24 15:57:52 +00:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
SetChanged();
|
2003-11-24 15:57:52 +00:00
|
|
|
BroadcastObjectChange();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-09-10 11:59:59 +00:00
|
|
|
|
2003-04-24 13:49:28 +00:00
|
|
|
void SdrOle2Obj::SetClosedObj( bool bIsClosed )
|
|
|
|
{
|
2004-10-04 16:54:47 +00:00
|
|
|
// TODO/LATER: do we still need this hack?
|
2011-05-12 11:03:28 +02:00
|
|
|
// Allow changes to the closed state of OLE objects
|
2003-04-24 13:49:28 +00:00
|
|
|
bClosedObj = bIsClosed;
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2003-04-24 13:49:28 +00:00
|
|
|
|
2009-05-19 16:14:08 +00:00
|
|
|
SdrObject* SdrOle2Obj::getFullDragClone() const
|
|
|
|
{
|
2012-11-21 22:06:52 +00:00
|
|
|
// #i118485# use central replacement generator
|
|
|
|
return createSdrGrafObjReplacement(false, true);
|
2009-05-19 16:14:08 +00:00
|
|
|
}
|
CWS-TOOLING: integrate CWS aw059
2008-12-16 16:15:40 +0100 aw r265557 : #i95645# avoid expensive tries to stream in graphic data when stream is at end anyways
2008-12-15 16:49:58 +0100 wg r265512 : i97278
2008-12-12 16:02:15 +0100 aw r265427 : #i95645# new formulation was wrong in two places; thanks go to THB. Thanks!
2008-12-12 15:49:06 +0100 aw r265425 : #i95645# refined formulation of AA on/off constraints for VCLCanvas
2008-12-12 14:51:26 +0100 aw r265420 : #i95645# workaround for DrawTransparent of button hilighting when remote displayed; somehow GDI+ does bad dithering in that case
2008-12-12 13:23:00 +0100 aw r265414 : removed temporary build hack; it made it's way in using the rebase; with SVN the rebase is not based on pure checkouts, but uses local changes.
2008-12-11 19:35:59 +0100 aw r265352 : #i95645# need to switch off AA for WNT and UNX, the VCLCanvas is currently not able to handle AA correctly
2008-12-11 16:05:17 +0100 thb r265327 : #i95645# Changed defaults to on; as for the while svx dialog is not changed
2008-12-10 13:40:38 +0100 aw r265180 : #i95645# changed pixel snap to basegfx::fround
2008-12-10 13:25:45 +0100 aw r265177 : corrected linux warning
2008-12-10 12:28:02 +0100 aw r265167 : #i95645# added support for pixel snap/linux resp. no AA for mac (also pixel snap) when AA is switched off to the basegfx::B2DPolyPolygon painting VCL methods; needed for e.g. selection in SC and SW
2008-12-09 18:44:39 +0100 aw r265136 : #i95645# corrected filled path construction
2008-12-09 18:12:40 +0100 aw r265133 : #i95645# added support for non-AAd transparent paints
2008-12-09 18:11:58 +0100 aw r265132 : #i95645# forced selection without AA
2008-12-09 18:11:29 +0100 aw r265131 : #i88893# smoothed/corrected SW selection rects for transparent selection, forced selection without AA
2008-12-09 15:21:39 +0100 aw r265094 : #i95645# corrected FormControl full drag
2008-12-09 15:11:26 +0100 aw r265093 : #i95645# make gdiplus usages more safe when no line or fill color is selected
2008-12-09 14:30:09 +0100 aw r265085 : #i95645# added GDIPlus support
2008-12-09 13:41:06 +0100 aw r265081 : #i95645# added simple AA using GDIPlis to VCL
2008-12-09 13:40:46 +0100 aw r265080 : #i95645# added simple AA using GDIPlis to VCL
2008-12-09 13:40:29 +0100 aw r265079 : #i95645# added simple AA using GDIPlis to VCL
2008-12-09 13:33:16 +0100 aw r265078 : #i95645# changes to requirements, discussed with FPE
2008-12-08 14:11:39 +0100 aw r264995 : #i95646# added missing extra-wireframe for SdrDragObjOwn implementations when object has no border
2008-12-08 14:11:00 +0100 aw r264994 : #i95646# corrected RenderMarkerArrayPrimitive2D OutDev usage in VclProcessor2D
2008-12-08 12:15:10 +0100 ufi r264987 : aw059
2008-12-08 12:14:40 +0100 ufi r264986 : aw059
2008-12-05 13:16:18 +0100 aw r264905 : CWS-TOOLING: rebase CWS aw059 to trunk@264807 (milestone: DEV300:m37)
2008-12-04 11:29:48 +0100 aw r264827 : #i95645# corrected warning
2008-12-03 14:43:39 +0100 aw r264783 : #i95645# simplified overlay manager and objects to stl vector; added stuff to render some more overlay to primitive renderer to get AA support for WIN32
2008-12-03 14:42:43 +0100 aw r264782 : #i95645# added test for WIN32 for AA if cairo canvas is available
2008-12-03 14:42:13 +0100 aw r264781 : #i95645# removed unused options for writer selection overlay
2008-12-03 14:41:51 +0100 aw r264780 : #i95645# removed unused options for calc overlay
2008-12-03 14:41:21 +0100 aw r264779 : #i95645# small corrections in canvas renderer
2008-12-02 18:32:31 +0100 aw r264730 : #i95646# merged cairo version from THB's CWS cairosource01
2008-12-02 15:25:45 +0100 aw r264705 : #i95645# added helpers for the MarkerArrayPrimitive2D change which support buffered creation of the most used markers
2008-12-02 12:50:01 +0100 aw r264690 : #i95645# added a non-saved method IsAAPossibleOnThisSystem to SvtOptionsDrawinglayer to quickly test if AA can be offered on the system, added buffering of that check.
2008-12-02 12:48:51 +0100 aw r264689 : #i95645# unified MarkerArrayPrimitive2D to work bitmap-orientated, adapted usages. Added buffered preparation for needed markers. Minor adaptions for AA
2008-12-02 12:47:53 +0100 aw r264688 : #i95645# unified MarkerArrayPrimitive2D to no longer work on a enum and types of markers, but to use a BitmapEx (or any other Bitmap object) which will be displayed centerd and in discrete coordinates at positions. Adapted decomposition and all usages. Corrected minor stuff with grid primitive
2008-11-28 17:11:12 +0100 thb r264565 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-28 17:03:27 +0100 thb r264563 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-28 17:00:07 +0100 thb r264562 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-28 16:59:51 +0100 thb r264561 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-27 19:13:42 +0100 aw r264519 : #i95646# optimized getLength() a little bit
2008-11-27 19:12:50 +0100 aw r264518 : #i95646# corrected AA expansion of invalidate frame; buffered discrete distance at OM
2008-11-27 18:50:05 +0100 aw r264516 : #i95646# corrected fit to frame texts for WIN32
2008-11-27 15:32:15 +0100 aw r264496 : #i95646# helplines corrected
2008-11-27 15:32:05 +0100 aw r264495 : #i95646# helplines corrected
2008-11-27 15:01:30 +0100 aw r264492 : #i95646# enable AA support for old polygons, especially to get support for MetaFile output
2008-11-27 14:33:28 +0100 aw r264489 : #i95646# AA support for wireframe overlays
2008-11-27 13:40:54 +0100 aw r264485 : #i95646# added full repaint when AA option changes
2008-11-27 13:29:19 +0100 aw r264482 : #i95646# corrected handling of bSolidDragging config entries
2008-11-27 13:29:08 +0100 aw r264481 : #i95646# corrected handling of bSolidDragging config entries
2008-11-27 11:30:12 +0100 aw r264469 : #i95646# corrected IsAAPossibleOnThisSystem implementation
2008-11-26 16:33:04 +0100 aw r264420 : #i95646# adapted OfaViewTabPage to use disable mechanism for AA and HWAccel
2008-11-26 15:49:19 +0100 aw r264406 : #i95646# added DlgEdObj::getFullDragClone() to create specialized simple SdrUnoObj clones for solid dragging
2008-11-26 15:48:11 +0100 aw r264405 : #i95646# changed derivation of ViewObjectContactOfUnoControl to get a valid isPrimitiveVisible() implementation
2008-11-26 14:11:37 +0100 aw r264385 : #i88893# added new look for selection in sw
2008-11-26 11:32:33 +0100 aw r264360 : corrected compiler warning
2008-11-25 18:46:29 +0100 aw r264328 : #i95646# snapshot with FullDrag clones
2008-11-25 18:46:07 +0100 aw r264327 : #i95646# snapshot with FullDrag clones
2008-11-25 18:45:43 +0100 aw r264326 : #i95646# snapshot with FullDrag clones
2008-11-25 18:19:04 +0100 thb r264324 : #i96585# Added missing inline specifier
2008-11-25 13:16:25 +0100 aw r264285 : #i95646# next snapshot
2008-11-25 13:15:33 +0100 aw r264284 : #i95646# next snapshot
2008-11-25 13:15:12 +0100 aw r264283 : #i95646# next snapshot
2008-11-25 13:14:51 +0100 aw r264282 : #i95646# next snapshot
2008-11-20 13:40:49 +0100 aw r264045 : #i95646# stable snapshot
2008-11-20 13:40:29 +0100 aw r264044 : #i95646# stable snapshot
2008-11-20 13:40:06 +0100 aw r264043 : #i95646# stable snapshot
2008-11-20 13:39:45 +0100 aw r264042 : #i95646# stable snapshot
2008-11-18 11:53:39 +0100 aw r263758 : #i95646# snapshot for linux test build
2008-11-18 11:52:54 +0100 aw r263757 : #i95646# snapshot for linux test build
2008-11-18 11:52:02 +0100 aw r263756 : #i95646# snapshot for linux test build
2008-11-14 18:17:49 +0100 aw r263692 : #i95646# snapshot with most stuff working
2008-11-14 18:14:26 +0100 aw r263691 : #i95646# snapshot with most stuff working
2008-11-14 18:12:50 +0100 aw r263690 : #i95646# snapshot with most stuff working
2008-11-14 18:12:16 +0100 aw r263689 : #i95646# snapshot with most stuff working
2008-11-14 18:11:41 +0100 aw r263688 : #i95646# snapshot with most stuff working
2008-11-07 18:44:22 +0100 aw r263479 : #i95968# better support PrefMapMode; special for MAP_PIXEL was missing
2008-11-05 17:39:15 +0100 aw r263356 : #i95644# #i95645# #i95646# bigger change done, saving for another experiment
2008-11-05 17:39:02 +0100 aw r263355 : #i95644# #i95645# #i95646# bigger change done, saving for another experiment
2008-11-05 12:28:32 +0100 aw r263350 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:27:51 +0100 aw r263349 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:26:58 +0100 aw r263348 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:26:17 +0100 aw r263347 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:25:55 +0100 aw r263346 : #i95644# #i95645# #i95646# in-between state before bigger change
2009-01-05 13:44:12 +00:00
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
CWS-TOOLING: integrate CWS aw059
2008-12-16 16:15:40 +0100 aw r265557 : #i95645# avoid expensive tries to stream in graphic data when stream is at end anyways
2008-12-15 16:49:58 +0100 wg r265512 : i97278
2008-12-12 16:02:15 +0100 aw r265427 : #i95645# new formulation was wrong in two places; thanks go to THB. Thanks!
2008-12-12 15:49:06 +0100 aw r265425 : #i95645# refined formulation of AA on/off constraints for VCLCanvas
2008-12-12 14:51:26 +0100 aw r265420 : #i95645# workaround for DrawTransparent of button hilighting when remote displayed; somehow GDI+ does bad dithering in that case
2008-12-12 13:23:00 +0100 aw r265414 : removed temporary build hack; it made it's way in using the rebase; with SVN the rebase is not based on pure checkouts, but uses local changes.
2008-12-11 19:35:59 +0100 aw r265352 : #i95645# need to switch off AA for WNT and UNX, the VCLCanvas is currently not able to handle AA correctly
2008-12-11 16:05:17 +0100 thb r265327 : #i95645# Changed defaults to on; as for the while svx dialog is not changed
2008-12-10 13:40:38 +0100 aw r265180 : #i95645# changed pixel snap to basegfx::fround
2008-12-10 13:25:45 +0100 aw r265177 : corrected linux warning
2008-12-10 12:28:02 +0100 aw r265167 : #i95645# added support for pixel snap/linux resp. no AA for mac (also pixel snap) when AA is switched off to the basegfx::B2DPolyPolygon painting VCL methods; needed for e.g. selection in SC and SW
2008-12-09 18:44:39 +0100 aw r265136 : #i95645# corrected filled path construction
2008-12-09 18:12:40 +0100 aw r265133 : #i95645# added support for non-AAd transparent paints
2008-12-09 18:11:58 +0100 aw r265132 : #i95645# forced selection without AA
2008-12-09 18:11:29 +0100 aw r265131 : #i88893# smoothed/corrected SW selection rects for transparent selection, forced selection without AA
2008-12-09 15:21:39 +0100 aw r265094 : #i95645# corrected FormControl full drag
2008-12-09 15:11:26 +0100 aw r265093 : #i95645# make gdiplus usages more safe when no line or fill color is selected
2008-12-09 14:30:09 +0100 aw r265085 : #i95645# added GDIPlus support
2008-12-09 13:41:06 +0100 aw r265081 : #i95645# added simple AA using GDIPlis to VCL
2008-12-09 13:40:46 +0100 aw r265080 : #i95645# added simple AA using GDIPlis to VCL
2008-12-09 13:40:29 +0100 aw r265079 : #i95645# added simple AA using GDIPlis to VCL
2008-12-09 13:33:16 +0100 aw r265078 : #i95645# changes to requirements, discussed with FPE
2008-12-08 14:11:39 +0100 aw r264995 : #i95646# added missing extra-wireframe for SdrDragObjOwn implementations when object has no border
2008-12-08 14:11:00 +0100 aw r264994 : #i95646# corrected RenderMarkerArrayPrimitive2D OutDev usage in VclProcessor2D
2008-12-08 12:15:10 +0100 ufi r264987 : aw059
2008-12-08 12:14:40 +0100 ufi r264986 : aw059
2008-12-05 13:16:18 +0100 aw r264905 : CWS-TOOLING: rebase CWS aw059 to trunk@264807 (milestone: DEV300:m37)
2008-12-04 11:29:48 +0100 aw r264827 : #i95645# corrected warning
2008-12-03 14:43:39 +0100 aw r264783 : #i95645# simplified overlay manager and objects to stl vector; added stuff to render some more overlay to primitive renderer to get AA support for WIN32
2008-12-03 14:42:43 +0100 aw r264782 : #i95645# added test for WIN32 for AA if cairo canvas is available
2008-12-03 14:42:13 +0100 aw r264781 : #i95645# removed unused options for writer selection overlay
2008-12-03 14:41:51 +0100 aw r264780 : #i95645# removed unused options for calc overlay
2008-12-03 14:41:21 +0100 aw r264779 : #i95645# small corrections in canvas renderer
2008-12-02 18:32:31 +0100 aw r264730 : #i95646# merged cairo version from THB's CWS cairosource01
2008-12-02 15:25:45 +0100 aw r264705 : #i95645# added helpers for the MarkerArrayPrimitive2D change which support buffered creation of the most used markers
2008-12-02 12:50:01 +0100 aw r264690 : #i95645# added a non-saved method IsAAPossibleOnThisSystem to SvtOptionsDrawinglayer to quickly test if AA can be offered on the system, added buffering of that check.
2008-12-02 12:48:51 +0100 aw r264689 : #i95645# unified MarkerArrayPrimitive2D to work bitmap-orientated, adapted usages. Added buffered preparation for needed markers. Minor adaptions for AA
2008-12-02 12:47:53 +0100 aw r264688 : #i95645# unified MarkerArrayPrimitive2D to no longer work on a enum and types of markers, but to use a BitmapEx (or any other Bitmap object) which will be displayed centerd and in discrete coordinates at positions. Adapted decomposition and all usages. Corrected minor stuff with grid primitive
2008-11-28 17:11:12 +0100 thb r264565 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-28 17:03:27 +0100 thb r264563 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-28 17:00:07 +0100 thb r264562 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-28 16:59:51 +0100 thb r264561 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-27 19:13:42 +0100 aw r264519 : #i95646# optimized getLength() a little bit
2008-11-27 19:12:50 +0100 aw r264518 : #i95646# corrected AA expansion of invalidate frame; buffered discrete distance at OM
2008-11-27 18:50:05 +0100 aw r264516 : #i95646# corrected fit to frame texts for WIN32
2008-11-27 15:32:15 +0100 aw r264496 : #i95646# helplines corrected
2008-11-27 15:32:05 +0100 aw r264495 : #i95646# helplines corrected
2008-11-27 15:01:30 +0100 aw r264492 : #i95646# enable AA support for old polygons, especially to get support for MetaFile output
2008-11-27 14:33:28 +0100 aw r264489 : #i95646# AA support for wireframe overlays
2008-11-27 13:40:54 +0100 aw r264485 : #i95646# added full repaint when AA option changes
2008-11-27 13:29:19 +0100 aw r264482 : #i95646# corrected handling of bSolidDragging config entries
2008-11-27 13:29:08 +0100 aw r264481 : #i95646# corrected handling of bSolidDragging config entries
2008-11-27 11:30:12 +0100 aw r264469 : #i95646# corrected IsAAPossibleOnThisSystem implementation
2008-11-26 16:33:04 +0100 aw r264420 : #i95646# adapted OfaViewTabPage to use disable mechanism for AA and HWAccel
2008-11-26 15:49:19 +0100 aw r264406 : #i95646# added DlgEdObj::getFullDragClone() to create specialized simple SdrUnoObj clones for solid dragging
2008-11-26 15:48:11 +0100 aw r264405 : #i95646# changed derivation of ViewObjectContactOfUnoControl to get a valid isPrimitiveVisible() implementation
2008-11-26 14:11:37 +0100 aw r264385 : #i88893# added new look for selection in sw
2008-11-26 11:32:33 +0100 aw r264360 : corrected compiler warning
2008-11-25 18:46:29 +0100 aw r264328 : #i95646# snapshot with FullDrag clones
2008-11-25 18:46:07 +0100 aw r264327 : #i95646# snapshot with FullDrag clones
2008-11-25 18:45:43 +0100 aw r264326 : #i95646# snapshot with FullDrag clones
2008-11-25 18:19:04 +0100 thb r264324 : #i96585# Added missing inline specifier
2008-11-25 13:16:25 +0100 aw r264285 : #i95646# next snapshot
2008-11-25 13:15:33 +0100 aw r264284 : #i95646# next snapshot
2008-11-25 13:15:12 +0100 aw r264283 : #i95646# next snapshot
2008-11-25 13:14:51 +0100 aw r264282 : #i95646# next snapshot
2008-11-20 13:40:49 +0100 aw r264045 : #i95646# stable snapshot
2008-11-20 13:40:29 +0100 aw r264044 : #i95646# stable snapshot
2008-11-20 13:40:06 +0100 aw r264043 : #i95646# stable snapshot
2008-11-20 13:39:45 +0100 aw r264042 : #i95646# stable snapshot
2008-11-18 11:53:39 +0100 aw r263758 : #i95646# snapshot for linux test build
2008-11-18 11:52:54 +0100 aw r263757 : #i95646# snapshot for linux test build
2008-11-18 11:52:02 +0100 aw r263756 : #i95646# snapshot for linux test build
2008-11-14 18:17:49 +0100 aw r263692 : #i95646# snapshot with most stuff working
2008-11-14 18:14:26 +0100 aw r263691 : #i95646# snapshot with most stuff working
2008-11-14 18:12:50 +0100 aw r263690 : #i95646# snapshot with most stuff working
2008-11-14 18:12:16 +0100 aw r263689 : #i95646# snapshot with most stuff working
2008-11-14 18:11:41 +0100 aw r263688 : #i95646# snapshot with most stuff working
2008-11-07 18:44:22 +0100 aw r263479 : #i95968# better support PrefMapMode; special for MAP_PIXEL was missing
2008-11-05 17:39:15 +0100 aw r263356 : #i95644# #i95645# #i95646# bigger change done, saving for another experiment
2008-11-05 17:39:02 +0100 aw r263355 : #i95644# #i95645# #i95646# bigger change done, saving for another experiment
2008-11-05 12:28:32 +0100 aw r263350 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:27:51 +0100 aw r263349 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:26:58 +0100 aw r263348 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:26:17 +0100 aw r263347 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:25:55 +0100 aw r263346 : #i95644# #i95645# #i95646# in-between state before bigger change
2009-01-05 13:44:12 +00:00
|
|
|
|
2013-09-02 11:40:43 +02:00
|
|
|
void SdrOle2Obj::SetPersistName( const OUString& rPersistName )
|
2001-09-13 08:23:24 +00:00
|
|
|
{
|
2013-09-02 11:40:43 +02:00
|
|
|
DBG_ASSERT( mpImpl->aPersistName.isEmpty(), "Persist name changed!");
|
2003-11-05 13:33:18 +00:00
|
|
|
|
2001-09-13 08:23:24 +00:00
|
|
|
mpImpl->aPersistName = rPersistName;
|
2003-12-01 08:30:56 +00:00
|
|
|
mpImpl->mbLoadingOLEObjectFailed = false;
|
2003-11-05 13:33:18 +00:00
|
|
|
|
|
|
|
Connect();
|
2001-09-13 08:23:24 +00:00
|
|
|
SetChanged();
|
|
|
|
}
|
|
|
|
|
2004-10-04 16:54:47 +00:00
|
|
|
void SdrOle2Obj::AbandonObject()
|
|
|
|
{
|
2014-12-18 13:34:45 +01:00
|
|
|
mpImpl->aPersistName.clear();
|
2004-10-04 16:54:47 +00:00
|
|
|
mpImpl->mbLoadingOLEObjectFailed = false;
|
|
|
|
SetObjRef(0);
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-09-13 08:23:24 +00:00
|
|
|
|
2013-09-02 11:40:43 +02:00
|
|
|
OUString SdrOle2Obj::GetPersistName() const
|
2001-09-13 08:23:24 +00:00
|
|
|
{
|
|
|
|
return mpImpl->aPersistName;
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-09-13 08:23:24 +00:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
void SdrOle2Obj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
|
|
|
|
{
|
2012-11-21 22:06:52 +00:00
|
|
|
// #i118485# Allowing much more attributes for OLEs
|
|
|
|
rInfo.bRotateFreeAllowed = true;
|
|
|
|
rInfo.bRotate90Allowed = true;
|
|
|
|
rInfo.bMirrorFreeAllowed = true;
|
|
|
|
rInfo.bMirror45Allowed = true;
|
|
|
|
rInfo.bMirror90Allowed = true;
|
|
|
|
rInfo.bTransparenceAllowed = true;
|
|
|
|
rInfo.bGradientAllowed = true;
|
|
|
|
rInfo.bShearAllowed = true;
|
|
|
|
rInfo.bEdgeRadiusAllowed = false;
|
|
|
|
rInfo.bNoOrthoDesired = false;
|
|
|
|
rInfo.bCanConvToPath = true;
|
|
|
|
rInfo.bCanConvToPoly = true;
|
|
|
|
rInfo.bCanConvToPathLineToArea = false;
|
|
|
|
rInfo.bCanConvToPolyLineToArea = false;
|
|
|
|
rInfo.bCanConvToContour = true;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-09-10 11:59:59 +00:00
|
|
|
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_uInt16 SdrOle2Obj::GetObjIdentifier() const
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-07-10 14:11:02 -04:00
|
|
|
return mpImpl->mbFrame ? sal_uInt16(OBJ_FRAME) : sal_uInt16(OBJ_OLE2);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-09-10 11:59:59 +00:00
|
|
|
|
2013-07-25 09:27:58 +01:00
|
|
|
OUString SdrOle2Obj::TakeObjNameSingul() const
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-07-10 14:11:02 -04:00
|
|
|
OUStringBuffer sName(ImpGetResStr(mpImpl->mbFrame ? STR_ObjNameSingulFrame : STR_ObjNameSingulOLE2));
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2013-07-25 09:27:58 +01:00
|
|
|
const OUString aName(GetName());
|
2006-12-19 16:47:26 +00:00
|
|
|
|
2013-07-25 09:27:58 +01:00
|
|
|
if (!aName.isEmpty())
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-07-25 09:27:58 +01:00
|
|
|
sName.append(" '");
|
|
|
|
sName.append(aName);
|
|
|
|
sName.append('\'');
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2013-07-25 09:27:58 +01:00
|
|
|
|
|
|
|
return sName.makeStringAndClear();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-09-10 11:59:59 +00:00
|
|
|
|
2013-07-25 20:35:59 +01:00
|
|
|
OUString SdrOle2Obj::TakeObjNamePlural() const
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-07-10 14:11:02 -04:00
|
|
|
return ImpGetResStr(mpImpl->mbFrame ? STR_ObjNamePluralFrame : STR_ObjNamePluralOLE2);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-09-10 11:59:59 +00:00
|
|
|
|
2011-03-25 17:33:24 +01:00
|
|
|
SdrOle2Obj* SdrOle2Obj::Clone() const
|
|
|
|
{
|
|
|
|
return CloneHelper< SdrOle2Obj >();
|
|
|
|
}
|
|
|
|
|
2014-06-13 11:12:50 -04:00
|
|
|
SdrOle2Obj* SdrOle2Obj::CloneWithShellIDs( const OUString& rSrcShellID, const OUString& rDestShellID ) const
|
|
|
|
{
|
|
|
|
SdrOle2Obj* pObj =
|
|
|
|
dynamic_cast<SdrOle2Obj*>(
|
|
|
|
SdrObjFactory::MakeNewObject(GetObjInventor(), GetObjIdentifier(), NULL));
|
|
|
|
|
|
|
|
if (pObj)
|
|
|
|
pObj->assignFrom(*this, rSrcShellID, rDestShellID);
|
|
|
|
|
|
|
|
return pObj;
|
|
|
|
}
|
|
|
|
|
|
|
|
SdrOle2Obj& SdrOle2Obj::assignFrom(
|
|
|
|
const SdrOle2Obj& rObj, const OUString& rSrcShellID, const OUString& rDestShellID )
|
2001-09-10 11:59:59 +00:00
|
|
|
{
|
2004-10-04 16:54:47 +00:00
|
|
|
//TODO/LATER: who takes over control of my old object?!
|
2001-09-10 11:59:59 +00:00
|
|
|
if( &rObj != this )
|
2004-05-10 13:33:02 +00:00
|
|
|
{
|
|
|
|
// #116235#
|
|
|
|
// ImpAssign( rObj );
|
|
|
|
const SdrOle2Obj& rOle2Obj = static_cast< const SdrOle2Obj& >( rObj );
|
2001-09-10 11:59:59 +00:00
|
|
|
|
2014-07-10 13:08:07 -04:00
|
|
|
uno::Reference<util::XCloseable> xClose(mpImpl->mxObjRef.GetObject(), uno::UNO_QUERY);
|
2004-10-04 16:54:47 +00:00
|
|
|
|
|
|
|
if( pModel && mpImpl->mbConnected )
|
2004-05-10 13:33:02 +00:00
|
|
|
Disconnect();
|
2001-09-10 11:59:59 +00:00
|
|
|
|
2004-05-10 13:33:02 +00:00
|
|
|
SdrRectObj::operator=( rObj );
|
2001-09-10 11:59:59 +00:00
|
|
|
|
2011-05-12 11:03:28 +02:00
|
|
|
// Manually copying bClosedObj attribute
|
2004-05-10 13:33:02 +00:00
|
|
|
SetClosedObj( rObj.IsClosedObj() );
|
2001-09-10 11:59:59 +00:00
|
|
|
|
2004-05-10 13:33:02 +00:00
|
|
|
mpImpl->aPersistName = rOle2Obj.mpImpl->aPersistName;
|
2014-07-10 13:53:37 -04:00
|
|
|
mpImpl->maProgName = rOle2Obj.mpImpl->maProgName;
|
2014-07-10 14:11:02 -04:00
|
|
|
mpImpl->mbFrame = rOle2Obj.mpImpl->mbFrame;
|
2004-05-10 13:33:02 +00:00
|
|
|
|
2014-07-10 13:48:36 -04:00
|
|
|
if (rOle2Obj.mpImpl->mpGraphic)
|
2004-05-10 13:33:02 +00:00
|
|
|
{
|
2014-07-10 13:48:36 -04:00
|
|
|
if (mpImpl->mpGraphic)
|
2004-05-10 13:33:02 +00:00
|
|
|
{
|
2014-07-10 13:48:36 -04:00
|
|
|
delete mpImpl->mpGraphic;
|
2014-07-10 13:49:37 -04:00
|
|
|
delete mpImpl->mpGraphicObject;
|
2004-05-10 13:33:02 +00:00
|
|
|
}
|
|
|
|
|
2014-07-10 13:48:36 -04:00
|
|
|
mpImpl->mpGraphic = new Graphic(*rOle2Obj.mpImpl->mpGraphic);
|
2014-07-10 13:49:37 -04:00
|
|
|
mpImpl->mpGraphicObject = new GraphicObject(*mpImpl->mpGraphic);
|
2004-05-10 13:33:02 +00:00
|
|
|
}
|
2001-09-13 08:23:24 +00:00
|
|
|
|
2006-01-10 13:50:54 +00:00
|
|
|
if( pModel && rObj.GetModel() && !IsEmptyPresObj() )
|
2004-05-10 13:33:02 +00:00
|
|
|
{
|
2008-03-05 16:01:19 +00:00
|
|
|
::comphelper::IEmbeddedHelper* pDestPers = pModel->GetPersist();
|
|
|
|
::comphelper::IEmbeddedHelper* pSrcPers = rObj.GetModel()->GetPersist();
|
2004-05-10 13:33:02 +00:00
|
|
|
if( pDestPers && pSrcPers )
|
|
|
|
{
|
2014-07-10 13:08:07 -04:00
|
|
|
DBG_ASSERT( !mpImpl->mxObjRef.is(), "Object already existing!" );
|
2008-03-05 16:01:19 +00:00
|
|
|
comphelper::EmbeddedObjectContainer& rContainer = pSrcPers->getEmbeddedObjectContainer();
|
2005-07-12 11:14:10 +00:00
|
|
|
uno::Reference < embed::XEmbeddedObject > xObj = rContainer.GetEmbeddedObject( mpImpl->aPersistName );
|
|
|
|
if ( xObj.is() )
|
2004-05-10 13:33:02 +00:00
|
|
|
{
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString aTmp;
|
2014-07-10 13:08:07 -04:00
|
|
|
mpImpl->mxObjRef.Assign( pDestPers->getEmbeddedObjectContainer().CopyAndGetEmbeddedObject(
|
2014-06-13 11:12:50 -04:00
|
|
|
rContainer, xObj, aTmp, rSrcShellID, rDestShellID), rOle2Obj.GetAspect());
|
2014-07-10 14:11:02 -04:00
|
|
|
mpImpl->mbTypeAsked = false;
|
2005-07-12 11:14:10 +00:00
|
|
|
mpImpl->aPersistName = aTmp;
|
|
|
|
CheckFileLink_Impl();
|
2004-11-26 15:33:16 +00:00
|
|
|
}
|
2005-07-12 11:14:10 +00:00
|
|
|
|
|
|
|
Connect();
|
2004-05-10 13:33:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2011-03-25 17:33:24 +01:00
|
|
|
return *this;
|
2001-09-10 11:59:59 +00:00
|
|
|
}
|
|
|
|
|
2014-06-13 11:12:50 -04:00
|
|
|
SdrOle2Obj& SdrOle2Obj::operator=(const SdrOle2Obj& rObj)
|
|
|
|
{
|
|
|
|
return assignFrom(rObj, OUString(), OUString());
|
|
|
|
}
|
2004-05-10 13:33:02 +00:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
void SdrOle2Obj::ImpSetVisAreaSize()
|
|
|
|
{
|
2012-11-21 22:06:52 +00:00
|
|
|
// #i118524# do not again set VisAreaSize when the call comes from OLE client (e.g. ObjectAreaChanged)
|
2014-07-10 14:11:02 -04:00
|
|
|
if (mpImpl->mbSuppressSetVisAreaSize)
|
2012-11-21 22:06:52 +00:00
|
|
|
return;
|
|
|
|
|
2006-10-13 10:23:44 +00:00
|
|
|
// currently there is no need to recalculate scaling for iconified objects
|
|
|
|
// TODO/LATER: it might be needed in future when it is possible to change the icon
|
|
|
|
if ( GetAspect() == embed::Aspects::MSOLE_ICON )
|
|
|
|
return;
|
|
|
|
|
2006-11-02 08:51:10 +00:00
|
|
|
// the object area of an embedded object was changed, e.g. by user interaction an a selected object
|
2004-11-26 15:33:16 +00:00
|
|
|
GetObjRef();
|
2014-07-10 13:08:07 -04:00
|
|
|
if (mpImpl->mxObjRef.is())
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2005-03-03 16:34:09 +00:00
|
|
|
OSL_ASSERT( pModel );
|
2014-07-10 13:08:07 -04:00
|
|
|
sal_Int64 nMiscStatus = mpImpl->mxObjRef->getStatus( GetAspect() );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-03-24 12:01:09 +00:00
|
|
|
// the client is required to get access to scaling
|
2014-07-10 13:08:07 -04:00
|
|
|
SfxInPlaceClient* pClient = SfxInPlaceClient::GetClient( dynamic_cast<SfxObjectShell*>(pModel->GetPersist()), mpImpl->mxObjRef.GetObject() );
|
2013-04-07 23:05:56 +09:00
|
|
|
bool bHasOwnClient =
|
2006-10-13 10:23:44 +00:00
|
|
|
( mpImpl->pLightClient
|
2014-07-10 13:08:07 -04:00
|
|
|
&& mpImpl->mxObjRef->getClientSite() == uno::Reference< embed::XEmbeddedClient >( mpImpl->pLightClient ) );
|
2006-10-13 10:23:44 +00:00
|
|
|
|
|
|
|
if ( pClient || bHasOwnClient )
|
2006-03-24 12:01:09 +00:00
|
|
|
{
|
2011-11-28 14:14:12 +01:00
|
|
|
// TODO: IMHO we need to do similar things when object is UIActive or OutplaceActive?!
|
2010-05-10 13:58:53 +02:00
|
|
|
if ( ((nMiscStatus & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) &&
|
2014-07-10 13:08:07 -04:00
|
|
|
svt::EmbeddedObjectRef::TryRunningState( mpImpl->mxObjRef.GetObject() ))
|
|
|
|
|| mpImpl->mxObjRef->getCurrentState() == embed::EmbedStates::INPLACE_ACTIVE
|
2006-11-02 08:51:10 +00:00
|
|
|
)
|
2005-03-15 10:31:56 +00:00
|
|
|
{
|
2014-10-23 17:41:47 +02:00
|
|
|
Fraction aScaleWidth;
|
|
|
|
Fraction aScaleHeight;
|
2006-10-13 10:23:44 +00:00
|
|
|
if ( pClient )
|
|
|
|
{
|
|
|
|
aScaleWidth = pClient->GetScaleWidth();
|
|
|
|
aScaleHeight = pClient->GetScaleHeight();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
aScaleWidth = mpImpl->pLightClient->GetScaleWidth();
|
|
|
|
aScaleHeight = mpImpl->pLightClient->GetScaleHeight();
|
|
|
|
}
|
|
|
|
|
2006-11-02 08:51:10 +00:00
|
|
|
// The object wants to resize itself (f.e. Chart wants to recalculate the layout)
|
|
|
|
// or object is inplace active and so has a window that must be resized also
|
|
|
|
// In these cases the change in the object area size will be reflected in a change of the
|
|
|
|
// objects' visual area. The scaling will not change, but it might exist already and must
|
|
|
|
// be used in calculations
|
2014-07-10 13:08:07 -04:00
|
|
|
MapUnit aMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( mpImpl->mxObjRef->getMapUnit( GetAspect() ) );
|
2014-10-29 15:01:37 -04:00
|
|
|
Size aVisSize( (long)( Fraction( maRect.GetWidth() ) / aScaleWidth ),
|
|
|
|
(long)( Fraction( maRect.GetHeight() ) / aScaleHeight ) );
|
2005-03-15 10:31:56 +00:00
|
|
|
|
2006-03-24 12:01:09 +00:00
|
|
|
aVisSize = OutputDevice::LogicToLogic( aVisSize, pModel->GetScaleUnit(), aMapUnit);
|
|
|
|
awt::Size aSz;
|
|
|
|
aSz.Width = aVisSize.Width();
|
|
|
|
aSz.Height = aVisSize.Height();
|
2014-07-10 13:08:07 -04:00
|
|
|
mpImpl->mxObjRef->setVisualAreaSize( GetAspect(), aSz );
|
2004-10-04 16:54:47 +00:00
|
|
|
|
2006-03-24 12:01:09 +00:00
|
|
|
try
|
|
|
|
{
|
2014-07-10 13:08:07 -04:00
|
|
|
aSz = mpImpl->mxObjRef->getVisualAreaSize( GetAspect() );
|
2006-03-24 12:01:09 +00:00
|
|
|
}
|
|
|
|
catch( embed::NoVisualAreaSizeException& )
|
|
|
|
{}
|
|
|
|
|
|
|
|
Rectangle aAcceptedVisArea;
|
2014-10-23 17:41:47 +02:00
|
|
|
aAcceptedVisArea.SetSize( Size( (long)( Fraction( long( aSz.Width ) ) * aScaleWidth ),
|
|
|
|
(long)( Fraction( long( aSz.Height ) ) * aScaleHeight ) ) );
|
2006-03-24 12:01:09 +00:00
|
|
|
if (aVisSize != aAcceptedVisArea.GetSize())
|
|
|
|
{
|
2006-11-02 08:51:10 +00:00
|
|
|
// server changed VisArea to its liking and the VisArea is different than the suggested one
|
|
|
|
// store the new value as given by the object
|
2014-07-10 13:08:07 -04:00
|
|
|
MapUnit aNewMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( mpImpl->mxObjRef->getMapUnit( GetAspect() ) );
|
2014-10-29 15:01:37 -04:00
|
|
|
maRect.SetSize(OutputDevice::LogicToLogic( aAcceptedVisArea.GetSize(), aNewMapUnit, pModel->GetScaleUnit()));
|
2006-03-24 12:01:09 +00:00
|
|
|
}
|
|
|
|
|
2006-11-02 08:51:10 +00:00
|
|
|
// make the new object area known to the client
|
|
|
|
// compared to the "else" branch aRect might have been changed by the object and no additional scaling was applied
|
2011-05-12 11:03:28 +02:00
|
|
|
// WHY this -> OSL_ASSERT( pClient );
|
2007-05-22 14:20:35 +00:00
|
|
|
if( pClient )
|
2014-10-29 15:01:37 -04:00
|
|
|
pClient->SetObjArea(maRect);
|
2006-11-02 08:51:10 +00:00
|
|
|
|
|
|
|
// we need a new replacement image as the object has resized itself
|
2008-01-14 12:53:12 +00:00
|
|
|
|
|
|
|
//#i79578# don't request a new replacement image for charts to often
|
|
|
|
//a chart sends a modified call to the framework if it was changed
|
|
|
|
//thus the replacement update is already handled there
|
|
|
|
if( !IsChart() )
|
2014-07-10 13:08:07 -04:00
|
|
|
mpImpl->mxObjRef.UpdateReplacement();
|
2006-03-24 12:01:09 +00:00
|
|
|
}
|
|
|
|
else
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-11-02 08:51:10 +00:00
|
|
|
// The object isn't active and does not want to resize itself so the changed object area size
|
|
|
|
// will be reflected in a changed object scaling
|
2014-10-23 17:41:47 +02:00
|
|
|
Fraction aScaleWidth;
|
|
|
|
Fraction aScaleHeight;
|
2006-10-13 10:23:44 +00:00
|
|
|
Size aObjAreaSize;
|
|
|
|
if ( CalculateNewScaling( aScaleWidth, aScaleHeight, aObjAreaSize ) )
|
2005-03-15 10:31:56 +00:00
|
|
|
{
|
2006-10-13 10:23:44 +00:00
|
|
|
if ( pClient )
|
|
|
|
{
|
2014-10-29 15:01:37 -04:00
|
|
|
Rectangle aScaleRect(maRect.TopLeft(), aObjAreaSize);
|
2006-12-19 13:00:07 +00:00
|
|
|
pClient->SetObjAreaAndScale( aScaleRect, aScaleWidth, aScaleHeight);
|
2006-10-13 10:23:44 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
mpImpl->pLightClient->SetSizeScale( aScaleWidth, aScaleHeight );
|
|
|
|
}
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
2008-01-14 12:53:12 +00:00
|
|
|
else if( (nMiscStatus & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) &&
|
2014-07-10 13:08:07 -04:00
|
|
|
svt::EmbeddedObjectRef::TryRunningState( mpImpl->mxObjRef.GetObject() ) )
|
2008-01-14 12:53:12 +00:00
|
|
|
{
|
|
|
|
//also handle not sfx based ole objects e.g. charts
|
|
|
|
//#i83860# resizing charts in impress distorts fonts
|
|
|
|
uno::Reference< embed::XVisualObject > xVisualObject( this->getXModel(), uno::UNO_QUERY );
|
|
|
|
if( xVisualObject.is() )
|
|
|
|
{
|
2014-07-10 13:08:07 -04:00
|
|
|
MapUnit aMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( mpImpl->mxObjRef->getMapUnit( GetAspect() ) );
|
2014-10-29 15:01:37 -04:00
|
|
|
Point aTL( maRect.TopLeft() );
|
|
|
|
Point aBR( maRect.BottomRight() );
|
2008-01-14 12:53:12 +00:00
|
|
|
Point aTL2( OutputDevice::LogicToLogic( aTL, pModel->GetScaleUnit(), aMapUnit) );
|
|
|
|
Point aBR2( OutputDevice::LogicToLogic( aBR, pModel->GetScaleUnit(), aMapUnit) );
|
|
|
|
Rectangle aNewRect( aTL2, aBR2 );
|
|
|
|
xVisualObject->setVisualAreaSize( GetAspect(), awt::Size( aNewRect.GetWidth(), aNewRect.GetHeight() ) );
|
|
|
|
}
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-09-10 11:59:59 +00:00
|
|
|
|
2014-10-23 17:41:47 +02:00
|
|
|
void SdrOle2Obj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2007-11-26 12:35:35 +00:00
|
|
|
if( pModel && !pModel->isLocked() )
|
|
|
|
{
|
|
|
|
GetObjRef();
|
2014-07-10 13:08:07 -04:00
|
|
|
if ( mpImpl->mxObjRef.is() && ( mpImpl->mxObjRef->getStatus( GetAspect() ) & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE ) )
|
2007-11-26 12:35:35 +00:00
|
|
|
{
|
|
|
|
// if the object needs recompose on resize
|
|
|
|
// the client site should be created before the resize will take place
|
|
|
|
// check whether there is no client site and create it if necessary
|
2010-06-01 17:15:33 +02:00
|
|
|
AddOwnLightClient();
|
2007-11-26 12:35:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
SdrRectObj::NbcResize(rRef,xFact,yFact);
|
2005-03-03 16:34:09 +00:00
|
|
|
if( pModel && !pModel->isLocked() )
|
2001-07-24 07:51:46 +00:00
|
|
|
ImpSetVisAreaSize();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-09-10 11:59:59 +00:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
void SdrOle2Obj::SetGeoData(const SdrObjGeoData& rGeo)
|
|
|
|
{
|
|
|
|
SdrRectObj::SetGeoData(rGeo);
|
2012-11-21 22:06:52 +00:00
|
|
|
|
2005-03-03 16:34:09 +00:00
|
|
|
if( pModel && !pModel->isLocked() )
|
2001-07-24 07:51:46 +00:00
|
|
|
ImpSetVisAreaSize();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-09-10 11:59:59 +00:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
void SdrOle2Obj::NbcSetSnapRect(const Rectangle& rRect)
|
|
|
|
{
|
|
|
|
SdrRectObj::NbcSetSnapRect(rRect);
|
2012-11-21 22:06:52 +00:00
|
|
|
|
2005-03-03 16:34:09 +00:00
|
|
|
if( pModel && !pModel->isLocked() )
|
2001-07-24 07:51:46 +00:00
|
|
|
ImpSetVisAreaSize();
|
2009-09-14 10:57:16 +00:00
|
|
|
|
2014-07-10 13:08:07 -04:00
|
|
|
if ( mpImpl->mxObjRef.is() && IsChart() )
|
2009-09-14 10:57:16 +00:00
|
|
|
{
|
2012-02-02 11:40:51 +01:00
|
|
|
//#i103460# charts do not necessarily have an own size within ODF files,
|
2009-09-14 10:57:16 +00:00
|
|
|
//for this case they need to use the size settings from the surrounding frame,
|
|
|
|
//which is made available with this method as there is no other way
|
2014-07-10 13:08:07 -04:00
|
|
|
mpImpl->mxObjRef.SetDefaultSizeForChart( Size( rRect.GetWidth(), rRect.GetHeight() ) );
|
2009-09-14 10:57:16 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-09-10 11:59:59 +00:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
void SdrOle2Obj::NbcSetLogicRect(const Rectangle& rRect)
|
|
|
|
{
|
|
|
|
SdrRectObj::NbcSetLogicRect(rRect);
|
2012-11-21 22:06:52 +00:00
|
|
|
|
2005-03-03 16:34:09 +00:00
|
|
|
if( pModel && !pModel->isLocked() )
|
2001-07-24 07:51:46 +00:00
|
|
|
ImpSetVisAreaSize();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2013-01-17 14:28:41 -05:00
|
|
|
const Graphic* SdrOle2Obj::GetGraphic() const
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-07-10 13:08:07 -04:00
|
|
|
if ( mpImpl->mxObjRef.is() )
|
|
|
|
return mpImpl->mxObjRef.GetGraphic();
|
2014-07-10 13:48:36 -04:00
|
|
|
return mpImpl->mpGraphic;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2004-10-04 16:54:47 +00:00
|
|
|
void SdrOle2Obj::GetNewReplacement()
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-07-10 13:08:07 -04:00
|
|
|
if ( mpImpl->mxObjRef.is() )
|
|
|
|
mpImpl->mxObjRef.UpdateReplacement();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-09-10 11:59:59 +00:00
|
|
|
|
2006-10-13 10:23:44 +00:00
|
|
|
Size SdrOle2Obj::GetOrigObjSize( MapMode* pTargetMapMode ) const
|
|
|
|
{
|
2014-07-10 13:08:07 -04:00
|
|
|
return mpImpl->mxObjRef.GetSize( pTargetMapMode );
|
2006-10-13 10:23:44 +00:00
|
|
|
}
|
|
|
|
|
2014-07-10 14:11:02 -04:00
|
|
|
void SdrOle2Obj::setSuppressSetVisAreaSize( bool bNew )
|
|
|
|
{
|
|
|
|
mpImpl->mbSuppressSetVisAreaSize = bNew;
|
|
|
|
}
|
2006-10-13 10:23:44 +00:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
void SdrOle2Obj::NbcMove(const Size& rSize)
|
|
|
|
{
|
|
|
|
SdrRectObj::NbcMove(rSize);
|
2012-11-21 22:06:52 +00:00
|
|
|
|
2005-03-03 16:34:09 +00:00
|
|
|
if( pModel && !pModel->isLocked() )
|
2001-07-24 07:51:46 +00:00
|
|
|
ImpSetVisAreaSize();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-09-10 11:59:59 +00:00
|
|
|
|
2014-03-10 11:09:59 +02:00
|
|
|
bool SdrOle2Obj::CanUnloadRunningObj( const uno::Reference< embed::XEmbeddedObject >& xObj, sal_Int64 nAspect )
|
2006-02-01 18:02:05 +00:00
|
|
|
{
|
2014-07-11 10:50:29 -04:00
|
|
|
uno::Reference<embed::XEmbedPersist2> xPersist(xObj, uno::UNO_QUERY);
|
|
|
|
if (xPersist.is())
|
|
|
|
{
|
|
|
|
if (!xPersist->isStored())
|
|
|
|
// It doesn't have persistent storage. We can't unload this.
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2014-03-10 11:09:59 +02:00
|
|
|
bool bResult = false;
|
2006-02-01 18:02:05 +00:00
|
|
|
|
|
|
|
sal_Int32 nState = xObj->getCurrentState();
|
|
|
|
if ( nState == embed::EmbedStates::LOADED )
|
|
|
|
{
|
CWS-TOOLING: integrate CWS fwk103
2009-05-26 12:44:25 +0200 mst r272292 : #i100727#
- svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx:
+ fix warning: rename method to prevent overloading
2009-05-19 13:42:31 +0200 mav r272075 : #i101356# add comment
2009-05-19 10:56:24 +0200 mav r272062 : #i101356# register the singleton correctly
2009-05-19 10:25:42 +0200 mav r272060 : #i101356# register the singleton correctly
2009-05-18 12:48:48 +0200 mav r272013 : #i91306# fix the typo
2009-05-14 08:50:06 +0200 mav r271871 : #i101356# reduce the amount of macros
2009-05-13 13:26:08 +0200 mav r271858 : #i101356# reduce the amount of macros
2009-05-13 11:29:16 +0200 mav r271849 : #i101356# reduce the amount of macros
2009-05-12 12:09:42 +0200 mav r271815 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 12:03:20 +0200 mav r271814 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:58:48 +0200 mav r271813 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:53:05 +0200 mav r271812 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:48:36 +0200 mav r271810 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:43:45 +0200 mav r271809 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:39:38 +0200 mav r271808 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:37:38 +0200 mav r271806 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:33:58 +0200 mav r271805 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:30:01 +0200 mav r271804 : #i101356# allow to generate a small log if a document can not be stored
2009-05-06 17:43:38 +0200 mst r271607 : #i100727#
- svtools/source/svhtml/parhtml.cxx:
+ adapt code to renaming of HTML constants (sb107)
2009-05-05 11:14:18 +0200 mav r271507 : #i101222# avoid warning
2009-05-05 10:27:23 +0200 mav r271505 : #i101426# send the modified() notification only when the document can be modified
2009-05-05 10:25:07 +0200 mav r271504 : #i101426# send the modified() notification only when the document is modified
2009-05-05 08:42:48 +0200 mav r271497 : CWS-TOOLING: rebase CWS fwk103 to trunk@271427 (milestone: DEV300:m47)
2009-04-30 13:32:11 +0200 mav r271412 : #i100518# check the template folders quietly
2009-04-29 20:04:25 +0200 mst r271393 : - sw/source/filter/html/swhtml.cxx:
+ fix wrong initialization order in constructor
2009-04-28 12:28:46 +0200 mav r271319 : #i99142# set the error correctly
2009-04-28 08:44:48 +0200 mav r271305 : #i99050# clear hidden flag if necessary
2009-04-28 08:40:10 +0200 mav r271304 : #i99050# avoid crash
2009-04-22 07:40:11 +0200 mav r271056 : #i101093# lets not affect the performance
2009-04-15 09:30:47 +0200 cd r270820 : #i99771# Fix warnings for gcc 4.4
2009-04-15 09:19:52 +0200 cd r270819 : #i99771# Fix warnings for gcc 4.4
2009-04-15 08:42:34 +0200 cd r270817 : #i99771# Fix warnings for gcc 4.4
2009-04-14 14:31:01 +0200 mav r270768 : #i99493# fix typo
2009-04-01 12:45:43 +0200 mst r270317 : fix #i100727#
- svtools/inc/svtools/svparser.hxx, svtools/source/svrtf/svparser.cxx,
sfx2/inc/sfx2/docfile.hxx, sfx2/source/doc/{objmisc.cxx,docfile.cxx}:
+ move SvKeyValue stuff from sfx2 to svtools
- svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx,
sfx2/inc/sfx2/sfxhtml.hxx, sfx2/source/bastyp/sfxhtml.cxx:
+ move ParseMetaOptions() and GetEncodingByMIME() from SfxHTMLParser (sfx2)
to HTMLParser (svtools)
+ make HTMLParser::ParseMetaOptions() a virtual function
+ HTMLParser::ParseMetaOptions() calls GetExtendedCompatibilityTextEncoding()
+ new template method HTMLParser::AddMetaUserDefined()
- svtools/source/svhtml/makefile.mk:
+ enable exceptions for parhtml.cxx
- dbaccess/source/ui/misc/HtmlReader.cxx,
sc/source/filter/html/htmlpars.cxx:
+ remove encoding related code duplication
- sw/source/filter/html/{swhtml{.hxx,.cxx},htmlfld.cxx}:
+ new SwHTMLParser::AddMetaUserDefined() for import of
DOCINFO field subtypes INFO[1-4]
+ do not use DocumentInfo for import of DOCINFO field subtypes INFO[1-4]
2009-03-31 17:01:35 +0200 mav r270288 : #i91214# fix typo
2009-03-31 15:19:41 +0200 mav r270285 : #i100123# allow to turn OOo locking mechanics off
2009-03-31 15:00:36 +0200 mav r270284 : #i100123# allow to turn OOo locking mechanics off
2009-03-31 12:19:13 +0200 mav r270270 : #i100123# taking the lock file over throws no exception
2009-03-30 13:57:21 +0200 mav r270227 : #i100351# fix the typo
2009-03-30 13:47:26 +0200 mav r270225 : #i99885# let OK be default button
2009-03-29 19:38:55 +0200 mav r270190 : CWS-TOOLING: rebase CWS fwk103 to trunk@270033 (milestone: DEV300:m45)
2009-03-16 16:39:48 +0100 mav r269558 : #i93558# convert the attributes as well
2009-03-13 15:35:55 +0100 mav r269488 : #i93558# improve manifest.xml parsing
2009-03-13 08:47:00 +0100 mav r269454 : #i96205# allow to remove password on SaveAs
2009-03-12 13:36:07 +0100 mav r269398 : #i91306# show special error in case of shared document
2009-03-12 13:33:35 +0100 mav r269397 : #i91306# introduce the new error-message
2009-03-12 11:40:42 +0100 mst r269378 : fix #i90877#
- svtools/source/uno/unoevent.cxx:
+ use proper operator delete[]
2009-02-26 15:23:10 +0100 mav r268526 : #i91214# do not use ATL
2009-02-26 14:19:06 +0100 mav r268516 : #i98909# integrate the patch
2009-02-10 17:29:52 +0100 cd r267568 : #i98649# Make sure that we catch the NoSuchElementException when a module is not installed.
2009-06-16 16:15:54 +00:00
|
|
|
// the object is already unloaded
|
2014-03-10 11:09:59 +02:00
|
|
|
bResult = true;
|
2006-02-01 18:02:05 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
uno::Reference < util::XModifiable > xModifiable( xObj->getComponent(), uno::UNO_QUERY );
|
CWS-TOOLING: integrate CWS fwk103
2009-05-26 12:44:25 +0200 mst r272292 : #i100727#
- svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx:
+ fix warning: rename method to prevent overloading
2009-05-19 13:42:31 +0200 mav r272075 : #i101356# add comment
2009-05-19 10:56:24 +0200 mav r272062 : #i101356# register the singleton correctly
2009-05-19 10:25:42 +0200 mav r272060 : #i101356# register the singleton correctly
2009-05-18 12:48:48 +0200 mav r272013 : #i91306# fix the typo
2009-05-14 08:50:06 +0200 mav r271871 : #i101356# reduce the amount of macros
2009-05-13 13:26:08 +0200 mav r271858 : #i101356# reduce the amount of macros
2009-05-13 11:29:16 +0200 mav r271849 : #i101356# reduce the amount of macros
2009-05-12 12:09:42 +0200 mav r271815 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 12:03:20 +0200 mav r271814 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:58:48 +0200 mav r271813 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:53:05 +0200 mav r271812 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:48:36 +0200 mav r271810 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:43:45 +0200 mav r271809 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:39:38 +0200 mav r271808 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:37:38 +0200 mav r271806 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:33:58 +0200 mav r271805 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:30:01 +0200 mav r271804 : #i101356# allow to generate a small log if a document can not be stored
2009-05-06 17:43:38 +0200 mst r271607 : #i100727#
- svtools/source/svhtml/parhtml.cxx:
+ adapt code to renaming of HTML constants (sb107)
2009-05-05 11:14:18 +0200 mav r271507 : #i101222# avoid warning
2009-05-05 10:27:23 +0200 mav r271505 : #i101426# send the modified() notification only when the document can be modified
2009-05-05 10:25:07 +0200 mav r271504 : #i101426# send the modified() notification only when the document is modified
2009-05-05 08:42:48 +0200 mav r271497 : CWS-TOOLING: rebase CWS fwk103 to trunk@271427 (milestone: DEV300:m47)
2009-04-30 13:32:11 +0200 mav r271412 : #i100518# check the template folders quietly
2009-04-29 20:04:25 +0200 mst r271393 : - sw/source/filter/html/swhtml.cxx:
+ fix wrong initialization order in constructor
2009-04-28 12:28:46 +0200 mav r271319 : #i99142# set the error correctly
2009-04-28 08:44:48 +0200 mav r271305 : #i99050# clear hidden flag if necessary
2009-04-28 08:40:10 +0200 mav r271304 : #i99050# avoid crash
2009-04-22 07:40:11 +0200 mav r271056 : #i101093# lets not affect the performance
2009-04-15 09:30:47 +0200 cd r270820 : #i99771# Fix warnings for gcc 4.4
2009-04-15 09:19:52 +0200 cd r270819 : #i99771# Fix warnings for gcc 4.4
2009-04-15 08:42:34 +0200 cd r270817 : #i99771# Fix warnings for gcc 4.4
2009-04-14 14:31:01 +0200 mav r270768 : #i99493# fix typo
2009-04-01 12:45:43 +0200 mst r270317 : fix #i100727#
- svtools/inc/svtools/svparser.hxx, svtools/source/svrtf/svparser.cxx,
sfx2/inc/sfx2/docfile.hxx, sfx2/source/doc/{objmisc.cxx,docfile.cxx}:
+ move SvKeyValue stuff from sfx2 to svtools
- svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx,
sfx2/inc/sfx2/sfxhtml.hxx, sfx2/source/bastyp/sfxhtml.cxx:
+ move ParseMetaOptions() and GetEncodingByMIME() from SfxHTMLParser (sfx2)
to HTMLParser (svtools)
+ make HTMLParser::ParseMetaOptions() a virtual function
+ HTMLParser::ParseMetaOptions() calls GetExtendedCompatibilityTextEncoding()
+ new template method HTMLParser::AddMetaUserDefined()
- svtools/source/svhtml/makefile.mk:
+ enable exceptions for parhtml.cxx
- dbaccess/source/ui/misc/HtmlReader.cxx,
sc/source/filter/html/htmlpars.cxx:
+ remove encoding related code duplication
- sw/source/filter/html/{swhtml{.hxx,.cxx},htmlfld.cxx}:
+ new SwHTMLParser::AddMetaUserDefined() for import of
DOCINFO field subtypes INFO[1-4]
+ do not use DocumentInfo for import of DOCINFO field subtypes INFO[1-4]
2009-03-31 17:01:35 +0200 mav r270288 : #i91214# fix typo
2009-03-31 15:19:41 +0200 mav r270285 : #i100123# allow to turn OOo locking mechanics off
2009-03-31 15:00:36 +0200 mav r270284 : #i100123# allow to turn OOo locking mechanics off
2009-03-31 12:19:13 +0200 mav r270270 : #i100123# taking the lock file over throws no exception
2009-03-30 13:57:21 +0200 mav r270227 : #i100351# fix the typo
2009-03-30 13:47:26 +0200 mav r270225 : #i99885# let OK be default button
2009-03-29 19:38:55 +0200 mav r270190 : CWS-TOOLING: rebase CWS fwk103 to trunk@270033 (milestone: DEV300:m45)
2009-03-16 16:39:48 +0100 mav r269558 : #i93558# convert the attributes as well
2009-03-13 15:35:55 +0100 mav r269488 : #i93558# improve manifest.xml parsing
2009-03-13 08:47:00 +0100 mav r269454 : #i96205# allow to remove password on SaveAs
2009-03-12 13:36:07 +0100 mav r269398 : #i91306# show special error in case of shared document
2009-03-12 13:33:35 +0100 mav r269397 : #i91306# introduce the new error-message
2009-03-12 11:40:42 +0100 mst r269378 : fix #i90877#
- svtools/source/uno/unoevent.cxx:
+ use proper operator delete[]
2009-02-26 15:23:10 +0100 mav r268526 : #i91214# do not use ATL
2009-02-26 14:19:06 +0100 mav r268516 : #i98909# integrate the patch
2009-02-10 17:29:52 +0100 cd r267568 : #i98649# Make sure that we catch the NoSuchElementException when a module is not installed.
2009-06-16 16:15:54 +00:00
|
|
|
if ( !xModifiable.is() )
|
2014-03-10 11:09:59 +02:00
|
|
|
bResult = true;
|
CWS-TOOLING: integrate CWS fwk103
2009-05-26 12:44:25 +0200 mst r272292 : #i100727#
- svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx:
+ fix warning: rename method to prevent overloading
2009-05-19 13:42:31 +0200 mav r272075 : #i101356# add comment
2009-05-19 10:56:24 +0200 mav r272062 : #i101356# register the singleton correctly
2009-05-19 10:25:42 +0200 mav r272060 : #i101356# register the singleton correctly
2009-05-18 12:48:48 +0200 mav r272013 : #i91306# fix the typo
2009-05-14 08:50:06 +0200 mav r271871 : #i101356# reduce the amount of macros
2009-05-13 13:26:08 +0200 mav r271858 : #i101356# reduce the amount of macros
2009-05-13 11:29:16 +0200 mav r271849 : #i101356# reduce the amount of macros
2009-05-12 12:09:42 +0200 mav r271815 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 12:03:20 +0200 mav r271814 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:58:48 +0200 mav r271813 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:53:05 +0200 mav r271812 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:48:36 +0200 mav r271810 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:43:45 +0200 mav r271809 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:39:38 +0200 mav r271808 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:37:38 +0200 mav r271806 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:33:58 +0200 mav r271805 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:30:01 +0200 mav r271804 : #i101356# allow to generate a small log if a document can not be stored
2009-05-06 17:43:38 +0200 mst r271607 : #i100727#
- svtools/source/svhtml/parhtml.cxx:
+ adapt code to renaming of HTML constants (sb107)
2009-05-05 11:14:18 +0200 mav r271507 : #i101222# avoid warning
2009-05-05 10:27:23 +0200 mav r271505 : #i101426# send the modified() notification only when the document can be modified
2009-05-05 10:25:07 +0200 mav r271504 : #i101426# send the modified() notification only when the document is modified
2009-05-05 08:42:48 +0200 mav r271497 : CWS-TOOLING: rebase CWS fwk103 to trunk@271427 (milestone: DEV300:m47)
2009-04-30 13:32:11 +0200 mav r271412 : #i100518# check the template folders quietly
2009-04-29 20:04:25 +0200 mst r271393 : - sw/source/filter/html/swhtml.cxx:
+ fix wrong initialization order in constructor
2009-04-28 12:28:46 +0200 mav r271319 : #i99142# set the error correctly
2009-04-28 08:44:48 +0200 mav r271305 : #i99050# clear hidden flag if necessary
2009-04-28 08:40:10 +0200 mav r271304 : #i99050# avoid crash
2009-04-22 07:40:11 +0200 mav r271056 : #i101093# lets not affect the performance
2009-04-15 09:30:47 +0200 cd r270820 : #i99771# Fix warnings for gcc 4.4
2009-04-15 09:19:52 +0200 cd r270819 : #i99771# Fix warnings for gcc 4.4
2009-04-15 08:42:34 +0200 cd r270817 : #i99771# Fix warnings for gcc 4.4
2009-04-14 14:31:01 +0200 mav r270768 : #i99493# fix typo
2009-04-01 12:45:43 +0200 mst r270317 : fix #i100727#
- svtools/inc/svtools/svparser.hxx, svtools/source/svrtf/svparser.cxx,
sfx2/inc/sfx2/docfile.hxx, sfx2/source/doc/{objmisc.cxx,docfile.cxx}:
+ move SvKeyValue stuff from sfx2 to svtools
- svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx,
sfx2/inc/sfx2/sfxhtml.hxx, sfx2/source/bastyp/sfxhtml.cxx:
+ move ParseMetaOptions() and GetEncodingByMIME() from SfxHTMLParser (sfx2)
to HTMLParser (svtools)
+ make HTMLParser::ParseMetaOptions() a virtual function
+ HTMLParser::ParseMetaOptions() calls GetExtendedCompatibilityTextEncoding()
+ new template method HTMLParser::AddMetaUserDefined()
- svtools/source/svhtml/makefile.mk:
+ enable exceptions for parhtml.cxx
- dbaccess/source/ui/misc/HtmlReader.cxx,
sc/source/filter/html/htmlpars.cxx:
+ remove encoding related code duplication
- sw/source/filter/html/{swhtml{.hxx,.cxx},htmlfld.cxx}:
+ new SwHTMLParser::AddMetaUserDefined() for import of
DOCINFO field subtypes INFO[1-4]
+ do not use DocumentInfo for import of DOCINFO field subtypes INFO[1-4]
2009-03-31 17:01:35 +0200 mav r270288 : #i91214# fix typo
2009-03-31 15:19:41 +0200 mav r270285 : #i100123# allow to turn OOo locking mechanics off
2009-03-31 15:00:36 +0200 mav r270284 : #i100123# allow to turn OOo locking mechanics off
2009-03-31 12:19:13 +0200 mav r270270 : #i100123# taking the lock file over throws no exception
2009-03-30 13:57:21 +0200 mav r270227 : #i100351# fix the typo
2009-03-30 13:47:26 +0200 mav r270225 : #i99885# let OK be default button
2009-03-29 19:38:55 +0200 mav r270190 : CWS-TOOLING: rebase CWS fwk103 to trunk@270033 (milestone: DEV300:m45)
2009-03-16 16:39:48 +0100 mav r269558 : #i93558# convert the attributes as well
2009-03-13 15:35:55 +0100 mav r269488 : #i93558# improve manifest.xml parsing
2009-03-13 08:47:00 +0100 mav r269454 : #i96205# allow to remove password on SaveAs
2009-03-12 13:36:07 +0100 mav r269398 : #i91306# show special error in case of shared document
2009-03-12 13:33:35 +0100 mav r269397 : #i91306# introduce the new error-message
2009-03-12 11:40:42 +0100 mst r269378 : fix #i90877#
- svtools/source/uno/unoevent.cxx:
+ use proper operator delete[]
2009-02-26 15:23:10 +0100 mav r268526 : #i91214# do not use ATL
2009-02-26 14:19:06 +0100 mav r268516 : #i98909# integrate the patch
2009-02-10 17:29:52 +0100 cd r267568 : #i98649# Make sure that we catch the NoSuchElementException when a module is not installed.
2009-06-16 16:15:54 +00:00
|
|
|
else
|
2006-02-01 18:02:05 +00:00
|
|
|
{
|
CWS-TOOLING: integrate CWS fwk103
2009-05-26 12:44:25 +0200 mst r272292 : #i100727#
- svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx:
+ fix warning: rename method to prevent overloading
2009-05-19 13:42:31 +0200 mav r272075 : #i101356# add comment
2009-05-19 10:56:24 +0200 mav r272062 : #i101356# register the singleton correctly
2009-05-19 10:25:42 +0200 mav r272060 : #i101356# register the singleton correctly
2009-05-18 12:48:48 +0200 mav r272013 : #i91306# fix the typo
2009-05-14 08:50:06 +0200 mav r271871 : #i101356# reduce the amount of macros
2009-05-13 13:26:08 +0200 mav r271858 : #i101356# reduce the amount of macros
2009-05-13 11:29:16 +0200 mav r271849 : #i101356# reduce the amount of macros
2009-05-12 12:09:42 +0200 mav r271815 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 12:03:20 +0200 mav r271814 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:58:48 +0200 mav r271813 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:53:05 +0200 mav r271812 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:48:36 +0200 mav r271810 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:43:45 +0200 mav r271809 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:39:38 +0200 mav r271808 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:37:38 +0200 mav r271806 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:33:58 +0200 mav r271805 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:30:01 +0200 mav r271804 : #i101356# allow to generate a small log if a document can not be stored
2009-05-06 17:43:38 +0200 mst r271607 : #i100727#
- svtools/source/svhtml/parhtml.cxx:
+ adapt code to renaming of HTML constants (sb107)
2009-05-05 11:14:18 +0200 mav r271507 : #i101222# avoid warning
2009-05-05 10:27:23 +0200 mav r271505 : #i101426# send the modified() notification only when the document can be modified
2009-05-05 10:25:07 +0200 mav r271504 : #i101426# send the modified() notification only when the document is modified
2009-05-05 08:42:48 +0200 mav r271497 : CWS-TOOLING: rebase CWS fwk103 to trunk@271427 (milestone: DEV300:m47)
2009-04-30 13:32:11 +0200 mav r271412 : #i100518# check the template folders quietly
2009-04-29 20:04:25 +0200 mst r271393 : - sw/source/filter/html/swhtml.cxx:
+ fix wrong initialization order in constructor
2009-04-28 12:28:46 +0200 mav r271319 : #i99142# set the error correctly
2009-04-28 08:44:48 +0200 mav r271305 : #i99050# clear hidden flag if necessary
2009-04-28 08:40:10 +0200 mav r271304 : #i99050# avoid crash
2009-04-22 07:40:11 +0200 mav r271056 : #i101093# lets not affect the performance
2009-04-15 09:30:47 +0200 cd r270820 : #i99771# Fix warnings for gcc 4.4
2009-04-15 09:19:52 +0200 cd r270819 : #i99771# Fix warnings for gcc 4.4
2009-04-15 08:42:34 +0200 cd r270817 : #i99771# Fix warnings for gcc 4.4
2009-04-14 14:31:01 +0200 mav r270768 : #i99493# fix typo
2009-04-01 12:45:43 +0200 mst r270317 : fix #i100727#
- svtools/inc/svtools/svparser.hxx, svtools/source/svrtf/svparser.cxx,
sfx2/inc/sfx2/docfile.hxx, sfx2/source/doc/{objmisc.cxx,docfile.cxx}:
+ move SvKeyValue stuff from sfx2 to svtools
- svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx,
sfx2/inc/sfx2/sfxhtml.hxx, sfx2/source/bastyp/sfxhtml.cxx:
+ move ParseMetaOptions() and GetEncodingByMIME() from SfxHTMLParser (sfx2)
to HTMLParser (svtools)
+ make HTMLParser::ParseMetaOptions() a virtual function
+ HTMLParser::ParseMetaOptions() calls GetExtendedCompatibilityTextEncoding()
+ new template method HTMLParser::AddMetaUserDefined()
- svtools/source/svhtml/makefile.mk:
+ enable exceptions for parhtml.cxx
- dbaccess/source/ui/misc/HtmlReader.cxx,
sc/source/filter/html/htmlpars.cxx:
+ remove encoding related code duplication
- sw/source/filter/html/{swhtml{.hxx,.cxx},htmlfld.cxx}:
+ new SwHTMLParser::AddMetaUserDefined() for import of
DOCINFO field subtypes INFO[1-4]
+ do not use DocumentInfo for import of DOCINFO field subtypes INFO[1-4]
2009-03-31 17:01:35 +0200 mav r270288 : #i91214# fix typo
2009-03-31 15:19:41 +0200 mav r270285 : #i100123# allow to turn OOo locking mechanics off
2009-03-31 15:00:36 +0200 mav r270284 : #i100123# allow to turn OOo locking mechanics off
2009-03-31 12:19:13 +0200 mav r270270 : #i100123# taking the lock file over throws no exception
2009-03-30 13:57:21 +0200 mav r270227 : #i100351# fix the typo
2009-03-30 13:47:26 +0200 mav r270225 : #i99885# let OK be default button
2009-03-29 19:38:55 +0200 mav r270190 : CWS-TOOLING: rebase CWS fwk103 to trunk@270033 (milestone: DEV300:m45)
2009-03-16 16:39:48 +0100 mav r269558 : #i93558# convert the attributes as well
2009-03-13 15:35:55 +0100 mav r269488 : #i93558# improve manifest.xml parsing
2009-03-13 08:47:00 +0100 mav r269454 : #i96205# allow to remove password on SaveAs
2009-03-12 13:36:07 +0100 mav r269398 : #i91306# show special error in case of shared document
2009-03-12 13:33:35 +0100 mav r269397 : #i91306# introduce the new error-message
2009-03-12 11:40:42 +0100 mst r269378 : fix #i90877#
- svtools/source/uno/unoevent.cxx:
+ use proper operator delete[]
2009-02-26 15:23:10 +0100 mav r268526 : #i91214# do not use ATL
2009-02-26 14:19:06 +0100 mav r268516 : #i98909# integrate the patch
2009-02-10 17:29:52 +0100 cd r267568 : #i98649# Make sure that we catch the NoSuchElementException when a module is not installed.
2009-06-16 16:15:54 +00:00
|
|
|
sal_Int64 nMiscStatus = xObj->getStatus( nAspect );
|
|
|
|
|
|
|
|
if ( embed::EmbedMisc::MS_EMBED_ALWAYSRUN != ( nMiscStatus & embed::EmbedMisc::MS_EMBED_ALWAYSRUN ) &&
|
|
|
|
embed::EmbedMisc::EMBED_ACTIVATEIMMEDIATELY != ( nMiscStatus & embed::EmbedMisc::EMBED_ACTIVATEIMMEDIATELY ) &&
|
|
|
|
!( xModifiable.is() && xModifiable->isModified() ) &&
|
|
|
|
!( nState == embed::EmbedStates::INPLACE_ACTIVE || nState == embed::EmbedStates::UI_ACTIVE || nState == embed::EmbedStates::ACTIVE ) )
|
2006-02-01 18:02:05 +00:00
|
|
|
{
|
2014-03-10 11:09:59 +02:00
|
|
|
bResult = true;
|
2006-02-01 18:02:05 +00:00
|
|
|
}
|
CWS-TOOLING: integrate CWS fwk103
2009-05-26 12:44:25 +0200 mst r272292 : #i100727#
- svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx:
+ fix warning: rename method to prevent overloading
2009-05-19 13:42:31 +0200 mav r272075 : #i101356# add comment
2009-05-19 10:56:24 +0200 mav r272062 : #i101356# register the singleton correctly
2009-05-19 10:25:42 +0200 mav r272060 : #i101356# register the singleton correctly
2009-05-18 12:48:48 +0200 mav r272013 : #i91306# fix the typo
2009-05-14 08:50:06 +0200 mav r271871 : #i101356# reduce the amount of macros
2009-05-13 13:26:08 +0200 mav r271858 : #i101356# reduce the amount of macros
2009-05-13 11:29:16 +0200 mav r271849 : #i101356# reduce the amount of macros
2009-05-12 12:09:42 +0200 mav r271815 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 12:03:20 +0200 mav r271814 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:58:48 +0200 mav r271813 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:53:05 +0200 mav r271812 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:48:36 +0200 mav r271810 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:43:45 +0200 mav r271809 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:39:38 +0200 mav r271808 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:37:38 +0200 mav r271806 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:33:58 +0200 mav r271805 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:30:01 +0200 mav r271804 : #i101356# allow to generate a small log if a document can not be stored
2009-05-06 17:43:38 +0200 mst r271607 : #i100727#
- svtools/source/svhtml/parhtml.cxx:
+ adapt code to renaming of HTML constants (sb107)
2009-05-05 11:14:18 +0200 mav r271507 : #i101222# avoid warning
2009-05-05 10:27:23 +0200 mav r271505 : #i101426# send the modified() notification only when the document can be modified
2009-05-05 10:25:07 +0200 mav r271504 : #i101426# send the modified() notification only when the document is modified
2009-05-05 08:42:48 +0200 mav r271497 : CWS-TOOLING: rebase CWS fwk103 to trunk@271427 (milestone: DEV300:m47)
2009-04-30 13:32:11 +0200 mav r271412 : #i100518# check the template folders quietly
2009-04-29 20:04:25 +0200 mst r271393 : - sw/source/filter/html/swhtml.cxx:
+ fix wrong initialization order in constructor
2009-04-28 12:28:46 +0200 mav r271319 : #i99142# set the error correctly
2009-04-28 08:44:48 +0200 mav r271305 : #i99050# clear hidden flag if necessary
2009-04-28 08:40:10 +0200 mav r271304 : #i99050# avoid crash
2009-04-22 07:40:11 +0200 mav r271056 : #i101093# lets not affect the performance
2009-04-15 09:30:47 +0200 cd r270820 : #i99771# Fix warnings for gcc 4.4
2009-04-15 09:19:52 +0200 cd r270819 : #i99771# Fix warnings for gcc 4.4
2009-04-15 08:42:34 +0200 cd r270817 : #i99771# Fix warnings for gcc 4.4
2009-04-14 14:31:01 +0200 mav r270768 : #i99493# fix typo
2009-04-01 12:45:43 +0200 mst r270317 : fix #i100727#
- svtools/inc/svtools/svparser.hxx, svtools/source/svrtf/svparser.cxx,
sfx2/inc/sfx2/docfile.hxx, sfx2/source/doc/{objmisc.cxx,docfile.cxx}:
+ move SvKeyValue stuff from sfx2 to svtools
- svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx,
sfx2/inc/sfx2/sfxhtml.hxx, sfx2/source/bastyp/sfxhtml.cxx:
+ move ParseMetaOptions() and GetEncodingByMIME() from SfxHTMLParser (sfx2)
to HTMLParser (svtools)
+ make HTMLParser::ParseMetaOptions() a virtual function
+ HTMLParser::ParseMetaOptions() calls GetExtendedCompatibilityTextEncoding()
+ new template method HTMLParser::AddMetaUserDefined()
- svtools/source/svhtml/makefile.mk:
+ enable exceptions for parhtml.cxx
- dbaccess/source/ui/misc/HtmlReader.cxx,
sc/source/filter/html/htmlpars.cxx:
+ remove encoding related code duplication
- sw/source/filter/html/{swhtml{.hxx,.cxx},htmlfld.cxx}:
+ new SwHTMLParser::AddMetaUserDefined() for import of
DOCINFO field subtypes INFO[1-4]
+ do not use DocumentInfo for import of DOCINFO field subtypes INFO[1-4]
2009-03-31 17:01:35 +0200 mav r270288 : #i91214# fix typo
2009-03-31 15:19:41 +0200 mav r270285 : #i100123# allow to turn OOo locking mechanics off
2009-03-31 15:00:36 +0200 mav r270284 : #i100123# allow to turn OOo locking mechanics off
2009-03-31 12:19:13 +0200 mav r270270 : #i100123# taking the lock file over throws no exception
2009-03-30 13:57:21 +0200 mav r270227 : #i100351# fix the typo
2009-03-30 13:47:26 +0200 mav r270225 : #i99885# let OK be default button
2009-03-29 19:38:55 +0200 mav r270190 : CWS-TOOLING: rebase CWS fwk103 to trunk@270033 (milestone: DEV300:m45)
2009-03-16 16:39:48 +0100 mav r269558 : #i93558# convert the attributes as well
2009-03-13 15:35:55 +0100 mav r269488 : #i93558# improve manifest.xml parsing
2009-03-13 08:47:00 +0100 mav r269454 : #i96205# allow to remove password on SaveAs
2009-03-12 13:36:07 +0100 mav r269398 : #i91306# show special error in case of shared document
2009-03-12 13:33:35 +0100 mav r269397 : #i91306# introduce the new error-message
2009-03-12 11:40:42 +0100 mst r269378 : fix #i90877#
- svtools/source/uno/unoevent.cxx:
+ use proper operator delete[]
2009-02-26 15:23:10 +0100 mav r268526 : #i91214# do not use ATL
2009-02-26 14:19:06 +0100 mav r268516 : #i98909# integrate the patch
2009-02-10 17:29:52 +0100 cd r267568 : #i98649# Make sure that we catch the NoSuchElementException when a module is not installed.
2009-06-16 16:15:54 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return bResult;
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
CWS-TOOLING: integrate CWS fwk103
2009-05-26 12:44:25 +0200 mst r272292 : #i100727#
- svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx:
+ fix warning: rename method to prevent overloading
2009-05-19 13:42:31 +0200 mav r272075 : #i101356# add comment
2009-05-19 10:56:24 +0200 mav r272062 : #i101356# register the singleton correctly
2009-05-19 10:25:42 +0200 mav r272060 : #i101356# register the singleton correctly
2009-05-18 12:48:48 +0200 mav r272013 : #i91306# fix the typo
2009-05-14 08:50:06 +0200 mav r271871 : #i101356# reduce the amount of macros
2009-05-13 13:26:08 +0200 mav r271858 : #i101356# reduce the amount of macros
2009-05-13 11:29:16 +0200 mav r271849 : #i101356# reduce the amount of macros
2009-05-12 12:09:42 +0200 mav r271815 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 12:03:20 +0200 mav r271814 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:58:48 +0200 mav r271813 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:53:05 +0200 mav r271812 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:48:36 +0200 mav r271810 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:43:45 +0200 mav r271809 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:39:38 +0200 mav r271808 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:37:38 +0200 mav r271806 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:33:58 +0200 mav r271805 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:30:01 +0200 mav r271804 : #i101356# allow to generate a small log if a document can not be stored
2009-05-06 17:43:38 +0200 mst r271607 : #i100727#
- svtools/source/svhtml/parhtml.cxx:
+ adapt code to renaming of HTML constants (sb107)
2009-05-05 11:14:18 +0200 mav r271507 : #i101222# avoid warning
2009-05-05 10:27:23 +0200 mav r271505 : #i101426# send the modified() notification only when the document can be modified
2009-05-05 10:25:07 +0200 mav r271504 : #i101426# send the modified() notification only when the document is modified
2009-05-05 08:42:48 +0200 mav r271497 : CWS-TOOLING: rebase CWS fwk103 to trunk@271427 (milestone: DEV300:m47)
2009-04-30 13:32:11 +0200 mav r271412 : #i100518# check the template folders quietly
2009-04-29 20:04:25 +0200 mst r271393 : - sw/source/filter/html/swhtml.cxx:
+ fix wrong initialization order in constructor
2009-04-28 12:28:46 +0200 mav r271319 : #i99142# set the error correctly
2009-04-28 08:44:48 +0200 mav r271305 : #i99050# clear hidden flag if necessary
2009-04-28 08:40:10 +0200 mav r271304 : #i99050# avoid crash
2009-04-22 07:40:11 +0200 mav r271056 : #i101093# lets not affect the performance
2009-04-15 09:30:47 +0200 cd r270820 : #i99771# Fix warnings for gcc 4.4
2009-04-15 09:19:52 +0200 cd r270819 : #i99771# Fix warnings for gcc 4.4
2009-04-15 08:42:34 +0200 cd r270817 : #i99771# Fix warnings for gcc 4.4
2009-04-14 14:31:01 +0200 mav r270768 : #i99493# fix typo
2009-04-01 12:45:43 +0200 mst r270317 : fix #i100727#
- svtools/inc/svtools/svparser.hxx, svtools/source/svrtf/svparser.cxx,
sfx2/inc/sfx2/docfile.hxx, sfx2/source/doc/{objmisc.cxx,docfile.cxx}:
+ move SvKeyValue stuff from sfx2 to svtools
- svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx,
sfx2/inc/sfx2/sfxhtml.hxx, sfx2/source/bastyp/sfxhtml.cxx:
+ move ParseMetaOptions() and GetEncodingByMIME() from SfxHTMLParser (sfx2)
to HTMLParser (svtools)
+ make HTMLParser::ParseMetaOptions() a virtual function
+ HTMLParser::ParseMetaOptions() calls GetExtendedCompatibilityTextEncoding()
+ new template method HTMLParser::AddMetaUserDefined()
- svtools/source/svhtml/makefile.mk:
+ enable exceptions for parhtml.cxx
- dbaccess/source/ui/misc/HtmlReader.cxx,
sc/source/filter/html/htmlpars.cxx:
+ remove encoding related code duplication
- sw/source/filter/html/{swhtml{.hxx,.cxx},htmlfld.cxx}:
+ new SwHTMLParser::AddMetaUserDefined() for import of
DOCINFO field subtypes INFO[1-4]
+ do not use DocumentInfo for import of DOCINFO field subtypes INFO[1-4]
2009-03-31 17:01:35 +0200 mav r270288 : #i91214# fix typo
2009-03-31 15:19:41 +0200 mav r270285 : #i100123# allow to turn OOo locking mechanics off
2009-03-31 15:00:36 +0200 mav r270284 : #i100123# allow to turn OOo locking mechanics off
2009-03-31 12:19:13 +0200 mav r270270 : #i100123# taking the lock file over throws no exception
2009-03-30 13:57:21 +0200 mav r270227 : #i100351# fix the typo
2009-03-30 13:47:26 +0200 mav r270225 : #i99885# let OK be default button
2009-03-29 19:38:55 +0200 mav r270190 : CWS-TOOLING: rebase CWS fwk103 to trunk@270033 (milestone: DEV300:m45)
2009-03-16 16:39:48 +0100 mav r269558 : #i93558# convert the attributes as well
2009-03-13 15:35:55 +0100 mav r269488 : #i93558# improve manifest.xml parsing
2009-03-13 08:47:00 +0100 mav r269454 : #i96205# allow to remove password on SaveAs
2009-03-12 13:36:07 +0100 mav r269398 : #i91306# show special error in case of shared document
2009-03-12 13:33:35 +0100 mav r269397 : #i91306# introduce the new error-message
2009-03-12 11:40:42 +0100 mst r269378 : fix #i90877#
- svtools/source/uno/unoevent.cxx:
+ use proper operator delete[]
2009-02-26 15:23:10 +0100 mav r268526 : #i91214# do not use ATL
2009-02-26 14:19:06 +0100 mav r268516 : #i98909# integrate the patch
2009-02-10 17:29:52 +0100 cd r267568 : #i98649# Make sure that we catch the NoSuchElementException when a module is not installed.
2009-06-16 16:15:54 +00:00
|
|
|
|
2014-03-10 11:09:59 +02:00
|
|
|
bool SdrOle2Obj::Unload( const uno::Reference< embed::XEmbeddedObject >& xObj, sal_Int64 nAspect )
|
CWS-TOOLING: integrate CWS fwk103
2009-05-26 12:44:25 +0200 mst r272292 : #i100727#
- svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx:
+ fix warning: rename method to prevent overloading
2009-05-19 13:42:31 +0200 mav r272075 : #i101356# add comment
2009-05-19 10:56:24 +0200 mav r272062 : #i101356# register the singleton correctly
2009-05-19 10:25:42 +0200 mav r272060 : #i101356# register the singleton correctly
2009-05-18 12:48:48 +0200 mav r272013 : #i91306# fix the typo
2009-05-14 08:50:06 +0200 mav r271871 : #i101356# reduce the amount of macros
2009-05-13 13:26:08 +0200 mav r271858 : #i101356# reduce the amount of macros
2009-05-13 11:29:16 +0200 mav r271849 : #i101356# reduce the amount of macros
2009-05-12 12:09:42 +0200 mav r271815 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 12:03:20 +0200 mav r271814 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:58:48 +0200 mav r271813 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:53:05 +0200 mav r271812 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:48:36 +0200 mav r271810 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:43:45 +0200 mav r271809 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:39:38 +0200 mav r271808 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:37:38 +0200 mav r271806 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:33:58 +0200 mav r271805 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:30:01 +0200 mav r271804 : #i101356# allow to generate a small log if a document can not be stored
2009-05-06 17:43:38 +0200 mst r271607 : #i100727#
- svtools/source/svhtml/parhtml.cxx:
+ adapt code to renaming of HTML constants (sb107)
2009-05-05 11:14:18 +0200 mav r271507 : #i101222# avoid warning
2009-05-05 10:27:23 +0200 mav r271505 : #i101426# send the modified() notification only when the document can be modified
2009-05-05 10:25:07 +0200 mav r271504 : #i101426# send the modified() notification only when the document is modified
2009-05-05 08:42:48 +0200 mav r271497 : CWS-TOOLING: rebase CWS fwk103 to trunk@271427 (milestone: DEV300:m47)
2009-04-30 13:32:11 +0200 mav r271412 : #i100518# check the template folders quietly
2009-04-29 20:04:25 +0200 mst r271393 : - sw/source/filter/html/swhtml.cxx:
+ fix wrong initialization order in constructor
2009-04-28 12:28:46 +0200 mav r271319 : #i99142# set the error correctly
2009-04-28 08:44:48 +0200 mav r271305 : #i99050# clear hidden flag if necessary
2009-04-28 08:40:10 +0200 mav r271304 : #i99050# avoid crash
2009-04-22 07:40:11 +0200 mav r271056 : #i101093# lets not affect the performance
2009-04-15 09:30:47 +0200 cd r270820 : #i99771# Fix warnings for gcc 4.4
2009-04-15 09:19:52 +0200 cd r270819 : #i99771# Fix warnings for gcc 4.4
2009-04-15 08:42:34 +0200 cd r270817 : #i99771# Fix warnings for gcc 4.4
2009-04-14 14:31:01 +0200 mav r270768 : #i99493# fix typo
2009-04-01 12:45:43 +0200 mst r270317 : fix #i100727#
- svtools/inc/svtools/svparser.hxx, svtools/source/svrtf/svparser.cxx,
sfx2/inc/sfx2/docfile.hxx, sfx2/source/doc/{objmisc.cxx,docfile.cxx}:
+ move SvKeyValue stuff from sfx2 to svtools
- svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx,
sfx2/inc/sfx2/sfxhtml.hxx, sfx2/source/bastyp/sfxhtml.cxx:
+ move ParseMetaOptions() and GetEncodingByMIME() from SfxHTMLParser (sfx2)
to HTMLParser (svtools)
+ make HTMLParser::ParseMetaOptions() a virtual function
+ HTMLParser::ParseMetaOptions() calls GetExtendedCompatibilityTextEncoding()
+ new template method HTMLParser::AddMetaUserDefined()
- svtools/source/svhtml/makefile.mk:
+ enable exceptions for parhtml.cxx
- dbaccess/source/ui/misc/HtmlReader.cxx,
sc/source/filter/html/htmlpars.cxx:
+ remove encoding related code duplication
- sw/source/filter/html/{swhtml{.hxx,.cxx},htmlfld.cxx}:
+ new SwHTMLParser::AddMetaUserDefined() for import of
DOCINFO field subtypes INFO[1-4]
+ do not use DocumentInfo for import of DOCINFO field subtypes INFO[1-4]
2009-03-31 17:01:35 +0200 mav r270288 : #i91214# fix typo
2009-03-31 15:19:41 +0200 mav r270285 : #i100123# allow to turn OOo locking mechanics off
2009-03-31 15:00:36 +0200 mav r270284 : #i100123# allow to turn OOo locking mechanics off
2009-03-31 12:19:13 +0200 mav r270270 : #i100123# taking the lock file over throws no exception
2009-03-30 13:57:21 +0200 mav r270227 : #i100351# fix the typo
2009-03-30 13:47:26 +0200 mav r270225 : #i99885# let OK be default button
2009-03-29 19:38:55 +0200 mav r270190 : CWS-TOOLING: rebase CWS fwk103 to trunk@270033 (milestone: DEV300:m45)
2009-03-16 16:39:48 +0100 mav r269558 : #i93558# convert the attributes as well
2009-03-13 15:35:55 +0100 mav r269488 : #i93558# improve manifest.xml parsing
2009-03-13 08:47:00 +0100 mav r269454 : #i96205# allow to remove password on SaveAs
2009-03-12 13:36:07 +0100 mav r269398 : #i91306# show special error in case of shared document
2009-03-12 13:33:35 +0100 mav r269397 : #i91306# introduce the new error-message
2009-03-12 11:40:42 +0100 mst r269378 : fix #i90877#
- svtools/source/uno/unoevent.cxx:
+ use proper operator delete[]
2009-02-26 15:23:10 +0100 mav r268526 : #i91214# do not use ATL
2009-02-26 14:19:06 +0100 mav r268516 : #i98909# integrate the patch
2009-02-10 17:29:52 +0100 cd r267568 : #i98649# Make sure that we catch the NoSuchElementException when a module is not installed.
2009-06-16 16:15:54 +00:00
|
|
|
{
|
2014-03-10 11:09:59 +02:00
|
|
|
bool bResult = false;
|
CWS-TOOLING: integrate CWS fwk103
2009-05-26 12:44:25 +0200 mst r272292 : #i100727#
- svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx:
+ fix warning: rename method to prevent overloading
2009-05-19 13:42:31 +0200 mav r272075 : #i101356# add comment
2009-05-19 10:56:24 +0200 mav r272062 : #i101356# register the singleton correctly
2009-05-19 10:25:42 +0200 mav r272060 : #i101356# register the singleton correctly
2009-05-18 12:48:48 +0200 mav r272013 : #i91306# fix the typo
2009-05-14 08:50:06 +0200 mav r271871 : #i101356# reduce the amount of macros
2009-05-13 13:26:08 +0200 mav r271858 : #i101356# reduce the amount of macros
2009-05-13 11:29:16 +0200 mav r271849 : #i101356# reduce the amount of macros
2009-05-12 12:09:42 +0200 mav r271815 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 12:03:20 +0200 mav r271814 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:58:48 +0200 mav r271813 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:53:05 +0200 mav r271812 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:48:36 +0200 mav r271810 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:43:45 +0200 mav r271809 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:39:38 +0200 mav r271808 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:37:38 +0200 mav r271806 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:33:58 +0200 mav r271805 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:30:01 +0200 mav r271804 : #i101356# allow to generate a small log if a document can not be stored
2009-05-06 17:43:38 +0200 mst r271607 : #i100727#
- svtools/source/svhtml/parhtml.cxx:
+ adapt code to renaming of HTML constants (sb107)
2009-05-05 11:14:18 +0200 mav r271507 : #i101222# avoid warning
2009-05-05 10:27:23 +0200 mav r271505 : #i101426# send the modified() notification only when the document can be modified
2009-05-05 10:25:07 +0200 mav r271504 : #i101426# send the modified() notification only when the document is modified
2009-05-05 08:42:48 +0200 mav r271497 : CWS-TOOLING: rebase CWS fwk103 to trunk@271427 (milestone: DEV300:m47)
2009-04-30 13:32:11 +0200 mav r271412 : #i100518# check the template folders quietly
2009-04-29 20:04:25 +0200 mst r271393 : - sw/source/filter/html/swhtml.cxx:
+ fix wrong initialization order in constructor
2009-04-28 12:28:46 +0200 mav r271319 : #i99142# set the error correctly
2009-04-28 08:44:48 +0200 mav r271305 : #i99050# clear hidden flag if necessary
2009-04-28 08:40:10 +0200 mav r271304 : #i99050# avoid crash
2009-04-22 07:40:11 +0200 mav r271056 : #i101093# lets not affect the performance
2009-04-15 09:30:47 +0200 cd r270820 : #i99771# Fix warnings for gcc 4.4
2009-04-15 09:19:52 +0200 cd r270819 : #i99771# Fix warnings for gcc 4.4
2009-04-15 08:42:34 +0200 cd r270817 : #i99771# Fix warnings for gcc 4.4
2009-04-14 14:31:01 +0200 mav r270768 : #i99493# fix typo
2009-04-01 12:45:43 +0200 mst r270317 : fix #i100727#
- svtools/inc/svtools/svparser.hxx, svtools/source/svrtf/svparser.cxx,
sfx2/inc/sfx2/docfile.hxx, sfx2/source/doc/{objmisc.cxx,docfile.cxx}:
+ move SvKeyValue stuff from sfx2 to svtools
- svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx,
sfx2/inc/sfx2/sfxhtml.hxx, sfx2/source/bastyp/sfxhtml.cxx:
+ move ParseMetaOptions() and GetEncodingByMIME() from SfxHTMLParser (sfx2)
to HTMLParser (svtools)
+ make HTMLParser::ParseMetaOptions() a virtual function
+ HTMLParser::ParseMetaOptions() calls GetExtendedCompatibilityTextEncoding()
+ new template method HTMLParser::AddMetaUserDefined()
- svtools/source/svhtml/makefile.mk:
+ enable exceptions for parhtml.cxx
- dbaccess/source/ui/misc/HtmlReader.cxx,
sc/source/filter/html/htmlpars.cxx:
+ remove encoding related code duplication
- sw/source/filter/html/{swhtml{.hxx,.cxx},htmlfld.cxx}:
+ new SwHTMLParser::AddMetaUserDefined() for import of
DOCINFO field subtypes INFO[1-4]
+ do not use DocumentInfo for import of DOCINFO field subtypes INFO[1-4]
2009-03-31 17:01:35 +0200 mav r270288 : #i91214# fix typo
2009-03-31 15:19:41 +0200 mav r270285 : #i100123# allow to turn OOo locking mechanics off
2009-03-31 15:00:36 +0200 mav r270284 : #i100123# allow to turn OOo locking mechanics off
2009-03-31 12:19:13 +0200 mav r270270 : #i100123# taking the lock file over throws no exception
2009-03-30 13:57:21 +0200 mav r270227 : #i100351# fix the typo
2009-03-30 13:47:26 +0200 mav r270225 : #i99885# let OK be default button
2009-03-29 19:38:55 +0200 mav r270190 : CWS-TOOLING: rebase CWS fwk103 to trunk@270033 (milestone: DEV300:m45)
2009-03-16 16:39:48 +0100 mav r269558 : #i93558# convert the attributes as well
2009-03-13 15:35:55 +0100 mav r269488 : #i93558# improve manifest.xml parsing
2009-03-13 08:47:00 +0100 mav r269454 : #i96205# allow to remove password on SaveAs
2009-03-12 13:36:07 +0100 mav r269398 : #i91306# show special error in case of shared document
2009-03-12 13:33:35 +0100 mav r269397 : #i91306# introduce the new error-message
2009-03-12 11:40:42 +0100 mst r269378 : fix #i90877#
- svtools/source/uno/unoevent.cxx:
+ use proper operator delete[]
2009-02-26 15:23:10 +0100 mav r268526 : #i91214# do not use ATL
2009-02-26 14:19:06 +0100 mav r268516 : #i98909# integrate the patch
2009-02-10 17:29:52 +0100 cd r267568 : #i98649# Make sure that we catch the NoSuchElementException when a module is not installed.
2009-06-16 16:15:54 +00:00
|
|
|
|
|
|
|
if ( CanUnloadRunningObj( xObj, nAspect ) )
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
xObj->changeState( embed::EmbedStates::LOADED );
|
2014-03-10 11:09:59 +02:00
|
|
|
bResult = true;
|
CWS-TOOLING: integrate CWS fwk103
2009-05-26 12:44:25 +0200 mst r272292 : #i100727#
- svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx:
+ fix warning: rename method to prevent overloading
2009-05-19 13:42:31 +0200 mav r272075 : #i101356# add comment
2009-05-19 10:56:24 +0200 mav r272062 : #i101356# register the singleton correctly
2009-05-19 10:25:42 +0200 mav r272060 : #i101356# register the singleton correctly
2009-05-18 12:48:48 +0200 mav r272013 : #i91306# fix the typo
2009-05-14 08:50:06 +0200 mav r271871 : #i101356# reduce the amount of macros
2009-05-13 13:26:08 +0200 mav r271858 : #i101356# reduce the amount of macros
2009-05-13 11:29:16 +0200 mav r271849 : #i101356# reduce the amount of macros
2009-05-12 12:09:42 +0200 mav r271815 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 12:03:20 +0200 mav r271814 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:58:48 +0200 mav r271813 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:53:05 +0200 mav r271812 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:48:36 +0200 mav r271810 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:43:45 +0200 mav r271809 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:39:38 +0200 mav r271808 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:37:38 +0200 mav r271806 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:33:58 +0200 mav r271805 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:30:01 +0200 mav r271804 : #i101356# allow to generate a small log if a document can not be stored
2009-05-06 17:43:38 +0200 mst r271607 : #i100727#
- svtools/source/svhtml/parhtml.cxx:
+ adapt code to renaming of HTML constants (sb107)
2009-05-05 11:14:18 +0200 mav r271507 : #i101222# avoid warning
2009-05-05 10:27:23 +0200 mav r271505 : #i101426# send the modified() notification only when the document can be modified
2009-05-05 10:25:07 +0200 mav r271504 : #i101426# send the modified() notification only when the document is modified
2009-05-05 08:42:48 +0200 mav r271497 : CWS-TOOLING: rebase CWS fwk103 to trunk@271427 (milestone: DEV300:m47)
2009-04-30 13:32:11 +0200 mav r271412 : #i100518# check the template folders quietly
2009-04-29 20:04:25 +0200 mst r271393 : - sw/source/filter/html/swhtml.cxx:
+ fix wrong initialization order in constructor
2009-04-28 12:28:46 +0200 mav r271319 : #i99142# set the error correctly
2009-04-28 08:44:48 +0200 mav r271305 : #i99050# clear hidden flag if necessary
2009-04-28 08:40:10 +0200 mav r271304 : #i99050# avoid crash
2009-04-22 07:40:11 +0200 mav r271056 : #i101093# lets not affect the performance
2009-04-15 09:30:47 +0200 cd r270820 : #i99771# Fix warnings for gcc 4.4
2009-04-15 09:19:52 +0200 cd r270819 : #i99771# Fix warnings for gcc 4.4
2009-04-15 08:42:34 +0200 cd r270817 : #i99771# Fix warnings for gcc 4.4
2009-04-14 14:31:01 +0200 mav r270768 : #i99493# fix typo
2009-04-01 12:45:43 +0200 mst r270317 : fix #i100727#
- svtools/inc/svtools/svparser.hxx, svtools/source/svrtf/svparser.cxx,
sfx2/inc/sfx2/docfile.hxx, sfx2/source/doc/{objmisc.cxx,docfile.cxx}:
+ move SvKeyValue stuff from sfx2 to svtools
- svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx,
sfx2/inc/sfx2/sfxhtml.hxx, sfx2/source/bastyp/sfxhtml.cxx:
+ move ParseMetaOptions() and GetEncodingByMIME() from SfxHTMLParser (sfx2)
to HTMLParser (svtools)
+ make HTMLParser::ParseMetaOptions() a virtual function
+ HTMLParser::ParseMetaOptions() calls GetExtendedCompatibilityTextEncoding()
+ new template method HTMLParser::AddMetaUserDefined()
- svtools/source/svhtml/makefile.mk:
+ enable exceptions for parhtml.cxx
- dbaccess/source/ui/misc/HtmlReader.cxx,
sc/source/filter/html/htmlpars.cxx:
+ remove encoding related code duplication
- sw/source/filter/html/{swhtml{.hxx,.cxx},htmlfld.cxx}:
+ new SwHTMLParser::AddMetaUserDefined() for import of
DOCINFO field subtypes INFO[1-4]
+ do not use DocumentInfo for import of DOCINFO field subtypes INFO[1-4]
2009-03-31 17:01:35 +0200 mav r270288 : #i91214# fix typo
2009-03-31 15:19:41 +0200 mav r270285 : #i100123# allow to turn OOo locking mechanics off
2009-03-31 15:00:36 +0200 mav r270284 : #i100123# allow to turn OOo locking mechanics off
2009-03-31 12:19:13 +0200 mav r270270 : #i100123# taking the lock file over throws no exception
2009-03-30 13:57:21 +0200 mav r270227 : #i100351# fix the typo
2009-03-30 13:47:26 +0200 mav r270225 : #i99885# let OK be default button
2009-03-29 19:38:55 +0200 mav r270190 : CWS-TOOLING: rebase CWS fwk103 to trunk@270033 (milestone: DEV300:m45)
2009-03-16 16:39:48 +0100 mav r269558 : #i93558# convert the attributes as well
2009-03-13 15:35:55 +0100 mav r269488 : #i93558# improve manifest.xml parsing
2009-03-13 08:47:00 +0100 mav r269454 : #i96205# allow to remove password on SaveAs
2009-03-12 13:36:07 +0100 mav r269398 : #i91306# show special error in case of shared document
2009-03-12 13:33:35 +0100 mav r269397 : #i91306# introduce the new error-message
2009-03-12 11:40:42 +0100 mst r269378 : fix #i90877#
- svtools/source/uno/unoevent.cxx:
+ use proper operator delete[]
2009-02-26 15:23:10 +0100 mav r268526 : #i91214# do not use ATL
2009-02-26 14:19:06 +0100 mav r268516 : #i98909# integrate the patch
2009-02-10 17:29:52 +0100 cd r267568 : #i98649# Make sure that we catch the NoSuchElementException when a module is not installed.
2009-06-16 16:15:54 +00:00
|
|
|
}
|
2012-01-06 00:03:58 +09:00
|
|
|
catch( ::com::sun::star::uno::Exception& )
|
CWS-TOOLING: integrate CWS fwk103
2009-05-26 12:44:25 +0200 mst r272292 : #i100727#
- svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx:
+ fix warning: rename method to prevent overloading
2009-05-19 13:42:31 +0200 mav r272075 : #i101356# add comment
2009-05-19 10:56:24 +0200 mav r272062 : #i101356# register the singleton correctly
2009-05-19 10:25:42 +0200 mav r272060 : #i101356# register the singleton correctly
2009-05-18 12:48:48 +0200 mav r272013 : #i91306# fix the typo
2009-05-14 08:50:06 +0200 mav r271871 : #i101356# reduce the amount of macros
2009-05-13 13:26:08 +0200 mav r271858 : #i101356# reduce the amount of macros
2009-05-13 11:29:16 +0200 mav r271849 : #i101356# reduce the amount of macros
2009-05-12 12:09:42 +0200 mav r271815 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 12:03:20 +0200 mav r271814 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:58:48 +0200 mav r271813 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:53:05 +0200 mav r271812 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:48:36 +0200 mav r271810 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:43:45 +0200 mav r271809 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:39:38 +0200 mav r271808 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:37:38 +0200 mav r271806 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:33:58 +0200 mav r271805 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:30:01 +0200 mav r271804 : #i101356# allow to generate a small log if a document can not be stored
2009-05-06 17:43:38 +0200 mst r271607 : #i100727#
- svtools/source/svhtml/parhtml.cxx:
+ adapt code to renaming of HTML constants (sb107)
2009-05-05 11:14:18 +0200 mav r271507 : #i101222# avoid warning
2009-05-05 10:27:23 +0200 mav r271505 : #i101426# send the modified() notification only when the document can be modified
2009-05-05 10:25:07 +0200 mav r271504 : #i101426# send the modified() notification only when the document is modified
2009-05-05 08:42:48 +0200 mav r271497 : CWS-TOOLING: rebase CWS fwk103 to trunk@271427 (milestone: DEV300:m47)
2009-04-30 13:32:11 +0200 mav r271412 : #i100518# check the template folders quietly
2009-04-29 20:04:25 +0200 mst r271393 : - sw/source/filter/html/swhtml.cxx:
+ fix wrong initialization order in constructor
2009-04-28 12:28:46 +0200 mav r271319 : #i99142# set the error correctly
2009-04-28 08:44:48 +0200 mav r271305 : #i99050# clear hidden flag if necessary
2009-04-28 08:40:10 +0200 mav r271304 : #i99050# avoid crash
2009-04-22 07:40:11 +0200 mav r271056 : #i101093# lets not affect the performance
2009-04-15 09:30:47 +0200 cd r270820 : #i99771# Fix warnings for gcc 4.4
2009-04-15 09:19:52 +0200 cd r270819 : #i99771# Fix warnings for gcc 4.4
2009-04-15 08:42:34 +0200 cd r270817 : #i99771# Fix warnings for gcc 4.4
2009-04-14 14:31:01 +0200 mav r270768 : #i99493# fix typo
2009-04-01 12:45:43 +0200 mst r270317 : fix #i100727#
- svtools/inc/svtools/svparser.hxx, svtools/source/svrtf/svparser.cxx,
sfx2/inc/sfx2/docfile.hxx, sfx2/source/doc/{objmisc.cxx,docfile.cxx}:
+ move SvKeyValue stuff from sfx2 to svtools
- svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx,
sfx2/inc/sfx2/sfxhtml.hxx, sfx2/source/bastyp/sfxhtml.cxx:
+ move ParseMetaOptions() and GetEncodingByMIME() from SfxHTMLParser (sfx2)
to HTMLParser (svtools)
+ make HTMLParser::ParseMetaOptions() a virtual function
+ HTMLParser::ParseMetaOptions() calls GetExtendedCompatibilityTextEncoding()
+ new template method HTMLParser::AddMetaUserDefined()
- svtools/source/svhtml/makefile.mk:
+ enable exceptions for parhtml.cxx
- dbaccess/source/ui/misc/HtmlReader.cxx,
sc/source/filter/html/htmlpars.cxx:
+ remove encoding related code duplication
- sw/source/filter/html/{swhtml{.hxx,.cxx},htmlfld.cxx}:
+ new SwHTMLParser::AddMetaUserDefined() for import of
DOCINFO field subtypes INFO[1-4]
+ do not use DocumentInfo for import of DOCINFO field subtypes INFO[1-4]
2009-03-31 17:01:35 +0200 mav r270288 : #i91214# fix typo
2009-03-31 15:19:41 +0200 mav r270285 : #i100123# allow to turn OOo locking mechanics off
2009-03-31 15:00:36 +0200 mav r270284 : #i100123# allow to turn OOo locking mechanics off
2009-03-31 12:19:13 +0200 mav r270270 : #i100123# taking the lock file over throws no exception
2009-03-30 13:57:21 +0200 mav r270227 : #i100351# fix the typo
2009-03-30 13:47:26 +0200 mav r270225 : #i99885# let OK be default button
2009-03-29 19:38:55 +0200 mav r270190 : CWS-TOOLING: rebase CWS fwk103 to trunk@270033 (milestone: DEV300:m45)
2009-03-16 16:39:48 +0100 mav r269558 : #i93558# convert the attributes as well
2009-03-13 15:35:55 +0100 mav r269488 : #i93558# improve manifest.xml parsing
2009-03-13 08:47:00 +0100 mav r269454 : #i96205# allow to remove password on SaveAs
2009-03-12 13:36:07 +0100 mav r269398 : #i91306# show special error in case of shared document
2009-03-12 13:33:35 +0100 mav r269397 : #i91306# introduce the new error-message
2009-03-12 11:40:42 +0100 mst r269378 : fix #i90877#
- svtools/source/uno/unoevent.cxx:
+ use proper operator delete[]
2009-02-26 15:23:10 +0100 mav r268526 : #i91214# do not use ATL
2009-02-26 14:19:06 +0100 mav r268516 : #i98909# integrate the patch
2009-02-10 17:29:52 +0100 cd r267568 : #i98649# Make sure that we catch the NoSuchElementException when a module is not installed.
2009-06-16 16:15:54 +00:00
|
|
|
{
|
2011-03-03 15:27:26 +01:00
|
|
|
OSL_FAIL(
|
2012-12-02 22:35:57 +01:00
|
|
|
OString(OString("SdrOle2Obj::Unload=(), "
|
CWS-TOOLING: integrate CWS fwk103
2009-05-26 12:44:25 +0200 mst r272292 : #i100727#
- svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx:
+ fix warning: rename method to prevent overloading
2009-05-19 13:42:31 +0200 mav r272075 : #i101356# add comment
2009-05-19 10:56:24 +0200 mav r272062 : #i101356# register the singleton correctly
2009-05-19 10:25:42 +0200 mav r272060 : #i101356# register the singleton correctly
2009-05-18 12:48:48 +0200 mav r272013 : #i91306# fix the typo
2009-05-14 08:50:06 +0200 mav r271871 : #i101356# reduce the amount of macros
2009-05-13 13:26:08 +0200 mav r271858 : #i101356# reduce the amount of macros
2009-05-13 11:29:16 +0200 mav r271849 : #i101356# reduce the amount of macros
2009-05-12 12:09:42 +0200 mav r271815 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 12:03:20 +0200 mav r271814 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:58:48 +0200 mav r271813 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:53:05 +0200 mav r271812 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:48:36 +0200 mav r271810 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:43:45 +0200 mav r271809 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:39:38 +0200 mav r271808 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:37:38 +0200 mav r271806 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:33:58 +0200 mav r271805 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:30:01 +0200 mav r271804 : #i101356# allow to generate a small log if a document can not be stored
2009-05-06 17:43:38 +0200 mst r271607 : #i100727#
- svtools/source/svhtml/parhtml.cxx:
+ adapt code to renaming of HTML constants (sb107)
2009-05-05 11:14:18 +0200 mav r271507 : #i101222# avoid warning
2009-05-05 10:27:23 +0200 mav r271505 : #i101426# send the modified() notification only when the document can be modified
2009-05-05 10:25:07 +0200 mav r271504 : #i101426# send the modified() notification only when the document is modified
2009-05-05 08:42:48 +0200 mav r271497 : CWS-TOOLING: rebase CWS fwk103 to trunk@271427 (milestone: DEV300:m47)
2009-04-30 13:32:11 +0200 mav r271412 : #i100518# check the template folders quietly
2009-04-29 20:04:25 +0200 mst r271393 : - sw/source/filter/html/swhtml.cxx:
+ fix wrong initialization order in constructor
2009-04-28 12:28:46 +0200 mav r271319 : #i99142# set the error correctly
2009-04-28 08:44:48 +0200 mav r271305 : #i99050# clear hidden flag if necessary
2009-04-28 08:40:10 +0200 mav r271304 : #i99050# avoid crash
2009-04-22 07:40:11 +0200 mav r271056 : #i101093# lets not affect the performance
2009-04-15 09:30:47 +0200 cd r270820 : #i99771# Fix warnings for gcc 4.4
2009-04-15 09:19:52 +0200 cd r270819 : #i99771# Fix warnings for gcc 4.4
2009-04-15 08:42:34 +0200 cd r270817 : #i99771# Fix warnings for gcc 4.4
2009-04-14 14:31:01 +0200 mav r270768 : #i99493# fix typo
2009-04-01 12:45:43 +0200 mst r270317 : fix #i100727#
- svtools/inc/svtools/svparser.hxx, svtools/source/svrtf/svparser.cxx,
sfx2/inc/sfx2/docfile.hxx, sfx2/source/doc/{objmisc.cxx,docfile.cxx}:
+ move SvKeyValue stuff from sfx2 to svtools
- svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx,
sfx2/inc/sfx2/sfxhtml.hxx, sfx2/source/bastyp/sfxhtml.cxx:
+ move ParseMetaOptions() and GetEncodingByMIME() from SfxHTMLParser (sfx2)
to HTMLParser (svtools)
+ make HTMLParser::ParseMetaOptions() a virtual function
+ HTMLParser::ParseMetaOptions() calls GetExtendedCompatibilityTextEncoding()
+ new template method HTMLParser::AddMetaUserDefined()
- svtools/source/svhtml/makefile.mk:
+ enable exceptions for parhtml.cxx
- dbaccess/source/ui/misc/HtmlReader.cxx,
sc/source/filter/html/htmlpars.cxx:
+ remove encoding related code duplication
- sw/source/filter/html/{swhtml{.hxx,.cxx},htmlfld.cxx}:
+ new SwHTMLParser::AddMetaUserDefined() for import of
DOCINFO field subtypes INFO[1-4]
+ do not use DocumentInfo for import of DOCINFO field subtypes INFO[1-4]
2009-03-31 17:01:35 +0200 mav r270288 : #i91214# fix typo
2009-03-31 15:19:41 +0200 mav r270285 : #i100123# allow to turn OOo locking mechanics off
2009-03-31 15:00:36 +0200 mav r270284 : #i100123# allow to turn OOo locking mechanics off
2009-03-31 12:19:13 +0200 mav r270270 : #i100123# taking the lock file over throws no exception
2009-03-30 13:57:21 +0200 mav r270227 : #i100351# fix the typo
2009-03-30 13:47:26 +0200 mav r270225 : #i99885# let OK be default button
2009-03-29 19:38:55 +0200 mav r270190 : CWS-TOOLING: rebase CWS fwk103 to trunk@270033 (milestone: DEV300:m45)
2009-03-16 16:39:48 +0100 mav r269558 : #i93558# convert the attributes as well
2009-03-13 15:35:55 +0100 mav r269488 : #i93558# improve manifest.xml parsing
2009-03-13 08:47:00 +0100 mav r269454 : #i96205# allow to remove password on SaveAs
2009-03-12 13:36:07 +0100 mav r269398 : #i91306# show special error in case of shared document
2009-03-12 13:33:35 +0100 mav r269397 : #i91306# introduce the new error-message
2009-03-12 11:40:42 +0100 mst r269378 : fix #i90877#
- svtools/source/uno/unoevent.cxx:
+ use proper operator delete[]
2009-02-26 15:23:10 +0100 mav r268526 : #i91214# do not use ATL
2009-02-26 14:19:06 +0100 mav r268516 : #i98909# integrate the patch
2009-02-10 17:29:52 +0100 cd r267568 : #i98649# Make sure that we catch the NoSuchElementException when a module is not installed.
2009-06-16 16:15:54 +00:00
|
|
|
"exception caught: ") +
|
2013-04-07 12:06:47 +02:00
|
|
|
OUStringToOString(
|
CWS-TOOLING: integrate CWS fwk103
2009-05-26 12:44:25 +0200 mst r272292 : #i100727#
- svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx:
+ fix warning: rename method to prevent overloading
2009-05-19 13:42:31 +0200 mav r272075 : #i101356# add comment
2009-05-19 10:56:24 +0200 mav r272062 : #i101356# register the singleton correctly
2009-05-19 10:25:42 +0200 mav r272060 : #i101356# register the singleton correctly
2009-05-18 12:48:48 +0200 mav r272013 : #i91306# fix the typo
2009-05-14 08:50:06 +0200 mav r271871 : #i101356# reduce the amount of macros
2009-05-13 13:26:08 +0200 mav r271858 : #i101356# reduce the amount of macros
2009-05-13 11:29:16 +0200 mav r271849 : #i101356# reduce the amount of macros
2009-05-12 12:09:42 +0200 mav r271815 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 12:03:20 +0200 mav r271814 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:58:48 +0200 mav r271813 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:53:05 +0200 mav r271812 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:48:36 +0200 mav r271810 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:43:45 +0200 mav r271809 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:39:38 +0200 mav r271808 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:37:38 +0200 mav r271806 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:33:58 +0200 mav r271805 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:30:01 +0200 mav r271804 : #i101356# allow to generate a small log if a document can not be stored
2009-05-06 17:43:38 +0200 mst r271607 : #i100727#
- svtools/source/svhtml/parhtml.cxx:
+ adapt code to renaming of HTML constants (sb107)
2009-05-05 11:14:18 +0200 mav r271507 : #i101222# avoid warning
2009-05-05 10:27:23 +0200 mav r271505 : #i101426# send the modified() notification only when the document can be modified
2009-05-05 10:25:07 +0200 mav r271504 : #i101426# send the modified() notification only when the document is modified
2009-05-05 08:42:48 +0200 mav r271497 : CWS-TOOLING: rebase CWS fwk103 to trunk@271427 (milestone: DEV300:m47)
2009-04-30 13:32:11 +0200 mav r271412 : #i100518# check the template folders quietly
2009-04-29 20:04:25 +0200 mst r271393 : - sw/source/filter/html/swhtml.cxx:
+ fix wrong initialization order in constructor
2009-04-28 12:28:46 +0200 mav r271319 : #i99142# set the error correctly
2009-04-28 08:44:48 +0200 mav r271305 : #i99050# clear hidden flag if necessary
2009-04-28 08:40:10 +0200 mav r271304 : #i99050# avoid crash
2009-04-22 07:40:11 +0200 mav r271056 : #i101093# lets not affect the performance
2009-04-15 09:30:47 +0200 cd r270820 : #i99771# Fix warnings for gcc 4.4
2009-04-15 09:19:52 +0200 cd r270819 : #i99771# Fix warnings for gcc 4.4
2009-04-15 08:42:34 +0200 cd r270817 : #i99771# Fix warnings for gcc 4.4
2009-04-14 14:31:01 +0200 mav r270768 : #i99493# fix typo
2009-04-01 12:45:43 +0200 mst r270317 : fix #i100727#
- svtools/inc/svtools/svparser.hxx, svtools/source/svrtf/svparser.cxx,
sfx2/inc/sfx2/docfile.hxx, sfx2/source/doc/{objmisc.cxx,docfile.cxx}:
+ move SvKeyValue stuff from sfx2 to svtools
- svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx,
sfx2/inc/sfx2/sfxhtml.hxx, sfx2/source/bastyp/sfxhtml.cxx:
+ move ParseMetaOptions() and GetEncodingByMIME() from SfxHTMLParser (sfx2)
to HTMLParser (svtools)
+ make HTMLParser::ParseMetaOptions() a virtual function
+ HTMLParser::ParseMetaOptions() calls GetExtendedCompatibilityTextEncoding()
+ new template method HTMLParser::AddMetaUserDefined()
- svtools/source/svhtml/makefile.mk:
+ enable exceptions for parhtml.cxx
- dbaccess/source/ui/misc/HtmlReader.cxx,
sc/source/filter/html/htmlpars.cxx:
+ remove encoding related code duplication
- sw/source/filter/html/{swhtml{.hxx,.cxx},htmlfld.cxx}:
+ new SwHTMLParser::AddMetaUserDefined() for import of
DOCINFO field subtypes INFO[1-4]
+ do not use DocumentInfo for import of DOCINFO field subtypes INFO[1-4]
2009-03-31 17:01:35 +0200 mav r270288 : #i91214# fix typo
2009-03-31 15:19:41 +0200 mav r270285 : #i100123# allow to turn OOo locking mechanics off
2009-03-31 15:00:36 +0200 mav r270284 : #i100123# allow to turn OOo locking mechanics off
2009-03-31 12:19:13 +0200 mav r270270 : #i100123# taking the lock file over throws no exception
2009-03-30 13:57:21 +0200 mav r270227 : #i100351# fix the typo
2009-03-30 13:47:26 +0200 mav r270225 : #i99885# let OK be default button
2009-03-29 19:38:55 +0200 mav r270190 : CWS-TOOLING: rebase CWS fwk103 to trunk@270033 (milestone: DEV300:m45)
2009-03-16 16:39:48 +0100 mav r269558 : #i93558# convert the attributes as well
2009-03-13 15:35:55 +0100 mav r269488 : #i93558# improve manifest.xml parsing
2009-03-13 08:47:00 +0100 mav r269454 : #i96205# allow to remove password on SaveAs
2009-03-12 13:36:07 +0100 mav r269398 : #i91306# show special error in case of shared document
2009-03-12 13:33:35 +0100 mav r269397 : #i91306# introduce the new error-message
2009-03-12 11:40:42 +0100 mst r269378 : fix #i90877#
- svtools/source/uno/unoevent.cxx:
+ use proper operator delete[]
2009-02-26 15:23:10 +0100 mav r268526 : #i91214# do not use ATL
2009-02-26 14:19:06 +0100 mav r268516 : #i98909# integrate the patch
2009-02-10 17:29:52 +0100 cd r267568 : #i98649# Make sure that we catch the NoSuchElementException when a module is not installed.
2009-06-16 16:15:54 +00:00
|
|
|
comphelper::anyToString( cppu::getCaughtException() ),
|
|
|
|
RTL_TEXTENCODING_UTF8 )).getStr() );
|
2006-02-01 18:02:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return bResult;
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2006-02-01 18:02:05 +00:00
|
|
|
|
2014-03-10 11:09:59 +02:00
|
|
|
bool SdrOle2Obj::Unload()
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-07-10 13:08:07 -04:00
|
|
|
if (!mpImpl->mxObjRef.is())
|
2014-07-10 12:11:20 -04:00
|
|
|
// Already unloaded.
|
|
|
|
return true;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-07-10 12:11:20 -04:00
|
|
|
bool bUnloaded = false;
|
2014-07-10 13:08:07 -04:00
|
|
|
if ( pModel && mpImpl->mxObjRef.is() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-07-10 13:08:07 -04:00
|
|
|
bUnloaded = Unload( mpImpl->mxObjRef.GetObject(), GetAspect() );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return bUnloaded;
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-09-10 11:59:59 +00:00
|
|
|
|
2004-10-04 16:54:47 +00:00
|
|
|
void SdrOle2Obj::GetObjRef_Impl()
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-07-10 13:08:07 -04:00
|
|
|
if ( !mpImpl->mxObjRef.is() && !mpImpl->aPersistName.isEmpty() && pModel && pModel->GetPersist() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-10-04 16:54:47 +00:00
|
|
|
// Only try loading if it did not went wrong up to now
|
2003-03-27 14:06:05 +00:00
|
|
|
if(!mpImpl->mbLoadingOLEObjectFailed)
|
|
|
|
{
|
2014-07-10 13:08:07 -04:00
|
|
|
mpImpl->mxObjRef.Assign( pModel->GetPersist()->getEmbeddedObjectContainer().GetEmbeddedObject( mpImpl->aPersistName ), GetAspect() );
|
2014-07-10 14:11:02 -04:00
|
|
|
mpImpl->mbTypeAsked = false;
|
2005-01-18 14:01:22 +00:00
|
|
|
CheckFileLink_Impl();
|
2003-03-27 14:06:05 +00:00
|
|
|
|
|
|
|
// If loading of OLE object failed, remember that to not invoke a endless
|
|
|
|
// loop trying to load it again and again.
|
2014-07-10 13:08:07 -04:00
|
|
|
if( mpImpl->mxObjRef.is() )
|
2003-03-27 14:06:05 +00:00
|
|
|
{
|
2013-04-07 23:05:56 +09:00
|
|
|
mpImpl->mbLoadingOLEObjectFailed = true;
|
2003-03-27 14:06:05 +00:00
|
|
|
}
|
2003-04-24 13:49:28 +00:00
|
|
|
|
2011-05-12 11:03:28 +02:00
|
|
|
// For math objects, set closed state to transparent
|
2014-07-10 13:08:07 -04:00
|
|
|
SetClosedObj(!ImplIsMathObj( mpImpl->mxObjRef.GetObject() ));
|
2003-03-27 14:06:05 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-07-10 13:08:07 -04:00
|
|
|
if ( mpImpl->mxObjRef.is() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
if( !IsEmptyPresObj() )
|
|
|
|
{
|
2011-05-12 11:03:28 +02:00
|
|
|
// remember modified status of model
|
2014-03-10 11:09:59 +02:00
|
|
|
const bool bWasChanged = pModel && pModel->IsChanged();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
// perhaps preview not valid anymore
|
2011-05-12 11:03:28 +02:00
|
|
|
// This line changes the modified state of the model
|
2004-10-04 16:54:47 +00:00
|
|
|
SetGraphic_Impl( NULL );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2011-05-12 11:03:28 +02:00
|
|
|
// if status was not set before, force it back
|
2000-09-18 16:07:07 +00:00
|
|
|
// to not set, so that SetGraphic(0L) above does not
|
|
|
|
// set the modified state of the model.
|
|
|
|
if(!bWasChanged && pModel && pModel->IsChanged())
|
2003-11-24 15:57:52 +00:00
|
|
|
{
|
2014-02-11 11:43:35 +02:00
|
|
|
pModel->SetChanged( false );
|
2003-11-24 15:57:52 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2014-07-10 13:08:07 -04:00
|
|
|
sal_Int64 nMiscStatus = mpImpl->mxObjRef->getStatus( GetAspect() );
|
2006-06-19 15:43:13 +00:00
|
|
|
(void)nMiscStatus;
|
2004-10-04 16:54:47 +00:00
|
|
|
//TODO/LATER: wait until ResizeOnPrinterChange is defined
|
|
|
|
//if ( nMiscStatus & SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
if (pModel && pModel->GetRefDevice() &&
|
|
|
|
pModel->GetRefDevice()->GetOutDevType() == OUTDEV_PRINTER)
|
|
|
|
{
|
2014-07-10 14:11:02 -04:00
|
|
|
if (!mpImpl->mbInDestruction)
|
2001-04-11 08:30:44 +00:00
|
|
|
{
|
2004-10-04 16:54:47 +00:00
|
|
|
//TODO/LATER: printerchange notification
|
|
|
|
/*
|
2001-08-17 12:48:26 +00:00
|
|
|
// prevent SetModified (don't want no update here)
|
2014-03-10 11:09:59 +02:00
|
|
|
bool bWasEnabled = (*ppObjRef)->IsEnableSetModified();
|
2001-08-17 12:48:26 +00:00
|
|
|
if ( bWasEnabled )
|
2014-03-10 11:09:59 +02:00
|
|
|
(*ppObjRef)->EnableSetModified( false );
|
2001-08-17 12:48:26 +00:00
|
|
|
|
2001-04-11 08:30:44 +00:00
|
|
|
// Kein RefDevice oder RefDevice kein Printer
|
|
|
|
Printer* pPrinter = (Printer*) pModel->GetRefDevice();
|
|
|
|
(*ppObjRef)->OnDocumentPrinterChanged( pPrinter );
|
2001-08-17 12:48:26 +00:00
|
|
|
|
|
|
|
// reset state
|
2004-10-04 16:54:47 +00:00
|
|
|
(*ppObjRef)->EnableSetModified( bWasEnabled );*/
|
2001-04-11 08:30:44 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-07-10 13:08:07 -04:00
|
|
|
if ( mpImpl->mxObjRef.is() )
|
2004-10-04 16:54:47 +00:00
|
|
|
Connect();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2004-11-26 15:33:16 +00:00
|
|
|
|
|
|
|
if ( mpImpl->mbConnected )
|
|
|
|
// move object to first position in cache
|
|
|
|
GetSdrGlobalData().GetOLEObjCache().InsertObj(this);
|
2004-10-04 16:54:47 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-10-04 16:54:47 +00:00
|
|
|
uno::Reference < embed::XEmbeddedObject > SdrOle2Obj::GetObjRef() const
|
|
|
|
{
|
|
|
|
const_cast<SdrOle2Obj*>(this)->GetObjRef_Impl();
|
2014-07-10 13:08:07 -04:00
|
|
|
return mpImpl->mxObjRef.GetObject();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2008-12-12 12:52:51 +00:00
|
|
|
uno::Reference < embed::XEmbeddedObject > SdrOle2Obj::GetObjRef_NoInit() const
|
|
|
|
{
|
2014-07-10 13:08:07 -04:00
|
|
|
return mpImpl->mxObjRef.GetObject();
|
2008-12-12 12:52:51 +00:00
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-09-10 11:59:59 +00:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
uno::Reference< frame::XModel > SdrOle2Obj::getXModel() const
|
|
|
|
{
|
2004-10-04 16:54:47 +00:00
|
|
|
GetObjRef();
|
2014-07-10 13:08:07 -04:00
|
|
|
if ( svt::EmbeddedObjectRef::TryRunningState(mpImpl->mxObjRef.GetObject()) )
|
|
|
|
return uno::Reference< frame::XModel >( mpImpl->mxObjRef->getComponent(), uno::UNO_QUERY );
|
2004-10-04 16:54:47 +00:00
|
|
|
else
|
|
|
|
return uno::Reference< frame::XModel >();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-09-10 11:59:59 +00:00
|
|
|
|
2014-03-10 11:09:59 +02:00
|
|
|
bool SdrOle2Obj::IsChart() const
|
2003-11-24 15:57:52 +00:00
|
|
|
{
|
2014-07-10 14:11:02 -04:00
|
|
|
if (!mpImpl->mbTypeAsked)
|
2003-11-24 15:57:52 +00:00
|
|
|
{
|
2014-08-10 17:18:16 +02:00
|
|
|
mpImpl->mbIsChart = mpImpl->mxObjRef.IsChart();
|
2014-07-10 14:11:02 -04:00
|
|
|
mpImpl->mbTypeAsked = true;
|
2003-11-24 15:57:52 +00:00
|
|
|
}
|
2014-07-10 14:11:02 -04:00
|
|
|
return mpImpl->mbIsChart;
|
2003-11-24 15:57:52 +00:00
|
|
|
}
|
|
|
|
|
2014-09-12 12:54:11 +02:00
|
|
|
bool SdrOle2Obj::IsReal3DChart() const
|
|
|
|
{
|
|
|
|
if (!IsChart())
|
|
|
|
return false;
|
|
|
|
|
|
|
|
uno::Reference<chart2::XChartDocument> xChart2Document(getXModel(), uno::UNO_QUERY);
|
|
|
|
uno::Reference<chart2::XDiagram> xChart2Diagram(xChart2Document->getFirstDiagram(), uno::UNO_QUERY);
|
|
|
|
|
|
|
|
if (!xChart2Diagram.is())
|
|
|
|
return false;
|
|
|
|
|
|
|
|
return ChartHelper::isGL3DDiagram(xChart2Diagram);
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
void SdrOle2Obj::SetGraphicToObj( const Graphic& aGraphic, const OUString& aMediaType )
|
2006-02-01 18:02:05 +00:00
|
|
|
{
|
2014-07-10 13:08:07 -04:00
|
|
|
mpImpl->mxObjRef.SetGraphic( aGraphic, aMediaType );
|
2006-02-01 18:02:05 +00:00
|
|
|
}
|
2003-11-24 15:57:52 +00:00
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
void SdrOle2Obj::SetGraphicToObj( const uno::Reference< io::XInputStream >& xGrStream, const OUString& aMediaType )
|
2006-10-13 10:23:44 +00:00
|
|
|
{
|
2014-07-10 13:08:07 -04:00
|
|
|
mpImpl->mxObjRef.SetGraphicStream( xGrStream, aMediaType );
|
2006-10-13 10:23:44 +00:00
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2014-03-10 11:09:59 +02:00
|
|
|
bool SdrOle2Obj::IsCalc() const
|
2006-01-10 13:50:54 +00:00
|
|
|
{
|
2014-07-10 13:08:07 -04:00
|
|
|
if ( !mpImpl->mxObjRef.is() )
|
2006-01-10 13:50:54 +00:00
|
|
|
return false;
|
|
|
|
|
2014-07-10 13:08:07 -04:00
|
|
|
SvGlobalName aObjClsId( mpImpl->mxObjRef->getClassID() );
|
2006-01-10 13:50:54 +00:00
|
|
|
if( SvGlobalName(SO3_SC_CLASSID_30) == aObjClsId
|
|
|
|
|| SvGlobalName(SO3_SC_CLASSID_40) == aObjClsId
|
|
|
|
|| SvGlobalName(SO3_SC_CLASSID_50) == aObjClsId
|
|
|
|
|| SvGlobalName(SO3_SC_CLASSID_60) == aObjClsId
|
|
|
|
|| SvGlobalName(SO3_SC_OLE_EMBED_CLASSID_60) == aObjClsId
|
|
|
|
|| SvGlobalName(SO3_SC_OLE_EMBED_CLASSID_8) == aObjClsId
|
|
|
|
|| SvGlobalName(SO3_SC_CLASSID) == aObjClsId )
|
|
|
|
{
|
2014-03-10 11:09:59 +02:00
|
|
|
return true;
|
2006-01-10 13:50:54 +00:00
|
|
|
}
|
|
|
|
|
2014-03-10 11:09:59 +02:00
|
|
|
return false;
|
2006-01-10 13:50:54 +00:00
|
|
|
}
|
2006-10-13 10:23:44 +00:00
|
|
|
|
2008-06-16 11:27:42 +00:00
|
|
|
uno::Reference< frame::XModel > SdrOle2Obj::GetParentXModel() const
|
2006-10-13 10:23:44 +00:00
|
|
|
{
|
2008-03-11 06:34:36 +00:00
|
|
|
uno::Reference< frame::XModel > xDoc;
|
|
|
|
if ( pModel )
|
|
|
|
xDoc.set( pModel->getUnoModel(),uno::UNO_QUERY);
|
|
|
|
return xDoc;
|
2006-10-13 10:23:44 +00:00
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2014-10-23 17:41:47 +02:00
|
|
|
bool SdrOle2Obj::CalculateNewScaling( Fraction& aScaleWidth, Fraction& aScaleHeight, Size& aObjAreaSize )
|
2006-10-13 10:23:44 +00:00
|
|
|
{
|
|
|
|
// TODO/LEAN: to avoid rounding errors scaling always uses the VisArea.
|
|
|
|
// If we don't cache it for own objects also we must load the object here
|
2014-07-10 13:08:07 -04:00
|
|
|
if ( !mpImpl->mxObjRef.is() || !pModel )
|
2014-03-10 11:09:59 +02:00
|
|
|
return false;
|
2006-10-13 10:23:44 +00:00
|
|
|
|
|
|
|
MapMode aMapMode( pModel->GetScaleUnit() );
|
2014-07-10 13:08:07 -04:00
|
|
|
aObjAreaSize = mpImpl->mxObjRef.GetSize( &aMapMode );
|
2006-10-13 10:23:44 +00:00
|
|
|
|
2014-10-29 15:01:37 -04:00
|
|
|
Size aSize = maRect.GetSize();
|
2014-10-23 17:41:47 +02:00
|
|
|
aScaleWidth = Fraction(aSize.Width(), aObjAreaSize.Width() );
|
|
|
|
aScaleHeight = Fraction(aSize.Height(), aObjAreaSize.Height() );
|
2006-10-13 10:23:44 +00:00
|
|
|
|
|
|
|
// reduce to 10 binary digits
|
|
|
|
Kuerzen(aScaleHeight, 10);
|
|
|
|
Kuerzen(aScaleWidth, 10);
|
|
|
|
|
2014-03-10 11:09:59 +02:00
|
|
|
return true;
|
2006-10-13 10:23:44 +00:00
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2014-03-10 11:09:59 +02:00
|
|
|
bool SdrOle2Obj::AddOwnLightClient()
|
2006-10-13 10:23:44 +00:00
|
|
|
{
|
|
|
|
// The Own Light Client must be registered in object only using this method!
|
2014-07-10 13:08:07 -04:00
|
|
|
if ( !SfxInPlaceClient::GetClient( dynamic_cast<SfxObjectShell*>(pModel->GetPersist()), mpImpl->mxObjRef.GetObject() )
|
|
|
|
&& !( mpImpl->pLightClient && mpImpl->mxObjRef->getClientSite() == uno::Reference< embed::XEmbeddedClient >( mpImpl->pLightClient ) ) )
|
2006-10-13 10:23:44 +00:00
|
|
|
{
|
2010-06-01 17:15:33 +02:00
|
|
|
Connect();
|
|
|
|
|
2014-07-10 13:08:07 -04:00
|
|
|
if ( mpImpl->mxObjRef.is() && mpImpl->pLightClient )
|
2006-10-13 10:23:44 +00:00
|
|
|
{
|
2014-10-23 17:41:47 +02:00
|
|
|
Fraction aScaleWidth;
|
|
|
|
Fraction aScaleHeight;
|
2010-06-01 17:15:33 +02:00
|
|
|
Size aObjAreaSize;
|
|
|
|
if ( CalculateNewScaling( aScaleWidth, aScaleHeight, aObjAreaSize ) )
|
|
|
|
{
|
|
|
|
mpImpl->pLightClient->SetSizeScale( aScaleWidth, aScaleHeight );
|
|
|
|
try {
|
2014-07-10 13:08:07 -04:00
|
|
|
mpImpl->mxObjRef->setClientSite( mpImpl->pLightClient );
|
2014-03-10 11:09:59 +02:00
|
|
|
return true;
|
2010-06-01 17:15:33 +02:00
|
|
|
} catch( uno::Exception& )
|
|
|
|
{}
|
|
|
|
}
|
|
|
|
|
2006-10-13 10:23:44 +00:00
|
|
|
}
|
|
|
|
|
2014-03-10 11:09:59 +02:00
|
|
|
return false;
|
2006-10-13 10:23:44 +00:00
|
|
|
}
|
|
|
|
|
2014-03-10 11:09:59 +02:00
|
|
|
return true;
|
2006-10-13 10:23:44 +00:00
|
|
|
}
|
2008-08-19 22:24:05 +00:00
|
|
|
|
2014-02-25 20:51:35 +01:00
|
|
|
|
2008-08-19 22:24:05 +00:00
|
|
|
|
2013-06-06 22:19:38 +01:00
|
|
|
Graphic SdrOle2Obj::GetEmptyOLEReplacementGraphic()
|
2008-08-19 22:24:05 +00:00
|
|
|
{
|
2013-06-06 22:19:38 +01:00
|
|
|
return Graphic(BitmapEx(ResId(BMP_SVXOLEOBJ, *ImpGetResMgr())));
|
2008-08-19 22:24:05 +00:00
|
|
|
}
|
|
|
|
|
2014-02-25 20:51:35 +01:00
|
|
|
|
2008-08-19 22:24:05 +00:00
|
|
|
|
2008-06-16 11:27:42 +00:00
|
|
|
void SdrOle2Obj::SetWindow(const com::sun::star::uno::Reference < com::sun::star::awt::XWindow >& _xWindow)
|
|
|
|
{
|
2014-07-10 13:08:07 -04:00
|
|
|
if ( mpImpl->mxObjRef.is() && mpImpl->pLightClient )
|
2008-06-16 11:27:42 +00:00
|
|
|
{
|
|
|
|
mpImpl->pLightClient->setWindow(_xWindow);
|
|
|
|
}
|
|
|
|
}
|
2008-08-19 22:24:05 +00:00
|
|
|
|
2010-10-12 15:53:47 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|