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
b9446cd4
Kaydet (Commit)
b9446cd4
authored
Mar 29, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
loplugin:cstylecast
Change-Id: I20b7936d2bb11363a701ca649deba31d53c76868
üst
1fca9d18
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
34 additions
and
34 deletions
+34
-34
MacabAddressBook.cxx
connectivity/source/drivers/macab/MacabAddressBook.cxx
+1
-1
MacabDatabaseMetaData.cxx
connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx
+1
-1
MacabDriver.cxx
connectivity/source/drivers/macab/MacabDriver.cxx
+1
-1
MacabGroup.cxx
connectivity/source/drivers/macab/MacabGroup.cxx
+3
-3
MacabHeader.cxx
connectivity/source/drivers/macab/MacabHeader.cxx
+3
-3
MacabPreparedStatement.cxx
connectivity/source/drivers/macab/MacabPreparedStatement.cxx
+1
-1
MacabRecord.cxx
connectivity/source/drivers/macab/MacabRecord.cxx
+12
-12
MacabRecords.cxx
connectivity/source/drivers/macab/MacabRecords.cxx
+0
-0
MacabResultSet.cxx
connectivity/source/drivers/macab/MacabResultSet.cxx
+12
-12
No files found.
connectivity/source/drivers/macab/MacabAddressBook.cxx
Dosyayı görüntüle @
b9446cd4
...
...
@@ -140,7 +140,7 @@ MacabRecords *MacabAddressBook::getMacabRecordsMatch(const OUString& _tableName)
/* Go through each group and create a MacabGroup out of it. */
for
(
i
=
0
;
i
<
nGroups
;
i
++
)
{
xGroup
=
(
ABGroupRef
)
CFArrayGetValueAtIndex
(
allGroups
,
i
);
xGroup
=
static_cast
<
ABGroupRef
>
(
const_cast
<
void
*>
(
CFArrayGetValueAtIndex
(
allGroups
,
i
))
);
m_xMacabGroups
[
i
]
=
new
MacabGroup
(
m_aAddressBook
,
m_xMacabRecords
,
xGroup
);
}
...
...
connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx
Dosyayı görüntüle @
b9446cd4
...
...
@@ -910,7 +910,7 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getColumns(
++
aField
,
++
nPosition
)
{
sName
=
CFStringToOUString
(
(
CFStringRef
)
(
*
aField
)
->
value
);
sName
=
CFStringToOUString
(
static_cast
<
CFStringRef
>
((
*
aField
)
->
value
)
);
if
(
match
(
columnNamePattern
,
sName
,
'\0'
))
{
aRow
[
4
]
=
new
ORowSetValueDecorator
(
sName
);
...
...
connectivity/source/drivers/macab/MacabDriver.cxx
Dosyayı görüntüle @
b9446cd4
...
...
@@ -66,7 +66,7 @@ namespace
{
const
OUString
sSymbolName
=
OUString
::
createFromAscii
(
_pAsciiSymbolName
);
_rFunction
=
(
FUNCTION
)
(
osl_getSymbol
(
_rModule
,
sSymbolName
.
pData
)
);
_rFunction
=
reinterpret_cast
<
FUNCTION
>
(
osl_getSymbol
(
_rModule
,
sSymbolName
.
pData
)
);
if
(
!
_rFunction
)
{
// did not find the symbol
...
...
connectivity/source/drivers/macab/MacabGroup.cxx
Dosyayı görüntüle @
b9446cd4
...
...
@@ -43,7 +43,7 @@ MacabGroup::MacabGroup(const ABAddressBookRef _addressBook, const MacabRecords *
// Set the group's name (stored in MacabRecords as m_sName)
CFStringRef
sGroupName
;
sGroupName
=
(
CFStringRef
)
ABRecordCopyValue
(
_xGroup
,
kABGroupNameProperty
);
sGroupName
=
static_cast
<
CFStringRef
>
(
ABRecordCopyValue
(
_xGroup
,
kABGroupNameProperty
)
);
m_sName
=
CFStringToOUString
(
sGroupName
);
CFRelease
(
sGroupName
);
...
...
@@ -60,10 +60,10 @@ MacabGroup::MacabGroup(const ABAddressBookRef _addressBook, const MacabRecords *
nAllRecordsSize
=
_allRecords
->
size
();
for
(
i
=
0
;
i
<
recordsSize
;
i
++
)
{
xPerson
=
(
ABPersonRef
)
CFArrayGetValueAtIndex
(
xGroupMembers
,
i
);
xPerson
=
static_cast
<
ABPersonRef
>
(
const_cast
<
void
*>
(
CFArrayGetValueAtIndex
(
xGroupMembers
,
i
))
);
if
(
xPerson
!=
NULL
)
{
sGroupMemberUID
=
(
CFStringRef
)
ABRecordCopyValue
(
xPerson
,
kABUIDProperty
);
sGroupMemberUID
=
static_cast
<
CFStringRef
>
(
ABRecordCopyValue
(
xPerson
,
kABUIDProperty
)
);
if
(
sGroupMemberUID
!=
NULL
)
{
bFound
=
false
;
...
...
connectivity/source/drivers/macab/MacabHeader.cxx
Dosyayı görüntüle @
b9446cd4
...
...
@@ -150,7 +150,7 @@ OUString MacabHeader::getString(const sal_Int32 i) const
return
OUString
();
try
{
nRet
=
CFStringToOUString
(
(
CFStringRef
)
fields
[
i
]
->
value
);
nRet
=
CFStringToOUString
(
static_cast
<
CFStringRef
>
(
fields
[
i
]
->
value
)
);
}
catch
(...){
}
}
...
...
@@ -256,8 +256,8 @@ sal_Int32 MacabHeader::compareFields(const macabfield *_field1, const macabfield
return
-
1
;
CFComparisonResult
result
=
CFStringCompare
(
(
CFStringRef
)
_field1
->
value
,
(
CFStringRef
)
_field2
->
value
,
static_cast
<
CFStringRef
>
(
_field1
->
value
)
,
static_cast
<
CFStringRef
>
(
_field2
->
value
)
,
0
);
// 0 = no options (like ignore case)
return
(
sal_Int32
)
result
;
...
...
connectivity/source/drivers/macab/MacabPreparedStatement.cxx
Dosyayı görüntüle @
b9446cd4
...
...
@@ -75,7 +75,7 @@ void MacabPreparedStatement::getNextParameter(OUString &rParameter) const throw(
const
OUString
sError
(
aResources
.
getResourceString
(
STR_INVALID_PARA_COUNT
)
);
::
dbtools
::
throwGenericSQLException
(
sError
,
*
(
MacabPreparedStatement
*
)
this
);
::
dbtools
::
throwGenericSQLException
(
sError
,
*
const_cast
<
MacabPreparedStatement
*>
(
this
)
);
}
rParameter
=
(
m_aParameterRow
->
get
())[
m_nParameterIndex
];
...
...
connectivity/source/drivers/macab/MacabRecord.cxx
Dosyayı görüntüle @
b9446cd4
...
...
@@ -190,23 +190,23 @@ sal_Int32 MacabRecord::compareFields(const macabfield *_field1, const macabfield
{
case
kABStringProperty
:
result
=
CFStringCompare
(
(
CFStringRef
)
_field1
->
value
,
(
CFStringRef
)
_field2
->
value
,
static_cast
<
CFStringRef
>
(
_field1
->
value
)
,
static_cast
<
CFStringRef
>
(
_field2
->
value
)
,
kCFCompareLocalized
);
// Specifies that the comparison should take into account differences related to locale, such as the thousands separator character.
break
;
case
kABDateProperty
:
result
=
CFDateCompare
(
(
CFDateRef
)
_field1
->
value
,
(
CFDateRef
)
_field2
->
value
,
static_cast
<
CFDateRef
>
(
_field1
->
value
)
,
static_cast
<
CFDateRef
>
(
_field2
->
value
)
,
NULL
);
// NULL = unused variable
break
;
case
kABIntegerProperty
:
case
kABRealProperty
:
result
=
CFNumberCompare
(
(
CFNumberRef
)
_field1
->
value
,
(
CFNumberRef
)
_field2
->
value
,
static_cast
<
CFNumberRef
>
(
_field1
->
value
)
,
static_cast
<
CFNumberRef
>
(
_field2
->
value
)
,
NULL
);
// NULL = unused variable
break
;
...
...
@@ -301,30 +301,30 @@ OUString MacabRecord::fieldToString(const macabfield *_aField)
switch
(
_aField
->
type
)
{
case
kABStringProperty
:
fieldString
=
CFStringToOUString
(
(
CFStringRef
)
_aField
->
value
);
fieldString
=
CFStringToOUString
(
static_cast
<
CFStringRef
>
(
_aField
->
value
)
);
break
;
case
kABDateProperty
:
{
DateTime
aTime
=
CFDateToDateTime
(
(
CFDateRef
)
_aField
->
value
);
DateTime
aTime
=
CFDateToDateTime
(
static_cast
<
CFDateRef
>
(
_aField
->
value
)
);
fieldString
=
DBTypeConversion
::
toDateTimeString
(
aTime
);
}
break
;
case
kABIntegerProperty
:
{
CFNumberType
numberType
=
CFNumberGetType
(
(
CFNumberRef
)
_aField
->
value
);
CFNumberType
numberType
=
CFNumberGetType
(
static_cast
<
CFNumberRef
>
(
_aField
->
value
)
);
sal_Int64
nVal
;
// Should we check for the wrong type here, e.g., a float?
bool
m_bSuccess
=
!
CFNumberGetValue
(
(
CFNumberRef
)
_aField
->
value
,
numberType
,
&
nVal
);
bool
m_bSuccess
=
!
CFNumberGetValue
(
static_cast
<
CFNumberRef
>
(
_aField
->
value
)
,
numberType
,
&
nVal
);
if
(
m_bSuccess
)
fieldString
=
OUString
::
number
(
nVal
);
}
break
;
case
kABRealProperty
:
{
CFNumberType
numberType
=
CFNumberGetType
(
(
CFNumberRef
)
_aField
->
value
);
CFNumberType
numberType
=
CFNumberGetType
(
static_cast
<
CFNumberRef
>
(
_aField
->
value
)
);
double
nVal
;
// Should we check for the wrong type here, e.g., an int?
bool
m_bSuccess
=
!
CFNumberGetValue
(
(
CFNumberRef
)
_aField
->
value
,
numberType
,
&
nVal
);
bool
m_bSuccess
=
!
CFNumberGetValue
(
static_cast
<
CFNumberRef
>
(
_aField
->
value
)
,
numberType
,
&
nVal
);
if
(
m_bSuccess
)
fieldString
=
OUString
::
number
(
nVal
);
}
...
...
connectivity/source/drivers/macab/MacabRecords.cxx
Dosyayı görüntüle @
b9446cd4
This diff is collapsed.
Click to expand it.
connectivity/source/drivers/macab/MacabResultSet.cxx
Dosyayı görüntüle @
b9446cd4
...
...
@@ -219,7 +219,7 @@ OUString SAL_CALL MacabResultSet::getString(sal_Int32 columnIndex) throw(SQLExce
{
if
(
aField
->
type
==
kABStringProperty
)
{
aRet
=
CFStringToOUString
(
(
CFStringRef
)
aField
->
value
);
aRet
=
CFStringToOUString
(
static_cast
<
CFStringRef
>
(
aField
->
value
)
);
m_bWasNull
=
false
;
}
}
...
...
@@ -278,10 +278,10 @@ sal_Int32 SAL_CALL MacabResultSet::getInt(sal_Int32 columnIndex) throw(SQLExcept
{
if
(
aField
->
type
==
kABIntegerProperty
)
{
CFNumberType
numberType
=
CFNumberGetType
(
(
CFNumberRef
)
aField
->
value
);
CFNumberType
numberType
=
CFNumberGetType
(
static_cast
<
CFNumberRef
>
(
aField
->
value
)
);
// m_bWasNull now becomes whether getting the value was successful
// Should we check for the wrong type here, e.g., a float or a 64 bit int?
m_bWasNull
=
!
CFNumberGetValue
(
(
CFNumberRef
)
aField
->
value
,
numberType
,
&
nRet
);
m_bWasNull
=
!
CFNumberGetValue
(
static_cast
<
CFNumberRef
>
(
aField
->
value
)
,
numberType
,
&
nRet
);
}
}
}
...
...
@@ -307,10 +307,10 @@ sal_Int64 SAL_CALL MacabResultSet::getLong(sal_Int32 columnIndex) throw(SQLExcep
{
if
(
aField
->
type
==
kABIntegerProperty
)
{
CFNumberType
numberType
=
CFNumberGetType
(
(
CFNumberRef
)
aField
->
value
);
CFNumberType
numberType
=
CFNumberGetType
(
static_cast
<
CFNumberRef
>
(
aField
->
value
)
);
// m_bWasNull now becomes whether getting the value was successful
// Should we check for the wrong type here, e.g., a float or a 32 bit int?
m_bWasNull
=
!
CFNumberGetValue
(
(
CFNumberRef
)
aField
->
value
,
numberType
,
&
nRet
);
m_bWasNull
=
!
CFNumberGetValue
(
static_cast
<
CFNumberRef
>
(
aField
->
value
)
,
numberType
,
&
nRet
);
}
}
}
...
...
@@ -336,10 +336,10 @@ float SAL_CALL MacabResultSet::getFloat(sal_Int32 columnIndex) throw(SQLExceptio
{
if
(
aField
->
type
==
kABRealProperty
)
{
CFNumberType
numberType
=
CFNumberGetType
(
(
CFNumberRef
)
aField
->
value
);
CFNumberType
numberType
=
CFNumberGetType
(
static_cast
<
CFNumberRef
>
(
aField
->
value
)
);
// m_bWasNull now becomes whether getting the value was successful
// Should we check for the wrong type here, e.g., an int or a double?
m_bWasNull
=
!
CFNumberGetValue
(
(
CFNumberRef
)
aField
->
value
,
numberType
,
&
nVal
);
m_bWasNull
=
!
CFNumberGetValue
(
static_cast
<
CFNumberRef
>
(
aField
->
value
)
,
numberType
,
&
nVal
);
}
}
}
...
...
@@ -365,10 +365,10 @@ double SAL_CALL MacabResultSet::getDouble(sal_Int32 columnIndex) throw(SQLExcept
{
if
(
aField
->
type
==
kABRealProperty
)
{
CFNumberType
numberType
=
CFNumberGetType
(
(
CFNumberRef
)
aField
->
value
);
CFNumberType
numberType
=
CFNumberGetType
(
static_cast
<
CFNumberRef
>
(
aField
->
value
)
);
// m_bWasNull now becomes whether getting the value was successful
// Should we check for the wrong type here, e.g., an int or a float?
m_bWasNull
=
!
CFNumberGetValue
(
(
CFNumberRef
)
aField
->
value
,
numberType
,
&
nVal
);
m_bWasNull
=
!
CFNumberGetValue
(
static_cast
<
CFNumberRef
>
(
aField
->
value
)
,
numberType
,
&
nVal
);
}
}
}
...
...
@@ -426,7 +426,7 @@ DateTime SAL_CALL MacabResultSet::getTimestamp(sal_Int32 columnIndex) throw(SQLE
{
if
(
aField
->
type
==
kABDateProperty
)
{
nRet
=
CFDateToDateTime
(
(
CFDateRef
)
aField
->
value
);
nRet
=
CFDateToDateTime
(
static_cast
<
CFDateRef
>
(
aField
->
value
)
);
m_bWasNull
=
false
;
}
}
...
...
@@ -885,7 +885,7 @@ Any SAL_CALL MacabResultSet::getBookmark() throw( SQLException, RuntimeExceptio
{
if
(
uidField
->
type
==
kABStringProperty
)
{
return
makeAny
(
CFStringToOUString
(
(
CFStringRef
)
uidField
->
value
));
return
makeAny
(
CFStringToOUString
(
static_cast
<
CFStringRef
>
(
uidField
->
value
)
));
}
}
}
...
...
@@ -907,7 +907,7 @@ sal_Bool SAL_CALL MacabResultSet::moveToBookmark(const Any& bookmark) throw( SQ
{
if
(
uidField
->
type
==
kABStringProperty
)
{
OUString
sUniqueIdentifier
=
CFStringToOUString
(
(
CFStringRef
)
uidField
->
value
);
OUString
sUniqueIdentifier
=
CFStringToOUString
(
static_cast
<
CFStringRef
>
(
uidField
->
value
)
);
if
(
sUniqueIdentifier
==
sBookmark
)
{
m_nRowPos
=
nRow
;
...
...
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