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 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
; }
31 namespace oox
{ namespace drawingml
{ class ShapePropertyMap
; } }
36 const sal_uInt16 BIFF_OBJ_INVALID_ID
= 0;
38 // BIFF drawing objects
39 class BiffDrawingBase
;
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
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
57 class BiffDrawingBase
: public WorksheetHelper
60 explicit BiffDrawingBase( const WorksheetHelper
& rHelper
,
61 const ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XDrawPage
>& rxDrawPage
);
63 /** Sets the object with the passed identifier to be skipped on import. */
64 void setSkipObj( sal_uInt16 nObjId
);
66 /** Final processing after import of the all drawing objects. */
67 void finalizeImport();
69 /** Derived classes may want to know that a shape has been inserted. Will
70 be called from the convertAndInsert() implementation. */
71 virtual void notifyShapeInserted(
72 const ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
>& rxShape
,
73 const ::com::sun::star::awt::Rectangle
& rShapeRect
) = 0;
76 ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XDrawPage
>
77 mxDrawPage
; /// UNO draw page used to insert the shapes.
80 /** Drawing manager of a single sheet. */
81 class BiffSheetDrawing
: public BiffDrawingBase
84 explicit BiffSheetDrawing( const WorksheetHelper
& rHelper
);
86 /** Called when a new UNO shape has been inserted into the draw page. */
87 virtual void notifyShapeInserted(
88 const ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
>& rxShape
,
89 const ::com::sun::star::awt::Rectangle
& rShapeRect
) SAL_OVERRIDE
;
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */