diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-02-19 13:14:09 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-02-19 14:55:49 +0100 |
commit | 9db28f9ac11eba143169773012e87216a419fe84 (patch) | |
tree | f4448192eacbc838eb248d87dfbf6227a6cb83c9 /svx | |
parent | ad627912b5390ca46dde34815add876b0ae24bab (diff) |
svx: these look like they should be assert()
Change-Id: Icb70e87edd1a864da4ecb3931de9c402a115aaa5
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/sdr/properties/emptyproperties.cxx | 28 | ||||
-rw-r--r-- | svx/source/sdr/properties/groupproperties.cxx | 20 |
2 files changed, 24 insertions, 24 deletions
diff --git a/svx/source/sdr/properties/emptyproperties.cxx b/svx/source/sdr/properties/emptyproperties.cxx index e97d3e49334d..d44826f30d07 100644 --- a/svx/source/sdr/properties/emptyproperties.cxx +++ b/svx/source/sdr/properties/emptyproperties.cxx @@ -34,7 +34,7 @@ namespace sdr SfxItemSet* EmptyProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool) { // Basic implementation; Basic object has NO attributes - SAL_WARN("svx.sdr", "EmptyProperties::CreateObjectSpecificItemSet() should never be called"); + assert(!"EmptyProperties::CreateObjectSpecificItemSet() should never be called"); return new SfxItemSet(rPool); } @@ -73,66 +73,66 @@ namespace sdr const_cast<EmptyProperties*>(this)->mpEmptyItemSet = const_cast<EmptyProperties*>(this)->CreateObjectSpecificItemSet(GetSdrObject().GetObjectItemPool()); } - SAL_WARN_IF(!mpEmptyItemSet, "svx.sdr", "Could not create an SfxItemSet(!)"); - SAL_WARN("svx.sdr", "EmptyProperties::GetObjectItemSet() should never be called (!)"); + assert(mpEmptyItemSet); + assert(!"EmptyProperties::GetObjectItemSet() should never be called"); return *mpEmptyItemSet; } void EmptyProperties::SetObjectItem(const SfxPoolItem& /*rItem*/) { - SAL_WARN("svx.sdr", "EmptyProperties::SetObjectItem() should never be called (!)"); + assert(!"EmptyProperties::SetObjectItem() should never be called"); } void EmptyProperties::SetObjectItemDirect(const SfxPoolItem& /*rItem*/) { - SAL_WARN("svx.sdr", "EmptyProperties::SetObjectItemDirect() should never be called (!)"); + assert(!"EmptyProperties::SetObjectItemDirect() should never be called"); } void EmptyProperties::ClearObjectItem(const sal_uInt16 /*nWhich*/) { - SAL_WARN("svx.sdr", "EmptyProperties::ClearObjectItem() should never be called (!)"); + assert(!"EmptyProperties::ClearObjectItem() should never be called"); } void EmptyProperties::ClearObjectItemDirect(const sal_uInt16 /*nWhich*/) { - SAL_WARN("svx.sdr", "EmptyProperties::ClearObjectItemDirect() should never be called (!)"); + assert(!"EmptyProperties::ClearObjectItemDirect() should never be called"); } void EmptyProperties::SetObjectItemSet(const SfxItemSet& /*rSet*/) { - SAL_WARN("svx.sdr", "EmptyProperties::SetObjectItemSet() should never be called (!)"); + assert(!"EmptyProperties::SetObjectItemSet() should never be called"); } void EmptyProperties::ItemSetChanged(const SfxItemSet& /*rSet*/) { - SAL_WARN("svx.sdr", "EmptyProperties::ItemSetChanged() should never be called (!)"); + assert(!"EmptyProperties::ItemSetChanged() should never be called"); } bool EmptyProperties::AllowItemChange(const sal_uInt16 /*nWhich*/, const SfxPoolItem* /*pNewItem*/) const { - SAL_WARN("svx.sdr", "EmptyProperties::AllowItemChange() should never be called (!)"); + assert(!"EmptyProperties::AllowItemChange() should never be called"); return true; } void EmptyProperties::ItemChange(const sal_uInt16 /*nWhich*/, const SfxPoolItem* /*pNewItem*/) { - SAL_WARN("svx.sdr", "EmptyProperties::ItemChange() should never be called (!)"); + assert(!"EmptyProperties::ItemChange() should never be called"); } void EmptyProperties::PostItemChange(const sal_uInt16 /*nWhich*/) { - SAL_WARN("svx.sdr", "EmptyProperties::PostItemChange() should never be called (!)"); + assert(!"EmptyProperties::PostItemChange() should never be called"); } void EmptyProperties::SetStyleSheet(SfxStyleSheet* /*pNewStyleSheet*/, bool /*bDontRemoveHardAttr*/) { - SAL_WARN("svx.sdr", "EmptyProperties::SetStyleSheet() should never be called (!)"); + assert(!"EmptyProperties::SetStyleSheet() should never be called"); } SfxStyleSheet* EmptyProperties::GetStyleSheet() const { - SAL_WARN("svx.sdr", "EmptyProperties::GetStyleSheet() should never be called (!)"); + assert(!"EmptyProperties::GetStyleSheet() should never be called"); return nullptr; } } // end of namespace properties diff --git a/svx/source/sdr/properties/groupproperties.cxx b/svx/source/sdr/properties/groupproperties.cxx index 0227321b2589..00932e8eca82 100644 --- a/svx/source/sdr/properties/groupproperties.cxx +++ b/svx/source/sdr/properties/groupproperties.cxx @@ -61,7 +61,7 @@ namespace sdr const SfxItemSet& GroupProperties::GetObjectItemSet() const { - SAL_WARN("svx.sdr", "GroupProperties::GetObjectItemSet() should never be called (!)"); + assert(!"GroupProperties::GetObjectItemSet() should never be called"); return DefaultProperties::GetObjectItemSet(); } @@ -133,22 +133,22 @@ namespace sdr void GroupProperties::SetObjectItem(const SfxPoolItem& /*rItem*/) { - SAL_WARN("svx.sdr", "GroupProperties::SetObjectItem() should never be called (!)"); + assert(!"GroupProperties::SetObjectItem() should never be called"); } void GroupProperties::SetObjectItemDirect(const SfxPoolItem& /*rItem*/) { - SAL_WARN("svx.sdr", "GroupProperties::SetObjectItemDirect() should never be called (!)"); + assert(!"GroupProperties::SetObjectItemDirect() should never be called"); } void GroupProperties::ClearObjectItem(const sal_uInt16 /*nWhich*/) { - SAL_WARN("svx.sdr", "GroupProperties::ClearObjectItem() should never be called (!)"); + assert(!"GroupProperties::ClearObjectItem() should never be called"); } void GroupProperties::ClearObjectItemDirect(const sal_uInt16 /*nWhich*/) { - SAL_WARN("svx.sdr", "GroupProperties::ClearObjectItemDirect() should never be called (!)"); + assert(!"GroupProperties::ClearObjectItemDirect() should never be called"); } void GroupProperties::SetMergedItem(const SfxPoolItem& rItem) @@ -175,28 +175,28 @@ namespace sdr void GroupProperties::SetObjectItemSet(const SfxItemSet& /*rSet*/) { - SAL_WARN("svx.sdr", "GroupProperties::SetObjectItemSet() should never be called (!)"); + assert(!"GroupProperties::SetObjectItemSet() should never be called"); } void GroupProperties::ItemSetChanged(const SfxItemSet& /*rSet*/) { - SAL_WARN("svx.sdr", "GroupProperties::ItemSetChanged() should never be called (!)"); + assert(!"GroupProperties::ItemSetChanged() should never be called"); } bool GroupProperties::AllowItemChange(const sal_uInt16 /*nWhich*/, const SfxPoolItem* /*pNewItem*/) const { - SAL_WARN("svx.sdr", "GroupProperties::AllowItemChange() should never be called (!)"); + assert(!"GroupProperties::AllowItemChange() should never be called"); return false; } void GroupProperties::ItemChange(const sal_uInt16 /*nWhich*/, const SfxPoolItem* /*pNewItem*/) { - SAL_WARN("svx.sdr", "GroupProperties::ItemChange() should never be called (!)"); + assert(!"GroupProperties::ItemChange() should never be called"); } void GroupProperties::PostItemChange(const sal_uInt16 /*nWhich*/) { - SAL_WARN("svx.sdr", "GroupProperties::PostItemChange() should never be called (!)"); + assert(!"GroupProperties::PostItemChange() should never be called"); } SfxStyleSheet* GroupProperties::GetStyleSheet() const |