Update ooo320-m1
[ooovba.git] / sw / source / core / inc / frminf.hxx
blobf118af8fa8d5a2f18ee8656df39a8149d9af74ce
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: frminf.hxx,v $
10 * $Revision: 1.4 $
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 _FRMINF_HXX
31 #define _FRMINF_HXX
33 #include "swtypes.hxx"
35 class SwTxtFrm; // SwTxtFrmInfo
36 class SwPaM; // SwTxtFrmInfo
37 class SwTxtCursor; // SwTxtFrmInfo
40 /*************************************************************************
41 * class SwTxtFrmInfo
42 *************************************************************************/
44 class SwTxtFrmInfo
46 const SwTxtFrm *pFrm;
48 // Wo beginnt der Text (ohne whitespaces)? (Dokument global !!)
49 SwTwips GetLineStart( const SwTxtCursor &rLine ) const;
51 public:
52 inline SwTxtFrmInfo( const SwTxtFrm *pTxtFrm ) : pFrm(pTxtFrm) { }
54 // Passt der Absatz in eine Zeile?
55 BOOL IsOneLine() const;
57 // Ist die Zeile zu X% gefuellt?
58 BOOL IsFilled( const BYTE nPercent ) const;
60 // Wo beginnt der Text (ohne whitespaces)? (rel. im Frame !!)
61 SwTwips GetLineStart() const;
63 //returne die mittel Position des n. Charakters
64 SwTwips GetCharPos( xub_StrLen nChar, BOOL bCenter = TRUE ) const;
66 // Sammelt die whitespaces am Zeilenbeginn und -ende im Pam
67 void GetSpaces( SwPaM &rPam, BOOL bWithLineBreak ) const;
69 // Ist an der ersten Textposition ein Bullet/Symbol etc?
70 BOOL IsBullet( xub_StrLen nTxtPos ) const;
72 // Ermittelt Erstzeileneinzug
73 SwTwips GetFirstIndent() const;
75 // setze und erfrage den Frame;
76 const SwTxtFrm* GetFrm() const { return pFrm; }
77 SwTxtFrmInfo& SetFrm( const SwTxtFrm* pNew )
78 { pFrm = pNew; return *this; }
80 // liegt eine Gegenueberstellung vor? (returnt Pos im Frame)
81 USHORT GetBigIndent( xub_StrLen& rFndPos,
82 const SwTxtFrm *pNextFrm = 0 ) const;
87 #endif