diff options
author | Benjamin Ni <benjaminniri@hotmail.com> | 2015-09-25 11:41:53 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-11-02 23:40:57 +0100 |
commit | be729e772196f33543e21cb9bac21add87726b20 (patch) | |
tree | f2150f458e2b07f8924b4702d37c09c8dd52215a /binaryurp | |
parent | 6ccf68622e51c1b727dd042c1c1a71b5d1fd6a12 (diff) |
tdf#94269: Replace "n" prefix for bool variables with "b"
Change-Id: I178545792c7354a362658ac7ef8b1d4cf0865797
Signed-off-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'binaryurp')
-rw-r--r-- | binaryurp/source/bridge.cxx | 26 | ||||
-rw-r--r-- | binaryurp/source/proxy.cxx | 10 | ||||
-rw-r--r-- | binaryurp/source/reader.cxx | 14 | ||||
-rw-r--r-- | binaryurp/source/unmarshal.cxx | 6 | ||||
-rw-r--r-- | binaryurp/source/writer.cxx | 10 |
5 files changed, 33 insertions, 33 deletions
diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx index 1534faf186e1..6641143b8f80 100644 --- a/binaryurp/source/bridge.cxx +++ b/binaryurp/source/bridge.cxx @@ -697,13 +697,13 @@ void Bridge::handleRequestChangeReply( void Bridge::handleCommitChangeReply( bool exception, BinaryAny const & returnValue) { - bool ccMode = true; + bool bCcMode = true; try { throwException(exception, returnValue); } catch (const css::bridge::InvalidProtocolChangeException &) { - ccMode = false; + bCcMode = false; } - if (ccMode) { + if (bCcMode) { setCurrentContextMode(); } assert(mode_ == MODE_REQUESTED || mode_ == MODE_REPLY_1); @@ -766,8 +766,8 @@ void Bridge::handleRequestChangeRequest( void Bridge::handleCommitChangeRequest( rtl::ByteSequence const & tid, std::vector< BinaryAny > const & inArguments) { - bool ccMode = false; - bool exc = false; + bool bCcMode = false; + bool bExc = false; BinaryAny ret; assert(inArguments.size() == 1); css::uno::Sequence< css::bridge::ProtocolProperty > s; @@ -776,10 +776,10 @@ void Bridge::handleCommitChangeRequest( (void) ok; // avoid warnings for (sal_Int32 i = 0; i != s.getLength(); ++i) { if (s[i].Name == "CurrentContext") { - ccMode = true; + bCcMode = true; } else { - ccMode = false; - exc = true; + bCcMode = false; + bExc = true; ret = mapCppToBinaryAny( css::uno::makeAny( css::bridge::InvalidProtocolChangeException( @@ -792,8 +792,8 @@ void Bridge::handleCommitChangeRequest( switch (mode_) { case MODE_WAIT: getWriter()->sendDirectReply( - tid, protPropCommit_, exc, ret, std::vector< BinaryAny >()); - if (ccMode) { + tid, protPropCommit_, bExc, ret, std::vector< BinaryAny >()); + if (bCcMode) { setCurrentContextMode(); mode_ = MODE_NORMAL; getWriter()->unblock(); @@ -805,7 +805,7 @@ void Bridge::handleCommitChangeRequest( case MODE_NORMAL_WAIT: getWriter()->queueReply( tid, protPropCommit_, false, false, ret, std::vector< BinaryAny >(), - ccMode); + bCcMode); mode_ = MODE_NORMAL; break; default: @@ -873,12 +873,12 @@ css::uno::Reference< css::uno::XInterface > Bridge::getInstance( &p)); BinaryAny ret; std::vector< BinaryAny> outArgs; - bool exc = makeCall( + bool bExc = makeCall( sInstanceName, css::uno::TypeDescription( "com.sun.star.uno.XInterface::queryInterface"), false, inArgs, &ret, &outArgs); - throwException(exc, ret); + throwException(bExc, ret); return css::uno::Reference< css::uno::XInterface >( static_cast< css::uno::XInterface * >( binaryToCppMapping_.mapInterface( diff --git a/binaryurp/source/proxy.cxx b/binaryurp/source/proxy.cxx index 6ab9e8f1c8ca..e3dc96199eee 100644 --- a/binaryurp/source/proxy.cxx +++ b/binaryurp/source/proxy.cxx @@ -133,12 +133,12 @@ void Proxy::do_dispatch_throw( { //TODO: Optimize queryInterface: assert(member != 0); - bool setter = false; + bool bSetter = false; std::vector< BinaryAny > inArgs; switch (member->eTypeClass) { case typelib_TypeClass_INTERFACE_ATTRIBUTE: - setter = returnValue == 0; - if (setter) { + bSetter = returnValue == 0; + if (bSetter) { inArgs.push_back( BinaryAny( css::uno::TypeDescription( @@ -174,7 +174,7 @@ void Proxy::do_dispatch_throw( oid_, css::uno::TypeDescription( const_cast< typelib_TypeDescription * >(member)), - setter, inArgs, &ret, &outArgs)) + bSetter, inArgs, &ret, &outArgs)) { assert(ret.getType().get()->eTypeClass == typelib_TypeClass_EXCEPTION); uno_any_construct( @@ -182,7 +182,7 @@ void Proxy::do_dispatch_throw( } else { switch (member->eTypeClass) { case typelib_TypeClass_INTERFACE_ATTRIBUTE: - if (!setter) { + if (!bSetter) { css::uno::TypeDescription t( reinterpret_cast< typelib_InterfaceAttributeTypeDescription const * >( diff --git a/binaryurp/source/reader.cxx b/binaryurp/source/reader.cxx index d4b407438d8f..eed96ae9f431 100644 --- a/binaryurp/source/reader.cxx +++ b/binaryurp/source/reader.cxx @@ -231,14 +231,14 @@ void Reader::readMessage(Unmarshal & unmarshal) { ("superfluous MUSTREPLY/SYNCHRONOUS ignored in request message with" " non-oneway function ID")); bool synchronous = !oneWay || forceSynchronous; - bool setter = false; + bool bSetter = false; std::vector< BinaryAny > inArgs; switch (memberTd.get()->eTypeClass) { case typelib_TypeClass_INTERFACE_ATTRIBUTE: - setter = itd->pMapMemberIndexToFunctionIndex[memberId] != functionId; + bSetter = itd->pMapMemberIndexToFunctionIndex[memberId] != functionId; // pMapMemberIndexToFunctionIndex contains function index of // attribute getter - if (setter) { + if (bSetter) { inArgs.push_back( unmarshal.readValue( css::uno::TypeDescription( @@ -330,7 +330,7 @@ void Reader::readMessage(Unmarshal & unmarshal) { std::unique_ptr< IncomingRequest > req( new IncomingRequest( bridge_, tid, oid, obj, type, functionId, synchronous, memberTd, - setter, inArgs, ccMode, cc)); + bSetter, inArgs, ccMode, cc)); if (synchronous) { bridge_->incrementActiveCalls(); } @@ -386,18 +386,18 @@ void Reader::readReplyMessage(Unmarshal & unmarshal, sal_uInt8 flags1) { assert(false); // this cannot happen break; } - bool ok = false; + bool bOk = false; for (sal_Int32 i = 0; i != n; ++i) { if (typelib_typedescriptionreference_isAssignableFrom( p[i], reinterpret_cast< typelib_TypeDescriptionReference * >( ret.getType().get()))) { - ok = true; + bOk = true; break; } } - if (!ok) { + if (!bOk) { throw css::uno::RuntimeException( "URP: reply message with bad exception type received"); } diff --git a/binaryurp/source/unmarshal.cxx b/binaryurp/source/unmarshal.cxx index eaeb54b471c0..43ddfa87db23 100644 --- a/binaryurp/source/unmarshal.cxx +++ b/binaryurp/source/unmarshal.cxx @@ -321,14 +321,14 @@ BinaryAny Unmarshal::readValue(css::uno::TypeDescription const & type) { type.makeComplete(); typelib_EnumTypeDescription * etd = reinterpret_cast< typelib_EnumTypeDescription * >(type.get()); - bool found = false; + bool bFound = false; for (sal_Int32 i = 0; i != etd->nEnumValues; ++i) { if (etd->pEnumValues[i] == v) { - found = true; + bFound = true; break; } } - if (!found) { + if (!bFound) { throw css::io::IOException( "binaryurp::Unmarshal: unknown enum value"); } diff --git a/binaryurp/source/writer.cxx b/binaryurp/source/writer.cxx index 84edbd40187d..3813dbc7187d 100644 --- a/binaryurp/source/writer.cxx +++ b/binaryurp/source/writer.cxx @@ -196,7 +196,7 @@ void Writer::sendRequest( OSL_ASSERT(tid.getLength() != 0 && !oid.isEmpty() && member.is()); css::uno::TypeDescription t(type); sal_Int32 functionId = 0; - bool forceSynchronous = false; + bool bForceSynchronous = false; member.makeComplete(); switch (member.get()->eTypeClass) { case typelib_TypeClass_INTERFACE_ATTRIBUTE: @@ -228,7 +228,7 @@ void Writer::sendRequest( t.makeComplete(); functionId = mtd->pInterface->pMapMemberIndexToFunctionIndex[ mtd->aBase.nPosition]; - forceSynchronous = mtd->bOneWay && + bForceSynchronous = mtd->bOneWay && functionId != SPECIAL_FUNCTION_ID_RELEASE; break; } @@ -244,17 +244,17 @@ void Writer::sendRequest( bool newType = !(lastType_.is() && t.equals(lastType_)); bool newOid = oid != lastOid_; bool newTid = tid != lastTid_; - if (newType || newOid || newTid || forceSynchronous || functionId > 0x3FFF) + if (newType || newOid || newTid || bForceSynchronous || functionId > 0x3FFF) // > 14 bit function ID { Marshal::write8( &buf, (0xC0 | (newType ? 0x20 : 0) | (newOid ? 0x10 : 0) | (newTid ? 0x08 : 0) | (functionId > 0xFF ? 0x04 : 0) | - (forceSynchronous ? 0x01 : 0))); + (bForceSynchronous ? 0x01 : 0))); // bit 7: LONGHEADER, bit 6: REQUEST, bit 5: NEWTYPE, bit 4: NEWOID, // bit 3: NEWTID, bit 2: FUNCTIONID16, bit 0: MOREFLAGS - if (forceSynchronous) { + if (bForceSynchronous) { Marshal::write8(&buf, 0xC0); // bit 7: MUSTREPLY, bit 6: SYNCHRONOUS } if (functionId <= 0xFF) { |