diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2007-04-11 15:29:45 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2007-04-11 15:29:45 +0000 |
commit | dcd65f1833f28da1ded84881e4387191f5f55866 (patch) | |
tree | 654597cf8572bb0338a56df7e85bad049bf2ccd7 /svx/inc/svx/svdxcgv.hxx | |
parent | 3c774a1d0bbd32398765f4b3566146743c12c8f2 (diff) |
INTEGRATION: CWS hedaburemove01 (1.1.2); FILE ADDED
2007/04/04 15:11:15 vg 1.1.2.2: resync to SRC680_m207
2007/02/09 16:53:58 vg 1.1.2.1: #72503# get rid of hedabu procedure: Moving headers to svx/inc/svx and correspondent necessary changes
Diffstat (limited to 'svx/inc/svx/svdxcgv.hxx')
-rw-r--r-- | svx/inc/svx/svdxcgv.hxx | 176 |
1 files changed, 176 insertions, 0 deletions
diff --git a/svx/inc/svx/svdxcgv.hxx b/svx/inc/svx/svdxcgv.hxx new file mode 100644 index 0000000000..9c6e48a747 --- /dev/null +++ b/svx/inc/svx/svdxcgv.hxx @@ -0,0 +1,176 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdxcgv.hxx,v $ + * + * $Revision: 1.2 $ + * + * last change: $Author: vg $ $Date: 2007-04-11 16:29:09 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +#ifndef _SVDXCGV_HXX +#define _SVDXCGV_HXX + +#ifndef _SVDEDXV_HXX +#include <svx/svdedxv.hxx> +#endif + +#ifndef _GDIMTF_HXX //autogen +#include <vcl/gdimtf.hxx> +#endif + +#ifndef INCLUDED_SVXDLLAPI_H +#include "svx/svxdllapi.h" +#endif + +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +// +// @@@@@ @@ @@ @@@@ @@ @@ @@@@ @@ @@ @@@@ @@@@@ @@ @@ @@ @@@@@ @@ @@ +// @@ @@@ @@@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ +// @@ @@@@@ @@ @@ @@ @@ @@ @@@@@@ @@ @@ @@ @@ @@ @@ @@ @ @@ +// @@@@ @@@ @@ @@@@@@ @@@@@@ @@@@@@ @@ @@@ @@@@ @@@@@ @@ @@@@ @@@@@@@ +// @@ @@@@@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@ @@@ @@ @@ @@@@@@@ +// @@ @@@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@ +// @@@@@ @@ @@ @@@@ @@ @@ @@ @@ @@ @@ @@@@@ @@@@@ @ @@ @@@@@ @@ @@ +// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// + +class SVX_DLLPUBLIC SdrExchangeView: public SdrObjEditView +{ + friend class SdrPageView; + +protected: + + void ImpGetPasteObjList(Point& rPos, SdrObjList*& rpLst); + void ImpPasteObject(SdrObject* pObj, SdrObjList& rLst, const Point& rCenter, const Size& rSiz, const MapMode& rMap, UINT32 nOptions); + BOOL ImpGetPasteLayer(const SdrObjList* pObjList, SdrLayerID& rLayer) const; + Point GetPastePos(SdrObjList* pLst, OutputDevice* pOut=NULL); + + // liefert True, wenn rPt geaendert wurde + BOOL ImpLimitToWorkArea(Point& rPt) const; + +protected: + // #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView + SdrExchangeView(SdrModel* pModel1, OutputDevice* pOut = 0L); + +public: + // Alle markierten Objekte auf dem angegebenen OutputDevice ausgeben. + virtual void DrawMarkedObj(OutputDevice& rOut, const Point& rOfs) const; + + // Z.B. fuer's Clipboard, Drag&Drop, ... + // Alle markierten Objekte in ein Metafile stecken. Z.Zt. noch etwas + // buggee (Offset..., Fremdgrafikobjekte (SdrGrafObj), Virtuelle + // Objektkopien (SdrVirtObj) mit Ankerpos<>(0,0)). + virtual GDIMetaFile GetMarkedObjMetaFile(BOOL bNoVDevIfOneMtfMarked=FALSE) const; + + // Alle markierten Objekte auf eine Bitmap malen. Diese hat die Farbtiefe + // und Aufloesung des Bildschirms. + virtual Bitmap GetMarkedObjBitmap(BOOL bNoVDevIfOneBmpMarked=FALSE) const; + + // Alle markierten Objekte in ein neues Model kopieren. Dieses neue Model + // hat dann genau eine Page. Das Flag PageNotValid an diesem Model ist + // gesetzt. Daran ist zu erkennen, dass nur die Objekte der Page Gueltikeit + // haben, die Page sebst jedoch nicht (Seitengroesse, Raender). Das neue + // Model wird auf dem Heap erzeugt und wird an den Aufrufer dieser Methode + // uebergeben. Dieser hat es dann spaeter zu entsorgen. + // Beim einfuegen der markierten Objekte in die eine Page des neuen Model + // findet ein Merging der seitenlokalen Layer statt. Sollte kein Platz mehr + // fuer weitere seitenlokale Layer sein, wird den entsprechenden Objekten + // der Default-Layer zugewiesen (Layer 0, (dokumentglobaler Standardlayer). + virtual SdrModel* GetMarkedObjModel() const; + + void DrawAllMarked(OutputDevice& rOut, const Point& rOfs) const { DrawMarkedObj(rOut,rOfs); } + GDIMetaFile GetAllMarkedMetaFile(BOOL bNoVDevIfOneMtfMarked=FALSE) const { return GetMarkedObjMetaFile(bNoVDevIfOneMtfMarked); } + Bitmap GetAllMarkedBitmap(BOOL bNoVDevIfOneBmpMarked=FALSE) const { return GetMarkedObjBitmap(bNoVDevIfOneBmpMarked); } + Graphic GetAllMarkedGraphic() const; + SdrModel* GetAllMarkedModel() const { return GetMarkedObjModel(); } + + /** Generate a Graphic for the given draw object in the given model + + @param pModel + Must not be NULL. Denotes the draw model the object is a part + of. + + @param pObj + The object (can also be a group object) to retrieve a Graphic + for. Must not be NULL. + + @return a graphical representation of the given object, as it + appears on screen (e.g. with rotation, if any, applied). + */ + static Graphic GetObjGraphic( SdrModel* pModel, SdrObject* pObj ); + + // Bestimmung des View-Mittelpunktes, z.B. zum Pasten + Point GetViewCenter(const OutputDevice* pOut=NULL) const; + + // Bei allen Paste-Methoden werden die neuen Draw-Objekte markiert. + // Wird der Parameter bAddMark auf TRUE gesetzt, so werden die neuen + // DrawObjekte zu einer bereits bestehenden Selektion "hinzumarkiert". + // Dieser Fall ist fuer Drag&Drop mit mehreren Items gedacht. + // Die Methoden mit Point-Parameter fuegen neue Objekte zentriert an + // dieser Position ein, die anderen zentriert am 1.OutputDevice der View. + // Ist der Parameter pPg gesetzt, werden die Objekte and dieser Seite + // eingefuegt. Die Positionierung (rPos bzw. Zentrierung) bezieht sich + // dann nichtmehr auf die View sondern auf die Page. + // Hinweis: SdrObjList ist Basisklasse von SdrPage. + // Die Methoden liefern TRUE, wenn die Objekte erfolgreich erzeugt und + // eingefuegt wurden. Bei pLst=FALSE und kein TextEdit aktiv kann man + // sich dann auch darauf verlassen, dass diese an der View markiert sind. + // Andernfalls erfolgt die Markierung nur, wenn pLst z.Zt. auch an der + // View angezeigt wird. + // Gueltige Werte fuer nOptions sind SDRINSERT_DONTMARK und + // SDRINSERT_ADDMARK (siehe svdedtv.hxx). + BOOL Paste(const GDIMetaFile& rMtf, SdrObjList* pLst=NULL, OutputDevice* pOut=NULL, UINT32 nOptions=0) { return Paste(rMtf,GetPastePos(pLst,pOut),pLst,nOptions); } + BOOL Paste(const GDIMetaFile& rMtf, const Point& rPos, SdrObjList* pLst=NULL, UINT32 nOptions=0); + BOOL Paste(const Bitmap& rBmp, SdrObjList* pLst=NULL, OutputDevice* pOut=NULL, UINT32 nOptions=0) { return Paste(rBmp,GetPastePos(pLst,pOut),pLst,nOptions); } + BOOL Paste(const Bitmap& rBmp, const Point& rPos, SdrObjList* pLst=NULL, UINT32 nOptions=0); + BOOL Paste(const SdrModel& rMod, SdrObjList* pLst=NULL, OutputDevice* pOut=NULL, UINT32 nOptions=0) { return Paste(rMod,GetPastePos(pLst,pOut),pLst,nOptions); } + virtual BOOL Paste(const SdrModel& rMod, const Point& rPos, SdrObjList* pLst=NULL, UINT32 nOptions=0); + BOOL Paste(const String& rStr, SdrObjList* pLst=NULL, OutputDevice* pOut=NULL, UINT32 nOptions=0) { return Paste(rStr,GetPastePos(pLst,pOut),pLst,nOptions); } + BOOL Paste(const String& rStr, const Point& rPos, SdrObjList* pLst=NULL, UINT32 nOptions=0); + // der USHORT eFormat nimmt Werte des enum EETextFormat entgegen + BOOL Paste(SvStream& rInput, const String& rBaseURL, USHORT eFormat, SdrObjList* pLst=NULL, OutputDevice* pOut=NULL, UINT32 nOptions=0) { return Paste(rInput,rBaseURL,eFormat,GetPastePos(pLst,pOut),pLst,nOptions); } + BOOL Paste(SvStream& rInput, const String& rBaseURL, USHORT eFormat, const Point& rPos, SdrObjList* pLst=NULL, UINT32 nOptions=0); + + // Feststellen, ob ein bestimmtes Format ueber Drag&Drop bzw. ueber's + // Clipboard angenommen werden kann. + BOOL IsExchangeFormatSupported(ULONG nFormat) const; + + BOOL Cut( ULONG nFormat = SDR_ANYFORMAT ); + void CutMarked( ULONG nFormat=SDR_ANYFORMAT ); + + BOOL Yank( ULONG nFormat = SDR_ANYFORMAT ); + void YankMarked( ULONG nFormat=SDR_ANYFORMAT ); + + BOOL Paste( Window* pWin = NULL, ULONG nFormat = SDR_ANYFORMAT ); + BOOL PasteClipboard( OutputDevice* pOut = NULL, ULONG nFormat = SDR_ANYFORMAT, UINT32 nOptions = 0 ); +}; + +#endif //_SVDXCGV_HXX |