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