2010-10-14 08:30:41 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2011-03-31 10:05:04 +02: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 .
|
|
|
|
*/
|
2013-11-05 02:17:53 +01:00
|
|
|
#ifndef INCLUDED_SW_INC_FMTSRND_HXX
|
|
|
|
#define INCLUDED_SW_INC_FMTSRND_HXX
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2004-08-23 07:35:26 +00:00
|
|
|
#include "swdllapi.h"
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <hintids.hxx>
|
|
|
|
#include <format.hxx>
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/eitem.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2006-09-15 10:40:00 +00:00
|
|
|
#include <fmtsrndenum.hxx>
|
2001-05-13 02:33:31 +00:00
|
|
|
class IntlWrapper;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2015-05-20 13:05:49 +02:00
|
|
|
// SwFormatSurround: How document content under the frame shall behave.
|
|
|
|
class SW_DLLPUBLIC SwFormatSurround: public SfxEnumItem
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2014-04-25 14:00:35 +02:00
|
|
|
bool bAnchorOnly :1;
|
|
|
|
bool bContour :1;
|
|
|
|
bool bOutside :1;
|
2000-09-18 16:15:01 +00:00
|
|
|
public:
|
2015-05-20 13:05:49 +02:00
|
|
|
SwFormatSurround( SwSurround eNew = SURROUND_PARALLEL );
|
|
|
|
SwFormatSurround( const SwFormatSurround & );
|
|
|
|
inline SwFormatSurround &operator=( const SwFormatSurround &rCpy );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2011-02-07 02:08:11 +01:00
|
|
|
// "Pure virtual Methods" of SfxPoolItem.
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual bool operator==( const SfxPoolItem& ) const override;
|
2015-11-10 10:25:48 +01:00
|
|
|
virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual sal_uInt16 GetValueCount() const override;
|
2014-07-24 11:31:39 +02:00
|
|
|
virtual bool GetPresentation( SfxItemPresentation ePres,
|
2016-08-19 09:31:35 +01:00
|
|
|
MapUnit eCoreMetric,
|
|
|
|
MapUnit ePresMetric,
|
|
|
|
OUString &rText,
|
|
|
|
const IntlWrapper* pIntl = nullptr ) const override;
|
2015-11-05 15:55:58 +02:00
|
|
|
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
|
|
|
|
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
SwSurround GetSurround()const { return SwSurround( GetValue() ); }
|
2014-04-25 14:00:35 +02:00
|
|
|
bool IsAnchorOnly() const { return bAnchorOnly; }
|
|
|
|
bool IsContour() const { return bContour; }
|
|
|
|
bool IsOutside() const { return bOutside; }
|
2011-01-17 15:06:54 +01:00
|
|
|
void SetSurround ( SwSurround eNew ){ SfxEnumItem::SetValue( sal_uInt16( eNew ) ); }
|
2014-04-25 14:00:35 +02:00
|
|
|
void SetAnchorOnly( bool bNew ) { bAnchorOnly = bNew; }
|
|
|
|
void SetContour( bool bNew ) { bContour = bNew; }
|
|
|
|
void SetOutside( bool bNew ) { bOutside = bNew; }
|
2014-12-22 13:08:06 +01:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
void dumpAsXml(struct _xmlTextWriter* pWriter) const override;
|
2000-09-18 16:15:01 +00:00
|
|
|
};
|
|
|
|
|
2015-05-20 13:05:49 +02:00
|
|
|
inline SwFormatSurround &SwFormatSurround::operator=( const SwFormatSurround &rCpy )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
bAnchorOnly = rCpy.IsAnchorOnly();
|
|
|
|
bContour = rCpy.IsContour();
|
|
|
|
bOutside = rCpy.IsOutside();
|
|
|
|
SfxEnumItem::SetValue( rCpy.GetValue() );
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2015-05-20 13:05:49 +02:00
|
|
|
inline const SwFormatSurround &SwAttrSet::GetSurround(bool bInP) const
|
|
|
|
{ return static_cast<const SwFormatSurround&>(Get( RES_SURROUND,bInP)); }
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2015-05-20 13:05:49 +02:00
|
|
|
inline const SwFormatSurround &SwFormat::GetSurround(bool bInP) const
|
2015-04-30 20:24:30 +02:00
|
|
|
{ return m_aSet.GetSurround(bInP); }
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2010-10-14 08:30:41 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|