Kaydet (Commit) b919eeaa authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:simplifybool

Change-Id: Ie145292074b39fae5da40a7337737dd753b4d2ea
üst a9a4d46c
...@@ -526,7 +526,7 @@ void DomainMapper::lcl_attribute(Id nName, Value & val) ...@@ -526,7 +526,7 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
break; break;
case NS_ooxml::LN_CT_EastAsianLayout_combine: case NS_ooxml::LN_CT_EastAsianLayout_combine:
if (m_pImpl->GetTopContext()) if (m_pImpl->GetTopContext())
m_pImpl->GetTopContext()->Insert(PROP_CHAR_COMBINE_IS_ON, uno::makeAny ( nIntValue ? true : false )); m_pImpl->GetTopContext()->Insert(PROP_CHAR_COMBINE_IS_ON, uno::makeAny ( nIntValue != 0 ));
break; break;
case NS_ooxml::LN_CT_EastAsianLayout_combineBrackets: case NS_ooxml::LN_CT_EastAsianLayout_combineBrackets:
if (m_pImpl->GetTopContext()) if (m_pImpl->GetTopContext())
...@@ -546,7 +546,7 @@ void DomainMapper::lcl_attribute(Id nName, Value & val) ...@@ -546,7 +546,7 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
break; break;
case NS_ooxml::LN_CT_EastAsianLayout_vertCompress: case NS_ooxml::LN_CT_EastAsianLayout_vertCompress:
if (m_pImpl->GetTopContext()) if (m_pImpl->GetTopContext())
m_pImpl->GetTopContext()->Insert(PROP_CHAR_ROTATION_IS_FIT_TO_LINE, uno::makeAny ( nIntValue ? true : false)); m_pImpl->GetTopContext()->Insert(PROP_CHAR_ROTATION_IS_FIT_TO_LINE, uno::makeAny ( nIntValue != 0 ));
break; break;
case NS_ooxml::LN_CT_PageSz_code: case NS_ooxml::LN_CT_PageSz_code:
...@@ -1171,10 +1171,10 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext ) ...@@ -1171,10 +1171,10 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext )
handleParaJustification(nIntValue, rContext, ExchangeLeftRight( rContext, m_pImpl )); handleParaJustification(nIntValue, rContext, ExchangeLeftRight( rContext, m_pImpl ));
break; break;
case NS_ooxml::LN_CT_PPrBase_keepLines: case NS_ooxml::LN_CT_PPrBase_keepLines:
rContext->Insert(PROP_PARA_SPLIT, uno::makeAny(nIntValue ? false : true)); rContext->Insert(PROP_PARA_SPLIT, uno::makeAny(nIntValue == 0));
break; break;
case NS_ooxml::LN_CT_PPrBase_keepNext: case NS_ooxml::LN_CT_PPrBase_keepNext:
rContext->Insert(PROP_PARA_KEEP_TOGETHER, uno::makeAny( nIntValue ? true : false) ); rContext->Insert(PROP_PARA_KEEP_TOGETHER, uno::makeAny( nIntValue != 0 ) );
break; break;
case NS_ooxml::LN_CT_PPrBase_pageBreakBefore: case NS_ooxml::LN_CT_PPrBase_pageBreakBefore:
rContext->Insert(PROP_BREAK_TYPE, uno::makeAny(nIntValue ? style::BreakType_PAGE_BEFORE : style::BreakType_NONE)); rContext->Insert(PROP_BREAK_TYPE, uno::makeAny(nIntValue ? style::BreakType_PAGE_BEFORE : style::BreakType_NONE));
...@@ -1235,7 +1235,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext ) ...@@ -1235,7 +1235,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext )
} }
break; break;
case NS_ooxml::LN_CT_PPrBase_suppressLineNumbers: case NS_ooxml::LN_CT_PPrBase_suppressLineNumbers:
rContext->Insert(PROP_PARA_LINE_NUMBER_COUNT, uno::makeAny( nIntValue ? false : true) ); rContext->Insert(PROP_PARA_LINE_NUMBER_COUNT, uno::makeAny( nIntValue == 0 ) );
break; break;
case NS_ooxml::LN_inTbl: case NS_ooxml::LN_inTbl:
break; break;
...@@ -1301,7 +1301,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext ) ...@@ -1301,7 +1301,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext )
case NS_ooxml::LN_CT_PBdr_bar: case NS_ooxml::LN_CT_PBdr_bar:
break; break;
case NS_ooxml::LN_CT_PPrBase_suppressAutoHyphens: case NS_ooxml::LN_CT_PPrBase_suppressAutoHyphens:
rContext->Insert(PROP_PARA_IS_HYPHENATION, uno::makeAny( nIntValue ? false : true )); rContext->Insert(PROP_PARA_IS_HYPHENATION, uno::makeAny( nIntValue == 0 ));
break; break;
case NS_ooxml::LN_CT_FramePr_h: case NS_ooxml::LN_CT_FramePr_h:
break; break;
...@@ -1340,7 +1340,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext ) ...@@ -1340,7 +1340,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext )
} }
break; // sprmPFWidowControl break; // sprmPFWidowControl
case NS_ooxml::LN_CT_PPrBase_overflowPunct: case NS_ooxml::LN_CT_PPrBase_overflowPunct:
rContext->Insert(PROP_PARA_IS_HANGING_PUNCTUATION, uno::makeAny( nIntValue ? false : true )); rContext->Insert(PROP_PARA_IS_HANGING_PUNCTUATION, uno::makeAny( nIntValue == 0 ));
break; break;
case NS_ooxml::LN_CT_PPrBase_topLinePunct: case NS_ooxml::LN_CT_PPrBase_topLinePunct:
break; break;
...@@ -1552,7 +1552,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext ) ...@@ -1552,7 +1552,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext )
case NS_ooxml::LN_EG_RPrBase_shadow: case NS_ooxml::LN_EG_RPrBase_shadow:
case NS_ooxml::LN_EG_RPrBase_vanish: case NS_ooxml::LN_EG_RPrBase_vanish:
case NS_ooxml::LN_EG_RPrBase_webHidden: case NS_ooxml::LN_EG_RPrBase_webHidden:
rContext->Insert(ePropertyId, uno::makeAny( nIntValue ? true : false )); rContext->Insert(ePropertyId, uno::makeAny( nIntValue != 0 ));
break; break;
case NS_ooxml::LN_EG_RPrBase_smallCaps: case NS_ooxml::LN_EG_RPrBase_smallCaps:
// If smallcaps would be just disabled and an other casemap is already inserted, don't do anything. // If smallcaps would be just disabled and an other casemap is already inserted, don't do anything.
......
...@@ -551,7 +551,7 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue) ...@@ -551,7 +551,7 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
m_pImpl->aBorders[m_pImpl->nCurrentBorderLine].nLineDistance = nIntValue; m_pImpl->aBorders[m_pImpl->nCurrentBorderLine].nLineDistance = nIntValue;
break; break;
case NS_ooxml::LN_CT_Border_shadow: case NS_ooxml::LN_CT_Border_shadow:
m_pImpl->aBorders[m_pImpl->nCurrentBorderLine].bHasShadow = nIntValue ? true : false; m_pImpl->aBorders[m_pImpl->nCurrentBorderLine].bHasShadow = nIntValue != 0;
break; break;
case NS_ooxml::LN_CT_Border_frame: case NS_ooxml::LN_CT_Border_frame:
break; break;
......
...@@ -219,13 +219,13 @@ void SettingsTable::lcl_sprm(Sprm& rSprm) ...@@ -219,13 +219,13 @@ void SettingsTable::lcl_sprm(Sprm& rSprm)
m_pImpl->m_bEvenAndOddHeaders = nIntValue; m_pImpl->m_bEvenAndOddHeaders = nIntValue;
break; break;
case NS_ooxml::LN_CT_Settings_noPunctuationKerning: // 92526; case NS_ooxml::LN_CT_Settings_noPunctuationKerning: // 92526;
m_pImpl->m_bNoPunctuationKerning = nIntValue ? true : false; m_pImpl->m_bNoPunctuationKerning = nIntValue != 0;
break; break;
case NS_ooxml::LN_CT_Settings_characterSpacingControl: // 92527; case NS_ooxml::LN_CT_Settings_characterSpacingControl: // 92527;
m_pImpl->m_sCharacterSpacing = sStringValue; // doNotCompress, compressPunctuation, compressPunctuationAndJapaneseKana m_pImpl->m_sCharacterSpacing = sStringValue; // doNotCompress, compressPunctuation, compressPunctuationAndJapaneseKana
break; break;
case NS_ooxml::LN_CT_Settings_doNotIncludeSubdocsInStats: // 92554; // Do Not Include Content in Text Boxes, Footnotes, and Endnotes in Document Statistics) case NS_ooxml::LN_CT_Settings_doNotIncludeSubdocsInStats: // 92554; // Do Not Include Content in Text Boxes, Footnotes, and Endnotes in Document Statistics)
m_pImpl->m_doNotIncludeSubdocsInStats = nIntValue ? true : false; m_pImpl->m_doNotIncludeSubdocsInStats = nIntValue != 0;
break; break;
case NS_ooxml::LN_CT_Settings_decimalSymbol: // 92562; case NS_ooxml::LN_CT_Settings_decimalSymbol: // 92562;
m_pImpl->m_sDecimalSymbol = sStringValue; m_pImpl->m_sDecimalSymbol = sStringValue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment