merge the formfield patch from ooo-build
[ooovba.git] / sw / inc / unocrsr.hxx
blobeb263fb7fccc85c75df90ccf57fd06fd3ceec70e
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: unocrsr.hxx,v $
10 * $Revision: 1.10 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _UNOCRSR_HXX
31 #define _UNOCRSR_HXX
32 #include <swcrsr.hxx>
33 #include <calbck.hxx>
36 class SwUnoCrsr : public virtual SwCursor, public SwModify
38 BOOL bRemainInSection : 1;
39 BOOL bSkipOverHiddenSections : 1;
40 BOOL bSkipOverProtectSections : 1;
42 public:
43 SwUnoCrsr( const SwPosition &rPos, SwPaM* pRing = 0 );
44 virtual ~SwUnoCrsr();
46 // @@@ semantic: no copy ctor.
47 SwUnoCrsr( SwUnoCrsr& );
48 private:
49 // forbidden and not implemented.
50 //SwUnoCrsr( const SwUnoCrsr& );
51 SwUnoCrsr & operator= ( const SwUnoCrsr& );
53 protected:
55 virtual const SwCntntFrm* DoSetBidiLevelLeftRight(
56 BOOL & io_rbLeft, BOOL bVisualAllowed, BOOL bInsertCrsr);
57 virtual void DoSetBidiLevelUpDown();
59 public:
61 // virtual SwCursor* Create( SwPaM* pRing = 0 ) const;
63 // gibt es eine Selection vom Content in die Tabelle
64 // Return Wert gibt an, ob der Crsr auf der alten Position verbleibt
65 virtual BOOL IsSelOvr( int eFlags =
66 ( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
67 nsSwCursorSelOverFlags::SELOVER_TOGGLE |
68 nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ));
70 virtual bool IsReadOnlyAvailable() const;
72 BOOL IsRemainInSection() const { return bRemainInSection; }
73 void SetRemainInSection( BOOL bFlag ) { bRemainInSection = bFlag; }
75 virtual BOOL IsSkipOverProtectSections() const
76 { return bSkipOverProtectSections; }
77 void SetSkipOverProtectSections( BOOL bFlag )
78 { bSkipOverProtectSections = bFlag; }
80 virtual BOOL IsSkipOverHiddenSections() const
81 { return bSkipOverHiddenSections; }
82 void SetSkipOverHiddenSections( BOOL bFlag )
83 { bSkipOverHiddenSections = bFlag; }
85 // make copy of cursor
86 virtual SwUnoCrsr * Clone() const;
88 DECL_FIXEDMEMPOOL_NEWDEL( SwUnoCrsr )
93 class SwUnoTableCrsr : public virtual SwUnoCrsr, public virtual SwTableCursor
95 // die Selection hat die gleiche Reihenfolge wie die
96 // TabellenBoxen. D.h., wird aus dem einen Array an einer Position
97 // etwas geloescht, dann muss es auch im anderen erfolgen!!
98 SwCursor aTblSel;
100 using SwTableCursor::MakeBoxSels;
102 public:
103 SwUnoTableCrsr( const SwPosition& rPos );
104 virtual ~SwUnoTableCrsr();
106 // virtual SwCursor* Create( SwPaM* pRing = 0 ) const;
108 // gibt es eine Selection vom Content in die Tabelle
109 // Return Wert gibt an, ob der Crsr auf der alten Position verbleibt
110 virtual BOOL IsSelOvr( int eFlags =
111 ( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
112 nsSwCursorSelOverFlags::SELOVER_TOGGLE |
113 nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ));
115 virtual SwUnoTableCrsr * Clone() const;
117 void MakeBoxSels();
119 SwCursor& GetSelRing() { return aTblSel; }
120 const SwCursor& GetSelRing() const { return aTblSel; }
125 #endif