1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_EDITENG_OVERFLOWINGTXT_HXX
21 #define INCLUDED_EDITENG_OVERFLOWINGTXT_HXX
23 #include <editeng/macros.hxx>
24 #include <editeng/editengdllapi.h>
25 #include <editeng/editdata.hxx>
27 #include <com/sun/star/uno/Reference.h>
29 namespace com
{ namespace sun
{ namespace star
{
30 namespace datatransfer
{
36 using ::rtl::OUString
;
39 class OutlinerParaObject
;
45 * A collection of static methods for attaching text.
46 * Strongly coupled with some of the classes in this file.
48 class TextChainingUtils
51 static css::uno::Reference
< css::datatransfer::XTransferable
> CreateTransferableFromText(Outliner
*);
53 static OutlinerParaObject
*JuxtaposeParaObject(
54 css::uno::Reference
< css::datatransfer::XTransferable
> xOverflowingContent
,
56 OutlinerParaObject
*);
57 static OutlinerParaObject
*DeeplyMergeParaObject(
58 css::uno::Reference
< css::datatransfer::XTransferable
> xOverflowingContent
,
60 OutlinerParaObject
*);
64 * The classes OverflowingText and NonOverflowingText handle the
65 * actual preparation of the OutlinerParaObjects to be used in destination
66 * and source box respectively.
72 OutlinerParaObject
*JuxtaposeParaObject(Outliner
*, OutlinerParaObject
*);
73 OutlinerParaObject
*DeeplyMergeParaObject(Outliner
*, OutlinerParaObject
*);
76 friend class Outliner
;
77 OverflowingText(css::uno::Reference
< css::datatransfer::XTransferable
> xOverflowingContent
);
79 css::uno::Reference
< css::datatransfer::XTransferable
> mxOverflowingContent
;
82 class NonOverflowingText
85 OutlinerParaObject
*RemoveOverflowingText(Outliner
*) const;
86 ESelection
GetOverflowPointSel() const;
87 bool IsLastParaInterrupted() const;
90 NonOverflowingText(const ESelection
&aSel
, bool bLastParaInterrupted
);
92 friend class Outliner
;
93 const ESelection maContentSel
;
94 const bool mbLastParaInterrupted
;
99 * classes OFlowChainedText and UFlowChainedText:
100 * contain and handle the state of a broken up text _after_ a flow event
101 * (respectively after Overflow and Underflow).
104 class EDITENG_DLLPUBLIC OFlowChainedText
107 OFlowChainedText(Outliner
*, bool );
110 OutlinerParaObject
*InsertOverflowingText(Outliner
*, OutlinerParaObject
*);
111 OutlinerParaObject
*RemoveOverflowingText(Outliner
*);
113 ESelection
GetOverflowPointSel() const;
115 bool IsLastParaInterrupted() const;
118 NonOverflowingText
*mpNonOverflowingTxt
;
119 OverflowingText
*mpOverflowingTxt
;
124 // UFlowChainedText is a simpler class than OFlowChainedText: it almost only joins para-objects
125 class EDITENG_DLLPUBLIC UFlowChainedText
128 UFlowChainedText(Outliner
*, bool);
129 OutlinerParaObject
*CreateMergedUnderflowParaObject(Outliner
*, OutlinerParaObject
*);
132 css::uno::Reference
< css::datatransfer::XTransferable
> mxUnderflowingTxt
;
139 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */