summaryrefslogtreecommitdiff
path: root/reportdesign/source/ui/inspection/GeometryHandler.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'reportdesign/source/ui/inspection/GeometryHandler.cxx')
-rw-r--r--reportdesign/source/ui/inspection/GeometryHandler.cxx49
1 files changed, 22 insertions, 27 deletions
diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx
index c2b3871ab..6cd62ca71 100644
--- a/reportdesign/source/ui/inspection/GeometryHandler.cxx
+++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -115,6 +116,8 @@
#include "helpids.hrc"
#include <toolkit/helper/convert.hxx>
+#include <o3tl/compat_functional.hxx>
+
#define DATA_OR_FORMULA 0
#define FUNCTION 1
#define COUNTER 2
@@ -126,18 +129,17 @@ namespace rptui
{
//........................................................................
using namespace ::com::sun::star;
-//using namespace formula;
// comparing two property instances
struct PropertyCompare : public ::std::binary_function< beans::Property, ::rtl::OUString , bool >
{
bool operator() (const beans::Property& x, const ::rtl::OUString& y) const
{
- return x.Name.equals(y);// ? true : false;
+ return x.Name.equals(y);
}
bool operator() (const ::rtl::OUString& x,const beans::Property& y) const
{
- return x.equals(y.Name);// ? true : false;
+ return x.equals(y.Name);
}
};
@@ -806,9 +808,9 @@ inspection::LineDescriptor SAL_CALL GeometryHandler::describePropertyLine(const
{
// add function names
::std::for_each( m_aFunctionNames.begin(), m_aFunctionNames.end(),
- ::std::compose1(
+ ::o3tl::compose1(
::boost::bind( &inspection::XStringListControl::appendListEntry, xListControl,_1 ),
- ::std::select1st<TFunctions::value_type>()));
+ ::o3tl::select1st<TFunctions::value_type>()));
}
else
{
@@ -1024,7 +1026,7 @@ uno::Any SAL_CALL GeometryHandler::convertToPropertyValue(const ::rtl::OUString
}
catch( const uno::Exception& )
{
- OSL_ENSURE( sal_False, "GeometryHandler::convertToPropertyValue: caught an exception while converting via TypeConverter!" );
+ OSL_FAIL( "GeometryHandler::convertToPropertyValue: caught an exception while converting via TypeConverter!" );
}
}
}
@@ -1169,7 +1171,7 @@ uno::Any SAL_CALL GeometryHandler::convertToControlValue(const ::rtl::OUString &
}
catch( const uno::Exception& )
{
- OSL_ENSURE( sal_False, "GeometryHandler::convertToControlValue: caught an exception while converting via TypeConverter!" );
+ OSL_FAIL( "GeometryHandler::convertToControlValue: caught an exception while converting via TypeConverter!" );
}
}
break;
@@ -1312,7 +1314,7 @@ uno::Sequence< beans::Property > SAL_CALL GeometryHandler::getSupportedPropertie
};
const uno::Reference < beans::XPropertySetInfo > xInfo = m_xReportComponent->getPropertySetInfo();
const uno::Sequence< beans::Property> aSeq = xInfo->getProperties();
- for (size_t i = 0; i < sizeof(pIncludeProperties)/sizeof(pIncludeProperties[0]) ;++i )
+ for (size_t i = 0; i < SAL_N_ELEMENTS(pIncludeProperties) ;++i )
{
const beans::Property* pIter = aSeq.getConstArray();
const beans::Property* pEnd = pIter + aSeq.getLength();
@@ -1332,7 +1334,7 @@ uno::Sequence< beans::Property > SAL_CALL GeometryHandler::getSupportedPropertie
}
aNewProps.push_back(*pFind);
}
- } // for (size_t i = 0; i < sizeof(pIncludeProperties)/sizeof(pIncludeProperties[0]) ;++i )
+ }
// special property for shapes
// if ( uno::Reference< report::XShape>(m_xReportComponent,uno::UNO_QUERY).is() )
@@ -1453,7 +1455,6 @@ inspection::InteractiveSelectionResult SAL_CALL GeometryHandler::onInteractivePr
eResult = inspection::InteractiveSelectionResult_ObtainedValue;
beans::PropertyChangeEvent aScopeEvent;
aScopeEvent.PropertyName = PROPERTY_FILLCOLOR;
- // aScopeEvent.OldValue <<= _nOldDataFieldType;
aScopeEvent.NewValue <<= xShape->getPropertyValue(PROPERTY_FILLCOLOR);
m_aPropertyListeners.notify( aScopeEvent, &beans::XPropertyChangeListener::propertyChange );
}
@@ -1522,7 +1523,7 @@ void SAL_CALL GeometryHandler::actuatingPropertyChanged(const ::rtl::OUString &
{
_rxInspectorUI->rebuildPropertyUI(PROPERTY_DATAFIELD);
_rxInspectorUI->rebuildPropertyUI(PROPERTY_FORMULALIST);
- } // if ( bEnable )
+ }
m_xFormComponentHandler->actuatingPropertyChanged(ActuatingPropertyName, NewValue, OldValue, _rxInspectorUI, _bFirstTimeInit);
}
break;
@@ -1612,7 +1613,7 @@ bool GeometryHandler::impl_dialogFilter_nothrow( ::rtl::OUString& _out_rSelected
catch (sdbc::SQLException& e) { aErrorInfo = e; }
catch( const uno::Exception& )
{
- OSL_ENSURE( sal_False, "GeometryHandler::impl_dialogFilter_nothrow: caught an exception!" );
+ OSL_FAIL( "GeometryHandler::impl_dialogFilter_nothrow: caught an exception!" );
}
if ( aErrorInfo.isValid() )
@@ -1654,7 +1655,7 @@ void GeometryHandler::impl_fillFormulaList_nothrow(::std::vector< ::rtl::OUStrin
if ( m_nDataFieldType == FUNCTION )
::std::transform(m_aDefaultFunctions.begin(),m_aDefaultFunctions.end(),::std::back_inserter(_out_rList),::boost::bind( &DefaultFunction::getName, _1 ));
else if ( m_nDataFieldType == USER_DEF_FUNCTION )
- ::std::transform(m_aFunctionNames.begin(),m_aFunctionNames.end(),::std::back_inserter(_out_rList),::std::select1st<TFunctions::value_type>());
+ ::std::transform(m_aFunctionNames.begin(),m_aFunctionNames.end(),::std::back_inserter(_out_rList),::o3tl::select1st<TFunctions::value_type>());
}
// -----------------------------------------------------------------------------
::rtl::OUString GeometryHandler::impl_ConvertUIToMimeType_nothrow(const ::rtl::OUString& _sUIName) const
@@ -1672,7 +1673,7 @@ void GeometryHandler::impl_fillFormulaList_nothrow(::std::vector< ::rtl::OUStrin
const uno::Sequence< ::rtl::OUString > aMimeTypes( xReportDefinition->getAvailableMimeTypes() );
sRet = aMimeTypes[nPos];
}
- } // if ( aFind != aList.end() )
+ }
return sRet;
}
// -----------------------------------------------------------------------------
@@ -1709,7 +1710,7 @@ void GeometryHandler::impl_fillMimeTypes_nothrow(::std::vector< ::rtl::OUString
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception caught!");
+ OSL_FAIL("Exception caught!");
}
}
// -----------------------------------------------------------------------------
@@ -1741,7 +1742,7 @@ void GeometryHandler::impl_fillScopeList_nothrow(::std::vector< ::rtl::OUString
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception caught!");
+ OSL_FAIL("Exception caught!");
}
}
// -----------------------------------------------------------------------------
@@ -1859,7 +1860,7 @@ sal_Bool GeometryHandler::isDefaultFunction( const ::rtl::OUString& _sQuotedFunc
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception caught!");
+ OSL_FAIL("Exception caught!");
}
return bDefaultFunction;
}
@@ -1899,7 +1900,7 @@ sal_Bool GeometryHandler::impl_isDefaultFunction_nothrow( const uno::Reference<
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception caught!");
+ OSL_FAIL("Exception caught!");
}
return bDefaultFunction;
}
@@ -1919,13 +1920,6 @@ void GeometryHandler::loadDefaultFunctions()
DefaultFunction aDefault;
aDefault.m_bDeepTraversing = sal_False;
- //aDefault.m_sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Counter"));
- //aDefault.m_sFormula = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:[%FunctionName] + 1"));
- //aDefault.m_sSearchString = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:\\[[:alpha:]+[:alnum:]*\\][:space:]*\\+[:space:]*1"));
- //aDefault.m_sInitialFormula.IsPresent = sal_True;
- //aDefault.m_sInitialFormula.Value = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:1"));
- //m_aDefaultFunctions.push_back(aDefault);
-
aDefault.m_bPreEvaluated = sal_True;
aDefault.m_sName = String(ModuleRes(RID_STR_F_ACCUMULATION));
@@ -1997,7 +1991,7 @@ void GeometryHandler::createDefaultFunction(::osl::ResettableMutexGuard& _aGuard
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception caught!");
+ OSL_FAIL("Exception caught!");
}
}
// -----------------------------------------------------------------------------
@@ -2087,7 +2081,7 @@ void GeometryHandler::impl_initFieldList_nothrow( uno::Sequence< ::rtl::OUString
}
catch (uno::Exception&)
{
- DBG_ERROR( "GeometryHandler::impl_initFieldList_nothrow: caught an exception!" );
+ OSL_FAIL( "GeometryHandler::impl_initFieldList_nothrow: caught an exception!" );
}
}
// -----------------------------------------------------------------------------
@@ -2248,3 +2242,4 @@ void SAL_CALL GeometryHandler::propertyChange(const beans::PropertyChangeEvent&
} // namespace rptui
//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */