2010-10-12 15:59:03 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2007-07-09 10:56:41 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 17:51:45 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2007-07-09 10:56:41 +00:00
|
|
|
*
|
2010-02-12 15:01:35 +01:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2007-07-09 10:56:41 +00:00
|
|
|
*
|
2008-04-10 17:51:45 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2007-07-09 10:56:41 +00:00
|
|
|
*
|
2008-04-10 17:51:45 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2007-07-09 10:56:41 +00:00
|
|
|
*
|
2008-04-10 17:51:45 +00:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2007-07-09 10:56:41 +00:00
|
|
|
*
|
2008-04-10 17:51:45 +00:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2007-07-09 10:56:41 +00:00
|
|
|
*
|
2008-04-10 17:51:45 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2007-07-09 10:56:41 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
#include "Condition.hxx"
|
|
|
|
#include "UITools.hxx"
|
|
|
|
#include "CondFormat.hxx"
|
|
|
|
#include "CondFormat.hrc"
|
|
|
|
#include "RptResId.hrc"
|
|
|
|
#include "ReportController.hxx"
|
|
|
|
#include "ModuleHelper.hxx"
|
|
|
|
#include "ColorChanger.hxx"
|
|
|
|
#include "RptResId.hrc"
|
|
|
|
#include "helpids.hrc"
|
|
|
|
#include "reportformula.hxx"
|
|
|
|
#include <com/sun/star/util/URL.hpp>
|
|
|
|
#include <com/sun/star/beans/PropertyValue.hpp>
|
|
|
|
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
|
|
|
|
#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
|
|
|
|
#include <com/sun/star/ui/XImageManager.hpp>
|
|
|
|
#include <com/sun/star/awt/FontDescriptor.hpp>
|
|
|
|
#include <com/sun/star/ui/ImageType.hpp>
|
|
|
|
|
|
|
|
#define ITEMID_COLOR
|
|
|
|
#define ITEMID_BRUSH
|
|
|
|
#include <svx/tbcontrl.hxx>
|
|
|
|
#include <svx/svxids.hrc>
|
|
|
|
#include <svx/xtable.hxx>
|
|
|
|
#include <svx/tbxcolorupdate.hxx>
|
|
|
|
#include <toolkit/helper/vclunohelper.hxx>
|
|
|
|
#include <svtools/imgdef.hxx>
|
2009-10-06 07:38:24 +02:00
|
|
|
#include <unotools/pathoptions.hxx>
|
2007-07-09 10:56:41 +00:00
|
|
|
#include <vcl/svapp.hxx>
|
|
|
|
#include <vcl/bmpacc.hxx>
|
|
|
|
#include <tools/diagnose_ex.h>
|
|
|
|
#include <rtl/ustrbuf.hxx>
|
|
|
|
|
|
|
|
namespace rptui
|
|
|
|
{
|
|
|
|
using namespace ::com::sun::star;
|
|
|
|
using namespace ::com::sun::star::uno;
|
|
|
|
using namespace ::com::sun::star::beans;
|
|
|
|
|
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
|
|
|
ConditionField::ConditionField( Condition* _pParent, const ResId& _rResId ) : Edit(_pParent,_rResId)
|
|
|
|
,m_pParent(_pParent)
|
|
|
|
,m_aFormula(this)
|
|
|
|
{
|
|
|
|
m_pSubEdit = new Edit(this,0);
|
|
|
|
SetSubEdit(m_pSubEdit);
|
2011-01-14 17:40:56 +01:00
|
|
|
m_pSubEdit->EnableRTL( sal_False );
|
2010-02-12 16:56:44 +01:00
|
|
|
m_pSubEdit->SetPosPixel( Point() );
|
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
|
|
|
|
|
|
|
m_aFormula.SetText(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("...")));
|
|
|
|
m_aFormula.SetClickHdl( LINK( this, ConditionField, OnFormula ) );
|
|
|
|
m_aFormula.Show();
|
|
|
|
m_pSubEdit->Show();
|
|
|
|
Resize();
|
|
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
ConditionField::~ConditionField()
|
|
|
|
{
|
|
|
|
SetSubEdit(NULL);
|
|
|
|
delete m_pSubEdit;
|
|
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
void ConditionField::Resize()
|
|
|
|
{
|
|
|
|
Edit::Resize();
|
|
|
|
const Size aSize = GetOutputSizePixel();
|
|
|
|
const Size aButtonSize( LogicToPixel( Size( 12, 0 ), MAP_APPFONT ).Width(),aSize.Height());
|
|
|
|
const Point aButtonPos(aSize.Width() - aButtonSize.Width(), 0);
|
|
|
|
m_aFormula.SetPosSizePixel(aButtonPos,aButtonSize);
|
|
|
|
m_pSubEdit->SetPosSizePixel(Point(0,0),Size(aButtonPos.X() ,aSize.Height()));
|
|
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
IMPL_LINK( ConditionField, OnFormula, Button*, /*_pClickedButton*/ )
|
|
|
|
{
|
2010-02-12 16:56:44 +01:00
|
|
|
::rtl::OUString sFormula(m_pSubEdit->GetText());
|
|
|
|
const sal_Int32 nLen = sFormula.getLength();
|
|
|
|
if ( nLen )
|
|
|
|
{
|
|
|
|
ReportFormula aFormula( sFormula );
|
|
|
|
sFormula = aFormula.getCompleteFormula();
|
2010-11-28 21:00:43 +00:00
|
|
|
}
|
2010-02-12 16:56:44 +01:00
|
|
|
uno::Reference< awt::XWindow> xInspectorWindow = VCLUnoHelper::GetInterface(this);
|
|
|
|
uno::Reference< beans::XPropertySet> xProp(m_pParent->getController().getRowSet(),uno::UNO_QUERY);
|
|
|
|
if ( rptui::openDialogFormula_nothrow( sFormula, m_pParent->getController().getContext(),xInspectorWindow,xProp ) )
|
|
|
|
{
|
|
|
|
ReportFormula aFormula( sFormula );
|
|
|
|
m_pSubEdit->SetText(aFormula.getUndecoratedContent());
|
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
|
|
|
}
|
|
|
|
return 0L;
|
|
|
|
}
|
2007-07-09 10:56:41 +00:00
|
|
|
//========================================================================
|
|
|
|
// class SvxColorWindow_Impl --------------------------------------------------
|
|
|
|
//========================================================================
|
|
|
|
#ifndef WB_NO_DIRECTSELECT
|
|
|
|
#define WB_NO_DIRECTSELECT ((WinBits)0x04000000)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define PALETTE_X 10
|
|
|
|
#define PALETTE_Y 10
|
|
|
|
#define PALETTE_SIZE (PALETTE_X * PALETTE_Y)
|
|
|
|
class OColorPopup : public FloatingWindow
|
|
|
|
{
|
|
|
|
DECL_LINK( SelectHdl, void * );
|
|
|
|
Condition* m_pCondition;
|
2011-01-14 17:40:56 +01:00
|
|
|
sal_uInt16 m_nSlotId;
|
2007-07-09 10:56:41 +00:00
|
|
|
public:
|
|
|
|
OColorPopup(Window* _pParent,Condition* _pCondition);
|
|
|
|
ValueSet m_aColorSet;
|
|
|
|
|
|
|
|
virtual void KeyInput( const KeyEvent& rKEvt );
|
|
|
|
virtual void Resize();
|
|
|
|
|
|
|
|
void StartSelection();
|
2011-01-14 17:40:56 +01:00
|
|
|
void SetSlotId(sal_uInt16 _nSlotId);
|
2007-07-09 10:56:41 +00:00
|
|
|
};
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
OColorPopup::OColorPopup(Window* _pParent,Condition* _pCondition)
|
|
|
|
:FloatingWindow(_pParent, WinBits( WB_BORDER | WB_STDFLOATWIN | WB_3DLOOK|WB_DIALOGCONTROL ))
|
|
|
|
,m_pCondition(_pCondition)
|
|
|
|
,m_nSlotId(0)
|
|
|
|
,m_aColorSet( this, WinBits( WB_ITEMBORDER | WB_NAMEFIELD | WB_3DLOOK | WB_NO_DIRECTSELECT) )
|
|
|
|
{
|
|
|
|
m_aColorSet.SetHelpId( HID_RPT_POPUP_COLOR_CTRL );
|
|
|
|
SetHelpId( HID_RPT_POPUP_COLOR );
|
|
|
|
const Size aSize12( 13, 13 );
|
|
|
|
short i = 0;
|
2011-09-23 14:05:07 +01:00
|
|
|
XColorListRef pColorList( XColorList::CreateStdColorList() );
|
|
|
|
long nCount = pColorList->Count();
|
2007-07-09 10:56:41 +00:00
|
|
|
XColorEntry* pEntry = NULL;
|
|
|
|
Color aColWhite( COL_WHITE );
|
|
|
|
String aStrWhite( ModuleRes(STR_COLOR_WHITE) );
|
|
|
|
|
|
|
|
if ( nCount > PALETTE_SIZE )
|
|
|
|
// Show scrollbar if more than PALLETTE_SIZE colors are available
|
|
|
|
m_aColorSet.SetStyle( m_aColorSet.GetStyle() | WB_VSCROLL );
|
|
|
|
|
|
|
|
for ( i = 0; i < nCount; i++ )
|
|
|
|
{
|
2011-09-23 14:05:07 +01:00
|
|
|
pEntry = pColorList->GetColor(i);
|
2007-07-09 10:56:41 +00:00
|
|
|
m_aColorSet.InsertItem( i+1, pEntry->GetColor(), pEntry->GetName() );
|
|
|
|
}
|
|
|
|
|
|
|
|
while ( i < PALETTE_SIZE )
|
|
|
|
{
|
|
|
|
// fill empty elements if less then PALLETTE_SIZE colors are available
|
|
|
|
m_aColorSet.InsertItem( i+1, aColWhite, aStrWhite );
|
|
|
|
i++;
|
|
|
|
}
|
|
|
|
|
|
|
|
m_aColorSet.SetSelectHdl( LINK( this, OColorPopup, SelectHdl ) );
|
|
|
|
m_aColorSet.SetColCount( PALETTE_X );
|
|
|
|
m_aColorSet.SetLineCount( PALETTE_Y );
|
|
|
|
Size aSize = m_aColorSet.CalcWindowSizePixel( aSize12 );
|
|
|
|
aSize.Width() += 4;
|
|
|
|
aSize.Height() += 4;
|
|
|
|
SetOutputSizePixel( aSize );
|
|
|
|
m_aColorSet.Show();
|
|
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
void OColorPopup::KeyInput( const KeyEvent& rKEvt )
|
|
|
|
{
|
|
|
|
m_aColorSet.KeyInput(rKEvt);
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
void OColorPopup::Resize()
|
|
|
|
{
|
|
|
|
Size aSize = GetOutputSizePixel();
|
|
|
|
aSize.Width() -= 4;
|
|
|
|
aSize.Height() -= 4;
|
|
|
|
m_aColorSet.SetPosSizePixel( Point(2,2), aSize );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
void OColorPopup::StartSelection()
|
|
|
|
{
|
|
|
|
m_aColorSet.StartSelection();
|
|
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
2011-01-14 17:40:56 +01:00
|
|
|
void OColorPopup::SetSlotId(sal_uInt16 _nSlotId)
|
2007-07-09 10:56:41 +00:00
|
|
|
{
|
|
|
|
m_nSlotId = _nSlotId;
|
|
|
|
if ( SID_ATTR_CHAR_COLOR_BACKGROUND == _nSlotId || SID_BACKGROUND_COLOR == _nSlotId )
|
|
|
|
{
|
|
|
|
m_aColorSet.SetStyle( m_aColorSet.GetStyle() | WB_NONEFIELD );
|
|
|
|
m_aColorSet.SetText( String(ModuleRes( STR_TRANSPARENT )) );
|
2010-11-28 21:00:43 +00:00
|
|
|
}
|
2007-07-09 10:56:41 +00:00
|
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
2012-03-01 18:00:32 +01:00
|
|
|
IMPL_LINK_NOARG(OColorPopup, SelectHdl)
|
2007-07-09 10:56:41 +00:00
|
|
|
{
|
2011-01-14 17:40:56 +01:00
|
|
|
sal_uInt16 nItemId = m_aColorSet.GetSelectItemId();
|
2007-07-09 10:56:41 +00:00
|
|
|
Color aColor( nItemId == 0 ? Color( COL_TRANSPARENT ) : m_aColorSet.GetItemColor( nItemId ) );
|
|
|
|
|
2011-02-27 22:55:22 +01:00
|
|
|
/* #i33380# Moved the following line above the Dispatch() calls.
|
2007-07-09 10:56:41 +00:00
|
|
|
This instance may be deleted in the meantime (i.e. when a dialog is opened
|
|
|
|
while in Dispatch()), accessing members will crash in this case. */
|
|
|
|
m_aColorSet.SetNoSelection();
|
|
|
|
|
|
|
|
if ( IsInPopupMode() )
|
|
|
|
EndPopupMode();
|
|
|
|
|
|
|
|
m_pCondition->ApplyCommand( m_nSlotId, aColor );
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// =============================================================================
|
|
|
|
// = Condition
|
|
|
|
// =============================================================================
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
Condition::Condition( Window* _pParent, IConditionalFormatAction& _rAction, ::rptui::OReportController& _rController )
|
|
|
|
:Control(_pParent, ModuleRes(WIN_CONDITION))
|
|
|
|
,m_rController( _rController )
|
|
|
|
,m_rAction( _rAction )
|
|
|
|
,m_aHeader(this, ModuleRes(FL_CONDITION_HEADER))
|
|
|
|
,m_aConditionType(this, ModuleRes(LB_COND_TYPE))
|
|
|
|
,m_aOperationList( this, ModuleRes(LB_OP))
|
|
|
|
,m_aCondLHS(this, ModuleRes(ED_CONDITION_LHS))
|
|
|
|
,m_aOperandGlue(this, ModuleRes(FT_AND))
|
|
|
|
,m_aCondRHS(this, ModuleRes(ED_CONDITION_RHS))
|
|
|
|
,m_aActions(this, ModuleRes(TB_FORMAT))
|
|
|
|
,m_aPreview(this, ModuleRes(CRTL_FORMAT_PREVIEW))
|
|
|
|
,m_aMoveUp( this, ModuleRes( BTN_MOVE_UP ) )
|
|
|
|
,m_aMoveDown( this, ModuleRes( BTN_MOVE_DOWN ) )
|
|
|
|
,m_aAddCondition( this, ModuleRes( BTN_ADD_CONDITION ) )
|
|
|
|
,m_aRemoveCondition( this, ModuleRes( BTN_REMOVE_CONDITION ) )
|
|
|
|
,m_pColorFloat(NULL)
|
|
|
|
,m_pBtnUpdaterFontColor(NULL)
|
|
|
|
,m_pBtnUpdaterBackgroundColor(NULL)
|
|
|
|
,m_nCondIndex( 0 )
|
|
|
|
,m_nLastKnownWindowWidth( -1 )
|
|
|
|
,m_bInDestruction( false )
|
|
|
|
{
|
2008-06-16 12:39:37 +00:00
|
|
|
FreeResource();
|
2007-07-09 10:56:41 +00:00
|
|
|
m_aActions.SetStyle(m_aActions.GetStyle()|WB_LINESPACING);
|
|
|
|
m_aCondLHS.GrabFocus();
|
|
|
|
|
|
|
|
m_aConditionType.SetSelectHdl( LINK( this, Condition, OnTypeSelected ) );
|
|
|
|
|
|
|
|
m_aOperationList.SetDropDownLineCount( 10 );
|
|
|
|
m_aOperationList.SetSelectHdl( LINK( this, Condition, OnOperationSelected ) );
|
|
|
|
|
|
|
|
m_aActions.SetSelectHdl(LINK(this, Condition, OnFormatAction));
|
|
|
|
m_aActions.SetDropdownClickHdl( LINK( this, Condition, DropdownClick ) );
|
|
|
|
setToolBox(&m_aActions);
|
|
|
|
|
|
|
|
m_aMoveUp.SetClickHdl( LINK( this, Condition, OnConditionAction ) );
|
|
|
|
m_aMoveDown.SetClickHdl( LINK( this, Condition, OnConditionAction ) );
|
|
|
|
m_aAddCondition.SetClickHdl( LINK( this, Condition, OnConditionAction ) );
|
|
|
|
m_aRemoveCondition.SetClickHdl( LINK( this, Condition, OnConditionAction ) );
|
|
|
|
|
|
|
|
m_aMoveUp.SetStyle( m_aMoveUp.GetStyle() | WB_NOPOINTERFOCUS );
|
|
|
|
m_aMoveDown.SetStyle( m_aMoveDown.GetStyle() | WB_NOPOINTERFOCUS );
|
|
|
|
m_aAddCondition.SetStyle( m_aMoveUp.GetStyle() | WB_NOPOINTERFOCUS | WB_CENTER | WB_VCENTER );
|
|
|
|
m_aRemoveCondition.SetStyle( m_aMoveDown.GetStyle() | WB_NOPOINTERFOCUS | WB_CENTER | WB_VCENTER );
|
|
|
|
|
|
|
|
Font aFont( m_aAddCondition.GetFont() );
|
|
|
|
aFont.SetWeight( WEIGHT_BOLD );
|
|
|
|
m_aAddCondition.SetFont( aFont );
|
|
|
|
m_aRemoveCondition.SetFont( aFont );
|
|
|
|
|
|
|
|
m_aOperandGlue.SetStyle( m_aOperandGlue.GetStyle() | WB_VCENTER );
|
|
|
|
|
|
|
|
m_aConditionType.SelectEntryPos( 0 );
|
|
|
|
m_aOperationList.SelectEntryPos( 0 );
|
|
|
|
|
|
|
|
// the toolbar got its site automatically, ensure that the preview is positioned
|
|
|
|
// right of it
|
|
|
|
Size aRelatedControls( LogicToPixel( Size( RELATED_CONTROLS, 0 ), MAP_APPFONT ) );
|
|
|
|
Point aToolbarPos( m_aActions.GetPosPixel() );
|
|
|
|
Size aToolbarSize( m_aActions.GetSizePixel() );
|
|
|
|
m_aPreview.SetPosSizePixel( aToolbarPos.X() + aToolbarSize.Width() + 2 * aRelatedControls.Width(),
|
|
|
|
0, 0, 0, WINDOW_POSSIZE_X );
|
|
|
|
|
|
|
|
// ensure the toolbar is vertically centered, relative to the preview
|
|
|
|
Size aPreviewSize( m_aPreview.GetSizePixel() );
|
|
|
|
m_aActions.SetPosSizePixel( 0, aToolbarPos.Y() + ( aPreviewSize.Height() - aToolbarSize.Height() ) / 2, 0, 0, WINDOW_POSSIZE_Y );
|
|
|
|
|
|
|
|
m_pBtnUpdaterBackgroundColor = new ::svx::ToolboxButtonColorUpdater(
|
|
|
|
SID_BACKGROUND_COLOR, SID_BACKGROUND_COLOR, &m_aActions );
|
|
|
|
m_pBtnUpdaterFontColor = new ::svx::ToolboxButtonColorUpdater(
|
|
|
|
SID_ATTR_CHAR_COLOR2, SID_ATTR_CHAR_COLOR2, &m_aActions, TBX_UPDATER_MODE_CHAR_COLOR_NEW );
|
|
|
|
|
|
|
|
Show();
|
|
|
|
|
|
|
|
impl_layoutAll();
|
|
|
|
|
2007-08-02 13:36:02 +00:00
|
|
|
ConditionalExpressionFactory::getKnownConditionalExpressions( m_aConditionalExpressions );
|
2007-07-09 10:56:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
Condition::~Condition()
|
|
|
|
{
|
|
|
|
m_bInDestruction = true;
|
|
|
|
|
|
|
|
delete m_pColorFloat;
|
|
|
|
delete m_pBtnUpdaterFontColor;
|
|
|
|
delete m_pBtnUpdaterBackgroundColor;
|
|
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
IMPL_LINK( Condition, DropdownClick, ToolBox*, /*pToolBar*/ )
|
|
|
|
{
|
2011-01-14 17:40:56 +01:00
|
|
|
sal_uInt16 nId( m_aActions.GetCurItemId() );
|
2007-07-09 10:56:41 +00:00
|
|
|
if ( !m_pColorFloat )
|
|
|
|
m_pColorFloat = new OColorPopup(&m_aActions,this);
|
|
|
|
|
2011-01-14 17:40:56 +01:00
|
|
|
sal_uInt16 nTextId = 0;
|
2007-07-09 10:56:41 +00:00
|
|
|
switch(nId)
|
|
|
|
{
|
|
|
|
case SID_ATTR_CHAR_COLOR2:
|
|
|
|
nTextId = STR_CHARCOLOR;
|
|
|
|
break;
|
|
|
|
case SID_BACKGROUND_COLOR:
|
|
|
|
nTextId = STR_CHARBACKGROUND;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
2010-11-28 21:00:43 +00:00
|
|
|
}
|
2007-07-09 10:56:41 +00:00
|
|
|
if ( nTextId )
|
|
|
|
m_pColorFloat->SetText(String(ModuleRes(nTextId)));
|
|
|
|
m_pColorFloat->SetSlotId(nId);
|
|
|
|
m_pColorFloat->SetPosPixel(m_aActions.GetItemPopupPosition(nId,m_pColorFloat->GetSizePixel()));
|
|
|
|
m_pColorFloat->StartPopupMode(&m_aActions);
|
|
|
|
m_pColorFloat->StartSelection();
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
//------------------------------------------------------------------
|
|
|
|
IMPL_LINK( Condition, OnFormatAction, ToolBox*, /*NOTINTERESTEDIN*/ )
|
|
|
|
{
|
|
|
|
Color aCol(COL_AUTO);
|
|
|
|
ApplyCommand(m_aActions.GetCurItemId(),aCol);
|
|
|
|
return 0L;
|
|
|
|
}
|
|
|
|
|
|
|
|
//------------------------------------------------------------------
|
|
|
|
IMPL_LINK( Condition, OnConditionAction, Button*, _pClickedButton )
|
|
|
|
{
|
|
|
|
if ( _pClickedButton == &m_aMoveUp )
|
|
|
|
m_rAction.moveConditionUp( getConditionIndex() );
|
|
|
|
else if ( _pClickedButton == &m_aMoveDown )
|
|
|
|
m_rAction.moveConditionDown( getConditionIndex() );
|
|
|
|
else if ( _pClickedButton == &m_aAddCondition )
|
|
|
|
m_rAction.addCondition( getConditionIndex() );
|
|
|
|
else if ( _pClickedButton == &m_aRemoveCondition )
|
|
|
|
m_rAction.deleteCondition( getConditionIndex() );
|
|
|
|
return 0L;
|
|
|
|
}
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------------
|
2011-01-14 17:40:56 +01:00
|
|
|
void Condition::ApplyCommand( sal_uInt16 _nCommandId, const ::Color& _rColor)
|
2007-07-09 10:56:41 +00:00
|
|
|
{
|
|
|
|
if ( _nCommandId == SID_ATTR_CHAR_COLOR2 )
|
|
|
|
m_pBtnUpdaterFontColor->Update( _rColor );
|
|
|
|
else if ( _nCommandId == SID_BACKGROUND_COLOR )
|
|
|
|
m_pBtnUpdaterBackgroundColor->Update( _rColor );
|
|
|
|
|
|
|
|
m_rAction.applyCommand( m_nCondIndex, _nCommandId, _rColor );
|
|
|
|
}
|
|
|
|
//------------------------------------------------------------------------------
|
2010-11-16 15:54:29 +00:00
|
|
|
ImageList Condition::getImageList(sal_Int16 _eBitmapSet) const
|
2007-07-09 10:56:41 +00:00
|
|
|
{
|
|
|
|
sal_Int16 nN = IMG_CONDFORMAT_DLG_SC;
|
|
|
|
if ( _eBitmapSet == SFX_SYMBOLS_SIZE_LARGE )
|
|
|
|
nN = IMG_CONDFORMAT_DLG_LC;
|
2010-11-16 15:54:29 +00:00
|
|
|
return ImageList(ModuleRes(nN));
|
2007-07-09 10:56:41 +00:00
|
|
|
}
|
|
|
|
//------------------------------------------------------------------
|
|
|
|
void Condition::resizeControls(const Size& _rDiff)
|
|
|
|
{
|
|
|
|
// we use large images so we must change them
|
|
|
|
if ( _rDiff.Width() || _rDiff.Height() )
|
|
|
|
{
|
|
|
|
Invalidate();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
void Condition::Paint( const Rectangle& rRect )
|
|
|
|
{
|
|
|
|
Control::Paint(rRect);
|
|
|
|
|
|
|
|
// draw border
|
|
|
|
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
|
|
|
|
ColorChanger aColors( this, rStyleSettings.GetShadowColor(), rStyleSettings.GetDialogColor() );
|
|
|
|
DrawRect( impl_getToolBarBorderRect() );
|
|
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
void Condition::StateChanged( StateChangedType nType )
|
|
|
|
{
|
|
|
|
Control::StateChanged( nType );
|
|
|
|
|
|
|
|
if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
|
|
|
|
{
|
|
|
|
// Check if we need to get new images for normal/high contrast mode
|
|
|
|
checkImageList();
|
|
|
|
}
|
|
|
|
else if ( nType == STATE_CHANGE_TEXT )
|
|
|
|
{
|
|
|
|
// The physical toolbar changed its outlook and shows another logical toolbar!
|
|
|
|
// We have to set the correct high contrast mode on the new tbx manager.
|
|
|
|
checkImageList();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
void Condition::DataChanged( const DataChangedEvent& rDCEvt )
|
|
|
|
{
|
|
|
|
Control::DataChanged( rDCEvt );
|
|
|
|
|
|
|
|
if ((( rDCEvt.GetType() == DATACHANGED_SETTINGS ) ||
|
|
|
|
( rDCEvt.GetType() == DATACHANGED_DISPLAY )) &&
|
|
|
|
( rDCEvt.GetFlags() & SETTINGS_STYLE ))
|
|
|
|
{
|
|
|
|
// Check if we need to get new images for normal/high contrast mode
|
|
|
|
checkImageList();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
void Condition::GetFocus()
|
|
|
|
{
|
|
|
|
Control::GetFocus();
|
|
|
|
if ( !m_bInDestruction )
|
|
|
|
m_aCondLHS.GrabFocus();
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
void Condition::Resize()
|
|
|
|
{
|
|
|
|
Control::Resize();
|
|
|
|
impl_layoutAll();
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
Rectangle Condition::impl_getToolBarBorderRect() const
|
|
|
|
{
|
|
|
|
const Point aToolbarPos( m_aActions.GetPosPixel() );
|
|
|
|
const Size aToolbarSize( m_aActions.GetSizePixel() );
|
|
|
|
const Size aRelatedControls = LogicToPixel( Size( RELATED_CONTROLS, RELATED_CONTROLS ), MAP_APPFONT );
|
|
|
|
|
|
|
|
Rectangle aBorderRect( aToolbarPos, aToolbarSize );
|
|
|
|
aBorderRect.Left() -= aRelatedControls.Width();
|
|
|
|
aBorderRect.Top() -= aRelatedControls.Height();
|
|
|
|
aBorderRect.Right() += aRelatedControls.Width();
|
|
|
|
aBorderRect.Bottom() += aRelatedControls.Height();
|
|
|
|
|
|
|
|
return aBorderRect;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
void Condition::impl_layoutAll()
|
|
|
|
{
|
|
|
|
// if our width changed, resize/-position some controls
|
|
|
|
const Size aSize( GetOutputSizePixel() );
|
|
|
|
if ( aSize.Width() == m_nLastKnownWindowWidth )
|
|
|
|
return;
|
|
|
|
|
|
|
|
m_nLastKnownWindowWidth = aSize.Width();
|
|
|
|
|
|
|
|
const Size aRelatedControls( LogicToPixel( Size( RELATED_CONTROLS, RELATED_CONTROLS ), MAP_APPFONT ) );
|
|
|
|
const Size aUnrelatedControls( LogicToPixel( Size( UNRELATED_CONTROLS, 0 ), MAP_APPFONT ) );
|
|
|
|
const Point aRow1( LogicToPixel( Point( 0, ROW_1_POS ), MAP_APPFONT ) );
|
|
|
|
const Point aRow3( LogicToPixel( Point( 0, ROW_3_POS ), MAP_APPFONT ) );
|
|
|
|
|
|
|
|
// resize the header line
|
|
|
|
m_aHeader.SetPosSizePixel( 0, 0, aSize.Width() - 2 * aRelatedControls.Width(), 0, WINDOW_POSSIZE_WIDTH );
|
|
|
|
|
|
|
|
// position the up/down buttons
|
|
|
|
const Size aButtonSize( LogicToPixel( Size( IMAGE_BUTTON_WIDTH, IMAGE_BUTTON_HEIGHT ), MAP_APPFONT ) );
|
|
|
|
Point aButtonPos( aSize.Width() - aUnrelatedControls.Width() - aButtonSize.Width(), aRow1.Y() );
|
|
|
|
m_aMoveUp.SetPosSizePixel( aButtonPos.X(), aButtonPos.Y(), aButtonSize.Width(), aButtonSize.Height() );
|
|
|
|
aButtonPos.Move( 0, aButtonSize.Height() + aRelatedControls.Height() );
|
|
|
|
m_aMoveDown.SetPosSizePixel( aButtonPos.X(), aButtonPos.Y(), aButtonSize.Width(), aButtonSize.Height() );
|
|
|
|
|
|
|
|
// resize the preview
|
|
|
|
const long nNewPreviewRight = aButtonPos.X() - aRelatedControls.Width();
|
|
|
|
|
|
|
|
const Point aPreviewPos( m_aPreview.GetPosPixel() );
|
|
|
|
OSL_ENSURE( aPreviewPos.X() < nNewPreviewRight, "Condition::impl_layoutAll: being *that* small should not be allowed!" );
|
|
|
|
m_aPreview.SetPosSizePixel( 0, 0, nNewPreviewRight - aPreviewPos.X(), 0, WINDOW_POSSIZE_WIDTH );
|
|
|
|
|
|
|
|
// position the add/remove buttons
|
|
|
|
aButtonPos = Point( nNewPreviewRight - aButtonSize.Width(), aRow3.Y() );
|
|
|
|
m_aRemoveCondition.SetPosSizePixel( aButtonPos.X(), aButtonPos.Y(), aButtonSize.Width(), aButtonSize.Height() );
|
|
|
|
aButtonPos.Move( -( aButtonSize.Width() + aRelatedControls.Width() ), 0 );
|
|
|
|
m_aAddCondition.SetPosSizePixel( aButtonPos.X(), aButtonPos.Y(), aButtonSize.Width(), aButtonSize.Height() );
|
|
|
|
|
|
|
|
// layout the operands input controls
|
|
|
|
impl_layoutOperands();
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
IMPL_LINK( Condition, OnTypeSelected, ListBox*, /*_pNotInterestedIn*/ )
|
|
|
|
{
|
|
|
|
impl_layoutOperands();
|
|
|
|
return 0L;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
IMPL_LINK( Condition, OnOperationSelected, ListBox*, /*_pNotInterestedIn*/ )
|
|
|
|
{
|
|
|
|
impl_layoutOperands();
|
|
|
|
return 0L;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
void Condition::impl_layoutOperands()
|
|
|
|
{
|
|
|
|
const ConditionType eType( impl_getCurrentConditionType() );
|
|
|
|
const ComparisonOperation eOperation( impl_getCurrentComparisonOperation() );
|
|
|
|
|
|
|
|
const bool bIsExpression = ( eType == eExpression );
|
|
|
|
const bool bHaveRHS =
|
|
|
|
( ( eType == eFieldValueComparison )
|
|
|
|
&& ( ( eOperation == eBetween )
|
|
|
|
|| ( eOperation == eNotBetween )
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
|
|
|
const Size aRelatedControls( LogicToPixel( Size( RELATED_CONTROLS, 0 ), MAP_APPFONT ) );
|
|
|
|
const Rectangle aPreviewRect( m_aPreview.GetPosPixel(), m_aPreview.GetSizePixel() );
|
|
|
|
|
|
|
|
// the "condition type" list box
|
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 Rectangle aCondTypeRect( m_aConditionType.GetPosPixel(), m_aConditionType.GetSizePixel() );
|
|
|
|
const Point aOpListPos( aCondTypeRect.Right() + aRelatedControls.Width(), aCondTypeRect.Top() );
|
|
|
|
const Size aOpListSize( LogicToPixel( Size( COND_OP_WIDTH, 60 ), MAP_APPFONT ) );
|
|
|
|
m_aOperationList.SetPosSizePixel( aOpListPos.X(), aOpListPos.Y(),aOpListSize.Width(), aOpListSize.Height() );
|
2007-07-09 10:56:41 +00:00
|
|
|
m_aOperationList.Show( !bIsExpression );
|
|
|
|
|
|
|
|
// the LHS input field
|
|
|
|
Point aLHSPos( aOpListPos.X() + aOpListSize.Width() + aRelatedControls.Width(), aOpListPos.Y() );
|
|
|
|
if ( bIsExpression )
|
|
|
|
aLHSPos.X() = aOpListPos.X();
|
|
|
|
Size aLHSSize( LogicToPixel( Size( EDIT_WIDTH, EDIT_HEIGHT ), MAP_APPFONT ) );
|
|
|
|
if ( !bHaveRHS )
|
|
|
|
aLHSSize.Width() = aPreviewRect.Right() - aLHSPos.X();
|
|
|
|
m_aCondLHS.SetPosSizePixel( aLHSPos.X(), aLHSPos.Y(), aLHSSize.Width(), aLHSSize.Height() );
|
|
|
|
|
|
|
|
if ( bHaveRHS )
|
|
|
|
{
|
|
|
|
// the "and" text being the glue between LHS and RHS
|
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 Point aOpGluePos( aLHSPos.X() + aLHSSize.Width() + aRelatedControls.Width(), aLHSPos.Y() );
|
|
|
|
const Size aOpGlueSize( m_aOperandGlue.GetTextWidth( m_aOperandGlue.GetText() ) + aRelatedControls.Width(), aLHSSize.Height() );
|
2007-07-09 10:56:41 +00:00
|
|
|
m_aOperandGlue.SetPosSizePixel( aOpGluePos.X(), aOpGluePos.Y(), aOpGlueSize.Width(), aOpGlueSize.Height() );
|
|
|
|
|
|
|
|
// the RHS input field
|
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 Point aRHSPos( aOpGluePos.X() + aOpGlueSize.Width() + aRelatedControls.Width(), aOpGluePos.Y() );
|
|
|
|
const Size aRHSSize( aPreviewRect.Right() - aRHSPos.X(), aLHSSize.Height() );
|
2007-07-09 10:56:41 +00:00
|
|
|
m_aCondRHS.SetPosSizePixel( aRHSPos.X(), aRHSPos.Y(), aRHSSize.Width(), aRHSSize.Height() );
|
|
|
|
}
|
|
|
|
|
|
|
|
m_aOperandGlue.Show( bHaveRHS );
|
|
|
|
m_aCondRHS.Show( bHaveRHS );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
void Condition::impl_setCondition( const ::rtl::OUString& _rConditionFormula )
|
|
|
|
{
|
|
|
|
// determine the condition's type and comparison operation
|
|
|
|
ConditionType eType( eFieldValueComparison );
|
|
|
|
ComparisonOperation eOperation( eBetween );
|
|
|
|
|
|
|
|
// LHS and RHS, matched below
|
|
|
|
::rtl::OUString sLHS, sRHS;
|
|
|
|
|
2012-01-03 21:17:13 -02:00
|
|
|
if ( !_rConditionFormula.isEmpty() )
|
2007-07-09 10:56:41 +00:00
|
|
|
{
|
|
|
|
// the unprefixed expression which forms the condition
|
|
|
|
ReportFormula aFormula( _rConditionFormula );
|
|
|
|
OSL_ENSURE( aFormula.getType() == ReportFormula::Expression, "Condition::setCondition: illegal formula!" );
|
|
|
|
::rtl::OUString sExpression;
|
|
|
|
if ( aFormula.getType() == ReportFormula::Expression )
|
|
|
|
sExpression = aFormula.getExpression();
|
|
|
|
// as fallback, if the below matching does not succeed, assume
|
|
|
|
// the whole expression is the LHS
|
2008-01-29 12:46:58 +00:00
|
|
|
eType = eExpression;
|
2007-07-09 10:56:41 +00:00
|
|
|
sLHS = sExpression;
|
|
|
|
|
|
|
|
// the data field (or expression) to which our control is bound
|
|
|
|
const ReportFormula aFieldContentFormula( m_rAction.getDataField() );
|
|
|
|
const ::rtl::OUString sUnprefixedFieldContent( aFieldContentFormula.getBracketedFieldOrExpression() );
|
|
|
|
|
|
|
|
// check whether one of the Field Value Expression Factories recognizes the expression
|
2007-08-02 13:36:02 +00:00
|
|
|
for ( ConditionalExpressions::const_iterator exp = m_aConditionalExpressions.begin();
|
|
|
|
exp != m_aConditionalExpressions.end();
|
|
|
|
++exp
|
2007-07-09 10:56:41 +00:00
|
|
|
)
|
|
|
|
{
|
2007-08-02 13:36:02 +00:00
|
|
|
if ( exp->second->matchExpression( sExpression, sUnprefixedFieldContent, sLHS, sRHS ) )
|
2007-07-09 10:56:41 +00:00
|
|
|
{
|
|
|
|
eType = eFieldValueComparison;
|
2007-08-02 13:36:02 +00:00
|
|
|
eOperation = exp->first;
|
2007-07-09 10:56:41 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// update UI
|
2011-01-14 17:40:56 +01:00
|
|
|
m_aConditionType.SelectEntryPos( (sal_uInt16)eType );
|
|
|
|
m_aOperationList.SelectEntryPos( (sal_uInt16)eOperation );
|
2007-07-09 10:56:41 +00:00
|
|
|
m_aCondLHS.SetText( sLHS );
|
|
|
|
m_aCondRHS.SetText( sRHS );
|
|
|
|
|
|
|
|
// re-layout
|
|
|
|
impl_layoutOperands();
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
void Condition::setCondition( const uno::Reference< report::XFormatCondition >& _rxCondition )
|
|
|
|
{
|
|
|
|
OSL_PRECOND( _rxCondition.is(), "Condition::setCondition: empty condition object!" );
|
|
|
|
if ( !_rxCondition.is() )
|
|
|
|
return;
|
|
|
|
|
|
|
|
::rtl::OUString sConditionFormula;
|
|
|
|
try
|
|
|
|
{
|
|
|
|
if ( _rxCondition.is() )
|
|
|
|
sConditionFormula = _rxCondition->getFormula();
|
|
|
|
}
|
|
|
|
catch( const Exception& )
|
|
|
|
{
|
|
|
|
DBG_UNHANDLED_EXCEPTION();
|
|
|
|
}
|
|
|
|
impl_setCondition( sConditionFormula );
|
|
|
|
updateToolbar( _rxCondition.get() );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
void Condition::updateToolbar(const uno::Reference< report::XReportControlFormat >& _xReportControlFormat)
|
|
|
|
{
|
|
|
|
OSL_ENSURE(_xReportControlFormat.is(),"XReportControlFormat is NULL!");
|
|
|
|
if ( _xReportControlFormat.is() )
|
|
|
|
{
|
2011-01-14 17:40:56 +01:00
|
|
|
sal_uInt16 nItemCount = m_aActions.GetItemCount();
|
|
|
|
for (sal_uInt16 j = 0; j< nItemCount; ++j)
|
2007-07-09 10:56:41 +00:00
|
|
|
{
|
2011-01-14 17:40:56 +01:00
|
|
|
sal_uInt16 nItemId = m_aActions.GetItemId(j);
|
2007-07-09 10:56:41 +00:00
|
|
|
m_aActions.CheckItem( nItemId, m_rController.isFormatCommandEnabled( nItemId, _xReportControlFormat ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
try
|
|
|
|
{
|
|
|
|
Font aBaseFont( Application::GetDefaultDevice()->GetSettings().GetStyleSettings().GetAppFont() );
|
|
|
|
SvxFont aFont( VCLUnoHelper::CreateFont( _xReportControlFormat->getFontDescriptor(), aBaseFont ) );
|
|
|
|
aFont.SetHeight( OutputDevice::LogicToLogic( Size( 0, (sal_Int32)aFont.GetHeight() ), MAP_POINT, MAP_TWIP ).Height());
|
|
|
|
aFont.SetEmphasisMark( static_cast< FontEmphasisMark >( _xReportControlFormat->getControlTextEmphasis() ) );
|
|
|
|
aFont.SetRelief( static_cast< FontRelief >( _xReportControlFormat->getCharRelief() ) );
|
|
|
|
aFont.SetColor( _xReportControlFormat->getCharColor() );
|
2011-10-20 13:36:45 +01:00
|
|
|
m_aPreview.SetFont( aFont, aFont, aFont );
|
2007-07-09 10:56:41 +00:00
|
|
|
m_aPreview.SetBackColor( _xReportControlFormat->getControlBackground() );
|
|
|
|
m_aPreview.SetTextLineColor( Color( _xReportControlFormat->getCharUnderlineColor() ) );
|
|
|
|
}
|
|
|
|
catch( const Exception& )
|
|
|
|
{
|
|
|
|
DBG_UNHANDLED_EXCEPTION();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
void Condition::fillFormatCondition(const uno::Reference< report::XFormatCondition >& _xCondition)
|
|
|
|
{
|
|
|
|
const ConditionType eType( impl_getCurrentConditionType() );
|
|
|
|
const ComparisonOperation eOperation( impl_getCurrentComparisonOperation() );
|
|
|
|
|
|
|
|
const ::rtl::OUString sLHS( m_aCondLHS.GetText() );
|
|
|
|
const ::rtl::OUString sRHS( m_aCondRHS.GetText() );
|
|
|
|
|
|
|
|
::rtl::OUString sUndecoratedFormula( sLHS );
|
|
|
|
|
|
|
|
if ( eType == eFieldValueComparison )
|
|
|
|
{
|
|
|
|
ReportFormula aFieldContentFormula( m_rAction.getDataField() );
|
|
|
|
::rtl::OUString sUnprefixedFieldContent( aFieldContentFormula.getBracketedFieldOrExpression() );
|
|
|
|
|
2007-08-02 13:36:02 +00:00
|
|
|
PConditionalExpression pFactory( m_aConditionalExpressions[ eOperation ] );
|
2007-07-09 10:56:41 +00:00
|
|
|
sUndecoratedFormula = pFactory->assembleExpression( sUnprefixedFieldContent, sLHS, sRHS );
|
|
|
|
}
|
|
|
|
|
|
|
|
ReportFormula aFormula( ReportFormula::Expression, sUndecoratedFormula );
|
|
|
|
_xCondition->setFormula( aFormula.getCompleteFormula() );
|
|
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
void Condition::setConditionIndex( size_t _nCondIndex, size_t _nCondCount )
|
|
|
|
{
|
|
|
|
m_nCondIndex = _nCondIndex;
|
|
|
|
String sHeader( ModuleRes( STR_NUMBERED_CONDITION ) );
|
|
|
|
sHeader.SearchAndReplaceAscii( "$number$", String::CreateFromInt32( _nCondIndex + 1 ) );
|
|
|
|
m_aHeader.SetText( sHeader );
|
|
|
|
|
|
|
|
m_aMoveUp.Enable( _nCondIndex > 0 );
|
|
|
|
OSL_PRECOND( _nCondCount > 0, "Condition::setConditionIndex: having no conditions at all is nonsense!" );
|
|
|
|
m_aMoveDown.Enable( _nCondIndex < _nCondCount - 1 );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
bool Condition::isEmpty() const
|
|
|
|
{
|
|
|
|
return m_aCondLHS.GetText().Len() == 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// =============================================================================
|
|
|
|
} // rptui
|
|
|
|
// =============================================================================
|
|
|
|
|
2010-10-12 15:59:03 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|