[Libreoffice-commits] core.git: 3 commits - configmgr/source include/com sfx2/source
Stephan Bergmann
sbergman at redhat.com
Fri May 9 04:17:39 PDT 2014
configmgr/source/writemodfile.cxx | 6 +++---
include/com/sun/star/uno/Sequence.h | 6 ++++++
sfx2/source/dialog/dinfdlg.cxx | 4 ++--
3 files changed, 11 insertions(+), 5 deletions(-)
New commits:
commit 37d764bce9eb5d5f126464ca566594e108719ea7
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri May 9 13:14:46 2014 +0200
Enforce "There is no css::uno::Sequence<bool>"
While some uses of Sequence<bool> might silently work, it would be too dangerous
to accidentally pass them around to other places that correctly expect
Sequence<sal_Bool> instead, so best to rule them out completely.
Change-Id: Ia60c839218c079cc42b4310d1315d95b6f2c68fd
diff --git a/include/com/sun/star/uno/Sequence.h b/include/com/sun/star/uno/Sequence.h
index b7e4195..92bcf8a 100644
--- a/include/com/sun/star/uno/Sequence.h
+++ b/include/com/sun/star/uno/Sequence.h
@@ -248,6 +248,12 @@ public:
{ return _pSequence; }
};
+// Find uses of illegal Sequence<bool> (instead of Sequence<sal_Bool>) during
+// compilation:
+template<> class Sequence<bool> {
+ Sequence(Sequence<bool> const &) SAL_DELETED_FUNCTION;
+};
+
/** Creates a UNO byte sequence from a SAL byte sequence.
@param rByteSequence a byte sequence
commit 22e800c4d2d500020dd0390ee5c816f9dd7fd88b
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri May 9 13:13:42 2014 +0200
There is no css::uno::Sequence<bool>
This partially reverts 78b9537b6aca0f998f939988e6e1a56528d28baf "various:
sal_Bool->bool."
Change-Id: I732b2fb2cca3e66b396a35645f12ae96a40163d5
diff --git a/configmgr/source/writemodfile.cxx b/configmgr/source/writemodfile.cxx
index 7ceade5..b3d7b87 100644
--- a/configmgr/source/writemodfile.cxx
+++ b/configmgr/source/writemodfile.cxx
@@ -114,7 +114,7 @@ void writeData_(oslFileHandle handle, char const * begin, sal_Int32 length) {
}
}
-void writeValueContent_(oslFileHandle handle, bool value) {
+void writeValueContent_(oslFileHandle handle, sal_Bool value) {
if (value) {
writeData_(handle, RTL_CONSTASCII_STRINGPARAM("true"));
} else {
@@ -196,7 +196,7 @@ template< typename T > void writeItemListValue(
void writeValue(oslFileHandle handle, Type type, css::uno::Any const & value) {
switch (type) {
case TYPE_BOOLEAN:
- writeSingleValue< bool >(handle, value);
+ writeSingleValue< sal_Bool >(handle, value);
break;
case TYPE_SHORT:
writeSingleValue< sal_Int16 >(handle, value);
@@ -217,7 +217,7 @@ void writeValue(oslFileHandle handle, Type type, css::uno::Any const & value) {
writeSingleValue< css::uno::Sequence< sal_Int8 > >(handle, value);
break;
case TYPE_BOOLEAN_LIST:
- writeListValue< bool >(handle, value);
+ writeListValue< sal_Bool >(handle, value);
break;
case TYPE_SHORT_LIST:
writeListValue< sal_Int16 >(handle, value);
commit e69c93d9c58f95f02a22c68c87966b10f34c55ac
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri May 9 13:13:23 2014 +0200
There is no css::uno::Sequence<bool>
Change-Id: Ibd630320d7cfb4c80c35e91e4407203b1783e980
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 92471b6..1fe4ff8 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -2297,7 +2297,7 @@ void CmisPropertiesWindow::AddLine( const OUString& sId, const OUString& sName,
}
else if ( sType == CMIS_TYPE_BOOL )
{
- Sequence< bool > seqValue;
+ Sequence<sal_Bool> seqValue;
rAny >>= seqValue;
sal_Int32 m_nNumValue = seqValue.getLength( );
for ( sal_Int32 i = 0; i < m_nNumValue; ++i )
@@ -2407,7 +2407,7 @@ Sequence< document::CmisProperty > CmisPropertiesWindow::GetCmisProperties() con
}
else if ( CMIS_TYPE_BOOL == sType )
{
- Sequence< bool > seqValue( pLine->m_aYesNos.size( ) );
+ Sequence<sal_Bool> seqValue( pLine->m_aYesNos.size( ) );
sal_Int32 k = 0;
for ( std::vector< CmisYesNo*>::const_iterator it = pLine->m_aYesNos.begin();
it != pLine->m_aYesNos.end(); ++it, ++k)
More information about the Libreoffice-commits
mailing list