diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-11-12 09:05:53 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-11-16 16:54:42 +0100 |
commit | f65dea36d2778b7f626ac8b07cd057110a5c3a4b (patch) | |
tree | 3b88477a134b90ec1b7717069fc8c127bb63f71d /sw/source/uibase/uno | |
parent | 195fd6b5e3cfbf5359ea58663ae7c97f78ac4592 (diff) |
sw: convert 'a ? b : sal_True' to '!a || b'
Change-Id: I7177521a9bf9c845216e2b6c91d20df93b137987
Diffstat (limited to 'sw/source/uibase/uno')
-rw-r--r-- | sw/source/uibase/uno/unotxdoc.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uno/unotxvw.cxx | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index f2585c088b18..50dc5f895976 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -4000,7 +4000,7 @@ SwViewOptionAdjust_Impl::AdjustViewOptions(SwPrintData const*const pPrtOptions) if (bContainsPlaceHolders) { // should always be printed in PDF export! - bVal = pPrtOptions ? pPrtOptions->bPrintTextPlaceholder : sal_True; + bVal = !pPrtOptions || pPrtOptions->bPrintTextPlaceholder; aRenderViewOptions.SetShowPlaceHolderFields( bVal ); } diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx index 07d93e8ea962..7f6682ef7fd9 100644 --- a/sw/source/uibase/uno/unotxvw.cxx +++ b/sw/source/uibase/uno/unotxvw.cxx @@ -483,7 +483,7 @@ sal_Bool SAL_CALL SwXTextView::isFormDesignMode( ) throw (uno::RuntimeException SolarMutexGuard aGuard; SwView* pView2 = GetView(); FmFormShell* pFormShell = pView2 ? pView2->GetFormShell() : NULL; - return pFormShell ? pFormShell->IsDesignMode() : sal_True; + return static_cast<sal_Bool>(!pFormShell || pFormShell->IsDesignMode()); } void SAL_CALL SwXTextView::setFormDesignMode( sal_Bool _DesignMode ) throw (RuntimeException, std::exception) @@ -632,8 +632,8 @@ void SAL_CALL SwXTextView::setRubyList( } else if(pProperties[nProp].Name == UNO_NAME_RUBY_IS_ABOVE) { - bool bValue = pProperties[nProp].Value.hasValue() ? - *(sal_Bool*)pProperties[nProp].Value.getValue() : sal_True; + bool bValue = !pProperties[nProp].Value.hasValue() || + *(sal_Bool*)pProperties[nProp].Value.getValue(); pEntry->GetRubyAttr().SetPosition(bValue ? 0 : 1); } } |