re-enabled user-defined numeric fields for dBase export
[LibreOffice.git] / sc / source / filter / inc / rtfparse.hxx
blob50c2b845ec4d90468cee685898fad04caa4a1e47
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 #ifndef SC_RTFPARSE_HXX
21 #define SC_RTFPARSE_HXX
23 #include "eeparser.hxx"
25 #ifdef SC_RTFPARSE_CXX
26 #include <boost/ptr_container/ptr_vector.hpp>
27 #include <o3tl/sorted_vector.hxx>
29 struct ScRTFCellDefault
31 SfxItemSet aItemSet;
32 SCCOL nCol;
33 sal_uInt16 nTwips; // rechter Rand der Zelle
34 SCCOL nColOverlap; // MergeCell wenn >1, merged cells wenn 0
36 ScRTFCellDefault( SfxItemPool* pPool ) :
37 aItemSet( *pPool ), nColOverlap(1) {}
40 class ScRTFColTwips : public o3tl::sorted_vector<sal_uLong> {};
42 #else // SC_RTFPARSE_CXX
44 struct ScRTFCellDefault;
45 class ScRTFColTwips;
47 #endif // SC_RTFPARSE_CXX
50 class EditEngine;
52 class ScRTFParser : public ScEEParser
54 private:
55 typedef boost::ptr_vector<ScRTFCellDefault> DefaultList;
57 DefaultList maDefaultList;
58 size_t mnCurPos;
60 ScRTFColTwips* pColTwips;
61 ScRTFCellDefault* pInsDefault;
62 ScRTFCellDefault* pActDefault;
63 ScRTFCellDefault* pDefMerge;
64 sal_uLong nStartAdjust;
65 sal_uInt16 nLastWidth;
66 sal_Bool bNewDef;
68 DECL_LINK( RTFImportHdl, ImportInfo* );
69 inline void NextRow();
70 void EntryEnd( ScEEParseEntry*, const ESelection& );
71 void ProcToken( ImportInfo* );
72 void ColAdjust();
73 sal_Bool SeekTwips( sal_uInt16 nTwips, SCCOL* pCol );
74 void NewCellRow( ImportInfo* );
76 public:
77 ScRTFParser( EditEngine* );
78 virtual ~ScRTFParser();
79 virtual sal_uLong Read( SvStream&, const String& rBaseURL );
83 #endif
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */