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_FMTRFMRK_HXX
|
|
|
|
#define INCLUDED_SW_INC_FMTRFMRK_HXX
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2013-10-20 15:15:42 +01:00
|
|
|
#include <rtl/ustring.hxx>
|
2014-08-19 23:29:32 +02:00
|
|
|
#include <cppuhelper/weakref.hxx>
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/poolitem.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2014-08-19 22:54:57 +02:00
|
|
|
#include <calbck.hxx>
|
|
|
|
|
2014-08-19 23:29:32 +02:00
|
|
|
namespace com { namespace sun { namespace star {
|
|
|
|
namespace text { class XTextContent; }
|
|
|
|
} } }
|
|
|
|
|
2015-05-20 13:05:49 +02:00
|
|
|
class SwTextRefMark;
|
2005-06-14 15:27:00 +00:00
|
|
|
|
2011-02-07 02:08:11 +01:00
|
|
|
// ATT_REFMARK
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2015-05-20 13:05:49 +02:00
|
|
|
class SwFormatRefMark
|
2014-08-19 22:54:57 +02:00
|
|
|
: public SfxPoolItem
|
|
|
|
, public SwModify
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2015-05-20 13:05:49 +02:00
|
|
|
friend class SwTextRefMark;
|
|
|
|
SwTextRefMark* pTextAttr;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2015-05-20 13:05:49 +02:00
|
|
|
SwFormatRefMark& operator=(const SwFormatRefMark& rRefMark) SAL_DELETED_FUNCTION;
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString aRefName;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2014-08-19 23:29:32 +02:00
|
|
|
css::uno::WeakReference<css::text::XTextContent> m_wXReferenceMark;
|
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
public:
|
2015-05-20 13:05:49 +02:00
|
|
|
SwFormatRefMark( const OUString& rText );
|
|
|
|
SwFormatRefMark( const SwFormatRefMark& rRefMark );
|
|
|
|
virtual ~SwFormatRefMark( );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2012-09-11 15:16:03 +03:00
|
|
|
/// "Pure virtual methods" of SfxPoolItem.
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual bool operator==( const SfxPoolItem& ) const SAL_OVERRIDE;
|
|
|
|
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const SAL_OVERRIDE;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2014-08-19 23:29:32 +02:00
|
|
|
// SwClient
|
|
|
|
virtual void Modify(SfxPoolItem const* pOld, SfxPoolItem const* pNew)
|
|
|
|
SAL_OVERRIDE;
|
|
|
|
|
2014-08-19 22:54:57 +02:00
|
|
|
void InvalidateRefMark();
|
|
|
|
|
2015-05-20 13:05:49 +02:00
|
|
|
const SwTextRefMark *GetTextRefMark() const { return pTextAttr; }
|
|
|
|
SwTextRefMark *GetTextRefMark() { return pTextAttr; }
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
inline OUString &GetRefName() { return aRefName; }
|
|
|
|
inline const OUString &GetRefName() const { return aRefName; }
|
2014-08-19 23:29:32 +02:00
|
|
|
|
|
|
|
css::uno::WeakReference<css::text::XTextContent> const& GetXRefMark() const
|
|
|
|
{ return m_wXReferenceMark; }
|
|
|
|
void SetXRefMark(css::uno::Reference<css::text::XTextContent> const& xMark)
|
|
|
|
{ m_wXReferenceMark = xMark; }
|
2000-09-18 16:15:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2010-10-14 08:30:41 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|