xref: /aoo41x/main/sw/inc/unoparaframeenum.hxx (revision 1d2dbeb0)
1*1d2dbeb0SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*1d2dbeb0SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*1d2dbeb0SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*1d2dbeb0SAndrew Rist  * distributed with this work for additional information
6*1d2dbeb0SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*1d2dbeb0SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*1d2dbeb0SAndrew Rist  * "License"); you may not use this file except in compliance
9*1d2dbeb0SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*1d2dbeb0SAndrew Rist  *
11*1d2dbeb0SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*1d2dbeb0SAndrew Rist  *
13*1d2dbeb0SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*1d2dbeb0SAndrew Rist  * software distributed under the License is distributed on an
15*1d2dbeb0SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*1d2dbeb0SAndrew Rist  * KIND, either express or implied.  See the License for the
17*1d2dbeb0SAndrew Rist  * specific language governing permissions and limitations
18*1d2dbeb0SAndrew Rist  * under the License.
19*1d2dbeb0SAndrew Rist  *
20*1d2dbeb0SAndrew Rist  *************************************************************/
21*1d2dbeb0SAndrew Rist 
22*1d2dbeb0SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef SW_UNOPARAFRAMEENUM_HXX
25cdf0e10cSrcweir #define SW_UNOPARAFRAMEENUM_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <deque>
28cdf0e10cSrcweir 
29cdf0e10cSrcweir #include <boost/shared_ptr.hpp>
30cdf0e10cSrcweir 
31cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp>
32cdf0e10cSrcweir #include <com/sun/star/container/XEnumeration.hpp>
33cdf0e10cSrcweir #include <com/sun/star/text/XTextContent.hpp>
34cdf0e10cSrcweir 
35cdf0e10cSrcweir #include <cppuhelper/implbase2.hxx>
36cdf0e10cSrcweir 
37cdf0e10cSrcweir #include <unobaseclass.hxx>
38cdf0e10cSrcweir 
39cdf0e10cSrcweir 
40cdf0e10cSrcweir class SwDepend;
41cdf0e10cSrcweir class SwNodeIndex;
42cdf0e10cSrcweir class SwPaM;
43cdf0e10cSrcweir class SwFrmFmt;
44cdf0e10cSrcweir 
45cdf0e10cSrcweir 
46cdf0e10cSrcweir struct FrameDependSortListEntry
47cdf0e10cSrcweir {
48cdf0e10cSrcweir     xub_StrLen nIndex;
49cdf0e10cSrcweir     sal_uInt32 nOrder;
50cdf0e10cSrcweir     ::boost::shared_ptr<SwDepend> pFrameDepend;
51cdf0e10cSrcweir 
FrameDependSortListEntryFrameDependSortListEntry52cdf0e10cSrcweir     FrameDependSortListEntry (xub_StrLen const i_nIndex,
53cdf0e10cSrcweir                 sal_uInt32 const i_nOrder, SwDepend * const i_pDepend)
54cdf0e10cSrcweir         : nIndex(i_nIndex), nOrder(i_nOrder), pFrameDepend(i_pDepend) { }
55cdf0e10cSrcweir };
56cdf0e10cSrcweir 
57cdf0e10cSrcweir typedef ::std::deque< FrameDependSortListEntry >
58cdf0e10cSrcweir     FrameDependSortList_t;
59cdf0e10cSrcweir 
60cdf0e10cSrcweir typedef ::std::deque< ::boost::shared_ptr<SwDepend> >
61cdf0e10cSrcweir     FrameDependList_t;
62cdf0e10cSrcweir 
63cdf0e10cSrcweir 
64cdf0e10cSrcweir // OD 2004-05-07 #i28701# - adjust 4th parameter
65cdf0e10cSrcweir void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx,
66cdf0e10cSrcweir                          FrameDependSortList_t & rFrames,
67cdf0e10cSrcweir                          const bool _bAtCharAnchoredObjs );
68cdf0e10cSrcweir 
69cdf0e10cSrcweir 
70cdf0e10cSrcweir /* -----------------23.03.99 12:57-------------------
71cdf0e10cSrcweir  *
72cdf0e10cSrcweir  * --------------------------------------------------*/
73cdf0e10cSrcweir 
74cdf0e10cSrcweir enum ParaFrameMode
75cdf0e10cSrcweir {
76cdf0e10cSrcweir     PARAFRAME_PORTION_PARAGRAPH,
77cdf0e10cSrcweir     PARAFRAME_PORTION_CHAR,
78cdf0e10cSrcweir     PARAFRAME_PORTION_TEXTRANGE,
79cdf0e10cSrcweir };
80cdf0e10cSrcweir 
81cdf0e10cSrcweir typedef ::cppu::WeakImplHelper2
82cdf0e10cSrcweir <   ::com::sun::star::lang::XServiceInfo
83cdf0e10cSrcweir ,   ::com::sun::star::container::XEnumeration
84cdf0e10cSrcweir > SwXParaFrameEnumeration_Base;
85cdf0e10cSrcweir 
86cdf0e10cSrcweir class SwXParaFrameEnumeration
87cdf0e10cSrcweir     : public SwXParaFrameEnumeration_Base
88cdf0e10cSrcweir {
89cdf0e10cSrcweir 
90cdf0e10cSrcweir private:
91cdf0e10cSrcweir 
92cdf0e10cSrcweir     class Impl;
93cdf0e10cSrcweir     ::sw::UnoImplPtr<Impl> m_pImpl;
94cdf0e10cSrcweir 
95cdf0e10cSrcweir     virtual ~SwXParaFrameEnumeration();
96cdf0e10cSrcweir 
97cdf0e10cSrcweir public:
98cdf0e10cSrcweir 
99cdf0e10cSrcweir     SwXParaFrameEnumeration(const SwPaM& rPaM,
100cdf0e10cSrcweir         const enum ParaFrameMode eParaFrameMode, SwFrmFmt *const pFmt = 0);
101cdf0e10cSrcweir 
102cdf0e10cSrcweir     // XServiceInfo
103cdf0e10cSrcweir     virtual ::rtl::OUString SAL_CALL getImplementationName()
104cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
105cdf0e10cSrcweir     virtual sal_Bool SAL_CALL supportsService(
106cdf0e10cSrcweir             const ::rtl::OUString& rServiceName)
107cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
108cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
109cdf0e10cSrcweir         getSupportedServiceNames()
110cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
111cdf0e10cSrcweir 
112cdf0e10cSrcweir     // XEnumeration
113cdf0e10cSrcweir     virtual sal_Bool SAL_CALL hasMoreElements()
114cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
115cdf0e10cSrcweir     virtual ::com::sun::star::uno::Any SAL_CALL nextElement()
116cdf0e10cSrcweir         throw (::com::sun::star::container::NoSuchElementException,
117cdf0e10cSrcweir                ::com::sun::star::lang::WrappedTargetException,
118cdf0e10cSrcweir                ::com::sun::star::uno::RuntimeException);
119cdf0e10cSrcweir 
120cdf0e10cSrcweir };
121cdf0e10cSrcweir 
122cdf0e10cSrcweir #endif // SW_UNOPARAFRAMEENUM_HXX
123cdf0e10cSrcweir 
124