GPU-Calc: remove Alloc_Host_Ptr for clmem of NAN vector
[LibreOffice.git] / sc / source / ui / vba / vbasheetobjects.hxx
blob0f96a1d41990e425f0b9c0505fc007c91124a479
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 SC_VBA_SHEETOBJECTS_HXX
21 #define SC_VBA_SHEETOBJECTS_HXX
23 #include <ooo/vba/excel/XGraphicObjects.hpp>
24 #include <vbahelper/vbacollectionimpl.hxx>
25 #include <rtl/ref.hxx>
27 namespace com { namespace sun { namespace star {
28 namespace container { class XEnumeration; }
29 namespace frame { class XModel; }
30 namespace sheet { class XSpreadsheet; }
31 } } }
33 // ============================================================================
35 class ScVbaObjectContainer;
36 typedef ::rtl::Reference< ScVbaObjectContainer > ScVbaObjectContainerRef;
38 // ============================================================================
40 typedef CollTestImplHelper< ov::XCollection > ScVbaSheetObjects_BASE;
42 /** Base class for collections containing a specific type of drawing object
43 embedded in a sheet (worksheet, chart sheet, or dialog sheet).
45 class ScVbaSheetObjectsBase : public ScVbaSheetObjects_BASE
47 public:
48 explicit ScVbaSheetObjectsBase( const ScVbaObjectContainerRef& rxContainer ) throw (css::uno::RuntimeException);
49 virtual ~ScVbaSheetObjectsBase();
51 /** Updates the collection by fetching all shapes from the draw page. */
52 void collectShapes() throw (css::uno::RuntimeException);
54 // XEnumerationAccess
55 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
57 // XElementAccess
58 virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
60 // ScVbaCollectionBase
61 virtual css::uno::Any createCollectionObject( const css::uno::Any& rSource );
62 virtual css::uno::Any getItemByStringIndex( const OUString& rIndex ) throw (css::uno::RuntimeException);
64 protected:
65 ScVbaObjectContainerRef mxContainer;
68 // ============================================================================
70 typedef ::cppu::ImplInheritanceHelper1< ScVbaSheetObjectsBase, ov::excel::XGraphicObjects > ScVbaGraphicObjects_BASE;
72 /** Base class for collections containing a specific type of graphic object
73 from a sheet.
75 class ScVbaGraphicObjectsBase : public ScVbaGraphicObjects_BASE
77 public:
78 explicit ScVbaGraphicObjectsBase( const ScVbaObjectContainerRef& rxContainer ) throw (css::uno::RuntimeException);
80 // XGraphicObjects
81 virtual css::uno::Any SAL_CALL Add(
82 const css::uno::Any& rLeft,
83 const css::uno::Any& rTop,
84 const css::uno::Any& rWidth,
85 const css::uno::Any& rHeight ) throw (css::uno::RuntimeException);
88 // ============================================================================
90 /** Collection containing all button controls from a sheet (not ActiveX controls). */
91 class ScVbaButtons : public ScVbaGraphicObjectsBase
93 public:
94 explicit ScVbaButtons(
95 const css::uno::Reference< ov::XHelperInterface >& rxParent,
96 const css::uno::Reference< css::uno::XComponentContext >& rxContext,
97 const css::uno::Reference< css::frame::XModel >& rxModel,
98 const css::uno::Reference< css::sheet::XSpreadsheet >& rxSheet ) throw (css::uno::RuntimeException);
100 VBAHELPER_DECL_XHELPERINTERFACE
103 // ============================================================================
105 #endif
107 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */