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>
|
|
|
|
|
|
|
|
#include "tabvwsh.hxx"
|
|
|
|
#include "uiitems.hxx"
|
2011-05-13 23:11:42 -04:00
|
|
|
#include "dbdata.hxx"
|
2000-09-18 16:07:07 +00:00
|
|
|
#include "rangenam.hxx"
|
|
|
|
#include "rangeutl.hxx"
|
|
|
|
#include "reffact.hxx"
|
|
|
|
#include "document.hxx"
|
|
|
|
#include "scresid.hxx"
|
|
|
|
|
|
|
|
#include "globstr.hrc"
|
2013-10-22 15:58:57 +03:00
|
|
|
#include "sc.hrc"
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
#include "consdlg.hxx"
|
|
|
|
#include <vcl/msgbox.hxx>
|
|
|
|
|
2015-05-28 21:35:43 +01:00
|
|
|
#define INFOBOX(id) ScopedVclPtr<InfoBox>::Create(this, ScGlobal::GetRscString(id))->Execute()
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
class ScAreaData
|
|
|
|
{
|
|
|
|
public:
|
2014-04-04 11:16:44 +01:00
|
|
|
ScAreaData()
|
|
|
|
: bIsDbArea(false)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
~ScAreaData() {}
|
|
|
|
|
2014-04-23 11:08:48 +02:00
|
|
|
void Set( const OUString& rName, const OUString& rArea, bool bDb )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
aStrName = rName;
|
|
|
|
aStrArea = rArea;
|
|
|
|
bIsDbArea = bDb;
|
|
|
|
}
|
|
|
|
|
2013-10-07 14:26:21 +02:00
|
|
|
OUString aStrName;
|
|
|
|
OUString aStrArea;
|
2014-04-23 11:08:48 +02:00
|
|
|
bool bIsDbArea;
|
2000-09-18 16:07:07 +00:00
|
|
|
};
|
|
|
|
|
2014-09-23 11:20:40 +02:00
|
|
|
ScConsolidateDlg::ScConsolidateDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent,
|
2000-09-18 16:07:07 +00:00
|
|
|
const SfxItemSet& rArgSet )
|
|
|
|
|
2013-07-22 16:57:26 +02:00
|
|
|
: ScAnyRefDlg ( pB, pCW, pParent, "ConsolidateDialog" , "modules/scalc/ui/consolidatedialog.ui" ),
|
2000-09-18 16:07:07 +00:00
|
|
|
aStrUndefined ( ScResId( SCSTR_UNDEFINED ) ),
|
2014-10-27 14:18:17 +02:00
|
|
|
theConsData ( static_cast<const ScConsolidateItem&>(
|
2000-09-18 16:07:07 +00:00
|
|
|
rArgSet.Get( rArgSet.GetPool()->
|
|
|
|
GetWhich( SID_CONSOLIDATE ) )
|
|
|
|
).GetData() ),
|
2014-10-27 14:18:17 +02:00
|
|
|
rViewData ( static_cast<ScTabViewShell*>(SfxViewShell::Current())->
|
2000-09-18 16:07:07 +00:00
|
|
|
GetViewData() ),
|
2014-10-27 14:18:17 +02:00
|
|
|
pDoc ( static_cast<ScTabViewShell*>(SfxViewShell::Current())->
|
2014-06-18 12:14:29 +02:00
|
|
|
GetViewData().GetDocument() ),
|
2000-09-18 16:07:07 +00:00
|
|
|
pRangeUtil ( new ScRangeUtil ),
|
|
|
|
pAreaData ( NULL ),
|
|
|
|
nAreaDataCount ( 0 ),
|
2014-04-29 11:05:59 +01:00
|
|
|
nWhichCons ( rArgSet.GetPool()->GetWhich( SID_CONSOLIDATE ) ),
|
|
|
|
bDlgLostFocus ( false )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-07-22 16:57:26 +02:00
|
|
|
get(pLbFunc,"func");
|
|
|
|
get(pLbConsAreas,"consareas");
|
|
|
|
|
|
|
|
get(pLbDataArea,"lbdataarea");
|
|
|
|
get(pEdDataArea,"eddataarea");
|
|
|
|
get(pRbDataArea,"rbdataarea");
|
|
|
|
|
2013-10-01 18:28:25 +02:00
|
|
|
pRefInputEdit = pEdDataArea;
|
|
|
|
|
2013-07-22 16:57:26 +02:00
|
|
|
get(pLbDestArea,"lbdestarea");
|
|
|
|
get(pEdDestArea,"eddestarea");
|
|
|
|
get(pRbDestArea,"rbdestarea");
|
|
|
|
|
|
|
|
get(pExpander,"more");
|
|
|
|
get(pBtnByRow,"byrow");
|
|
|
|
get(pBtnByCol,"bycol");
|
|
|
|
get(pBtnRefs,"refs");
|
|
|
|
|
|
|
|
get(pBtnOk,"ok");
|
|
|
|
get(pBtnCancel,"cancel");
|
|
|
|
get(pBtnAdd,"add");
|
|
|
|
get(pBtnRemove,"delete");
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
Init();
|
|
|
|
}
|
|
|
|
|
2010-12-11 23:25:30 +01:00
|
|
|
ScConsolidateDlg::~ScConsolidateDlg()
|
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 ScConsolidateDlg::dispose()
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
delete [] pAreaData;
|
|
|
|
delete pRangeUtil;
|
2015-03-09 14:29:30 +02:00
|
|
|
pLbFunc.clear();
|
|
|
|
pLbConsAreas.clear();
|
|
|
|
pLbDataArea.clear();
|
|
|
|
pEdDataArea.clear();
|
|
|
|
pRbDataArea.clear();
|
|
|
|
pLbDestArea.clear();
|
|
|
|
pEdDestArea.clear();
|
|
|
|
pRbDestArea.clear();
|
|
|
|
pExpander.clear();
|
|
|
|
pBtnByRow.clear();
|
|
|
|
pBtnByCol.clear();
|
|
|
|
pBtnRefs.clear();
|
|
|
|
pBtnOk.clear();
|
|
|
|
pBtnCancel.clear();
|
|
|
|
pBtnAdd.clear();
|
|
|
|
pBtnRemove.clear();
|
|
|
|
pRefInputEdit.clear();
|
2015-01-26 13:16:18 +02:00
|
|
|
ScAnyRefDlg::dispose();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void ScConsolidateDlg::Init()
|
|
|
|
{
|
2014-06-18 12:14:29 +02:00
|
|
|
OSL_ENSURE( pDoc && pRangeUtil, "Error in Ctor" );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2013-10-07 14:26:21 +02:00
|
|
|
OUString aStr;
|
2011-01-17 13:20:22 +01:00
|
|
|
sal_uInt16 i=0;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2013-07-22 16:57:26 +02:00
|
|
|
pRbDataArea->SetReferences(this, pEdDataArea);
|
2013-07-24 20:08:49 +01:00
|
|
|
pEdDataArea->SetReferences(this, get<FixedText>("ftdataarea"));
|
2013-07-22 16:57:26 +02:00
|
|
|
pRbDestArea->SetReferences(this, pEdDestArea);
|
2013-07-24 20:08:49 +01:00
|
|
|
pEdDestArea->SetReferences(this, get<FixedText>("ftdestarea"));
|
2013-07-22 16:57:26 +02:00
|
|
|
|
|
|
|
pEdDataArea ->SetGetFocusHdl( LINK( this, ScConsolidateDlg, GetFocusHdl ) );
|
|
|
|
pEdDestArea ->SetGetFocusHdl( LINK( this, ScConsolidateDlg, GetFocusHdl ) );
|
|
|
|
pLbDataArea ->SetGetFocusHdl( LINK( this, ScConsolidateDlg, GetFocusHdl ) );
|
|
|
|
pLbDestArea ->SetGetFocusHdl( LINK( this, ScConsolidateDlg, GetFocusHdl ) );
|
|
|
|
pEdDataArea ->SetModifyHdl ( LINK( this, ScConsolidateDlg, ModifyHdl ) );
|
|
|
|
pEdDestArea ->SetModifyHdl ( LINK( this, ScConsolidateDlg, ModifyHdl ) );
|
|
|
|
pLbConsAreas->SetSelectHdl ( LINK( this, ScConsolidateDlg, SelectHdl ) );
|
|
|
|
pLbDataArea ->SetSelectHdl ( LINK( this, ScConsolidateDlg, SelectHdl ) );
|
|
|
|
pLbDestArea ->SetSelectHdl ( LINK( this, ScConsolidateDlg, SelectHdl ) );
|
|
|
|
pBtnOk ->SetClickHdl ( LINK( this, ScConsolidateDlg, OkHdl ) );
|
|
|
|
pBtnCancel ->SetClickHdl ( LINK( this, ScConsolidateDlg, ClickHdl ) );
|
|
|
|
pBtnAdd ->SetClickHdl ( LINK( this, ScConsolidateDlg, ClickHdl ) );
|
|
|
|
pBtnRemove ->SetClickHdl ( LINK( this, ScConsolidateDlg, ClickHdl ) );
|
|
|
|
|
|
|
|
pBtnAdd->Disable();
|
|
|
|
pBtnRemove->Disable();
|
|
|
|
|
|
|
|
pBtnByRow->Check( theConsData.bByRow );
|
|
|
|
pBtnByCol->Check( theConsData.bByCol );
|
|
|
|
pBtnRefs->Check( theConsData.bReferenceData );
|
|
|
|
|
|
|
|
pLbFunc->SelectEntryPos( FuncToLbPos( theConsData.eFunction ) );
|
|
|
|
|
|
|
|
// Hack: pLbConsAreas used to be MultiLB. We don't have VCL builder equivalent
|
|
|
|
// of it yet. So enable selecting multiple items here
|
2014-02-21 12:53:51 +01:00
|
|
|
pLbConsAreas->EnableMultiSelection( true );
|
2013-07-22 16:57:26 +02:00
|
|
|
|
|
|
|
pLbConsAreas->set_width_request(pLbConsAreas->approximate_char_width() * 16);
|
|
|
|
pLbConsAreas->SetDropDownLineCount(5);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-02-07 15:39:38 +01:00
|
|
|
// read consolidation areas
|
2013-07-22 16:57:26 +02:00
|
|
|
pLbConsAreas->Clear();
|
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
|
|
|
for ( i=0; i<theConsData.nDataAreaCount; i++ )
|
|
|
|
{
|
2002-09-24 17:34:55 +00:00
|
|
|
const ScArea& rArea = *(theConsData.ppDataAreas[i] );
|
|
|
|
if ( rArea.nTab < pDoc->GetTableCount() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-08-29 20:44:22 +01:00
|
|
|
aStr = ScRange( rArea.nColStart, rArea.nRowStart, rArea.nTab,
|
|
|
|
rArea.nColEnd, rArea.nRowEnd, rArea.nTab ).Format(
|
2008-05-14 08:54:29 +00:00
|
|
|
SCR_ABS_3D, pDoc, eConv );
|
2013-07-22 16:57:26 +02:00
|
|
|
pLbConsAreas->InsertEntry( aStr );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( theConsData.nTab < pDoc->GetTableCount() )
|
2002-09-24 17:34:55 +00:00
|
|
|
{
|
2013-08-29 20:44:22 +01:00
|
|
|
aStr = ScAddress( theConsData.nCol, theConsData.nRow, theConsData.nTab
|
|
|
|
).Format( SCA_ABS_3D, pDoc, eConv );
|
2013-07-22 16:57:26 +02:00
|
|
|
pEdDestArea->SetText( aStr );
|
2002-09-24 17:34:55 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
else
|
2013-08-29 20:44:22 +01:00
|
|
|
pEdDestArea->SetText(OUString());
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-02-07 15:39:38 +01:00
|
|
|
// Use the ScAreaData helper class to save those range names from the
|
|
|
|
// RangeNames and database ranges that appear in the ListBoxes.
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
ScRangeName* pRangeNames = pDoc->GetRangeName();
|
|
|
|
ScDBCollection* pDbNames = pDoc->GetDBCollection();
|
2011-05-12 16:26:26 -04:00
|
|
|
size_t nRangeCount = pRangeNames ? pRangeNames->size() : 0;
|
|
|
|
size_t nDbCount = pDbNames ? pDbNames->getNamedDBs().size() : 0;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
nAreaDataCount = nRangeCount+nDbCount;
|
|
|
|
pAreaData = NULL;
|
|
|
|
|
|
|
|
if ( nAreaDataCount > 0 )
|
|
|
|
{
|
|
|
|
pAreaData = new ScAreaData[nAreaDataCount];
|
|
|
|
|
2013-10-03 10:52:29 +02:00
|
|
|
OUString aStrName;
|
2011-01-17 13:20:22 +01:00
|
|
|
sal_uInt16 nAt = 0;
|
2000-09-18 16:07:07 +00:00
|
|
|
ScRange aRange;
|
|
|
|
ScAreaNameIterator aIter( pDoc );
|
|
|
|
while ( aIter.Next( aStrName, aRange ) )
|
|
|
|
{
|
2013-10-07 14:26:21 +02:00
|
|
|
OUString aStrArea(aRange.Format(SCA_ABS_3D, pDoc, eConv));
|
2000-09-18 16:07:07 +00:00
|
|
|
pAreaData[nAt++].Set( aStrName, aStrArea, aIter.WasDBName() );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
FillAreaLists();
|
2013-07-22 16:57:26 +02:00
|
|
|
ModifyHdl( pEdDestArea );
|
|
|
|
pLbDataArea->SelectEntryPos( 0 );
|
2013-08-29 20:44:22 +01:00
|
|
|
pEdDataArea->SetText(OUString());
|
2013-07-22 16:57:26 +02:00
|
|
|
pEdDataArea->GrabFocus();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2013-07-22 16:57:26 +02:00
|
|
|
//aFlSep.SetStyle( aFlSep.GetStyle() | WB_VERT );
|
2001-05-23 16:54:32 +00:00
|
|
|
|
2014-02-07 15:39:38 +01:00
|
|
|
//@BugID 54702 enable/disable only in base class
|
2000-09-18 16:07:07 +00:00
|
|
|
//SFX_APPWINDOW->Enable();
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScConsolidateDlg::FillAreaLists()
|
|
|
|
{
|
2013-07-22 16:57:26 +02:00
|
|
|
pLbDataArea->Clear();
|
|
|
|
pLbDestArea->Clear();
|
|
|
|
pLbDataArea->InsertEntry( aStrUndefined );
|
|
|
|
pLbDestArea->InsertEntry( aStrUndefined );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( pRangeUtil && pAreaData && (nAreaDataCount > 0) )
|
|
|
|
{
|
2011-05-12 16:26:26 -04:00
|
|
|
for ( size_t i=0;
|
2013-10-07 14:26:21 +02:00
|
|
|
(i<nAreaDataCount) && (!pAreaData[i].aStrName.isEmpty());
|
2000-09-18 16:07:07 +00:00
|
|
|
i++ )
|
|
|
|
{
|
2013-07-22 16:57:26 +02:00
|
|
|
pLbDataArea->InsertEntry( pAreaData[i].aStrName, i+1 );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
// if ( !pAreaData[i].bIsDbArea )
|
2013-07-22 16:57:26 +02:00
|
|
|
pLbDestArea->InsertEntry( pAreaData[i].aStrName, i+1 );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-02-07 15:39:38 +01:00
|
|
|
// Handover of a range within a table that has been selected by the mouse.
|
|
|
|
// This range is then shown in the reference window as new selection.
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2007-02-27 12:00:57 +00:00
|
|
|
void ScConsolidateDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
if ( pRefInputEdit )
|
|
|
|
{
|
|
|
|
if ( rRef.aStart != rRef.aEnd )
|
|
|
|
RefInputStart( pRefInputEdit );
|
|
|
|
|
2013-10-07 14:26:21 +02:00
|
|
|
OUString aStr;
|
2014-02-07 15:39:38 +01:00
|
|
|
sal_uInt16 nFmt = SCR_ABS_3D; //!!! nCurTab is still missing
|
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
|
|
|
|
|
|
|
if ( rRef.aStart.Tab() != rRef.aEnd.Tab() )
|
|
|
|
nFmt |= SCA_TAB2_3D;
|
|
|
|
|
2013-07-22 16:57:26 +02:00
|
|
|
if ( pRefInputEdit == pEdDataArea)
|
2013-08-29 20:44:22 +01:00
|
|
|
aStr = rRef.Format(nFmt, pDocP, eConv);
|
2013-07-22 16:57:26 +02:00
|
|
|
else if ( pRefInputEdit == pEdDestArea )
|
2013-08-29 20:44:22 +01:00
|
|
|
aStr = rRef.aStart.Format(nFmt, pDocP, eConv);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
pRefInputEdit->SetRefString( aStr );
|
2013-09-07 12:22:26 +02:00
|
|
|
ModifyHdl( pRefInputEdit );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-02-21 12:53:51 +01:00
|
|
|
bool ScConsolidateDlg::Close()
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
return DoClose( ScConsolidateDlgWrapper::GetChildWindowId() );
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScConsolidateDlg::SetActive()
|
|
|
|
{
|
|
|
|
if ( bDlgLostFocus )
|
|
|
|
{
|
2011-03-10 16:55:21 -05:00
|
|
|
bDlgLostFocus = false;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( pRefInputEdit )
|
|
|
|
{
|
|
|
|
pRefInputEdit->GrabFocus();
|
|
|
|
ModifyHdl( pRefInputEdit );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
GrabFocus();
|
|
|
|
|
|
|
|
RefInputDone();
|
|
|
|
}
|
|
|
|
|
2010-12-11 23:25:30 +01:00
|
|
|
void ScConsolidateDlg::Deactivate()
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-02-14 14:46:22 +02:00
|
|
|
bDlgLostFocus = true;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2014-02-14 14:46:22 +02:00
|
|
|
bool ScConsolidateDlg::VerifyEdit( formula::RefEdit* pEd )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-06-18 12:14:29 +02:00
|
|
|
if ( !pRangeUtil || !pDoc ||
|
2013-07-22 16:57:26 +02:00
|
|
|
((pEd != pEdDataArea) && (pEd != pEdDestArea)) )
|
2011-03-10 16:55:21 -05:00
|
|
|
return false;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-06-18 12:14:29 +02:00
|
|
|
SCTAB nTab = rViewData.GetTabNo();
|
2014-02-14 14:46:22 +02:00
|
|
|
bool bEditOk = false;
|
2013-10-03 10:52:29 +02:00
|
|
|
OUString theCompleteStr;
|
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-22 16:57:26 +02:00
|
|
|
if ( pEd == pEdDataArea )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2015-04-29 15:57:22 +02:00
|
|
|
bEditOk = ScRangeUtil::IsAbsArea( pEd->GetText(), pDoc,
|
2008-05-14 08:54:29 +00:00
|
|
|
nTab, &theCompleteStr, NULL, NULL, eConv );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2013-07-22 16:57:26 +02:00
|
|
|
else if ( pEd == pEdDestArea )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-10-03 10:52:29 +02:00
|
|
|
OUString aPosStr;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2015-04-29 15:57:22 +02:00
|
|
|
ScRangeUtil::CutPosString( pEd->GetText(), aPosStr );
|
|
|
|
bEditOk = ScRangeUtil::IsAbsPos( aPosStr, pDoc,
|
2008-05-14 08:54:29 +00:00
|
|
|
nTab, &theCompleteStr, NULL, eConv );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if ( bEditOk )
|
|
|
|
pEd->SetText( theCompleteStr );
|
|
|
|
|
|
|
|
return bEditOk;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Handler:
|
|
|
|
|
|
|
|
IMPL_LINK( ScConsolidateDlg, GetFocusHdl, Control*, pCtr )
|
|
|
|
{
|
2015-06-08 16:27:31 +02:00
|
|
|
if ( pCtr ==static_cast<Control*>(pEdDataArea) ||
|
|
|
|
pCtr ==static_cast<Control*>(pEdDestArea))
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-10-27 14:18:17 +02:00
|
|
|
pRefInputEdit = static_cast<formula::RefEdit*>(pCtr);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2015-06-08 16:27:31 +02:00
|
|
|
else if(pCtr ==static_cast<Control*>(pLbDataArea) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-07-22 16:57:26 +02:00
|
|
|
pRefInputEdit = pEdDataArea;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2015-06-08 16:27:31 +02:00
|
|
|
else if(pCtr ==static_cast<Control*>(pLbDestArea) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-07-22 16:57:26 +02:00
|
|
|
pRefInputEdit = pEdDestArea;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2012-03-01 18:00:32 +01:00
|
|
|
IMPL_LINK_NOARG(ScConsolidateDlg, OkHdl)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-07-22 16:57:26 +02:00
|
|
|
sal_uInt16 nDataAreaCount = pLbConsAreas->GetEntryCount();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( nDataAreaCount > 0 )
|
|
|
|
{
|
2004-06-04 10:19:44 +00:00
|
|
|
ScRefAddress aDestAddress;
|
2014-06-18 12:14:29 +02:00
|
|
|
SCTAB nTab = rViewData.GetTabNo();
|
2013-10-07 14:26:21 +02:00
|
|
|
OUString aDestPosStr( pEdDestArea->GetText() );
|
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
|
|
|
|
2015-04-29 15:57:22 +02:00
|
|
|
if ( ScRangeUtil::IsAbsPos( aDestPosStr, pDoc, nTab, NULL, &aDestAddress, eConv ) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
ScConsolidateParam theOutParam( theConsData );
|
|
|
|
ScArea** ppDataAreas = new ScArea*[nDataAreaCount];
|
|
|
|
ScArea* pArea;
|
2011-01-17 13:20:22 +01:00
|
|
|
sal_uInt16 i=0;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
for ( i=0; i<nDataAreaCount; i++ )
|
|
|
|
{
|
|
|
|
pArea = new ScArea;
|
2015-04-29 15:57:22 +02:00
|
|
|
ScRangeUtil::MakeArea( pLbConsAreas->GetEntry( i ),
|
2008-05-14 08:54:29 +00:00
|
|
|
*pArea, pDoc, nTab, eConv );
|
2000-09-18 16:07:07 +00:00
|
|
|
ppDataAreas[i] = pArea;
|
|
|
|
}
|
|
|
|
|
2004-06-04 10:19:44 +00:00
|
|
|
theOutParam.nCol = aDestAddress.Col();
|
|
|
|
theOutParam.nRow = aDestAddress.Row();
|
|
|
|
theOutParam.nTab = aDestAddress.Tab();
|
2013-07-22 16:57:26 +02:00
|
|
|
theOutParam.eFunction = LbPosToFunc( pLbFunc->GetSelectEntryPos() );
|
|
|
|
theOutParam.bByCol = pBtnByCol->IsChecked();
|
|
|
|
theOutParam.bByRow = pBtnByRow->IsChecked();
|
|
|
|
theOutParam.bReferenceData = pBtnRefs->IsChecked();
|
2000-09-18 16:07:07 +00:00
|
|
|
theOutParam.SetAreas( ppDataAreas, nDataAreaCount );
|
|
|
|
|
|
|
|
for ( i=0; i<nDataAreaCount; i++ )
|
|
|
|
delete ppDataAreas[i];
|
|
|
|
delete [] ppDataAreas;
|
|
|
|
|
|
|
|
ScConsolidateItem aOutItem( nWhichCons, &theOutParam );
|
|
|
|
|
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( SID_CONSOLIDATE,
|
2014-10-11 16:01:26 +02:00
|
|
|
SfxCallMode::SLOT | SfxCallMode::RECORD,
|
2000-09-18 16:07:07 +00:00
|
|
|
&aOutItem, 0L, 0L );
|
|
|
|
Close();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
INFOBOX( STR_INVALID_TABREF );
|
2013-07-22 16:57:26 +02:00
|
|
|
pEdDestArea->GrabFocus();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
2014-02-07 15:39:38 +01:00
|
|
|
Close(); // no area defined -> Cancel
|
2000-09-18 16:07:07 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
IMPL_LINK( ScConsolidateDlg, ClickHdl, PushButton*, pBtn )
|
|
|
|
{
|
2013-07-22 16:57:26 +02:00
|
|
|
if ( pBtn == pBtnCancel )
|
2000-09-18 16:07:07 +00:00
|
|
|
Close();
|
2013-07-22 16:57:26 +02:00
|
|
|
else if ( pBtn == pBtnAdd )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-07-22 16:57:26 +02:00
|
|
|
if ( !pEdDataArea->GetText().isEmpty() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-10-07 14:26:21 +02:00
|
|
|
OUString aNewEntry( pEdDataArea->GetText() );
|
2000-09-18 16:07:07 +00:00
|
|
|
ScArea** ppAreas = NULL;
|
2011-01-17 13:20:22 +01:00
|
|
|
sal_uInt16 nAreaCount = 0;
|
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
|
|
|
|
2015-04-29 15:57:22 +02:00
|
|
|
if ( ScRangeUtil::IsAbsTabArea( aNewEntry, pDoc, &ppAreas, &nAreaCount, true, eConv ) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-02-07 15:39:38 +01:00
|
|
|
// IsAbsTabArea() creates an array of ScArea pointers,
|
|
|
|
// which have been created dynamically as well.
|
|
|
|
// These objects need to be deleted here.
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2011-01-17 13:20:22 +01:00
|
|
|
for ( sal_uInt16 i=0; i<nAreaCount; i++ )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-10-07 14:26:21 +02:00
|
|
|
OUString aNewArea;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( ppAreas[i] )
|
|
|
|
{
|
2002-09-24 17:34:55 +00:00
|
|
|
const ScArea& rArea = *(ppAreas[i]);
|
2013-08-29 20:44:22 +01:00
|
|
|
aNewArea = ScRange( rArea.nColStart, rArea.nRowStart, rArea.nTab,
|
2002-09-24 17:34:55 +00:00
|
|
|
rArea.nColEnd, rArea.nRowEnd, rArea.nTab
|
2013-08-29 20:44:22 +01:00
|
|
|
).Format(SCR_ABS_3D, pDoc, eConv);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2013-07-22 16:57:26 +02:00
|
|
|
if ( pLbConsAreas->GetEntryPos( aNewArea )
|
2000-09-18 16:07:07 +00:00
|
|
|
== LISTBOX_ENTRY_NOTFOUND )
|
|
|
|
{
|
2013-07-22 16:57:26 +02:00
|
|
|
pLbConsAreas->InsertEntry( aNewArea );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
delete ppAreas[i];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
delete [] ppAreas;
|
|
|
|
}
|
2013-07-22 16:57:26 +02:00
|
|
|
else if ( VerifyEdit( pEdDataArea ) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-10-07 14:26:21 +02:00
|
|
|
OUString aNewArea( pEdDataArea->GetText() );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2013-07-22 16:57:26 +02:00
|
|
|
if ( pLbConsAreas->GetEntryPos( aNewArea ) == LISTBOX_ENTRY_NOTFOUND )
|
|
|
|
pLbConsAreas->InsertEntry( aNewArea );
|
2000-09-18 16:07:07 +00:00
|
|
|
else
|
|
|
|
INFOBOX( STR_AREA_ALREADY_INSERTED );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
INFOBOX( STR_INVALID_TABREF );
|
2013-07-22 16:57:26 +02:00
|
|
|
pEdDataArea->GrabFocus();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2013-07-22 16:57:26 +02:00
|
|
|
else if ( pBtn == pBtnRemove )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-07-22 16:57:26 +02:00
|
|
|
while ( pLbConsAreas->GetSelectEntryCount() )
|
|
|
|
pLbConsAreas->RemoveEntry( pLbConsAreas->GetSelectEntryPos() );
|
|
|
|
pBtnRemove->Disable();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
IMPL_LINK( ScConsolidateDlg, SelectHdl, ListBox*, pLb )
|
|
|
|
{
|
2013-07-22 16:57:26 +02:00
|
|
|
if ( pLb == pLbConsAreas )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-07-22 16:57:26 +02:00
|
|
|
if ( pLbConsAreas->GetSelectEntryCount() > 0 )
|
|
|
|
pBtnRemove->Enable();
|
2000-09-18 16:07:07 +00:00
|
|
|
else
|
2013-07-22 16:57:26 +02:00
|
|
|
pBtnRemove->Disable();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2013-07-22 16:57:26 +02:00
|
|
|
else if ( (pLb == pLbDataArea) || (pLb == pLbDestArea) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-07-22 16:57:26 +02:00
|
|
|
Edit* pEd = (pLb == pLbDataArea) ? pEdDataArea : pEdDestArea;
|
2011-01-17 13:20:22 +01:00
|
|
|
sal_uInt16 nSelPos = pLb->GetSelectEntryPos();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( pRangeUtil
|
|
|
|
&& (nSelPos > 0)
|
|
|
|
&& (nAreaDataCount > 0)
|
|
|
|
&& (pAreaData != NULL) )
|
|
|
|
{
|
2011-05-12 16:26:26 -04:00
|
|
|
if ( static_cast<size_t>(nSelPos) <= nAreaDataCount )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-10-03 10:52:29 +02:00
|
|
|
OUString aString( pAreaData[nSelPos-1].aStrArea );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2013-07-22 16:57:26 +02:00
|
|
|
if ( pLb == pLbDestArea )
|
2015-04-29 15:57:22 +02:00
|
|
|
ScRangeUtil::CutPosString( aString, aString );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
pEd->SetText( aString );
|
|
|
|
|
2013-07-22 16:57:26 +02:00
|
|
|
if ( pEd == pEdDataArea )
|
|
|
|
pBtnAdd->Enable();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2013-10-16 14:27:58 +02:00
|
|
|
pEd->SetText( EMPTY_OUSTRING );
|
2013-07-22 16:57:26 +02:00
|
|
|
if ( pEd == pEdDataArea )
|
|
|
|
pBtnAdd->Enable();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
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( ScConsolidateDlg, ModifyHdl, formula::RefEdit*, pEd )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-07-22 16:57:26 +02:00
|
|
|
if ( pEd == pEdDataArea )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-10-07 14:26:21 +02:00
|
|
|
OUString aAreaStr( pEd->GetText() );
|
|
|
|
if ( !aAreaStr.isEmpty() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-07-22 16:57:26 +02:00
|
|
|
pBtnAdd->Enable();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else
|
2013-07-22 16:57:26 +02:00
|
|
|
pBtnAdd->Disable();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2013-07-22 16:57:26 +02:00
|
|
|
else if ( pEd == pEdDestArea )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-07-22 16:57:26 +02:00
|
|
|
pLbDestArea->SelectEntryPos(0);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2014-02-07 15:39:38 +01:00
|
|
|
// TODO: generalize!
|
|
|
|
// Resource of the ListBox and these two conversion methods are also in
|
|
|
|
// tpsubt and everywhere, where StarCalc functions are selectable.
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2011-01-17 13:20:22 +01:00
|
|
|
ScSubTotalFunc ScConsolidateDlg::LbPosToFunc( sal_uInt16 nPos )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
switch ( nPos )
|
|
|
|
{
|
|
|
|
case 2: return SUBTOTAL_FUNC_AVE;
|
|
|
|
case 6: return SUBTOTAL_FUNC_CNT;
|
|
|
|
case 1: return SUBTOTAL_FUNC_CNT2;
|
|
|
|
case 3: return SUBTOTAL_FUNC_MAX;
|
|
|
|
case 4: return SUBTOTAL_FUNC_MIN;
|
|
|
|
case 5: return SUBTOTAL_FUNC_PROD;
|
|
|
|
case 7: return SUBTOTAL_FUNC_STD;
|
|
|
|
case 8: return SUBTOTAL_FUNC_STDP;
|
|
|
|
case 9: return SUBTOTAL_FUNC_VAR;
|
|
|
|
case 10: return SUBTOTAL_FUNC_VARP;
|
|
|
|
case 0:
|
|
|
|
default:
|
|
|
|
return SUBTOTAL_FUNC_SUM;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-01-17 13:20:22 +01:00
|
|
|
sal_uInt16 ScConsolidateDlg::FuncToLbPos( ScSubTotalFunc eFunc )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
switch ( eFunc )
|
|
|
|
{
|
|
|
|
case SUBTOTAL_FUNC_AVE: return 2;
|
|
|
|
case SUBTOTAL_FUNC_CNT: return 6;
|
|
|
|
case SUBTOTAL_FUNC_CNT2: return 1;
|
|
|
|
case SUBTOTAL_FUNC_MAX: return 3;
|
|
|
|
case SUBTOTAL_FUNC_MIN: return 4;
|
|
|
|
case SUBTOTAL_FUNC_PROD: return 5;
|
|
|
|
case SUBTOTAL_FUNC_STD: return 7;
|
|
|
|
case SUBTOTAL_FUNC_STDP: return 8;
|
|
|
|
case SUBTOTAL_FUNC_VAR: return 9;
|
|
|
|
case SUBTOTAL_FUNC_VARP: return 10;
|
|
|
|
case SUBTOTAL_FUNC_NONE:
|
|
|
|
case SUBTOTAL_FUNC_SUM:
|
|
|
|
default:
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-10-12 15:59:00 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|