2010-10-14 08:30:41 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-21 14:30:25 +01: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 .
|
|
|
|
*/
|
2010-01-05 16:37:47 +01:00
|
|
|
|
2013-11-05 02:17:53 +01:00
|
|
|
#ifndef INCLUDED_SW_SOURCE_CORE_INC_UNOPARAFRAMEENUM_HXX
|
|
|
|
#define INCLUDED_SW_SOURCE_CORE_INC_UNOPARAFRAMEENUM_HXX
|
2010-01-05 16:37:47 +01:00
|
|
|
|
|
|
|
#include <deque>
|
|
|
|
|
|
|
|
#include <com/sun/star/lang/XServiceInfo.hpp>
|
|
|
|
#include <com/sun/star/container/XEnumeration.hpp>
|
|
|
|
#include <com/sun/star/text/XTextContent.hpp>
|
|
|
|
|
2015-04-06 18:44:54 +02:00
|
|
|
#include <cppuhelper/implbase.hxx>
|
2010-01-05 16:37:47 +01:00
|
|
|
|
2015-06-01 19:43:00 +02:00
|
|
|
#include <calbck.hxx>
|
2010-01-08 17:13:54 +01:00
|
|
|
#include <unobaseclass.hxx>
|
2010-01-05 16:37:47 +01:00
|
|
|
|
2015-06-01 19:43:00 +02:00
|
|
|
|
2010-01-08 17:13:54 +01:00
|
|
|
class SwDepend;
|
2010-01-05 16:37:47 +01:00
|
|
|
class SwNodeIndex;
|
|
|
|
class SwPaM;
|
2015-05-20 13:05:49 +02:00
|
|
|
class SwFrameFormat;
|
2010-01-05 16:37:47 +01:00
|
|
|
|
2015-06-01 19:43:00 +02:00
|
|
|
namespace sw
|
|
|
|
{
|
|
|
|
struct FrameClient : public SwClient
|
|
|
|
{
|
|
|
|
FrameClient(SwModify* pModify) : SwClient(pModify) {};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
struct FrameClientSortListEntry
|
2010-01-05 16:37:47 +01:00
|
|
|
{
|
2014-01-15 10:14:52 +00:00
|
|
|
sal_Int32 nIndex;
|
2010-01-05 16:37:47 +01:00
|
|
|
sal_uInt32 nOrder;
|
2015-06-01 19:43:00 +02:00
|
|
|
std::shared_ptr<sw::FrameClient> pFrameClient;
|
2010-01-05 16:37:47 +01:00
|
|
|
|
2015-06-01 19:43:00 +02:00
|
|
|
FrameClientSortListEntry (sal_Int32 const i_nIndex,
|
|
|
|
sal_uInt32 const i_nOrder, sw::FrameClient* const i_pClient)
|
|
|
|
: nIndex(i_nIndex), nOrder(i_nOrder), pFrameClient(i_pClient) { }
|
2010-01-05 16:37:47 +01:00
|
|
|
};
|
|
|
|
|
2015-06-01 19:43:00 +02:00
|
|
|
typedef ::std::deque< FrameClientSortListEntry >
|
|
|
|
FrameClientSortList_t;
|
2010-01-05 16:37:47 +01:00
|
|
|
|
2015-06-01 19:43:00 +02:00
|
|
|
typedef ::std::deque< std::shared_ptr<sw::FrameClient> >
|
|
|
|
FrameClientList_t;
|
2010-01-05 16:37:47 +01:00
|
|
|
|
2010-11-15 11:59:57 +00:00
|
|
|
// #i28701# - adjust 4th parameter
|
2015-06-01 19:43:00 +02:00
|
|
|
void CollectFrameAtNode( const SwNodeIndex& rIdx,
|
|
|
|
FrameClientSortList_t& rFrames,
|
|
|
|
const bool bAtCharAnchoredObjs );
|
2010-01-05 16:37:47 +01:00
|
|
|
|
2010-01-08 17:13:54 +01:00
|
|
|
enum ParaFrameMode
|
|
|
|
{
|
|
|
|
PARAFRAME_PORTION_PARAGRAPH,
|
|
|
|
PARAFRAME_PORTION_CHAR,
|
|
|
|
PARAFRAME_PORTION_TEXTRANGE,
|
|
|
|
};
|
2010-01-05 16:37:47 +01:00
|
|
|
|
2015-04-06 18:44:54 +02:00
|
|
|
typedef ::cppu::WeakImplHelper
|
2010-01-05 16:37:47 +01:00
|
|
|
< ::com::sun::star::lang::XServiceInfo
|
|
|
|
, ::com::sun::star::container::XEnumeration
|
|
|
|
> SwXParaFrameEnumeration_Base;
|
|
|
|
|
|
|
|
class SwXParaFrameEnumeration
|
|
|
|
: public SwXParaFrameEnumeration_Base
|
|
|
|
{
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
2010-01-08 17:13:54 +01:00
|
|
|
class Impl;
|
|
|
|
::sw::UnoImplPtr<Impl> m_pImpl;
|
2010-01-05 16:37:47 +01:00
|
|
|
|
|
|
|
virtual ~SwXParaFrameEnumeration();
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
SwXParaFrameEnumeration(const SwPaM& rPaM,
|
2015-05-20 13:05:49 +02:00
|
|
|
const enum ParaFrameMode eParaFrameMode, SwFrameFormat *const pFormat = 0);
|
2010-01-05 16:37:47 +01:00
|
|
|
|
|
|
|
// XServiceInfo
|
2013-04-07 12:06:47 +02:00
|
|
|
virtual OUString SAL_CALL getImplementationName()
|
2014-03-27 18:12:18 +01:00
|
|
|
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
2010-01-05 16:37:47 +01:00
|
|
|
virtual sal_Bool SAL_CALL supportsService(
|
2013-04-07 12:06:47 +02:00
|
|
|
const OUString& rServiceName)
|
2014-03-27 18:12:18 +01:00
|
|
|
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
2013-04-07 12:06:47 +02:00
|
|
|
virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL
|
2010-01-05 16:37:47 +01:00
|
|
|
getSupportedServiceNames()
|
2014-03-27 18:12:18 +01:00
|
|
|
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
2010-01-05 16:37:47 +01:00
|
|
|
|
|
|
|
// XEnumeration
|
|
|
|
virtual sal_Bool SAL_CALL hasMoreElements()
|
2014-03-27 18:12:18 +01:00
|
|
|
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
2010-01-05 16:37:47 +01:00
|
|
|
virtual ::com::sun::star::uno::Any SAL_CALL nextElement()
|
|
|
|
throw (::com::sun::star::container::NoSuchElementException,
|
|
|
|
::com::sun::star::lang::WrappedTargetException,
|
2014-03-27 18:12:18 +01:00
|
|
|
::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
2010-01-05 16:37:47 +01:00
|
|
|
|
|
|
|
};
|
|
|
|
|
2013-11-05 02:17:53 +01:00
|
|
|
#endif // INCLUDED_SW_SOURCE_CORE_INC_UNOPARAFRAMEENUM_HXX
|
2010-01-05 16:37:47 +01:00
|
|
|
|
2010-10-14 08:30:41 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|