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/.
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>
22 class FieldUpdaterImpl
;
23 class SvxFieldItemUpdater
;
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
;
34 FieldUpdater(EditTextObject
& rObj
);
35 FieldUpdater(const FieldUpdater
& r
);
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
54 virtual ~SvxFieldItemUpdater();
56 // write-access when SvxFieldItem needs to be modified
57 virtual void SetItem(const SvxFieldItem
&) = 0;
63 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */