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 INCLUDED_SW_SOURCE_CORE_INC_UNOPARAFRAMEENUM_HXX
21 : #define INCLUDED_SW_SOURCE_CORE_INC_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 : class SwDepend;
36 : class SwNodeIndex;
37 : class SwPaM;
38 : class SwFrmFmt;
39 :
40 324 : struct FrameDependSortListEntry
41 : {
42 : sal_Int32 nIndex;
43 : sal_uInt32 nOrder;
44 : ::boost::shared_ptr<SwDepend> pFrameDepend;
45 :
46 108 : FrameDependSortListEntry (sal_Int32 const i_nIndex,
47 : sal_uInt32 const i_nOrder, SwDepend * const i_pDepend)
48 108 : : nIndex(i_nIndex), nOrder(i_nOrder), pFrameDepend(i_pDepend) { }
49 : };
50 :
51 : typedef ::std::deque< FrameDependSortListEntry >
52 : FrameDependSortList_t;
53 :
54 : typedef ::std::deque< ::boost::shared_ptr<SwDepend> >
55 : FrameDependList_t;
56 :
57 : // #i28701# - adjust 4th parameter
58 : void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx,
59 : FrameDependSortList_t & rFrames,
60 : const bool _bAtCharAnchoredObjs );
61 :
62 : enum ParaFrameMode
63 : {
64 : PARAFRAME_PORTION_PARAGRAPH,
65 : PARAFRAME_PORTION_CHAR,
66 : PARAFRAME_PORTION_TEXTRANGE,
67 : };
68 :
69 : typedef ::cppu::WeakImplHelper2
70 : < ::com::sun::star::lang::XServiceInfo
71 : , ::com::sun::star::container::XEnumeration
72 : > SwXParaFrameEnumeration_Base;
73 :
74 : class SwXParaFrameEnumeration
75 : : public SwXParaFrameEnumeration_Base
76 : {
77 :
78 : private:
79 :
80 : class Impl;
81 : ::sw::UnoImplPtr<Impl> m_pImpl;
82 :
83 : virtual ~SwXParaFrameEnumeration();
84 :
85 : public:
86 :
87 : SwXParaFrameEnumeration(const SwPaM& rPaM,
88 : const enum ParaFrameMode eParaFrameMode, SwFrmFmt *const pFmt = 0);
89 :
90 : // XServiceInfo
91 : virtual OUString SAL_CALL getImplementationName()
92 : throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
93 : virtual sal_Bool SAL_CALL supportsService(
94 : const OUString& rServiceName)
95 : throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
96 : virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL
97 : getSupportedServiceNames()
98 : throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
99 :
100 : // XEnumeration
101 : virtual sal_Bool SAL_CALL hasMoreElements()
102 : throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
103 : virtual ::com::sun::star::uno::Any SAL_CALL nextElement()
104 : throw (::com::sun::star::container::NoSuchElementException,
105 : ::com::sun::star::lang::WrappedTargetException,
106 : ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
107 :
108 : };
109 :
110 : #endif // INCLUDED_SW_SOURCE_CORE_INC_UNOPARAFRAMEENUM_HXX
111 :
112 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|