docundo.cxx (89358e0f) docundo.cxx (26ea3662)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 5 unchanged lines hidden (view full) ---

14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 5 unchanged lines hidden (view full) ---

14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24// MARKER(update_precomp.py): autogen include statement, do not remove
25#include "precompiled_sw.hxx"
26
27#include <UndoManager.hxx>
22// MARKER(update_precomp.py): autogen include statement, do not remove
23#include "precompiled_sw.hxx"
24
25#include <UndoManager.hxx>
28
29#include <unotools/undoopt.hxx>
26#include <unotools/undoopt.hxx>
30
31#include <vcl/wrkwin.hxx>
27#include <vcl/wrkwin.hxx>
32
33#include <svx/svdmodel.hxx>
28#include <svx/svdmodel.hxx>
34
35#include <swmodule.hxx>
36#include <doc.hxx>
37#include <ndarr.hxx>
38#include <pam.hxx>
39#include <ndtxt.hxx>
40#include <swundo.hxx>
41#include <UndoCore.hxx>
42#include <rolbck.hxx>
43#include <undo.hrc>
44#include <editsh.hxx>
45#include <unobaseclass.hxx>
46#include <limits>
29#include <swmodule.hxx>
30#include <doc.hxx>
31#include <ndarr.hxx>
32#include <pam.hxx>
33#include <ndtxt.hxx>
34#include <swundo.hxx>
35#include <UndoCore.hxx>
36#include <rolbck.hxx>
37#include <undo.hrc>
38#include <editsh.hxx>
39#include <unobaseclass.hxx>
40#include <limits>
41#include <drawdoc.hxx>
47
42
48#include <limits>
49
50using namespace ::com::sun::star;
51
43using namespace ::com::sun::star;
44
52
53// the undo array should never grow beyond this limit:
54#define UNDO_ACTION_LIMIT (USHRT_MAX - 1000)
55
45// the undo array should never grow beyond this limit:
46#define UNDO_ACTION_LIMIT (USHRT_MAX - 1000)
47
56
57// UndoManager ///////////////////////////////////////////////////////////
58
59namespace sw {
60
61UndoManager::UndoManager(::std::auto_ptr<SwNodes> pUndoNodes,
62 IDocumentDrawModelAccess & rDrawModelAccess,
63 IDocumentRedlineAccess & rRedlineAccess,
64 IDocumentState & rState)

--- 28 unchanged lines hidden (view full) ---

93}
94
95void UndoManager::DoUndo(bool const bDoUndo)
96{
97 if(!isTextEditActive())
98 {
99 EnableUndo(bDoUndo);
100
48// UndoManager ///////////////////////////////////////////////////////////
49
50namespace sw {
51
52UndoManager::UndoManager(::std::auto_ptr<SwNodes> pUndoNodes,
53 IDocumentDrawModelAccess & rDrawModelAccess,
54 IDocumentRedlineAccess & rRedlineAccess,
55 IDocumentState & rState)

--- 28 unchanged lines hidden (view full) ---

84}
85
86void UndoManager::DoUndo(bool const bDoUndo)
87{
88 if(!isTextEditActive())
89 {
90 EnableUndo(bDoUndo);
91
101 SdrModel *const pSdrModel = m_rDrawModelAccess.GetDrawModel();
92 SwDrawModel*const pSdrModel = m_rDrawModelAccess.GetDrawModel();
102 if( pSdrModel )
103 {
104 pSdrModel->EnableUndo(bDoUndo);
105 }
106 }
107}
108
109bool UndoManager::DoesUndo() const

--- 500 unchanged lines hidden ---
93 if( pSdrModel )
94 {
95 pSdrModel->EnableUndo(bDoUndo);
96 }
97 }
98}
99
100bool UndoManager::DoesUndo() const

--- 500 unchanged lines hidden ---