2010-10-12 15:59:03 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-10-01 16:08:38 +01: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 .
|
|
|
|
*/
|
2007-07-09 10:56:41 +00:00
|
|
|
|
|
|
|
#include "Condition.hxx"
|
2017-10-23 22:34:20 +02:00
|
|
|
#include <UITools.hxx>
|
|
|
|
#include <CondFormat.hxx>
|
|
|
|
#include <core_resource.hxx>
|
|
|
|
#include <strings.hrc>
|
|
|
|
#include <ReportController.hxx>
|
|
|
|
#include <ColorChanger.hxx>
|
|
|
|
#include <reportformula.hxx>
|
2007-07-09 10:56:41 +00:00
|
|
|
#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>
|
|
|
|
|
2019-04-24 22:48:26 +02:00
|
|
|
#include <svx/PaletteManager.hxx>
|
2007-07-09 10:56:41 +00:00
|
|
|
#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>
|
2016-02-06 21:03:41 +11:00
|
|
|
#include <vcl/bitmapaccess.hxx>
|
2014-01-02 23:52:37 +01:00
|
|
|
#include <vcl/settings.hxx>
|
|
|
|
|
2007-07-09 10:56:41 +00:00
|
|
|
#include <tools/diagnose_ex.h>
|
|
|
|
#include <rtl/ustrbuf.hxx>
|
2012-03-04 21:01:01 +01:00
|
|
|
#include <svtools/valueset.hxx>
|
2007-07-09 10:56:41 +00:00
|
|
|
|
|
|
|
namespace rptui
|
|
|
|
{
|
|
|
|
using namespace ::com::sun::star;
|
|
|
|
using namespace ::com::sun::star::uno;
|
|
|
|
using namespace ::com::sun::star::beans;
|
|
|
|
|
2019-10-11 13:02:57 +01:00
|
|
|
ConditionField::ConditionField(Condition* pParent, std::unique_ptr<weld::Entry> xSubEdit,
|
|
|
|
std::unique_ptr<weld::Button> xFormula)
|
2014-07-03 20:35:20 +02:00
|
|
|
: m_pParent(pParent)
|
2019-10-11 13:02:57 +01:00
|
|
|
, m_xSubEdit(std::move(xSubEdit))
|
|
|
|
, m_xFormula(std::move(xFormula))
|
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
|
|
|
{
|
2019-10-11 13:02:57 +01:00
|
|
|
m_xFormula->set_label("...");
|
|
|
|
m_xFormula->connect_clicked( LINK( this, ConditionField, OnFormula ) );
|
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
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2019-10-11 13:02:57 +01:00
|
|
|
IMPL_LINK_NOARG(ConditionField, OnFormula, weld::Button&, void)
|
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
|
|
|
{
|
2019-10-11 13:02:57 +01:00
|
|
|
OUString sFormula(m_xSubEdit->get_text());
|
2010-02-12 16:56:44 +01:00
|
|
|
const sal_Int32 nLen = sFormula.getLength();
|
|
|
|
if ( nLen )
|
|
|
|
{
|
|
|
|
ReportFormula aFormula( sFormula );
|
|
|
|
sFormula = aFormula.getCompleteFormula();
|
2010-11-28 21:00:43 +00:00
|
|
|
}
|
2019-10-11 13:02:57 +01:00
|
|
|
uno::Reference< awt::XWindow> xInspectorWindow = m_pParent->GetXWindow();
|
2010-02-12 16:56:44 +01:00
|
|
|
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 );
|
2019-10-11 13:02:57 +01:00
|
|
|
m_xSubEdit->set_text(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
|
|
|
}
|
|
|
|
}
|
2014-02-25 19:49:46 +01:00
|
|
|
|
2019-10-11 13:02:57 +01:00
|
|
|
ConditionColorWrapper::ConditionColorWrapper(Condition* pControl, sal_uInt16 nSlotId)
|
|
|
|
: mpControl(pControl)
|
|
|
|
, mnSlotId(nSlotId)
|
2007-07-09 10:56:41 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2016-11-05 20:28:27 +00:00
|
|
|
void ConditionColorWrapper::operator()(const OUString& /*rCommand*/, const NamedColor& rNamedColor)
|
2007-07-09 10:56:41 +00:00
|
|
|
{
|
2019-10-11 13:02:57 +01:00
|
|
|
mpControl->ApplyCommand(mnSlotId, rNamedColor);
|
2007-07-09 10:56:41 +00:00
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2007-07-09 10:56:41 +00:00
|
|
|
// = Condition
|
2019-10-11 13:02:57 +01:00
|
|
|
Condition::Condition(weld::Container* pParent, weld::Window* pDialog, IConditionalFormatAction& _rAction, ::rptui::OReportController& _rController)
|
|
|
|
: m_xPaletteManager(new PaletteManager)
|
|
|
|
, m_aBackColorWrapper(this, SID_BACKGROUND_COLOR)
|
|
|
|
, m_aForeColorWrapper(this, SID_ATTR_CHAR_COLOR2)
|
2016-11-05 20:28:27 +00:00
|
|
|
, m_rController(_rController)
|
|
|
|
, m_rAction(_rAction)
|
|
|
|
, m_nCondIndex(0)
|
2019-10-11 13:02:57 +01:00
|
|
|
, m_pDialog(pDialog)
|
|
|
|
, m_xBuilder(Application::CreateBuilder(pParent, "modules/dbreport/ui/conditionwin.ui"))
|
|
|
|
, m_xContainer(m_xBuilder->weld_container("ConditionWin"))
|
|
|
|
, m_xHeader(m_xBuilder->weld_label("headerLabel"))
|
|
|
|
, m_xConditionType(m_xBuilder->weld_combo_box("typeCombobox"))
|
|
|
|
, m_xOperationList(m_xBuilder->weld_combo_box("opCombobox"))
|
|
|
|
, m_xOperandGlue(m_xBuilder->weld_label("andLabel"))
|
|
|
|
, m_xActions(m_xBuilder->weld_toolbar("formatToolbox"))
|
|
|
|
, m_xPreview(new weld::CustomWeld(*m_xBuilder, "previewDrawingarea", m_aPreview))
|
|
|
|
, m_xMoveUp(m_xBuilder->weld_button("upButton"))
|
|
|
|
, m_xMoveDown(m_xBuilder->weld_button("downButton"))
|
|
|
|
, m_xAddCondition(m_xBuilder->weld_button("addButton"))
|
|
|
|
, m_xRemoveCondition(m_xBuilder->weld_button("removeButton"))
|
2007-07-09 10:56:41 +00:00
|
|
|
{
|
2019-10-11 13:02:57 +01:00
|
|
|
m_xCondLHS.reset(new ConditionField(this, m_xBuilder->weld_entry("lhsEntry"), m_xBuilder->weld_button("lhsButton")));
|
|
|
|
m_xCondRHS.reset(new ConditionField(this, m_xBuilder->weld_entry("rhsEntry"), m_xBuilder->weld_button("rhsButton")));
|
|
|
|
|
|
|
|
m_xCondLHS->grab_focus();
|
|
|
|
|
|
|
|
m_xConditionType->connect_changed( LINK( this, Condition, OnTypeSelected ) );
|
|
|
|
|
|
|
|
m_xOperationList->connect_changed( LINK( this, Condition, OnOperationSelected ) );
|
|
|
|
|
|
|
|
m_xActions->connect_clicked(LINK(this, Condition, OnFormatAction));
|
|
|
|
|
|
|
|
m_xMoveUp->connect_clicked( LINK( this, Condition, OnConditionAction ) );
|
|
|
|
m_xMoveDown->connect_clicked( LINK( this, Condition, OnConditionAction ) );
|
|
|
|
m_xAddCondition->connect_clicked( LINK( this, Condition, OnConditionAction ) );
|
|
|
|
m_xRemoveCondition->connect_clicked( LINK( this, Condition, OnConditionAction ) );
|
|
|
|
|
|
|
|
m_xConditionType->set_active(0);
|
|
|
|
m_xOperationList->set_active(0);
|
|
|
|
|
|
|
|
SetBackgroundDropdownClick();
|
|
|
|
SetForegroundDropdownClick();
|
|
|
|
|
|
|
|
m_xContainer->show();
|
2007-07-09 10:56:41 +00:00
|
|
|
|
2007-08-02 13:36:02 +00:00
|
|
|
ConditionalExpressionFactory::getKnownConditionalExpressions( m_aConditionalExpressions );
|
2007-07-09 10:56:41 +00:00
|
|
|
}
|
|
|
|
|
2019-10-11 13:02:57 +01:00
|
|
|
sal_uInt16 Condition::mapToolbarItemToSlotId(const OString& rItemId)
|
2014-07-03 20:35:20 +02:00
|
|
|
{
|
2019-10-11 13:02:57 +01:00
|
|
|
if (rItemId == "bold")
|
2014-07-03 20:35:20 +02:00
|
|
|
return SID_ATTR_CHAR_WEIGHT;
|
2019-10-11 13:02:57 +01:00
|
|
|
if (rItemId == "italic")
|
2014-07-03 20:35:20 +02:00
|
|
|
return SID_ATTR_CHAR_POSTURE;
|
2019-10-11 13:02:57 +01:00
|
|
|
if (rItemId == "underline")
|
2014-07-03 20:35:20 +02:00
|
|
|
return SID_ATTR_CHAR_UNDERLINE;
|
2019-10-11 13:02:57 +01:00
|
|
|
if (rItemId == "background")
|
2014-07-03 20:35:20 +02:00
|
|
|
return SID_BACKGROUND_COLOR;
|
2019-10-11 13:02:57 +01:00
|
|
|
if (rItemId == "foreground")
|
2014-07-03 20:35:20 +02:00
|
|
|
return SID_ATTR_CHAR_COLOR2;
|
2019-10-11 13:02:57 +01:00
|
|
|
if (rItemId == "fontdialog")
|
2014-07-03 20:35:20 +02:00
|
|
|
return SID_CHAR_DLG;
|
|
|
|
return 0;
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2007-07-09 10:56:41 +00:00
|
|
|
Condition::~Condition()
|
2015-01-26 13:14:14 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2019-10-11 13:02:57 +01:00
|
|
|
void Condition::SetBackgroundDropdownClick()
|
2007-07-09 10:56:41 +00:00
|
|
|
{
|
2019-10-11 13:02:57 +01:00
|
|
|
m_xBackColorFloat.reset(new ColorWindow(
|
|
|
|
m_xPaletteManager,
|
|
|
|
m_aColorStatus,
|
|
|
|
SID_BACKGROUND_COLOR,
|
|
|
|
nullptr,
|
|
|
|
m_pDialog,
|
|
|
|
MenuOrToolMenuButton(m_xActions.get(), "background"),
|
|
|
|
m_aBackColorWrapper));
|
|
|
|
|
|
|
|
m_xActions->set_item_popover("background", m_xBackColorFloat->GetWidget());
|
2007-07-09 10:56:41 +00:00
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2019-10-11 13:02:57 +01:00
|
|
|
void Condition::SetForegroundDropdownClick()
|
2007-07-09 10:56:41 +00:00
|
|
|
{
|
2019-10-11 13:02:57 +01:00
|
|
|
m_xForeColorFloat.reset(new ColorWindow(
|
|
|
|
m_xPaletteManager,
|
|
|
|
m_aColorStatus,
|
|
|
|
SID_ATTR_CHAR_COLOR2,
|
|
|
|
nullptr,
|
|
|
|
m_pDialog,
|
|
|
|
MenuOrToolMenuButton(m_xActions.get(), "foreground"),
|
|
|
|
m_aForeColorWrapper));
|
|
|
|
|
|
|
|
m_xActions->set_item_popover("foreground", m_xForeColorFloat->GetWidget());
|
2007-07-09 10:56:41 +00:00
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2019-10-11 13:02:57 +01:00
|
|
|
|
|
|
|
IMPL_LINK(Condition, OnFormatAction, const OString&, rIdent, void)
|
2007-07-09 10:56:41 +00:00
|
|
|
{
|
2019-10-11 13:02:57 +01:00
|
|
|
ApplyCommand(mapToolbarItemToSlotId(rIdent),
|
2018-10-14 16:51:25 -08:00
|
|
|
NamedColor(COL_AUTO, "#" + COL_AUTO.AsRGBHexString()));
|
2007-07-09 10:56:41 +00:00
|
|
|
}
|
|
|
|
|
2019-10-11 13:02:57 +01:00
|
|
|
IMPL_LINK(Condition, OnConditionAction, weld::Button&, rClickedButton, void)
|
2007-07-09 10:56:41 +00:00
|
|
|
{
|
2019-10-11 13:02:57 +01:00
|
|
|
if ( &rClickedButton == m_xMoveUp.get() )
|
2007-07-09 10:56:41 +00:00
|
|
|
m_rAction.moveConditionUp( getConditionIndex() );
|
2019-10-11 13:02:57 +01:00
|
|
|
else if ( &rClickedButton == m_xMoveDown.get() )
|
2007-07-09 10:56:41 +00:00
|
|
|
m_rAction.moveConditionDown( getConditionIndex() );
|
2019-10-11 13:02:57 +01:00
|
|
|
else if ( &rClickedButton == m_xAddCondition.get() )
|
2007-07-09 10:56:41 +00:00
|
|
|
m_rAction.addCondition( getConditionIndex() );
|
2019-10-11 13:02:57 +01:00
|
|
|
else if ( &rClickedButton == m_xRemoveCondition.get() )
|
2007-07-09 10:56:41 +00:00
|
|
|
m_rAction.deleteCondition( getConditionIndex() );
|
|
|
|
}
|
|
|
|
|
2018-10-14 16:51:25 -08:00
|
|
|
void Condition::ApplyCommand( sal_uInt16 _nCommandId, const NamedColor& rNamedColor )
|
2007-07-09 10:56:41 +00:00
|
|
|
{
|
2018-10-14 16:51:25 -08:00
|
|
|
m_rAction.applyCommand( m_nCondIndex, _nCommandId, rNamedColor.first );
|
2007-07-09 10:56:41 +00:00
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2019-10-11 13:02:57 +01:00
|
|
|
IMPL_LINK_NOARG( Condition, OnTypeSelected, weld::ComboBox&, void )
|
2007-07-09 10:56:41 +00:00
|
|
|
{
|
|
|
|
impl_layoutOperands();
|
|
|
|
}
|
|
|
|
|
2019-10-11 13:02:57 +01:00
|
|
|
IMPL_LINK_NOARG( Condition, OnOperationSelected, weld::ComboBox&, void )
|
2007-07-09 10:56:41 +00:00
|
|
|
{
|
|
|
|
impl_layoutOperands();
|
|
|
|
}
|
|
|
|
|
|
|
|
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 )
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
|
|
|
// the "condition type" list box
|
2019-10-11 13:02:57 +01:00
|
|
|
m_xOperationList->set_visible( !bIsExpression );
|
|
|
|
m_xOperandGlue->set_visible( bHaveRHS );
|
|
|
|
m_xCondRHS->set_visible( bHaveRHS );
|
2007-07-09 10:56:41 +00:00
|
|
|
}
|
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
void Condition::impl_setCondition( const OUString& _rConditionFormula )
|
2007-07-09 10:56:41 +00:00
|
|
|
{
|
|
|
|
// determine the condition's type and comparison operation
|
|
|
|
ConditionType eType( eFieldValueComparison );
|
|
|
|
ComparisonOperation eOperation( eBetween );
|
|
|
|
|
|
|
|
// LHS and RHS, matched below
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString sLHS, sRHS;
|
2007-07-09 10:56:41 +00:00
|
|
|
|
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!" );
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString sExpression;
|
2007-07-09 10:56:41 +00:00
|
|
|
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() );
|
2013-04-07 12:06:47 +02:00
|
|
|
const OUString sUnprefixedFieldContent( aFieldContentFormula.getBracketedFieldOrExpression() );
|
2007-07-09 10:56:41 +00:00
|
|
|
|
|
|
|
// check whether one of the Field Value Expression Factories recognizes the expression
|
2019-02-12 00:00:22 +03:00
|
|
|
for (const auto& [rOperation, rxConditionalExpression] : m_aConditionalExpressions)
|
2007-07-09 10:56:41 +00:00
|
|
|
{
|
2019-02-12 00:00:22 +03:00
|
|
|
if ( rxConditionalExpression->matchExpression( sExpression, sUnprefixedFieldContent, sLHS, sRHS ) )
|
2007-07-09 10:56:41 +00:00
|
|
|
{
|
|
|
|
eType = eFieldValueComparison;
|
2019-02-12 00:00:22 +03:00
|
|
|
eOperation = rOperation;
|
2007-07-09 10:56:41 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// update UI
|
2019-10-11 13:02:57 +01:00
|
|
|
m_xConditionType->set_active(static_cast<sal_uInt16>(eType));
|
|
|
|
m_xOperationList->set_active(static_cast<sal_uInt16>(eOperation));
|
|
|
|
m_xCondLHS->set_text( sLHS );
|
|
|
|
m_xCondRHS->set_text( sRHS );
|
2007-07-09 10:56:41 +00:00
|
|
|
|
|
|
|
// re-layout
|
|
|
|
impl_layoutOperands();
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2007-07-09 10:56:41 +00:00
|
|
|
void Condition::setCondition( const uno::Reference< report::XFormatCondition >& _rxCondition )
|
|
|
|
{
|
|
|
|
OSL_PRECOND( _rxCondition.is(), "Condition::setCondition: empty condition object!" );
|
|
|
|
if ( !_rxCondition.is() )
|
|
|
|
return;
|
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString sConditionFormula;
|
2007-07-09 10:56:41 +00:00
|
|
|
try
|
|
|
|
{
|
|
|
|
if ( _rxCondition.is() )
|
|
|
|
sConditionFormula = _rxCondition->getFormula();
|
|
|
|
}
|
|
|
|
catch( const Exception& )
|
|
|
|
{
|
2018-04-02 08:58:19 +02:00
|
|
|
DBG_UNHANDLED_EXCEPTION("reportdesign");
|
2007-07-09 10:56:41 +00:00
|
|
|
}
|
|
|
|
impl_setCondition( sConditionFormula );
|
|
|
|
updateToolbar( _rxCondition.get() );
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2007-07-09 10:56:41 +00:00
|
|
|
void Condition::updateToolbar(const uno::Reference< report::XReportControlFormat >& _xReportControlFormat)
|
|
|
|
{
|
2019-10-11 13:02:57 +01:00
|
|
|
OString aItems[] = { "bold", "italic", "underline", "fontdialog" };
|
|
|
|
|
2007-07-09 10:56:41 +00:00
|
|
|
OSL_ENSURE(_xReportControlFormat.is(),"XReportControlFormat is NULL!");
|
|
|
|
if ( _xReportControlFormat.is() )
|
|
|
|
{
|
2019-10-11 13:02:57 +01:00
|
|
|
for (size_t j = 0; j < SAL_N_ELEMENTS(aItems); ++j)
|
2007-07-09 10:56:41 +00:00
|
|
|
{
|
2019-10-11 13:02:57 +01:00
|
|
|
m_xActions->set_item_active(aItems[j], OReportController::isFormatCommandEnabled(mapToolbarItemToSlotId(aItems[j]),
|
|
|
|
_xReportControlFormat));
|
2007-07-09 10:56:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
try
|
|
|
|
{
|
2014-09-16 10:09:58 +02:00
|
|
|
vcl::Font aBaseFont( Application::GetDefaultDevice()->GetSettings().GetStyleSettings().GetAppFont() );
|
2007-07-09 10:56:41 +00:00
|
|
|
SvxFont aFont( VCLUnoHelper::CreateFont( _xReportControlFormat->getFontDescriptor(), aBaseFont ) );
|
2017-10-26 23:15:06 +02:00
|
|
|
aFont.SetFontHeight(OutputDevice::LogicToLogic(Size(0, aFont.GetFontHeight()), MapMode(MapUnit::MapPoint), MapMode(MapUnit::MapTwip)).Height());
|
2007-07-09 10:56:41 +00:00
|
|
|
aFont.SetEmphasisMark( static_cast< FontEmphasisMark >( _xReportControlFormat->getControlTextEmphasis() ) );
|
|
|
|
aFont.SetRelief( static_cast< FontRelief >( _xReportControlFormat->getCharRelief() ) );
|
2018-03-07 08:29:24 +02:00
|
|
|
aFont.SetColor( Color(_xReportControlFormat->getCharColor()) );
|
2019-10-11 13:02:57 +01:00
|
|
|
m_aPreview.SetFont( aFont, aFont, aFont );
|
|
|
|
m_aPreview.SetBackColor( Color(_xReportControlFormat->getControlBackground()) );
|
|
|
|
m_aPreview.SetTextLineColor( Color( _xReportControlFormat->getCharUnderlineColor() ) );
|
2007-07-09 10:56:41 +00:00
|
|
|
}
|
|
|
|
catch( const Exception& )
|
|
|
|
{
|
2018-04-02 08:58:19 +02:00
|
|
|
DBG_UNHANDLED_EXCEPTION("reportdesign");
|
2007-07-09 10:56:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2007-07-09 10:56:41 +00:00
|
|
|
void Condition::fillFormatCondition(const uno::Reference< report::XFormatCondition >& _xCondition)
|
|
|
|
{
|
|
|
|
const ConditionType eType( impl_getCurrentConditionType() );
|
|
|
|
const ComparisonOperation eOperation( impl_getCurrentComparisonOperation() );
|
|
|
|
|
2019-10-11 13:02:57 +01:00
|
|
|
const OUString sLHS( m_xCondLHS->get_text() );
|
|
|
|
const OUString sRHS( m_xCondRHS->get_text() );
|
2007-07-09 10:56:41 +00:00
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString sUndecoratedFormula( sLHS );
|
2007-07-09 10:56:41 +00:00
|
|
|
|
|
|
|
if ( eType == eFieldValueComparison )
|
|
|
|
{
|
|
|
|
ReportFormula aFieldContentFormula( m_rAction.getDataField() );
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString sUnprefixedFieldContent( aFieldContentFormula.getBracketedFieldOrExpression() );
|
2007-07-09 10:56:41 +00:00
|
|
|
|
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() );
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2007-07-09 10:56:41 +00:00
|
|
|
void Condition::setConditionIndex( size_t _nCondIndex, size_t _nCondCount )
|
|
|
|
{
|
|
|
|
m_nCondIndex = _nCondIndex;
|
2017-06-11 20:56:30 +01:00
|
|
|
OUString sHeader( RptResId( STR_NUMBERED_CONDITION ) );
|
2013-01-20 10:51:58 +01:00
|
|
|
sHeader = sHeader.replaceFirst( "$number$", OUString::number( _nCondIndex + 1) );
|
2019-10-11 13:02:57 +01:00
|
|
|
m_xHeader->set_label( sHeader );
|
2007-07-09 10:56:41 +00:00
|
|
|
|
2019-10-11 13:02:57 +01:00
|
|
|
m_xMoveUp->set_sensitive(_nCondIndex > 0);
|
2007-07-09 10:56:41 +00:00
|
|
|
OSL_PRECOND( _nCondCount > 0, "Condition::setConditionIndex: having no conditions at all is nonsense!" );
|
2019-10-11 13:02:57 +01:00
|
|
|
m_xMoveDown->set_sensitive(_nCondIndex < _nCondCount - 1);
|
2007-07-09 10:56:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool Condition::isEmpty() const
|
|
|
|
{
|
2019-10-11 13:02:57 +01:00
|
|
|
return m_xCondLHS->get_text().isEmpty();
|
2007-07-09 10:56:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
} // rptui
|
2014-02-25 19:49:46 +01:00
|
|
|
|
2007-07-09 10:56:41 +00:00
|
|
|
|
2010-10-12 15:59:03 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|