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 .
20 #ifndef OOX_DUMP_XLSBDUMPER_HXX
21 #define OOX_DUMP_XLSBDUMPER_HXX
23 #include "oox/dump/dumperbase.hxx"
25 #if OOX_INCLUDE_DUMPER
27 namespace oox
{ namespace xls
{
28 class FontPortionModelList
;
29 class PhoneticPortionModelList
;
31 class FunctionProvider
;
38 // ============================================================================
40 class RecordObjectBase
: public SequenceRecordObjectBase
43 explicit RecordObjectBase();
44 virtual ~RecordObjectBase();
46 using SequenceRecordObjectBase::construct
;
47 void construct( const ObjectBase
& rParent
, const BinaryInputStreamRef
& rxStrm
, const OUString
& rSysFileName
);
48 void construct( const RecordObjectBase
& rParent
);
50 virtual bool implReadRecordHeader( BinaryInputStream
& rBaseStrm
, sal_Int64
& ornRecId
, sal_Int64
& ornRecSize
);
52 OUString
getErrorName( sal_uInt8 nErrCode
) const;
54 // ------------------------------------------------------------------------
56 void readAddress( Address
& orAddress
);
57 void readRange( Range
& orRange
);
58 void readRangeList( RangeList
& orRanges
);
60 // ------------------------------------------------------------------------
62 void writeBooleanItem( const String
& rName
, sal_uInt8 nBool
);
63 void writeErrorCodeItem( const String
& rName
, sal_uInt8 nErrCode
);
65 void writeFontPortions( const ::oox::xls::FontPortionModelList
& rPortions
);
66 void writePhoneticPortions( const ::oox::xls::PhoneticPortionModelList
& rPhonetics
);
68 // ------------------------------------------------------------------------
70 sal_uInt8
dumpBoolean( const String
& rName
= EMPTY_STRING
);
71 sal_uInt8
dumpErrorCode( const String
& rName
= EMPTY_STRING
);
72 OUString
dumpString( const String
& rName
= EMPTY_STRING
, bool bRich
= false, bool b32BitLen
= true );
73 void dumpColor( const String
& rName
= EMPTY_STRING
);
74 ::com::sun::star::util::DateTime
dumpPivotDateTime( const String
& rName
= EMPTY_STRING
);
76 sal_Int32
dumpColIndex( const String
& rName
= EMPTY_STRING
);
77 sal_Int32
dumpRowIndex( const String
& rName
= EMPTY_STRING
);
78 sal_Int32
dumpColRange( const String
& rName
= EMPTY_STRING
);
79 sal_Int32
dumpRowRange( const String
& rName
= EMPTY_STRING
);
81 Address
dumpAddress( const String
& rName
= EMPTY_STRING
);
82 Range
dumpRange( const String
& rName
= EMPTY_STRING
);
83 void dumpRangeList( const String
& rName
= EMPTY_STRING
);
85 // ------------------------------------------------------------------------
87 bool readCompressedInt( BinaryInputStream
& rStrm
, sal_Int32
& ornValue
);
90 typedef ::boost::shared_ptr
< SequenceInputStream
> SequenceInputStreamRef
;
92 SequenceInputStreamRef mxBiffStrm
;
93 NameListRef mxErrCodes
;
96 // ============================================================================
98 class RootStorageObject
: public StorageObjectBase
101 explicit RootStorageObject( const DumperBase
& rParent
);
104 virtual void implDumpStream(
105 const ::com::sun::star::uno::Reference
< ::com::sun::star::io::XInputStream
>& rxStrm
,
106 const OUString
& rStrgPath
,
107 const OUString
& rStrmName
,
108 const OUString
& rSysFileName
);
111 // ============================================================================
113 class Dumper
: public DumperBase
116 explicit Dumper( const ::oox::core::FilterBase
& rFilter
);
119 const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>& rxContext
,
120 const ::com::sun::star::uno::Reference
< ::com::sun::star::io::XInputStream
>& rxInStrm
,
121 const OUString
& rSysFileName
);
124 virtual void implDump();
127 // ============================================================================
136 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */