LibreOffice Module sw (master)  1
textapi.hxx
Go to the documentation of this file.
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_TEXTAPI_HXX
21 #define INCLUDED_SW_SOURCE_CORE_INC_TEXTAPI_HXX
22 
23 #include <editeng/unoedsrc.hxx>
24 #include <editeng/unotext.hxx>
25 #include <editeng/outlobj.hxx>
26 
27 class SwDoc;
28 
31 {
33 
34  virtual std::unique_ptr<SvxEditSource> Clone() const override;
35  virtual SvxTextForwarder* GetTextForwarder() override;
36  virtual void UpdateData() override;
37  explicit SwTextAPIEditSource( const SwTextAPIEditSource& rSource );
38 
39 public:
41  virtual ~SwTextAPIEditSource() override;
42 
43  void Dispose();
44  void SetText( OutlinerParaObject const & rText );
45  void SetString( const OUString& rText );
46  std::unique_ptr<OutlinerParaObject> CreateText();
47  OUString GetText();
48 };
49 
51 {
52  std::unique_ptr<SwTextAPIEditSource> pSource;
53 public:
54  SwTextAPIObject( std::unique_ptr<SwTextAPIEditSource> p);
55  virtual ~SwTextAPIObject() throw() override;
56  void DisposeEditSource() { pSource->Dispose(); }
57  std::unique_ptr<OutlinerParaObject> CreateText() { return pSource->CreateText(); }
58  void SetString( const OUString& rText ) { pSource->SetString( rText ); }
59  void SetText( OutlinerParaObject const & rText ) { pSource->SetText( rText ); }
60  OUString GetText() { return pSource->GetText(); }
61 };
62 
63 #endif
64 
65 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void SetText(OutlinerParaObject const &rText)
Definition: textapi.hxx:59
OUString GetText()
Definition: textapi.hxx:60
Definition: doc.hxx:185
SwTextAPIEditSource_Impl * pImpl
Definition: textapi.hxx:32
virtual void UpdateData() override
Definition: textapi.cxx:97
virtual SvxTextForwarder * GetTextForwarder() override
Definition: textapi.cxx:124
virtual std::unique_ptr< SvxEditSource > Clone() const override
Definition: textapi.cxx:92
OUString GetText()
Definition: textapi.cxx:186
std::unique_ptr< SwTextAPIEditSource > pSource
Definition: textapi.hxx:52
void DisposeEditSource()
Definition: textapi.hxx:56
void SetString(const OUString &rText)
Definition: textapi.hxx:58
SwTextAPIEditSource(const SwTextAPIEditSource &rSource)
Definition: textapi.cxx:84
SwTextAPIObject(std::unique_ptr< SwTextAPIEditSource > p)
Definition: textapi.cxx:62
std::unique_ptr< OutlinerParaObject > CreateText()
Definition: textapi.hxx:57
void SetString(const OUString &rText)
Definition: textapi.cxx:161
std::unique_ptr< OutlinerParaObject > CreateText()
Definition: textapi.cxx:178
virtual ~SwTextAPIObject() override
Definition: textapi.cxx:68
virtual ~SwTextAPIEditSource() override
Definition: textapi.cxx:110
void SetText(OutlinerParaObject const &rText)
Definition: textapi.cxx:145