2010-10-14 08:30:41 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2011-03-31 10:05:04 +02:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2006-09-16 22:09:47 +00:00
|
|
|
|
2004-05-10 15:34:25 +00:00
|
|
|
#include <redline.hxx>
|
|
|
|
#include <vcl/msgbox.hxx>
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/eitem.hxx>
|
2004-05-10 15:34:25 +00:00
|
|
|
#include <sfx2/viewfrm.hxx>
|
|
|
|
#include <sfx2/dispatch.hxx>
|
|
|
|
#include <svx/ctredlin.hxx>
|
|
|
|
#include <svx/postattr.hxx>
|
|
|
|
#include <swtypes.hxx>
|
|
|
|
#include <wrtsh.hxx>
|
|
|
|
#include <view.hxx>
|
|
|
|
#include <swmodule.hxx>
|
|
|
|
#include <swwait.hxx>
|
|
|
|
#include <uitool.hxx>
|
|
|
|
|
|
|
|
#include <helpid.h>
|
|
|
|
#include <cmdid.h>
|
|
|
|
#include <misc.hrc>
|
|
|
|
#include <shells.hrc>
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <redlndlg.hxx>
|
|
|
|
#include "swmodalredlineacceptdlg.hxx"
|
|
|
|
|
2007-09-27 11:23:43 +00:00
|
|
|
#include <unomid.h>
|
|
|
|
|
2013-02-21 17:17:52 +00:00
|
|
|
SwModalRedlineAcceptDlg::SwModalRedlineAcceptDlg(Window *pParent)
|
|
|
|
: SfxModalDialog(pParent,
|
|
|
|
"AcceptRejectChangesDialog", "svx/ui/acceptrejectchangesdialog.ui")
|
2004-05-10 15:34:25 +00:00
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
pImplDlg = new SwRedlineAcceptDlg(this, sal_True);
|
2004-05-10 15:34:25 +00:00
|
|
|
|
|
|
|
pImplDlg->Initialize(GetExtraData());
|
2011-06-05 16:41:02 +02:00
|
|
|
pImplDlg->Activate(); // for data's initialisation
|
2004-05-10 15:34:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SwModalRedlineAcceptDlg::~SwModalRedlineAcceptDlg()
|
|
|
|
{
|
2011-06-05 16:41:02 +02:00
|
|
|
AcceptAll(sal_False); // refuse everything remaining
|
2004-05-10 15:34:25 +00:00
|
|
|
pImplDlg->FillInfo(GetExtraData());
|
|
|
|
|
|
|
|
delete pImplDlg;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SwModalRedlineAcceptDlg::Activate()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
void SwModalRedlineAcceptDlg::AcceptAll( sal_Bool bAccept )
|
2004-05-10 15:34:25 +00:00
|
|
|
{
|
|
|
|
SvxTPFilter* pFilterTP = pImplDlg->GetChgCtrl()->GetFilterPage();
|
|
|
|
|
|
|
|
if (pFilterTP->IsDate() || pFilterTP->IsAuthor() ||
|
|
|
|
pFilterTP->IsRange() || pFilterTP->IsAction())
|
|
|
|
{
|
2011-06-05 16:41:02 +02:00
|
|
|
pFilterTP->CheckDate(sal_False); // turn off all filters
|
2011-01-17 15:06:54 +01:00
|
|
|
pFilterTP->CheckAuthor(sal_False);
|
|
|
|
pFilterTP->CheckRange(sal_False);
|
|
|
|
pFilterTP->CheckAction(sal_False);
|
2004-05-10 15:34:25 +00:00
|
|
|
pImplDlg->FilterChangedHdl();
|
|
|
|
}
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
pImplDlg->CallAcceptReject( sal_False, bAccept );
|
2004-05-10 15:34:25 +00:00
|
|
|
}
|
2010-10-14 08:30:41 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|