11d2dbeb0SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 31d2dbeb0SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 41d2dbeb0SAndrew Rist * or more contributor license agreements. See the NOTICE file 51d2dbeb0SAndrew Rist * distributed with this work for additional information 61d2dbeb0SAndrew Rist * regarding copyright ownership. The ASF licenses this file 71d2dbeb0SAndrew Rist * to you under the Apache License, Version 2.0 (the 81d2dbeb0SAndrew Rist * "License"); you may not use this file except in compliance 91d2dbeb0SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 111d2dbeb0SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 131d2dbeb0SAndrew Rist * Unless required by applicable law or agreed to in writing, 141d2dbeb0SAndrew Rist * software distributed under the License is distributed on an 151d2dbeb0SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 161d2dbeb0SAndrew Rist * KIND, either express or implied. See the License for the 171d2dbeb0SAndrew Rist * specific language governing permissions and limitations 181d2dbeb0SAndrew Rist * under the License. 19cdf0e10cSrcweir * 201d2dbeb0SAndrew Rist *************************************************************/ 211d2dbeb0SAndrew Rist 22cdf0e10cSrcweir #ifndef _FESH_HXX 23cdf0e10cSrcweir #define _FESH_HXX 24cdf0e10cSrcweir 25cdf0e10cSrcweir #include <com/sun/star/text/RelOrientation.hpp> 26cdf0e10cSrcweir #include <com/sun/star/embed/XClassifiedObject.hpp> 27cdf0e10cSrcweir #include <com/sun/star/embed/XEmbeddedObject.hpp> 28cdf0e10cSrcweir 29cdf0e10cSrcweir #include <svx/svdobj.hxx> 30cdf0e10cSrcweir #include "swdllapi.h" 31cdf0e10cSrcweir #include <editsh.hxx> 32cdf0e10cSrcweir #include <flyenum.hxx> 33cdf0e10cSrcweir 34cdf0e10cSrcweir // OD 25.06.2003 #108784# 35cdf0e10cSrcweir #include <svx/svdtypes.hxx> 36cdf0e10cSrcweir 37cdf0e10cSrcweir #include <svtools/embedhlp.hxx> 38cdf0e10cSrcweir 39cdf0e10cSrcweir #ifndef INCLUDED_VECTOR 40cdf0e10cSrcweir #include <vector> 41cdf0e10cSrcweir #define INCLUDED_VECTOR 42cdf0e10cSrcweir #endif 43cdf0e10cSrcweir 44cdf0e10cSrcweir class SwFlyFrm; 45cdf0e10cSrcweir class SwTabCols; 46cdf0e10cSrcweir class SvxBrushItem; 47cdf0e10cSrcweir class SvxFrameDirectionItem; 48cdf0e10cSrcweir class SwTableAutoFmt; 49cdf0e10cSrcweir class SwFrm; 50cdf0e10cSrcweir class SwFmtFrmSize; 51cdf0e10cSrcweir class SwFmtRowSplit; 52cdf0e10cSrcweir class SvxBorderLine; 53cdf0e10cSrcweir class SdrObject; 54cdf0e10cSrcweir class Color; 55cdf0e10cSrcweir class Outliner; 56cdf0e10cSrcweir class SotDataObject; 57cdf0e10cSrcweir class SwFrmFmt; 58cdf0e10cSrcweir struct SwSortOptions; 59cdf0e10cSrcweir class SdrMarkList; 60cdf0e10cSrcweir 61cdf0e10cSrcweir namespace svx 62cdf0e10cSrcweir { 63cdf0e10cSrcweir class ISdrObjectFilter; 64cdf0e10cSrcweir } 65cdf0e10cSrcweir 66cdf0e10cSrcweir 67cdf0e10cSrcweir // return values for GetFrmType() und GetSelFrmType(). 68cdf0e10cSrcweir //! values can be combined via logival or 69cdf0e10cSrcweir #define FRMTYPE_NONE (sal_uInt16) 0 70cdf0e10cSrcweir #define FRMTYPE_PAGE (sal_uInt16) 1 71cdf0e10cSrcweir #define FRMTYPE_HEADER (sal_uInt16) 2 72cdf0e10cSrcweir #define FRMTYPE_FOOTER (sal_uInt16) 4 73cdf0e10cSrcweir #define FRMTYPE_BODY (sal_uInt16) 8 74cdf0e10cSrcweir #define FRMTYPE_COLUMN (sal_uInt16) 16 75cdf0e10cSrcweir #define FRMTYPE_TABLE (sal_uInt16) 32 76cdf0e10cSrcweir #define FRMTYPE_FLY_FREE (sal_uInt16) 64 77cdf0e10cSrcweir #define FRMTYPE_FLY_ATCNT (sal_uInt16) 128 78cdf0e10cSrcweir #define FRMTYPE_FLY_INCNT (sal_uInt16) 256 79cdf0e10cSrcweir #define FRMTYPE_FOOTNOTE (sal_uInt16) 512 80cdf0e10cSrcweir #define FRMTYPE_FTNPAGE (sal_uInt16) 1024 81cdf0e10cSrcweir #define FRMTYPE_FLY_ANY (sal_uInt16) 2048 82cdf0e10cSrcweir #define FRMTYPE_DRAWOBJ (sal_uInt16) 4096 83cdf0e10cSrcweir #define FRMTYPE_COLSECT (sal_uInt16) 8192 84cdf0e10cSrcweir #define FRMTYPE_COLSECTOUTTAB (sal_uInt16) 16384 85cdf0e10cSrcweir 86cdf0e10cSrcweir #define FRMTYPE_ANYCOLSECT ( FRMTYPE_COLSECT | FRMTYPE_COLSECTOUTTAB ) 87cdf0e10cSrcweir 88cdf0e10cSrcweir //! values can be combined via logival or 89cdf0e10cSrcweir #define GOTOOBJ_DRAW_CONTROL (sal_uInt16) 1 90cdf0e10cSrcweir #define GOTOOBJ_DRAW_SIMPLE (sal_uInt16) 2 91cdf0e10cSrcweir #define GOTOOBJ_DRAW_ANY (sal_uInt16) 3 92cdf0e10cSrcweir #define GOTOOBJ_FLY_FRM (sal_uInt16) 4 93cdf0e10cSrcweir #define GOTOOBJ_FLY_GRF (sal_uInt16) 8 94cdf0e10cSrcweir #define GOTOOBJ_FLY_OLE (sal_uInt16) 16 95cdf0e10cSrcweir #define GOTOOBJ_FLY_ANY (sal_uInt16) 28 96cdf0e10cSrcweir #define GOTOOBJ_GOTO_ANY (sal_uInt16) 31 97cdf0e10cSrcweir 98cdf0e10cSrcweir //! values can be combined via logival or 99cdf0e10cSrcweir #define FLYPROTECT_CONTENT (sal_uInt16) 1 // kann verodert werden! 100cdf0e10cSrcweir #define FLYPROTECT_SIZE (sal_uInt16) 2 101cdf0e10cSrcweir #define FLYPROTECT_POS (sal_uInt16) 4 102cdf0e10cSrcweir #define FLYPROTECT_PARENT (sal_uInt16) 8 // nur Parents untersuchen 103cdf0e10cSrcweir #define FLYPROTECT_FIXED (sal_uInt16) 16 // nur nicht aufhebbarer Schutz 104cdf0e10cSrcweir // z.B. durch OLE-Server, gilt auch 105cdf0e10cSrcweir // fuer Dialog 106cdf0e10cSrcweir 107cdf0e10cSrcweir 108cdf0e10cSrcweir enum ObjCntType //Fuer das Ermitteln des Cntnts per Positon (D&D) 109cdf0e10cSrcweir { 110cdf0e10cSrcweir OBJCNT_NONE, 111cdf0e10cSrcweir OBJCNT_FLY, 112cdf0e10cSrcweir OBJCNT_GRF, 113cdf0e10cSrcweir OBJCNT_OLE, 114cdf0e10cSrcweir OBJCNT_SIMPLE, 115cdf0e10cSrcweir OBJCNT_CONTROL, 116cdf0e10cSrcweir OBJCNT_URLBUTTON, 117cdf0e10cSrcweir 118cdf0e10cSrcweir OBJCNT_GROUPOBJ, 119cdf0e10cSrcweir OBJCNT_DONTCARE // nicht bestimmbar - unterschiedliche Objecte selektiert 120cdf0e10cSrcweir }; 121cdf0e10cSrcweir 122cdf0e10cSrcweir //fuer GetAnyCurRect 123cdf0e10cSrcweir enum CurRectType 124cdf0e10cSrcweir { 125cdf0e10cSrcweir RECT_PAGE, //Rect der aktuellen Seite. 126cdf0e10cSrcweir RECT_PAGE_CALC, //... Seite wird ggf. Formatiert 127cdf0e10cSrcweir RECT_PAGE_PRT, //Rect der aktuellen PrtArea der Seite 128cdf0e10cSrcweir RECT_FRM, //Rect des aktuellen Rahmen 129cdf0e10cSrcweir RECT_FLY_EMBEDDED, //Rect des aktuellen FlyFrm 130cdf0e10cSrcweir RECT_FLY_PRT_EMBEDDED, //Rect der PrtArea des FlyFrm 131cdf0e10cSrcweir RECT_SECTION, //Rect des aktuellen Bereichs 132cdf0e10cSrcweir RECT_OUTTABSECTION, //Rect des aktuellen Bereichs, 133cdf0e10cSrcweir // aber ausserhalb der Tabelle 134cdf0e10cSrcweir RECT_SECTION_PRT, //Rect der aktuellen PrtArea des Bereichs 135cdf0e10cSrcweir RECT_OUTTABSECTION_PRT, //Rect der aktuellen PrtArea des Bereichs, 136cdf0e10cSrcweir // aber ausserhalb der Tabelle 137cdf0e10cSrcweir RECT_HEADERFOOTER, //Rect des aktuellen Headers/Footer 138cdf0e10cSrcweir RECT_HEADERFOOTER_PRT, //Rect der PrtArea des aktuellen Headers/Footers 139cdf0e10cSrcweir 140cdf0e10cSrcweir RECT_PAGES_AREA //Rect covering the pages area 141cdf0e10cSrcweir }; 142cdf0e10cSrcweir 143cdf0e10cSrcweir struct SwGetCurColNumPara 144cdf0e10cSrcweir { 145cdf0e10cSrcweir const SwFrmFmt* pFrmFmt; 146cdf0e10cSrcweir const SwRect* pPrtRect, *pFrmRect; SwGetCurColNumParaSwGetCurColNumPara147cdf0e10cSrcweir SwGetCurColNumPara() : pFrmFmt( 0 ), pPrtRect( 0 ), pFrmRect( 0 ) {} 148cdf0e10cSrcweir }; 149cdf0e10cSrcweir 150cdf0e10cSrcweir #define SW_PASTESDR_INSERT 1 151cdf0e10cSrcweir #define SW_PASTESDR_REPLACE 2 152cdf0e10cSrcweir #define SW_PASTESDR_SETATTR 3 153cdf0e10cSrcweir 154cdf0e10cSrcweir #define SW_ADD_SELECT 1 155cdf0e10cSrcweir #define SW_ENTER_GROUP 2 156cdf0e10cSrcweir #define SW_LEAVE_FRAME 4 157cdf0e10cSrcweir 158cdf0e10cSrcweir #define SW_MOVE_UP 0 159cdf0e10cSrcweir #define SW_MOVE_DOWN 1 160cdf0e10cSrcweir #define SW_MOVE_LEFT 2 161cdf0e10cSrcweir #define SW_MOVE_RIGHT 3 162cdf0e10cSrcweir 163cdf0e10cSrcweir #define SW_TABCOL_NONE 0 164cdf0e10cSrcweir #define SW_TABCOL_HORI 1 165cdf0e10cSrcweir #define SW_TABCOL_VERT 2 166cdf0e10cSrcweir #define SW_TABROW_HORI 3 167cdf0e10cSrcweir #define SW_TABROW_VERT 4 168cdf0e10cSrcweir // --> FME 2004-07-30 #i32329# Enhanced table selection 169cdf0e10cSrcweir #define SW_TABSEL_HORI 5 170cdf0e10cSrcweir #define SW_TABSEL_HORI_RTL 6 171cdf0e10cSrcweir #define SW_TABROWSEL_HORI 7 172cdf0e10cSrcweir #define SW_TABROWSEL_HORI_RTL 8 173cdf0e10cSrcweir #define SW_TABCOLSEL_HORI 9 174cdf0e10cSrcweir #define SW_TABSEL_VERT 10 175cdf0e10cSrcweir #define SW_TABROWSEL_VERT 11 176cdf0e10cSrcweir #define SW_TABCOLSEL_VERT 12 177cdf0e10cSrcweir // <-- 178cdf0e10cSrcweir 179cdf0e10cSrcweir class SdrDropMarkerOverlay; 180cdf0e10cSrcweir 181cdf0e10cSrcweir class SW_DLLPUBLIC SwFEShell : public SwEditShell 182cdf0e10cSrcweir { 183cdf0e10cSrcweir SdrDropMarkerOverlay *pChainFrom, *pChainTo; 184cdf0e10cSrcweir sal_Bool bCheckForOLEInCaption; 185cdf0e10cSrcweir 186cdf0e10cSrcweir SW_DLLPRIVATE SwFlyFrm *FindFlyFrm() const; 187cdf0e10cSrcweir SW_DLLPRIVATE SwFlyFrm *FindFlyFrm( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& ) const; 188cdf0e10cSrcweir 189cdf0e10cSrcweir //Actions fuer alle Shells beenden und ChangeLink rufen. 190cdf0e10cSrcweir SW_DLLPRIVATE void EndAllActionAndCall(); 191cdf0e10cSrcweir 192cdf0e10cSrcweir SW_DLLPRIVATE void ScrollTo( const Point &rPt ); 193cdf0e10cSrcweir 194cdf0e10cSrcweir // OD 25.06.2003 #108784# - correct type of 1st parameter 195cdf0e10cSrcweir SW_DLLPRIVATE void ChangeOpaque( SdrLayerID nLayerId ); 196cdf0e10cSrcweir 197cdf0e10cSrcweir // Used for mouse operations on a table: 198cdf0e10cSrcweir // Returns a cell frame that is 'close' to rPt. 199cdf0e10cSrcweir SW_DLLPRIVATE const SwFrm *GetBox( const Point &rPt, bool* pbRow = 0, bool* pbCol = 0 ) const; 200cdf0e10cSrcweir 201cdf0e10cSrcweir //0 == in keiner Spalte 202cdf0e10cSrcweir SW_DLLPRIVATE sal_uInt16 _GetCurColNum( const SwFrm *pFrm, 203cdf0e10cSrcweir SwGetCurColNumPara* pPara ) const; 204cdf0e10cSrcweir 205cdf0e10cSrcweir SW_DLLPRIVATE void _GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const; 206cdf0e10cSrcweir SW_DLLPRIVATE void _GetTabRows( SwTabCols &rToFill, const SwFrm *pBox ) const; 207cdf0e10cSrcweir 208cdf0e10cSrcweir SW_DLLPRIVATE sal_Bool ImpEndCreate(); 209cdf0e10cSrcweir 210cdf0e10cSrcweir SW_DLLPRIVATE ObjCntType GetObjCntType( const SdrObject& rObj ) const; 211cdf0e10cSrcweir 212cdf0e10cSrcweir // Methoden fuers kopieren von DrawObjecten 213cdf0e10cSrcweir SW_DLLPRIVATE sal_Bool CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, 214cdf0e10cSrcweir const Point& rInsPt, sal_Bool bIsMove, 215cdf0e10cSrcweir sal_Bool bSelectInsert ); 216cdf0e10cSrcweir 217cdf0e10cSrcweir // get list of marked SdrObjects; 218cdf0e10cSrcweir // helper method for GetSelFrmType, IsSelContainsControl 219cdf0e10cSrcweir SW_DLLPRIVATE const SdrMarkList* _GetMarkList() const; 220cdf0e10cSrcweir 221cdf0e10cSrcweir SW_DLLPRIVATE sal_Bool CheckHeadline( bool bRepeat ) const; 222cdf0e10cSrcweir 223cdf0e10cSrcweir using SwEditShell::Copy; 224cdf0e10cSrcweir 225cdf0e10cSrcweir public: 226cdf0e10cSrcweir 227cdf0e10cSrcweir using SwEditShell::Insert; 228cdf0e10cSrcweir 229cdf0e10cSrcweir TYPEINFO(); 230cdf0e10cSrcweir SwFEShell( SwDoc& rDoc, Window *pWin, const SwViewOption *pOpt = 0 ); 231cdf0e10cSrcweir SwFEShell( SwEditShell& rShell, Window *pWin ); 232cdf0e10cSrcweir virtual ~SwFEShell(); 233cdf0e10cSrcweir 234cdf0e10cSrcweir // Copy und Paste Methoden fuer das interne Clipboard 235cdf0e10cSrcweir sal_Bool Copy( SwDoc* pClpDoc, const String* pNewClpTxt = 0 ); 236cdf0e10cSrcweir sal_Bool Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames = sal_False); 237cdf0e10cSrcweir //paste some pages into another doc - used in mailmerge 238cdf0e10cSrcweir sal_Bool PastePages( SwFEShell& rToFill, sal_uInt16 nStartPage, sal_uInt16 nEndPage); 239cdf0e10cSrcweir // Copy-Methode fuer Drag&Drop 240cdf0e10cSrcweir sal_Bool Copy( SwFEShell*, const Point& rSttPt, const Point& rInsPt, 241cdf0e10cSrcweir sal_Bool bIsMove = sal_False, sal_Bool bSelectInsert = sal_True ); 242cdf0e10cSrcweir 243cdf0e10cSrcweir void SelectFlyFrm( SwFlyFrm& rFrm, sal_Bool bNew = sal_False ); 244cdf0e10cSrcweir 245cdf0e10cSrcweir // befindet sich der selektierte Rahmen innerhalb eines anderen? 246cdf0e10cSrcweir const SwFrmFmt* IsFlyInFly(); 247cdf0e10cSrcweir 248cdf0e10cSrcweir //SS fuer DrawObjekte und Rahmen----------------------------- 249cdf0e10cSrcweir 250cdf0e10cSrcweir //Wenn ein Objekt angegeben wurde, so wird genau diese Markiert (anstatt 251cdf0e10cSrcweir //ueber die Position zu suchen. 252cdf0e10cSrcweir sal_Bool SelectObj( const Point& rSelPt, sal_uInt8 nFlag = 0, SdrObject *pObj = 0 ); 253cdf0e10cSrcweir void DelSelectedObj(); 254cdf0e10cSrcweir 255cdf0e10cSrcweir //Selektion nach oben unten bewegen (Z-Order). 256cdf0e10cSrcweir //sal_True == ganz nach oben/unten 257cdf0e10cSrcweir //sal_False == einen ueberholen 258cdf0e10cSrcweir void SelectionToTop ( sal_Bool bTop = sal_True ); 259cdf0e10cSrcweir void SelectionToBottom( sal_Bool bBottom = sal_True ); 260cdf0e10cSrcweir 261cdf0e10cSrcweir short GetLayerId() const; //1 Heaven, 0 Hell, -1 Uneindeutig 262cdf0e10cSrcweir void SelectionToHeaven(); //Ueber dem Dokument 263cdf0e10cSrcweir void SelectionToHell(); //Unter dem Dokument 264cdf0e10cSrcweir 265cdf0e10cSrcweir // folgende zwei Methoden returnen den enum SdrHdlKind, um sich ein 266cdf0e10cSrcweir // includen von SVDRAW.HXX zu ersparen als int deklariert. 267cdf0e10cSrcweir bool IsObjSelectable( const Point& rPt ); 268cdf0e10cSrcweir int IsInsideSelectedObj( const Point& rPt ); //!! returns enum values 269cdf0e10cSrcweir 270cdf0e10cSrcweir // #107513# 271cdf0e10cSrcweir // Test if there is a draw object at that position and if it should be selected. 272cdf0e10cSrcweir // The 'should' is aimed at Writer text fly frames which may be in front of 273cdf0e10cSrcweir // the draw object. 274cdf0e10cSrcweir sal_Bool ShouldObjectBeSelected(const Point& rPt); 275cdf0e10cSrcweir 276cdf0e10cSrcweir sal_Bool MoveAnchor( sal_uInt16 nDir ); 277cdf0e10cSrcweir 278cdf0e10cSrcweir // Returns if Upper of frame at current position is section frame 279cdf0e10cSrcweir // Currently only used by the rules. To be replaced by something more 280cdf0e10cSrcweir // sophisticated one day. 281cdf0e10cSrcweir bool IsDirectlyInSection() const; 282cdf0e10cSrcweir 283cdf0e10cSrcweir //Returnwerte siehe oben FrmType. 284cdf0e10cSrcweir //pPt: Crsr bzw. DocPos; bStopAtFly: Bei Flys anhalten oder ueber den Anchor weitergehen 285cdf0e10cSrcweir // Obgleich (0,sal_True) eine Art Standard ist, sind die Parameter nicht defaultet, damit 286cdf0e10cSrcweir // bei jeder Benutzung insbesondere das bStopAtFly bewusst genutzt wird. 287cdf0e10cSrcweir sal_uInt16 GetFrmType( const Point *pPt, sal_Bool bStopAtFly ) const; 288cdf0e10cSrcweir sal_uInt16 GetSelFrmType() const; //Selektion (Drawing) 289cdf0e10cSrcweir 290cdf0e10cSrcweir /** #108784# check whether selected frame contains a control; 291cdf0e10cSrcweir * companion method to GetSelFrmType, used for preventing 292cdf0e10cSrcweir * drag&drop of controls into header */ 293cdf0e10cSrcweir bool IsSelContainsControl() const; 294cdf0e10cSrcweir 295cdf0e10cSrcweir ObjCntType GetObjCntType( const Point &rPt, SdrObject *&rpObj ) const; 296cdf0e10cSrcweir ObjCntType GetObjCntTypeOfSelection( SdrObject** ppObj = 0 ) const; 297cdf0e10cSrcweir 298cdf0e10cSrcweir //Zum Anpassen der PosAttr bei Ankerwechseln. 299cdf0e10cSrcweir SwRect GetObjRect() const; 300cdf0e10cSrcweir //Zum Verschieben von Flys mit der Tastatur 301cdf0e10cSrcweir SwRect GetFlyRect() const; 302cdf0e10cSrcweir // OD 18.09.2003 #i17567#, #108749#, #110354# - adjustments to allow 303cdf0e10cSrcweir // negative vertical positions for fly frames anchored 304cdf0e10cSrcweir // to paragraph or to character. 305cdf0e10cSrcweir // OD 02.10.2003 #i18732# - adjustments for new option 'FollowTextFlow' 306cdf0e10cSrcweir // OD 12.11.2003 #i22341# - adjustments for new vertical alignment at top of line 307cdf0e10cSrcweir void CalcBoundRect( SwRect& _orRect, 308cdf0e10cSrcweir const RndStdIds _nAnchorId, 309cdf0e10cSrcweir const sal_Int16 _eHoriRelOrient = com::sun::star::text::RelOrientation::FRAME, 310cdf0e10cSrcweir const sal_Int16 _eVertRelOrient = com::sun::star::text::RelOrientation::FRAME, 311cdf0e10cSrcweir const SwPosition* _pToCharCntntPos = NULL, 312cdf0e10cSrcweir const bool _bFollowTextFlow = false, 313cdf0e10cSrcweir bool _bMirror = false, 314cdf0e10cSrcweir Point* _opRef = NULL, 315cdf0e10cSrcweir Size* _opPercent = NULL ) const; 316cdf0e10cSrcweir 317cdf0e10cSrcweir // Groesse von Drawobjekten setzen 318cdf0e10cSrcweir void SetObjRect( const SwRect& rRect ); 319cdf0e10cSrcweir 320cdf0e10cSrcweir long BeginDrag( const Point *pPt, sal_Bool bProp ); 321cdf0e10cSrcweir long Drag ( const Point *pPt, sal_Bool bProp ); 322cdf0e10cSrcweir long EndDrag ( const Point *pPt, sal_Bool bProp ); 323cdf0e10cSrcweir void BreakDrag(); 324cdf0e10cSrcweir 325cdf0e10cSrcweir //Methoden fuer die Statuszeile. 326cdf0e10cSrcweir Point GetAnchorObjDiff() const; //Abstand zum Anker 327cdf0e10cSrcweir Point GetObjAbsPos() const; //Absolute Position 328cdf0e10cSrcweir Size GetObjSize() const; //Groesse, ggf. die umschliessende 329cdf0e10cSrcweir 330cdf0e10cSrcweir //SS fuer die BriefUmschlaege: hole alle Seitengebundenen Objekte 331cdf0e10cSrcweir //und setze diese auf eine neue Seite. 332cdf0e10cSrcweir void GetPageObjs( SvPtrarr& rFillArr ); 333cdf0e10cSrcweir void SetPageObjsNewPage( SvPtrarr& rFillArr, int nOffset = 1 ); 334cdf0e10cSrcweir 335cdf0e10cSrcweir // zeige die aktuelle Selektion an ( ggfs. den Rahmen/DrawObject) 336cdf0e10cSrcweir virtual void MakeSelVisible(); 337cdf0e10cSrcweir 338cdf0e10cSrcweir // returne das FrmFmt von dem evt. unter dem Point stehenden Object. 339cdf0e10cSrcweir // Das Object wird nicht selektiert! 340cdf0e10cSrcweir const SwFrmFmt* GetFmtFromObj( const Point& rPt, SwRect** pRectToFill = 0 ) const; 341cdf0e10cSrcweir // returns a format too, if the point is over the text of any fly 342cdf0e10cSrcweir const SwFrmFmt* GetFmtFromAnyObj( const Point& rPt ) const; 343cdf0e10cSrcweir 344cdf0e10cSrcweir //Welcher Schutz ist am selektierten Objekt gesetzt? 345cdf0e10cSrcweir //!! returns several flags in sal_uInt8 346cdf0e10cSrcweir sal_uInt8 IsSelObjProtected( sal_uInt16 /*FLYPROTECT_...*/ eType ) const; 347cdf0e10cSrcweir 348cdf0e10cSrcweir //Liefert neben der Grafik in rName bei gelinkten Grafiken den Namen mit 349cdf0e10cSrcweir //Pfad und sonst den Grafiknamen. rbLink ist TRU bei gelinkten Grafiken. 350cdf0e10cSrcweir const Graphic *GetGrfAtPos( const Point &rDocPos, 351cdf0e10cSrcweir String &rName, sal_Bool &rbLink ) const; 352cdf0e10cSrcweir 353cdf0e10cSrcweir // --> OD 2009-07-13 #i73249# 354cdf0e10cSrcweir const String GetObjTitle() const; 355cdf0e10cSrcweir void SetObjTitle( const String& rTitle ); 356cdf0e10cSrcweir const String GetObjDescription() const; 357cdf0e10cSrcweir void SetObjDescription( const String& rDescription ); 358cdf0e10cSrcweir // <-- 359cdf0e10cSrcweir 360cdf0e10cSrcweir //SS fuer Rahmen -------------------------------------------- 361cdf0e10cSrcweir 362cdf0e10cSrcweir sal_Bool IsFrmSelected() const; 363cdf0e10cSrcweir sal_Bool GetFlyFrmAttr( SfxItemSet &rSet ) const; 364cdf0e10cSrcweir sal_Bool SetFlyFrmAttr( SfxItemSet &rSet ); 365cdf0e10cSrcweir sal_Bool ResetFlyFrmAttr( sal_uInt16 nWhich, const SfxItemSet* pSet = 0 ); 366cdf0e10cSrcweir const SwFrmFmt *NewFlyFrm( const SfxItemSet &rSet, sal_Bool bAnchValid = sal_False, 367cdf0e10cSrcweir SwFrmFmt *pParent = 0 ); 368cdf0e10cSrcweir void SetFlyPos( const Point &rAbsPos); 369cdf0e10cSrcweir Point FindAnchorPos( const Point &rAbsPos, sal_Bool bMoveIt = sal_False ); 370cdf0e10cSrcweir // determines whether a frame or its environment is vertically formatted and right-to-left 371cdf0e10cSrcweir // --> OD 2009-08-31 #mongolianlayout# 372cdf0e10cSrcweir // also determines, if frame or its environmane is in mongolianlayout (vertical left-to-right) 373cdf0e10cSrcweir // - add output parameter <bVertL2R> 374cdf0e10cSrcweir sal_Bool IsFrmVertical(const sal_Bool bEnvironment, sal_Bool& bRightToLeft, sal_Bool& bVertL2R) const; 375cdf0e10cSrcweir 376cdf0e10cSrcweir SwFrmFmt* GetCurFrmFmt() const; //Wenn Rahmen, dann Rahmenvorlage, sonst 0 377cdf0e10cSrcweir void SetFrmFmt( SwFrmFmt *pFmt, sal_Bool bKeepOrient = sal_False, Point* pDocPos = 0 ); //Wenn Rahmen, dann Rahmenvorlage setzen GetCurrFlyFrm() const378cdf0e10cSrcweir const SwFlyFrm *GetCurrFlyFrm() const { return FindFlyFrm(); } 379cdf0e10cSrcweir 380cdf0e10cSrcweir // finde/loeschen den Fly, in dem der Cursor steht 381cdf0e10cSrcweir SwFrmFmt* WizzardGetFly(); 382cdf0e10cSrcweir 383cdf0e10cSrcweir //Selebstaendiges selektieren von Flys GotoNextFly(sal_uInt16 eType=GOTOOBJ_FLY_ANY)384cdf0e10cSrcweir sal_Bool GotoNextFly( sal_uInt16 /*GOTOOBJ_...*/ eType = GOTOOBJ_FLY_ANY ) 385cdf0e10cSrcweir { return GotoObj( sal_True, eType ); } GotoPrevFly(sal_uInt16 eType=GOTOOBJ_FLY_ANY)386cdf0e10cSrcweir sal_Bool GotoPrevFly( sal_uInt16 /*GOTOOBJ_...*/ eType = GOTOOBJ_FLY_ANY) 387cdf0e10cSrcweir { return GotoObj( sal_False, eType); } 388cdf0e10cSrcweir 389cdf0e10cSrcweir //iterieren ueber Flys - fuer Basic-Collections 390cdf0e10cSrcweir sal_uInt16 GetFlyCount( FlyCntType eType = FLYCNTTYPE_ALL ) const; 391cdf0e10cSrcweir const SwFrmFmt* GetFlyNum(sal_uInt16 nIdx, FlyCntType eType = FLYCNTTYPE_ALL) const; 392cdf0e10cSrcweir 393cdf0e10cSrcweir //Wenn ein fly selectiert ist, zieht er den Crsr in den ersten CntntFrm 394cdf0e10cSrcweir const SwFrmFmt* SelFlyGrabCrsr(); 395cdf0e10cSrcweir 396cdf0e10cSrcweir //Get FlyFrameFormat; fuer UI Macro Anbindung an Flys 397cdf0e10cSrcweir const SwFrmFmt* GetFlyFrmFmt() const; 398cdf0e10cSrcweir SwFrmFmt* GetFlyFrmFmt(); 399cdf0e10cSrcweir 400cdf0e10cSrcweir //OLE, Server fordert neue Groesse an, die gewuenschten Werte werden 401cdf0e10cSrcweir //als Rahmenattribute eingestellt. Wenn die Werte nicht erlaubt sind, 402cdf0e10cSrcweir //so wird von der Formatierung geclippt und eine Scalierung eingestellt. 403cdf0e10cSrcweir //siehe CalcAndSetScale(). 404cdf0e10cSrcweir // The return value is the applied size. 405cdf0e10cSrcweir Size RequestObjectResize( const SwRect &rRect, const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& ); 406cdf0e10cSrcweir 407cdf0e10cSrcweir //The layout has been changed, so the active object has to be moved after that 408cdf0e10cSrcweir virtual void MoveObjectIfActive( svt::EmbeddedObjectRef& xObj, const Point& rOffset ); 409cdf0e10cSrcweir 410cdf0e10cSrcweir //Der Client fuer das OleObject muss bezueglich der Scalierung auf dem 411cdf0e10cSrcweir //neuesten Stand gehalten werden. Impl in der WrtShell. 412cdf0e10cSrcweir //Wird ein Pointer auf eine Size uebergeben, so ist diese die aktuelle 413cdf0e10cSrcweir //Core-Groesse des Objectes. Anderfalls wird die Groesse per GetCurFlyRect() 414cdf0e10cSrcweir //besorgt. 415cdf0e10cSrcweir virtual void CalcAndSetScale( svt::EmbeddedObjectRef& xObj, 416cdf0e10cSrcweir const SwRect *pFlyPrtRect = 0, 417b3b0b271SMichael Stahl const SwRect *pFlyFrmRect = 0, 418b3b0b271SMichael Stahl const bool bNoTxtFrmPrtAreaChanged = false ) = 0; 419cdf0e10cSrcweir 420cdf0e10cSrcweir //Objekte mit ActivateWhenVisible werden beim Paint Connected. 421cdf0e10cSrcweir //gerufen von notxtfrm::Paint, impl in wrtsh 422cdf0e10cSrcweir virtual void ConnectObj( svt::EmbeddedObjectRef&, 423cdf0e10cSrcweir const SwRect &rPrt, 424cdf0e10cSrcweir const SwRect &rFrm ) = 0; 425cdf0e10cSrcweir 426cdf0e10cSrcweir //Sichbaren Bereich auf das Object setzen, wenn es noch nicht sichtbar ist. 427cdf0e10cSrcweir void MakeObjVisible( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& ) const; 428cdf0e10cSrcweir 429cdf0e10cSrcweir // check resize of OLE-Object IsCheckForOLEInCaption() const430cdf0e10cSrcweir sal_Bool IsCheckForOLEInCaption() const { return bCheckForOLEInCaption; } SetCheckForOLEInCaption(sal_Bool bFlag)431cdf0e10cSrcweir void SetCheckForOLEInCaption( sal_Bool bFlag ) { bCheckForOLEInCaption = bFlag; } 432cdf0e10cSrcweir 433cdf0e10cSrcweir // setze am selektierten FlyFrame einen Namen 434cdf0e10cSrcweir void SetFlyName( const String& rName ); 435cdf0e10cSrcweir const String& GetFlyName() const; 436cdf0e10cSrcweir 437cdf0e10cSrcweir // get reference to OLE object (if there is one) for selected FlyFrame 438cdf0e10cSrcweir const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetOleRef() const; 439cdf0e10cSrcweir 440cdf0e10cSrcweir // erezeuge eindeutige Namen fuer Rahmen 441cdf0e10cSrcweir String GetUniqueGrfName() const; 442cdf0e10cSrcweir String GetUniqueOLEName() const; 443cdf0e10cSrcweir String GetUniqueFrameName() const; 444cdf0e10cSrcweir 445cdf0e10cSrcweir // springe zum benannten Rahmen (Grafik/OLE) 446cdf0e10cSrcweir sal_Bool GotoFly( const String& rName, FlyCntType eType = FLYCNTTYPE_ALL, 447cdf0e10cSrcweir sal_Bool bSelFrame = sal_True ); 448cdf0e10cSrcweir // steht an der Position eine Grafik mit einer URL ? 449cdf0e10cSrcweir const SwFrmFmt* IsURLGrfAtPos( const Point& rPt, String* pURL = 0, 450cdf0e10cSrcweir String *pTargetFrameName = 0, 451cdf0e10cSrcweir String *pURLDescription = 0 ) const; 452cdf0e10cSrcweir 453cdf0e10cSrcweir //Fuer das Chain wird immer der durch das Format spezifizierte Fly 454cdf0e10cSrcweir //mit dem durch den Point getroffenen verbunden. 455cdf0e10cSrcweir //In rRect wird das Rect des Flys geliefert (fuer Highlight desselben) 456cdf0e10cSrcweir int Chainable( SwRect &rRect, const SwFrmFmt &rSource, const Point &rPt ) const; 457cdf0e10cSrcweir int Chain( SwFrmFmt &rSource, const Point &rPt ); 458cdf0e10cSrcweir int Chain( SwFrmFmt &rSource, const SwFrmFmt &rDest ); 459cdf0e10cSrcweir void Unchain( SwFrmFmt &rFmt ); 460cdf0e10cSrcweir void HideChainMarker(); 461cdf0e10cSrcweir void SetChainMarker(); 462cdf0e10cSrcweir 463cdf0e10cSrcweir Size GetGraphicDefaultSize() const; 464cdf0e10cSrcweir 465cdf0e10cSrcweir //SS fuer DrawObjekte --------------------- 466cdf0e10cSrcweir 467cdf0e10cSrcweir //Temporaer um Bug zu umgehen. 468cdf0e10cSrcweir void CheckUnboundObjects(); 469cdf0e10cSrcweir 470cdf0e10cSrcweir //Achtung: Uneindeutikeiten bei Mehrfachselektionen. 471cdf0e10cSrcweir sal_Bool GetObjAttr( SfxItemSet &rSet ) const; 472cdf0e10cSrcweir sal_Bool SetObjAttr( const SfxItemSet &rSet ); 473cdf0e10cSrcweir 474cdf0e10cSrcweir const SdrObject* GetBestObject( sal_Bool bNext, sal_uInt16 eType = GOTOOBJ_DRAW_ANY, sal_Bool bFlat = sal_True, const ::svx::ISdrObjectFilter* pFilter = NULL ); 475cdf0e10cSrcweir sal_Bool GotoObj( sal_Bool bNext, sal_uInt16 /*GOTOOBJ_...*/ eType = GOTOOBJ_DRAW_ANY); 476cdf0e10cSrcweir 477cdf0e10cSrcweir //Setzen vom DragMode (z.B. Rotate), tut nix bei Rahmenselektion. 478cdf0e10cSrcweir void SetDragMode( sal_uInt16 eSdrDragMode ); 479cdf0e10cSrcweir 480cdf0e10cSrcweir sal_uInt16 IsObjSelected() const; //Liefert gleich die Anzahl der Objekte, 481cdf0e10cSrcweir //zaehlt aber nicht die Objekte in Gruppen. 482cdf0e10cSrcweir sal_Bool IsObjSelected( const SdrObject& rObj ) const; 483ca62e2c2SSteve Yin sal_Bool IsObjSameLevelWithMarked(const SdrObject* pObj) const; GetMarkList() const484ca62e2c2SSteve Yin const SdrMarkList* GetMarkList() const{ return _GetMarkList(); }; 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 ); 53752f1c2eeSArmin Le Grand bool Paste( const Graphic &rGrf, const String& rURL ); 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 IsInRepeatedHeadline() const695cdf0e10cSrcweir sal_Bool IsInRepeatedHeadline() const { return CheckHeadline( true ); } IsInHeadline() const696cdf0e10cSrcweir 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 734*bb2d54e7Smseidel // Der Ruler 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*bb2d54e7Smseidel 801*bb2d54e7Smseidel /* vim: set noet sw=4 ts=4: */ 802