bump product version to 4.1.6.2
[LibreOffice.git] / sw / source / ui / misc / swmodalredlineacceptdlg.cxx
blob45ac31c15c7566168122ac3f70b441e6338e8400
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
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>
34 #include <helpid.h>
35 #include <cmdid.h>
36 #include <misc.hrc>
37 #include <shells.hrc>
39 #include <vector>
40 #include <redlndlg.hxx>
41 #include "swmodalredlineacceptdlg.hxx"
43 #include <unomid.h>
45 SwModalRedlineAcceptDlg::SwModalRedlineAcceptDlg(Window *pParent)
46 : SfxModalDialog(pParent,
47 "AcceptRejectChangesDialog", "svx/ui/acceptrejectchangesdialog.ui")
49 pImplDlg = new SwRedlineAcceptDlg(this, sal_True);
51 pImplDlg->Initialize(GetExtraData());
52 pImplDlg->Activate(); // for data's initialisation
55 SwModalRedlineAcceptDlg::~SwModalRedlineAcceptDlg()
57 AcceptAll(sal_False); // refuse everything remaining
58 pImplDlg->FillInfo(GetExtraData());
60 delete pImplDlg;
63 void SwModalRedlineAcceptDlg::Activate()
67 void SwModalRedlineAcceptDlg::AcceptAll( sal_Bool bAccept )
69 SvxTPFilter* pFilterTP = pImplDlg->GetChgCtrl()->GetFilterPage();
71 if (pFilterTP->IsDate() || pFilterTP->IsAuthor() ||
72 pFilterTP->IsRange() || pFilterTP->IsAction())
74 pFilterTP->CheckDate(sal_False); // turn off all filters
75 pFilterTP->CheckAuthor(sal_False);
76 pFilterTP->CheckRange(sal_False);
77 pFilterTP->CheckAction(sal_False);
78 pImplDlg->FilterChangedHdl();
81 pImplDlg->CallAcceptReject( sal_False, bAccept );
84 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */