diff options
| author | Michael Stahl <mstahl@redhat.com> | 2016-06-02 22:51:23 +0200 |
|---|---|---|
| committer | Michael Stahl <mstahl@redhat.com> | 2016-06-03 11:22:23 +0200 |
| commit | 1e815327cde1718794de6a9b4e260b9efd0ec349 (patch) | |
| tree | e4a52ac227465e22da9cff28e2a595ee1784c9d7 /sw/source/core/fields | |
| parent | e8db81b2fb3bde736deb42d23f3ecfd680212767 (diff) | |
sw: convert some OSL_FAIL to assert
Change-Id: Ia5244d58b8975a371c2d74809021c2332ffa496b
Diffstat (limited to 'sw/source/core/fields')
| -rw-r--r-- | sw/source/core/fields/authfld.cxx | 4 | ||||
| -rw-r--r-- | sw/source/core/fields/chpfld.cxx | 5 | ||||
| -rw-r--r-- | sw/source/core/fields/dbfld.cxx | 8 | ||||
| -rw-r--r-- | sw/source/core/fields/ddefld.cxx | 4 | ||||
| -rw-r--r-- | sw/source/core/fields/docufld.cxx | 58 | ||||
| -rw-r--r-- | sw/source/core/fields/expfld.cxx | 8 | ||||
| -rw-r--r-- | sw/source/core/fields/fldbas.cxx | 4 | ||||
| -rw-r--r-- | sw/source/core/fields/flddropdown.cxx | 5 | ||||
| -rw-r--r-- | sw/source/core/fields/macrofld.cxx | 4 | ||||
| -rw-r--r-- | sw/source/core/fields/reffld.cxx | 4 | ||||
| -rw-r--r-- | sw/source/core/fields/scrptfld.cxx | 4 | ||||
| -rw-r--r-- | sw/source/core/fields/usrfld.cxx | 4 |
12 files changed, 57 insertions, 55 deletions
diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx index 9339aa28dea4..53fef8fcc306 100644 --- a/sw/source/core/fields/authfld.cxx +++ b/sw/source/core/fields/authfld.cxx @@ -383,7 +383,7 @@ bool SwAuthorityFieldType::QueryValue( Any& rVal, sal_uInt16 nWhichId ) const } break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -459,7 +459,7 @@ bool SwAuthorityFieldType::PutValue( const Any& rAny, sal_uInt16 nWhichId ) } break; default: - OSL_FAIL("illegal property"); + assert(false); } return bRet; } diff --git a/sw/source/core/fields/chpfld.cxx b/sw/source/core/fields/chpfld.cxx index 090509db2313..f7cf4ead10b0 100644 --- a/sw/source/core/fields/chpfld.cxx +++ b/sw/source/core/fields/chpfld.cxx @@ -221,7 +221,7 @@ bool SwChapterField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -263,8 +263,7 @@ bool SwChapterField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) break; default: - OSL_FAIL("illegal property"); - bRet = false; + assert(false); } return bRet; } diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx index 55b80d73a6f7..df209db7691d 100644 --- a/sw/source/core/fields/dbfld.cxx +++ b/sw/source/core/fields/dbfld.cxx @@ -116,7 +116,7 @@ bool SwDBFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const rAny <<= aDBData.nCommandType; break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -159,7 +159,7 @@ bool SwDBFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) rAny >>= aDBData.nCommandType; break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -499,7 +499,7 @@ bool SwDBNameInfField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const rAny <<= 0 == (GetSubType() & nsSwExtendedSubType::SUB_INVISIBLE); break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -531,7 +531,7 @@ bool SwDBNameInfField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) } break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } diff --git a/sw/source/core/fields/ddefld.cxx b/sw/source/core/fields/ddefld.cxx index 88f7d9fb6d5c..89b74b35408e 100644 --- a/sw/source/core/fields/ddefld.cxx +++ b/sw/source/core/fields/ddefld.cxx @@ -325,7 +325,7 @@ bool SwDDEFieldType::QueryValue( uno::Any& rVal, sal_uInt16 nWhichId ) const rVal <<= aExpansion; break; default: - OSL_FAIL("illegal property"); + assert(false); } if ( nPart>=0 ) rVal <<= GetCmd().getToken(nPart, sfx2::cTokenSeparator); @@ -349,7 +349,7 @@ bool SwDDEFieldType::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId ) rVal >>= aExpansion; break; default: - OSL_FAIL("illegal property"); + assert(false); } if( nPart>=0 ) { diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx index 578fa595acdb..a651c5ac1c22 100644 --- a/sw/source/core/fields/docufld.cxx +++ b/sw/source/core/fields/docufld.cxx @@ -266,7 +266,7 @@ bool SwPageNumberField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -311,7 +311,7 @@ bool SwPageNumberField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) break; default: - OSL_FAIL("illegal property"); + assert(false); } return bRet; } @@ -375,7 +375,7 @@ bool SwAuthorField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -400,7 +400,7 @@ bool SwAuthorField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -523,8 +523,9 @@ bool SwFileNameField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const case FIELD_PROP_PAR3: rAny <<= GetContent(); break; + default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -572,7 +573,7 @@ bool SwFileNameField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -675,8 +676,9 @@ bool SwTemplNameField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const rAny <<= nRet; } break; + default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -713,8 +715,9 @@ bool SwTemplNameField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) } } break; + default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -806,8 +809,9 @@ bool SwDocStatField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const case FIELD_PROP_USHORT2: rAny <<= (sal_Int16)GetFormat(); break; + default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -832,7 +836,7 @@ bool SwDocStatField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) break; default: - OSL_FAIL("illegal property"); + assert(false); } return bRet; } @@ -1483,7 +1487,7 @@ bool SwHiddenTextField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const rAny <<= bIsHidden; break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -1511,9 +1515,9 @@ bool SwHiddenTextField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) case FIELD_PROP_PAR4: rAny >>= aContent; bValid = true; - break; + break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -1592,7 +1596,7 @@ bool SwHiddenParaField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -1609,7 +1613,7 @@ bool SwHiddenParaField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -1780,7 +1784,7 @@ bool SwPostItField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const } break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -1826,7 +1830,7 @@ bool SwPostItField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) } break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -1945,7 +1949,7 @@ bool SwExtUserField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const rAny <<= IsFixed(); break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -1972,7 +1976,7 @@ bool SwExtUserField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) SetFormat(GetFormat() & ~AF_FIXED); break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -2033,7 +2037,7 @@ bool SwRefPageSetField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const rAny <<= (sal_Int16)nOffset; break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -2049,7 +2053,7 @@ bool SwRefPageSetField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) rAny >>=nOffset; break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -2272,7 +2276,7 @@ bool SwRefPageGetField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const rAny <<= sText; break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -2295,7 +2299,7 @@ bool SwRefPageGetField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) rAny >>= sText; break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -2390,7 +2394,7 @@ bool SwJumpEditField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const rAny <<= sText; break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -2423,7 +2427,7 @@ bool SwJumpEditField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) rAny >>= sText; break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -2479,7 +2483,7 @@ bool SwCombinedCharField::QueryValue( uno::Any& rAny, rAny <<= sCharacters; break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -2497,7 +2501,7 @@ bool SwCombinedCharField::PutValue( const uno::Any& rAny, } break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx index 0bf81dd1439e..37b981c19323 100644 --- a/sw/source/core/fields/expfld.cxx +++ b/sw/source/core/fields/expfld.cxx @@ -650,7 +650,7 @@ bool SwSetExpFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const } break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -687,7 +687,7 @@ bool SwSetExpFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) } break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -1263,7 +1263,7 @@ bool SwInputField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const rAny <<= aToolTip; break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -1285,7 +1285,7 @@ bool SwInputField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) rAny >>= aToolTip; break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx index cb606c1b6777..cfc3a80bf1fe 100644 --- a/sw/source/core/fields/fldbas.cxx +++ b/sw/source/core/fields/fldbas.cxx @@ -299,7 +299,7 @@ bool SwField::QueryValue( uno::Any& rVal, sal_uInt16 nWhichId ) const rVal <<= !m_bIsAutomaticLanguage; break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -316,7 +316,7 @@ bool SwField::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId ) } break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } diff --git a/sw/source/core/fields/flddropdown.cxx b/sw/source/core/fields/flddropdown.cxx index 5d16e5fcb823..e2b1fb7ee27b 100644 --- a/sw/source/core/fields/flddropdown.cxx +++ b/sw/source/core/fields/flddropdown.cxx @@ -172,11 +172,10 @@ bool SwDropDownField::QueryValue(::uno::Any &rVal, sal_uInt16 nWhich) const break; case FIELD_PROP_STRINGS: rVal <<= GetItemSequence(); - break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -216,7 +215,7 @@ bool SwDropDownField::PutValue(const uno::Any &rVal, break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } diff --git a/sw/source/core/fields/macrofld.cxx b/sw/source/core/fields/macrofld.cxx index 3d1ec7051f9d..6c112100a7c7 100644 --- a/sw/source/core/fields/macrofld.cxx +++ b/sw/source/core/fields/macrofld.cxx @@ -161,7 +161,7 @@ bool SwMacroField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const rAny <<= bIsScriptURL ? GetMacroName() : OUString(); break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -187,7 +187,7 @@ bool SwMacroField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) bIsScriptURL = isScriptURL(aMacro); break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx index 2d669f33834c..a993a073642c 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -664,7 +664,7 @@ bool SwGetRefField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const rAny <<= (sal_Int16)nSeqNo; break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -741,7 +741,7 @@ bool SwGetRefField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) } break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } diff --git a/sw/source/core/fields/scrptfld.cxx b/sw/source/core/fields/scrptfld.cxx index e746c822420f..d1097cc28911 100644 --- a/sw/source/core/fields/scrptfld.cxx +++ b/sw/source/core/fields/scrptfld.cxx @@ -91,7 +91,7 @@ bool SwScriptField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const rAny <<= bCodeURL; break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -110,7 +110,7 @@ bool SwScriptField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) bCodeURL = *static_cast<sal_Bool const *>(rAny.getValue()); break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } diff --git a/sw/source/core/fields/usrfld.cxx b/sw/source/core/fields/usrfld.cxx index e14ffa13e037..e87666dccc6a 100644 --- a/sw/source/core/fields/usrfld.cxx +++ b/sw/source/core/fields/usrfld.cxx @@ -287,7 +287,7 @@ bool SwUserFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const rAny <<= 0 != (nsSwGetSetExpType::GSE_EXPR&nType); break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } @@ -324,7 +324,7 @@ bool SwUserFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) } break; default: - OSL_FAIL("illegal property"); + assert(false); } return true; } |
