11d2dbeb0SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 31d2dbeb0SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 41d2dbeb0SAndrew Rist * or more contributor license agreements. See the NOTICE file 51d2dbeb0SAndrew Rist * distributed with this work for additional information 61d2dbeb0SAndrew Rist * regarding copyright ownership. The ASF licenses this file 71d2dbeb0SAndrew Rist * to you under the Apache License, Version 2.0 (the 81d2dbeb0SAndrew Rist * "License"); you may not use this file except in compliance 91d2dbeb0SAndrew Rist * with the License. You may obtain a copy of the License at 101d2dbeb0SAndrew Rist * 111d2dbeb0SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 121d2dbeb0SAndrew Rist * 131d2dbeb0SAndrew Rist * Unless required by applicable law or agreed to in writing, 141d2dbeb0SAndrew Rist * software distributed under the License is distributed on an 151d2dbeb0SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 161d2dbeb0SAndrew Rist * KIND, either express or implied. See the License for the 171d2dbeb0SAndrew Rist * specific language governing permissions and limitations 181d2dbeb0SAndrew Rist * under the License. 191d2dbeb0SAndrew Rist * 201d2dbeb0SAndrew Rist *************************************************************/ 211d2dbeb0SAndrew Rist 221d2dbeb0SAndrew Rist 23cdf0e10cSrcweir #ifndef _FLYPOS_HXX 24cdf0e10cSrcweir #define _FLYPOS_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir #include <swdllapi.h> 27*37fb9221SArmin Le Grand #include <boost/shared_ptr.hpp> 28*37fb9221SArmin Le Grand #include <set> 29cdf0e10cSrcweir 30cdf0e10cSrcweir class SwFrmFmt; 31cdf0e10cSrcweir class SwNodeIndex; 32cdf0e10cSrcweir 33cdf0e10cSrcweir // Struktur zum Erfragen der akt. freifliegenden Rahmen am Dokument. 34cdf0e10cSrcweir class SW_DLLPUBLIC SwPosFlyFrm 35cdf0e10cSrcweir { 36cdf0e10cSrcweir const SwFrmFmt* pFrmFmt; // das FlyFrmFmt 37cdf0e10cSrcweir SwNodeIndex* pNdIdx; // es reicht ein Index auf den Node 38cdf0e10cSrcweir sal_uInt32 nOrdNum; 39cdf0e10cSrcweir public: 40cdf0e10cSrcweir SwPosFlyFrm( const SwNodeIndex& , const SwFrmFmt*, sal_uInt16 nArrPos ); 41cdf0e10cSrcweir virtual ~SwPosFlyFrm(); // virtual fuer die Writer (DLL !!) 42cdf0e10cSrcweir GetFmt() const43cdf0e10cSrcweir const SwFrmFmt& GetFmt() const { return *pFrmFmt; } GetNdIndex() const44cdf0e10cSrcweir const SwNodeIndex& GetNdIndex() const { return *pNdIdx; } GetOrdNum() const45cdf0e10cSrcweir sal_uInt32 GetOrdNum() const { return nOrdNum; } 46cdf0e10cSrcweir }; 47cdf0e10cSrcweir 48*37fb9221SArmin Le Grand // define needed classes to safely handle an array of allocated SwPosFlyFrm(s). 49*37fb9221SArmin Le Grand // SwPosFlyFrms can be handled by value (as return value), only refcounts to 50*37fb9221SArmin Le Grand // contained SwPosFlyFrm* will be copied. When releasing the last SwPosFlyFrmPtr 51*37fb9221SArmin Le Grand // instance the allocated instance will be freed. The array is sorted by 52*37fb9221SArmin Le Grand // GetNdIndex by using a ::std::set container. 53*37fb9221SArmin Le Grand typedef ::boost::shared_ptr< SwPosFlyFrm > SwPosFlyFrmPtr; 54*37fb9221SArmin Le Grand struct SwPosFlyFrmCmp { bool operator()(const SwPosFlyFrmPtr& rA, const SwPosFlyFrmPtr& rB) const; }; 55*37fb9221SArmin Le Grand typedef ::std::set< SwPosFlyFrmPtr, SwPosFlyFrmCmp > SwPosFlyFrms; 56cdf0e10cSrcweir 57cdf0e10cSrcweir #endif // _FLYPOS_HXX 58