2010-10-27 13:11:31 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-11-21 22:06:52 +00:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2007-04-11 15:49:11 +00:00
|
|
|
|
2013-10-23 19:08:11 +02:00
|
|
|
#ifndef INCLUDED_SVX_XCOLIT_HXX
|
|
|
|
#define INCLUDED_SVX_XCOLIT_HXX
|
2007-04-11 15:49:11 +00:00
|
|
|
|
|
|
|
#include <tools/color.hxx>
|
2013-11-09 15:28:54 -06:00
|
|
|
#include <svx/svxdllapi.h>
|
2007-04-11 15:49:11 +00:00
|
|
|
|
|
|
|
#include <svx/xit.hxx>
|
|
|
|
|
2011-08-29 06:29:06 -07:00
|
|
|
class XColorList;
|
2007-04-11 15:49:11 +00:00
|
|
|
|
2014-02-25 19:06:16 +01:00
|
|
|
|
2007-04-11 15:49:11 +00:00
|
|
|
// class XColorItem
|
2014-02-25 19:06:16 +01:00
|
|
|
|
2007-04-11 15:49:11 +00:00
|
|
|
class SVX_DLLPUBLIC XColorItem : public NameOrIndex
|
|
|
|
{
|
|
|
|
Color aColor;
|
|
|
|
|
|
|
|
public:
|
2014-03-26 11:54:10 +01:00
|
|
|
TYPEINFO_OVERRIDE();
|
2007-04-11 15:49:11 +00:00
|
|
|
XColorItem() {}
|
2011-01-10 16:11:35 +01:00
|
|
|
XColorItem(sal_uInt16 nWhich, sal_Int32 nIndex, const Color& rTheColor);
|
2007-04-11 15:49:11 +00:00
|
|
|
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const SAL_OVERRIDE;
|
|
|
|
virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) SAL_OVERRIDE;
|
2007-04-11 15:49:11 +00:00
|
|
|
|
2013-01-30 10:40:45 +00:00
|
|
|
XColorItem(sal_uInt16 nWhich, const Color& rTheColor);
|
2013-08-29 17:08:39 +02:00
|
|
|
XColorItem(sal_uInt16 nWhich, const OUString& rName, const Color& rTheColor);
|
2011-01-10 16:11:35 +01:00
|
|
|
XColorItem(sal_uInt16 nWhich, SvStream& rIn);
|
2007-04-11 15:49:11 +00:00
|
|
|
XColorItem(const XColorItem& rItem);
|
|
|
|
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual bool operator==(const SfxPoolItem& rItem) const SAL_OVERRIDE;
|
|
|
|
virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const SAL_OVERRIDE;
|
|
|
|
virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const SAL_OVERRIDE;
|
|
|
|
virtual SvStream& Store(SvStream& rOut, sal_uInt16 nItemVersion ) const SAL_OVERRIDE;
|
2007-04-11 15:49:11 +00:00
|
|
|
|
2011-08-29 06:29:06 -07:00
|
|
|
const Color& GetColorValue(const XColorList* pTable = 0) const;
|
2007-04-11 15:49:11 +00:00
|
|
|
void SetColorValue(const Color& rNew) { aColor = rNew; Detach(); }
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2010-10-27 13:11:31 +01:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|