LibreOffice Module sc (master)  1
vbaformat.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 #pragma once
20 
21 #include <com/sun/star/lang/Locale.hpp>
23 
24 namespace com::sun::star::beans { class XPropertySet; }
25 namespace com::sun::star::beans { class XPropertyState; }
26 namespace com::sun::star::frame { class XModel; }
27 namespace com::sun::star::util { class XNumberFormats; }
28 namespace com::sun::star::util { class XNumberFormatsSupplier; }
29 namespace com::sun::star::util { class XNumberFormatTypes; }
30 namespace ooo::vba::excel { class XFont; }
31 namespace ooo::vba::excel { class XInterior; }
32 
33 class ScCellRangesBase;
34 class SfxItemSet;
35 
36 template< typename... Ifc >
38 {
40  css::lang::Locale m_aDefaultLocale;
41 protected:
42  css::uno::Reference< css::beans::XPropertySet > mxPropertySet;
43  css::uno::Reference< css::util::XNumberFormatsSupplier > mxNumberFormatsSupplier;
44  css::uno::Reference< css::util::XNumberFormats > xNumberFormats;
45  css::uno::Reference< css::util::XNumberFormatTypes > xNumberFormatTypes;
46  css::uno::Reference< css::frame::XModel > mxModel;
47  css::uno::Reference< css::beans::XPropertyState > xPropertyState;
51  bool isAmbiguous(const OUString& _sPropertyName);
53  css::uno::Reference< css::beans::XPropertyState > const & getXPropertyState();
59 protected:
62 public:
64  ScVbaFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet, const css::uno::Reference< css::frame::XModel >& xModel, bool bCheckAmbiguoity );
65  virtual css::uno::Reference< ov::XHelperInterface > thisHelperIface() = 0;
67  void SAL_CALL setAddIndent( const css::uno::Any& BAddIndent) { BAddIndent >>= mbAddIndent; }
69  css::uno::Any SAL_CALL getAddIndent() { return css::uno::makeAny( mbAddIndent ); }
70  // Interface Methods
73  virtual css::uno::Any SAL_CALL Borders( const css::uno::Any& Index );
76  virtual css::uno::Reference< ::ooo::vba::excel::XFont > SAL_CALL Font( );
79  virtual css::uno::Reference< ::ooo::vba::excel::XInterior > SAL_CALL Interior( );
82  virtual void SAL_CALL setNumberFormat( const css::uno::Any& NumberFormat );
85  virtual css::uno::Any SAL_CALL getNumberFormat( );
88  virtual void SAL_CALL setNumberFormatLocal( const css::uno::Any& NumberFormatLocal );
91  virtual css::uno::Any SAL_CALL getNumberFormatLocal( );
94  virtual void SAL_CALL setIndentLevel( const css::uno::Any& IndentLevel );
97  virtual css::uno::Any SAL_CALL getIndentLevel( );
100  virtual void SAL_CALL setHorizontalAlignment( const css::uno::Any& HorizontalAlignment );
103  virtual css::uno::Any SAL_CALL getHorizontalAlignment( );
106  virtual void SAL_CALL setVerticalAlignment( const css::uno::Any& VerticalAlignment );
109  virtual css::uno::Any SAL_CALL getVerticalAlignment( );
112  virtual void SAL_CALL setOrientation( const css::uno::Any& Orientation );
115  virtual css::uno::Any SAL_CALL getOrientation( );
118  virtual void SAL_CALL setShrinkToFit( const css::uno::Any& ShrinkToFit );
121  virtual css::uno::Any SAL_CALL getShrinkToFit( );
124  virtual void SAL_CALL setWrapText( const css::uno::Any& WrapText );
127  virtual css::uno::Any SAL_CALL getWrapText( );
130  virtual void SAL_CALL setLocked( const css::uno::Any& Locked );
133  virtual css::uno::Any SAL_CALL getLocked( );
136  virtual void SAL_CALL setFormulaHidden( const css::uno::Any& FormulaHidden );
139  virtual css::uno::Any SAL_CALL getFormulaHidden( );
142  virtual void SAL_CALL setMergeCells( const css::uno::Any& MergeCells ) = 0;
145  virtual css::uno::Any SAL_CALL getMergeCells( ) = 0;
148  virtual void SAL_CALL setReadingOrder( const css::uno::Any& ReadingOrder );
151  virtual css::uno::Any SAL_CALL getReadingOrder( );
152 };
153 
154 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual css::uno::Reference< ::ooo::vba::excel::XFont > SAL_CALL Font()
Definition: vbaformat.cxx:367
virtual void SAL_CALL setMergeCells(const css::uno::Any &MergeCells)=0
css::lang::Locale m_aDefaultLocale
Definition: vbaformat.hxx:40
css::uno::Reference< css::util::XNumberFormatTypes > xNumberFormatTypes
Definition: vbaformat.hxx:45
bool mbCheckAmbiguoity
Definition: vbaformat.hxx:48
InheritedHelperInterfaceWeakImpl< Ifc... > ScVbaFormat_BASE
Definition: vbaformat.hxx:39
virtual void SAL_CALL setVerticalAlignment(const css::uno::Any &VerticalAlignment)
Definition: vbaformat.cxx:87
void initializeNumberFormats()
Definition: vbaformat.cxx:775
virtual css::uno::Any SAL_CALL getFormulaHidden()
Definition: vbaformat.cxx:596
virtual css::uno::Reference< ov::XHelperInterface > thisHelperIface()=0
css::uno::Reference< css::beans::XPropertyState > const & getXPropertyState()
Definition: vbaformat.cxx:787
css::uno::Reference< css::util::XNumberFormatsSupplier > mxNumberFormatsSupplier
Definition: vbaformat.hxx:43
virtual css::uno::Any SAL_CALL Borders(const css::uno::Any &Index)
Definition: vbaformat.cxx:353
virtual css::uno::Any SAL_CALL getOrientation()
Definition: vbaformat.cxx:280
SfxItemSet * getCurrentDataSet()
Definition: vbaformat.cxx:803
virtual void SAL_CALL setIndentLevel(const css::uno::Any &IndentLevel)
Definition: vbaformat.cxx:473
css::uno::Reference< css::beans::XPropertyState > xPropertyState
Definition: vbaformat.hxx:47
virtual ScCellRangesBase * getCellRangesBase()
Definition: vbaformat.cxx:796
css::uno::Reference< css::frame::XModel > mxModel
Definition: vbaformat.hxx:46
virtual css::uno::Any SAL_CALL getLocked()
Definition: vbaformat.cxx:562
virtual css::uno::Any SAL_CALL getNumberFormatLocal()
Definition: vbaformat.cxx:382
virtual void SAL_CALL setNumberFormatLocal(const css::uno::Any &NumberFormatLocal)
Definition: vbaformat.cxx:413
virtual css::uno::Any SAL_CALL getWrapText()
Definition: vbaformat.cxx:333
Orientation
virtual css::uno::Reference< ::ooo::vba::excel::XInterior > SAL_CALL Interior()
Definition: vbaformat.cxx:375
class SAL_NO_VTABLE XPropertySet
virtual void SAL_CALL setReadingOrder(const css::uno::Any &ReadingOrder)
Definition: vbaformat.cxx:662
css::uno::Reference< css::beans::XPropertySet > mxPropertySet
Definition: vbaformat.hxx:42
bool mbAddIndent
Definition: vbaformat.hxx:49
virtual void SAL_CALL setShrinkToFit(const css::uno::Any &ShrinkToFit)
Definition: vbaformat.cxx:629
css::uno::Any SAL_CALL getAddIndent()
Definition: vbaformat.hxx:69
virtual void SAL_CALL setLocked(const css::uno::Any &Locked)
Definition: vbaformat.cxx:521
virtual css::uno::Any SAL_CALL getVerticalAlignment()
Definition: vbaformat.cxx:125
css::uno::Reference< css::util::XNumberFormats > xNumberFormats
Definition: vbaformat.hxx:44
virtual css::uno::Any SAL_CALL getReadingOrder()
Definition: vbaformat.cxx:698
virtual css::uno::Any SAL_CALL getShrinkToFit()
Definition: vbaformat.cxx:644
virtual void SAL_CALL setNumberFormat(const css::uno::Any &NumberFormat)
Definition: vbaformat.cxx:442
virtual void SAL_CALL setHorizontalAlignment(const css::uno::Any &HorizontalAlignment)
Definition: vbaformat.cxx:162
virtual css::uno::Any SAL_CALL getNumberFormat()
Definition: vbaformat.cxx:731
virtual css::uno::Any SAL_CALL getHorizontalAlignment()
Definition: vbaformat.cxx:202
virtual void SAL_CALL setOrientation(const css::uno::Any &Orientation)
Definition: vbaformat.cxx:243
virtual css::uno::Any SAL_CALL getMergeCells()=0
ScVbaFormat(const css::uno::Reference< ov::XHelperInterface > &xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, const css::uno::Reference< css::beans::XPropertySet > &_xPropertySet, const css::uno::Reference< css::frame::XModel > &xModel, bool bCheckAmbiguoity)
Definition: vbaformat.cxx:60
virtual void SAL_CALL setWrapText(const css::uno::Any &WrapText)
Definition: vbaformat.cxx:319
virtual void SAL_CALL setFormulaHidden(const css::uno::Any &FormulaHidden)
Definition: vbaformat.cxx:542
struct _ADOIndex Index
void SAL_CALL setAddIndent(const css::uno::Any &BAddIndent)
Definition: vbaformat.hxx:67
bool isAmbiguous(const OUString &_sPropertyName)
Definition: vbaformat.cxx:758
virtual css::uno::Any SAL_CALL getIndentLevel()
Definition: vbaformat.cxx:497