LibreOffice Module sc (master) 1
XMLExportSharedData.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include <address.hxx>
23#include <com/sun/star/uno/Reference.hxx>
24
25#include <vector>
26#include <list>
27#include <memory>
28
29namespace com::sun::star::drawing { class XDrawPage; }
30namespace com::sun::star::drawing { class XShape; }
31
33{
34 css::uno::Reference<css::drawing::XDrawPage> xDrawPage;
36
37 ScMyDrawPage() : bHasForms(false) {}
38};
39
40typedef std::list< css::uno::Reference<css::drawing::XShape> > ScMyTableXShapes;
41typedef std::vector<ScMyTableXShapes> ScMyTableShapes;
42typedef std::vector<ScMyDrawPage> ScMyDrawPages;
43
46struct ScMyShape;
48
50{
51 std::vector<sal_Int32> nLastColumns;
52 std::vector<sal_Int32> nLastRows;
53 std::unique_ptr<ScMyTableShapes> pTableShapes;
54 std::unique_ptr<ScMyDrawPages> pDrawPages;
55 std::unique_ptr<ScMyShapesContainer> pShapesContainer;
56 std::unique_ptr<ScMyDetectiveObjContainer> pDetectiveObjContainer;
57 std::unique_ptr<ScMyNoteShapesContainer> pNoteShapes;
58 sal_Int32 nTableCount;
59public:
60 explicit ScMySharedData(const sal_Int32 nTableCount);
62
63 void SetLastColumn(const sal_Int32 nTable, const sal_Int32 nCol);
64 void SetLastRow(const sal_Int32 nTable, const sal_Int32 nRow);
65 sal_Int32 GetLastColumn(const sal_Int32 nTable) const;
66 sal_Int32 GetLastRow(const sal_Int32 nTable) const;
67 void AddDrawPage(const ScMyDrawPage& aDrawPage, const sal_Int32 nTable);
68 void SetDrawPageHasForms(const sal_Int32 nTable, bool bHasForms);
69 css::uno::Reference<css::drawing::XDrawPage> GetDrawPage(const sal_Int32 nTable);
70 bool HasDrawPage() const { return pDrawPages != nullptr; }
71 bool HasForm(const sal_Int32 nTable, css::uno::Reference<css::drawing::XDrawPage>& xDrawPage);
72 void AddNewShape(const ScMyShape& aMyShape);
75 bool HasShapes() const;
76 void AddTableShape(const sal_Int32 nTable, const css::uno::Reference<css::drawing::XShape>& xShape);
79 void AddNoteObj(const css::uno::Reference<css::drawing::XShape>& xShape, const ScAddress& rPos);
80 void SortNoteShapes();
82};
83
84/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::list< css::uno::Reference< css::drawing::XShape > > ScMyTableXShapes
std::vector< ScMyTableXShapes > ScMyTableShapes
std::vector< ScMyDrawPage > ScMyDrawPages
std::unique_ptr< ScMyShapesContainer > pShapesContainer
sal_Int32 GetLastRow(const sal_Int32 nTable) const
sal_Int32 GetLastColumn(const sal_Int32 nTable) const
void SetDrawPageHasForms(const sal_Int32 nTable, bool bHasForms)
bool HasForm(const sal_Int32 nTable, css::uno::Reference< css::drawing::XDrawPage > &xDrawPage)
std::vector< sal_Int32 > nLastColumns
ScMySharedData(const sal_Int32 nTableCount)
ScMyNoteShapesContainer * GetNoteShapes()
void SetLastColumn(const sal_Int32 nTable, const sal_Int32 nCol)
ScMyShapesContainer * GetShapesContainer()
std::vector< sal_Int32 > nLastRows
css::uno::Reference< css::drawing::XDrawPage > GetDrawPage(const sal_Int32 nTable)
void AddDrawPage(const ScMyDrawPage &aDrawPage, const sal_Int32 nTable)
std::unique_ptr< ScMyTableShapes > pTableShapes
std::unique_ptr< ScMyDrawPages > pDrawPages
void AddTableShape(const sal_Int32 nTable, const css::uno::Reference< css::drawing::XShape > &xShape)
bool HasDrawPage() const
void SetLastRow(const sal_Int32 nTable, const sal_Int32 nRow)
std::unique_ptr< ScMyNoteShapesContainer > pNoteShapes
void AddNewShape(const ScMyShape &aMyShape)
ScMyDetectiveObjContainer * GetDetectiveObjContainer()
std::unique_ptr< ScMyDetectiveObjContainer > pDetectiveObjContainer
void AddNoteObj(const css::uno::Reference< css::drawing::XShape > &xShape, const ScAddress &rPos)
ScMyTableShapes * GetTableShapes()
css::uno::Reference< css::drawing::XDrawPage > xDrawPage