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 SC_CHARTHELPER_HXX
21 #define SC_CHARTHELPER_HXX
23 #include <tools/solar.h>
24 #include "address.hxx"
26 #include "rangelst.hxx"
28 #include <com/sun/star/chart2/XChartDocument.hpp>
34 typedef ::std::vector
< ScRangeList
> ScRangeListVector
;
36 /** Use this to handle charts in a calc document
41 static sal_uInt16
DoUpdateAllCharts( ScDocument
* pDoc
);
42 static void AdjustRangesOfChartsOnDestinationPage( ScDocument
* pSrcDoc
, ScDocument
* pDestDoc
, const SCTAB nSrcTab
, const SCTAB nDestTab
);
43 static void UpdateChartsOnDestinationPage( ScDocument
* pDestDoc
, const SCTAB nDestTab
);
44 static ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartDocument
> GetChartFromSdrObject( SdrObject
* pObject
);
45 static void GetChartRanges( const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartDocument
>& xChartDoc
,
46 ::com::sun::star::uno::Sequence
< OUString
>& rRanges
);
47 static void SetChartRanges( const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartDocument
>& xChartDoc
,
48 const ::com::sun::star::uno::Sequence
< OUString
>& rRanges
);
50 static void AddRangesIfProtectedChart( ScRangeListVector
& rRangesVector
, ScDocument
* pDocument
, SdrObject
* pObject
);
51 static void FillProtectedChartRangesVector( ScRangeListVector
& rRangesVector
, ScDocument
* pDocument
, SdrPage
* pPage
);
52 static void GetChartNames( ::std::vector
< OUString
>& rChartNames
, SdrPage
* pPage
);
53 static void CreateProtectedChartListenersAndNotify( ScDocument
* pDoc
, SdrPage
* pPage
, ScModelObj
* pModelObj
, SCTAB nTab
,
54 const ScRangeListVector
& rRangesVector
, const ::std::vector
< OUString
>& rExcludedChartNames
, bool bSameDoc
= true );
59 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */