summaryrefslogtreecommitdiff
path: root/xmloff/source/style
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/style')
-rw-r--r--xmloff/source/style/MultiPropertySetHelper.cxx6
-rw-r--r--xmloff/source/style/XMLFootnoteSeparatorImport.cxx2
-rw-r--r--xmloff/source/style/XMLPageExport.cxx8
-rw-r--r--xmloff/source/style/backhdl.cxx2
-rw-r--r--xmloff/source/style/prhdlfac.cxx2
-rw-r--r--xmloff/source/style/prstylei.cxx6
-rw-r--r--xmloff/source/style/xmlnume.cxx14
-rw-r--r--xmloff/source/style/xmlnumfe.cxx6
-rw-r--r--xmloff/source/style/xmlnumfi.cxx6
-rw-r--r--xmloff/source/style/xmlnumi.cxx12
10 files changed, 32 insertions, 32 deletions
diff --git a/xmloff/source/style/MultiPropertySetHelper.cxx b/xmloff/source/style/MultiPropertySetHelper.cxx
index bf56be5c9e09..a7f3d597b292 100644
--- a/xmloff/source/style/MultiPropertySetHelper.cxx
+++ b/xmloff/source/style/MultiPropertySetHelper.cxx
@@ -64,7 +64,7 @@ MultiPropertySetHelper::~MultiPropertySetHelper()
void MultiPropertySetHelper::hasProperties(
const Reference<XPropertySetInfo> & rInfo )
{
- DBG_ASSERT( rInfo.is(), "I'd really like an XPropertySetInfo here." );
+ SAL_WARN_IF( !rInfo.is(), "xmloff", "I'd really like an XPropertySetInfo here." );
// allocate sequence index
if ( nullptr == pSequenceIndex )
@@ -107,7 +107,7 @@ bool MultiPropertySetHelper::checkedProperties()
void MultiPropertySetHelper::getValues(
const Reference<XMultiPropertySet> & rMultiPropertySet )
{
- DBG_ASSERT( rMultiPropertySet.is(), "We need an XMultiPropertySet." );
+ SAL_WARN_IF( !rMultiPropertySet.is(), "xmloff", "We need an XMultiPropertySet." );
aValues = rMultiPropertySet->getPropertyValues( aPropertySequence );
pValues = aValues.getConstArray();
@@ -116,7 +116,7 @@ void MultiPropertySetHelper::getValues(
void MultiPropertySetHelper::getValues(
const Reference<XPropertySet> & rPropertySet )
{
- DBG_ASSERT( rPropertySet.is(), "We need an XPropertySet." );
+ SAL_WARN_IF( !rPropertySet.is(), "xmloff", "We need an XPropertySet." );
// re-alloc aValues (if necessary) and fill with values from XPropertySet
sal_Int16 nSupportedPropertiesCount =
diff --git a/xmloff/source/style/XMLFootnoteSeparatorImport.cxx b/xmloff/source/style/XMLFootnoteSeparatorImport.cxx
index df2b277821cc..86ee5249f9d0 100644
--- a/xmloff/source/style/XMLFootnoteSeparatorImport.cxx
+++ b/xmloff/source/style/XMLFootnoteSeparatorImport.cxx
@@ -189,7 +189,7 @@ void XMLFootnoteSeparatorImport::StartElement(
XMLPropertyState aLineTextDistance( nIndex, uno::Any(nLineTextDistance));
rProperties.push_back(aLineTextDistance);
- DBG_ASSERT( rMapper->FindEntryIndex(CTF_PM_FTN_LINE_WEIGHT) == nPropIndex,
+ SAL_WARN_IF( rMapper->FindEntryIndex(CTF_PM_FTN_LINE_WEIGHT) != nPropIndex, "xmloff",
"Received wrong property map index!" );
XMLPropertyState aLineWeight( nPropIndex, uno::Any(nLineWeight) );
rProperties.push_back(aLineWeight);
diff --git a/xmloff/source/style/XMLPageExport.cxx b/xmloff/source/style/XMLPageExport.cxx
index 0eee93743e7b..1328735cc296 100644
--- a/xmloff/source/style/XMLPageExport.cxx
+++ b/xmloff/source/style/XMLPageExport.cxx
@@ -60,7 +60,7 @@ void XMLPageExport::collectPageMasterAutoStyle(
const Reference < XPropertySet > & rPropSet,
OUString& rPageMasterName )
{
- DBG_ASSERT( xPageMasterPropSetMapper.is(), "page master family/XMLPageMasterPropSetMapper not found" );
+ SAL_WARN_IF( !xPageMasterPropSetMapper.is(), "xmloff", "page master family/XMLPageMasterPropSetMapper not found" );
if( xPageMasterPropSetMapper.is() )
{
::std::vector<XMLPropertyState> aPropStates = xPageMasterExportPropMapper->Filter( rPropSet );
@@ -168,12 +168,12 @@ XMLPageExport::XMLPageExport( SvXMLExport& rExp ) :
Reference< XStyleFamiliesSupplier > xFamiliesSupp( GetExport().GetModel(),
UNO_QUERY );
- DBG_ASSERT( xFamiliesSupp.is(),
+ SAL_WARN_IF( !xFamiliesSupp.is(), "xmloff",
"No XStyleFamiliesSupplier from XModel for export!" );
if( xFamiliesSupp.is() )
{
Reference< XNameAccess > xFamilies( xFamiliesSupp->getStyleFamilies() );
- DBG_ASSERT( xFamiliesSupp.is(),
+ SAL_WARN_IF( !xFamiliesSupp.is(), "xmloff",
"getStyleFamilies() from XModel failed for export!" );
if( xFamilies.is() )
{
@@ -183,7 +183,7 @@ XMLPageExport::XMLPageExport( SvXMLExport& rExp ) :
{
xPageStyles.set(xFamilies->getByName( aPageStyleName ),uno::UNO_QUERY);
- DBG_ASSERT( xPageStyles.is(),
+ SAL_WARN_IF( !xPageStyles.is(), "xmloff",
"Page Styles not found for export!" );
}
}
diff --git a/xmloff/source/style/backhdl.cxx b/xmloff/source/style/backhdl.cxx
index 3d38bd7b5ac2..b6dde63c9cdf 100644
--- a/xmloff/source/style/backhdl.cxx
+++ b/xmloff/source/style/backhdl.cxx
@@ -247,7 +247,7 @@ void XMLBackGraphicPositionPropHdl::MergeXMLVertPos( style::GraphicLocation& ePo
void XMLBackGraphicPositionPropHdl::MergeXMLHoriPos( style::GraphicLocation& ePos, style::GraphicLocation eHori )
{
- DBG_ASSERT( style::GraphicLocation_LEFT_MIDDLE==eHori || style::GraphicLocation_MIDDLE_MIDDLE==eHori || style::GraphicLocation_RIGHT_MIDDLE==eHori,
+ SAL_WARN_IF( !(style::GraphicLocation_LEFT_MIDDLE==eHori || style::GraphicLocation_MIDDLE_MIDDLE==eHori || style::GraphicLocation_RIGHT_MIDDLE==eHori), "xmloff",
"lcl_frmitems_MergeXMLHoriPos: vertical pos must be middle" );
switch( ePos )
diff --git a/xmloff/source/style/prhdlfac.cxx b/xmloff/source/style/prhdlfac.cxx
index 991ae88693ed..8e703e3fe778 100644
--- a/xmloff/source/style/prhdlfac.cxx
+++ b/xmloff/source/style/prhdlfac.cxx
@@ -117,7 +117,7 @@ XMLPropertyHandlerFactory::~XMLPropertyHandlerFactory()
// Interface
const XMLPropertyHandler* XMLPropertyHandlerFactory::GetPropertyHandler( sal_Int32 nType ) const
{
- DBG_ASSERT( (nType & ~((sal_uInt32)MID_FLAG_MASK)) == 0,
+ SAL_WARN_IF( (nType & ~((sal_uInt32)MID_FLAG_MASK)) != 0, "xmloff",
"GetPropertyHandler called with flags in type" );
return GetBasicHandler( nType );
}
diff --git a/xmloff/source/style/prstylei.cxx b/xmloff/source/style/prstylei.cxx
index 8d63fdcbe9ca..5c1b63b2e666 100644
--- a/xmloff/source/style/prstylei.cxx
+++ b/xmloff/source/style/prstylei.cxx
@@ -62,7 +62,7 @@ void XMLPropStyleContext::SetAttribute( sal_uInt16 nPrefixKey,
{
if( XML_NAMESPACE_STYLE == nPrefixKey && IsXMLToken( rLocalName, XML_FAMILY ) )
{
- DBG_ASSERT( GetFamily() == static_cast<SvXMLStylesContext *>(&mxStyles)->GetFamily( rValue ), "unexpected style family" );
+ SAL_WARN_IF( GetFamily() != static_cast<SvXMLStylesContext *>(&mxStyles)->GetFamily( rValue ), "xmloff", "unexpected style family" );
}
else
{
@@ -220,7 +220,7 @@ void XMLPropStyleContext::FillPropertySet(
rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap =
static_cast<SvXMLStylesContext *>(&mxStyles)->GetImportPropertyMapper(
GetFamily() );
- DBG_ASSERT( xImpPrMap.is(), "There is the import prop mapper" );
+ SAL_WARN_IF( !xImpPrMap.is(), "xmloff", "There is the import prop mapper" );
if( xImpPrMap.is() )
xImpPrMap->FillPropertySet( maProperties, rPropSet );
}
@@ -443,7 +443,7 @@ void XMLPropStyleContext::Finish( bool bOverwrite )
// The families container must exist
Reference < XNameContainer > xFamilies =
static_cast<SvXMLStylesContext *>(&mxStyles)->GetStylesContainer( GetFamily() );
- DBG_ASSERT( xFamilies.is(), "Families lost" );
+ SAL_WARN_IF( !xFamilies.is(), "xmloff", "Families lost" );
if( !xFamilies.is() )
return;
diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx
index abd982f95900..a52c40316f49 100644
--- a/xmloff/source/style/xmlnume.cxx
+++ b/xmloff/source/style/xmlnume.cxx
@@ -239,7 +239,7 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel,
if( bOutline && (NumberingType::CHAR_SPECIAL == eType ||
NumberingType::BITMAP == eType) )
{
- DBG_ASSERT( !bOutline,
+ SAL_WARN_IF( bOutline, "xmloff",
"SvxXMLNumRuleExport::exportLevelStyle: invalid style for outline" );
return;
}
@@ -315,7 +315,7 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel,
}
else
{
- DBG_ASSERT( !xBitmap.is(),
+ SAL_WARN_IF( xBitmap.is(), "xmloff",
"embedded images are not supported by now" );
}
}
@@ -728,12 +728,12 @@ void SvxXMLNumRuleExport::exportOutline()
{
Reference< XChapterNumberingSupplier > xCNSupplier( GetExport().GetModel(),
UNO_QUERY );
- DBG_ASSERT( xCNSupplier.is(), "no chapter numbering supplier" );
+ SAL_WARN_IF( !xCNSupplier.is(), "xmloff", "no chapter numbering supplier" );
if( xCNSupplier.is() )
{
Reference< XIndexReplace > xNumRule( xCNSupplier->getChapterNumberingRules() );
- DBG_ASSERT( xNumRule.is(), "no chapter numbering rules" );
+ SAL_WARN_IF( !xNumRule.is(), "xmloff", "no chapter numbering rules" );
if( xNumRule.is() )
{
@@ -793,11 +793,11 @@ void SvxXMLNumRuleExport::exportStyles( bool bUsed,
exportOutline();
Reference< XStyleFamiliesSupplier > xFamiliesSupp( GetExport().GetModel(), UNO_QUERY );
- DBG_ASSERT( xFamiliesSupp.is(), "No XStyleFamiliesSupplier from XModel for export!" );
+ SAL_WARN_IF( !xFamiliesSupp.is(), "xmloff", "No XStyleFamiliesSupplier from XModel for export!" );
if( xFamiliesSupp.is() )
{
Reference< XNameAccess > xFamilies( xFamiliesSupp->getStyleFamilies() );
- DBG_ASSERT( xFamiliesSupp.is(), "getStyleFamilies() from XModel failed for export!" );
+ SAL_WARN_IF( !xFamiliesSupp.is(), "xmloff", "getStyleFamilies() from XModel failed for export!" );
if( xFamilies.is() )
{
@@ -808,7 +808,7 @@ void SvxXMLNumRuleExport::exportStyles( bool bUsed,
{
xFamilies->getByName( aNumberStyleName ) >>= xStyles;
- DBG_ASSERT( xStyles.is(), "Style not found for export!" );
+ SAL_WARN_IF( !xStyles.is(), "xmloff", "Style not found for export!" );
if( xStyles.is() )
{
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index 78bd915f4dc5..3fd0d5cd84e1 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -1096,7 +1096,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
eType = XML_BOOLEAN_STYLE;
break;
}
- DBG_ASSERT( eType != XML_TOKEN_INVALID, "unknown format type" );
+ SAL_WARN_IF( eType == XML_TOKEN_INVALID, "xmloff", "unknown format type" );
OUString sAttrValue;
bool bUserDef = ( rFormat.GetType() & css::util::NumberFormat::DEFINED );
@@ -1867,7 +1867,7 @@ OUString SvXMLNumFmtExport::GetStyleName( sal_uInt32 nKey )
void SvXMLNumFmtExport::SetUsed( sal_uInt32 nKey )
{
- DBG_ASSERT( pFormatter != nullptr, "missing formatter" );
+ SAL_WARN_IF( pFormatter == nullptr, "xmloff", "missing formatter" );
if( !pFormatter )
return;
@@ -1903,7 +1903,7 @@ sal_uInt32 SvXMLNumFmtExport::ForceSystemLanguage( sal_uInt32 nKey )
const SvNumberformat* pFormat = lcl_GetFormat( pFormatter, nKey );
if( pFormat != nullptr )
{
- DBG_ASSERT( pFormatter != nullptr, "format without formatter?" );
+ SAL_WARN_IF( pFormatter == nullptr, "xmloff", "format without formatter?" );
sal_Int32 nErrorPos;
short nType = pFormat->GetType();
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index 42ef1d457c1e..7e9c501ce0fb 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -363,7 +363,7 @@ SvXMLNumImpData::SvXMLNumImpData(
pLocaleData(nullptr),
m_xContext(rxContext)
{
- DBG_ASSERT( rxContext.is(), "got no service manager" );
+ SAL_WARN_IF( !rxContext.is(), "xmloff", "got no service manager" );
}
SvXMLNumImpData::~SvXMLNumImpData()
@@ -2245,7 +2245,7 @@ SvXMLNumFmtHelper::SvXMLNumFmtHelper(
const uno::Reference<util::XNumberFormatsSupplier>& rSupp,
const uno::Reference<uno::XComponentContext>& rxContext )
{
- DBG_ASSERT( rxContext.is(), "got no service manager" );
+ SAL_WARN_IF( !rxContext.is(), "xmloff", "got no service manager" );
SvNumberFormatter* pFormatter = nullptr;
SvNumberFormatsSupplierObj* pObj =
@@ -2260,7 +2260,7 @@ SvXMLNumFmtHelper::SvXMLNumFmtHelper(
SvNumberFormatter* pNumberFormatter,
const uno::Reference<uno::XComponentContext>& rxContext )
{
- DBG_ASSERT( rxContext.is(), "got no service manager" );
+ SAL_WARN_IF( !rxContext.is(), "xmloff", "got no service manager" );
pData = new SvXMLNumImpData( pNumberFormatter, rxContext );
}
diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx
index 5d24e0ed6a9f..5feafabda5d5 100644
--- a/xmloff/source/style/xmlnumi.cxx
+++ b/xmloff/source/style/xmlnumi.cxx
@@ -582,7 +582,7 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties()
pProps[nPos++].Value <<= m_nColor;
}
- DBG_ASSERT( nPos == nCount, "array under/overflow" );
+ SAL_WARN_IF( nPos != nCount, "xmloff", "array under/overflow" );
}
return aPropSeq;
@@ -1162,7 +1162,7 @@ void SvxXMLListStyleContext::CreateAndInsertLate( bool bOverwrite )
{
Reference< XMultiServiceFactory > xFactory( GetImport().GetModel(),
UNO_QUERY );
- DBG_ASSERT( xFactory.is(), "no factory" );
+ SAL_WARN_IF( !xFactory.is(), "xmloff", "no factory" );
if( !xFactory.is() )
return;
@@ -1213,8 +1213,8 @@ void SvxXMLListStyleContext::CreateAndInsertLate( bool bOverwrite )
void SvxXMLListStyleContext::CreateAndInsertAuto() const
{
- DBG_ASSERT( !bOutline, "Outlines cannot be inserted here" );
- DBG_ASSERT( !xNumRules.is(), "Numbering Rule is existing already" );
+ SAL_WARN_IF( bOutline, "xmloff", "Outlines cannot be inserted here" );
+ SAL_WARN_IF( xNumRules.is(), "xmloff", "Numbering Rule is existing already" );
const OUString& rName = GetName();
if( bOutline || xNumRules.is() || rName.isEmpty() )
@@ -1236,7 +1236,7 @@ Reference < XIndexReplace > SvxXMLListStyleContext::CreateNumRule(
Reference<XIndexReplace> xNumRule;
Reference< XMultiServiceFactory > xFactory( rModel, UNO_QUERY );
- DBG_ASSERT( xFactory.is(), "no factory" );
+ SAL_WARN_IF( !xFactory.is(), "xmloff", "no factory" );
if( !xFactory.is() )
return xNumRule;
@@ -1245,7 +1245,7 @@ Reference < XIndexReplace > SvxXMLListStyleContext::CreateNumRule(
return xNumRule;
xNumRule.set( xIfc, UNO_QUERY );
- DBG_ASSERT( xNumRule.is(), "go no numbering rule" );
+ SAL_WARN_IF( !xNumRule.is(), "xmloff", "go no numbering rule" );
return xNumRule;
}