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 .
|
|
|
|
*/
|
2000-09-18 16:15:01 +00:00
|
|
|
#ifndef _FLYPOS_HXX
|
|
|
|
#define _FLYPOS_HXX
|
|
|
|
|
2009-01-05 14:06:42 +00:00
|
|
|
#include <swdllapi.h>
|
2012-06-29 11:39:59 +00:00
|
|
|
#include <boost/shared_ptr.hpp>
|
2012-05-16 10:58:34 +02:00
|
|
|
#include <set>
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
class SwFrmFmt;
|
|
|
|
class SwNodeIndex;
|
|
|
|
|
2011-01-26 10:38:06 +01:00
|
|
|
|
2012-09-02 09:05:03 +03:00
|
|
|
/// For querying current flys in document.
|
2009-01-05 14:06:42 +00:00
|
|
|
class SW_DLLPUBLIC SwPosFlyFrm
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2012-09-02 09:05:03 +03:00
|
|
|
const SwFrmFmt* pFrmFmt; ///< FlyFrmFmt
|
|
|
|
SwNodeIndex* pNdIdx; ///< Index for node is sufficient.
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt32 nOrdNum;
|
2000-09-18 16:15:01 +00:00
|
|
|
public:
|
2011-01-17 15:06:54 +01:00
|
|
|
SwPosFlyFrm( const SwNodeIndex& , const SwFrmFmt*, sal_uInt16 nArrPos );
|
2012-09-02 09:05:03 +03:00
|
|
|
virtual ~SwPosFlyFrm(); ///< Virtual for Writer (DLL !!)
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
const SwFrmFmt& GetFmt() const { return *pFrmFmt; }
|
|
|
|
const SwNodeIndex& GetNdIndex() const { return *pNdIdx; }
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt32 GetOrdNum() const { return nOrdNum; }
|
2000-09-18 16:15:01 +00:00
|
|
|
};
|
|
|
|
|
2012-06-29 11:39:59 +00:00
|
|
|
// define needed classes to safely handle an array of allocated SwPosFlyFrm(s).
|
|
|
|
// SwPosFlyFrms can be handled by value (as return value), only refcounts to
|
|
|
|
// contained SwPosFlyFrm* will be copied. When releasing the last SwPosFlyFrmPtr
|
|
|
|
// instance the allocated instance will be freed. The array is sorted by
|
|
|
|
// GetNdIndex by using a ::std::set container.
|
|
|
|
typedef ::boost::shared_ptr< SwPosFlyFrm > SwPosFlyFrmPtr;
|
|
|
|
struct SwPosFlyFrmCmp { bool operator()(const SwPosFlyFrmPtr& rA, const SwPosFlyFrmPtr& rB) const; };
|
|
|
|
typedef ::std::set< SwPosFlyFrmPtr, SwPosFlyFrmCmp > SwPosFlyFrms;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2003-10-06 13:31:00 +00:00
|
|
|
#endif // _FLYPOS_HXX
|
2010-10-14 08:30:41 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|