Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #ifndef SW_UNOPARAFRAMEENUM_HXX
21 : #define SW_UNOPARAFRAMEENUM_HXX
22 :
23 : #include <deque>
24 :
25 : #include <boost/shared_ptr.hpp>
26 :
27 : #include <com/sun/star/lang/XServiceInfo.hpp>
28 : #include <com/sun/star/container/XEnumeration.hpp>
29 : #include <com/sun/star/text/XTextContent.hpp>
30 :
31 : #include <cppuhelper/implbase2.hxx>
32 :
33 : #include <unobaseclass.hxx>
34 :
35 :
36 : class SwDepend;
37 : class SwNodeIndex;
38 : class SwPaM;
39 : class SwFrmFmt;
40 :
41 :
42 0 : struct FrameDependSortListEntry
43 : {
44 : xub_StrLen nIndex;
45 : sal_uInt32 nOrder;
46 : ::boost::shared_ptr<SwDepend> pFrameDepend;
47 :
48 0 : FrameDependSortListEntry (xub_StrLen const i_nIndex,
49 : sal_uInt32 const i_nOrder, SwDepend * const i_pDepend)
50 0 : : nIndex(i_nIndex), nOrder(i_nOrder), pFrameDepend(i_pDepend) { }
51 : };
52 :
53 : typedef ::std::deque< FrameDependSortListEntry >
54 : FrameDependSortList_t;
55 :
56 : typedef ::std::deque< ::boost::shared_ptr<SwDepend> >
57 : FrameDependList_t;
58 :
59 :
60 : // #i28701# - adjust 4th parameter
61 : void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx,
62 : FrameDependSortList_t & rFrames,
63 : const bool _bAtCharAnchoredObjs );
64 :
65 : enum ParaFrameMode
66 : {
67 : PARAFRAME_PORTION_PARAGRAPH,
68 : PARAFRAME_PORTION_CHAR,
69 : PARAFRAME_PORTION_TEXTRANGE,
70 : };
71 :
72 : typedef ::cppu::WeakImplHelper2
73 : < ::com::sun::star::lang::XServiceInfo
74 : , ::com::sun::star::container::XEnumeration
75 : > SwXParaFrameEnumeration_Base;
76 :
77 : class SwXParaFrameEnumeration
78 : : public SwXParaFrameEnumeration_Base
79 : {
80 :
81 : private:
82 :
83 : class Impl;
84 : ::sw::UnoImplPtr<Impl> m_pImpl;
85 :
86 : virtual ~SwXParaFrameEnumeration();
87 :
88 : public:
89 :
90 : SwXParaFrameEnumeration(const SwPaM& rPaM,
91 : const enum ParaFrameMode eParaFrameMode, SwFrmFmt *const pFmt = 0);
92 :
93 : // XServiceInfo
94 : virtual ::rtl::OUString SAL_CALL getImplementationName()
95 : throw (::com::sun::star::uno::RuntimeException);
96 : virtual sal_Bool SAL_CALL supportsService(
97 : const ::rtl::OUString& rServiceName)
98 : throw (::com::sun::star::uno::RuntimeException);
99 : virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
100 : getSupportedServiceNames()
101 : throw (::com::sun::star::uno::RuntimeException);
102 :
103 : // XEnumeration
104 : virtual sal_Bool SAL_CALL hasMoreElements()
105 : throw (::com::sun::star::uno::RuntimeException);
106 : virtual ::com::sun::star::uno::Any SAL_CALL nextElement()
107 : throw (::com::sun::star::container::NoSuchElementException,
108 : ::com::sun::star::lang::WrappedTargetException,
109 : ::com::sun::star::uno::RuntimeException);
110 :
111 : };
112 :
113 : #endif // SW_UNOPARAFRAMEENUM_HXX
114 :
115 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|