[Libreoffice-commits] core.git: 3 commits - connectivity/source cui/source dbaccess/source extensions/source filter/source forms/source include/comphelper include/salhelper linguistic/source reportdesign/source sc/source sd/source svtools/source svx/source sw/source toolkit/source unotools/source xmloff/source
Stephan Bergmann
sbergman at redhat.com
Sun Feb 23 23:08:51 PST 2014
connectivity/source/commontools/TKeys.cxx | 3
connectivity/source/commontools/TTableHelper.cxx | 6 -
connectivity/source/cpool/ZPoolCollection.cxx | 15 ++-
connectivity/source/drivers/dbase/DDatabaseMetaData.cxx | 14 +--
connectivity/source/drivers/dbase/DTable.cxx | 19 ++--
connectivity/source/drivers/file/FDatabaseMetaData.cxx | 5 -
connectivity/source/drivers/flat/EDatabaseMetaData.cxx | 8 +-
connectivity/source/drivers/odbc/OResultSet.cxx | 3
connectivity/source/manager/mdrivermanager.cxx | 3
cui/source/dialogs/showcols.cxx | 5 -
dbaccess/source/core/api/RowSet.cxx | 5 -
dbaccess/source/core/api/RowSetBase.cxx | 5 -
dbaccess/source/core/dataaccess/datasource.cxx | 7 -
dbaccess/source/ui/browser/brwctrlr.cxx | 4 -
dbaccess/source/ui/browser/sbagrid.cxx | 10 +-
dbaccess/source/ui/browser/unodatbr.cxx | 7 +
dbaccess/source/ui/misc/UITools.cxx | 4 -
dbaccess/source/ui/misc/indexcollection.cxx | 4 -
dbaccess/source/ui/querydesign/querycontroller.cxx | 7 -
dbaccess/source/ui/tabledesign/TableController.cxx | 30 ++++---
extensions/source/propctrlr/fontdialog.cxx | 2
extensions/source/propctrlr/formcomponenthandler.cxx | 4 -
filter/source/msfilter/escherex.cxx | 6 -
forms/source/component/DatabaseForm.cxx | 11 +-
forms/source/component/Grid.cxx | 9 +-
forms/source/component/ImageControl.cxx | 7 +
forms/source/component/ListBox.cxx | 2
forms/source/component/RadioButton.cxx | 1
include/comphelper/extract.hxx | 30 -------
include/salhelper/refobj.hxx | 4 -
linguistic/source/lngsvcmgr.cxx | 29 ++++++-
reportdesign/source/ui/report/ReportController.cxx | 6 -
sc/source/filter/xml/xmlsorti.cxx | 9 +-
sc/source/filter/xml/xmlstyle.cxx | 12 +--
sc/source/filter/xml/xmlstyli.cxx | 2
sc/source/ui/unoobj/dapiuno.cxx | 22 ++---
sc/source/ui/unoobj/datauno.cxx | 2
sd/source/filter/eppt/pptx-epptbase.cxx | 9 +-
sd/source/ui/unoidl/unoobj.cxx | 2
svtools/source/control/accessibleruler.cxx | 2
svtools/source/dialogs/addresstemplate.cxx | 5 -
svtools/source/uno/genericunodialog.cxx | 4 -
svx/source/accessibility/svxpixelctlaccessiblecontext.cxx | 4 -
svx/source/fmcomp/fmgridcl.cxx | 48 ++++++------
svx/source/fmcomp/fmgridif.cxx | 20 ++---
svx/source/fmcomp/gridcell.cxx | 5 -
svx/source/fmcomp/gridctrl.cxx | 5 -
svx/source/form/fmshimp.cxx | 3
svx/source/form/formcontroller.cxx | 5 -
sw/source/filter/ww8/ww8par.cxx | 3
sw/source/filter/ww8/ww8par3.cxx | 3
toolkit/source/controls/unocontrols.cxx | 3
unotools/source/config/confignode.cxx | 10 +-
xmloff/source/core/xmlexp.cxx | 2
xmloff/source/core/xmlimp.cxx | 2
xmloff/source/draw/animimp.cxx | 7 -
xmloff/source/draw/eventimp.cxx | 3
xmloff/source/draw/ximpshap.cxx | 25 +++---
xmloff/source/draw/ximpshow.cxx | 23 ++---
xmloff/source/forms/eventimport.cxx | 3
xmloff/source/forms/propertyimport.cxx | 2
xmloff/source/style/NamedBoolPropertyHdl.cxx | 4 -
xmloff/source/style/PageMasterExportPropMapper.cxx | 2
xmloff/source/style/PageMasterPropHdl.cxx | 4 -
xmloff/source/style/XMLBitmapLogicalSizePropertyHandler.cxx | 3
65 files changed, 254 insertions(+), 279 deletions(-)
New commits:
commit c19cb642dbce41a481f65bc342bc8dc3008211c8
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Sat Feb 22 18:53:27 2014 +0100
Adapt to osl_atomic_inc-/decrement
Change-Id: I848873b07ab05cefdc755a8bf1301907fdfbc299
diff --git a/include/salhelper/refobj.hxx b/include/salhelper/refobj.hxx
index 16e85fb..9a1cb9b 100644
--- a/include/salhelper/refobj.hxx
+++ b/include/salhelper/refobj.hxx
@@ -71,13 +71,13 @@ public:
*/
virtual oslInterlockedCount SAL_CALL acquire() SAL_THROW(())
{
- return ::osl_incrementInterlockedCount (&m_nReferenceCount);
+ return osl_atomic_increment (&m_nReferenceCount);
}
virtual oslInterlockedCount SAL_CALL release() SAL_THROW(())
{
oslInterlockedCount result;
- result = ::osl_decrementInterlockedCount (&m_nReferenceCount);
+ result = ::osl_atomic_decrement (&m_nReferenceCount);
if (result == 0)
{
// Last reference released.
diff --git a/svtools/source/control/accessibleruler.cxx b/svtools/source/control/accessibleruler.cxx
index 6a42ae7..0b0a81c 100644
--- a/svtools/source/control/accessibleruler.cxx
+++ b/svtools/source/control/accessibleruler.cxx
@@ -65,7 +65,7 @@ SvtRulerAccessible::~SvtRulerAccessible()
if( IsAlive() )
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
dispose(); // set mpRepr = NULL & release all childs
}
}
diff --git a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
index 527d2cf..f4926b9 100644
--- a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
+++ b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
@@ -64,7 +64,7 @@ SvxPixelCtlAccessible::~SvxPixelCtlAccessible()
{
if( IsAlive() )
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
dispose(); // set mpRepr = NULL & release all childs
}
}
@@ -727,7 +727,7 @@ SvxPixelCtlAccessibleChild::~SvxPixelCtlAccessibleChild()
if( IsAlive() )
{
- osl_incrementInterlockedCount( &m_refCount );
+ osl_atomic_increment( &m_refCount );
dispose(); // set mpRepr = NULL & release all childs
}
}
commit b7259532d83ea1263f6944974d71162c47203939
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Sat Feb 22 18:24:10 2014 +0100
Remove unnecessary bool2any
Change-Id: Ie2caee1d5a7912011d76172539c2f8f37eaee5cf
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 0747cfc..4dfb402 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -1076,7 +1076,7 @@ sal_Bool ODbaseTable::CreateImpl()
try
{
Content aContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
- aContent.executeCommand( "delete",bool2any( true ) );
+ aContent.executeCommand( "delete", css::uno::Any( true ) );
}
catch(const Exception&) // an exception is thrown when no file exists
{
@@ -1104,7 +1104,7 @@ sal_Bool ODbaseTable::CreateImpl()
try
{
Content aMemoContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
- aMemoContent.executeCommand( "delete",bool2any( true ) );
+ aMemoContent.executeCommand( "delete", css::uno::Any( true ) );
}
catch(const Exception&)
{
@@ -1120,7 +1120,7 @@ sal_Bool ODbaseTable::CreateImpl()
{
aURL.setExtension(aExt); // kill dbf file
Content aMemoContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
- aMemoContent.executeCommand( "delete",bool2any( true ) );
+ aMemoContent.executeCommand( "delete", css::uno::Any( true ) );
return sal_False;
}
m_aHeader.db_typ = dBaseIIIMemo;
diff --git a/connectivity/source/drivers/odbc/OResultSet.cxx b/connectivity/source/drivers/odbc/OResultSet.cxx
index cc59ed2..13040a0 100644
--- a/connectivity/source/drivers/odbc/OResultSet.cxx
+++ b/connectivity/source/drivers/odbc/OResultSet.cxx
@@ -31,7 +31,6 @@
#include <comphelper/sequence.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <cppuhelper/supportsservice.hxx>
-#include <comphelper/extract.hxx>
#include <com/sun/star/lang/DisposedException.hpp>
#include <comphelper/types.hxx>
#include "connectivity/dbtools.hxx"
@@ -1517,7 +1516,7 @@ void OResultSet::getFastPropertyValue(
switch(nHandle)
{
case PROPERTY_ID_ISBOOKMARKABLE:
- rValue = bool2any(isBookmarkable());
+ rValue = css::uno::makeAny(isBookmarkable());
break;
case PROPERTY_ID_CURSORNAME:
rValue <<= getCursorName();
diff --git a/cui/source/dialogs/showcols.cxx b/cui/source/dialogs/showcols.cxx
index 8c9ac35..b0339cb 100644
--- a/cui/source/dialogs/showcols.cxx
+++ b/cui/source/dialogs/showcols.cxx
@@ -24,7 +24,6 @@
#include <dialmgr.hxx>
#include <vcl/msgbox.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <comphelper/extract.hxx>
#include <comphelper/types.hxx>
#define CUIFM_PROP_HIDDEN "Hidden"
@@ -60,7 +59,7 @@ IMPL_LINK_NOARG(FmShowColsDialog, OnClickedOk)
{
try
{
- xCol->setPropertyValue(CUIFM_PROP_HIDDEN, ::cppu::bool2any(false));
+ xCol->setPropertyValue(CUIFM_PROP_HIDDEN, css::uno::Any(false));
}
catch(...)
{
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index fa1b228..3b502b2 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 c3b2e7a..7b5646c 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 299d31b..d436cfc 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 b679a28..c3b9444 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 95afe5f..3bbac29 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 ddc12ca..8fdb36e 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 94de2c9..f18a15f 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() );
}
diff --git a/extensions/source/propctrlr/fontdialog.cxx b/extensions/source/propctrlr/fontdialog.cxx
index 59fb8a8..f6d598b 100644
--- a/extensions/source/propctrlr/fontdialog.cxx
+++ b/extensions/source/propctrlr/fontdialog.cxx
@@ -405,7 +405,7 @@ namespace pcr
const SvxWordLineModeItem& rWordLineModeItem =
static_cast<const SvxWordLineModeItem&>(_rSet.Get(CFID_WORDLINEMODE));
- lcl_pushBackPropertyValue( _out_properties, PROPERTY_WORDLINEMODE, ::cppu::bool2any(rWordLineModeItem.GetValue()));
+ lcl_pushBackPropertyValue( _out_properties, PROPERTY_WORDLINEMODE, css::uno::makeAny(rWordLineModeItem.GetValue()));
}
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index 19a277b..88adb0b 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -2781,9 +2781,9 @@ namespace pcr
if (xController.is())
{
// do a preview by default
- xController->setValue(ExtendedFilePickerElementIds::CHECKBOX_PREVIEW, 0, ::cppu::bool2any(true));
+ xController->setValue(ExtendedFilePickerElementIds::CHECKBOX_PREVIEW, 0, css::uno::Any(true));
- xController->setValue(ExtendedFilePickerElementIds::CHECKBOX_LINK, 0, ::cppu::bool2any(true));
+ xController->setValue(ExtendedFilePickerElementIds::CHECKBOX_LINK, 0, css::uno::Any(true));
xController->enableControl(ExtendedFilePickerElementIds::CHECKBOX_LINK, false);
}
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index aed7bb8..f49ca91 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -1510,7 +1510,7 @@ Any SAL_CALL ODatabaseForm::getFastPropertyValue( sal_Int32 nHandle )
throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
{
if ((nHandle == PROPERTY_ID_ISMODIFIED) && (m_nResetsPending > 0))
- return ::cppu::bool2any(false);
+ return css::uno::Any(false);
// don't allow the aggregate which is currently being reset to return a (temporary) "yes"
else
return OPropertySetAggregationHelper::getFastPropertyValue(nHandle);
@@ -2080,7 +2080,7 @@ void ODatabaseForm::reset_impl(bool _bAproveByListeners)
// (do this _before_ the listeners are notified ! their reaction (maybe asynchronous) may depend
// on the modified state of the row)
if (bInsertRow)
- m_xAggregateSet->setPropertyValue(PROPERTY_ISMODIFIED, ::cppu::bool2any(false));
+ m_xAggregateSet->setPropertyValue(PROPERTY_ISMODIFIED, css::uno::Any(false));
aResetGuard.clear();
{
@@ -2091,7 +2091,7 @@ void ODatabaseForm::reset_impl(bool _bAproveByListeners)
// and again : ensure the row isn't modified
// we already did this after we (and maybe our dependents) resetted the values, but the listeners may have changed the row, too
if (bInsertRow)
- m_xAggregateSet->setPropertyValue(PROPERTY_ISMODIFIED, ::cppu::bool2any(false));
+ m_xAggregateSet->setPropertyValue(PROPERTY_ISMODIFIED, css::uno::Any(false));
--m_nResetsPending;
}
diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx
index d2f1be6..3df259e 100644
--- a/forms/source/component/ImageControl.cxx
+++ b/forms/source/component/ImageControl.cxx
@@ -815,7 +815,7 @@ bool OImageControlControl::implInsertGraphics()
aDialog.SetTitle( sTitle );
Reference< XFilePickerControlAccess > xController( aDialog.GetFilePicker(), UNO_QUERY_THROW );
- xController->setValue(ExtendedFilePickerElementIds::CHECKBOX_PREVIEW, 0, ::cppu::bool2any(true));
+ xController->setValue(ExtendedFilePickerElementIds::CHECKBOX_PREVIEW, 0, css::uno::Any(true));
Reference<XPropertySet> xBoundField;
if ( hasProperty( PROPERTY_BOUNDFIELD, xSet ) )
diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx
index aa34233..45193db 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -994,7 +994,7 @@ namespace frm
// - this would be unable to reflect in the db column
if ( hasField() )
{
- setFastPropertyValue( PROPERTY_ID_MULTISELECTION, ::cppu::bool2any( false ) );
+ setFastPropertyValue( PROPERTY_ID_MULTISELECTION, css::uno::Any(false) );
}
if ( !hasExternalListSource() )
diff --git a/forms/source/component/RadioButton.cxx b/forms/source/component/RadioButton.cxx
index 3e121a7..991df45 100644
--- a/forms/source/component/RadioButton.cxx
+++ b/forms/source/component/RadioButton.cxx
@@ -23,7 +23,6 @@
#include "property.hrc"
#include "services.hxx"
#include <tools/debug.hxx>
-#include <comphelper/extract.hxx>
#include <comphelper/basicio.hxx>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/container/XIndexAccess.hpp>
diff --git a/include/comphelper/extract.hxx b/include/comphelper/extract.hxx
index 07acf42..9a788c7 100644
--- a/include/comphelper/extract.hxx
+++ b/include/comphelper/extract.hxx
@@ -121,17 +121,6 @@ inline bool SAL_CALL any2bool( const ::com::sun::star::uno::Any & rAny )
}
}
-/**
- * Puts a boolean in an any.
- *
- * @DEPRECATED : use makeAny< sal_Bool >()
- *
- */
-inline ::com::sun::star::uno::Any SAL_CALL bool2any( bool bBool )
-{
- return ::com::sun::star::uno::Any( &bBool, ::getCppuBooleanType() );
-}
-
}
#endif
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 472d168..a683f8c 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -3012,13 +3012,13 @@ void OReportController::insertGraphic()
aDialog.SetTitle( sTitle );
uno::Reference< ui::dialogs::XFilePickerControlAccess > xController(aDialog.GetFilePicker(), UNO_QUERY_THROW);
- xController->setValue(ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_PREVIEW, 0, ::cppu::bool2any(true));
+ xController->setValue(ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_PREVIEW, 0, css::uno::Any(true));
xController->enableControl(ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_LINK, sal_False/*sal_True*/);
- sal_Bool bLink = sal_True;
- xController->setValue( ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_LINK, 0, ::cppu::bool2any( bLink ) );
+ xController->setValue( ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_LINK, 0, css::uno::Any(true) );
if ( ERRCODE_NONE == aDialog.Execute() )
{
+ sal_Bool bLink = sal_True;
xController->getValue( ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_LINK, 0) >>= bLink;
uno::Sequence<beans::PropertyValue> aArgs(2);
aArgs[0].Name = PROPERTY_IMAGEURL;
diff --git a/sc/source/filter/xml/xmlsorti.cxx b/sc/source/filter/xml/xmlsorti.cxx
index c111cf4..8df1271 100644
--- a/sc/source/filter/xml/xmlsorti.cxx
+++ b/sc/source/filter/xml/xmlsorti.cxx
@@ -27,7 +27,6 @@
#include <xmloff/xmltkmap.hxx>
#include <xmloff/nmspmap.hxx>
-#include <comphelper/extract.hxx>
#include <xmloff/xmltoken.hxx>
#define SC_USERLIST "UserList"
@@ -142,13 +141,13 @@ void ScXMLSortContext::EndElement()
++i;
uno::Sequence <beans::PropertyValue> aSortDescriptor(7 + i);
aSortDescriptor[0].Name = OUString(SC_UNONAME_BINDFMT);
- aSortDescriptor[0].Value = ::cppu::bool2any(bBindFormatsToContent);
+ aSortDescriptor[0].Value = css::uno::makeAny(bBindFormatsToContent);
aSortDescriptor[1].Name = OUString(SC_UNONAME_COPYOUT);
- aSortDescriptor[1].Value = ::cppu::bool2any(bCopyOutputData);
+ aSortDescriptor[1].Value = css::uno::makeAny(bCopyOutputData);
aSortDescriptor[2].Name = OUString(SC_UNONAME_ISCASE);
- aSortDescriptor[2].Value = ::cppu::bool2any(bIsCaseSensitive);
+ aSortDescriptor[2].Value = css::uno::makeAny(bIsCaseSensitive);
aSortDescriptor[3].Name = OUString(SC_UNONAME_ISULIST);
- aSortDescriptor[3].Value = ::cppu::bool2any(bEnabledUserList);
+ aSortDescriptor[3].Value = css::uno::makeAny(bEnabledUserList);
aSortDescriptor[4].Name = OUString(SC_UNONAME_OUTPOS);
aSortDescriptor[4].Value <<= aOutputPosition;
aSortDescriptor[5].Name = OUString(SC_UNONAME_UINDEX);
diff --git a/sc/source/filter/xml/xmlstyle.cxx b/sc/source/filter/xml/xmlstyle.cxx
index c36708d..baec1f4 100644
--- a/sc/source/filter/xml/xmlstyle.cxx
+++ b/sc/source/filter/xml/xmlstyle.cxx
@@ -1814,13 +1814,13 @@ bool XmlScPropHdl_BreakBefore::importXML(
if (IsXMLToken(rStrImpValue, XML_AUTO))
{
bValue = false;
- rValue = ::cppu::bool2any(bValue);
+ rValue <<= bValue;
bRetval = true;
}
else if (IsXMLToken(rStrImpValue, XML_PAGE))
{
bValue = true;
- rValue = ::cppu::bool2any(bValue);
+ rValue <<= bValue;
bRetval = true;
}
@@ -1868,12 +1868,12 @@ bool XmlScPropHdl_IsTextWrapped::importXML(
if (IsXMLToken(rStrImpValue, XML_WRAP))
{
- rValue = ::cppu::bool2any(true);
+ rValue <<= true;
bRetval = true;
}
else if (IsXMLToken(rStrImpValue, XML_NO_WRAP))
{
- rValue = ::cppu::bool2any(false);
+ rValue <<= false;
bRetval = true;
}
@@ -1937,12 +1937,12 @@ bool XmlScPropHdl_Vertical::importXML(
if (IsXMLToken(rStrImpValue, XML_AUTO))
{
- rValue = ::cppu::bool2any(true);
+ rValue <<= true;
bRetval = true;
}
else if (IsXMLToken(rStrImpValue, XML_0))
{
- rValue = ::cppu::bool2any(false);
+ rValue <<= false;
bRetval = true;
}
diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx
index 7daa392..58b13ca 100644
--- a/sc/source/filter/xml/xmlstyli.cxx
+++ b/sc/source/filter/xml/xmlstyli.cxx
@@ -271,7 +271,7 @@ void ScXMLRowImportPropertyMapper::finished(::std::vector< XMLPropertyState >& r
}
else if (pHeight)
{
- rProperties.push_back(XMLPropertyState(maPropMapper->FindEntryIndex(CTF_SC_ROWOPTIMALHEIGHT), ::cppu::bool2any( false )));
+ rProperties.push_back(XMLPropertyState(maPropMapper->FindEntryIndex(CTF_SC_ROWOPTIMALHEIGHT), css::uno::Any(false)));
}
// don't access pointers to rProperties elements after push_back!
}
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index 2e33485..664aa01 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -933,27 +933,27 @@ Any SAL_CALL ScDataPilotDescriptorBase::getPropertyValue( const OUString& aPrope
OUString aNameString = aPropertyName;
if ( aNameString.equalsAscii( SC_UNO_DP_COLGRAND ) )
{
- aRet = ::cppu::bool2any( aNewData.GetColumnGrand() );
+ aRet <<= aNewData.GetColumnGrand();
}
else if ( aNameString.equalsAscii( SC_UNO_DP_IGNORE_EMPTYROWS ) )
{
- aRet = ::cppu::bool2any( aNewData.GetIgnoreEmptyRows() );
+ aRet <<= aNewData.GetIgnoreEmptyRows();
}
else if ( aNameString.equalsAscii( SC_UNO_DP_REPEATEMPTY ) )
{
- aRet = ::cppu::bool2any( aNewData.GetRepeatIfEmpty() );
+ aRet <<= aNewData.GetRepeatIfEmpty();
}
else if ( aNameString.equalsAscii( SC_UNO_DP_ROWGRAND ) )
{
- aRet = ::cppu::bool2any( aNewData.GetRowGrand() );
+ aRet <<= aNewData.GetRowGrand();
}
else if ( aNameString.equalsAscii( SC_UNO_DP_SHOWFILTER ) )
{
- aRet = ::cppu::bool2any( aNewData.GetFilterButton() );
+ aRet <<= aNewData.GetFilterButton();
}
else if ( aNameString.equalsAscii( SC_UNO_DP_DRILLDOWN ) )
{
- aRet = ::cppu::bool2any( aNewData.GetDrillDown() );
+ aRet <<= aNewData.GetDrillDown();
}
else if ( aNameString.equalsAscii( SC_UNO_DP_GRANDTOTAL_NAME ) )
{
@@ -2001,7 +2001,7 @@ Any SAL_CALL ScDataPilotFieldObj::getPropertyValue( const OUString& aPropertyNam
else if ( aNameString.equalsAscii( SC_UNONAME_USESELPAGE ) )
aRet <<= getUseCurrentPage();
else if ( aNameString.equalsAscii( SC_UNONAME_HASAUTOSHOW ) )
- aRet = ::cppu::bool2any(getAutoShowInfo() != NULL);
+ aRet <<= (getAutoShowInfo() != NULL);
else if ( aNameString.equalsAscii( SC_UNONAME_AUTOSHOW ) )
{
const DataPilotFieldAutoShowInfo* pInfo = getAutoShowInfo();
@@ -2009,7 +2009,7 @@ Any SAL_CALL ScDataPilotFieldObj::getPropertyValue( const OUString& aPropertyNam
aRet <<= DataPilotFieldAutoShowInfo(*pInfo);
}
else if ( aNameString.equalsAscii( SC_UNONAME_HASLAYOUTINFO ) )
- aRet = ::cppu::bool2any(getLayoutInfo() != NULL);
+ aRet <<= (getLayoutInfo() != NULL);
else if ( aNameString.equalsAscii( SC_UNONAME_LAYOUTINFO ) )
{
const DataPilotFieldLayoutInfo* pInfo = getLayoutInfo();
@@ -2017,7 +2017,7 @@ Any SAL_CALL ScDataPilotFieldObj::getPropertyValue( const OUString& aPropertyNam
aRet <<= DataPilotFieldLayoutInfo(*pInfo);
}
else if ( aNameString.equalsAscii( SC_UNONAME_HASREFERENCE ) )
- aRet = ::cppu::bool2any(getReference() != NULL);
+ aRet <<= (getReference() != NULL);
else if ( aNameString.equalsAscii( SC_UNONAME_REFERENCE ) )
{
const DataPilotFieldReference* pRef = getReference();
@@ -2025,7 +2025,7 @@ Any SAL_CALL ScDataPilotFieldObj::getPropertyValue( const OUString& aPropertyNam
aRet <<= DataPilotFieldReference(*pRef);
}
else if ( aNameString.equalsAscii( SC_UNONAME_HASSORTINFO ) )
- aRet = ::cppu::bool2any(getSortInfo() != NULL);
+ aRet <<= (getSortInfo() != NULL);
else if ( aNameString.equalsAscii( SC_UNONAME_SORTINFO ) )
{
const DataPilotFieldSortInfo* pInfo = getSortInfo();
@@ -2033,7 +2033,7 @@ Any SAL_CALL ScDataPilotFieldObj::getPropertyValue( const OUString& aPropertyNam
aRet <<= DataPilotFieldSortInfo(*pInfo);
}
else if ( aNameString.equalsAscii( SC_UNONAME_ISGROUP ) )
- aRet = ::cppu::bool2any(hasGroupInfo());
+ aRet <<= (hasGroupInfo());
else if ( aNameString.equalsAscii( SC_UNONAME_GROUPINFO ) )
{
aRet <<= getGroupInfo();
diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx
index 8138805..f29c941 100644
--- a/sc/source/ui/unoobj/datauno.cxx
+++ b/sc/source/ui/unoobj/datauno.cxx
@@ -316,7 +316,7 @@ void ScSortDescriptor::FillProperties( uno::Sequence<beans::PropertyValue>& rSeq
// Sequence fuellen
pArray[0].Name = OUString( SC_UNONAME_ISSORTCOLUMNS );
- pArray[0].Value = ::cppu::bool2any(!rParam.bByRow);
+ pArray[0].Value <<= !rParam.bByRow;
pArray[1].Name = OUString( SC_UNONAME_CONTHDR );
ScUnoHelpFunctions::SetBoolInAny( pArray[1].Value, rParam.bHasHeader );
diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index 9ee4eb0..96dcdf5 100644
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -1688,7 +1688,7 @@ uno::Any SAL_CALL SdUnoEventsAccess::getByName( const OUString& aName )
pProperties->Name = maStrPlayFull;
pProperties->Handle = -1;
- pProperties->Value = ::cppu::bool2any(pInfo->mbSecondPlayFull);
+ pProperties->Value = css::uno::makeAny(pInfo->mbSecondPlayFull);
pProperties->State = beans::PropertyState_DIRECT_VALUE;
}
break;
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index fd5bac9..ed5670d 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -605,7 +605,7 @@ IMPL_LINK( FmGridHeader, OnAsyncExecuteDrop, void*, /*NOTINTERESTEDIN*/ )
break;
default:
aCommandType <<= (sal_Int32)CommandType::COMMAND;
- xForm->setPropertyValue(FM_PROP_ESCAPE_PROCESSING, bool2any(2 == nCommandType));
+ xForm->setPropertyValue(FM_PROP_ESCAPE_PROCESSING, css::uno::Any(2 == nCommandType));
break;
}
xForm->setPropertyValue(FM_PROP_COMMANDTYPE, aCommandType);
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 7dd6351..0e2d40a 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -78,7 +78,6 @@
#include <com/sun/star/util/XNumberFormatter.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
-#include <comphelper/extract.hxx>
#include <comphelper/evtmethodhelper.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/property.hxx>
@@ -3613,7 +3612,7 @@ void FmXFormShell::SetWizardUsing(sal_Bool _bUseThem)
Sequence< OUString > aNames(1);
aNames[0] = "FormControlPilotsEnabled";
Sequence< Any > aValues(1);
- aValues[0] = ::cppu::bool2any(m_bUseWizards);
+ aValues[0] <<= m_bUseWizards;
PutProperties(aNames, aValues);
}
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index c31b267..dcc3d8f 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -80,7 +80,6 @@
#include <fchrfmt.hxx>
#include <charfmt.hxx>
-#include <comphelper/extract.hxx>
#include <fltini.hxx>
#include "writerwordglue.hxx"
@@ -1946,7 +1945,7 @@ void SwWW8ImplReader::ImportDop()
{
if (xInfo->hasPropertyByName("ApplyFormDesignMode"))
{
- xDocProps->setPropertyValue("ApplyFormDesignMode", cppu::bool2any(bValue));
+ xDocProps->setPropertyValue("ApplyFormDesignMode", css::uno::makeAny(bValue));
}
}
}
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index e5d462f..ec59633 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -45,7 +45,6 @@
#include <com/sun/star/container/XIndexContainer.hpp>
#include <com/sun/star/text/VertOrientation.hpp>
#include <com/sun/star/text/TextContentAnchorType.hpp>
-#include <comphelper/extract.hxx>
#include <com/sun/star/beans/XPropertyContainer.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
@@ -2446,7 +2445,7 @@ sal_Bool WW8FormulaListBox::Import(const uno::Reference <
}
sal_Bool bDropDown(sal_True);
- xPropSet->setPropertyValue("Dropdown", cppu::bool2any(bDropDown));
+ xPropSet->setPropertyValue("Dropdown", css::uno::makeAny(bDropDown));
if (!maListEntries.empty())
{
diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx
index b0057fe..07e3cfa 100644
--- a/toolkit/source/controls/unocontrols.cxx
+++ b/toolkit/source/controls/unocontrols.cxx
@@ -44,7 +44,6 @@
#include <toolkit/awt/vclxwindows.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <comphelper/processfactory.hxx>
-#include <comphelper/extract.hxx>
#include <vcl/wrkwin.hxx>
#include <vcl/svapp.hxx>
#include <vcl/edit.hxx>
@@ -1121,7 +1120,7 @@ void UnoRadioButtonControl::createPeer( const uno::Reference< awt::XToolkit > &
// have it enabled by default because of 85071)
uno::Reference< awt::XVclWindowPeer > xVclWindowPeer( getPeer(), uno::UNO_QUERY );
if ( xVclWindowPeer.is() )
- xVclWindowPeer->setProperty( GetPropertyName( BASEPROPERTY_AUTOTOGGLE ), ::cppu::bool2any( true ) );
+ xVclWindowPeer->setProperty( GetPropertyName( BASEPROPERTY_AUTOTOGGLE ), css::uno::Any(true) );
}
void UnoRadioButtonControl::addItemListener(const uno::Reference < awt::XItemListener > & l) throw(uno::RuntimeException)
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index eaf3d8e..2228bd0 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -561,7 +561,7 @@ SvXMLExport::~SvXMLExport()
mxExportInfo->setPropertyValue(sProgressCurrent, aAny);
}
if (xPropertySetInfo->hasPropertyByName(sRepeat))
- mxExportInfo->setPropertyValue(sRepeat, cppu::bool2any(mpProgressBarHelper->GetRepeat()));
+ mxExportInfo->setPropertyValue(sRepeat, css::uno::makeAny(mpProgressBarHelper->GetRepeat()));
}
if (mpNumExport && (mnExportFlags & (EXPORT_AUTOSTYLES | EXPORT_STYLES)))
{
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index bb88bfb..4c361e5 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -548,7 +548,7 @@ void SAL_CALL SvXMLImport::endDocument()
mxImportInfo->setPropertyValue(sProgressCurrent, aAny);
}
if (xPropertySetInfo->hasPropertyByName(sRepeat))
- mxImportInfo->setPropertyValue(sRepeat, cppu::bool2any(mpProgressBarHelper->GetRepeat()));
+ mxImportInfo->setPropertyValue(sRepeat, css::uno::makeAny(mpProgressBarHelper->GetRepeat()));
// pProgressBarHelper is deleted in dtor
}
OUString sNumberStyles(XML_NUMBERSTYLES);
diff --git a/xmloff/source/draw/animimp.cxx b/xmloff/source/draw/animimp.cxx
index 154d61b..925e437 100644
--- a/xmloff/source/draw/animimp.cxx
+++ b/xmloff/source/draw/animimp.cxx
@@ -27,7 +27,6 @@
#include <sax/tools/converter.hxx>
#include <list>
-#include <comphelper/extract.hxx>
#include <xmloff/xmltoken.hxx>
#include <xmloff/xmlimp.hxx>
#include <xmloff/xmlnmspe.hxx>
@@ -605,7 +604,7 @@ void XMLAnimationsEffectContext::EndElement()
{
if( meKind == XMLE_HIDE && !mbTextEffect && meEffect == EK_none )
{
- aAny = bool2any( true );
+ aAny <<= true;
xSet->setPropertyValue( mpImpl->msDimHide, aAny );
}
else
@@ -631,10 +630,10 @@ void XMLAnimationsEffectContext::EndElement()
aAny <<= maSoundURL;
xSet->setPropertyValue( mpImpl->msSound, aAny );
- aAny <<= bool2any( mbPlayFull );
+ aAny <<= mbPlayFull;
xSet->setPropertyValue( mpImpl->msPlayFull, aAny );
- aAny <<= bool2any( true );
+ aAny <<= true;
xSet->setPropertyValue( mpImpl->msSoundOn, aAny );
}
else
diff --git a/xmloff/source/draw/eventimp.cxx b/xmloff/source/draw/eventimp.cxx
index 3de70c9..f7158ff 100644
--- a/xmloff/source/draw/eventimp.cxx
+++ b/xmloff/source/draw/eventimp.cxx
@@ -25,7 +25,6 @@
#include <com/sun/star/xml/sax/XAttributeList.hpp>
#include <com/sun/star/presentation/ClickAction.hpp>
#include <tools/urlobj.hxx>
-#include <comphelper/extract.hxx>
#include <sax/tools/converter.hxx>
@@ -462,7 +461,7 @@ void SdXMLEventContext::EndElement()
pProperties->Name = "PlayFull";
pProperties->Handle = -1;
- pProperties->Value = ::cppu::bool2any(mbPlayFull);
+ pProperties->Value <<= mbPlayFull;
pProperties->State = beans::PropertyState_DIRECT_VALUE;
break;
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 49fe17c..d9c95a0 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -35,7 +35,6 @@
#include <com/sun/star/awt/Rectangle.hpp>
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
-#include <comphelper/extract.hxx>
#include "ximpshap.hxx"
#include <xmloff/XMLBase64ImportContext.hxx>
#include <xmloff/XMLShapeStyleContext.hxx>
@@ -1680,10 +1679,10 @@ void SdXMLTextBoxShapeContext::StartElement(const uno::Reference< xml::sax::XAtt
if( xPropsInfo.is() )
{
if( !mbIsPlaceholder && xPropsInfo->hasPropertyByName("IsEmptyPresentationObject"))
- xProps->setPropertyValue("IsEmptyPresentationObject", ::cppu::bool2any( false ) );
+ xProps->setPropertyValue("IsEmptyPresentationObject", css::uno::Any(false) );
if( mbIsUserTransformed && xPropsInfo->hasPropertyByName("IsPlaceholderDependent"))
- xProps->setPropertyValue("IsPlaceholderDependent", ::cppu::bool2any( false ) );
+ xProps->setPropertyValue("IsPlaceholderDependent", css::uno::Any(false) );
}
}
}
@@ -2429,7 +2428,7 @@ void SdXMLGraphicObjectShapeContext::StartElement( const ::com::sun::star::uno::
uno::Reference< beans::XPropertySetInfo > xPropsInfo( xPropset->getPropertySetInfo() );
if( xPropsInfo.is() && xPropsInfo->hasPropertyByName("IsEmptyPresentationObject"))
- xPropset->setPropertyValue("IsEmptyPresentationObject", ::cppu::bool2any( mbIsPlaceholder ) );
+ xPropset->setPropertyValue("IsEmptyPresentationObject", css::uno::makeAny( mbIsPlaceholder ) );
if( !mbIsPlaceholder )
{
@@ -2458,7 +2457,7 @@ void SdXMLGraphicObjectShapeContext::StartElement( const ::com::sun::star::uno::
if( xPropsInfo.is() )
{
if( xPropsInfo->hasPropertyByName("IsPlaceholderDependent"))
- xProps->setPropertyValue("IsPlaceholderDependent", ::cppu::bool2any( false ) );
+ xProps->setPropertyValue("IsPlaceholderDependent", css::uno::Any(false) );
}
}
}
@@ -2569,7 +2568,7 @@ void SdXMLChartShapeContext::StartElement(const uno::Reference< xml::sax::XAttri
{
uno::Reference< beans::XPropertySetInfo > xPropsInfo( xProps->getPropertySetInfo() );
if( xPropsInfo.is() && xPropsInfo->hasPropertyByName("IsEmptyPresentationObject"))
- xProps->setPropertyValue("IsEmptyPresentationObject", ::cppu::bool2any( false ) );
+ xProps->setPropertyValue("IsEmptyPresentationObject", css::uno::Any(false) );
uno::Any aAny;
@@ -2596,7 +2595,7 @@ void SdXMLChartShapeContext::StartElement(const uno::Reference< xml::sax::XAttri
if( xPropsInfo.is() )
{
if( xPropsInfo->hasPropertyByName("IsPlaceholderDependent"))
- xProps->setPropertyValue("IsPlaceholderDependent", ::cppu::bool2any( false ) );
+ xProps->setPropertyValue("IsPlaceholderDependent", css::uno::Any(false) );
}
}
}
@@ -2700,10 +2699,10 @@ void SdXMLObjectShapeContext::StartElement( const ::com::sun::star::uno::Referen
if( xPropsInfo.is() )
{
if( !mbIsPlaceholder && xPropsInfo->hasPropertyByName("IsEmptyPresentationObject"))
- xProps->setPropertyValue("IsEmptyPresentationObject", ::cppu::bool2any( false ) );
+ xProps->setPropertyValue("IsEmptyPresentationObject", css::uno::Any(false) );
if( mbIsUserTransformed && xPropsInfo->hasPropertyByName("IsPlaceholderDependent"))
- xProps->setPropertyValue("IsPlaceholderDependent", ::cppu::bool2any( false ) );
+ xProps->setPropertyValue("IsPlaceholderDependent", css::uno::Any(false) );
}
}
}
@@ -3080,10 +3079,10 @@ void SdXMLPluginShapeContext::StartElement( const ::com::sun::star::uno::Referen
if( xPropsInfo.is() )
{
if( !mbIsPlaceholder && xPropsInfo->hasPropertyByName("IsEmptyPresentationObject"))
- xProps->setPropertyValue("IsEmptyPresentationObject", ::cppu::bool2any( false ) );
+ xProps->setPropertyValue("IsEmptyPresentationObject", css::uno::Any(false) );
if( mbIsUserTransformed && xPropsInfo->hasPropertyByName("IsPlaceholderDependent"))
- xProps->setPropertyValue("IsPlaceholderDependent", ::cppu::bool2any( false ) );
+ xProps->setPropertyValue("IsPlaceholderDependent", css::uno::Any(false) );
}
}
}
@@ -3887,10 +3886,10 @@ void SdXMLTableShapeContext::StartElement( const ::com::sun::star::uno::Referenc
if( xPropsInfo.is() )
{
if( !mbIsPlaceholder && xPropsInfo->hasPropertyByName("IsEmptyPresentationObject"))
- xProps->setPropertyValue("IsEmptyPresentationObject", ::cppu::bool2any( false ) );
+ xProps->setPropertyValue("IsEmptyPresentationObject", css::uno::Any(false) );
if( mbIsUserTransformed && xPropsInfo->hasPropertyByName("IsPlaceholderDependent"))
- xProps->setPropertyValue("IsPlaceholderDependent", ::cppu::bool2any( false ) );
+ xProps->setPropertyValue("IsPlaceholderDependent", css::uno::Any(false) );
}
}
}
diff --git a/xmloff/source/draw/ximpshow.cxx b/xmloff/source/draw/ximpshow.cxx
index affe782..055ccf3 100644
--- a/xmloff/source/draw/ximpshow.cxx
+++ b/xmloff/source/draw/ximpshow.cxx
@@ -27,7 +27,6 @@
#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
#include <sax/tools/converter.hxx>
#include <xmloff/xmltoken.hxx>
-#include <comphelper/extract.hxx>
#include <xmloff/xmlnmspe.hxx>
#include <xmloff/nmspmap.hxx>
#include <xmloff/xmluconv.hxx>
@@ -125,57 +124,57 @@ SdXMLShowsContext::SdXMLShowsContext( SdXMLImport& rImport, sal_uInt16 nPrfx, c
}
else if( IsXMLToken( aLocalName, XML_ANIMATIONS ) )
{
- aAny = bool2any( IsXMLToken( sValue, XML_ENABLED ) );
+ aAny <<= IsXMLToken( sValue, XML_ENABLED );
mpImpl->mxPresProps->setPropertyValue("AllowAnimations", aAny );
}
else if( IsXMLToken( aLocalName, XML_STAY_ON_TOP ) )
{
- aAny = bool2any( IsXMLToken( sValue, XML_TRUE ) );
+ aAny <<= IsXMLToken( sValue, XML_TRUE );
mpImpl->mxPresProps->setPropertyValue("IsAlwaysOnTop", aAny );
}
else if( IsXMLToken( aLocalName, XML_FORCE_MANUAL ) )
{
- aAny = bool2any( IsXMLToken( sValue, XML_TRUE ) );
+ aAny <<= IsXMLToken( sValue, XML_TRUE );
mpImpl->mxPresProps->setPropertyValue("IsAutomatic", aAny );
}
else if( IsXMLToken( aLocalName, XML_ENDLESS ) )
{
- aAny = bool2any( IsXMLToken( sValue, XML_TRUE ) );
+ aAny <<= IsXMLToken( sValue, XML_TRUE );
mpImpl->mxPresProps->setPropertyValue("IsEndless", aAny );
}
else if( IsXMLToken( aLocalName, XML_FULL_SCREEN ) )
{
- aAny = bool2any( IsXMLToken( sValue, XML_TRUE ) );
+ aAny <<= IsXMLToken( sValue, XML_TRUE );
mpImpl->mxPresProps->setPropertyValue("IsFullScreen", aAny );
}
else if( IsXMLToken( aLocalName, XML_MOUSE_VISIBLE ) )
{
- aAny = bool2any( IsXMLToken( sValue, XML_TRUE ) );
+ aAny <<= IsXMLToken( sValue, XML_TRUE );
mpImpl->mxPresProps->setPropertyValue("IsMouseVisible", aAny );
}
else if( IsXMLToken( aLocalName, XML_START_WITH_NAVIGATOR ) )
{
- aAny = bool2any( IsXMLToken( sValue, XML_TRUE ) );
+ aAny <<= IsXMLToken( sValue, XML_TRUE );
mpImpl->mxPresProps->setPropertyValue("StartWithNavigator", aAny );
}
else if( IsXMLToken( aLocalName, XML_MOUSE_AS_PEN ) )
{
- aAny = bool2any( IsXMLToken( sValue, XML_TRUE ) );
+ aAny <<= IsXMLToken( sValue, XML_TRUE );
mpImpl->mxPresProps->setPropertyValue("UsePen", aAny );
}
else if( IsXMLToken( aLocalName, XML_TRANSITION_ON_CLICK ) )
{
- aAny = bool2any( IsXMLToken( sValue, XML_ENABLED ) );
+ aAny <<= IsXMLToken( sValue, XML_ENABLED );
mpImpl->mxPresProps->setPropertyValue("IsTransitionOnClick", aAny );
}
else if( IsXMLToken( aLocalName, XML_SHOW_LOGO ) )
{
- aAny = bool2any( IsXMLToken( sValue, XML_TRUE ) );
+ aAny <<= IsXMLToken( sValue, XML_TRUE );
mpImpl->mxPresProps->setPropertyValue("IsShowLogo", aAny );
}
}
}
- aAny = bool2any( bAll );
+ aAny <<= bAll;
mpImpl->mxPresProps->setPropertyValue("IsShowAll", aAny );
}
}
diff --git a/xmloff/source/forms/propertyimport.cxx b/xmloff/source/forms/propertyimport.cxx
index 502f8c3..128b90d 100644
--- a/xmloff/source/forms/propertyimport.cxx
+++ b/xmloff/source/forms/propertyimport.cxx
@@ -101,7 +101,7 @@ Any PropertyConversion::convertString( SvXMLImport& _rImporter, const ::com::sun
OStringBuffer("PropertyConversion::convertString: could not convert \"").
append(OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US)).
append("\" into a boolean!").getStr());
- aReturn = ::cppu::bool2any(_bInvertBoolean ? !bValue : bValue);
+ aReturn <<= (_bInvertBoolean ? !bValue : bValue);
}
break;
case TypeClass_SHORT: // sal_Int16
diff --git a/xmloff/source/style/NamedBoolPropertyHdl.cxx b/xmloff/source/style/NamedBoolPropertyHdl.cxx
index 8d3273e..98eb63f 100644
--- a/xmloff/source/style/NamedBoolPropertyHdl.cxx
+++ b/xmloff/source/style/NamedBoolPropertyHdl.cxx
@@ -39,13 +39,13 @@ bool XMLNamedBoolPropertyHdl::importXML( const OUString& rStrImpValue, Any& rVal
{
if( rStrImpValue == maTrueStr )
{
- rValue = ::cppu::bool2any( true );
+ rValue <<= true;
return true;
}
if( rStrImpValue == maFalseStr )
{
- rValue = ::cppu::bool2any( false );
+ rValue <<= false;
return true;
}
diff --git a/xmloff/source/style/PageMasterExportPropMapper.cxx b/xmloff/source/style/PageMasterExportPropMapper.cxx
index a339661..b8b2ada 100644
--- a/xmloff/source/style/PageMasterExportPropMapper.cxx
+++ b/xmloff/source/style/PageMasterExportPropMapper.cxx
@@ -63,7 +63,7 @@ static void lcl_RemoveStateIfZero16( XMLPropertyState* pState )
static void lcl_AddState(::std::vector< XMLPropertyState >& rPropState, sal_Int32 nIndex, const OUString& rProperty, uno::Reference< beans::XPropertySet >& xProps)
{
if(::cppu::any2bool(xProps->getPropertyValue(rProperty)))
- rPropState.push_back(XMLPropertyState (nIndex, cppu::bool2any(true)));
+ rPropState.push_back(XMLPropertyState (nIndex, css::uno::Any(true)));
}
// helper struct to handle equal XMLPropertyState's for page, header and footer
diff --git a/xmloff/source/style/PageMasterPropHdl.cxx b/xmloff/source/style/PageMasterPropHdl.cxx
index a171f0c..715aab2 100644
--- a/xmloff/source/style/PageMasterPropHdl.cxx
+++ b/xmloff/source/style/PageMasterPropHdl.cxx
@@ -331,7 +331,7 @@ bool XMLPMPropHdl_CenterHorizontal::importXML(
if (IsXMLToken( rStrImpValue, XML_BOTH) ||
IsXMLToken( rStrImpValue, XML_HORIZONTAL))
{
- rValue = ::cppu::bool2any(true);
+ rValue <<= true;
bRet = true;
}
@@ -372,7 +372,7 @@ bool XMLPMPropHdl_CenterVertical::importXML(
if (IsXMLToken(rStrImpValue, XML_BOTH) ||
IsXMLToken(rStrImpValue, XML_VERTICAL) )
{
- rValue = ::cppu::bool2any(true);
+ rValue <<= true;
bRet = true;
}
diff --git a/xmloff/source/style/XMLBitmapLogicalSizePropertyHandler.cxx b/xmloff/source/style/XMLBitmapLogicalSizePropertyHandler.cxx
index 51b4084..9c3416f 100644
--- a/xmloff/source/style/XMLBitmapLogicalSizePropertyHandler.cxx
+++ b/xmloff/source/style/XMLBitmapLogicalSizePropertyHandler.cxx
@@ -21,7 +21,6 @@
#include <rtl/ustrbuf.hxx>
#include <com/sun/star/uno/Any.hxx>
#include "XMLBitmapLogicalSizePropertyHandler.hxx"
-#include <comphelper/extract.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -40,7 +39,7 @@ bool XMLBitmapLogicalSizePropertyHandler::importXML(
Any& rValue,
const SvXMLUnitConverter& ) const
{
- rValue = ::cppu::bool2any( rStrImpValue.indexOf( '%' ) == -1 );
+ rValue <<= ( rStrImpValue.indexOf( '%' ) == -1 );
return true;
}
commit ad73967e99235a2ba9b5a2106c5d6d0f8efaa1ca
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Sat Feb 22 17:09:35 2014 +0100
Remove unnecessary extractInterface
Change-Id: I4848bf84615274ad5732223a354fb7a6b845d9a8
diff --git a/connectivity/source/commontools/TKeys.cxx b/connectivity/source/commontools/TKeys.cxx
index 6e83e7b..1841fd4 100644
--- a/connectivity/source/commontools/TKeys.cxx
+++ b/connectivity/source/commontools/TKeys.cxx
@@ -24,7 +24,6 @@
#include <com/sun/star/sdbcx/KeyType.hpp>
#include <com/sun/star/sdbc/KeyRule.hpp>
#include "connectivity/dbtools.hxx"
-#include <comphelper/extract.hxx>
#include <comphelper/types.hxx>
#include <comphelper/property.hxx>
#include "TConnection.hxx"
@@ -182,7 +181,7 @@ sdbcx::ObjectType OKeysHelper::appendObject( const OUString& _rForName, const Re
{
if ( i > 0 )
aSql.appendAscii(",");
- ::cppu::extractInterface(xColProp,xColumns->getByIndex(i));
+ xColProp.set(xColumns->getByIndex(i), css::uno::UNO_QUERY);
aSql.append( ::dbtools::quoteName( aQuote,getString(xColProp->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_NAME)))) );
}
diff --git a/connectivity/source/commontools/TTableHelper.cxx b/connectivity/source/commontools/TTableHelper.cxx
index c186b67..fd8215f 100644
--- a/connectivity/source/commontools/TTableHelper.cxx
+++ b/connectivity/source/commontools/TTableHelper.cxx
@@ -27,7 +27,6 @@
#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <comphelper/implementationreference.hxx>
#include <comphelper/sequence.hxx>
-#include <comphelper/extract.hxx>
#include <comphelper/types.hxx>
#include "connectivity/dbtools.hxx"
#include "connectivity/sdbcx/VCollection.hxx"
@@ -554,8 +553,9 @@ void SAL_CALL OTableHelper::alterColumnByIndex( sal_Int32 index, const Reference
#endif
);
- Reference< XPropertySet > xOld;
- if(::cppu::extractInterface(xOld,m_pColumns->getByIndex(index)) && xOld.is())
+ Reference< XPropertySet > xOld(
+ m_pColumns->getByIndex(index), css::uno::UNO_QUERY);
+ if(xOld.is())
alterColumnByName(getString(xOld->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME))),descriptor);
}
diff --git a/connectivity/source/cpool/ZPoolCollection.cxx b/connectivity/source/cpool/ZPoolCollection.cxx
index 30aa321..5df6034 100644
--- a/connectivity/source/cpool/ZPoolCollection.cxx
+++ b/connectivity/source/cpool/ZPoolCollection.cxx
@@ -27,7 +27,6 @@
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/reflection/ProxyFactory.hpp>
#include <com/sun/star/sdbc/DriverManager.hpp>
-#include <comphelper/extract.hxx>
#include <comphelper/processfactory.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -359,13 +358,19 @@ Reference<XInterface> OPoolCollection::openNode(const OUString& _rPath,const Ref
{
if (xDirectAccess.is() && xDirectAccess->hasByName(_rPath))
{
- if (!::cppu::extractInterface(xNode, xDirectAccess->getByName(_rPath)))
- SAL_WARN("connectivity.cpool", "OConfigurationNode::openNode: could not open the node!");
+ xNode.set(xDirectAccess->getByName(_rPath), css::uno::UNO_QUERY);
+ SAL_WARN_IF(
+ !xNode.is(), "connectivity.cpool",
+ "OConfigurationNode::openNode: could not open the node!");
}
else if (xHierarchyAccess.is())
{
- if (!::cppu::extractInterface(xNode, xHierarchyAccess->getByHierarchicalName(_rPath)))
- SAL_WARN("connectivity.cpool", "OConfigurationNode::openNode: could not open the node!");
+ xNode.set(
+ xHierarchyAccess->getByHierarchicalName(_rPath),
+ css::uno::UNO_QUERY);
+ SAL_WARN_IF(
+ !xNode.is(), "connectivity.cpool",
+ "OConfigurationNode::openNode: could not open the node!");
}
}
diff --git a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx
index 3047b5b..13b7b96 100644
--- a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx
@@ -29,7 +29,6 @@
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include "dbase/DIndex.hxx"
#include "connectivity/FValue.hxx"
-#include <comphelper/extract.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/types.hxx>
#include <ucbhelper/content.hxx>
@@ -181,8 +180,8 @@ Reference< XResultSet > SAL_CALL ODbaseDatabaseMetaData::getColumns(
{
if(match(tableNamePattern,*pTabBegin,'\0'))
{
- Reference< XColumnsSupplier> xTable;
- ::cppu::extractInterface(xTable,xNames->getByName(*pTabBegin));
+ Reference< XColumnsSupplier> xTable(
+ xNames->getByName(*pTabBegin), css::uno::UNO_QUERY);
OSL_ENSURE(xTable.is(),"Table not found! Normallya exception had to be thrown here!");
aRow[3] = new ORowSetValueDecorator(*pTabBegin);
@@ -201,7 +200,8 @@ Reference< XResultSet > SAL_CALL ODbaseDatabaseMetaData::getColumns(
{
aRow[4] = new ORowSetValueDecorator(*pBegin);
- ::cppu::extractInterface(xColumn,xColumns->getByName(*pBegin));
+ xColumn.set(
+ xColumns->getByName(*pBegin), css::uno::UNO_QUERY);
OSL_ENSURE(xColumn.is(),"Columns contains a column who isn't a fastpropertyset!");
aRow[5] = new ORowSetValueDecorator(getINT32(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))));
aRow[6] = new ORowSetValueDecorator(getString(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME))));
@@ -266,8 +266,8 @@ Reference< XResultSet > SAL_CALL ODbaseDatabaseMetaData::getIndexInfo(
aRow[5] = new ORowSetValueDecorator(OUString());
aRow[10] = new ORowSetValueDecorator(OUString("A"));
- Reference< XIndexesSupplier> xTable;
- ::cppu::extractInterface(xTable,xNames->getByName(table));
+ Reference< XIndexesSupplier> xTable(
+ xNames->getByName(table), css::uno::UNO_QUERY);
aRow[3] = new ORowSetValueDecorator(table);
aRow[7] = new ORowSetValueDecorator((sal_Int32)3);
@@ -282,7 +282,7 @@ Reference< XResultSet > SAL_CALL ODbaseDatabaseMetaData::getIndexInfo(
Reference< XPropertySet> xIndex;
for(;pBegin != pEnd;++pBegin)
{
- ::cppu::extractInterface(xIndex,xIndexes->getByName(*pBegin));
+ xIndex.set(xIndexes->getByName(*pBegin), css::uno::UNO_QUERY);
OSL_ENSURE(xIndex.is(),"Indexes contains a column who isn't a fastpropertyset!");
if(unique && !getBOOL(xIndex->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISUNIQUE))))
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index b23085c..0747cfc 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -36,7 +36,6 @@
#include <rtl/math.hxx>
#include <stdio.h>
#include <ucbhelper/content.hxx>
-#include <comphelper/extract.hxx>
#include <connectivity/dbexception.hxx>
#include <connectivity/dbconversion.hxx>
#include <com/sun/star/lang/DisposedException.hpp>
@@ -1598,7 +1597,7 @@ sal_Bool ODbaseTable::DeleteRow(const OSQLColumns& _rCols)
Reference<XPropertySet> xIndex = isUniqueByColumnName(i);
if (xIndex.is())
{
- ::cppu::extractInterface(xCol,m_pColumns->getByIndex(i));
+ xCol.set(m_pColumns->getByIndex(i), css::uno::UNO_QUERY);
OSL_ENSURE(xCol.is(),"ODbaseTable::DeleteRow column is null!");
if(xCol.is())
{
@@ -1646,7 +1645,7 @@ Reference<XPropertySet> ODbaseTable::isUniqueByColumnName(sal_Int32 _nColumnPos)
Reference<XPropertySet> xIndex;
for(sal_Int32 i=0;i<m_pIndexes->getCount();++i)
{
- ::cppu::extractInterface(xIndex,m_pIndexes->getByIndex(i));
+ xIndex.set(m_pIndexes->getByIndex(i), css::uno::UNO_QUERY);
if(xIndex.is() && getBOOL(xIndex->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISUNIQUE))))
{
Reference<XNameAccess> xCols(Reference<XColumnsSupplier>(xIndex,UNO_QUERY)->getColumns());
@@ -1696,8 +1695,8 @@ sal_Bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,
for(nPos = 0;nPos<_xCols->getCount();++nPos)
{
- Reference<XPropertySet> xFindCol;
- ::cppu::extractInterface(xFindCol,_xCols->getByIndex(nPos));
+ Reference<XPropertySet> xFindCol(
+ _xCols->getByIndex(nPos), css::uno::UNO_QUERY);
OSL_ENSURE(xFindCol.is(),"ODbaseTable::UpdateBuffer column is null!");
if(aCase(getString(xFindCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME))),aColName))
break;
@@ -1796,8 +1795,8 @@ sal_Bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,
xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)) >>= aColName;
for(nPos = 0;nPos<_xCols->getCount();++nPos)
{
- Reference<XPropertySet> xFindCol;
- ::cppu::extractInterface(xFindCol,_xCols->getByIndex(nPos));
+ Reference<XPropertySet> xFindCol(
+ _xCols->getByIndex(nPos), css::uno::UNO_QUERY);
if(aCase(getString(xFindCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME))),aColName))
break;
}
diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
index 5b123cb..d952a4a 100644
--- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
@@ -30,7 +30,6 @@
#include <tools/urlobj.hxx>
#include "file/FDriver.hxx"
#include "file/FTable.hxx"
-#include <comphelper/extract.hxx>
#include <comphelper/processfactory.hxx>
#include <tools/debug.hxx>
#include <ucbhelper/content.hxx>
@@ -419,8 +418,8 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges(
aRow[7] = new ORowSetValueDecorator(OUString("NO"));
aRows.push_back(aRow);
- Reference< XPropertySet> xTable;
- ::cppu::extractInterface(xTable,xNames->getByName(*pBegin));
+ Reference< XPropertySet> xTable(
+ xNames->getByName(*pBegin), css::uno::UNO_QUERY);
if(xTable.is())
{
Reference<XUnoTunnel> xTunnel(xTable,UNO_QUERY);
diff --git a/connectivity/source/drivers/flat/EDatabaseMetaData.cxx b/connectivity/source/drivers/flat/EDatabaseMetaData.cxx
index 7a97333..8dd793e 100644
--- a/connectivity/source/drivers/flat/EDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/flat/EDatabaseMetaData.cxx
@@ -27,7 +27,6 @@
#include <com/sun/star/sdbcx/XIndexesSupplier.hpp>
#include "FDatabaseMetaDataResultSet.hxx"
#include <com/sun/star/lang/XUnoTunnel.hpp>
-#include <comphelper/extract.hxx>
#include <comphelper/types.hxx>
using namespace ::comphelper;
@@ -176,8 +175,8 @@ Reference< XResultSet > SAL_CALL OFlatDatabaseMetaData::getColumns(
{
if(match(tableNamePattern,*pTabBegin,'\0'))
{
- Reference< XColumnsSupplier> xTable;
- ::cppu::extractInterface(xTable,xNames->getByName(*pTabBegin));
+ Reference< XColumnsSupplier> xTable(
+ xNames->getByName(*pTabBegin), css::uno::UNO_QUERY);
aRow[3] = new ORowSetValueDecorator(*pTabBegin);
Reference< XNameAccess> xColumns = xTable->getColumns();
@@ -195,7 +194,8 @@ Reference< XResultSet > SAL_CALL OFlatDatabaseMetaData::getColumns(
{
aRow[4] = new ORowSetValueDecorator(*pBegin);
- ::cppu::extractInterface(xColumn,xColumns->getByName(*pBegin));
+ xColumn.set(
+ xColumns->getByName(*pBegin), css::uno::UNO_QUERY);
OSL_ENSURE(xColumn.is(),"Columns contains a column who isn't a fastpropertyset!");
aRow[5] = new ORowSetValueDecorator(getINT32(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))));
aRow[6] = new ORowSetValueDecorator(getString(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME))));
diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx
index 484af4a..792c079 100644
--- a/connectivity/source/manager/mdrivermanager.cxx
+++ b/connectivity/source/manager/mdrivermanager.cxx
@@ -28,7 +28,6 @@
#include <com/sun/star/beans/NamedValue.hpp>
#include <tools/diagnose_ex.h>
-#include <comphelper/extract.hxx>
#include <comphelper/processfactory.hxx>
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/supportsservice.hxx>
@@ -280,7 +279,7 @@ void OSDBCDriverManager::bootstrapDrivers()
Reference< XServiceInfo > xSI;
while (xEnumDrivers->hasMoreElements())
{
- ::cppu::extractInterface( xFactory, xEnumDrivers->nextElement() );
+ xFactory.set(xEnumDrivers->nextElement(), css::uno::UNO_QUERY);
OSL_ENSURE( xFactory.is(), "OSDBCDriverManager::bootstrapDrivers: no factory extracted" );
if ( xFactory.is() )
diff --git a/cui/source/dialogs/showcols.cxx b/cui/source/dialogs/showcols.cxx
index b16642e..8c9ac35 100644
--- a/cui/source/dialogs/showcols.cxx
+++ b/cui/source/dialogs/showcols.cxx
@@ -89,7 +89,7 @@ void FmShowColsDialog::SetColumns(const ::com::sun::star::uno::Reference< ::com:
for (sal_uInt16 i=0; i<xCols->getCount(); ++i)
{
sCurName = "";
- ::cppu::extractInterface(xCurCol, xCols->getByIndex(i));
+ xCurCol.set(xCols->getByIndex(i), css::uno::UNO_QUERY);
sal_Bool bIsHidden = sal_False;
try
{
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index a167d72..fa1b228 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -57,7 +57,6 @@
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
#include <comphelper/processfactory.hxx>
-#include <comphelper/extract.hxx>
#include <comphelper/interaction.hxx>
#include <comphelper/property.hxx>
#include <comphelper/seqstream.hxx>
@@ -359,7 +358,7 @@ void SAL_CALL ORowSet::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const
m_bOwnConnection = sal_True;
break;
case PROPERTY_ID_TYPEMAP:
- ::cppu::extractInterface(m_xTypeMap,m_aTypeMap);
+ m_xTypeMap.set(m_aTypeMap, css::uno::UNO_QUERY);
break;
case PROPERTY_ID_PROPCHANGE_NOTIFY:
m_bPropChangeNotifyEnabled = ::cppu::any2bool(rValue);
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index e4cf296..318bad4 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -1385,8 +1385,8 @@ sal_Bool SbaXDataBrowserController::approveParameter(const ::com::sun::star::for
const PropertyValue* pFinalValues = aFinalValues.getConstArray();
for (sal_Int32 i=0; i<aFinalValues.getLength(); ++i, ++pFinalValues)
{
- Reference< XPropertySet > xParam;
- ::cppu::extractInterface(xParam, aRequest.Parameters->getByIndex(i));
+ Reference< XPropertySet > xParam(
+ aRequest.Parameters->getByIndex(i), css::uno::UNO_QUERY);
OSL_ENSURE(xParam.is(), "SbaXDataBrowserController::approveParameter: one of the parameters is no property set!");
if (xParam.is())
{
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index 7a5aa0b..6cc20cd 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -63,7 +63,6 @@
#include <connectivity/dbtools.hxx>
#include <connectivity/dbconversion.hxx>
#include <cppuhelper/typeprovider.hxx>
-#include <comphelper/extract.hxx>
#include <comphelper/servicehelper.hxx>
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
@@ -789,7 +788,7 @@ void SbaGridControl::SetColWidth(sal_uInt16 nColId)
Reference< XIndexAccess > xCols(GetPeer()->getColumns(), UNO_QUERY);
Reference< XPropertySet > xAffectedCol;
if (xCols.is() && (nModelPos != (sal_uInt16)-1))
- ::cppu::extractInterface(xAffectedCol,xCols->getByIndex(nModelPos));
+ xAffectedCol.set(xCols->getByIndex(nModelPos), css::uno::UNO_QUERY);
if (xAffectedCol.is())
{
@@ -868,7 +867,7 @@ void SbaGridControl::SetColAttrs(sal_uInt16 nColId)
Reference< XIndexAccess > xCols(GetPeer()->getColumns(), UNO_QUERY);
Reference< XPropertySet > xAffectedCol;
if (xCols.is() && (nModelPos != (sal_uInt16)-1))
- ::cppu::extractInterface(xAffectedCol,xCols->getByIndex(nModelPos));
+ xAffectedCol.set(xCols->getByIndex(nModelPos), css::uno::UNO_QUERY);
// get the field the column is bound to
Reference< XPropertySet > xField = getField(nModelPos);
@@ -1326,8 +1325,9 @@ sal_Int8 SbaGridControl::AcceptDrop( const BrowserAcceptDropEvent& rEvt )
Reference< XIndexAccess > xColumnControls((::com::sun::star::form::XGridPeer*)GetPeer(), UNO_QUERY);
if (xColumnControls.is())
{
- Reference< ::com::sun::star::awt::XTextComponent > xColControl;
- ::cppu::extractInterface(xColControl,xColumnControls->getByIndex(GetViewColumnPos(nCol)));
+ Reference< ::com::sun::star::awt::XTextComponent > xColControl(
+ xColumnControls->getByIndex(GetViewColumnPos(nCol)),
+ css::uno::UNO_QUERY);
if (xColControl.is())
{
m_bActivatingForDrop = sal_True;
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 8dd70fb..b679a28 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -3026,8 +3026,9 @@ void SbaTableQueryBrowser::unloadAndCleanup( sal_Bool _bDisposeConnection )
xRowSetProps->getPropertyValue(PROPERTY_ACTIVE_CONNECTION) >>= xConn;
#if OSL_DEBUG_LEVEL > 1
{
- Reference< XComponent > xComp;
- ::cppu::extractInterface(xComp, xRowSetProps->getPropertyValue(PROPERTY_ACTIVE_CONNECTION));
+ Reference< XComponent > xComp(
+ xRowSetProps->getPropertyValue(PROPERTY_ACTIVE_CONNECTION),
+ css::uno::UNO_QUERY);
}
#endif
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index d47bbe7..8c08e73 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -55,7 +55,6 @@
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
-#include <comphelper/extract.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/streamsection.hxx>
#include <comphelper/types.hxx>
@@ -1379,22 +1378,25 @@ void OTableController::assignTable()
xNameAccess = xSup->getTables();
OSL_ENSURE(xNameAccess.is(),"no nameaccess for the queries!");
- Reference<XPropertySet> xProp;
- if(xNameAccess->hasByName(m_sName) && ::cppu::extractInterface(xProp,xNameAccess->getByName(m_sName)) && xProp.is())
+ if(xNameAccess->hasByName(m_sName))
{
- m_xTable = xProp;
- startTableListening();
-
- // check if we set the table editable
- Reference<XDatabaseMetaData> xMeta = getConnection()->getMetaData();
- setEditable( xMeta.is() && !xMeta->isReadOnly() && (isAlterAllowed() || isDropAllowed() || isAddAllowed()) );
- if(!isEditable())
+ Reference<XPropertySet> xProp(xNameAccess->getByName(m_sName), css::uno::UNO_QUERY);
+ if (xProp.is())
{
- ::std::for_each(m_vRowList.begin(),m_vRowList.end(),boost::bind( &OTableRow::SetReadOnly, _1, boost::cref( sal_True )));
+ m_xTable = xProp;
+ startTableListening();
+
+ // check if we set the table editable
+ Reference<XDatabaseMetaData> xMeta = getConnection()->getMetaData();
+ setEditable( xMeta.is() && !xMeta->isReadOnly() && (isAlterAllowed() || isDropAllowed() || isAddAllowed()) );
+ if(!isEditable())
+ {
+ ::std::for_each(m_vRowList.begin(),m_vRowList.end(),boost::bind( &OTableRow::SetReadOnly, _1, boost::cref( sal_True )));
+ }
+ m_bNew = sal_False;
+ // be notified when the table is in disposing
+ InvalidateAll();
}
- m_bNew = sal_False;
- // be notified when the table is in disposing
- InvalidateAll();
}
}
}
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index b507ed6..dab46f8 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -85,7 +85,6 @@
#include <com/sun/star/text/GraphicCrop.hpp>
#include <unotools/ucbstreamhelper.hxx>
#include <unotools/localfilehelper.hxx>
-#include <comphelper/extract.hxx>
#include <comphelper/string.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <vcl/virdev.hxx>
@@ -1476,8 +1475,9 @@ sal_Bool EscherPropertyContainer::CreateGraphicProperties(
}
else if ( rSource == "Bitmap" )
{
- ::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap >xBitmap;
- if ( ::cppu::extractInterface( xBitmap, aAny ) )
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap >xBitmap(
+ aAny, css::uno::UNO_QUERY);
+ if (xBitmap.is())
{
::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap > xBmp;
if ( aAny >>= xBmp )
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index 223adc8..aed7bb8 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -58,7 +58,6 @@
#include <comphelper/basicio.hxx>
#include <comphelper/container.hxx>
#include <comphelper/enumhelper.hxx>
-#include <comphelper/extract.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/seqstream.hxx>
#include <comphelper/sequence.hxx>
@@ -2471,8 +2470,8 @@ void SAL_CALL ODatabaseForm::setControlModels(const Sequence<Reference<XControlM
// Find component in the list
for (sal_Int32 j = 0; j < nCount; ++j)
{
- Reference<XFormComponent> xElement;
- ::cppu::extractInterface(xElement, getByIndex(j));
+ Reference<XFormComponent> xElement(
+ getByIndex(j), css::uno::UNO_QUERY);
if (xComp == xElement)
{
Reference<XPropertySet> xSet(xComp, UNO_QUERY);
diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx
index 746583b..1be7b6d 100644
--- a/forms/source/component/Grid.cxx
+++ b/forms/source/component/Grid.cxx
@@ -28,7 +28,6 @@
#include <com/sun/star/text/WritingMode2.hpp>
#include <comphelper/basicio.hxx>
#include <comphelper/container.hxx>
-#include <comphelper/extract.hxx>
#include <comphelper/processfactory.hxx>
#include <cppuhelper/queryinterface.hxx>
#include <toolkit/helper/vclunohelper.hxx>
@@ -266,9 +265,13 @@ sal_Bool SAL_CALL OGridControlModel::select(const Any& rElement) throw(IllegalAr
{
::osl::ClearableMutexGuard aGuard( m_aMutex );
Reference<XPropertySet> xSel;
- if (rElement.hasValue() && !::cppu::extractInterface(xSel, rElement))
+ if (rElement.hasValue())
{
- throw IllegalArgumentException();
+ xSel.set(rElement, css::uno::UNO_QUERY);
+ if (!xSel.is())
+ {
+ throw IllegalArgumentException();
+ }
}
InterfaceRef xMe = static_cast<XWeak*>(this);
if (xSel.is())
diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx
index c7519a8..d2f1be6 100644
--- a/forms/source/component/ImageControl.cxx
+++ b/forms/source/component/ImageControl.cxx
@@ -50,7 +50,6 @@
#include <tools/diagnose_ex.h>
#include <vcl/svapp.hxx>
#include <unotools/streamhelper.hxx>
-#include <comphelper/extract.hxx>
#include <comphelper/guarding.hxx>
#include <comphelper/processfactory.hxx>
#include <unotools/ucbstreamhelper.hxx>
@@ -959,7 +958,9 @@ void OImageControlControl::mousePressed(const ::com::sun::star::awt::MouseEvent&
// If the Control is not bound, do not display a dialog (because the to-be-sent URL would be invalid anyway)
Reference<XPropertySet> xBoundField;
if (hasProperty(PROPERTY_BOUNDFIELD, xSet))
- ::cppu::extractInterface(xBoundField, xSet->getPropertyValue(PROPERTY_BOUNDFIELD));
+ xBoundField.set(
+ xSet->getPropertyValue(PROPERTY_BOUNDFIELD),
+ css::uno::UNO_QUERY);
if (!xBoundField.is())
{
// but only if our IMAGE_URL property is handled as if it is transient, which is equivalent to
diff --git a/include/comphelper/extract.hxx b/include/comphelper/extract.hxx
index 6d401e6..07acf42 100644
--- a/include/comphelper/extract.hxx
+++ b/include/comphelper/extract.hxx
@@ -20,7 +20,6 @@
#define INCLUDED_COMPHELPER_EXTRACT_HXX
#include <com/sun/star/lang/IllegalArgumentException.hpp>
-#include <com/sun/star/uno/XInterface.hpp>
#include <com/sun/star/uno/TypeClass.hpp>
#include <com/sun/star/uno/Type.hxx>
#include <com/sun/star/uno/Any.hxx>
@@ -101,24 +100,6 @@ inline ::com::sun::star::uno::Any SAL_CALL enum2any( E eEnum )
}
/**
- * Extracts interface from an any. If given any does not hold the demanded interface,
- * it will be queried for it.
- * If no interface is available, the out ref will be cleared.
- *<BR>
- * @param rxOut [out] demanded interface
- * @param rAny interface
- * @return sal_True if any reference (including the null ref) was retrieved from any else sal_False.
- */
-template< class T >
-inline bool SAL_CALL extractInterface(
- ::com::sun::star::uno::Reference< T > & rxOut,
- const ::com::sun::star::uno::Any & rAny )
-{
- rxOut.clear();
- return (rAny >>= rxOut);
-}
-
-/**
* extracts a boolean either as a sal_Bool or an integer from
* an any. If there is no sal_Bool or integer inside the any
* a ::com::sun::star::lang::IllegalArgumentException is thrown
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index 96052cf..104a4a0 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -34,7 +34,6 @@
#include <i18nlangtag/languagetag.hxx>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/supportsservice.hxx>
-#include <comphelper/extract.hxx>
#include <boost/checked_delete.hpp>
#include "lngsvcmgr.hxx"
@@ -1075,7 +1074,12 @@ void LngSvcMgr::GetAvailableSpellSvcs_Impl()
uno::Reference< lang::XSingleServiceFactory > xFactory;
uno::Reference< linguistic2::XSpellChecker > xSvc;
- if ( cppu::extractInterface( xCompFactory, aCurrent ) || ::cppu::extractInterface( xFactory, aCurrent ) )
+ xCompFactory.set(aCurrent, css::uno::UNO_QUERY);
+ if (!xCompFactory.is())
+ {
+ xFactory.set(aCurrent, css::uno::UNO_QUERY);
+ }
+ if ( xCompFactory.is() || xFactory.is() )
{
try
{
@@ -1132,7 +1136,12 @@ void LngSvcMgr::GetAvailableGrammarSvcs_Impl()
uno::Reference< lang::XSingleServiceFactory > xFactory;
uno::Reference< linguistic2::XProofreader > xSvc;
- if ( cppu::extractInterface( xCompFactory, aCurrent ) || ::cppu::extractInterface( xFactory, aCurrent ) )
+ xCompFactory.set(aCurrent, css::uno::UNO_QUERY);
+ if (!xCompFactory.is())
+ {
+ xFactory.set(aCurrent, css::uno::UNO_QUERY);
+ }
+ if ( xCompFactory.is() || xFactory.is() )
{
try
{
@@ -1189,7 +1198,12 @@ void LngSvcMgr::GetAvailableHyphSvcs_Impl()
uno::Reference< lang::XSingleServiceFactory > xFactory;
uno::Reference< linguistic2::XHyphenator > xSvc;
- if ( cppu::extractInterface( xCompFactory, aCurrent ) || ::cppu::extractInterface( xFactory, aCurrent ) )
+ xCompFactory.set(aCurrent, css::uno::UNO_QUERY);
+ if (!xCompFactory.is())
+ {
+ xFactory.set(aCurrent, css::uno::UNO_QUERY);
+ }
+ if ( xCompFactory.is() || xFactory.is() )
{
try
{
@@ -1245,7 +1259,12 @@ void LngSvcMgr::GetAvailableThesSvcs_Impl()
uno::Reference< lang::XSingleServiceFactory > xFactory;
uno::Reference< linguistic2::XThesaurus > xSvc;
- if ( cppu::extractInterface( xCompFactory, aCurrent ) || ::cppu::extractInterface( xFactory, aCurrent ) )
+ xCompFactory.set(aCurrent, css::uno::UNO_QUERY);
+ if (!xCompFactory.is())
+ {
+ xFactory.set(aCurrent, css::uno::UNO_QUERY);
+ }
+ if ( xCompFactory.is() || xFactory.is() )
{
try
{
diff --git a/sd/source/filter/eppt/pptx-epptbase.cxx b/sd/source/filter/eppt/pptx-epptbase.cxx
index afa63d3..04513c2 100644
--- a/sd/source/filter/eppt/pptx-epptbase.cxx
+++ b/sd/source/filter/eppt/pptx-epptbase.cxx
@@ -21,7 +21,6 @@
#include "eppt.hxx"
#include "epptdef.hxx"
-#include <comphelper/extract.hxx>
#include <tools/globname.hxx>
#include <tools/datetime.hxx>
#include <tools/poly.hxx>
@@ -618,16 +617,18 @@ sal_Bool PPTWriterBase::GetStyleSheets()
if ( aXNameAccess->hasByName( aFamily ) )
{
Any aAny( aXNameAccess->getByName( aFamily ) );
- if( aAny.getValue() && ::cppu::extractInterface( xNameAccess, aAny ) )
+ xNameAccess.set(aAny, css::uno::UNO_QUERY);
+ if( xNameAccess.is() )
{
Reference< XNameAccess > aXFamily;
if ( aAny >>= aXFamily )
{
if ( aXFamily->hasByName( aStyle ) )
{
- Reference< XStyle > xStyle;
aAny = aXFamily->getByName( aStyle );
- if( aAny.getValue() && ::cppu::extractInterface( xStyle, aAny ) )
+ Reference< XStyle > xStyle(
+ aAny, css::uno::UNO_QUERY);
+ if( xStyle.is() )
{
Reference< XStyle > aXStyle;
aAny >>= aXStyle;
diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx
index 2c0d731..167369b 100644
--- a/svtools/source/dialogs/addresstemplate.cxx
+++ b/svtools/source/dialogs/addresstemplate.cxx
@@ -25,7 +25,6 @@
#include <svtools/helpid.hrc>
#include <svtools/svtresid.hxx>
#include <tools/debug.hxx>
-#include <comphelper/extract.hxx>
#include <comphelper/interaction.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
@@ -942,7 +941,9 @@ void AssignmentPersistentData::Commit()
// get the table and the columns
Reference< XColumnsSupplier > xSuppTableCols;
if (m_xCurrentDatasourceTables->hasByName(sSelectedTable))
- ::cppu::extractInterface(xSuppTableCols, m_xCurrentDatasourceTables->getByName(sSelectedTable));
+ xSuppTableCols.set(
+ m_xCurrentDatasourceTables->getByName(sSelectedTable),
+ css::uno::UNO_QUERY);
Reference< XNameAccess > xColumns;
if (xSuppTableCols.is())
xColumns = xSuppTableCols->getColumns();
diff --git a/svtools/source/uno/genericunodialog.cxx b/svtools/source/uno/genericunodialog.cxx
index 3f225cd..189b3b5 100644
--- a/svtools/source/uno/genericunodialog.cxx
+++ b/svtools/source/uno/genericunodialog.cxx
@@ -24,7 +24,6 @@
#include <com/sun/star/ucb/AlreadyInitializedException.hpp>
#include <toolkit/awt/vclxwindow.hxx>
-#include <comphelper/extract.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <comphelper/property.hxx>
@@ -127,8 +126,7 @@ sal_Bool OGenericUnoDialog::convertFastPropertyValue( Any& rConvertedValue, Any&
{
case UNODIALOG_PROPERTY_ID_PARENT:
{
- Reference<starawt::XWindow> xNew;
- ::cppu::extractInterface(xNew, rValue);
+ Reference<starawt::XWindow> xNew(rValue, css::uno::UNO_QUERY);
if (xNew != m_xParent)
{
rConvertedValue <<= xNew;
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index 25f3511..fd5bac9 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -52,7 +52,6 @@
#include <com/sun/star/util/URLTransformer.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
-#include <comphelper/extract.hxx>
#include <comphelper/numbers.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/property.hxx>
@@ -638,8 +637,8 @@ void FmGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rMe
sal_uInt16 nPos2 = GetModelColumnPos(nColId);
Reference< ::com::sun::star::container::XIndexContainer > xColumns(static_cast<FmGridControl*>(GetParent())->GetPeer()->getColumns());
- Reference< ::com::sun::star::beans::XPropertySet> xColumn;
- ::cppu::extractInterface(xColumn, xColumns->getByIndex(nPos2));
+ Reference< ::com::sun::star::beans::XPropertySet> xColumn(
+ xColumns->getByIndex(nPos2), css::uno::UNO_QUERY);
Reference< ::com::sun::star::view::XSelectionSupplier > xSelSupplier(xColumns, UNO_QUERY);
if (xSelSupplier.is())
xSelSupplier->select(makeAny(xColumn));
@@ -669,8 +668,8 @@ void FmGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rMe
if (pMenu && xCols.is() && nColId)
{
- Reference< ::com::sun::star::beans::XPropertySet > xSet;
- ::cppu::extractInterface(xSet, xCols->getByIndex(nPos));
+ Reference< ::com::sun::star::beans::XPropertySet > xSet(
+ xCols->getByIndex(nPos), css::uno::UNO_QUERY);
sal_Int16 nClassId;
xSet->getPropertyValue(FM_PROP_CLASSID) >>= nClassId;
@@ -718,7 +717,7 @@ void FmGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rMe
Any aHidden,aName;
for (sal_uInt16 i=0; i<xCols->getCount(); ++i)
{
- ::cppu::extractInterface(xCurCol, xCols->getByIndex(i));
+ xCurCol.set(xCols->getByIndex(i), css::uno::UNO_QUERY);
DBG_ASSERT(xCurCol.is(), "FmGridHeader::PreExecuteColumnContextMenu : the Peer has invalid columns !");
aHidden = xCurCol->getPropertyValue(FM_PROP_HIDDEN);
DBG_ASSERT(aHidden.getValueType().getTypeClass() == TypeClass_BOOLEAN,
@@ -789,8 +788,8 @@ void FmGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupMe
{
case SID_FM_DELETECOL:
{
- Reference< XInterface > xCol;
- ::cppu::extractInterface(xCol, xCols->getByIndex(nPos));
+ Reference< XInterface > xCol(
+ xCols->getByIndex(nPos), css::uno::UNO_QUERY);
xCols->removeByIndex(nPos);
::comphelper::disposeComponent(xCol);
} break;
@@ -850,8 +849,8 @@ void FmGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupMe
break;
case SID_FM_HIDECOL:
{
- Reference< ::com::sun::star::beans::XPropertySet > xCurCol;
- ::cppu::extractInterface(xCurCol, xCols->getByIndex(nPos));
+ Reference< ::com::sun::star::beans::XPropertySet > xCurCol(
+ xCols->getByIndex(nPos), css::uno::UNO_QUERY);
xCurCol->setPropertyValue(FM_PROP_HIDDEN, makeAny((sal_Bool)sal_True));
}
break;
@@ -875,7 +874,7 @@ void FmGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupMe
Reference< ::com::sun::star::beans::XPropertySet > xCurCol;
for (sal_uInt16 i=0; i<xCols->getCount(); ++i)
{
- ::cppu::extractInterface(xCurCol, xCols->getByIndex(i));
+ xCurCol.set(xCols->getByIndex(i), css::uno::UNO_QUERY);
xCurCol->setPropertyValue(FM_PROP_HIDDEN, makeAny((sal_Bool)sal_False));
}
// TODO : there must be a more clever way to do this ....
@@ -889,7 +888,7 @@ void FmGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupMe
Reference< ::com::sun::star::beans::XPropertySet > xCurCol;
for (sal_uInt16 i=0; i<xCols->getCount() && nExecutionResult; ++i)
{
- ::cppu::extractInterface(xCurCol, xCols->getByIndex(i));
+ xCurCol.set(xCols->getByIndex(i), css::uno::UNO_QUERY);
Any aHidden = xCurCol->getPropertyValue(FM_PROP_HIDDEN);
if (::comphelper::getBOOL(aHidden))
if (!--nExecutionResult)
@@ -1089,11 +1088,11 @@ void FmGridControl::SetDesignMode(bool bMode)
Any aSelection = xSelSupplier->getSelection();
Reference< ::com::sun::star::beans::XPropertySet > xColumn;
if (aSelection.getValueType().getTypeClass() == TypeClass_INTERFACE)
- ::cppu::extractInterface(xColumn, aSelection);
+ xColumn.set(aSelection, css::uno::UNO_QUERY);
Reference< XInterface > xCurrent;
for (sal_uInt16 i=0; i<xColumns->getCount(); ++i)
{
- ::cppu::extractInterface(xCurrent, xColumns->getByIndex(i));
+ xCurrent.set(xColumns->getByIndex(i), css::uno::UNO_QUERY);
if (xCurrent == xColumn)
{
markColumn(GetColumnIdFromModelPos(i));
@@ -1528,7 +1527,7 @@ void FmGridControl::ColumnMoved(sal_uInt16 nId)
Reference< XInterface > xCurrent;
for (i = 0; !xCol.is() && i < xColumns->getCount(); i++)
{
- ::cppu::extractInterface(xCurrent, xColumns->getByIndex(i));
+ xCurrent.set(xColumns->getByIndex(i), css::uno::UNO_QUERY);
if (xCurrent == pCol->getModel())
{
xCol = pCol->getModel();
@@ -1570,8 +1569,8 @@ void FmGridControl::InitColumnsByModels(const Reference< ::com::sun::star::conta
Any aWidth;
for (i = 0; i < xColumns->getCount(); ++i)
{
- Reference< ::com::sun::star::beans::XPropertySet > xCol;
- ::cppu::extractInterface(xCol, xColumns->getByIndex(i));
+ Reference< ::com::sun::star::beans::XPropertySet > xCol(
+ xColumns->getByIndex(i), css::uno::UNO_QUERY);
OUString aName(
comphelper::getString(xCol->getPropertyValue(FM_PROP_LABEL)));
@@ -1593,8 +1592,8 @@ void FmGridControl::InitColumnsByModels(const Reference< ::com::sun::star::conta
Any aHidden;
for (i = 0; i < xColumns->getCount(); ++i)
{
- Reference< ::com::sun::star::beans::XPropertySet > xCol;
- ::cppu::extractInterface(xCol, xColumns->getByIndex(i));
+ Reference< ::com::sun::star::beans::XPropertySet > xCol(
+ xColumns->getByIndex(i), css::uno::UNO_QUERY);
aHidden = xCol->getPropertyValue(FM_PROP_HIDDEN);
if (::comphelper::getBOOL(aHidden))
HideColumn(GetColumnIdFromModelPos((sal_uInt16)i));
@@ -1691,8 +1690,8 @@ void FmGridControl::InitColumnsByFields(const Reference< ::com::sun::star::conta
OSL_ENSURE(pCol,"No grid column!");
if ( pCol )
{
- Reference< XPropertySet > xColumnModel;
- ::cppu::extractInterface( xColumnModel, xColumns->getByIndex( i ) );
+ Reference< XPropertySet > xColumnModel(
+ xColumns->getByIndex( i ), css::uno::UNO_QUERY);
InitColumnByField( pCol, xColumnModel, xFieldsAsNames, _rxFields );
}
@@ -1985,8 +1984,9 @@ void FmGridControl::Select()
{
if (nSelectedColumn != SAL_MAX_UINT16)
{
- Reference< XPropertySet > xColumn;
- ::cppu::extractInterface(xColumn,xColumns->getByIndex(nSelectedColumn));
+ Reference< XPropertySet > xColumn(
+ xColumns->getByIndex(nSelectedColumn),
+ css::uno::UNO_QUERY);
xSelSupplier->select(makeAny(xColumn));
}
else
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx
index 6597396..f50c77f4 100644
--- a/svx/source/fmcomp/fmgridif.cxx
+++ b/svx/source/fmcomp/fmgridif.cxx
@@ -45,7 +45,6 @@
#include <comphelper/container.hxx>
#include <comphelper/enumhelper.hxx>
-#include <comphelper/extract.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/property.hxx>
#include <comphelper/sequence.hxx>
@@ -1471,7 +1470,7 @@ void FmXGridPeer::propertyChange(const PropertyChangeEvent& evt) throw( RuntimeE
for ( i = 0; i < m_xColumns->getCount(); i++)
{
- ::cppu::extractInterface(xCurrent, m_xColumns->getByIndex(i));
+ xCurrent.set(m_xColumns->getByIndex(i), css::uno::UNO_QUERY);
if (evt.Source == xCurrent)
break;
}
@@ -1718,7 +1717,7 @@ void FmXGridPeer::setColumns(const Reference< XIndexContainer >& Columns) throw(
Reference< XPropertySet > xCol;
for (sal_Int32 i = 0; i < m_xColumns->getCount(); i++)
{
- ::cppu::extractInterface(xCol, m_xColumns->getByIndex(i));
+ xCol.set(m_xColumns->getByIndex(i), css::uno::UNO_QUERY);
removeColumnListeners(xCol);
}
Reference< XContainer > xContainer(m_xColumns, UNO_QUERY);
@@ -1742,7 +1741,7 @@ void FmXGridPeer::setColumns(const Reference< XIndexContainer >& Columns) throw(
Reference< XPropertySet > xCol;
for (sal_Int32 i = 0; i < Columns->getCount(); i++)
{
- ::cppu::extractInterface(xCol, Columns->getByIndex(i));
+ xCol.set(Columns->getByIndex(i), css::uno::UNO_QUERY);
addColumnListeners(xCol);
}
@@ -1799,8 +1798,7 @@ void FmXGridPeer::elementInserted(const ContainerEvent& evt) throw( RuntimeExcep
if (!pGrid || !m_xColumns.is() || pGrid->IsInColumnMove() || m_xColumns->getCount() == ((sal_Int32)pGrid->GetModelColCount()))
return;
- Reference< XPropertySet > xSet;
- ::cppu::extractInterface(xSet, evt.Element);
+ Reference< XPropertySet > xSet(evt.Element, css::uno::UNO_QUERY);
addColumnListeners(xSet);
Reference< XPropertySet > xNewColumn(xSet);
@@ -1834,10 +1832,9 @@ void FmXGridPeer::elementReplaced(const ContainerEvent& evt) throw( RuntimeExcep
if (!pGrid || !m_xColumns.is() || pGrid->IsInColumnMove())
return;
- Reference< XPropertySet > xNewColumn;
- Reference< XPropertySet > xOldColumn;
- ::cppu::extractInterface(xNewColumn, evt.Element);
- ::cppu::extractInterface(xOldColumn, evt.ReplacedElement);
+ Reference< XPropertySet > xNewColumn(evt.Element, css::uno::UNO_QUERY);
+ Reference< XPropertySet > xOldColumn(
+ evt.ReplacedElement, css::uno::UNO_QUERY);
sal_Bool bWasEditing = pGrid->IsEditing();
if (bWasEditing)
@@ -1892,8 +1889,7 @@ void FmXGridPeer::elementRemoved(const ContainerEvent& evt) throw( RuntimeExcept
pGrid->RemoveColumn(pGrid->GetColumnIdFromModelPos((sal_uInt16)::comphelper::getINT32(evt.Accessor)));
- Reference< XPropertySet > xOldColumn;
- ::cppu::extractInterface(xOldColumn, evt.Element);
+ Reference< XPropertySet > xOldColumn(evt.Element, css::uno::UNO_QUERY);
removeColumnListeners(xOldColumn);
}
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index ad402dd..aca59ab 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -45,7 +45,6 @@
#include <com/sun/star/util/Time.hpp>
#include <com/sun/star/util/Date.hpp>
-#include <comphelper/extract.hxx>
#include <comphelper/numbers.hxx>
#include <comphelper/property.hxx>
#include <comphelper/servicehelper.hxx>
@@ -1324,7 +1323,7 @@ void DbFormattedField::Init( Window& rParent, const Reference< XRowSet >& xCurso
Any aSupplier( xUnoModel->getPropertyValue(FM_PROP_FORMATSSUPPLIER));
if (aSupplier.hasValue())
{
- ::cppu::extractInterface(m_xSupplier, aSupplier);
+ m_xSupplier.set(aSupplier, css::uno::UNO_QUERY);
if (m_xSupplier.is())
{
// wenn wir den Supplier vom Model nehmen, dann auch den Key
@@ -3138,7 +3137,7 @@ void DbFilterField::Update()
Reference< ::com::sun::star::sdbcx::XColumnsSupplier > xSupplyCols(xListCursor, UNO_QUERY);
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list