2010-10-12 15:59:00 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-11-30 12:23:25 +00: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 .
|
|
|
|
*/
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
#include <sfx2/dispatch.hxx>
|
2015-01-14 09:25:30 +00:00
|
|
|
#include <vcl/idle.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
#include "uiitems.hxx"
|
|
|
|
#include "rangenam.hxx"
|
2011-05-13 23:11:42 -04:00
|
|
|
#include "dbdata.hxx"
|
2000-09-18 16:07:07 +00:00
|
|
|
#include "reffact.hxx"
|
|
|
|
#include "viewdata.hxx"
|
|
|
|
#include "document.hxx"
|
2004-07-23 09:51:39 +00:00
|
|
|
#include "docsh.hxx"
|
2000-09-18 16:07:07 +00:00
|
|
|
#include "scresid.hxx"
|
|
|
|
|
|
|
|
#include "foptmgr.hxx"
|
|
|
|
|
|
|
|
#include "globstr.hrc"
|
|
|
|
#include "filter.hrc"
|
|
|
|
|
|
|
|
#include "filtdlg.hxx"
|
|
|
|
#include <vcl/msgbox.hxx>
|
|
|
|
|
|
|
|
// DEFINE --------------------------------------------------------------------
|
|
|
|
|
2015-05-26 16:26:35 +02:00
|
|
|
#define ERRORBOX(rid) ScopedVclPtrInstance<MessageDialog>::Create(this, ScGlobal::GetRscString(rid))->Execute()
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
// class ScSpecialFilterDialog
|
|
|
|
|
2014-09-23 11:20:40 +02:00
|
|
|
ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent,
|
2000-09-18 16:07:07 +00:00
|
|
|
const SfxItemSet& rArgSet )
|
|
|
|
|
2013-07-16 12:51:47 +02:00
|
|
|
: ScAnyRefDlg ( pB, pCW, pParent, "AdvancedFilterDialog", "modules/scalc/ui/advancedfilterdialog.ui" ),
|
2014-02-25 19:58:48 +01:00
|
|
|
|
2012-04-29 23:36:57 +01:00
|
|
|
aStrUndefined ( SC_RESSTR(SCSTR_UNDEFINED) ),
|
2007-02-27 12:05:11 +00:00
|
|
|
pOptionsMgr ( NULL ),
|
2000-09-18 16:07:07 +00:00
|
|
|
nWhichQuery ( rArgSet.GetPool()->GetWhich( SID_QUERY ) ),
|
2014-10-27 14:18:17 +02:00
|
|
|
theQueryData ( static_cast<const ScQueryItem&>(
|
2000-09-18 16:07:07 +00:00
|
|
|
rArgSet.Get( nWhichQuery )).GetQueryData() ),
|
|
|
|
pOutItem ( NULL ),
|
|
|
|
pViewData ( NULL ),
|
|
|
|
pDoc ( NULL ),
|
|
|
|
pRefInputEdit ( NULL ),
|
2011-03-10 16:55:21 -05:00
|
|
|
bRefInputMode ( false ),
|
2014-11-18 15:11:29 +00:00
|
|
|
pIdle ( NULL )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-07-16 12:51:47 +02:00
|
|
|
get(pLbFilterArea,"lbfilterarea");
|
|
|
|
get(pEdFilterArea,"edfilterarea");
|
2013-07-17 20:42:23 +01:00
|
|
|
pEdFilterArea->SetReferences(this, get<VclFrame>("filterframe")->get_label_widget());
|
2013-07-16 12:51:47 +02:00
|
|
|
get(pRbFilterArea,"rbfilterarea");
|
|
|
|
pRbFilterArea->SetReferences(this, pEdFilterArea);
|
|
|
|
get(pBtnCase,"case");
|
|
|
|
get(pBtnRegExp,"regexp");
|
|
|
|
get(pBtnHeader,"header");
|
|
|
|
get(pBtnUnique,"unique");
|
|
|
|
get(pBtnCopyResult,"copyresult");
|
|
|
|
get(pLbCopyArea,"lbcopyarea");
|
|
|
|
get(pEdCopyArea,"edcopyarea");
|
2013-07-17 20:42:23 +01:00
|
|
|
pEdCopyArea->SetReferences(this, pBtnCopyResult);
|
2013-07-16 12:51:47 +02:00
|
|
|
get(pRbCopyArea,"rbcopyarea");
|
|
|
|
pRbCopyArea->SetReferences(this, pEdCopyArea);
|
|
|
|
get(pBtnDestPers,"destpers");
|
|
|
|
get(pFtDbAreaLabel,"dbarealabel");
|
|
|
|
get(pFtDbArea,"dbarea");
|
|
|
|
get(pBtnOk,"ok");
|
|
|
|
get(pBtnCancel,"cancel");
|
|
|
|
get(pExpander,"more");
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2013-07-16 12:51:47 +02:00
|
|
|
Init( rArgSet );
|
|
|
|
pEdFilterArea->GrabFocus();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
// Hack: RefInput-Kontrolle
|
2014-11-18 15:11:29 +00:00
|
|
|
pIdle = new Idle;
|
2015-02-26 07:28:54 +00:00
|
|
|
pIdle->SetPriority( SchedulerPriority::MEDIUM ); // 50ms warten
|
2014-11-18 15:11:29 +00:00
|
|
|
pIdle->SetIdleHdl( LINK( this, ScSpecialFilterDlg, TimeOutHdl ) );
|
|
|
|
pIdle->Start();
|
2011-01-20 16:34:26 +01:00
|
|
|
|
2013-07-16 12:51:47 +02:00
|
|
|
pLbCopyArea->SetAccessibleName(pBtnCopyResult->GetText());
|
|
|
|
pEdCopyArea->SetAccessibleName(pBtnCopyResult->GetText());
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2010-12-11 23:25:30 +01:00
|
|
|
ScSpecialFilterDlg::~ScSpecialFilterDlg()
|
2015-01-26 13:16:18 +02:00
|
|
|
{
|
2015-03-10 09:07:06 +02:00
|
|
|
disposeOnce();
|
2015-01-26 13:16:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void ScSpecialFilterDlg::dispose()
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-07-16 12:51:47 +02:00
|
|
|
sal_uInt16 nEntries = pLbFilterArea->GetEntryCount();
|
2011-01-17 13:20:22 +01:00
|
|
|
sal_uInt16 i;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
for ( i=1; i<nEntries; i++ )
|
2015-03-28 19:06:09 +01:00
|
|
|
delete static_cast<OUString*>(pLbFilterArea->GetEntryData( i ));
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
delete pOptionsMgr;
|
|
|
|
|
2015-06-13 22:15:31 +02:00
|
|
|
delete pOutItem;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
// Hack: RefInput-Kontrolle
|
2014-11-18 15:11:29 +00:00
|
|
|
pIdle->Stop();
|
|
|
|
delete pIdle;
|
2015-03-09 14:29:30 +02:00
|
|
|
|
|
|
|
pLbFilterArea.clear();
|
|
|
|
pEdFilterArea.clear();
|
|
|
|
pRbFilterArea.clear();
|
|
|
|
pExpander.clear();
|
|
|
|
pBtnCase.clear();
|
|
|
|
pBtnRegExp.clear();
|
|
|
|
pBtnHeader.clear();
|
|
|
|
pBtnUnique.clear();
|
|
|
|
pBtnCopyResult.clear();
|
|
|
|
pLbCopyArea.clear();
|
|
|
|
pEdCopyArea.clear();
|
|
|
|
pRbCopyArea.clear();
|
|
|
|
pBtnDestPers.clear();
|
|
|
|
pFtDbAreaLabel.clear();
|
|
|
|
pFtDbArea.clear();
|
|
|
|
pBtnOk.clear();
|
|
|
|
pBtnCancel.clear();
|
|
|
|
pRefInputEdit.clear();
|
2015-01-26 13:16:18 +02:00
|
|
|
ScAnyRefDlg::dispose();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2010-12-11 23:25:30 +01:00
|
|
|
void ScSpecialFilterDlg::Init( const SfxItemSet& rArgSet )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-10-27 14:18:17 +02:00
|
|
|
const ScQueryItem& rQueryItem = static_cast<const ScQueryItem&>(
|
|
|
|
rArgSet.Get( nWhichQuery ));
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2013-07-16 12:51:47 +02:00
|
|
|
pBtnOk->SetClickHdl ( LINK( this, ScSpecialFilterDlg, EndDlgHdl ) );
|
|
|
|
pBtnCancel->SetClickHdl ( LINK( this, ScSpecialFilterDlg, EndDlgHdl ) );
|
|
|
|
pLbFilterArea->SetSelectHdl ( LINK( this, ScSpecialFilterDlg, FilterAreaSelHdl ) );
|
|
|
|
pEdFilterArea->SetModifyHdl ( LINK( this, ScSpecialFilterDlg, FilterAreaModHdl ) );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
pViewData = rQueryItem.GetViewData();
|
|
|
|
pDoc = pViewData ? pViewData->GetDocument() : NULL;
|
|
|
|
|
2013-10-16 14:27:58 +02:00
|
|
|
pEdFilterArea->SetText( EMPTY_OUSTRING ); // may be overwritten below
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( pViewData && pDoc )
|
|
|
|
{
|
2013-07-16 12:51:47 +02:00
|
|
|
if(pDoc->GetChangeTrack()!=NULL) pBtnCopyResult->Disable();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2011-03-05 00:36:23 -05:00
|
|
|
ScRangeName* pRangeNames = pDoc->GetRangeName();
|
2013-07-16 12:51:47 +02:00
|
|
|
pLbFilterArea->Clear();
|
|
|
|
pLbFilterArea->InsertEntry( aStrUndefined, 0 );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2011-03-05 00:36:23 -05:00
|
|
|
if (!pRangeNames->empty())
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2011-03-05 00:36:23 -05:00
|
|
|
ScRangeName::const_iterator itr = pRangeNames->begin(), itrEnd = pRangeNames->end();
|
2011-03-10 16:55:21 -05:00
|
|
|
sal_uInt16 nInsert = 0;
|
2011-03-05 00:36:23 -05:00
|
|
|
for (; itr != itrEnd; ++itr)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2011-11-24 07:48:41 +01:00
|
|
|
if (!itr->second->HasType(RT_CRITERIA))
|
2011-03-05 00:36:23 -05:00
|
|
|
continue;
|
|
|
|
|
2013-07-16 12:51:47 +02:00
|
|
|
nInsert = pLbFilterArea->InsertEntry(itr->second->GetName());
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString aSymbol;
|
2011-11-24 07:48:41 +01:00
|
|
|
itr->second->GetSymbol(aSymbol);
|
2013-10-07 14:26:21 +02:00
|
|
|
pLbFilterArea->SetEntryData(nInsert, new OUString(aSymbol));
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// is there a stored source range?
|
|
|
|
|
|
|
|
ScRange aAdvSource;
|
|
|
|
if (rQueryItem.GetAdvancedQuerySource(aAdvSource))
|
|
|
|
{
|
2013-08-29 20:44:22 +01:00
|
|
|
OUString aRefStr(aAdvSource.Format(SCR_ABS_3D, pDoc, pDoc->GetAddressConvention()));
|
2013-07-16 12:51:47 +02:00
|
|
|
pEdFilterArea->SetRefString( aRefStr );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-07-16 12:51:47 +02:00
|
|
|
pLbFilterArea->SelectEntryPos( 0 );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
// Optionen initialisieren lassen:
|
|
|
|
|
2013-07-19 08:20:20 +01:00
|
|
|
pOptionsMgr = new ScFilterOptionsMgr(
|
2000-09-18 16:07:07 +00:00
|
|
|
pViewData,
|
|
|
|
theQueryData,
|
2013-07-16 12:51:47 +02:00
|
|
|
pBtnCase,
|
|
|
|
pBtnRegExp,
|
|
|
|
pBtnHeader,
|
|
|
|
pBtnUnique,
|
|
|
|
pBtnCopyResult,
|
|
|
|
pBtnDestPers,
|
|
|
|
pLbCopyArea,
|
|
|
|
pEdCopyArea,
|
|
|
|
pRbCopyArea,
|
|
|
|
pFtDbAreaLabel,
|
|
|
|
pFtDbArea,
|
2000-09-18 16:07:07 +00:00
|
|
|
aStrUndefined );
|
|
|
|
|
2011-03-01 14:29:24 +01:00
|
|
|
// Spezialfilter braucht immer Spaltenkoepfe
|
2013-07-16 12:51:47 +02:00
|
|
|
pBtnHeader->Check(true);
|
|
|
|
pBtnHeader->Disable();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
// Modal-Modus einschalten
|
2011-08-29 22:49:51 -04:00
|
|
|
// SetDispatcherLock( true );
|
2000-09-18 16:07:07 +00:00
|
|
|
//@BugID 54702 Enablen/Disablen nur noch in Basisklasse
|
2011-08-29 22:49:51 -04:00
|
|
|
//SFX_APPWINDOW->Disable(false); //! allgemeine Methode im ScAnyRefDlg
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2014-02-21 12:53:51 +01:00
|
|
|
bool ScSpecialFilterDlg::Close()
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-07-23 09:51:39 +00:00
|
|
|
if (pViewData)
|
|
|
|
pViewData->GetDocShell()->CancelAutoDBRange();
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
return DoClose( ScSpecialFilterDlgWrapper::GetChildWindowId() );
|
|
|
|
}
|
|
|
|
|
|
|
|
// Uebergabe eines mit der Maus selektierten Tabellenbereiches, der dann als
|
|
|
|
// neue Selektion im Referenz-Edit angezeigt wird.
|
|
|
|
|
2007-02-27 12:05:11 +00:00
|
|
|
void ScSpecialFilterDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
if ( bRefInputMode && pRefInputEdit ) // Nur moeglich, wenn im Referenz-Editmodus
|
|
|
|
{
|
|
|
|
if ( rRef.aStart != rRef.aEnd )
|
|
|
|
RefInputStart( pRefInputEdit );
|
|
|
|
|
2013-08-29 20:44:22 +01:00
|
|
|
OUString aRefStr;
|
CWS-TOOLING: integrate CWS frmdlg
2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05
2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF:
Add GAMMA, CHISQDIST, CHISQINV.
Make the 'cumulative' parameter of GAMMADIST optional.
Adapt the domain of CHIDIST to allow negative x.
Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV.
Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and
ODFF if omitted, for backwards compatibility.
2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37)
2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula
2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula
2008-12-12 13:22:00 +0100 msc r265413 : #i97089#
2008-12-12 13:20:25 +0100 msc r265412 : #i97089#
2008-12-12 12:35:12 +0100 msc r265406 : #i97089#
2008-12-12 12:34:16 +0100 msc r265405 : #i97089#
2008-12-12 12:33:05 +0100 msc r265404 : #i97089#
2008-12-12 12:31:11 +0100 msc r265403 : #i97089#
2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG
2008-12-08 11:50:17 +0100 oj r264980 : some small changes
2008-12-05 12:57:57 +0100 oj r264902 : eof changed
2008-12-05 12:56:46 +0100 oj r264901 : eof changed
2008-12-05 12:28:47 +0100 oj r264899 : wrong var used
2008-12-05 10:08:57 +0100 oj r264890 : token order reversed
2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage
2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id
2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button
2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button
2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends
2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends
2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends
2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set
2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category
2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids
2008-12-01 14:36:43 +0100 oj r264604 : use temp var
2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula
2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula
2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc
2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select
2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void
2008-11-28 11:16:48 +0100 oj r264532 : add help ids
2008-11-28 10:16:56 +0100 oj r264529 : set help id
2008-11-28 10:16:43 +0100 oj r264528 : set help id
2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes
2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug
2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them
2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code
2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code
2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline
2008-11-21 12:35:27 +0100 oj r264124 : hold symbols
2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost
2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove
2008-11-19 20:37:41 +0100 oj r264021 : removed unused var
2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token
2008-11-19 10:59:47 +0100 oj r263967 : deleted
2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files
2008-11-18 15:27:36 +0100 oj r263777 : unused para removed
2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg
2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting
2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef
2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling
2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file
2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula
2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction
2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35
2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35
2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35
2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35
2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35
2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35
2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35
2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35
2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35
2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35
2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved
2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target
2008-10-07 10:08:39 +0200 oj r262077 : copy
2008-10-07 09:45:31 +0200 oj r262076 : #i94535#
2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class
2008-10-07 09:43:21 +0200 oj r262074 : moved to formula
2008-10-07 09:41:51 +0200 oj r262073 : new images
2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula
2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula
2008-10-02 08:08:54 +0200 oj r262023 : #i94535#
2008-10-02 08:06:28 +0200 oj r262022 : #i94535#
2008-10-02 08:05:52 +0200 oj r262021 : #i94535#
2008-10-01 17:15:29 +0200 oj r262014 : #i94535#
2008-10-01 17:12:40 +0200 oj r262013 : new module formula
2008-10-01 17:04:55 +0200 oj r262012 : #i94535#
2008-10-01 16:49:03 +0200 oj r262010 : #i94535#
2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
|
|
|
const formula::FormulaGrammar::AddressConvention eConv = pDocP->GetAddressConvention();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2013-07-16 12:51:47 +02:00
|
|
|
if ( pRefInputEdit == pEdCopyArea)
|
2013-08-29 20:44:22 +01:00
|
|
|
aRefStr = rRef.aStart.Format(SCA_ABS_3D, pDocP, eConv);
|
2013-07-16 12:51:47 +02:00
|
|
|
else if ( pRefInputEdit == pEdFilterArea)
|
2013-08-29 20:44:22 +01:00
|
|
|
aRefStr = rRef.Format(SCR_ABS_3D, pDocP, eConv);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
pRefInputEdit->SetRefString( aRefStr );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScSpecialFilterDlg::SetActive()
|
|
|
|
{
|
|
|
|
if ( bRefInputMode )
|
|
|
|
{
|
2013-07-16 12:51:47 +02:00
|
|
|
if ( pRefInputEdit == pEdCopyArea )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-07-16 12:51:47 +02:00
|
|
|
pEdCopyArea->GrabFocus();
|
|
|
|
if ( pEdCopyArea->GetModifyHdl().IsSet() )
|
2015-04-30 10:20:00 +02:00
|
|
|
((Link<>&)pEdCopyArea->GetModifyHdl()).Call( pEdCopyArea );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2013-07-16 12:51:47 +02:00
|
|
|
else if ( pRefInputEdit == pEdFilterArea )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-07-16 12:51:47 +02:00
|
|
|
pEdFilterArea->GrabFocus();
|
|
|
|
FilterAreaModHdl( pEdFilterArea );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
GrabFocus();
|
|
|
|
|
|
|
|
RefInputDone();
|
|
|
|
}
|
|
|
|
|
|
|
|
ScQueryItem* ScSpecialFilterDlg::GetOutputItem( const ScQueryParam& rParam,
|
|
|
|
const ScRange& rSource )
|
|
|
|
{
|
|
|
|
if ( pOutItem ) DELETEZ( pOutItem );
|
|
|
|
pOutItem = new ScQueryItem( nWhichQuery, &rParam );
|
|
|
|
pOutItem->SetAdvancedQuerySource( &rSource );
|
|
|
|
|
|
|
|
return pOutItem;
|
|
|
|
}
|
|
|
|
|
2014-02-13 15:28:23 +02:00
|
|
|
bool ScSpecialFilterDlg::IsRefInputMode() const
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
return bRefInputMode;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Handler:
|
2014-02-25 19:58:48 +01:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn )
|
|
|
|
{
|
2011-05-21 15:04:26 +02:00
|
|
|
OSL_ENSURE( pDoc && pViewData, "Document or ViewData not found. :-/" );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2013-07-16 12:51:47 +02:00
|
|
|
if ( (pBtn == pBtnOk) && pDoc && pViewData )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-10-07 14:26:21 +02:00
|
|
|
OUString theCopyStr( pEdCopyArea->GetText() );
|
|
|
|
OUString theAreaStr( pEdFilterArea->GetText() );
|
2000-09-18 16:07:07 +00:00
|
|
|
ScQueryParam theOutParam( theQueryData );
|
|
|
|
ScAddress theAdrCopy;
|
2014-04-23 11:08:48 +02:00
|
|
|
bool bEditInputOk = true;
|
|
|
|
bool bQueryOk = false;
|
2000-09-18 16:07:07 +00:00
|
|
|
ScRange theFilterArea;
|
CWS-TOOLING: integrate CWS frmdlg
2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05
2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF:
Add GAMMA, CHISQDIST, CHISQINV.
Make the 'cumulative' parameter of GAMMADIST optional.
Adapt the domain of CHIDIST to allow negative x.
Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV.
Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and
ODFF if omitted, for backwards compatibility.
2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37)
2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula
2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula
2008-12-12 13:22:00 +0100 msc r265413 : #i97089#
2008-12-12 13:20:25 +0100 msc r265412 : #i97089#
2008-12-12 12:35:12 +0100 msc r265406 : #i97089#
2008-12-12 12:34:16 +0100 msc r265405 : #i97089#
2008-12-12 12:33:05 +0100 msc r265404 : #i97089#
2008-12-12 12:31:11 +0100 msc r265403 : #i97089#
2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG
2008-12-08 11:50:17 +0100 oj r264980 : some small changes
2008-12-05 12:57:57 +0100 oj r264902 : eof changed
2008-12-05 12:56:46 +0100 oj r264901 : eof changed
2008-12-05 12:28:47 +0100 oj r264899 : wrong var used
2008-12-05 10:08:57 +0100 oj r264890 : token order reversed
2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage
2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id
2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button
2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button
2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends
2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends
2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends
2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set
2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category
2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids
2008-12-01 14:36:43 +0100 oj r264604 : use temp var
2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula
2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula
2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc
2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select
2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void
2008-11-28 11:16:48 +0100 oj r264532 : add help ids
2008-11-28 10:16:56 +0100 oj r264529 : set help id
2008-11-28 10:16:43 +0100 oj r264528 : set help id
2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes
2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug
2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them
2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code
2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code
2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline
2008-11-21 12:35:27 +0100 oj r264124 : hold symbols
2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost
2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove
2008-11-19 20:37:41 +0100 oj r264021 : removed unused var
2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token
2008-11-19 10:59:47 +0100 oj r263967 : deleted
2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files
2008-11-18 15:27:36 +0100 oj r263777 : unused para removed
2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg
2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting
2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef
2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling
2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file
2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula
2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction
2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35
2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35
2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35
2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35
2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35
2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35
2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35
2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35
2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35
2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35
2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved
2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target
2008-10-07 10:08:39 +0200 oj r262077 : copy
2008-10-07 09:45:31 +0200 oj r262076 : #i94535#
2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class
2008-10-07 09:43:21 +0200 oj r262074 : moved to formula
2008-10-07 09:41:51 +0200 oj r262073 : new images
2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula
2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula
2008-10-02 08:08:54 +0200 oj r262023 : #i94535#
2008-10-02 08:06:28 +0200 oj r262022 : #i94535#
2008-10-02 08:05:52 +0200 oj r262021 : #i94535#
2008-10-01 17:15:29 +0200 oj r262014 : #i94535#
2008-10-01 17:12:40 +0200 oj r262013 : new module formula
2008-10-01 17:04:55 +0200 oj r262012 : #i94535#
2008-10-01 16:49:03 +0200 oj r262010 : #i94535#
2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
|
|
|
const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2013-07-16 12:51:47 +02:00
|
|
|
if ( pBtnCopyResult->IsChecked() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-10-07 14:26:21 +02:00
|
|
|
sal_Int32 nColonPos = theCopyStr.indexOf( ':' );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2013-10-07 14:26:21 +02:00
|
|
|
if ( -1 != nColonPos )
|
|
|
|
theCopyStr = theCopyStr.copy( 0, nColonPos );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2011-01-17 13:20:22 +01:00
|
|
|
sal_uInt16 nResult = theAdrCopy.Parse( theCopyStr, pDoc, eConv );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( SCA_VALID != (nResult & SCA_VALID) )
|
|
|
|
{
|
2013-07-17 23:30:51 +01:00
|
|
|
if (!pExpander->get_expanded())
|
|
|
|
pExpander->set_expanded(true);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
ERRORBOX( STR_INVALID_TABREF );
|
2013-07-16 12:51:47 +02:00
|
|
|
pEdCopyArea->GrabFocus();
|
2011-03-10 16:55:21 -05:00
|
|
|
bEditInputOk = false;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( bEditInputOk )
|
|
|
|
{
|
2011-01-17 13:20:22 +01:00
|
|
|
sal_uInt16 nResult = ScRange().Parse( theAreaStr, pDoc, eConv );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( SCA_VALID != (nResult & SCA_VALID) )
|
|
|
|
{
|
|
|
|
ERRORBOX( STR_INVALID_TABREF );
|
2013-07-16 12:51:47 +02:00
|
|
|
pEdFilterArea->GrabFocus();
|
2011-03-10 16:55:21 -05:00
|
|
|
bEditInputOk = false;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( bEditInputOk )
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* Alle Edit-Felder enthalten gueltige Bereiche.
|
|
|
|
* Nun wird versucht aus dem Filterbereich
|
|
|
|
* ein ScQueryParam zu erzeugen:
|
|
|
|
*/
|
|
|
|
|
2011-01-17 13:20:22 +01:00
|
|
|
sal_uInt16 nResult = theFilterArea.Parse( theAreaStr, pDoc, eConv );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( SCA_VALID == (nResult & SCA_VALID) )
|
|
|
|
{
|
|
|
|
ScAddress& rStart = theFilterArea.aStart;
|
|
|
|
ScAddress& rEnd = theFilterArea.aEnd;
|
|
|
|
|
2013-07-16 12:51:47 +02:00
|
|
|
if ( pBtnCopyResult->IsChecked() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2011-03-10 16:55:21 -05:00
|
|
|
theOutParam.bInplace = false;
|
2000-09-18 16:07:07 +00:00
|
|
|
theOutParam.nDestTab = theAdrCopy.Tab();
|
|
|
|
theOutParam.nDestCol = theAdrCopy.Col();
|
|
|
|
theOutParam.nDestRow = theAdrCopy.Row();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2011-08-29 22:49:51 -04:00
|
|
|
theOutParam.bInplace = true;
|
2004-06-04 10:21:33 +00:00
|
|
|
theOutParam.nDestTab = 0;
|
|
|
|
theOutParam.nDestCol = 0;
|
2000-09-18 16:07:07 +00:00
|
|
|
theOutParam.nDestRow = 0;
|
|
|
|
}
|
|
|
|
|
2013-07-16 12:51:47 +02:00
|
|
|
theOutParam.bHasHeader = pBtnHeader->IsChecked();
|
2011-08-29 22:49:51 -04:00
|
|
|
theOutParam.bByRow = true;
|
2013-07-16 12:51:47 +02:00
|
|
|
theOutParam.bCaseSens = pBtnCase->IsChecked();
|
|
|
|
theOutParam.bRegExp = pBtnRegExp->IsChecked();
|
|
|
|
theOutParam.bDuplicate = !pBtnUnique->IsChecked();
|
|
|
|
theOutParam.bDestPers = pBtnDestPers->IsChecked();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
bQueryOk =
|
|
|
|
pDoc->CreateQueryParam( rStart.Col(),
|
|
|
|
rStart.Row(),
|
|
|
|
rEnd.Col(),
|
|
|
|
rEnd.Row(),
|
|
|
|
rStart.Tab(),
|
|
|
|
theOutParam );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( bQueryOk )
|
|
|
|
{
|
2011-03-10 16:55:21 -05:00
|
|
|
SetDispatcherLock( false );
|
2000-09-18 16:07:07 +00:00
|
|
|
SwitchToDocument();
|
2000-09-22 17:57:10 +00:00
|
|
|
GetBindings().GetDispatcher()->Execute( FID_FILTER_OK,
|
2014-10-11 16:01:26 +02:00
|
|
|
SfxCallMode::SLOT | SfxCallMode::RECORD,
|
2000-09-18 16:07:07 +00:00
|
|
|
GetOutputItem( theOutParam, theFilterArea ), 0L, 0L );
|
|
|
|
Close();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ERRORBOX( STR_INVALID_QUERYAREA );
|
2013-07-16 12:51:47 +02:00
|
|
|
pEdFilterArea->GrabFocus();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
2013-07-16 12:51:47 +02:00
|
|
|
else if ( pBtn == pBtnCancel )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
Close();
|
|
|
|
}
|
2003-12-17 18:55:09 +00:00
|
|
|
return 0;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2015-05-05 09:59:27 +02:00
|
|
|
IMPL_LINK_TYPED( ScSpecialFilterDlg, TimeOutHdl, Idle*, _pIdle, void )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
// alle 50ms nachschauen, ob RefInputMode noch stimmt
|
|
|
|
|
2014-11-18 15:11:29 +00:00
|
|
|
if( (_pIdle == pIdle) && IsActive() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-07-16 12:51:47 +02:00
|
|
|
if( pEdCopyArea->HasFocus() || pRbCopyArea->HasFocus() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-07-16 12:51:47 +02:00
|
|
|
pRefInputEdit = pEdCopyArea;
|
2011-08-29 22:49:51 -04:00
|
|
|
bRefInputMode = true;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2013-07-16 12:51:47 +02:00
|
|
|
else if( pEdFilterArea->HasFocus() || pRbFilterArea->HasFocus() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-07-16 12:51:47 +02:00
|
|
|
pRefInputEdit = pEdFilterArea;
|
2011-08-29 22:49:51 -04:00
|
|
|
bRefInputMode = true;
|
2002-03-13 10:45:16 +00:00
|
|
|
}
|
|
|
|
else if( bRefInputMode )
|
|
|
|
{
|
|
|
|
pRefInputEdit = NULL;
|
2011-03-10 16:55:21 -05:00
|
|
|
bRefInputMode = false;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-11-18 15:11:29 +00:00
|
|
|
pIdle->Start();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
IMPL_LINK( ScSpecialFilterDlg, FilterAreaSelHdl, ListBox*, pLb )
|
|
|
|
{
|
2013-07-16 12:51:47 +02:00
|
|
|
if ( pLb == pLbFilterArea )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-10-07 14:26:21 +02:00
|
|
|
OUString aString;
|
2013-07-16 12:51:47 +02:00
|
|
|
sal_uInt16 nSelPos = pLbFilterArea->GetSelectEntryPos();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( nSelPos > 0 )
|
2015-03-28 19:06:09 +01:00
|
|
|
aString = *static_cast<OUString*>(pLbFilterArea->GetEntryData( nSelPos ));
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2013-07-16 12:51:47 +02:00
|
|
|
pEdFilterArea->SetText( aString );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2003-12-17 18:55:09 +00:00
|
|
|
return 0;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
CWS-TOOLING: integrate CWS frmdlg
2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05
2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF:
Add GAMMA, CHISQDIST, CHISQINV.
Make the 'cumulative' parameter of GAMMADIST optional.
Adapt the domain of CHIDIST to allow negative x.
Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV.
Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and
ODFF if omitted, for backwards compatibility.
2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37)
2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula
2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula
2008-12-12 13:22:00 +0100 msc r265413 : #i97089#
2008-12-12 13:20:25 +0100 msc r265412 : #i97089#
2008-12-12 12:35:12 +0100 msc r265406 : #i97089#
2008-12-12 12:34:16 +0100 msc r265405 : #i97089#
2008-12-12 12:33:05 +0100 msc r265404 : #i97089#
2008-12-12 12:31:11 +0100 msc r265403 : #i97089#
2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG
2008-12-08 11:50:17 +0100 oj r264980 : some small changes
2008-12-05 12:57:57 +0100 oj r264902 : eof changed
2008-12-05 12:56:46 +0100 oj r264901 : eof changed
2008-12-05 12:28:47 +0100 oj r264899 : wrong var used
2008-12-05 10:08:57 +0100 oj r264890 : token order reversed
2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage
2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id
2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button
2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button
2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends
2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends
2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends
2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set
2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category
2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids
2008-12-01 14:36:43 +0100 oj r264604 : use temp var
2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula
2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula
2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc
2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select
2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void
2008-11-28 11:16:48 +0100 oj r264532 : add help ids
2008-11-28 10:16:56 +0100 oj r264529 : set help id
2008-11-28 10:16:43 +0100 oj r264528 : set help id
2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes
2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug
2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them
2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code
2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code
2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline
2008-11-21 12:35:27 +0100 oj r264124 : hold symbols
2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost
2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove
2008-11-19 20:37:41 +0100 oj r264021 : removed unused var
2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token
2008-11-19 10:59:47 +0100 oj r263967 : deleted
2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files
2008-11-18 15:27:36 +0100 oj r263777 : unused para removed
2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg
2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting
2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef
2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling
2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file
2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula
2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction
2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35
2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35
2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35
2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35
2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35
2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35
2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35
2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35
2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35
2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35
2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved
2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target
2008-10-07 10:08:39 +0200 oj r262077 : copy
2008-10-07 09:45:31 +0200 oj r262076 : #i94535#
2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class
2008-10-07 09:43:21 +0200 oj r262074 : moved to formula
2008-10-07 09:41:51 +0200 oj r262073 : new images
2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula
2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula
2008-10-02 08:08:54 +0200 oj r262023 : #i94535#
2008-10-02 08:06:28 +0200 oj r262022 : #i94535#
2008-10-02 08:05:52 +0200 oj r262021 : #i94535#
2008-10-01 17:15:29 +0200 oj r262014 : #i94535#
2008-10-01 17:12:40 +0200 oj r262013 : new module formula
2008-10-01 17:04:55 +0200 oj r262012 : #i94535#
2008-10-01 16:49:03 +0200 oj r262010 : #i94535#
2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
|
|
|
IMPL_LINK( ScSpecialFilterDlg, FilterAreaModHdl, formula::RefEdit*, pEd )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-07-16 12:51:47 +02:00
|
|
|
if ( pEd == pEdFilterArea )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
if ( pDoc && pViewData )
|
|
|
|
{
|
2013-10-07 14:26:21 +02:00
|
|
|
OUString theCurAreaStr = pEd->GetText();
|
2011-01-17 13:20:22 +01:00
|
|
|
sal_uInt16 nResult = ScRange().Parse( theCurAreaStr, pDoc );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( SCA_VALID == (nResult & SCA_VALID) )
|
|
|
|
{
|
2014-04-23 11:08:48 +02:00
|
|
|
bool bFound = false;
|
2011-01-17 13:20:22 +01:00
|
|
|
sal_uInt16 i = 0;
|
2013-07-16 12:51:47 +02:00
|
|
|
sal_uInt16 nCount = pLbFilterArea->GetEntryCount();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
for ( i=1; i<nCount && !bFound; i++ )
|
|
|
|
{
|
2015-03-28 19:06:09 +01:00
|
|
|
OUString* pStr = static_cast<OUString*>(pLbFilterArea->GetEntryData( i ));
|
2000-09-18 16:07:07 +00:00
|
|
|
bFound = (theCurAreaStr == *pStr);
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( bFound )
|
2013-07-16 12:51:47 +02:00
|
|
|
pLbFilterArea->SelectEntryPos( --i );
|
2000-09-18 16:07:07 +00:00
|
|
|
else
|
2013-07-16 12:51:47 +02:00
|
|
|
pLbFilterArea->SelectEntryPos( 0 );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
2013-07-16 12:51:47 +02:00
|
|
|
pLbFilterArea->SelectEntryPos( 0 );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2003-12-17 18:55:09 +00:00
|
|
|
return 0;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2010-10-12 15:59:00 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|