Tag: cws_src680_rpt23fix01 User: fs Date: 2007-07-16 19:36:00+0000 Modified: dba/reportdesign/source/ui/dlg/Condition.cxx dba/reportdesign/source/ui/dlg/Condition.hxx
Log: #i77800# some more outsourcing File Changes: Directory: /dba/reportdesign/source/ui/dlg/ =========================================== File [changed]: Condition.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/dlg/Condition.cxx?r1=1.2.2.1&r2=1.2.2.2 Delta lines: +8 -16 -------------------- --- Condition.cxx 2007-07-16 13:43:53+0000 1.2.2.1 +++ Condition.cxx 2007-07-16 19:35:57+0000 1.2.2.2 @@ -4,9 +4,9 @@ * * $RCSfile: Condition.cxx,v $ * - * $Revision: 1.2.2.1 $ + * $Revision: 1.2.2.2 $ * - * last change: $Author: fs $ $Date: 2007/07/16 13:43:53 $ + * last change: $Author: fs $ $Date: 2007/07/16 19:35:57 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -45,7 +45,6 @@ #include "RptResId.hrc" #include "helpids.hrc" #include "reportformula.hxx" -#include "conditionalexpression.hxx" #ifndef _COM_SUN_STAR_UTIL_URL_HPP_ #include <com/sun/star/util/URL.hpp> @@ -290,14 +289,7 @@ impl_layoutAll(); - m_aConditionalExpressions[ eBetween ] = PConditionalExpression( new ConditionalExpression( "AND( ( $$ ) >= ( $1 ); ( $$ ) <= ( $2 ) )" ) ); - m_aConditionalExpressions[ eNotBetween ] = PConditionalExpression( new ConditionalExpression( "NOT( AND( ( $$ ) >= ( $1 ); ( $$ ) <= ( $2 ) ) )" ) ); - m_aConditionalExpressions[ eEqualTo ] = PConditionalExpression( new ConditionalExpression( "( $$ ) = ( $1 )" ) ); - m_aConditionalExpressions[ eNotEqualTo ] = PConditionalExpression( new ConditionalExpression( "( $$ ) <> ( $1 )" ) ); - m_aConditionalExpressions[ eGreaterThan ] = PConditionalExpression( new ConditionalExpression( "( $$ ) > ( $1 )" ) ); - m_aConditionalExpressions[ eLessThan ] = PConditionalExpression( new ConditionalExpression( "( $$ ) < ( $1 )" ) ); - m_aConditionalExpressions[ eGreaterOrEqual ] = PConditionalExpression( new ConditionalExpression( "( $$ ) >= ( $1 )" ) ); - m_aConditionalExpressions[ eLessOrEqual ] = PConditionalExpression( new ConditionalExpression( "( $$ ) <= ( $1 )" ) ); + ConditionalExpressionFactory::getKnownConditionalExpressions( m_aConditionalExpressions ); } // ----------------------------------------------------------------------------- @@ -598,15 +590,15 @@ const ::rtl::OUString sUnprefixedFieldContent( aFieldContentFormula.getBracketedFieldOrExpression() ); // check whether one of the Field Value Expression Factories recognizes the expression - for ( ConditionalExpressions::const_iterator fac = m_aConditionalExpressions.begin(); - fac != m_aConditionalExpressions.end(); - ++fac + for ( ConditionalExpressions::const_iterator exp = m_aConditionalExpressions.begin(); + exp != m_aConditionalExpressions.end(); + ++exp ) { - if ( fac->second->matchExpression( sExpression, sUnprefixedFieldContent, sLHS, sRHS ) ) + if ( exp->second->matchExpression( sExpression, sUnprefixedFieldContent, sLHS, sRHS ) ) { eType = eFieldValueComparison; - eOperation = fac->first; + eOperation = exp->first; break; } } File [changed]: Condition.hxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/dlg/Condition.hxx?r1=1.2.2.1&r2=1.2.2.2 Delta lines: +12 -54 --------------------- --- Condition.hxx 2007-07-16 13:43:53+0000 1.2.2.1 +++ Condition.hxx 2007-07-16 19:35:57+0000 1.2.2.2 @@ -4,9 +4,9 @@ * * $RCSfile: Condition.hxx,v $ * - * $Revision: 1.2.2.1 $ + * $Revision: 1.2.2.2 $ * - * last change: $Author: fs $ $Date: 2007/07/16 13:43:53 $ + * last change: $Author: fs $ $Date: 2007/07/16 19:35:57 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -36,38 +36,23 @@ #ifndef RPTUI_CONDITION_HXX #define RPTUI_CONDITION_HXX -#ifndef _FIXED_HXX //autogen +#include "conditionalexpression.hxx" + +#include <com/sun/star/report/XFormatCondition.hpp> + +#include <dbaccess/ToolBoxHelper.hxx> + +#include <svx/fntctrl.hxx> + +#include <svtools/valueset.hxx> + #include <vcl/fixed.hxx> -#endif -#ifndef _SV_LSTBOX_HXX #include <vcl/lstbox.hxx> -#endif -#ifndef _SV_FIELD_HXX #include <vcl/field.hxx> -#endif -#ifndef _SV_BUTTON_HXX #include <vcl/button.hxx> -#endif -#ifndef _SV_TOOLBOX_HXX #include <vcl/toolbox.hxx> -#endif -#ifndef DBAUI_TOOLBOXHELPER_HXX -#include <dbaccess/ToolBoxHelper.hxx> -#endif -#ifndef _COM_SUN_STAR_REPORT_XFORMATCONDITION_HPP_ -#include <com/sun/star/report/XFormatCondition.hpp> -#endif -#ifndef _SVX_FNTCTRL_HXX -#include <svx/fntctrl.hxx> -#endif -#ifndef _VALUESET_HXX -#include <svtools/valueset.hxx> -#endif - -#include <boost/shared_ptr.hpp> #include <memory> -#include <map> namespace svx { class ToolboxButtonColorUpdater; } @@ -79,33 +64,6 @@ class IConditionalFormatAction; //======================================================================== - //= ConditionType - //======================================================================== - enum ConditionType - { - eFieldValueComparison = 0, - eExpression = 1 - }; - - //======================================================================== - //= ComparisonOperation - //======================================================================== - enum ComparisonOperation - { - eBetween = 0, - eNotBetween = 1, - eEqualTo = 2, - eNotEqualTo = 3, - eGreaterThan = 4, - eLessThan = 5, - eGreaterOrEqual = 6, - eLessOrEqual = 7 - }; - - class ConditionalExpression; - typedef ::boost::shared_ptr< ConditionalExpression > PConditionalExpression; - typedef ::std::map< ComparisonOperation, PConditionalExpression > ConditionalExpressions; - //======================================================================== //= Condition //======================================================================== class Condition :public Control --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
