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
a9b7c6f4
Kaydet (Commit)
a9b7c6f4
authored
Mar 03, 2016
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
loplugin:unuseddefaultparams in include/filter
Change-Id: I893b50835717d449e495e00e9b33de0b60467a6e
üst
99469ae7
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
30 additions
and
77 deletions
+30
-77
dbexception.cxx
connectivity/source/commontools/dbexception.cxx
+8
-10
dbtools.cxx
connectivity/source/commontools/dbtools.cxx
+2
-2
predicateinput.cxx
connectivity/source/commontools/predicateinput.cxx
+3
-11
sqlerror.cxx
connectivity/source/commontools/sqlerror.cxx
+6
-6
dbexception.hxx
include/connectivity/dbexception.hxx
+4
-13
dbtools.hxx
include/connectivity/dbtools.hxx
+1
-2
predicateinput.hxx
include/connectivity/predicateinput.hxx
+3
-12
sqlerror.hxx
include/connectivity/sqlerror.hxx
+3
-21
No files found.
connectivity/source/commontools/dbexception.cxx
Dosyayı görüntüle @
a9b7c6f4
...
...
@@ -185,11 +185,11 @@ SQLExceptionInfo::operator const ::com::sun::star::sdb::SQLContext*() const
}
void
SQLExceptionInfo
::
prepend
(
const
OUString
&
_rErrorMessage
,
const
OUString
&
_rSQLState
,
const
sal_Int32
_nErrorCode
)
void
SQLExceptionInfo
::
prepend
(
const
OUString
&
_rErrorMessage
,
const
OUString
&
_rSQLState
)
{
SQLException
aException
;
aException
.
Message
=
_rErrorMessage
;
aException
.
ErrorCode
=
_nErrorCode
;
aException
.
ErrorCode
=
0
;
aException
.
SQLState
=
!
_rSQLState
.
isEmpty
()
?
_rSQLState
:
"S1000"
;
aException
.
NextException
=
m_aContent
;
m_aContent
<<=
aException
;
...
...
@@ -369,8 +369,7 @@ void throwInvalidIndexException(const ::com::sun::star::uno::Reference< ::com::s
}
void
throwFunctionNotSupportedSQLException
(
const
OUString
&
_rFunctionName
,
const
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>&
_rxContext
,
const
css
::
uno
::
Any
&
_rNextException
)
throw
(
css
::
sdbc
::
SQLException
)
const
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>&
_rxContext
)
throw
(
css
::
sdbc
::
SQLException
)
{
::
connectivity
::
SharedResources
aResources
;
const
OUString
sError
(
aResources
.
getResourceStringWithSubstitution
(
...
...
@@ -382,7 +381,7 @@ void throwFunctionNotSupportedSQLException(const OUString& _rFunctionName,
_rxContext
,
getStandardSQLState
(
StandardSQLState
::
FUNCTION_NOT_SUPPORTED
),
0
,
_rNextException
css
::
uno
::
Any
()
);
}
...
...
@@ -413,7 +412,7 @@ void throwGenericSQLException(const OUString& _rMsg, const Reference< XInterface
throw
SQLException
(
_rMsg
,
_rxSource
,
getStandardSQLState
(
StandardSQLState
::
GENERAL_ERROR
),
0
,
_rNextException
);
}
void
throwFeatureNotImplementedSQLException
(
const
OUString
&
_rFeatureName
,
const
Reference
<
XInterface
>&
_rxContext
,
const
Any
*
_pNextException
)
void
throwFeatureNotImplementedSQLException
(
const
OUString
&
_rFeatureName
,
const
Reference
<
XInterface
>&
_rxContext
)
throw
(
SQLException
)
{
::
connectivity
::
SharedResources
aResources
;
...
...
@@ -427,7 +426,7 @@ void throwFeatureNotImplementedSQLException( const OUString& _rFeatureName, cons
_rxContext
,
getStandardSQLState
(
StandardSQLState
::
FEATURE_NOT_IMPLEMENTED
),
0
,
_pNextException
?
*
_pNextException
:
Any
()
Any
()
);
}
...
...
@@ -467,10 +466,9 @@ void throwSQLException( const OUString& _rMessage, const OUString& _rSQLState,
void
throwSQLException
(
const
OUString
&
_rMessage
,
StandardSQLState
_eSQLState
,
const
Reference
<
XInterface
>&
_rxContext
,
const
sal_Int32
_nErrorCode
,
const
Any
*
_pNextException
)
throw
(
SQLException
)
const
Reference
<
XInterface
>&
_rxContext
,
const
sal_Int32
_nErrorCode
)
throw
(
SQLException
)
{
throwSQLException
(
_rMessage
,
getStandardSQLState
(
_eSQLState
),
_rxContext
,
_nErrorCode
,
_pNextException
);
throwSQLException
(
_rMessage
,
getStandardSQLState
(
_eSQLState
),
_rxContext
,
_nErrorCode
);
}
...
...
connectivity/source/commontools/dbtools.cxx
Dosyayı görüntüle @
a9b7c6f4
...
...
@@ -734,11 +734,11 @@ Sequence< OUString > getFieldNamesByCommandDescriptor( const Reference< XConnect
}
SQLException
prependErrorInfo
(
const
SQLException
&
_rChainedException
,
const
Reference
<
XInterface
>&
_rxContext
,
const
OUString
&
_rAdditionalError
,
const
StandardSQLState
_eSQLState
,
const
sal_Int32
_nErrorCode
)
const
OUString
&
_rAdditionalError
,
const
StandardSQLState
_eSQLState
)
{
return
SQLException
(
_rAdditionalError
,
_rxContext
,
_eSQLState
==
StandardSQLState
::
ERROR_UNSPECIFIED
?
OUString
()
:
getStandardSQLState
(
_eSQLState
),
_nErrorCode
,
makeAny
(
_rChainedException
)
);
0
,
makeAny
(
_rChainedException
)
);
}
namespace
...
...
connectivity/source/commontools/predicateinput.cxx
Dosyayı görüntüle @
a9b7c6f4
...
...
@@ -276,8 +276,7 @@ namespace dbtools
OUString
OPredicateInputController
::
getPredicateValueStr
(
const
OUString
&
_rPredicateValue
,
const
Reference
<
XPropertySet
>
&
_rxField
,
OUString
*
_pErrorMessage
)
const
const
OUString
&
_rPredicateValue
,
const
Reference
<
XPropertySet
>
&
_rxField
)
const
{
OSL_ENSURE
(
_rxField
.
is
(),
"OPredicateInputController::getPredicateValue: invalid params!"
);
OUString
sReturn
;
...
...
@@ -290,8 +289,6 @@ namespace dbtools
OUString
sError
;
OSQLParseNode
*
pParseNode
=
implPredicateTree
(
sError
,
sValue
,
_rxField
);
if
(
_pErrorMessage
)
*
_pErrorMessage
=
sError
;
implParseNode
(
pParseNode
,
true
)
>>=
sReturn
;
}
...
...
@@ -300,7 +297,7 @@ namespace dbtools
}
OUString
OPredicateInputController
::
getPredicateValueStr
(
const
OUString
&
_sField
,
const
OUString
&
_rPredicateValue
,
OUString
*
_pErrorMessage
)
const
const
OUString
&
_sField
,
const
OUString
&
_rPredicateValue
)
const
{
OUString
sReturn
=
_rPredicateValue
;
OUString
sError
;
...
...
@@ -345,8 +342,6 @@ namespace dbtools
pColumn
->
setRealName
(
sField
);
OSQLParseNode
*
pParseNode
=
implPredicateTree
(
sError
,
_rPredicateValue
,
xColumn
);
if
(
_pErrorMessage
)
*
_pErrorMessage
=
sError
;
if
(
pParseNode
)
{
implParseNode
(
pParseNode
,
true
)
>>=
sReturn
;
...
...
@@ -355,8 +350,7 @@ namespace dbtools
}
Any
OPredicateInputController
::
getPredicateValue
(
const
OUString
&
_rPredicateValue
,
const
Reference
<
XPropertySet
>
&
_rxField
,
OUString
*
_pErrorMessage
)
const
const
OUString
&
_rPredicateValue
,
const
Reference
<
XPropertySet
>
&
_rxField
)
const
{
OSL_ENSURE
(
_rxField
.
is
(),
"OPredicateInputController::getPredicateValue: invalid params!"
);
...
...
@@ -369,8 +363,6 @@ namespace dbtools
OUString
sError
;
OSQLParseNode
*
pParseNode
=
implPredicateTree
(
sError
,
sValue
,
_rxField
);
if
(
_pErrorMessage
)
*
_pErrorMessage
=
sError
;
return
implParseNode
(
pParseNode
,
false
);
}
...
...
connectivity/source/commontools/sqlerror.cxx
Dosyayı görüntüle @
a9b7c6f4
...
...
@@ -293,9 +293,9 @@ namespace connectivity
}
OUString
SQLError
::
getErrorMessage
(
const
ErrorCondition
_eCondition
,
const
ParamValue
&
_rParamValue1
,
const
ParamValue
&
_rParamValue2
,
const
ParamValue
&
_rParamValue3
)
const
OUString
SQLError
::
getErrorMessage
(
const
ErrorCondition
_eCondition
,
const
ParamValue
&
_rParamValue1
,
const
ParamValue
&
_rParamValue2
)
const
{
return
m_pImpl
->
getErrorMessage
(
_eCondition
,
_rParamValue1
,
_rParamValue2
,
_rParamValue3
);
return
m_pImpl
->
getErrorMessage
(
_eCondition
,
_rParamValue1
,
_rParamValue2
,
ParamValue
()
);
}
...
...
@@ -311,16 +311,16 @@ namespace connectivity
}
void
SQLError
::
raiseException
(
const
ErrorCondition
_eCondition
,
const
ParamValue
&
_rParamValue1
,
const
ParamValue
&
_rParamValue2
,
const
ParamValue
&
_rParamValue3
)
const
void
SQLError
::
raiseException
(
const
ErrorCondition
_eCondition
,
const
ParamValue
&
_rParamValue1
,
const
ParamValue
&
_rParamValue2
)
const
{
m_pImpl
->
raiseException
(
_eCondition
,
_rParamValue1
,
_rParamValue2
,
_rParamValue3
);
m_pImpl
->
raiseException
(
_eCondition
,
_rParamValue1
,
_rParamValue2
,
ParamValue
()
);
}
void
SQLError
::
raiseTypedException
(
const
ErrorCondition
_eCondition
,
const
Reference
<
XInterface
>&
_rxContext
,
const
Type
&
_rExceptionType
,
const
ParamValue
&
_rParamValue1
,
const
ParamValue
&
_rParamValue2
,
const
ParamValue
&
_rParamValue3
)
const
const
Type
&
_rExceptionType
,
const
ParamValue
&
_rParamValue1
,
const
ParamValue
&
_rParamValue2
)
const
{
m_pImpl
->
raiseTypedException
(
_eCondition
,
_rxContext
,
_rExceptionType
,
_rParamValue1
,
_rParamValue2
,
_rParamValue3
);
m_pImpl
->
raiseTypedException
(
_eCondition
,
_rxContext
,
_rExceptionType
,
_rParamValue1
,
_rParamValue2
,
ParamValue
()
);
}
...
...
include/connectivity/dbexception.hxx
Dosyayı görüntüle @
a9b7c6f4
...
...
@@ -93,10 +93,8 @@ public:
the error message to prepend
@param _rSQLState
the SQLState of the to-be-constructed SQLException, or NULL if this should be defaulted to HY000
@param _nErrorCode
the ErrorCode of the to-be-constructed SQLException
*/
void
prepend
(
const
OUString
&
_rErrorMessage
,
const
OUString
&
_rSQLState
=
OUString
()
,
const
sal_Int32
_nErrorCode
=
0
);
void
prepend
(
const
OUString
&
_rErrorMessage
,
const
OUString
&
_rSQLState
=
OUString
()
);
/** appends a plain message to the chain of exceptions
@param _eType
...
...
@@ -222,8 +220,7 @@ OOO_DLLPUBLIC_DBTOOLS OUString getStandardSQLState( StandardSQLState _eState );
*/
OOO_DLLPUBLIC_DBTOOLS
void
throwFunctionNotSupportedSQLException
(
const
OUString
&
_rFunctionName
,
const
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>&
_rxContext
,
const
css
::
uno
::
Any
&
_rNextException
=
css
::
uno
::
Any
()
const
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>&
_rxContext
)
throw
(
css
::
sdbc
::
SQLException
);
...
...
@@ -276,13 +273,10 @@ OOO_DLLPUBLIC_DBTOOLS void throwGenericSQLException(
name is built from the name of the interface plus its method, for instance "XParameters::updateBinaryStream"
@param _rxContext
the context of the exception
@param _pNextException
the next exception to chain into the thrown exception, if any
*/
OOO_DLLPUBLIC_DBTOOLS
void
throwFeatureNotImplementedSQLException
(
const
OUString
&
_rFeatureName
,
const
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>&
_rxContext
,
const
css
::
uno
::
Any
*
_pNextException
=
nullptr
const
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>&
_rxContext
)
throw
(
css
::
sdbc
::
SQLException
);
...
...
@@ -292,8 +286,6 @@ OOO_DLLPUBLIC_DBTOOLS void throwFeatureNotImplementedSQLException(
name is built from the name of the interface plus its method, for instance "XParameters::updateBinaryStream"
@param _rxContext
the context of the exception
@param _pNextException
the next exception to chain into the thrown exception, if any
*/
OOO_DLLPUBLIC_DBTOOLS
void
throwFeatureNotImplementedRuntimeException
(
const
OUString
&
_rFeatureName
,
...
...
@@ -332,8 +324,7 @@ OOO_DLLPUBLIC_DBTOOLS void throwSQLException(
const
OUString
&
_rMessage
,
StandardSQLState
_eSQLState
,
const
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>&
_rxContext
,
const
sal_Int32
_nErrorCode
=
0
,
const
css
::
uno
::
Any
*
_pNextException
=
nullptr
const
sal_Int32
_nErrorCode
=
0
)
throw
(
css
::
sdbc
::
SQLException
);
...
...
include/connectivity/dbtools.hxx
Dosyayı görüntüle @
a9b7c6f4
...
...
@@ -306,8 +306,7 @@ namespace dbtools
const
css
::
sdbc
::
SQLException
&
_rChainedException
,
const
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>&
_rxContext
,
const
OUString
&
_rAdditionalError
,
const
StandardSQLState
_eSQLState
=
StandardSQLState
::
ERROR_UNSPECIFIED
,
const
sal_Int32
_nErrorCode
=
0
);
const
StandardSQLState
_eSQLState
=
StandardSQLState
::
ERROR_UNSPECIFIED
);
/** search the parent hierarchy for a data source.
*/
...
...
include/connectivity/predicateinput.hxx
Dosyayı görüntüle @
a9b7c6f4
...
...
@@ -79,36 +79,27 @@ namespace dbtools
the value which has been normalized using normalizePredicateString
@param _rxField
is the field for which a predicate is to be entered
@param _pErrorMessage
If not <NULL/>, and a parsing error occurs, the error message will be copied to the string the argument
points to.
@see normalizePredicateString
*/
OUString
getPredicateValueStr
(
const
OUString
&
_rPredicateValue
,
const
css
::
uno
::
Reference
<
css
::
beans
::
XPropertySet
>
&
_rxField
,
OUString
*
_pErrorMessage
=
nullptr
const
css
::
uno
::
Reference
<
css
::
beans
::
XPropertySet
>
&
_rxField
)
const
;
OUString
getPredicateValueStr
(
const
OUString
&
_sField
,
const
OUString
&
_rPredicateValue
,
OUString
*
_pErrorMessage
=
nullptr
)
const
;
,
const
OUString
&
_rPredicateValue
)
const
;
/** get the value of the predicate, either as an empty or as a string
@param _rPredicateValue
the value which has been normalized using normalizePredicateString
@param _rxField
is the field for which a predicate is to be entered
@param _pErrorMessage
If not <NULL/>, and a parsing error occurs, the error message will be copied to the string the argument
points to.
@see normalizePredicateString
*/
css
::
uno
::
Any
getPredicateValue
(
const
OUString
&
_rPredicateValue
,
const
css
::
uno
::
Reference
<
css
::
beans
::
XPropertySet
>
&
_rxField
,
OUString
*
_pErrorMessage
=
nullptr
const
css
::
uno
::
Reference
<
css
::
beans
::
XPropertySet
>
&
_rxField
)
const
;
private
:
...
...
include/connectivity/sqlerror.hxx
Dosyayı görüntüle @
a9b7c6f4
...
...
@@ -108,18 +108,12 @@ namespace connectivity
not present (see <code>::boost::optional::operator !</code>), then no replacement
will happen, and <code>_rParamValue3</code> will be ignored.
@param _rParamValue1
the value which the placeholder $1$ should be replaced with. If this value is
not present (see <code>::boost::optional::operator !</code>), then no replacement
will happen.
@see css::sdb::ErrorCondition
*/
OUString
getErrorMessage
(
const
ErrorCondition
_eCondition
,
const
ParamValue
&
_rParamValue1
=
ParamValue
(),
const
ParamValue
&
_rParamValue2
=
ParamValue
(),
const
ParamValue
&
_rParamValue3
=
ParamValue
()
const
ParamValue
&
_rParamValue2
=
ParamValue
()
)
const
;
/** returns the error code associated with a given error condition
...
...
@@ -204,19 +198,13 @@ namespace connectivity
which is associated with <arg>_eCondition</arg>, replacing the second placeholder
in this message.
@param _rParamValue3
a runtime-dependent value which should be filled into the error message
which is associated with <arg>_eCondition</arg>, replacing the third placeholder
in this message.
@see getErrorMessage
@see getErrorCode
*/
void
raiseException
(
const
ErrorCondition
_eCondition
,
const
ParamValue
&
_rParamValue1
=
ParamValue
(),
const
ParamValue
&
_rParamValue2
=
ParamValue
(),
const
ParamValue
&
_rParamValue3
=
ParamValue
()
const
ParamValue
&
_rParamValue2
=
ParamValue
()
)
const
;
/** raises a typed exception, that is, a UNO exception which is derived from
...
...
@@ -243,11 +231,6 @@ namespace connectivity
which is associated with <arg>_eCondition</arg>, replacing the second placeholder
in this message.
@param _rParamValue3
a runtime-dependent value which should be filled into the error message
which is associated with <arg>_eCondition</arg>, replacing the third placeholder
in this message.
@throws ::std::bad_cast
if <arg>_rExceptionType</arg> does not specify an exception class derived from
css::sdbc::SQLException.
...
...
@@ -260,8 +243,7 @@ namespace connectivity
const
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>&
_rxContext
,
const
css
::
uno
::
Type
&
_rExceptionType
,
const
ParamValue
&
_rParamValue1
=
ParamValue
(),
const
ParamValue
&
_rParamValue2
=
ParamValue
(),
const
ParamValue
&
_rParamValue3
=
ParamValue
()
const
ParamValue
&
_rParamValue2
=
ParamValue
()
)
const
;
/** retrieves an <code>SQLException</code> object which contains information about
...
...
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