2010-10-14 08:30:41 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2004-05-10 15:34:25 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 20:15:31 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2004-05-10 15:34:25 +00:00
|
|
|
*
|
2010-02-12 15:01:35 +01:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2004-05-10 15:34:25 +00:00
|
|
|
*
|
2008-04-10 20:15:31 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2004-05-10 15:34:25 +00:00
|
|
|
*
|
2008-04-10 20:15:31 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2004-05-10 15:34:25 +00:00
|
|
|
*
|
2008-04-10 20:15:31 +00:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2004-05-10 15:34:25 +00:00
|
|
|
*
|
2008-04-10 20:15:31 +00:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2004-05-10 15:34:25 +00:00
|
|
|
*
|
2008-04-10 20:15:31 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2004-05-10 15:34:25 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
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 <redlndlg.hrc>
|
|
|
|
#include <shells.hrc>
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <redlndlg.hxx>
|
|
|
|
#include "swmodalredlineacceptdlg.hxx"
|
|
|
|
|
2007-09-27 11:23:43 +00:00
|
|
|
#include <unomid.h>
|
|
|
|
|
2004-05-10 15:34:25 +00:00
|
|
|
SwModalRedlineAcceptDlg::SwModalRedlineAcceptDlg(Window *pParent) :
|
|
|
|
SfxModalDialog(pParent, SW_RES(DLG_MOD_REDLINE_ACCEPT))
|
|
|
|
{
|
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
|
|
|
|
|
|
|
FreeResource();
|
|
|
|
}
|
|
|
|
|
|
|
|
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()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void SwModalRedlineAcceptDlg::Resize()
|
|
|
|
{
|
|
|
|
pImplDlg->Resize();
|
|
|
|
SfxModalDialog::Resize();
|
|
|
|
}
|
|
|
|
|
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: */
|