merged tag ooo/OOO330_m14
[LibreOffice.git] / sw / inc / unocrsr.hxx
blob001f0eef3ab25b7662683e6c4e9d30475f8e8fe1
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef _UNOCRSR_HXX
28 #define _UNOCRSR_HXX
29 #include <swcrsr.hxx>
30 #include <calbck.hxx>
33 class SwUnoCrsr : public virtual SwCursor, public SwModify
35 BOOL bRemainInSection : 1;
36 BOOL bSkipOverHiddenSections : 1;
37 BOOL bSkipOverProtectSections : 1;
39 public:
40 SwUnoCrsr( const SwPosition &rPos, SwPaM* pRing = 0 );
41 virtual ~SwUnoCrsr();
43 // @@@ semantic: no copy ctor.
44 SwUnoCrsr( SwUnoCrsr& );
45 private:
46 // forbidden and not implemented.
47 //SwUnoCrsr( const SwUnoCrsr& );
48 SwUnoCrsr & operator= ( const SwUnoCrsr& );
50 protected:
52 virtual const SwCntntFrm* DoSetBidiLevelLeftRight(
53 BOOL & io_rbLeft, BOOL bVisualAllowed, BOOL bInsertCrsr);
54 virtual void DoSetBidiLevelUpDown();
56 public:
58 // virtual SwCursor* Create( SwPaM* pRing = 0 ) const;
60 // gibt es eine Selection vom Content in die Tabelle
61 // Return Wert gibt an, ob der Crsr auf der alten Position verbleibt
62 virtual BOOL IsSelOvr( int eFlags =
63 ( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
64 nsSwCursorSelOverFlags::SELOVER_TOGGLE |
65 nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ));
67 virtual bool IsReadOnlyAvailable() const;
69 BOOL IsRemainInSection() const { return bRemainInSection; }
70 void SetRemainInSection( BOOL bFlag ) { bRemainInSection = bFlag; }
72 virtual BOOL IsSkipOverProtectSections() const
73 { return bSkipOverProtectSections; }
74 void SetSkipOverProtectSections( BOOL bFlag )
75 { bSkipOverProtectSections = bFlag; }
77 virtual BOOL IsSkipOverHiddenSections() const
78 { return bSkipOverHiddenSections; }
79 void SetSkipOverHiddenSections( BOOL bFlag )
80 { bSkipOverHiddenSections = bFlag; }
82 // make copy of cursor
83 virtual SwUnoCrsr * Clone() const;
85 DECL_FIXEDMEMPOOL_NEWDEL( SwUnoCrsr )
90 class SwUnoTableCrsr : public virtual SwUnoCrsr, public virtual SwTableCursor
92 // die Selection hat die gleiche Reihenfolge wie die
93 // TabellenBoxen. D.h., wird aus dem einen Array an einer Position
94 // etwas geloescht, dann muss es auch im anderen erfolgen!!
95 SwCursor aTblSel;
97 using SwTableCursor::MakeBoxSels;
99 public:
100 SwUnoTableCrsr( const SwPosition& rPos );
101 virtual ~SwUnoTableCrsr();
103 // virtual SwCursor* Create( SwPaM* pRing = 0 ) const;
105 // gibt es eine Selection vom Content in die Tabelle
106 // Return Wert gibt an, ob der Crsr auf der alten Position verbleibt
107 virtual BOOL IsSelOvr( int eFlags =
108 ( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
109 nsSwCursorSelOverFlags::SELOVER_TOGGLE |
110 nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ));
112 virtual SwUnoTableCrsr * Clone() const;
114 void MakeBoxSels();
116 SwCursor& GetSelRing() { return aTblSel; }
117 const SwCursor& GetSelRing() const { return aTblSel; }
122 #endif