1cdf0e10cSrcweir /************************************************************************* 2cdf0e10cSrcweir * 3cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4cdf0e10cSrcweir * 5cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6cdf0e10cSrcweir * 7cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8cdf0e10cSrcweir * 9cdf0e10cSrcweir * This file is part of OpenOffice.org. 10cdf0e10cSrcweir * 11cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14cdf0e10cSrcweir * 15cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20cdf0e10cSrcweir * 21cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25cdf0e10cSrcweir * 26cdf0e10cSrcweir ************************************************************************/ 27cdf0e10cSrcweir #ifndef _FESH_HXX 28cdf0e10cSrcweir #define _FESH_HXX 29cdf0e10cSrcweir 30cdf0e10cSrcweir #include <com/sun/star/text/RelOrientation.hpp> 31cdf0e10cSrcweir #include <com/sun/star/embed/XClassifiedObject.hpp> 32cdf0e10cSrcweir #include <com/sun/star/embed/XEmbeddedObject.hpp> 33cdf0e10cSrcweir 34cdf0e10cSrcweir #include <svx/svdobj.hxx> 35cdf0e10cSrcweir #include "swdllapi.h" 36cdf0e10cSrcweir #include <editsh.hxx> 37cdf0e10cSrcweir #include <flyenum.hxx> 38cdf0e10cSrcweir 39cdf0e10cSrcweir // OD 25.06.2003 #108784# 40cdf0e10cSrcweir #include <svx/svdtypes.hxx> 41cdf0e10cSrcweir 42cdf0e10cSrcweir #include <svtools/embedhlp.hxx> 43cdf0e10cSrcweir 44cdf0e10cSrcweir #ifndef INCLUDED_VECTOR 45cdf0e10cSrcweir #include <vector> 46cdf0e10cSrcweir #define INCLUDED_VECTOR 47cdf0e10cSrcweir #endif 48cdf0e10cSrcweir 49cdf0e10cSrcweir 50cdf0e10cSrcweir class SwFlyFrm; 51cdf0e10cSrcweir class SwTabCols; 52cdf0e10cSrcweir class SvxBrushItem; 53cdf0e10cSrcweir class SvxFrameDirectionItem; 54cdf0e10cSrcweir class SwTableAutoFmt; 55cdf0e10cSrcweir class SwFrm; 56cdf0e10cSrcweir class SwFmtFrmSize; 57cdf0e10cSrcweir class SwFmtRowSplit; 58cdf0e10cSrcweir class SvxBorderLine; 59cdf0e10cSrcweir class SdrObject; 60cdf0e10cSrcweir class Color; 61cdf0e10cSrcweir class Outliner; 62cdf0e10cSrcweir class SotDataObject; 63cdf0e10cSrcweir class SwFrmFmt; 64cdf0e10cSrcweir struct SwSortOptions; 65cdf0e10cSrcweir class SdrMarkList; 66cdf0e10cSrcweir 67cdf0e10cSrcweir namespace svx 68cdf0e10cSrcweir { 69cdf0e10cSrcweir class ISdrObjectFilter; 70cdf0e10cSrcweir } 71cdf0e10cSrcweir 72cdf0e10cSrcweir 73cdf0e10cSrcweir // return values for GetFrmType() und GetSelFrmType(). 74cdf0e10cSrcweir //! values can be combined via logival or 75cdf0e10cSrcweir #define FRMTYPE_NONE (sal_uInt16) 0 76cdf0e10cSrcweir #define FRMTYPE_PAGE (sal_uInt16) 1 77cdf0e10cSrcweir #define FRMTYPE_HEADER (sal_uInt16) 2 78cdf0e10cSrcweir #define FRMTYPE_FOOTER (sal_uInt16) 4 79cdf0e10cSrcweir #define FRMTYPE_BODY (sal_uInt16) 8 80cdf0e10cSrcweir #define FRMTYPE_COLUMN (sal_uInt16) 16 81cdf0e10cSrcweir #define FRMTYPE_TABLE (sal_uInt16) 32 82cdf0e10cSrcweir #define FRMTYPE_FLY_FREE (sal_uInt16) 64 83cdf0e10cSrcweir #define FRMTYPE_FLY_ATCNT (sal_uInt16) 128 84cdf0e10cSrcweir #define FRMTYPE_FLY_INCNT (sal_uInt16) 256 85cdf0e10cSrcweir #define FRMTYPE_FOOTNOTE (sal_uInt16) 512 86cdf0e10cSrcweir #define FRMTYPE_FTNPAGE (sal_uInt16) 1024 87cdf0e10cSrcweir #define FRMTYPE_FLY_ANY (sal_uInt16) 2048 88cdf0e10cSrcweir #define FRMTYPE_DRAWOBJ (sal_uInt16) 4096 89cdf0e10cSrcweir #define FRMTYPE_COLSECT (sal_uInt16) 8192 90cdf0e10cSrcweir #define FRMTYPE_COLSECTOUTTAB (sal_uInt16) 16384 91cdf0e10cSrcweir 92cdf0e10cSrcweir #define FRMTYPE_ANYCOLSECT ( FRMTYPE_COLSECT | FRMTYPE_COLSECTOUTTAB ) 93cdf0e10cSrcweir 94cdf0e10cSrcweir //! values can be combined via logival or 95cdf0e10cSrcweir #define GOTOOBJ_DRAW_CONTROL (sal_uInt16) 1 96cdf0e10cSrcweir #define GOTOOBJ_DRAW_SIMPLE (sal_uInt16) 2 97cdf0e10cSrcweir #define GOTOOBJ_DRAW_ANY (sal_uInt16) 3 98cdf0e10cSrcweir #define GOTOOBJ_FLY_FRM (sal_uInt16) 4 99cdf0e10cSrcweir #define GOTOOBJ_FLY_GRF (sal_uInt16) 8 100cdf0e10cSrcweir #define GOTOOBJ_FLY_OLE (sal_uInt16) 16 101cdf0e10cSrcweir #define GOTOOBJ_FLY_ANY (sal_uInt16) 28 102cdf0e10cSrcweir #define GOTOOBJ_GOTO_ANY (sal_uInt16) 31 103cdf0e10cSrcweir 104cdf0e10cSrcweir //! values can be combined via logival or 105cdf0e10cSrcweir #define FLYPROTECT_CONTENT (sal_uInt16) 1 // kann verodert werden! 106cdf0e10cSrcweir #define FLYPROTECT_SIZE (sal_uInt16) 2 107cdf0e10cSrcweir #define FLYPROTECT_POS (sal_uInt16) 4 108cdf0e10cSrcweir #define FLYPROTECT_PARENT (sal_uInt16) 8 // nur Parents untersuchen 109cdf0e10cSrcweir #define FLYPROTECT_FIXED (sal_uInt16) 16 // nur nicht aufhebbarer Schutz 110cdf0e10cSrcweir // z.B. durch OLE-Server, gilt auch 111cdf0e10cSrcweir // fuer Dialog 112cdf0e10cSrcweir 113cdf0e10cSrcweir 114cdf0e10cSrcweir enum ObjCntType //Fuer das Ermitteln des Cntnts per Positon (D&D) 115cdf0e10cSrcweir { 116cdf0e10cSrcweir OBJCNT_NONE, 117cdf0e10cSrcweir OBJCNT_FLY, 118cdf0e10cSrcweir OBJCNT_GRF, 119cdf0e10cSrcweir OBJCNT_OLE, 120cdf0e10cSrcweir OBJCNT_SIMPLE, 121cdf0e10cSrcweir OBJCNT_CONTROL, 122cdf0e10cSrcweir OBJCNT_URLBUTTON, 123cdf0e10cSrcweir 124cdf0e10cSrcweir OBJCNT_GROUPOBJ, 125cdf0e10cSrcweir OBJCNT_DONTCARE // nicht bestimmbar - unterschiedliche Objecte selektiert 126cdf0e10cSrcweir }; 127cdf0e10cSrcweir 128cdf0e10cSrcweir //fuer GetAnyCurRect 129cdf0e10cSrcweir enum CurRectType 130cdf0e10cSrcweir { 131cdf0e10cSrcweir RECT_PAGE, //Rect der aktuellen Seite. 132cdf0e10cSrcweir RECT_PAGE_CALC, //... Seite wird ggf. Formatiert 133cdf0e10cSrcweir RECT_PAGE_PRT, //Rect der aktuellen PrtArea der Seite 134cdf0e10cSrcweir RECT_FRM, //Rect des aktuellen Rahmen 135cdf0e10cSrcweir RECT_FLY_EMBEDDED, //Rect des aktuellen FlyFrm 136cdf0e10cSrcweir RECT_FLY_PRT_EMBEDDED, //Rect der PrtArea des FlyFrm 137cdf0e10cSrcweir RECT_SECTION, //Rect des aktuellen Bereichs 138cdf0e10cSrcweir RECT_OUTTABSECTION, //Rect des aktuellen Bereichs, 139cdf0e10cSrcweir // aber ausserhalb der Tabelle 140cdf0e10cSrcweir RECT_SECTION_PRT, //Rect der aktuellen PrtArea des Bereichs 141cdf0e10cSrcweir RECT_OUTTABSECTION_PRT, //Rect der aktuellen PrtArea des Bereichs, 142cdf0e10cSrcweir // aber ausserhalb der Tabelle 143cdf0e10cSrcweir RECT_HEADERFOOTER, //Rect des aktuellen Headers/Footer 144cdf0e10cSrcweir RECT_HEADERFOOTER_PRT, //Rect der PrtArea des aktuellen Headers/Footers 145cdf0e10cSrcweir 146cdf0e10cSrcweir RECT_PAGES_AREA //Rect covering the pages area 147cdf0e10cSrcweir }; 148cdf0e10cSrcweir 149cdf0e10cSrcweir struct SwGetCurColNumPara 150cdf0e10cSrcweir { 151cdf0e10cSrcweir const SwFrmFmt* pFrmFmt; 152cdf0e10cSrcweir const SwRect* pPrtRect, *pFrmRect; 153cdf0e10cSrcweir SwGetCurColNumPara() : pFrmFmt( 0 ), pPrtRect( 0 ), pFrmRect( 0 ) {} 154cdf0e10cSrcweir }; 155cdf0e10cSrcweir 156cdf0e10cSrcweir #define SW_PASTESDR_INSERT 1 157cdf0e10cSrcweir #define SW_PASTESDR_REPLACE 2 158cdf0e10cSrcweir #define SW_PASTESDR_SETATTR 3 159cdf0e10cSrcweir 160cdf0e10cSrcweir #define SW_ADD_SELECT 1 161cdf0e10cSrcweir #define SW_ENTER_GROUP 2 162cdf0e10cSrcweir #define SW_LEAVE_FRAME 4 163cdf0e10cSrcweir 164cdf0e10cSrcweir #define SW_MOVE_UP 0 165cdf0e10cSrcweir #define SW_MOVE_DOWN 1 166cdf0e10cSrcweir #define SW_MOVE_LEFT 2 167cdf0e10cSrcweir #define SW_MOVE_RIGHT 3 168cdf0e10cSrcweir 169cdf0e10cSrcweir #define SW_TABCOL_NONE 0 170cdf0e10cSrcweir #define SW_TABCOL_HORI 1 171cdf0e10cSrcweir #define SW_TABCOL_VERT 2 172cdf0e10cSrcweir #define SW_TABROW_HORI 3 173cdf0e10cSrcweir #define SW_TABROW_VERT 4 174cdf0e10cSrcweir // --> FME 2004-07-30 #i32329# Enhanced table selection 175cdf0e10cSrcweir #define SW_TABSEL_HORI 5 176cdf0e10cSrcweir #define SW_TABSEL_HORI_RTL 6 177cdf0e10cSrcweir #define SW_TABROWSEL_HORI 7 178cdf0e10cSrcweir #define SW_TABROWSEL_HORI_RTL 8 179cdf0e10cSrcweir #define SW_TABCOLSEL_HORI 9 180cdf0e10cSrcweir #define SW_TABSEL_VERT 10 181cdf0e10cSrcweir #define SW_TABROWSEL_VERT 11 182cdf0e10cSrcweir #define SW_TABCOLSEL_VERT 12 183cdf0e10cSrcweir // <-- 184cdf0e10cSrcweir 185cdf0e10cSrcweir class SdrDropMarkerOverlay; 186cdf0e10cSrcweir 187cdf0e10cSrcweir class SW_DLLPUBLIC SwFEShell : public SwEditShell 188cdf0e10cSrcweir { 189cdf0e10cSrcweir SdrDropMarkerOverlay *pChainFrom, *pChainTo; 190cdf0e10cSrcweir sal_Bool bCheckForOLEInCaption; 191cdf0e10cSrcweir 192cdf0e10cSrcweir SW_DLLPRIVATE SwFlyFrm *FindFlyFrm() const; 193cdf0e10cSrcweir SW_DLLPRIVATE SwFlyFrm *FindFlyFrm( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& ) const; 194cdf0e10cSrcweir 195cdf0e10cSrcweir //Actions fuer alle Shells beenden und ChangeLink rufen. 196cdf0e10cSrcweir SW_DLLPRIVATE void EndAllActionAndCall(); 197cdf0e10cSrcweir 198cdf0e10cSrcweir SW_DLLPRIVATE void ScrollTo( const Point &rPt ); 199cdf0e10cSrcweir 200cdf0e10cSrcweir // OD 25.06.2003 #108784# - correct type of 1st parameter 201cdf0e10cSrcweir SW_DLLPRIVATE void ChangeOpaque( SdrLayerID nLayerId ); 202cdf0e10cSrcweir 203cdf0e10cSrcweir // Used for mouse operations on a table: 204cdf0e10cSrcweir // Returns a cell frame that is 'close' to rPt. 205cdf0e10cSrcweir SW_DLLPRIVATE const SwFrm *GetBox( const Point &rPt, bool* pbRow = 0, bool* pbCol = 0 ) const; 206cdf0e10cSrcweir 207cdf0e10cSrcweir //0 == in keiner Spalte 208cdf0e10cSrcweir SW_DLLPRIVATE sal_uInt16 _GetCurColNum( const SwFrm *pFrm, 209cdf0e10cSrcweir SwGetCurColNumPara* pPara ) const; 210cdf0e10cSrcweir 211cdf0e10cSrcweir SW_DLLPRIVATE void _GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const; 212cdf0e10cSrcweir SW_DLLPRIVATE void _GetTabRows( SwTabCols &rToFill, const SwFrm *pBox ) const; 213cdf0e10cSrcweir 214cdf0e10cSrcweir SW_DLLPRIVATE sal_Bool ImpEndCreate(); 215cdf0e10cSrcweir 216cdf0e10cSrcweir SW_DLLPRIVATE ObjCntType GetObjCntType( const SdrObject& rObj ) const; 217cdf0e10cSrcweir 218cdf0e10cSrcweir // Methoden fuers kopieren von DrawObjecten 219cdf0e10cSrcweir SW_DLLPRIVATE sal_Bool CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, 220cdf0e10cSrcweir const Point& rInsPt, sal_Bool bIsMove, 221cdf0e10cSrcweir sal_Bool bSelectInsert ); 222cdf0e10cSrcweir 223cdf0e10cSrcweir // get list of marked SdrObjects; 224cdf0e10cSrcweir // helper method for GetSelFrmType, IsSelContainsControl 225cdf0e10cSrcweir SW_DLLPRIVATE const SdrMarkList* _GetMarkList() const; 226cdf0e10cSrcweir 227cdf0e10cSrcweir SW_DLLPRIVATE sal_Bool CheckHeadline( bool bRepeat ) const; 228cdf0e10cSrcweir 229cdf0e10cSrcweir using SwEditShell::Copy; 230cdf0e10cSrcweir 231cdf0e10cSrcweir public: 232cdf0e10cSrcweir 233cdf0e10cSrcweir using SwEditShell::Insert; 234cdf0e10cSrcweir 235cdf0e10cSrcweir TYPEINFO(); 236cdf0e10cSrcweir SwFEShell( SwDoc& rDoc, Window *pWin, const SwViewOption *pOpt = 0 ); 237cdf0e10cSrcweir SwFEShell( SwEditShell& rShell, Window *pWin ); 238cdf0e10cSrcweir virtual ~SwFEShell(); 239cdf0e10cSrcweir 240cdf0e10cSrcweir // Copy und Paste Methoden fuer das interne Clipboard 241cdf0e10cSrcweir sal_Bool Copy( SwDoc* pClpDoc, const String* pNewClpTxt = 0 ); 242cdf0e10cSrcweir sal_Bool Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames = sal_False); 243cdf0e10cSrcweir //paste some pages into another doc - used in mailmerge 244cdf0e10cSrcweir sal_Bool PastePages( SwFEShell& rToFill, sal_uInt16 nStartPage, sal_uInt16 nEndPage); 245cdf0e10cSrcweir // Copy-Methode fuer Drag&Drop 246cdf0e10cSrcweir sal_Bool Copy( SwFEShell*, const Point& rSttPt, const Point& rInsPt, 247cdf0e10cSrcweir sal_Bool bIsMove = sal_False, sal_Bool bSelectInsert = sal_True ); 248cdf0e10cSrcweir 249cdf0e10cSrcweir void SelectFlyFrm( SwFlyFrm& rFrm, sal_Bool bNew = sal_False ); 250cdf0e10cSrcweir 251cdf0e10cSrcweir // befindet sich der selektierte Rahmen innerhalb eines anderen? 252cdf0e10cSrcweir const SwFrmFmt* IsFlyInFly(); 253cdf0e10cSrcweir 254cdf0e10cSrcweir //SS fuer DrawObjekte und Rahmen----------------------------- 255cdf0e10cSrcweir 256cdf0e10cSrcweir //Wenn ein Objekt angegeben wurde, so wird genau diese Markiert (anstatt 257cdf0e10cSrcweir //ueber die Position zu suchen. 258cdf0e10cSrcweir sal_Bool SelectObj( const Point& rSelPt, sal_uInt8 nFlag = 0, SdrObject *pObj = 0 ); 259cdf0e10cSrcweir void DelSelectedObj(); 260cdf0e10cSrcweir 261cdf0e10cSrcweir //Selektion nach oben unten bewegen (Z-Order). 262cdf0e10cSrcweir //sal_True == ganz nach oben/unten 263cdf0e10cSrcweir //sal_False == einen ueberholen 264cdf0e10cSrcweir void SelectionToTop ( sal_Bool bTop = sal_True ); 265cdf0e10cSrcweir void SelectionToBottom( sal_Bool bBottom = sal_True ); 266cdf0e10cSrcweir 267cdf0e10cSrcweir short GetLayerId() const; //1 Heaven, 0 Hell, -1 Uneindeutig 268cdf0e10cSrcweir void SelectionToHeaven(); //Ueber dem Dokument 269cdf0e10cSrcweir void SelectionToHell(); //Unter dem Dokument 270cdf0e10cSrcweir 271cdf0e10cSrcweir // folgende zwei Methoden returnen den enum SdrHdlKind, um sich ein 272cdf0e10cSrcweir // includen von SVDRAW.HXX zu ersparen als int deklariert. 273cdf0e10cSrcweir bool IsObjSelectable( const Point& rPt ); 274cdf0e10cSrcweir int IsInsideSelectedObj( const Point& rPt ); //!! returns enum values 275cdf0e10cSrcweir 276cdf0e10cSrcweir // #107513# 277cdf0e10cSrcweir // Test if there is a draw object at that position and if it should be selected. 278cdf0e10cSrcweir // The 'should' is aimed at Writer text fly frames which may be in front of 279cdf0e10cSrcweir // the draw object. 280cdf0e10cSrcweir sal_Bool ShouldObjectBeSelected(const Point& rPt); 281cdf0e10cSrcweir 282cdf0e10cSrcweir sal_Bool MoveAnchor( sal_uInt16 nDir ); 283cdf0e10cSrcweir 284cdf0e10cSrcweir // Returns if Upper of frame at current position is section frame 285cdf0e10cSrcweir // Currently only used by the rules. To be replaced by something more 286cdf0e10cSrcweir // sophisticated one day. 287cdf0e10cSrcweir bool IsDirectlyInSection() const; 288cdf0e10cSrcweir 289cdf0e10cSrcweir //Returnwerte siehe oben FrmType. 290cdf0e10cSrcweir //pPt: Crsr bzw. DocPos; bStopAtFly: Bei Flys anhalten oder ueber den Anchor weitergehen 291cdf0e10cSrcweir // Obgleich (0,sal_True) eine Art Standard ist, sind die Parameter nicht defaultet, damit 292cdf0e10cSrcweir // bei jeder Benutzung insbesondere das bStopAtFly bewusst genutzt wird. 293cdf0e10cSrcweir sal_uInt16 GetFrmType( const Point *pPt, sal_Bool bStopAtFly ) const; 294cdf0e10cSrcweir sal_uInt16 GetSelFrmType() const; //Selektion (Drawing) 295cdf0e10cSrcweir 296cdf0e10cSrcweir /** #108784# check whether selected frame contains a control; 297cdf0e10cSrcweir * companion method to GetSelFrmType, used for preventing 298cdf0e10cSrcweir * drag&drop of controls into header */ 299cdf0e10cSrcweir bool IsSelContainsControl() const; 300cdf0e10cSrcweir 301cdf0e10cSrcweir ObjCntType GetObjCntType( const Point &rPt, SdrObject *&rpObj ) const; 302cdf0e10cSrcweir ObjCntType GetObjCntTypeOfSelection( SdrObject** ppObj = 0 ) const; 303cdf0e10cSrcweir 304cdf0e10cSrcweir //Zum Anpassen der PosAttr bei Ankerwechseln. 305cdf0e10cSrcweir SwRect GetObjRect() const; 306cdf0e10cSrcweir //Zum Verschieben von Flys mit der Tastatur 307cdf0e10cSrcweir SwRect GetFlyRect() const; 308cdf0e10cSrcweir // OD 18.09.2003 #i17567#, #108749#, #110354# - adjustments to allow 309cdf0e10cSrcweir // negative vertical positions for fly frames anchored 310cdf0e10cSrcweir // to paragraph or to character. 311cdf0e10cSrcweir // OD 02.10.2003 #i18732# - adjustments for new option 'FollowTextFlow' 312cdf0e10cSrcweir // OD 12.11.2003 #i22341# - adjustments for new vertical alignment at top of line 313cdf0e10cSrcweir void CalcBoundRect( SwRect& _orRect, 314cdf0e10cSrcweir const RndStdIds _nAnchorId, 315cdf0e10cSrcweir const sal_Int16 _eHoriRelOrient = com::sun::star::text::RelOrientation::FRAME, 316cdf0e10cSrcweir const sal_Int16 _eVertRelOrient = com::sun::star::text::RelOrientation::FRAME, 317cdf0e10cSrcweir const SwPosition* _pToCharCntntPos = NULL, 318cdf0e10cSrcweir const bool _bFollowTextFlow = false, 319cdf0e10cSrcweir bool _bMirror = false, 320cdf0e10cSrcweir Point* _opRef = NULL, 321cdf0e10cSrcweir Size* _opPercent = NULL ) const; 322cdf0e10cSrcweir 323cdf0e10cSrcweir // Groesse von Drawobjekten setzen 324cdf0e10cSrcweir void SetObjRect( const SwRect& rRect ); 325cdf0e10cSrcweir 326cdf0e10cSrcweir long BeginDrag( const Point *pPt, sal_Bool bProp ); 327cdf0e10cSrcweir long Drag ( const Point *pPt, sal_Bool bProp ); 328cdf0e10cSrcweir long EndDrag ( const Point *pPt, sal_Bool bProp ); 329cdf0e10cSrcweir void BreakDrag(); 330cdf0e10cSrcweir 331cdf0e10cSrcweir //Methoden fuer die Statuszeile. 332cdf0e10cSrcweir Point GetAnchorObjDiff() const; //Abstand zum Anker 333cdf0e10cSrcweir Point GetObjAbsPos() const; //Absolute Position 334cdf0e10cSrcweir Size GetObjSize() const; //Groesse, ggf. die umschliessende 335cdf0e10cSrcweir 336cdf0e10cSrcweir //SS fuer die BriefUmschlaege: hole alle Seitengebundenen Objekte 337cdf0e10cSrcweir //und setze diese auf eine neue Seite. 338cdf0e10cSrcweir void GetPageObjs( SvPtrarr& rFillArr ); 339cdf0e10cSrcweir void SetPageObjsNewPage( SvPtrarr& rFillArr, int nOffset = 1 ); 340cdf0e10cSrcweir 341cdf0e10cSrcweir // zeige die aktuelle Selektion an ( ggfs. den Rahmen/DrawObject) 342cdf0e10cSrcweir virtual void MakeSelVisible(); 343cdf0e10cSrcweir 344cdf0e10cSrcweir // returne das FrmFmt von dem evt. unter dem Point stehenden Object. 345cdf0e10cSrcweir // Das Object wird nicht selektiert! 346cdf0e10cSrcweir const SwFrmFmt* GetFmtFromObj( const Point& rPt, SwRect** pRectToFill = 0 ) const; 347cdf0e10cSrcweir // returns a format too, if the point is over the text of any fly 348cdf0e10cSrcweir const SwFrmFmt* GetFmtFromAnyObj( const Point& rPt ) const; 349cdf0e10cSrcweir 350cdf0e10cSrcweir //Welcher Schutz ist am selektierten Objekt gesetzt? 351cdf0e10cSrcweir //!! returns several flags in sal_uInt8 352cdf0e10cSrcweir sal_uInt8 IsSelObjProtected( sal_uInt16 /*FLYPROTECT_...*/ eType ) const; 353cdf0e10cSrcweir 354cdf0e10cSrcweir //Liefert neben der Grafik in rName bei gelinkten Grafiken den Namen mit 355cdf0e10cSrcweir //Pfad und sonst den Grafiknamen. rbLink ist TRU bei gelinkten Grafiken. 356cdf0e10cSrcweir const Graphic *GetGrfAtPos( const Point &rDocPos, 357cdf0e10cSrcweir String &rName, sal_Bool &rbLink ) const; 358cdf0e10cSrcweir 359cdf0e10cSrcweir // --> OD 2009-07-13 #i73249# 360cdf0e10cSrcweir const String GetObjTitle() const; 361cdf0e10cSrcweir void SetObjTitle( const String& rTitle ); 362cdf0e10cSrcweir const String GetObjDescription() const; 363cdf0e10cSrcweir void SetObjDescription( const String& rDescription ); 364cdf0e10cSrcweir // <-- 365cdf0e10cSrcweir 366cdf0e10cSrcweir //SS fuer Rahmen -------------------------------------------- 367cdf0e10cSrcweir 368cdf0e10cSrcweir sal_Bool IsFrmSelected() const; 369cdf0e10cSrcweir sal_Bool GetFlyFrmAttr( SfxItemSet &rSet ) const; 370cdf0e10cSrcweir sal_Bool SetFlyFrmAttr( SfxItemSet &rSet ); 371cdf0e10cSrcweir sal_Bool ResetFlyFrmAttr( sal_uInt16 nWhich, const SfxItemSet* pSet = 0 ); 372cdf0e10cSrcweir const SwFrmFmt *NewFlyFrm( const SfxItemSet &rSet, sal_Bool bAnchValid = sal_False, 373cdf0e10cSrcweir SwFrmFmt *pParent = 0 ); 374cdf0e10cSrcweir void SetFlyPos( const Point &rAbsPos); 375cdf0e10cSrcweir Point FindAnchorPos( const Point &rAbsPos, sal_Bool bMoveIt = sal_False ); 376cdf0e10cSrcweir // determines whether a frame or its environment is vertically formatted and right-to-left 377cdf0e10cSrcweir // --> OD 2009-08-31 #mongolianlayout# 378cdf0e10cSrcweir // also determines, if frame or its environmane is in mongolianlayout (vertical left-to-right) 379cdf0e10cSrcweir // - add output parameter <bVertL2R> 380cdf0e10cSrcweir sal_Bool IsFrmVertical(const sal_Bool bEnvironment, sal_Bool& bRightToLeft, sal_Bool& bVertL2R) const; 381cdf0e10cSrcweir 382cdf0e10cSrcweir SwFrmFmt* GetCurFrmFmt() const; //Wenn Rahmen, dann Rahmenvorlage, sonst 0 383cdf0e10cSrcweir void SetFrmFmt( SwFrmFmt *pFmt, sal_Bool bKeepOrient = sal_False, Point* pDocPos = 0 ); //Wenn Rahmen, dann Rahmenvorlage setzen 384cdf0e10cSrcweir const SwFlyFrm *GetCurrFlyFrm() const { return FindFlyFrm(); } 385cdf0e10cSrcweir 386cdf0e10cSrcweir // finde/loeschen den Fly, in dem der Cursor steht 387cdf0e10cSrcweir SwFrmFmt* WizzardGetFly(); 388cdf0e10cSrcweir 389cdf0e10cSrcweir //Selebstaendiges selektieren von Flys 390cdf0e10cSrcweir sal_Bool GotoNextFly( sal_uInt16 /*GOTOOBJ_...*/ eType = GOTOOBJ_FLY_ANY ) 391cdf0e10cSrcweir { return GotoObj( sal_True, eType ); } 392cdf0e10cSrcweir sal_Bool GotoPrevFly( sal_uInt16 /*GOTOOBJ_...*/ eType = GOTOOBJ_FLY_ANY) 393cdf0e10cSrcweir { return GotoObj( sal_False, eType); } 394cdf0e10cSrcweir 395cdf0e10cSrcweir //iterieren ueber Flys - fuer Basic-Collections 396cdf0e10cSrcweir sal_uInt16 GetFlyCount( FlyCntType eType = FLYCNTTYPE_ALL ) const; 397cdf0e10cSrcweir const SwFrmFmt* GetFlyNum(sal_uInt16 nIdx, FlyCntType eType = FLYCNTTYPE_ALL) const; 398cdf0e10cSrcweir 399cdf0e10cSrcweir //Wenn ein fly selectiert ist, zieht er den Crsr in den ersten CntntFrm 400cdf0e10cSrcweir const SwFrmFmt* SelFlyGrabCrsr(); 401cdf0e10cSrcweir 402cdf0e10cSrcweir //Get FlyFrameFormat; fuer UI Macro Anbindung an Flys 403cdf0e10cSrcweir const SwFrmFmt* GetFlyFrmFmt() const; 404cdf0e10cSrcweir SwFrmFmt* GetFlyFrmFmt(); 405cdf0e10cSrcweir 406cdf0e10cSrcweir //OLE, Server fordert neue Groesse an, die gewuenschten Werte werden 407cdf0e10cSrcweir //als Rahmenattribute eingestellt. Wenn die Werte nicht erlaubt sind, 408cdf0e10cSrcweir //so wird von der Formatierung geclippt und eine Scalierung eingestellt. 409cdf0e10cSrcweir //siehe CalcAndSetScale(). 410cdf0e10cSrcweir // The return value is the applied size. 411cdf0e10cSrcweir Size RequestObjectResize( const SwRect &rRect, const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& ); 412cdf0e10cSrcweir 413cdf0e10cSrcweir //The layout has been changed, so the active object has to be moved after that 414cdf0e10cSrcweir virtual void MoveObjectIfActive( svt::EmbeddedObjectRef& xObj, const Point& rOffset ); 415cdf0e10cSrcweir 416cdf0e10cSrcweir //Der Client fuer das OleObject muss bezueglich der Scalierung auf dem 417cdf0e10cSrcweir //neuesten Stand gehalten werden. Impl in der WrtShell. 418cdf0e10cSrcweir //Wird ein Pointer auf eine Size uebergeben, so ist diese die aktuelle 419cdf0e10cSrcweir //Core-Groesse des Objectes. Anderfalls wird die Groesse per GetCurFlyRect() 420cdf0e10cSrcweir //besorgt. 421cdf0e10cSrcweir virtual void CalcAndSetScale( svt::EmbeddedObjectRef& xObj, 422cdf0e10cSrcweir const SwRect *pFlyPrtRect = 0, 423*b3b0b271SMichael Stahl const SwRect *pFlyFrmRect = 0, 424*b3b0b271SMichael Stahl const bool bNoTxtFrmPrtAreaChanged = false ) = 0; 425cdf0e10cSrcweir 426cdf0e10cSrcweir //Objekte mit ActivateWhenVisible werden beim Paint Connected. 427cdf0e10cSrcweir //gerufen von notxtfrm::Paint, impl in wrtsh 428cdf0e10cSrcweir virtual void ConnectObj( svt::EmbeddedObjectRef&, 429cdf0e10cSrcweir const SwRect &rPrt, 430cdf0e10cSrcweir const SwRect &rFrm ) = 0; 431cdf0e10cSrcweir 432cdf0e10cSrcweir //Sichbaren Bereich auf das Object setzen, wenn es noch nicht sichtbar ist. 433cdf0e10cSrcweir void MakeObjVisible( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& ) const; 434cdf0e10cSrcweir 435cdf0e10cSrcweir // check resize of OLE-Object 436cdf0e10cSrcweir sal_Bool IsCheckForOLEInCaption() const { return bCheckForOLEInCaption; } 437cdf0e10cSrcweir void SetCheckForOLEInCaption( sal_Bool bFlag ) { bCheckForOLEInCaption = bFlag; } 438cdf0e10cSrcweir 439cdf0e10cSrcweir // setze am selektierten FlyFrame einen Namen 440cdf0e10cSrcweir void SetFlyName( const String& rName ); 441cdf0e10cSrcweir const String& GetFlyName() const; 442cdf0e10cSrcweir 443cdf0e10cSrcweir // get reference to OLE object (if there is one) for selected FlyFrame 444cdf0e10cSrcweir const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetOleRef() const; 445cdf0e10cSrcweir 446cdf0e10cSrcweir // erezeuge eindeutige Namen fuer Rahmen 447cdf0e10cSrcweir String GetUniqueGrfName() const; 448cdf0e10cSrcweir String GetUniqueOLEName() const; 449cdf0e10cSrcweir String GetUniqueFrameName() const; 450cdf0e10cSrcweir 451cdf0e10cSrcweir // springe zum benannten Rahmen (Grafik/OLE) 452cdf0e10cSrcweir sal_Bool GotoFly( const String& rName, FlyCntType eType = FLYCNTTYPE_ALL, 453cdf0e10cSrcweir sal_Bool bSelFrame = sal_True ); 454cdf0e10cSrcweir // steht an der Position eine Grafik mit einer URL ? 455cdf0e10cSrcweir const SwFrmFmt* IsURLGrfAtPos( const Point& rPt, String* pURL = 0, 456cdf0e10cSrcweir String *pTargetFrameName = 0, 457cdf0e10cSrcweir String *pURLDescription = 0 ) const; 458cdf0e10cSrcweir 459cdf0e10cSrcweir //Fuer das Chain wird immer der durch das Format spezifizierte Fly 460cdf0e10cSrcweir //mit dem durch den Point getroffenen verbunden. 461cdf0e10cSrcweir //In rRect wird das Rect des Flys geliefert (fuer Highlight desselben) 462cdf0e10cSrcweir int Chainable( SwRect &rRect, const SwFrmFmt &rSource, const Point &rPt ) const; 463cdf0e10cSrcweir int Chain( SwFrmFmt &rSource, const Point &rPt ); 464cdf0e10cSrcweir int Chain( SwFrmFmt &rSource, const SwFrmFmt &rDest ); 465cdf0e10cSrcweir void Unchain( SwFrmFmt &rFmt ); 466cdf0e10cSrcweir void HideChainMarker(); 467cdf0e10cSrcweir void SetChainMarker(); 468cdf0e10cSrcweir 469cdf0e10cSrcweir Size GetGraphicDefaultSize() const; 470cdf0e10cSrcweir 471cdf0e10cSrcweir //SS fuer DrawObjekte --------------------- 472cdf0e10cSrcweir 473cdf0e10cSrcweir //Temporaer um Bug zu umgehen. 474cdf0e10cSrcweir void CheckUnboundObjects(); 475cdf0e10cSrcweir 476cdf0e10cSrcweir //Achtung: Uneindeutikeiten bei Mehrfachselektionen. 477cdf0e10cSrcweir sal_Bool GetObjAttr( SfxItemSet &rSet ) const; 478cdf0e10cSrcweir sal_Bool SetObjAttr( const SfxItemSet &rSet ); 479cdf0e10cSrcweir 480cdf0e10cSrcweir const SdrObject* GetBestObject( sal_Bool bNext, sal_uInt16 eType = GOTOOBJ_DRAW_ANY, sal_Bool bFlat = sal_True, const ::svx::ISdrObjectFilter* pFilter = NULL ); 481cdf0e10cSrcweir sal_Bool GotoObj( sal_Bool bNext, sal_uInt16 /*GOTOOBJ_...*/ eType = GOTOOBJ_DRAW_ANY); 482cdf0e10cSrcweir 483cdf0e10cSrcweir //Setzen vom DragMode (z.B. Rotate), tut nix bei Rahmenselektion. 484cdf0e10cSrcweir void SetDragMode( sal_uInt16 eSdrDragMode ); 485cdf0e10cSrcweir 486cdf0e10cSrcweir sal_uInt16 IsObjSelected() const; //Liefert gleich die Anzahl der Objekte, 487cdf0e10cSrcweir //zaehlt aber nicht die Objekte in Gruppen. 488cdf0e10cSrcweir sal_Bool IsObjSelected( const SdrObject& rObj ) const; 489cdf0e10cSrcweir 490cdf0e10cSrcweir void EndTextEdit(); //Loescht ggf. das Objekt. 491cdf0e10cSrcweir 492cdf0e10cSrcweir //Ankertyp des selektierten Objektes, -1 bei Uneindeutigkeit oder 493cdf0e10cSrcweir //Rahmenselektion; FLY_AT_PAGE bzw. FLY_AT_PARA aus frmatr.hxx sonst. 494cdf0e10cSrcweir short GetAnchorId() const; 495cdf0e10cSrcweir 496cdf0e10cSrcweir //Erzeugen von DrawObjekten, beim Begin wird der Objekttyp mitgegeben. 497cdf0e10cSrcweir //Beim End kann ein Cmd mitgegeben werden, hier ist ggf. 498cdf0e10cSrcweir //SDRCREATE_RESTRAINTEND fuer Ende oder SDRCREATE_NEXTPOINT fuer ein 499cdf0e10cSrcweir //Polygon relevant. Nach dem RESTRAINTEND ist das Objekt erzeugt und 500cdf0e10cSrcweir //selektiert. 501cdf0e10cSrcweir //Mit BreakCreate wird der Vorgang abgebrochen, dann ist kein Objekt 502cdf0e10cSrcweir //mehr selektiert. 503cdf0e10cSrcweir sal_Bool BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, const Point &rPos ); 504cdf0e10cSrcweir sal_Bool BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, sal_uInt32 eObjInventor, const Point &); 505cdf0e10cSrcweir void MoveCreate ( const Point &rPos ); 506cdf0e10cSrcweir sal_Bool EndCreate ( sal_uInt16 eSdrCreateCmd ); 507cdf0e10cSrcweir void BreakCreate(); 508cdf0e10cSrcweir sal_Bool IsDrawCreate() const; 509cdf0e10cSrcweir void CreateDefaultShape( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, const Rectangle& rRect, sal_uInt16 nSlotId); 510cdf0e10cSrcweir 511cdf0e10cSrcweir // Funktionen f�r Rubberbox, um Draw-Objekte zu selektieren 512cdf0e10cSrcweir sal_Bool BeginMark( const Point &rPos ); 513cdf0e10cSrcweir void MoveMark ( const Point &rPos ); 514cdf0e10cSrcweir sal_Bool EndMark (); 515cdf0e10cSrcweir void BreakMark(); 516cdf0e10cSrcweir 517cdf0e10cSrcweir //Gruppe erzeugen, aufloesen, nix bei Rahmenselektion. 518cdf0e10cSrcweir sal_Bool IsGroupSelected(); //Kann auch eine Mischselektion sein! 519cdf0e10cSrcweir void GroupSelection(); //Hinterher ist die Gruppe selektiert. 520cdf0e10cSrcweir void UnGroupSelection(); //Die Einzelobjekte sind Selektiert 521cdf0e10cSrcweir //Es koennen noch immer Gruppen dabei sein. 522cdf0e10cSrcweir 523cdf0e10cSrcweir // OD 27.06.2003 #108784# - change return type. 524cdf0e10cSrcweir bool IsGroupAllowed() const; 525cdf0e10cSrcweir 526cdf0e10cSrcweir void MirrorSelection( sal_Bool bHorizontal ); //Bei sal_False Vertikal 527cdf0e10cSrcweir 528cdf0e10cSrcweir //frmatr.hxx. Hier kein enum wg. Abhaengigkeiten 529cdf0e10cSrcweir //Der sal_Bool ist nur fuer internen Gebrauch! Anker wird nur - anhand der 530cdf0e10cSrcweir //aktuellen Dokumentposition - neu gesetzt aber nicht umgesetzt. 531cdf0e10cSrcweir void ChgAnchor( int eAnchorId, sal_Bool bSameOnly = sal_False, 532cdf0e10cSrcweir sal_Bool bPosCorr = sal_True ); 533cdf0e10cSrcweir 534cdf0e10cSrcweir sal_Bool SetDrawingAttr( SfxItemSet &rSet ); 535cdf0e10cSrcweir 536cdf0e10cSrcweir // hole die selectierten DrawObj als Grafik (MetaFile/Bitmap) 537cdf0e10cSrcweir // Return-Wert besagt ob konvertiert wurde!! 538cdf0e10cSrcweir sal_Bool GetDrawObjGraphic( sal_uLong nFmt, Graphic& rGrf ) const; 539cdf0e10cSrcweir 540cdf0e10cSrcweir void Paste( SvStream& rStm, sal_uInt16 nAction, const Point* pPt = 0 ); 541cdf0e10cSrcweir sal_Bool Paste( const Graphic &rGrf ); 542cdf0e10cSrcweir sal_Bool Paste( SotDataObject& rObj, const Point& rPt ); 543cdf0e10cSrcweir 544cdf0e10cSrcweir sal_Bool IsAlignPossible() const; 545cdf0e10cSrcweir void SetCalcFieldValueHdl(Outliner* pOutliner); 546cdf0e10cSrcweir 547cdf0e10cSrcweir void Insert(const String& rGrfName, 548cdf0e10cSrcweir const String& rFltName, 549cdf0e10cSrcweir const Graphic* pGraphic = 0, 550cdf0e10cSrcweir const SfxItemSet* pFlyAttrSet = 0, 551cdf0e10cSrcweir const SfxItemSet* pGrfAttrSet = 0, 552cdf0e10cSrcweir SwFrmFmt* = 0 ); 553cdf0e10cSrcweir 554cdf0e10cSrcweir // Insertion of a drawing object which have to be already inserted in the DrawModel 555cdf0e10cSrcweir void InsertDrawObj( SdrObject& rDrawObj, 556cdf0e10cSrcweir const Point& rInsertPosition ); 557cdf0e10cSrcweir 558cdf0e10cSrcweir sal_Bool ReplaceSdrObj( const String& rGrfName, const String& rFltName, 559cdf0e10cSrcweir const Graphic* pGrf = 0 ); 560cdf0e10cSrcweir 561cdf0e10cSrcweir // --> #i972# 562cdf0e10cSrcweir // for starmath formulas anchored 'as char' it alignes it baseline to baseline 563cdf0e10cSrcweir // changing the previous vertical orientation 564cdf0e10cSrcweir void AlignFormulaToBaseline( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& xObj, SwFlyFrm * pFly = 0 ); 565cdf0e10cSrcweir 566cdf0e10cSrcweir // aligns all formulas with anchor 'as char' to baseline 567cdf0e10cSrcweir void AlignAllFormulasToBaseline(); 568cdf0e10cSrcweir // <-- 569cdf0e10cSrcweir 570cdf0e10cSrcweir //------------------------------------------ 571cdf0e10cSrcweir 572cdf0e10cSrcweir //Auskunft ueber naechstliegenden Inhalt zum uebergebenen Point 573cdf0e10cSrcweir Point GetCntntPos( const Point& rPoint, sal_Bool bNext ) const; 574cdf0e10cSrcweir 575cdf0e10cSrcweir //convert document position into position relative to the current page 576cdf0e10cSrcweir Point GetRelativePagePosition(const Point& rDocPos); 577cdf0e10cSrcweir 578cdf0e10cSrcweir //Layout-Selektion Hiden/Zeigen und aufruf an die CrsrSh weiterreichen. 579cdf0e10cSrcweir void ShLooseFcs(); 580cdf0e10cSrcweir void ShGetFcs( sal_Bool bUpdate = sal_True ); 581cdf0e10cSrcweir 582cdf0e10cSrcweir //PageDescriptor-Schnittstelle 583cdf0e10cSrcweir void ChgCurPageDesc( const SwPageDesc& ); 584cdf0e10cSrcweir sal_uInt16 GetCurPageDesc( const sal_Bool bCalcFrm = sal_True ) const; 585cdf0e10cSrcweir sal_uInt16 GetMousePageDesc( const Point &rPt ) const; 586cdf0e10cSrcweir sal_uInt16 GetPageDescCnt() const; 587cdf0e10cSrcweir SwPageDesc* FindPageDescByName( const String& rName, 588cdf0e10cSrcweir sal_Bool bGetFromPool = sal_False, 589cdf0e10cSrcweir sal_uInt16* pPos = 0 ); 590cdf0e10cSrcweir 591cdf0e10cSrcweir const SwPageDesc& GetPageDesc( sal_uInt16 i ) const; 592cdf0e10cSrcweir void ChgPageDesc( sal_uInt16 i, const SwPageDesc& ); 593cdf0e10cSrcweir // if inside all selection only one PageDesc, return this. 594cdf0e10cSrcweir // Otherwise return 0 pointer 595cdf0e10cSrcweir const SwPageDesc* GetSelectedPageDescs() const; 596cdf0e10cSrcweir 597cdf0e10cSrcweir const SwRect& GetAnyCurRect( CurRectType eType, 598cdf0e10cSrcweir const Point* pPt = 0, 599cdf0e10cSrcweir const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& = 600cdf0e10cSrcweir ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >() ) const; 601cdf0e10cSrcweir 602cdf0e10cSrcweir //Seitennummer der Seite in der der Point liegt, 0 wenn keine 603cdf0e10cSrcweir //getroffen ist. 604cdf0e10cSrcweir sal_uInt16 GetPageNumber( const Point &rPoint ) const; 605cdf0e10cSrcweir sal_Bool GetPageNumber( long nYPos, sal_Bool bAtCrsrPos, sal_uInt16& rPhyNum, sal_uInt16& rVirtNum, String &rDisplay ) const; 606cdf0e10cSrcweir 607cdf0e10cSrcweir SwFlyFrmFmt* InsertObject( const svt::EmbeddedObjectRef&, 608cdf0e10cSrcweir const SfxItemSet* pFlyAttrSet = 0, 609cdf0e10cSrcweir const SfxItemSet* pGrfAttrSet = 0, 610cdf0e10cSrcweir SwFrmFmt* = 0 ); 611cdf0e10cSrcweir sal_Bool FinishOLEObj(); // Server wird beendet 612cdf0e10cSrcweir 613cdf0e10cSrcweir //Attribute der Tabelle besorgen/setzen. 614cdf0e10cSrcweir void GetTblAttr( SfxItemSet & ) const; 615cdf0e10cSrcweir void SetTblAttr( const SfxItemSet & ); 616cdf0e10cSrcweir 617cdf0e10cSrcweir //Tabelle vollstaendig selektiert? 618cdf0e10cSrcweir sal_Bool HasWholeTabSelection() const; 619cdf0e10cSrcweir //Ist der Inhalt einer Tabellenzelle oder mindestens eine Tabellenzelle 620cdf0e10cSrcweir //vollstaendig selektiert ist 621cdf0e10cSrcweir sal_Bool HasBoxSelection() const; 622cdf0e10cSrcweir 623cdf0e10cSrcweir sal_Bool InsertRow( sal_uInt16 nCnt, sal_Bool bBehind ); 624cdf0e10cSrcweir sal_Bool InsertCol( sal_uInt16 nCnt, sal_Bool bBehind ); // 0 == am Ende 625cdf0e10cSrcweir sal_Bool DeleteCol(); 626cdf0e10cSrcweir sal_Bool DeleteRow(); 627cdf0e10cSrcweir 628cdf0e10cSrcweir sal_Bool DeleteTblSel(); //Aktuelle Selektion, ggf. die ganze Tabelle. 629cdf0e10cSrcweir 630cdf0e10cSrcweir sal_uInt16 MergeTab(); //Merged selektierte Tabellenteile zusammen 631cdf0e10cSrcweir //Fehler ueber enum zurueck 632cdf0e10cSrcweir // Zelle Vertikal oder Horizontal splitten. 633cdf0e10cSrcweir sal_Bool SplitTab( sal_Bool nVert = sal_True, sal_uInt16 nCnt = 1, sal_Bool bSameHeight = sal_False ); 634cdf0e10cSrcweir sal_Bool Sort(const SwSortOptions&); //Sortieren. 635cdf0e10cSrcweir 636cdf0e10cSrcweir void SetRowHeight( const SwFmtFrmSize &rSz ); 637cdf0e10cSrcweir //Der Pointer muss vom Aufrufer zerstoert werden wenn != 0 638cdf0e10cSrcweir void GetRowHeight( SwFmtFrmSize *&rpSz ) const; 639cdf0e10cSrcweir 640cdf0e10cSrcweir void SetRowSplit( const SwFmtRowSplit &rSz ); 641cdf0e10cSrcweir void GetRowSplit( SwFmtRowSplit *&rpSz ) const; 642cdf0e10cSrcweir 643cdf0e10cSrcweir void SetBoxAlign( sal_uInt16 nOrient ); 644cdf0e10cSrcweir sal_uInt16 GetBoxAlign() const; //USHRT_MAX fuer uneindeutig! 645cdf0e10cSrcweir 646cdf0e10cSrcweir //Ausgleichen der Zeilenhoehen. Mit bTstOnly festellen ob mehr als eine 647cdf0e10cSrcweir //Zeile markiert ist. 648cdf0e10cSrcweir sal_Bool BalanceRowHeight( sal_Bool bTstOnly ); 649cdf0e10cSrcweir 650cdf0e10cSrcweir void SetTabBorders( const SfxItemSet& rSet ); 651cdf0e10cSrcweir void GetTabBorders( SfxItemSet& rSet) const; 652cdf0e10cSrcweir void SetTabLineStyle(const Color* pColor, sal_Bool bSetLine = sal_False, const SvxBorderLine* pBorderLine = NULL); 653cdf0e10cSrcweir 654cdf0e10cSrcweir void SetTabBackground( const SvxBrushItem &rNew ); 655cdf0e10cSrcweir void GetTabBackground( SvxBrushItem &rToFill ) const; 656cdf0e10cSrcweir 657cdf0e10cSrcweir void SetBoxBackground( const SvxBrushItem &rNew ); 658cdf0e10cSrcweir sal_Bool GetBoxBackground( SvxBrushItem &rToFill ) const; //sal_False uneindeutig 659cdf0e10cSrcweir 660cdf0e10cSrcweir void SetBoxDirection( const SvxFrameDirectionItem& rNew ); 661cdf0e10cSrcweir sal_Bool GetBoxDirection( SvxFrameDirectionItem& rToFill ) const; //sal_False uneindeutig 662cdf0e10cSrcweir 663cdf0e10cSrcweir void SetRowBackground( const SvxBrushItem &rNew ); 664cdf0e10cSrcweir sal_Bool GetRowBackground( SvxBrushItem &rToFill ) const; //sal_False uneindeutig 665cdf0e10cSrcweir 666cdf0e10cSrcweir sal_uInt8 WhichMouseTabCol( const Point &rPt ) const; 667cdf0e10cSrcweir void GetTabCols( SwTabCols &rToFill ) const; //Spalten- und Randinfo. 668cdf0e10cSrcweir void SetTabCols( const SwTabCols &rNew, sal_Bool bCurRowOnly = sal_True ); 669cdf0e10cSrcweir void GetMouseTabCols( SwTabCols &rToFill, const Point &rPt ) const; 670cdf0e10cSrcweir void SetMouseTabCols( const SwTabCols &rNew, sal_Bool bCurRowOnly, 671cdf0e10cSrcweir const Point &rPt ); 672cdf0e10cSrcweir 673cdf0e10cSrcweir // --> FME 2004-07-30 #i20126# Enhanced table selection 674cdf0e10cSrcweir // pEnd will be used during MouseMove 675cdf0e10cSrcweir bool SelTblRowCol( const Point& rPt, const Point* pEnd = 0, bool bRowDrag = false ); 676cdf0e10cSrcweir // <-- 677cdf0e10cSrcweir 678cdf0e10cSrcweir // #i24134# adjustment of table rows via Ruler 679cdf0e10cSrcweir void GetTabRows( SwTabCols &rToFill ) const; 680cdf0e10cSrcweir void SetTabRows( const SwTabCols &rNew, sal_Bool bCurColOnly ); 681cdf0e10cSrcweir void GetMouseTabRows( SwTabCols &rToFill, const Point &rPt ) const; 682cdf0e10cSrcweir void SetMouseTabRows( const SwTabCols &rNew, sal_Bool bCurColOnly, const Point &rPt ); 683cdf0e10cSrcweir 684cdf0e10cSrcweir void ProtectCells(); //Falls eine Tabselektion besteht, wird sie ver- 685cdf0e10cSrcweir // nichtet, wenn der Cursor nicht in Readonly darf 686cdf0e10cSrcweir void UnProtectCells(); // auf die Tabellenselektin 687cdf0e10cSrcweir void UnProtectTbls(); //bei allen Tabellen in der Selektion den Schutz aufheben 688cdf0e10cSrcweir sal_Bool HasTblAnyProtection( const String* pTblName = 0, 689cdf0e10cSrcweir sal_Bool* pFullTblProtection = 0 ); 690cdf0e10cSrcweir sal_Bool CanUnProtectCells() const; 691cdf0e10cSrcweir 692cdf0e10cSrcweir sal_uInt16 GetRowsToRepeat() const; 693cdf0e10cSrcweir void SetRowsToRepeat( sal_uInt16 nNumOfRows ); 694cdf0e10cSrcweir sal_uInt16 GetVirtPageNum( const sal_Bool bCalcFrm = sal_True ); 695cdf0e10cSrcweir //returns the number of table rows currently selected 696cdf0e10cSrcweir //if the selection start at the top of the table 697cdf0e10cSrcweir sal_uInt16 GetRowSelectionFromTop() const; 698cdf0e10cSrcweir 699cdf0e10cSrcweir sal_Bool IsInRepeatedHeadline() const { return CheckHeadline( true ); } 700cdf0e10cSrcweir sal_Bool IsInHeadline() const { return CheckHeadline( false ); } 701cdf0e10cSrcweir 702cdf0e10cSrcweir //Stellt die Breiten der Zellen so ein, dass der Inhalt moeglichst 703cdf0e10cSrcweir //nicht umgebrochen werden muss. 704cdf0e10cSrcweir //bBalance sorgt fuer einen Ausgleich der markierten Spalten. 705cdf0e10cSrcweir void AdjustCellWidth( sal_Bool bBalance = sal_False ); 706cdf0e10cSrcweir //Nicht erlaubt, wenn nur leere Zellen selektiert sind. 707cdf0e10cSrcweir sal_Bool IsAdjustCellWidthAllowed( sal_Bool bBalance = sal_False ) const; 708cdf0e10cSrcweir 709cdf0e10cSrcweir //Ausgleich der Zellenbreiten, mit bTstOnly feststellen, ob mehr als 710cdf0e10cSrcweir //eine Zelle markiert ist. 711cdf0e10cSrcweir sal_Bool BalanceCellWidth( sal_Bool bTstOnly ); 712cdf0e10cSrcweir 713cdf0e10cSrcweir // AutoFormat fuer die Tabelle/TabellenSelection 714cdf0e10cSrcweir sal_Bool SetTableAutoFmt( const SwTableAutoFmt& rNew ); 715cdf0e10cSrcweir // Erfrage wie attributiert ist 716cdf0e10cSrcweir sal_Bool GetTableAutoFmt( SwTableAutoFmt& rGet ); 717cdf0e10cSrcweir // aender eine Zellenbreite/-Hoehe/Spaltenbreite/Zeilenhoehe 718cdf0e10cSrcweir sal_Bool SetColRowWidthHeight( sal_uInt16 eType, sal_uInt16 nDiff = 283 ); 719cdf0e10cSrcweir // Autosumme 720cdf0e10cSrcweir sal_Bool GetAutoSum( String& rFml ) const; 721cdf0e10cSrcweir 722cdf0e10cSrcweir //Phy: Tatsaechliche Seitenanzahl. 723cdf0e10cSrcweir //Virt: Vom User evtl. gesetzten Offset mit einbeziehen. 724cdf0e10cSrcweir sal_uInt16 GetPhyPageNum(); 725cdf0e10cSrcweir 726cdf0e10cSrcweir // Setzt an der aktuellen Postion einen neuen Page Offset 727cdf0e10cSrcweir void SetNewPageOffset( sal_uInt16 nOffset ); 728cdf0e10cSrcweir void SetPageOffset( sal_uInt16 nOffset ); //Aendert den letzten Page Offset 729cdf0e10cSrcweir sal_uInt16 GetPageOffset() const; //Liefert den letzten Page Offset 730cdf0e10cSrcweir 731cdf0e10cSrcweir //SS fuer Beschriftungen 732cdf0e10cSrcweir void InsertLabel( const SwLabelType eType, const String &rTxt, const String& rSeparator, 733cdf0e10cSrcweir const String& rNumberSeparator, 734cdf0e10cSrcweir const sal_Bool bBefore, const sal_uInt16 nId, 735cdf0e10cSrcweir const String& rCharacterStyle, 736cdf0e10cSrcweir const sal_Bool bCpyBrd = sal_True ); 737cdf0e10cSrcweir 738cdf0e10cSrcweir //Das Lineal will auch noch etwas von uns wissen. 739cdf0e10cSrcweir sal_uInt16 GetCurColNum( SwGetCurColNumPara* pPara = 0 ) const; //0 == in keiner Spalte 740cdf0e10cSrcweir sal_uInt16 GetCurMouseColNum( const Point &rPt, 741cdf0e10cSrcweir SwGetCurColNumPara* pPara = 0 ) const; 742cdf0e10cSrcweir sal_uInt16 GetCurTabColNum() const; //0 == in keiner Tabelle 743cdf0e10cSrcweir sal_uInt16 GetCurMouseTabColNum( const Point &rPt ) const; 744cdf0e10cSrcweir sal_uInt16 GetCurOutColNum( SwGetCurColNumPara* pPara = 0 ) const; // aktuelle aeussere Spalte 745cdf0e10cSrcweir 746cdf0e10cSrcweir sal_Bool IsTableRightToLeft() const; 747cdf0e10cSrcweir sal_Bool IsMouseTableRightToLeft( const Point &rPt ) const; 748cdf0e10cSrcweir sal_Bool IsTableVertical() const; 749cdf0e10cSrcweir 750cdf0e10cSrcweir sal_Bool IsLastCellInRow() const; 751cdf0e10cSrcweir // Die Breite des aktuellen Bereichs fuer Spaltendialog 752cdf0e10cSrcweir long GetSectionWidth( SwFmt& rFmt ) const; 753cdf0e10cSrcweir 754cdf0e10cSrcweir void GetConnectableFrmFmts 755cdf0e10cSrcweir (SwFrmFmt & rFmt, const String & rReference, sal_Bool bSuccessors, 756cdf0e10cSrcweir ::std::vector< String > & aPrevPageVec, 757cdf0e10cSrcweir ::std::vector< String > & aThisPageVec, 758cdf0e10cSrcweir ::std::vector< String > & aNextPageVec, 759cdf0e10cSrcweir ::std::vector< String > & aRestVec); 760cdf0e10cSrcweir 761cdf0e10cSrcweir /** SwFEShell::GetShapeBackgrd 762cdf0e10cSrcweir 763cdf0e10cSrcweir OD 02.09.2002 for #102450#: 764cdf0e10cSrcweir method determines background color of the page the selected drawing 765cdf0e10cSrcweir object is on and returns this color. 766cdf0e10cSrcweir If no color is found, because no drawing object is selected or ..., 767cdf0e10cSrcweir color COL_BLACK (default color on constructing object of class Color) 768cdf0e10cSrcweir is returned. 769cdf0e10cSrcweir 770cdf0e10cSrcweir @author OD 771cdf0e10cSrcweir 772cdf0e10cSrcweir @returns an object of class Color 773cdf0e10cSrcweir */ 774cdf0e10cSrcweir const Color GetShapeBackgrd() const; 775cdf0e10cSrcweir 776cdf0e10cSrcweir /** Is default horizontal text direction for selected drawing object right-to-left 777cdf0e10cSrcweir 778cdf0e10cSrcweir OD 09.12.2002 #103045# 779cdf0e10cSrcweir Because drawing objects only painted for each page only, the default 780cdf0e10cSrcweir horizontal text direction of a drawing object is given by the corresponding 781cdf0e10cSrcweir page property. 782cdf0e10cSrcweir 783cdf0e10cSrcweir @author OD 784cdf0e10cSrcweir 785cdf0e10cSrcweir @returns boolean, indicating, if the horizontal text direction of the 786cdf0e10cSrcweir page, the selected drawing object is on, is right-to-left. 787cdf0e10cSrcweir */ 788cdf0e10cSrcweir bool IsShapeDefaultHoriTextDirR2L() const; 789cdf0e10cSrcweir 790cdf0e10cSrcweir void ParkCursorInTab(); 791cdf0e10cSrcweir 792cdf0e10cSrcweir // -> #i23726# 793cdf0e10cSrcweir SwTxtNode * GetNumRuleNodeAtPos(const Point &rPot); 794cdf0e10cSrcweir sal_Bool IsNumLabel( const Point &rPt, int nMaxOffset = -1 ); 795cdf0e10cSrcweir // <- #i23726# 796cdf0e10cSrcweir // --> OD 2005-02-21 #i42921# 797cdf0e10cSrcweir bool IsVerticalModeAtNdAndPos( const SwTxtNode& _rTxtNode, 798cdf0e10cSrcweir const Point& _rDocPos ) const; 799cdf0e10cSrcweir // <-- 800cdf0e10cSrcweir 801cdf0e10cSrcweir }; 802cdf0e10cSrcweir 803cdf0e10cSrcweir #endif 804