summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-02-22 18:24:10 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-02-24 08:08:00 +0100
commitb7259532d83ea1263f6944974d71162c47203939 (patch)
tree19d6a840d86070831573a583dd45a2b828218323 /dbaccess
parentad73967e99235a2ba9b5a2106c5d6d0f8efaa1ca (diff)
Remove unnecessary bool2any
Change-Id: Ie2caee1d5a7912011d76172539c2f8f37eaee5cf
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/api/RowSet.cxx2
-rw-r--r--dbaccess/source/core/api/RowSetBase.cxx5
-rw-r--r--dbaccess/source/core/dataaccess/datasource.cxx7
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx2
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx4
-rw-r--r--dbaccess/source/ui/misc/indexcollection.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/querycontroller.cxx7
7 files changed, 14 insertions, 17 deletions
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index fa1b228a6578..3b502b29a111 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -1887,7 +1887,7 @@ void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard& _rClearForNotifi
pColumn->setFastPropertyValue_NoBroadcast(PROPERTY_ID_RELATIVEPOSITION,makeAny(sal_Int32(i+1)));
pColumn->setFastPropertyValue_NoBroadcast(PROPERTY_ID_WIDTH,makeAny(sal_Int32(227)));
pColumn->setFastPropertyValue_NoBroadcast(PROPERTY_ID_ALIGN,makeAny((sal_Int32)0));
- pColumn->setFastPropertyValue_NoBroadcast(PROPERTY_ID_HIDDEN,::cppu::bool2any(false));
+ pColumn->setFastPropertyValue_NoBroadcast(PROPERTY_ID_HIDDEN, css::uno::Any(false));
}
catch(Exception&)
{
diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx
index c3b2e7a88eaf..7b5646c086ac 100644
--- a/dbaccess/source/core/api/RowSetBase.cxx
+++ b/dbaccess/source/core/api/RowSetBase.cxx
@@ -30,7 +30,6 @@
#include <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/util/NumberFormat.hpp>
#include <comphelper/sequence.hxx>
-#include <comphelper/extract.hxx>
#include <comphelper/seqstream.hxx>
#include <connectivity/dbexception.hxx>
#include <tools/debug.hxx>
@@ -1292,8 +1291,8 @@ sal_Bool ORowSetBase::isPropertyChangeNotificationEnabled() const
void ORowSetBase::fireProperty( sal_Int32 _nProperty, sal_Bool _bNew, sal_Bool _bOld )
{
SAL_INFO("dbaccess", "ORowSetBase::fireProperty" );
- Any aNew = bool2any( _bNew );
- Any aOld = bool2any( _bOld );
+ Any aNew = css::uno::makeAny( _bNew );
+ Any aOld = css::uno::makeAny( _bOld );
fire( &_nProperty, &aNew, &aOld, 1, sal_False );
}
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx
index 299d31bbbe74..d436cfc76fd9 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -49,7 +49,6 @@
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/view/XPrintable.hpp>
-#include <comphelper/extract.hxx>
#include <comphelper/guarding.hxx>
#include <comphelper/interaction.hxx>
#include <comphelper/namedvaluecollection.hxx>
@@ -982,13 +981,13 @@ void ODatabaseSource::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) con
rValue <<= m_pImpl->m_aPassword;
break;
case PROPERTY_ID_ISPASSWORDREQUIRED:
- rValue = bool2any(m_pImpl->m_bPasswordRequired);
+ rValue <<= m_pImpl->m_bPasswordRequired;
break;
case PROPERTY_ID_SUPPRESSVERSIONCL:
- rValue = bool2any(m_pImpl->m_bSuppressVersionColumns);
+ rValue <<= m_pImpl->m_bSuppressVersionColumns;
break;
case PROPERTY_ID_ISREADONLY:
- rValue = bool2any(m_pImpl->m_bReadOnly);
+ rValue <<= m_pImpl->m_bReadOnly;
break;
case PROPERTY_ID_INFO:
{
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index b679a28d64cd..c3b94448058d 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -2391,7 +2391,7 @@ sal_Bool SbaTableQueryBrowser::implLoadAnything(const OUString& _rDataSourceName
// set this _before_ setting the connection, else the rowset would rebuild it ...
xProp->setPropertyValue(PROPERTY_COMMAND_TYPE, makeAny(_nCommandType));
xProp->setPropertyValue(PROPERTY_COMMAND, makeAny(_rCommand));
- xProp->setPropertyValue(PROPERTY_ESCAPE_PROCESSING, ::cppu::bool2any(_bEscapeProcessing));
+ xProp->setPropertyValue(PROPERTY_ESCAPE_PROCESSING, css::uno::makeAny(_bEscapeProcessing));
if ( m_bPreview )
{
xProp->setPropertyValue(PROPERTY_FETCHDIRECTION, makeAny(FetchDirection::FORWARD));
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 95afe5f22e07..3bbac2950ccd 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -651,10 +651,10 @@ void setColumnProperties(const Reference<XPropertySet>& _rxColumn,const OFieldDe
_rxColumn->setPropertyValue(PROPERTY_PRECISION,makeAny(_pFieldDesc->GetPrecision()));
_rxColumn->setPropertyValue(PROPERTY_SCALE,makeAny(_pFieldDesc->GetScale()));
_rxColumn->setPropertyValue(PROPERTY_ISNULLABLE, makeAny(_pFieldDesc->GetIsNullable()));
- _rxColumn->setPropertyValue(PROPERTY_ISAUTOINCREMENT,::cppu::bool2any(_pFieldDesc->IsAutoIncrement()));
+ _rxColumn->setPropertyValue(PROPERTY_ISAUTOINCREMENT, css::uno::makeAny(_pFieldDesc->IsAutoIncrement()));
_rxColumn->setPropertyValue(PROPERTY_DESCRIPTION,makeAny(_pFieldDesc->GetDescription()));
if ( _rxColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_ISCURRENCY) && _pFieldDesc->IsCurrency() )
- _rxColumn->setPropertyValue(PROPERTY_ISCURRENCY,::cppu::bool2any(_pFieldDesc->IsCurrency()));
+ _rxColumn->setPropertyValue(PROPERTY_ISCURRENCY, css::uno::makeAny(_pFieldDesc->IsCurrency()));
// set autoincrement value when available
// and only set when the entry is not empty, that lets the value in the column untouched
if ( _pFieldDesc->IsAutoIncrement() && !_pFieldDesc->GetAutoIncrementValue().isEmpty() && _rxColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_AUTOINCREMENTCREATION) )
diff --git a/dbaccess/source/ui/misc/indexcollection.cxx b/dbaccess/source/ui/misc/indexcollection.cxx
index ddc12ca4ce22..8fdb36efee65 100644
--- a/dbaccess/source/ui/misc/indexcollection.cxx
+++ b/dbaccess/source/ui/misc/indexcollection.cxx
@@ -154,7 +154,7 @@ namespace dbaui
static const OUString s_sSortPropertyName = "IsAscending";
static const OUString s_sNamePropertyName = "Name";
// the index' own props
- xIndexDescriptor->setPropertyValue(s_sUniquePropertyName, ::cppu::bool2any(_rPos->bUnique));
+ xIndexDescriptor->setPropertyValue(s_sUniquePropertyName, css::uno::makeAny(_rPos->bUnique));
xIndexDescriptor->setPropertyValue(s_sNamePropertyName, makeAny(_rPos->sName));
// the fields
@@ -169,7 +169,7 @@ namespace dbaui
OSL_ENSURE(xColDescriptor.is(), "OIndexCollection::commitNewIndex: invalid column descriptor!");
if (xColDescriptor.is())
{
- xColDescriptor->setPropertyValue(s_sSortPropertyName, ::cppu::bool2any(aFieldLoop->bSortAscending));
+ xColDescriptor->setPropertyValue(s_sSortPropertyName, css::uno::makeAny(aFieldLoop->bSortAscending));
xColDescriptor->setPropertyValue(s_sNamePropertyName, makeAny(OUString(aFieldLoop->sFieldName)));
xAppendCols->appendByDescriptor(xColDescriptor);
}
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index 94de2c99109e..f18a15f3e23d 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -66,7 +66,6 @@
#include <com/sun/star/ui/XUIElement.hpp>
#include <comphelper/basicio.hxx>
-#include <comphelper/extract.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/property.hxx>
#include <comphelper/seqstream.hxx>
@@ -1333,7 +1332,7 @@ void OQueryController::executeQuery()
aProps[2].Value <<= sTranslatedStmt;
aProps[3].Name = PROPERTY_ENABLE_BROWSER;
- aProps[3].Value = ::cppu::bool2any(false);
+ aProps[3].Value <<= false;
aProps[4].Name = PROPERTY_ACTIVE_CONNECTION;
aProps[4].Value <<= getConnection();
@@ -1348,7 +1347,7 @@ void OQueryController::executeQuery()
aProps[7].Value <<= m_sUpdateTableName;
aProps[8].Name = PROPERTY_ESCAPE_PROCESSING;
- aProps[8].Value = ::cppu::bool2any(m_bEscapeProcessing);
+ aProps[8].Value <<= m_bEscapeProcessing;
xDisp->dispatch(aWantToDispatch, aProps);
// check the state of the beamer
@@ -1524,7 +1523,7 @@ bool OQueryController::doSaveAsDoc(sal_Bool _bSaveAs)
if ( editingQuery() )
{
xQuery->setPropertyValue( PROPERTY_UPDATE_TABLENAME, makeAny( m_sUpdateTableName ) );
- xQuery->setPropertyValue( PROPERTY_ESCAPE_PROCESSING,::cppu::bool2any( m_bEscapeProcessing ) );
+ xQuery->setPropertyValue( PROPERTY_ESCAPE_PROCESSING, css::uno::makeAny( m_bEscapeProcessing ) );
xQuery->setPropertyValue( PROPERTY_LAYOUTINFORMATION, getViewData() );
}