Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / sc / source / filter / inc / drawingmanager.hxx
blob2e8a8731d957f74eb3491ae342a48daf9a907846
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 INCLUDED_SC_SOURCE_FILTER_INC_DRAWINGMANAGER_HXX
21 #define INCLUDED_SC_SOURCE_FILTER_INC_DRAWINGMANAGER_HXX
23 #include "drawingbase.hxx"
25 namespace com { namespace sun { namespace star {
26 namespace drawing { class XDrawPage; }
27 namespace drawing { class XShape; }
28 namespace drawing { class XShapes; }
29 } } }
31 namespace oox { namespace drawingml { class ShapePropertyMap; } }
33 namespace oox {
34 namespace xls {
36 const sal_uInt16 BIFF_OBJ_INVALID_ID = 0;
38 // BIFF drawing objects
39 class BiffDrawingBase;
41 // BIFF drawing page
43 /** Base class for a container for all objects on a drawing page (in a
44 spreadsheet or in an embedded chart object).
46 For BIFF import, it is needed to load all drawing objects before converting
47 them to UNO shapes. There might be some dummy drawing objects (e.g. the
48 dropdown buttons of autofilters) which have to be skipped. The information,
49 that a drawing object is a dummy object, may be located after the drawing
50 objects themselves.
52 The BIFF8 format stores drawing objects in the DFF stream (stored
53 fragmented in MSODRAWING records), and in the OBJ records. The DFF stream
54 fragments are collected in a single stream, and the complete stream will be
55 processed afterwards.
57 class BiffDrawingBase : public WorksheetHelper
59 public:
60 explicit BiffDrawingBase( const WorksheetHelper& rHelper,
61 const css::uno::Reference< css::drawing::XDrawPage >& rxDrawPage );
63 /** Final processing after import of the all drawing objects. */
64 void finalizeImport();
66 private:
67 css::uno::Reference< css::drawing::XDrawPage >
68 mxDrawPage; /// UNO draw page used to insert the shapes.
71 /** Drawing manager of a single sheet. */
72 class BiffSheetDrawing : public BiffDrawingBase
74 public:
75 explicit BiffSheetDrawing( const WorksheetHelper& rHelper );
79 } // namespace xls
80 } // namespace oox
82 #endif
84 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */