Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : : #include <redline.hxx>
30 : : #include <vcl/msgbox.hxx>
31 : : #include <svl/eitem.hxx>
32 : : #include <sfx2/viewfrm.hxx>
33 : : #include <sfx2/dispatch.hxx>
34 : : #include <svx/ctredlin.hxx>
35 : : #include <svx/postattr.hxx>
36 : : #include <swtypes.hxx>
37 : : #include <wrtsh.hxx>
38 : : #include <view.hxx>
39 : : #include <swmodule.hxx>
40 : : #include <swwait.hxx>
41 : : #include <uitool.hxx>
42 : :
43 : : #include <helpid.h>
44 : : #include <cmdid.h>
45 : : #include <misc.hrc>
46 : : #include <redlndlg.hrc>
47 : : #include <shells.hrc>
48 : :
49 : : #include <vector>
50 : : #include <redlndlg.hxx>
51 : : #include "swmodalredlineacceptdlg.hxx"
52 : :
53 : : #include <unomid.h>
54 : :
55 : 0 : SwModalRedlineAcceptDlg::SwModalRedlineAcceptDlg(Window *pParent) :
56 : 0 : SfxModalDialog(pParent, SW_RES(DLG_MOD_REDLINE_ACCEPT))
57 : : {
58 : 0 : pImplDlg = new SwRedlineAcceptDlg(this, sal_True);
59 : :
60 : 0 : pImplDlg->Initialize(GetExtraData());
61 : 0 : pImplDlg->Activate(); // for data's initialisation
62 : :
63 : 0 : FreeResource();
64 : 0 : }
65 : :
66 : 0 : SwModalRedlineAcceptDlg::~SwModalRedlineAcceptDlg()
67 : : {
68 : 0 : AcceptAll(sal_False); // refuse everything remaining
69 : 0 : pImplDlg->FillInfo(GetExtraData());
70 : :
71 : 0 : delete pImplDlg;
72 : 0 : }
73 : :
74 : 0 : void SwModalRedlineAcceptDlg::Activate()
75 : : {
76 : 0 : }
77 : :
78 : 0 : void SwModalRedlineAcceptDlg::Resize()
79 : : {
80 : 0 : pImplDlg->Resize();
81 : 0 : SfxModalDialog::Resize();
82 : 0 : }
83 : :
84 : 0 : void SwModalRedlineAcceptDlg::AcceptAll( sal_Bool bAccept )
85 : : {
86 : 0 : SvxTPFilter* pFilterTP = pImplDlg->GetChgCtrl()->GetFilterPage();
87 : :
88 : 0 : if (pFilterTP->IsDate() || pFilterTP->IsAuthor() ||
89 : 0 : pFilterTP->IsRange() || pFilterTP->IsAction())
90 : : {
91 : 0 : pFilterTP->CheckDate(sal_False); // turn off all filters
92 : 0 : pFilterTP->CheckAuthor(sal_False);
93 : 0 : pFilterTP->CheckRange(sal_False);
94 : 0 : pFilterTP->CheckAction(sal_False);
95 : 0 : pImplDlg->FilterChangedHdl();
96 : : }
97 : :
98 : 0 : pImplDlg->CallAcceptReject( sal_False, bAccept );
99 : 0 : }
100 : :
101 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|