bump product version to 4.1.6.2
[LibreOffice.git] / svx / source / unodraw / unottabl.cxx
blob26c532f7e7e3d1d7295246e603a9d0d3303fd083
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 #include <com/sun/star/awt/Gradient.hpp>
21 #include <svl/itempool.hxx>
22 #include <svl/itemset.hxx>
23 #include <svx/xgrad.hxx>
24 #include <svx/xflftrit.hxx>
26 #include <svx/svdmodel.hxx>
27 #include <svx/xflhtit.hxx>
28 #include "svx/unofill.hxx"
29 #include <svx/unomid.hxx>
30 #include "UnoNameItemTable.hxx"
32 using namespace ::com::sun::star;
33 using namespace ::rtl;
34 using namespace ::cppu;
36 class SvxUnoTransGradientTable : public SvxUnoNameItemTable
38 public:
39 SvxUnoTransGradientTable( SdrModel* pModel ) throw();
40 virtual ~SvxUnoTransGradientTable() throw();
42 virtual NameOrIndex* createItem() const throw();
44 // XServiceInfo
45 virtual OUString SAL_CALL getImplementationName( ) throw( uno::RuntimeException );
46 virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw( uno::RuntimeException);
48 // XElementAccess
49 virtual uno::Type SAL_CALL getElementType( ) throw( uno::RuntimeException);
52 SvxUnoTransGradientTable::SvxUnoTransGradientTable( SdrModel* pModel ) throw()
53 : SvxUnoNameItemTable( pModel, XATTR_FILLFLOATTRANSPARENCE, MID_FILLGRADIENT )
57 SvxUnoTransGradientTable::~SvxUnoTransGradientTable() throw()
61 OUString SAL_CALL SvxUnoTransGradientTable::getImplementationName() throw( uno::RuntimeException )
63 return OUString("SvxUnoTransGradientTable");
66 uno::Sequence< OUString > SAL_CALL SvxUnoTransGradientTable::getSupportedServiceNames( )
67 throw( uno::RuntimeException )
69 uno::Sequence< OUString > aSNS( 1 );
70 aSNS.getArray()[0] = OUString("com.sun.star.drawing.TransparencyGradientTable" );
71 return aSNS;
74 NameOrIndex* SvxUnoTransGradientTable::createItem() const throw()
76 XFillFloatTransparenceItem* pNewItem = new XFillFloatTransparenceItem();
77 pNewItem->SetEnabled( sal_True );
78 return pNewItem;
81 // XElementAccess
82 uno::Type SAL_CALL SvxUnoTransGradientTable::getElementType( )
83 throw( uno::RuntimeException )
85 return ::getCppuType((const struct awt::Gradient*)0);
88 /**
89 * Create a hatchtable
91 uno::Reference< uno::XInterface > SAL_CALL SvxUnoTransGradientTable_createInstance( SdrModel* pModel )
93 return *new SvxUnoTransGradientTable(pModel);
98 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */