Line data Source code
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 <redline.hxx>
21 : #include <vcl/msgbox.hxx>
22 : #include <svl/eitem.hxx>
23 : #include <sfx2/viewfrm.hxx>
24 : #include <sfx2/dispatch.hxx>
25 : #include <svx/ctredlin.hxx>
26 : #include <svx/postattr.hxx>
27 : #include <swtypes.hxx>
28 : #include <wrtsh.hxx>
29 : #include <view.hxx>
30 : #include <swmodule.hxx>
31 : #include <swwait.hxx>
32 : #include <uitool.hxx>
33 :
34 : #include <helpid.h>
35 : #include <cmdid.h>
36 : #include <misc.hrc>
37 : #include <shells.hrc>
38 :
39 : #include <vector>
40 : #include <redlndlg.hxx>
41 : #include "swmodalredlineacceptdlg.hxx"
42 :
43 : #include <unomid.h>
44 :
45 0 : SwModalRedlineAcceptDlg::SwModalRedlineAcceptDlg(Window *pParent)
46 : : SfxModalDialog(pParent,
47 0 : "AcceptRejectChangesDialog", "svx/ui/acceptrejectchangesdialog.ui")
48 : {
49 0 : pImplDlg = new SwRedlineAcceptDlg(this, sal_True);
50 :
51 0 : pImplDlg->Initialize(GetExtraData());
52 0 : pImplDlg->Activate(); // for data's initialisation
53 0 : }
54 :
55 0 : SwModalRedlineAcceptDlg::~SwModalRedlineAcceptDlg()
56 : {
57 0 : AcceptAll(sal_False); // refuse everything remaining
58 0 : pImplDlg->FillInfo(GetExtraData());
59 :
60 0 : delete pImplDlg;
61 0 : }
62 :
63 0 : void SwModalRedlineAcceptDlg::Activate()
64 : {
65 0 : }
66 :
67 0 : void SwModalRedlineAcceptDlg::AcceptAll( sal_Bool bAccept )
68 : {
69 0 : SvxTPFilter* pFilterTP = pImplDlg->GetChgCtrl()->GetFilterPage();
70 :
71 0 : if (pFilterTP->IsDate() || pFilterTP->IsAuthor() ||
72 0 : pFilterTP->IsRange() || pFilterTP->IsAction())
73 : {
74 0 : pFilterTP->CheckDate(false); // turn off all filters
75 0 : pFilterTP->CheckAuthor(false);
76 0 : pFilterTP->CheckRange(false);
77 0 : pFilterTP->CheckAction(false);
78 0 : pImplDlg->FilterChangedHdl();
79 : }
80 :
81 0 : pImplDlg->CallAcceptReject( sal_False, bAccept );
82 0 : }
83 :
84 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|