File: | home/maarten/src/libreoffice/core/sc/source/ui/view/auditsh.cxx |
Warning: | line 96, column 57 Called C++ object pointer is null |
Press '?' to see keyboard shortcuts
Keyboard shortcuts:
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 <sfx2/bindings.hxx> | |||
21 | #include <sfx2/objface.hxx> | |||
22 | #include <sfx2/objsh.hxx> | |||
23 | #include <sfx2/request.hxx> | |||
24 | #include <vcl/EnumContext.hxx> | |||
25 | ||||
26 | #include <auditsh.hxx> | |||
27 | #include <tabvwsh.hxx> | |||
28 | #include <sc.hrc> | |||
29 | #include <document.hxx> | |||
30 | ||||
31 | #define ShellClass_ScAuditingShell | |||
32 | #include <scslots.hxx> | |||
33 | ||||
34 | ||||
35 | SFX_IMPL_INTERFACE(ScAuditingShell, SfxShell)SfxInterface* ScAuditingShell::pInterface = nullptr; SfxInterface * ScAuditingShell::GetStaticInterface() { if ( !pInterface ) { pInterface = new SfxInterface( "ScAuditingShell", false, GetInterfaceId (), SfxShell::GetStaticInterface(), aScAuditingShellSlots_Impl [0], sal_uInt16(sizeof(aScAuditingShellSlots_Impl) / sizeof(SfxSlot ) ) ); InitInterface_Impl(); } return pInterface; } SfxInterface * ScAuditingShell::GetInterface() const { return GetStaticInterface (); } void ScAuditingShell::RegisterInterface(const SfxModule * pMod) { GetStaticInterface()->Register(pMod); } | |||
36 | ||||
37 | void ScAuditingShell::InitInterface_Impl() | |||
38 | { | |||
39 | GetStaticInterface()->RegisterPopupMenu("audit"); | |||
40 | } | |||
41 | ||||
42 | ScAuditingShell::ScAuditingShell(ScViewData& rData) : | |||
43 | SfxShell(rData.GetViewShell()), | |||
44 | rViewData( rData ), | |||
45 | nFunction( SID_FILL_ADD_PRED((((((((((((((((((((((((((26000 + 200) + 20)) + 20)) + 20)) + 25)) + 22)) + 20)) + 29)) + 20))+20))+1))+50))+20))+7) ) | |||
46 | { | |||
47 | SetPool( &rViewData.GetViewShell()->GetPool() ); | |||
48 | SfxUndoManager* pMgr = rViewData.GetSfxDocShell()->GetUndoManager(); | |||
49 | SetUndoManager( pMgr ); | |||
50 | if ( !rViewData.GetDocument().IsUndoEnabled() ) | |||
51 | { | |||
52 | pMgr->SetMaxUndoActionCount( 0 ); | |||
53 | } | |||
54 | SetName("Auditing"); | |||
55 | SfxShell::SetContextName(vcl::EnumContext::GetContextName(vcl::EnumContext::Context::Auditing)); | |||
56 | } | |||
57 | ||||
58 | ScAuditingShell::~ScAuditingShell() | |||
59 | { | |||
60 | } | |||
61 | ||||
62 | void ScAuditingShell::Execute( const SfxRequest& rReq ) | |||
63 | { | |||
64 | SfxBindings& rBindings = rViewData.GetBindings(); | |||
65 | sal_uInt16 nSlot = rReq.GetSlot(); | |||
66 | switch ( nSlot ) | |||
| ||||
67 | { | |||
68 | case SID_FILL_ADD_PRED((((((((((((((((((((((((((26000 + 200) + 20)) + 20)) + 20)) + 25)) + 22)) + 20)) + 29)) + 20))+20))+1))+50))+20))+7): | |||
69 | case SID_FILL_DEL_PRED((((((((((((((((((((((((((26000 + 200) + 20)) + 20)) + 20)) + 25)) + 22)) + 20)) + 29)) + 20))+20))+1))+50))+20))+8): | |||
70 | case SID_FILL_ADD_SUCC((((((((((((((((((((((((((26000 + 200) + 20)) + 20)) + 20)) + 25)) + 22)) + 20)) + 29)) + 20))+20))+1))+50))+20))+9): | |||
71 | case SID_FILL_DEL_SUCC((((((((((((((((((((((((((26000 + 200) + 20)) + 20)) + 20)) + 25)) + 22)) + 20)) + 29)) + 20))+20))+1))+50))+20))+10): | |||
72 | nFunction = nSlot; | |||
73 | rBindings.Invalidate( SID_FILL_ADD_PRED((((((((((((((((((((((((((26000 + 200) + 20)) + 20)) + 20)) + 25)) + 22)) + 20)) + 29)) + 20))+20))+1))+50))+20))+7) ); | |||
74 | rBindings.Invalidate( SID_FILL_DEL_PRED((((((((((((((((((((((((((26000 + 200) + 20)) + 20)) + 20)) + 25)) + 22)) + 20)) + 29)) + 20))+20))+1))+50))+20))+8) ); | |||
75 | rBindings.Invalidate( SID_FILL_ADD_SUCC((((((((((((((((((((((((((26000 + 200) + 20)) + 20)) + 20)) + 25)) + 22)) + 20)) + 29)) + 20))+20))+1))+50))+20))+9) ); | |||
76 | rBindings.Invalidate( SID_FILL_DEL_SUCC((((((((((((((((((((((((((26000 + 200) + 20)) + 20)) + 20)) + 25)) + 22)) + 20)) + 29)) + 20))+20))+1))+50))+20))+10) ); | |||
77 | break; | |||
78 | case SID_CANCEL((26000 + 521) + 36): // Escape | |||
79 | case SID_FILL_NONE((((((((((((((((((((((((((26000 + 200) + 20)) + 20)) + 20)) + 25)) + 22)) + 20)) + 29)) + 20))+20))+1))+50))+20))+11): | |||
80 | rViewData.GetViewShell()->SetAuditShell( false ); | |||
81 | break; | |||
82 | ||||
83 | case SID_FILL_SELECT((((((((((((((((((((((((((26000 + 200) + 20)) + 20)) + 20)) + 25)) + 22)) + 20)) + 29)) + 20))+20))+1))+50))+20))+12): | |||
84 | { | |||
85 | const SfxItemSet* pReqArgs = rReq.GetArgs(); | |||
86 | if ( pReqArgs ) | |||
87 | { | |||
88 | const SfxPoolItem* pXItem; | |||
89 | const SfxPoolItem* pYItem; | |||
90 | if ( pReqArgs->GetItemState( SID_RANGE_COL((((26000 + 521) + 50))+21), true, &pXItem ) == SfxItemState::SET | |||
91 | && pReqArgs->GetItemState( SID_RANGE_ROW((((26000 + 521) + 50))+20), true, &pYItem ) == SfxItemState::SET ) | |||
92 | { | |||
93 | OSL_ENSURE( dynamic_cast<const SfxInt16Item*>( pXItem) != nullptr && dynamic_cast<const SfxInt32Item*>( pYItem) != nullptr,do { if (true && (!(dynamic_cast<const SfxInt16Item *>( pXItem) != nullptr && dynamic_cast<const SfxInt32Item *>( pYItem) != nullptr))) { sal_detail_logFormat((SAL_DETAIL_LOG_LEVEL_WARN ), ("legacy.osl"), ("/home/maarten/src/libreoffice/core/sc/source/ui/view/auditsh.cxx" ":" "94" ": "), "%s", "wrong items"); } } while (false) | |||
94 | "wrong items" )do { if (true && (!(dynamic_cast<const SfxInt16Item *>( pXItem) != nullptr && dynamic_cast<const SfxInt32Item *>( pYItem) != nullptr))) { sal_detail_logFormat((SAL_DETAIL_LOG_LEVEL_WARN ), ("legacy.osl"), ("/home/maarten/src/libreoffice/core/sc/source/ui/view/auditsh.cxx" ":" "94" ": "), "%s", "wrong items"); } } while (false); | |||
95 | SCCOL nCol = static_cast<SCCOL>(static_cast<const SfxInt16Item*>(pXItem)->GetValue()); | |||
96 | SCROW nRow = static_cast<SCROW>(static_cast<const SfxInt32Item*>(pYItem)->GetValue()); | |||
| ||||
97 | ScViewFunc* pView = rViewData.GetView(); | |||
98 | pView->MoveCursorAbs( nCol, nRow, SC_FOLLOW_LINE, false, false ); | |||
99 | switch ( nFunction ) | |||
100 | { | |||
101 | case SID_FILL_ADD_PRED((((((((((((((((((((((((((26000 + 200) + 20)) + 20)) + 20)) + 25)) + 22)) + 20)) + 29)) + 20))+20))+1))+50))+20))+7): | |||
102 | pView->DetectiveAddPred(); | |||
103 | break; | |||
104 | case SID_FILL_DEL_PRED((((((((((((((((((((((((((26000 + 200) + 20)) + 20)) + 20)) + 25)) + 22)) + 20)) + 29)) + 20))+20))+1))+50))+20))+8): | |||
105 | pView->DetectiveDelPred(); | |||
106 | break; | |||
107 | case SID_FILL_ADD_SUCC((((((((((((((((((((((((((26000 + 200) + 20)) + 20)) + 20)) + 25)) + 22)) + 20)) + 29)) + 20))+20))+1))+50))+20))+9): | |||
108 | pView->DetectiveAddSucc(); | |||
109 | break; | |||
110 | case SID_FILL_DEL_SUCC((((((((((((((((((((((((((26000 + 200) + 20)) + 20)) + 20)) + 25)) + 22)) + 20)) + 29)) + 20))+20))+1))+50))+20))+10): | |||
111 | pView->DetectiveDelSucc(); | |||
112 | break; | |||
113 | } | |||
114 | } | |||
115 | } | |||
116 | } | |||
117 | break; | |||
118 | } | |||
119 | } | |||
120 | ||||
121 | void ScAuditingShell::GetState( SfxItemSet& rSet ) | |||
122 | { | |||
123 | rSet.Put( SfxBoolItem( nFunction, true ) ); // mark active functions | |||
124 | } | |||
125 | ||||
126 | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |