Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
08a943fc
Kaydet (Commit)
08a943fc
authored
Nis 21, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Get rid of trivial comphelper::query_interface wrapper
Change-Id: I2b9dafd2a34d055dcd8b8c4d894be30dc821d3be
üst
4592d27d
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
29 additions
and
50 deletions
+29
-50
AStatement.cxx
connectivity/source/drivers/ado/AStatement.cxx
+3
-3
OStatement.cxx
connectivity/source/drivers/odbc/OStatement.cxx
+3
-3
EventThread.cxx
forms/source/component/EventThread.cxx
+3
-2
FormComponent.cxx
forms/source/component/FormComponent.cxx
+2
-2
FormattedField.cxx
forms/source/component/FormattedField.cxx
+3
-2
FormattedFieldWrapper.cxx
forms/source/component/FormattedFieldWrapper.cxx
+8
-7
RadioButton.cxx
forms/source/component/RadioButton.cxx
+4
-4
clickableimage.cxx
forms/source/component/clickableimage.cxx
+1
-1
uno3.hxx
include/comphelper/uno3.hxx
+0
-25
fmobj.cxx
svx/source/form/fmobj.cxx
+2
-1
No files found.
connectivity/source/drivers/ado/AStatement.cxx
Dosyayı görüntüle @
08a943fc
...
...
@@ -21,7 +21,6 @@
#include "ado/AConnection.hxx"
#include "ado/AResultSet.hxx"
#include <comphelper/property.hxx>
#include <comphelper/uno3.hxx>
#include <osl/thread.h>
#include <cppuhelper/typeprovider.hxx>
#include <cppuhelper/queryinterface.hxx>
...
...
@@ -182,8 +181,9 @@ void OStatement_Base::clearMyResultSet () throw (SQLException)
try
{
Reference
<
XCloseable
>
xCloseable
;
if
(
::
comphelper
::
query_interface
(
m_xResultSet
.
get
(),
xCloseable
)
)
Reference
<
XCloseable
>
xCloseable
(
m_xResultSet
.
get
(),
css
::
uno
::
UNO_QUERY
);
if
(
xCloseable
.
is
()
)
xCloseable
->
close
();
}
catch
(
const
DisposedException
&
)
{
}
...
...
connectivity/source/drivers/odbc/OStatement.cxx
Dosyayı görüntüle @
08a943fc
...
...
@@ -25,7 +25,6 @@
#include "odbc/OResultSet.hxx"
#include <comphelper/property.hxx>
#include "odbc/OTools.hxx"
#include <comphelper/uno3.hxx>
#include <osl/thread.h>
#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
#include <com/sun/star/sdbc/ResultSetType.hpp>
...
...
@@ -226,8 +225,9 @@ void OStatement_Base::clearMyResultSet()
try
{
Reference
<
XCloseable
>
xCloseable
;
if
(
::
comphelper
::
query_interface
(
m_xResultSet
.
get
(),
xCloseable
)
)
Reference
<
XCloseable
>
xCloseable
(
m_xResultSet
.
get
(),
css
::
uno
::
UNO_QUERY
);
if
(
xCloseable
.
is
()
)
xCloseable
->
close
();
}
catch
(
const
DisposedException
&
)
{
}
...
...
forms/source/component/EventThread.cxx
Dosyayı görüntüle @
08a943fc
...
...
@@ -40,7 +40,7 @@ OComponentEventThread::OComponentEventThread( ::cppu::OComponentHelper* pCompImp
// Hold a reference of the Control
{
InterfaceRef
xIFace
(
static_cast
<
XWeak
*>
(
pCompImpl
));
query_interface
(
xIFace
,
m_xComp
);
m_xComp
.
set
(
xIFace
,
css
::
uno
::
UNO_QUERY
);
}
// and add us at the Control
...
...
@@ -189,7 +189,8 @@ void OComponentEventThread::run()
// the mutex is locked.
Reference
<
XControl
>
xControl
;
if
(
xControlAdapter
.
is
()
)
query_interface
(
xControlAdapter
->
queryAdapted
(),
xControl
);
xControl
.
set
(
xControlAdapter
->
queryAdapted
(),
css
::
uno
::
UNO_QUERY
);
if
(
xComp
.
is
()
)
processEvent
(
pCompImpl
,
pEvt
.
get
(),
xControl
,
bFlag
);
...
...
forms/source/component/FormComponent.cxx
Dosyayı görüntüle @
08a943fc
...
...
@@ -1748,8 +1748,8 @@ void OBoundControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, co
}
// Check if we and the given model have a common ancestor (up to the forms collection)
Reference
<
XChild
>
xCont
;
query_interface
(
static_cast
<
XWeak
*>
(
this
),
xCont
);
Reference
<
XChild
>
xCont
(
static_cast
<
XWeak
*>
(
this
),
css
::
uno
::
UNO_QUERY
);
Reference
<
XInterface
>
xMyTopLevel
=
xCont
->
getParent
();
while
(
xMyTopLevel
.
is
())
{
...
...
forms/source/component/FormattedField.cxx
Dosyayı görüntüle @
08a943fc
...
...
@@ -509,8 +509,9 @@ Reference< XNumberFormatsSupplier > OFormattedModel::calcFormatsSupplier() const
Reference
<
XNumberFormatsSupplier
>
OFormattedModel
::
calcFormFormatsSupplier
()
const
{
Reference
<
XChild
>
xMe
;
query_interface
(
static_cast
<
XWeak
*>
(
const_cast
<
OFormattedModel
*>
(
this
)),
xMe
);
Reference
<
XChild
>
xMe
(
static_cast
<
XWeak
*>
(
const_cast
<
OFormattedModel
*>
(
this
)),
css
::
uno
::
UNO_QUERY
);
// By this we make sure that we get the right object even when aggregating
DBG_ASSERT
(
xMe
.
is
(),
"OFormattedModel::calcFormFormatsSupplier : I should have a content interface !"
);
// Iterate through until we reach a StartForm (starting with an own Parent)
...
...
forms/source/component/FormattedFieldWrapper.cxx
Dosyayı görüntüle @
08a943fc
...
...
@@ -55,17 +55,17 @@ InterfaceRef OFormattedFieldWrapper::createFormattedFieldWrapper(const ::com::su
if
(
bActAsFormatted
)
{
// instantiate an FormattedModel
InterfaceRef
xFormattedModel
;
// (instantiate it directly ..., as the OFormattedModel isn't
// registered for any service names anymore)
OFormattedModel
*
pModel
=
new
OFormattedModel
(
pRef
->
m_xContext
);
query_interface
(
static_cast
<
XWeak
*>
(
pModel
),
xFormattedModel
);
InterfaceRef
xFormattedModel
(
static_cast
<
XWeak
*>
(
pModel
),
css
::
uno
::
UNO_QUERY
);
pRef
->
m_xAggregate
=
Reference
<
XAggregation
>
(
xFormattedModel
,
UNO_QUERY
);
OSL_ENSURE
(
pRef
->
m_xAggregate
.
is
(),
"the OFormattedModel didn't have an XAggregation interface !"
);
// _before_ setting the delegator, give it to the member references
query_interface
(
xFormattedModel
,
pRef
->
m_xFormattedPart
);
pRef
->
m_xFormattedPart
.
set
(
xFormattedModel
,
css
::
uno
::
UNO_QUERY
);
pRef
->
m_pEditPart
=
rtl
::
Reference
<
OEditModel
>
(
new
OEditModel
(
pRef
->
m_xContext
));
}
...
...
@@ -98,7 +98,8 @@ Reference< XCloneable > SAL_CALL OFormattedFieldWrapper::createClone() throw (Ru
xRef
->
m_xAggregate
=
Reference
<
XAggregation
>
(
xClone
,
UNO_QUERY
);
OSL_ENSURE
(
xRef
->
m_xAggregate
.
is
(),
"invalid aggregate cloned !"
);
query_interface
(
Reference
<
XInterface
>
(
xClone
.
get
()
),
xRef
->
m_xFormattedPart
);
xRef
->
m_xFormattedPart
.
set
(
Reference
<
XInterface
>
(
xClone
.
get
()),
css
::
uno
::
UNO_QUERY
);
if
(
m_pEditPart
.
is
()
)
{
...
...
@@ -217,8 +218,8 @@ void SAL_CALL OFormattedFieldWrapper::write(const Reference<XObjectOutputStream>
// for this we transfer the current props of the formatted part to the edit part
Reference
<
XPropertySet
>
xFormatProps
(
m_xFormattedPart
,
UNO_QUERY
);
Reference
<
XPropertySet
>
xEditProps
;
query_interface
(
static_cast
<
XWeak
*>
(
m_pEditPart
.
get
()),
xEditProps
);
Reference
<
XPropertySet
>
xEditProps
(
static_cast
<
XWeak
*>
(
m_pEditPart
.
get
()),
css
::
uno
::
UNO_QUERY
);
Locale
aAppLanguage
=
Application
::
GetSettings
().
GetUILanguageTag
().
getLocale
();
dbtools
::
TransferFormComponentProperties
(
xFormatProps
,
xEditProps
,
aAppLanguage
);
...
...
@@ -317,7 +318,7 @@ void OFormattedFieldWrapper::ensureAggregate()
{
// arghhh ... instantiate it directly ... it's dirty, but we really need this aggregate
OEditModel
*
pModel
=
new
OEditModel
(
m_xContext
);
query_interface
(
static_cast
<
XWeak
*>
(
pModel
),
xEditModel
);
xEditModel
.
set
(
static_cast
<
XWeak
*>
(
pModel
),
css
::
uno
::
UNO_QUERY
);
}
m_xAggregate
=
Reference
<
XAggregation
>
(
xEditModel
,
UNO_QUERY
);
...
...
forms/source/component/RadioButton.cxx
Dosyayı görüntüle @
08a943fc
...
...
@@ -149,8 +149,8 @@ void ORadioButtonModel::SetSiblingPropsTo(const OUString& rPropName, const Any&
Reference
<
XIndexAccess
>
xIndexAccess
(
getParent
(),
UNO_QUERY
);
if
(
xIndexAccess
.
is
())
{
Reference
<
XPropertySet
>
xMyProps
;
query_interface
(
static_cast
<
XWeak
*>
(
this
),
xMyProps
);
Reference
<
XPropertySet
>
xMyProps
(
static_cast
<
XWeak
*>
(
this
),
css
::
uno
::
UNO_QUERY
);
OUString
sCurrentGroup
;
sal_Int32
nNumSiblings
=
xIndexAccess
->
getCount
();
for
(
sal_Int32
i
=
0
;
i
<
nNumSiblings
;
++
i
)
...
...
@@ -226,8 +226,8 @@ void ORadioButtonModel::setControlSource()
this
->
getPropertyValue
(
PROPERTY_GROUP_NAME
)
>>=
sGroupName
;
this
->
getPropertyValue
(
PROPERTY_NAME
)
>>=
sName
;
Reference
<
XPropertySet
>
xMyProps
;
query_interface
(
static_cast
<
XWeak
*>
(
this
),
xMyProps
);
Reference
<
XPropertySet
>
xMyProps
(
static_cast
<
XWeak
*>
(
this
),
css
::
uno
::
UNO_QUERY
);
for
(
sal_Int32
i
=
0
;
i
<
xIndexAccess
->
getCount
();
++
i
)
{
Reference
<
XPropertySet
>
xSiblingProperties
(
*
static_cast
<
InterfaceRef
const
*>
(
xIndexAccess
->
getByIndex
(
i
).
getValue
()),
UNO_QUERY
);
...
...
forms/source/component/clickableimage.cxx
Dosyayı görüntüle @
08a943fc
...
...
@@ -738,7 +738,7 @@ namespace frm
{
Reference
<
XChild
>
xChild
(
xIfc
,
UNO_QUERY
);
xIfc
=
xChild
->
getParent
();
query_interface
(
xIfc
,
xModel
);
xModel
.
set
(
xIfc
,
css
::
uno
::
UNO_QUERY
);
}
// Search for the Object shell by iterating over all Object shells
...
...
include/comphelper/uno3.hxx
Dosyayı görüntüle @
08a943fc
...
...
@@ -180,31 +180,6 @@ namespace comphelper
}
return
_rxOut
.
is
();
}
/** ask for an iface of an object
usage:<br/>
Reference<XFoo> xFoo;<br/>
if (query_interface(xAnything, xFoo))<br/>
....
*/
template
<
class
iface
>
bool
query_interface
(
const
InterfaceRef
&
_rxObject
,
::
com
::
sun
::
star
::
uno
::
Reference
<
iface
>&
_rxOut
)
{
_rxOut
=
static_cast
<
iface
*>
(
NULL
);
if
(
_rxObject
.
is
())
{
::
com
::
sun
::
star
::
uno
::
Any
aCheck
=
_rxObject
->
queryInterface
(
cppu
::
UnoType
<
iface
>::
get
());
if
(
aCheck
.
hasValue
())
{
_rxOut
=
*
static_cast
<
const
::
com
::
sun
::
star
::
uno
::
Reference
<
iface
>*>
(
aCheck
.
getValue
());
return
_rxOut
.
is
();
}
}
return
false
;
}
}
// namespace comphelper
...
...
svx/source/form/fmobj.cxx
Dosyayı görüntüle @
08a943fc
...
...
@@ -431,7 +431,8 @@ namespace
sReturn
=
sCurrentIndex
;
// travel up
if
(
::
comphelper
::
query_interface
(
Reference
<
XInterface
>
(
xParent
),
xChild
))
xChild
.
set
(
xParent
,
css
::
uno
::
UNO_QUERY
);
if
(
xChild
.
is
())
xParent
=
Reference
<
::
com
::
sun
::
star
::
container
::
XIndexAccess
>
(
xChild
->
getParent
(),
UNO_QUERY
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment