tdf#130857 qt weld: Implement QtInstanceWidget::get_text_height
[LibreOffice.git] / include / editeng / fieldupdater.hxx
blob61d6570741e2f70cead322d6506011a94421e36f
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/.
8 */
10 #ifndef INCLUDED_EDITENG_FIELDUPDATER_HXX
11 #define INCLUDED_EDITENG_FIELDUPDATER_HXX
13 #include <editeng/editengdllapi.h>
14 #include <editeng/flditem.hxx>
15 #include <svl/itempool.hxx>
16 #include <memory>
18 class EditTextObject;
20 namespace editeng
22 class FieldUpdaterImpl;
23 class SvxFieldItemUpdater;
25 /**
26 * Wrapper for EditTextObject to handle updating of fields without exposing
27 * the internals of EditTextObject structure.
29 class EDITENG_DLLPUBLIC FieldUpdater
31 std::unique_ptr<FieldUpdaterImpl> mpImpl;
33 public:
34 FieldUpdater(EditTextObject& rObj);
35 FieldUpdater(const FieldUpdater& r);
36 ~FieldUpdater();
38 /**
39 * Set a new table ID to all table fields.
41 * @param nTab new table ID
43 void updateTableFields(int nTab);
45 void UpdatePageRelativeURLs(
46 const std::function<void(const SvxFieldItem& rFieldItem,
47 SvxFieldItemUpdater& rFieldItemUpdater)>& rItemCallback);
50 // helper for updating the items we find via UpdatePageRelativeURLs
51 class EDITENG_DLLPUBLIC SvxFieldItemUpdater
53 public:
54 virtual ~SvxFieldItemUpdater();
56 // write-access when SvxFieldItem needs to be modified
57 virtual void SetItem(const SvxFieldItem&) = 0;
61 #endif
63 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */