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
24namespace com::sun::star::beans { class XPropertySet; }
25namespace com::sun::star::beans { class XPropertyState; }
26namespace com::sun::star::frame { class XModel; }
27namespace com::sun::star::util { class XNumberFormats; }
28namespace com::sun::star::util { class XNumberFormatsSupplier; }
29namespace com::sun::star::util { class XNumberFormatTypes; }
30namespace ooo::vba::excel { class XFont; }
31namespace ooo::vba::excel { class XInterior; }
32
34class SfxItemSet;
35
36template< typename... Ifc >
38{
40 css::lang::Locale m_aDefaultLocale;
41protected:
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();
59protected:
62public:
64 ScVbaFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, css::uno::Reference< css::beans::XPropertySet > _xPropertySet, 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::Any( 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: */
struct _ADOIndex Index
css::uno::Reference< css::util::XNumberFormatTypes > xNumberFormatTypes
Definition: vbaformat.hxx:45
css::uno::Reference< css::frame::XModel > mxModel
Definition: vbaformat.hxx:46
virtual void SAL_CALL setIndentLevel(const css::uno::Any &IndentLevel)
Definition: vbaformat.cxx:474
virtual css::uno::Reference< ::ooo::vba::excel::XFont > SAL_CALL Font()
Definition: vbaformat.cxx:368
virtual css::uno::Any SAL_CALL getLocked()
Definition: vbaformat.cxx:563
virtual css::uno::Any SAL_CALL getNumberFormatLocal()
Definition: vbaformat.cxx:383
css::uno::Any SAL_CALL getAddIndent()
Definition: vbaformat.hxx:69
virtual void SAL_CALL setMergeCells(const css::uno::Any &MergeCells)=0
virtual css::uno::Any SAL_CALL getWrapText()
Definition: vbaformat.cxx:334
css::uno::Reference< css::util::XNumberFormats > xNumberFormats
Definition: vbaformat.hxx:44
void initializeNumberFormats()
Definition: vbaformat.cxx:776
virtual void SAL_CALL setNumberFormat(const css::uno::Any &NumberFormat)
Definition: vbaformat.cxx:443
virtual void SAL_CALL setFormulaHidden(const css::uno::Any &FormulaHidden)
Definition: vbaformat.cxx:543
bool isAmbiguous(const OUString &_sPropertyName)
Definition: vbaformat.cxx:759
virtual css::uno::Any SAL_CALL getReadingOrder()
Definition: vbaformat.cxx:699
bool mbAddIndent
Definition: vbaformat.hxx:49
virtual void SAL_CALL setOrientation(const css::uno::Any &Orientation)
Definition: vbaformat.cxx:244
virtual css::uno::Any SAL_CALL Borders(const css::uno::Any &Index)
Definition: vbaformat.cxx:354
virtual css::uno::Any SAL_CALL getVerticalAlignment()
Definition: vbaformat.cxx:126
virtual css::uno::Any SAL_CALL getIndentLevel()
Definition: vbaformat.cxx:498
virtual css::uno::Any SAL_CALL getFormulaHidden()
Definition: vbaformat.cxx:597
InheritedHelperInterfaceWeakImpl< Ifc... > ScVbaFormat_BASE
Definition: vbaformat.hxx:39
virtual void SAL_CALL setReadingOrder(const css::uno::Any &ReadingOrder)
Definition: vbaformat.cxx:663
virtual void SAL_CALL setHorizontalAlignment(const css::uno::Any &HorizontalAlignment)
Definition: vbaformat.cxx:163
virtual css::uno::Any SAL_CALL getMergeCells()=0
ScVbaFormat(const css::uno::Reference< ov::XHelperInterface > &xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, css::uno::Reference< css::beans::XPropertySet > _xPropertySet, css::uno::Reference< css::frame::XModel > xModel, bool bCheckAmbiguoity)
Definition: vbaformat.cxx:61
SfxItemSet * getCurrentDataSet()
Definition: vbaformat.cxx:804
virtual void SAL_CALL setShrinkToFit(const css::uno::Any &ShrinkToFit)
Definition: vbaformat.cxx:630
css::uno::Reference< css::beans::XPropertyState > const & getXPropertyState()
Definition: vbaformat.cxx:788
virtual css::uno::Any SAL_CALL getOrientation()
Definition: vbaformat.cxx:281
virtual void SAL_CALL setVerticalAlignment(const css::uno::Any &VerticalAlignment)
Definition: vbaformat.cxx:88
virtual css::uno::Reference< ov::XHelperInterface > thisHelperIface()=0
virtual void SAL_CALL setWrapText(const css::uno::Any &WrapText)
Definition: vbaformat.cxx:320
virtual ScCellRangesBase * getCellRangesBase()
Definition: vbaformat.cxx:797
virtual css::uno::Reference< ::ooo::vba::excel::XInterior > SAL_CALL Interior()
Definition: vbaformat.cxx:376
virtual void SAL_CALL setNumberFormatLocal(const css::uno::Any &NumberFormatLocal)
Definition: vbaformat.cxx:414
virtual void SAL_CALL setLocked(const css::uno::Any &Locked)
Definition: vbaformat.cxx:522
css::uno::Reference< css::util::XNumberFormatsSupplier > mxNumberFormatsSupplier
Definition: vbaformat.hxx:43
bool mbCheckAmbiguoity
Definition: vbaformat.hxx:48
virtual css::uno::Any SAL_CALL getHorizontalAlignment()
Definition: vbaformat.cxx:203
void SAL_CALL setAddIndent(const css::uno::Any &BAddIndent)
Definition: vbaformat.hxx:67
virtual css::uno::Any SAL_CALL getNumberFormat()
Definition: vbaformat.cxx:732
css::lang::Locale m_aDefaultLocale
Definition: vbaformat.hxx:40
css::uno::Reference< css::beans::XPropertyState > xPropertyState
Definition: vbaformat.hxx:47
css::uno::Reference< css::beans::XPropertySet > mxPropertySet
Definition: vbaformat.hxx:42
virtual css::uno::Any SAL_CALL getShrinkToFit()
Definition: vbaformat.cxx:645
class SAL_NO_VTABLE XPropertySet
Orientation