merge the formfield patch from ooo-build
[ooovba.git] / basic / source / inc / buffer.hxx
blobbfc0f5f61231eee2e5478d2cf0076ca6539eebd7
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: buffer.hxx,v $
10 * $Revision: 1.6 $
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 ************************************************************************/
31 #ifndef _BUFFER_HXX
32 #define _BUFFER_HXX
34 #include <tools/solar.h>
35 #include <tools/string.hxx>
37 class SbiParser;
39 class SbiBuffer { // Code/Konstanten-Puffer:
40 SbiParser* pParser; // fuer Fehlermeldungen
41 char* pBuf; // Puffer-Pointer
42 char* pCur; // aktueller Puffer-Pointer
43 UINT32 nOff; // aktuelles Offset
44 UINT32 nSize; // aktuelle Groesse
45 short nInc; // Inkrement
46 BOOL Check( USHORT ); // Buffergroesse testen
47 public:
48 SbiBuffer( SbiParser*, short ); // Inkrement
49 ~SbiBuffer();
50 void Patch( UINT32, UINT32 ); // Patchen
51 void Chain( UINT32 ); // Back-Chain
52 void Align( INT32 ); // Alignment
53 BOOL Add( const void*, USHORT );// Element anfuegen
54 BOOL operator += (const String&);// Basic-String speichern
55 BOOL operator += (INT8); // Zeichen speichern
56 BOOL operator += (INT16); // Integer speichern
57 BOOL operator += (UINT8); // Zeichen speichern
58 BOOL operator += (UINT16); // Integer speichern
59 BOOL operator += (UINT32); // Integer speichern
60 BOOL operator += (INT32); // Integer speichern
61 char* GetBuffer(); // Puffer rausgeben (selbst loeschen!)
62 char* GetBufferPtr(){ return pBuf; }
63 UINT32 GetSize() { return nOff; }
66 #endif