LibreOffice Module sw (master) 1
undoflystrattr.cxx
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#include <undoflystrattr.hxx>
21#include <frmfmt.hxx>
22#include <utility>
23
24
26 const SwUndoId eUndoId,
27 OUString sOldStr,
28 OUString sNewStr )
29 : SwUndo( eUndoId, rFlyFrameFormat.GetDoc() ),
30 mrFlyFrameFormat( rFlyFrameFormat ),
31 msOldStr(std::move( sOldStr )),
32 msNewStr(std::move( sNewStr ))
33{
34 assert(eUndoId == SwUndoId::FLYFRMFMT_TITLE
36}
37
39{
40}
41
43{
44 switch ( GetId() )
45 {
47 {
49 }
50 break;
52 {
54 }
55 break;
56 default:
57 {
58 }
59 }
60}
61
63{
64 switch ( GetId() )
65 {
67 {
69 }
70 break;
72 {
74 }
75 break;
76 default:
77 {
78 }
79 }
80}
81
83{
84 SwRewriter aResult;
85
87
88 return aResult;
89}
90
91/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
@ UndoArg1
Definition: SwRewriter.hxx:29
void SetObjDescription(const OUString &rDescription, bool bBroadcast=false)
Definition: atrfrm.cxx:3211
void SetObjTitle(const OUString &rTitle, bool bBroadcast=false)
Definition: atrfrm.cxx:3168
const OUString & GetName() const
Definition: format.hxx:131
void AddRule(SwUndoArg eWhat, const OUString &rWith)
Definition: SwRewriter.cxx:25
virtual void UndoImpl(::sw::UndoRedoContext &) override
const OUString msNewStr
const OUString msOldStr
SwUndoFlyStrAttr(SwFlyFrameFormat &rFlyFrameFormat, const SwUndoId eUndoId, OUString sOldStr, OUString sNewStr)
virtual SwRewriter GetRewriter() const override
Returns the rewriter for this object.
SwFlyFrameFormat & mrFlyFrameFormat
virtual ~SwUndoFlyStrAttr() override
virtual void RedoImpl(::sw::UndoRedoContext &) override
SwUndoId GetId() const
Definition: undobj.hxx:102
SwUndoId
Definition: swundo.hxx:30
@ FLYFRMFMT_TITLE
@ FLYFRMFMT_DESCRIPTION