LibreOffice Module sc (master)  1
vbasheetobjects.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 #ifndef INCLUDED_SC_SOURCE_UI_VBA_VBASHEETOBJECTS_HXX
21 #define INCLUDED_SC_SOURCE_UI_VBA_VBASHEETOBJECTS_HXX
22 
23 #include <cppuhelper/implbase.hxx>
24 #include <ooo/vba/excel/XGraphicObjects.hpp>
26 #include <rtl/ref.hxx>
27 
28 namespace com::sun::star {
29  namespace container { class XEnumeration; }
30  namespace frame { class XModel; }
31  namespace sheet { class XSpreadsheet; }
32 }
33 
35 typedef ::rtl::Reference< ScVbaObjectContainer > ScVbaObjectContainerRef;
36 
38 
43 {
44 public:
46  explicit ScVbaSheetObjectsBase( const ScVbaObjectContainerRef& rxContainer );
47  virtual ~ScVbaSheetObjectsBase() override;
48 
53  void collectShapes();
54 
55  // XEnumerationAccess
56  virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override;
57 
58  // XElementAccess
59  virtual css::uno::Type SAL_CALL getElementType() override;
60 
61  // ScVbaCollectionBase
62  virtual css::uno::Any createCollectionObject( const css::uno::Any& rSource ) override;
63  virtual css::uno::Any getItemByStringIndex( const OUString& rIndex ) override;
64 
65 protected:
67 };
68 
69 typedef ::cppu::ImplInheritanceHelper< ScVbaSheetObjectsBase, ov::excel::XGraphicObjects > ScVbaGraphicObjects_BASE;
70 
75 {
76 public:
78  explicit ScVbaGraphicObjectsBase( const ScVbaObjectContainerRef& rxContainer );
79 
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 ) override;
86 };
87 
90 {
91 public:
93  explicit ScVbaButtons(
94  const css::uno::Reference< ov::XHelperInterface >& rxParent,
95  const css::uno::Reference< css::uno::XComponentContext >& rxContext,
96  const css::uno::Reference< css::frame::XModel >& rxModel,
97  const css::uno::Reference< css::sheet::XSpreadsheet >& rxSheet,
98  bool bOptionButtons);
99 
101 };
102 
103 #endif
104 
105 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ScVbaObjectContainerRef mxContainer
Base class for collections containing a specific type of graphic object from a sheet.
virtual css::uno::Type SAL_CALL getElementType() override
#define VBAHELPER_DECL_XHELPERINTERFACE
virtual css::uno::Any createCollectionObject(const css::uno::Any &rSource) override
exports com.sun.star. sheet
exports com.sun.star. container
exports com.sun.star. frame
virtual css::uno::Any SAL_CALL Add(const css::uno::Any &rLeft, const css::uno::Any &rTop, const css::uno::Any &rWidth, const css::uno::Any &rHeight) override
Collection containing all button controls from a sheet (not ActiveX controls).
virtual css::uno::Any getItemByStringIndex(const OUString &rIndex) override
ScVbaGraphicObjectsBase(const ScVbaObjectContainerRef &rxContainer)
ScVbaButtons(const css::uno::Reference< ov::XHelperInterface > &rxParent, const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Reference< css::frame::XModel > &rxModel, const css::uno::Reference< css::sheet::XSpreadsheet > &rxSheet, bool bOptionButtons)
Container for a specific type of drawing object in a spreadsheet.
virtual ~ScVbaSheetObjectsBase() override
ScVbaSheetObjectsBase(const ScVbaObjectContainerRef &rxContainer)
::cppu::ImplInheritanceHelper< ScVbaSheetObjectsBase, ov::excel::XGraphicObjects > ScVbaGraphicObjects_BASE
void collectShapes()
Updates the collection by fetching all shapes from the draw page.
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
Base class for collections containing a specific type of drawing object embedded in a sheet (workshee...
::rtl::Reference< ScVbaObjectContainer > ScVbaObjectContainerRef
CollTestImplHelper< ov::XCollection > ScVbaSheetObjects_BASE