1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
25 class SwUnoCrsr
: public virtual SwCursor
, public SwModify
27 sal_Bool bRemainInSection
: 1;
28 sal_Bool bSkipOverHiddenSections
: 1;
29 sal_Bool bSkipOverProtectSections
: 1;
32 SwUnoCrsr( const SwPosition
&rPos
, SwPaM
* pRing
= 0 );
37 virtual const SwCntntFrm
* DoSetBidiLevelLeftRight(
38 sal_Bool
& io_rbLeft
, sal_Bool bVisualAllowed
, sal_Bool bInsertCrsr
);
39 virtual void DoSetBidiLevelUpDown();
43 // Does a selection of content exist in table?
44 // Return value indicates if the cursor remains at its old position.
45 virtual sal_Bool
IsSelOvr( int eFlags
=
46 ( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION
|
47 nsSwCursorSelOverFlags::SELOVER_TOGGLE
|
48 nsSwCursorSelOverFlags::SELOVER_CHANGEPOS
));
50 virtual bool IsReadOnlyAvailable() const;
52 sal_Bool
IsRemainInSection() const { return bRemainInSection
; }
53 void SetRemainInSection( sal_Bool bFlag
) { bRemainInSection
= bFlag
; }
55 virtual sal_Bool
IsSkipOverProtectSections() const
56 { return bSkipOverProtectSections
; }
57 void SetSkipOverProtectSections( sal_Bool bFlag
)
58 { bSkipOverProtectSections
= bFlag
; }
60 virtual sal_Bool
IsSkipOverHiddenSections() const
61 { return bSkipOverHiddenSections
; }
62 void SetSkipOverHiddenSections( sal_Bool bFlag
)
63 { bSkipOverHiddenSections
= bFlag
; }
65 // make copy of cursor
66 virtual SwUnoCrsr
* Clone() const;
68 DECL_FIXEDMEMPOOL_NEWDEL( SwUnoCrsr
)
73 class SwUnoTableCrsr
: public virtual SwUnoCrsr
, public virtual SwTableCursor
75 // The selection has the same order as the table boxes, i.e.
76 // if something is deleted from the one array at a certain position
77 // it has also to be deleted from the other!
80 using SwTableCursor::MakeBoxSels
;
83 SwUnoTableCrsr( const SwPosition
& rPos
);
84 virtual ~SwUnoTableCrsr();
86 // Does a selection of content exist in table?
87 // Return value indicates if the cursor remains at its old position.
88 virtual sal_Bool
IsSelOvr( int eFlags
=
89 ( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION
|
90 nsSwCursorSelOverFlags::SELOVER_TOGGLE
|
91 nsSwCursorSelOverFlags::SELOVER_CHANGEPOS
));
93 virtual SwUnoTableCrsr
* Clone() const;
97 SwCursor
& GetSelRing() { return aTblSel
; }
98 const SwCursor
& GetSelRing() const { return aTblSel
; }
105 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */