bump product version to 6.3.0.0.beta1
[LibreOffice.git] / include / editeng / overflowingtxt.hxx
blobb7835f175d611ecd633175c28ea24e3ea1deb7b5
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/editengdllapi.h>
24 #include <editeng/editdata.hxx>
26 #include <com/sun/star/uno/Reference.h>
27 #include <memory>
29 namespace com { namespace sun { namespace star {
30 namespace datatransfer {
31 class XTransferable;
32 } } } }
33 namespace rtl {
34 class OUString;
36 using ::rtl::OUString;
39 class OutlinerParaObject;
40 class Outliner;
44 * A collection of static methods for attaching text.
45 * Strongly coupled with some of the classes in this file.
47 class TextChainingUtils
49 public:
50 static css::uno::Reference< css::datatransfer::XTransferable> CreateTransferableFromText(Outliner const *);
52 static std::unique_ptr<OutlinerParaObject> JuxtaposeParaObject(
53 css::uno::Reference< css::datatransfer::XTransferable > const & xOverflowingContent,
54 Outliner *,
55 OutlinerParaObject const *);
56 static std::unique_ptr<OutlinerParaObject> DeeplyMergeParaObject(
57 css::uno::Reference< css::datatransfer::XTransferable > const & xOverflowingContent,
58 Outliner *,
59 OutlinerParaObject const *);
63 * The classes OverflowingText and NonOverflowingText handle the
64 * actual preparation of the OutlinerParaObjects to be used in destination
65 * and source box respectively.
68 class OverflowingText
70 public:
71 std::unique_ptr<OutlinerParaObject> JuxtaposeParaObject(Outliner *, OutlinerParaObject const *);
72 std::unique_ptr<OutlinerParaObject> DeeplyMergeParaObject(Outliner *, OutlinerParaObject const *);
74 private:
75 friend class Outliner;
76 OverflowingText(css::uno::Reference< css::datatransfer::XTransferable > const & xOverflowingContent);
78 css::uno::Reference< css::datatransfer::XTransferable > mxOverflowingContent;
81 class NonOverflowingText
83 public:
84 std::unique_ptr<OutlinerParaObject> RemoveOverflowingText(Outliner *) const;
85 ESelection GetOverflowPointSel() const;
86 bool IsLastParaInterrupted() const;
88 private:
89 NonOverflowingText(const ESelection &aSel, bool bLastParaInterrupted);
91 friend class Outliner;
92 const ESelection maContentSel;
93 const bool mbLastParaInterrupted;
98 * classes OFlowChainedText and UFlowChainedText:
99 * contain and handle the state of a broken up text _after_ a flow event
100 * (respectively after Overflow and Underflow).
103 class EDITENG_DLLPUBLIC OFlowChainedText
105 public:
106 OFlowChainedText(Outliner const *, bool );
107 ~OFlowChainedText();
109 std::unique_ptr<OutlinerParaObject> InsertOverflowingText(Outliner *, OutlinerParaObject const *);
110 std::unique_ptr<OutlinerParaObject> RemoveOverflowingText(Outliner *);
112 ESelection GetOverflowPointSel() const;
114 bool IsLastParaInterrupted() const;
116 private:
117 std::unique_ptr<NonOverflowingText> mpNonOverflowingTxt;
118 std::unique_ptr<OverflowingText> mpOverflowingTxt;
120 bool mbIsDeepMerge;
123 // UFlowChainedText is a simpler class than OFlowChainedText: it almost only joins para-objects
124 class EDITENG_DLLPUBLIC UFlowChainedText
126 public:
127 UFlowChainedText(Outliner const *, bool);
128 std::unique_ptr<OutlinerParaObject> CreateMergedUnderflowParaObject(Outliner *, OutlinerParaObject const *);
130 private:
131 css::uno::Reference< css::datatransfer::XTransferable > mxUnderflowingTxt;
133 bool mbIsDeepMerge;
136 #endif
138 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */