Files
libreoffice/sw/inc/dcontact.hxx

456 lines
18 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
re-base on ALv2 code. Includes: Patches contributed by Oliver-Rainer Wittmann sw34bf06: #i117783# - Writer's implementation of XPagePrintable - apply print settings to new printing routines http://svn.apache.org/viewvc?view=revision&revision=1172115 sw34bf06: #o12311627# use <rtl_random> methods to create unique ids for list styles and list ids http://svn.apache.org/viewvc?view=revision&revision=1172112 sw34bf06 #i114725#,#i115828# - method <SwDoc::ClearDoc()> - clear list structures completely http://svn.apache.org/viewvc?view=revision&revision=1172122 i#118572 - remove ui string and help content regarding usage of Java Mail in Writer's Mail Merge as Java Mail is not used. http://svn.apache.org/viewvc?view=revision&revision=1197035 Patches contributed by Mathias Bauer cws mba34issues01: #i117718#: provide filter name in case storage of medium does not allow to detect one http://svn.apache.org/viewvc?view=revision&revision=1172350 cws mba34issues01: #i117721#: directly provide parameters retrieved from SfxMedium http://svn.apache.org/viewvc?view=revision&revision=1172353 gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 cws mba34issues01: #i117723#: convert assertion into trace http://svn.apache.org/viewvc?view=revision&revision=1172355 cws mba34issues01: #i117699#: keep layout alive until swdoc dies http://svn.apache.org/viewvc?view=revision&revision=1172362 cws mba34issues01: #i117943#: missing color attributes in RTF clipboard http://svn.apache.org/viewvc?view=revision&revision=1172363 Patch contributed by Henning Brinkmann imported patch i#103878 http://svn.apache.org/viewvc?view=revision&revision=1172109 Patches contributed by Michael Stahl sw34bf06: #i117955#: WW8 export: disable storing of section breaks in endnotes http://svn.apache.org/viewvc?view=revision&revision=1172119 Patch contributed by imacat Fixed the Asian language work count. http://svn.apache.org/viewvc?view=revision&revision=1241345 Patch contributed by Pedro Giffuni i#20878 - Add comment with BZ issue for reference. http://svn.apache.org/viewvc?view=revision&revision=1244517 Patch contributed by Andre Fischer Do not add targets for junit tests when junit is disabled. http://svn.apache.org/viewvc?view=revision&revision=1241508 add writerperfect dependency.
2011-03-31 10:05:04 +02:00
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef INCLUDED_SW_INC_DCONTACT_HXX
#define INCLUDED_SW_INC_DCONTACT_HXX
2000-09-18 16:15:01 +00:00
#include <svx/svdobj.hxx>
#include <svx/svdovirt.hxx>
#include <swtypes.hxx>
#include <fmtanchr.hxx>
#include <frmfmt.hxx>
#include <list>
2000-09-18 16:15:01 +00:00
#include "calbck.hxx"
#include <anchoreddrawobject.hxx>
2000-09-18 16:15:01 +00:00
class SfxPoolItem;
class SwFrameFormat;
class SwFlyFrameFormat;
class SwFlyFrame;
class SwFrame;
class SwPageFrame;
2000-09-18 16:15:01 +00:00
class SwVirtFlyDrawObj;
class SwFormatAnchor;
2000-09-18 16:15:01 +00:00
class SwFlyDrawObj;
class SwRect;
class SwDrawContact;
struct SwPosition;
class SwIndex;
class SdrTextObj;
2000-09-18 16:15:01 +00:00
/** The other way round: Search format for given object.
If object is a SwVirtFlyDrawObj the format will be obtained from it.
If not it is a simple DrawObject. It has a UserCall which
is client of the format we are looking for.
Implementation in dcontact.cxx. */
SW_DLLPUBLIC SwFrameFormat *FindFrameFormat( SdrObject *pObj );
inline const SwFrameFormat *FindFrameFormat( const SdrObject *pObj )
{ return ::FindFrameFormat( const_cast<SdrObject*>(pObj) ); }
bool HasWrap( const SdrObject* pObj );
2000-09-18 16:15:01 +00:00
void setContextWritingMode( SdrObject* pObj, SwFrame* pAnchor );
CWS-TOOLING: integrate CWS rtlcontrols 2008-12-11 21:08:49 +0100 fs r265367 : CONTEXT_WRITING_MODE is transient 2008-12-11 21:08:00 +0100 fs r265365 : REGISTER_PROP_3 2008-12-11 20:53:44 +0100 fs r265362 : ContextWritingMode is not MAYBEVOID 2008-12-11 15:29:08 +0100 fs r265315 : prevent a deadlock during complex.dbaccess.DatabaseDocument test 2008-12-11 15:01:13 +0100 fs r265304 : manual RESYNC to m37 2008-12-10 20:04:38 +0100 pl r265230 : #i30631# fix a snafu in mirroring 2008-12-10 19:14:45 +0100 pl r265229 : #i30631# rework PaintToDevice for RTL controls 2008-12-05 10:19:13 +0100 fs r264893 : #i10000# ImplInitSettings => ImplInitWindow (ImplInitSettings clashed with base classes ImplInitSettings on unxsols4) 2008-12-03 12:55:24 +0100 fs r264768 : #i100000# 2008-12-03 07:11:48 +0100 fs r264741 : #i10000# 2008-12-02 10:37:51 +0100 fs r264670 : CWS-TOOLING: rebase CWS rtlcontrols to trunk@264325 (milestone: DEV300:m36) 2008-12-02 09:27:50 +0100 fs r264660 : merge from trunk 2008-11-25 10:28:36 +0100 ama r264277 : Fix #i94572# 2008-11-24 11:46:48 +0100 fs r264218 : #i30631# proper context writing mode 2008-11-24 09:38:04 +0100 fs r264204 : #i30631# (approved by PL) 2008-11-24 09:35:47 +0100 fs r264203 : #i30631# Context/WritingMode 2008-11-24 09:33:36 +0100 fs r264202 : #i30631# Context/WritingMode 2008-11-24 09:31:53 +0100 fs r264200 : #i30631# RTL 2008-11-19 08:51:48 +0100 fs r263963 : #i10000# 2008-11-18 20:58:11 +0100 fs r263878 : #i10000# 2008-11-18 15:30:44 +0100 fs r263778 : migrate the CWS from CVS to SVN the CVS changes contained in this change set are the ones between the following two CVS tags: CWS_DEV300_RTLCONTROLS_ANCHOR CWS_DEV300_RTLCONTROLS_PRE_MIGRATION 2008-11-18 12:29:04 +0100 ama r263762 : Fix #i94572#: Context direction for drawing objects 2008-11-18 12:25:50 +0100 ama r263761 : Fix #i94572#: Context direction for drawing objects 2008-11-18 12:02:30 +0100 ama r263759 : Fix #i94572#: Context direction for drawing objects
2008-12-16 13:30:53 +00:00
/// @return BoundRect plus distance.
SwRect GetBoundRectOfAnchoredObj( const SdrObject* pObj );
2000-09-18 16:15:01 +00:00
/// @return UserCall of goup object (if applicable).
SwContact* GetUserCall( const SdrObject* );
2000-09-18 16:15:01 +00:00
/// @return TRUE if the SrdObject is a Marquee object.
bool IsMarqueeTextObj( const SdrObject& rObj );
2000-09-18 16:15:01 +00:00
/// Base class for the following contact objects (frame + draw objects).
class SW_DLLPUBLIC SwContact : public SdrObjUserCall, public SwClient
2000-09-18 16:15:01 +00:00
{
/** boolean, indicating destruction of contact object
important note: boolean has to be set at the beginning of each destructor
in the subclasses using method <SetInDTOR()>. */
bool mbInDTOR;
/** method to move object to visible/invisible layer
Implementation for the public method <MoveObjToVisibleLayer(..)>
and <MoveObjToInvisibleLayer(..)>
If object is in invisble respectively visible layer, its moved to
the corresponding visible respectively invisible layers.
For group object the members are individually moved to the corresponding
layer, because <SdrObjGroup::GetLayer()> does return 0, if members
aren't on the same layer as the group object, and
<SdrObjGroup::SetLayer(..)|NbcSetLayer(..)> sets also the layer of
the members.
@author OD
@param _bToVisible
input parameter - boolean indicating, if object has to be moved to
visible (== true) or invisible (== false) layer.
@param _pDrawObj
input parameter, which will be changed - drawing object, which will
change its layer.
*/
void MoveObjToLayer( const bool _bToVisible,
SdrObject* _pDrawObj );
protected:
void SetInDTOR();
virtual void SwClientNotify(const SwModify&, const SfxHint& rHint) override;
2000-09-18 16:15:01 +00:00
public:
/// For reader. Only the connection is created.
SwContact( SwFrameFormat *pToRegisterIn );
virtual ~SwContact() override;
2000-09-18 16:15:01 +00:00
virtual const SwAnchoredObject* GetAnchoredObj( const SdrObject* _pSdrObj ) const = 0;
virtual SwAnchoredObject* GetAnchoredObj( SdrObject* _pSdrObj ) = 0;
2000-09-18 16:15:01 +00:00
virtual const SdrObject *GetMaster() const = 0;
virtual SdrObject *GetMaster() = 0;
virtual void SetMaster( SdrObject* _pNewMaster ) = 0;
2000-09-18 16:15:01 +00:00
SwFrameFormat *GetFormat() { return static_cast<SwFrameFormat*>(GetRegisteredIn()); }
const SwFrameFormat *GetFormat() const
{ return static_cast<const SwFrameFormat*>(GetRegisteredIn()); }
bool IsInDTOR() const { return mbInDTOR;}
/** method to move drawing object to corresponding visible layer
uses method <MoveObjToLayer(..)>
@author OD
@param _pDrawObj
drawing object, which will be moved to the visible layer
*/
virtual void MoveObjToVisibleLayer( SdrObject* _pDrawObj );
/** method to move drawing object to corresponding invisible layer
uses method <MoveObjToLayer(..)>
@author OD
@param _pDrawObj
drawing object, which will be moved to the visible layer
*/
virtual void MoveObjToInvisibleLayer( SdrObject* _pDrawObj );
/** some virtual helper methods for information
about the object (Writer fly frame resp. drawing object) */
const SwFormatAnchor& GetAnchorFormat() const
{
assert( GetFormat() );
return GetFormat()->GetAnchor();
}
RndStdIds GetAnchorId() const { return GetAnchorFormat().GetAnchorId(); }
bool ObjAnchoredAtPage() const { return GetAnchorId() == FLY_AT_PAGE; }
bool ObjAnchoredAtFly() const { return GetAnchorId() == FLY_AT_FLY; }
bool ObjAnchoredAtPara() const { return GetAnchorId() == FLY_AT_PARA; }
bool ObjAnchoredAtChar() const { return GetAnchorId() == FLY_AT_CHAR; }
bool ObjAnchoredAsChar() const { return GetAnchorId() == FLY_AS_CHAR; }
const SwPosition& GetContentAnchor() const
{
assert( GetAnchorFormat().GetContentAnchor() );
return *(GetAnchorFormat().GetContentAnchor());
}
const SwIndex& GetContentAnchorIndex() const;
/** get data collection of anchored objects, handled by with contact
*/
virtual void GetAnchoredObjs( std::list<SwAnchoredObject*>& _roAnchoredObjs ) const = 0;
/** get minimum order number of anchored objects handled by with contact
*/
sal_uInt32 GetMinOrdNum() const;
/** get maximum order number of anchored objects handled by with contact
*/
sal_uInt32 GetMaxOrdNum() const;
2000-09-18 16:15:01 +00:00
};
/** ContactObject for connection between frames (or their formats respectively)
in SwClient and the drawobjects of Drawing (DsrObjUserCall). */
2000-09-18 16:15:01 +00:00
class SW_DLLPUBLIC SwFlyDrawContact final : public SwContact
2000-09-18 16:15:01 +00:00
{
private:
SwFlyDrawObj* mpMasterObj;
void SwClientNotify(const SwModify&, const SfxHint& rHint) override;
2000-09-18 16:15:01 +00:00
public:
/// Creates DrawObject and registers it with the Model.
SwFlyDrawContact( SwFlyFrameFormat* pToRegisterIn, SdrModel* pMod );
virtual ~SwFlyDrawContact() override;
virtual const SwAnchoredObject* GetAnchoredObj( const SdrObject* _pSdrObj ) const override;
virtual SwAnchoredObject* GetAnchoredObj( SdrObject* _pSdrObj ) override;
2000-09-18 16:15:01 +00:00
virtual const SdrObject* GetMaster() const override;
virtual SdrObject* GetMaster() override;
virtual void SetMaster( SdrObject* _pNewMaster ) override;
/** override methods to control Writer fly frames,
which are linked, and to assure that all objects anchored at/inside the
Writer fly frame are also made visible/invisible. */
virtual void MoveObjToVisibleLayer( SdrObject* _pDrawObj ) override;
virtual void MoveObjToInvisibleLayer( SdrObject* _pDrawObj ) override;
/** get data collection of anchored objects handled by with contact
*/
virtual void GetAnchoredObjs( std::list<SwAnchoredObject*>& _roAnchoredObjs ) const override;
2000-09-18 16:15:01 +00:00
};
/** new class for re-direct methods calls at a 'virtual'
drawing object to its referenced object. */
class SwDrawVirtObj : public SdrVirtObj
{
private:
// data for connection to writer layout
/** anchored drawing object instance for the
'virtual' drawing object */
SwAnchoredDrawObject maAnchoredDrawObj;
/** writer-drawing contact object the 'virtual' drawing object is controlled by.
This object is also the <UserCall> of the drawing object, if it's
inserted into the drawing layer. */
SwDrawContact& mrDrawContact;
protected:
/** AW: Need own sdr::contact::ViewContact since AnchorPos from parent is
not used but something own (top left of new SnapRect minus top left
of original SnapRect) */
virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact() override;
public:
SwDrawVirtObj( SdrObject& _rNewObj,
SwDrawContact& _rDrawContact );
virtual ~SwDrawVirtObj() override;
/// access to offset
virtual const Point GetOffset() const override;
virtual SwDrawVirtObj* Clone() const override;
SwDrawVirtObj& operator= (const SwDrawVirtObj& rObj);
/// connection to writer layout
const SwAnchoredObject& GetAnchoredObj() const { return maAnchoredDrawObj; }
SwAnchoredObject& AnchoredObj() { return maAnchoredDrawObj; }
const SwFrame* GetAnchorFrame() const;
SwFrame* AnchorFrame();
void RemoveFromWriterLayout();
/// connection to drawing layer
void AddToDrawingPage();
void RemoveFromDrawingPage();
/** is 'virtual' drawing object connected to writer layout and
/ to drawing layer. */
bool IsConnected() const;
virtual void NbcSetAnchorPos(const Point& rPnt) override;
/// All overridden methods which need to use the offset
virtual void RecalcBoundRect() override;
virtual ::basegfx::B2DPolyPolygon TakeXorPoly() const override;
virtual ::basegfx::B2DPolyPolygon TakeContour() const override;
virtual SdrHdl* GetHdl(sal_uInt32 nHdlNum) const override;
virtual void NbcMove(const Size& rSiz) override;
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
virtual void NbcRotate(const Point& rRef, long nAngle, double sn, double cs) override;
virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
virtual void NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear) override;
virtual void Move(const Size& rSiz) override;
virtual void Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bUnsetRelative = true) override;
virtual void Rotate(const Point& rRef, long nAngle, double sn, double cs) override;
virtual void Mirror(const Point& rRef1, const Point& rRef2) override;
virtual void Shear(const Point& rRef, long nAngle, double tn, bool bVShear) override;
virtual void RecalcSnapRect() override;
virtual const Rectangle& GetSnapRect() const override;
virtual void SetSnapRect(const Rectangle& rRect) override;
virtual void NbcSetSnapRect(const Rectangle& rRect) override;
virtual const Rectangle& GetLogicRect() const override;
virtual void SetLogicRect(const Rectangle& rRect) override;
virtual void NbcSetLogicRect(const Rectangle& rRect) override;
virtual Point GetSnapPoint(sal_uInt32 i) const override;
virtual Point GetPoint(sal_uInt32 i) const override;
virtual void NbcSetPoint(const Point& rPnt, sal_uInt32 i) override;
virtual bool HasTextEdit() const override;
virtual SdrLayerID GetLayer() const override;
virtual void NbcSetLayer(SdrLayerID nLayer) override;
virtual void SetLayer(SdrLayerID nLayer) override;
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
virtual void SetBoundRectDirty() override;
virtual const Rectangle& GetCurrentBoundRect() const override;
virtual const Rectangle& GetLastBoundRect() const override;
};
bool CheckControlLayer( const SdrObject *pObj );
/** ContactObject for connection of formats as representatives of draw objects
in SwClient and the objects themselves in Drawing (SDrObjUserCall). */
class NestedUserCallHdl;
2000-09-18 16:15:01 +00:00
class SwDrawContact : public SwContact
{
private:
/** anchored drawing object instance for the
'master' drawing object */
SwAnchoredDrawObject maAnchoredDrawObj;
/** data structure for collecting 'virtual'
drawing object supporting drawing objects in headers/footers. */
std::list<SwDrawVirtObj*> maDrawVirtObjs;
/** boolean indicating set 'master' drawing
object has been cleared. */
bool mbMasterObjCleared : 1;
/** internal flag to indicate that disconnect
from layout is in progress */
bool mbDisconnectInProgress : 1;
/** Needed data for handling of nested <SdrObjUserCall> events in
method <Changed_(..)> */
bool mbUserCallActive : 1;
/** event type, which is handled for <mpSdrObjHandledByCurrentUserCall>.
Note: value only valid, if <mbUserCallActive> is true. */
SdrUserCallType meEventTypeOfCurrentUserCall;
friend class NestedUserCallHdl;
/** unary function used by <list> iterator to find a disconnected 'virtual'
drawing object */
struct UsedOrUnusedVirtObjPred
{
bool mbUsedPred;
UsedOrUnusedVirtObjPred( bool _bUsed ) : mbUsedPred( _bUsed ) {};
bool operator() ( const SwDrawVirtObj* _pDrawVirtObj )
{
if ( mbUsedPred )
{
return _pDrawVirtObj->IsConnected();
}
else
{
return !_pDrawVirtObj->IsConnected();
}
}
};
2000-09-18 16:15:01 +00:00
/** unary function used by <list> iterator to find a 'virtual' drawing
object anchored at a given frame */
struct VirtObjAnchoredAtFramePred
{
const SwFrame* mpAnchorFrame;
VirtObjAnchoredAtFramePred( const SwFrame& _rAnchorFrame );
bool operator() ( const SwDrawVirtObj* _pDrawVirtObj );
};
2000-09-18 16:15:01 +00:00
/// method for adding/removing 'virtual' drawing object.
SwDrawVirtObj* CreateVirtObj();
static void DestroyVirtObj( SwDrawVirtObj* pVirtObj );
void RemoveAllVirtObjs();
2000-09-18 16:15:01 +00:00
void InvalidateObjs_( const bool _bUpdateSortedObjsList = false );
SwDrawContact( const SwDrawContact& ) = delete;
SwDrawContact& operator=( const SwDrawContact& ) = delete;
protected:
virtual void SwClientNotify(const SwModify&, const SfxHint& rHint) override;
public:
SwDrawContact( SwFrameFormat *pToRegisterIn, SdrObject *pObj );
virtual ~SwDrawContact() override;
virtual const SwAnchoredObject* GetAnchoredObj( const SdrObject* _pSdrObj ) const override;
virtual SwAnchoredObject* GetAnchoredObj( SdrObject* _pSdrObj ) override;
virtual const SdrObject* GetMaster() const override;
virtual SdrObject* GetMaster() override;
virtual void SetMaster( SdrObject* _pNewMaster ) override;
const SwFrame* GetAnchorFrame( const SdrObject* _pDrawObj = nullptr ) const;
SwFrame* GetAnchorFrame( SdrObject* _pDrawObj = nullptr );
inline const SwPageFrame* GetPageFrame() const
{
return maAnchoredDrawObj.GetPageFrame();
}
inline SwPageFrame* GetPageFrame()
{
return maAnchoredDrawObj.GetPageFrame();
}
void ChkPage();
SwPageFrame* FindPage( const SwRect &rRect );
/** Inserts SdrObject in the arrays of the layout ((SwPageFrame and SwFrame).
The anchor is determined according to the attribute SwFormatAnchor.
If required the object gets unregistered with the old anchor. */
void ConnectToLayout( const SwFormatAnchor *pAnch = nullptr );
/** method to insert 'master' drawing object
into drawing page */
void InsertMasterIntoDrawPage();
void DisconnectFromLayout( bool _bMoveMasterToInvisibleLayer = true );
/** disconnect for a dedicated drawing object -
could be 'master' or 'virtual'. */
void DisconnectObjFromLayout( SdrObject* _pDrawObj );
/** method to remove 'master' drawing object
from drawing page.
To be used by the undo for delete of object. Call it after method
<DisconnectFromLayout( bool = true )> is already performed.
Note: <DisconnectFromLayout( bool )> no longer removes the 'master'
drawing object from drawing page. */
void RemoveMasterFromDrawPage();
/** get drawing object ('master' or 'virtual')
by frame. */
SdrObject* GetDrawObjectByAnchorFrame( const SwFrame& _rAnchorFrame );
/// Virtual methods of SdrObjUserCall.
virtual void Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectangle& rOldBoundRect) override;
/** Used by Changed() and by UndoDraw.
Notifies paragraphs that have to get out of the way. */
void Changed_(const SdrObject& rObj, SdrUserCallType eType, const Rectangle* pOldBoundRect);
2000-09-18 16:15:01 +00:00
/// Moves all SW-connections to new Master)
void ChangeMasterObject( SdrObject *pNewMaster );
2000-09-18 16:15:01 +00:00
SwDrawVirtObj* AddVirtObj();
2000-09-18 16:15:01 +00:00
void NotifyBackgrdOfAllVirtObjs( const Rectangle* pOldBoundRect );
/** get data collection of anchored objects, handled by with contact
*/
static void GetTextObjectsFromFormat( std::list<SdrTextObj*>&, SwDoc* );
virtual void GetAnchoredObjs( std::list<SwAnchoredObject*>& _roAnchoredObjs ) const override;
2000-09-18 16:15:01 +00:00
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */