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 
23 
25  const SwUndoId eUndoId,
26  const OUString& sOldStr,
27  const OUString& sNewStr )
28  : SwUndo( eUndoId, rFlyFrameFormat.GetDoc() ),
29  mrFlyFrameFormat( rFlyFrameFormat ),
30  msOldStr( sOldStr ),
31  msNewStr( sNewStr )
32 {
33  assert(eUndoId == SwUndoId::FLYFRMFMT_TITLE
34  || eUndoId == SwUndoId::FLYFRMFMT_DESCRIPTION);
35 }
36 
38 {
39 }
40 
42 {
43  switch ( GetId() )
44  {
46  {
48  }
49  break;
51  {
53  }
54  break;
55  default:
56  {
57  }
58  }
59 }
60 
62 {
63  switch ( GetId() )
64  {
66  {
68  }
69  break;
71  {
73  }
74  break;
75  default:
76  {
77  }
78  }
79 }
80 
82 {
83  SwRewriter aResult;
84 
86 
87  return aResult;
88 }
89 
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const OUString msNewStr
virtual SwRewriter GetRewriter() const override
Returns the rewriter for this object.
SwUndoId
Definition: swundo.hxx:29
SwUndoId GetId() const
Definition: undobj.hxx:99
virtual void UndoImpl(::sw::UndoRedoContext &) override
const OUString msOldStr
const OUString & GetName() const
Definition: format.hxx:111
SwUndoFlyStrAttr(SwFlyFrameFormat &rFlyFrameFormat, const SwUndoId eUndoId, const OUString &sOldStr, const OUString &sNewStr)
void AddRule(SwUndoArg eWhat, const OUString &rWith)
Definition: SwRewriter.cxx:29
SwFlyFrameFormat & mrFlyFrameFormat
virtual ~SwUndoFlyStrAttr() override
virtual void RedoImpl(::sw::UndoRedoContext &) override
void SetObjTitle(const OUString &rTitle, bool bBroadcast=false)
Definition: atrfrm.cxx:3078
void SetObjDescription(const OUString &rDescription, bool bBroadcast=false)
Definition: atrfrm.cxx:3115