diff options
author | David Tardon <dtardon@redhat.com> | 2016-11-13 15:03:03 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2016-11-13 16:29:31 +0100 |
commit | 33ae095d92246cd2c74c30c9e070a8e0241926db (patch) | |
tree | 432a43e56a3dc2fb8b0f5a0c38ea52efb731738e /svl/source | |
parent | a64958ab631a81feda8a42807b17fda6cb29147e (diff) |
add missing dependency
Change-Id: I72696c82d9a96709746060ae18bd497da8715d35
Diffstat (limited to 'svl/source')
-rw-r--r-- | svl/source/items/IndexedStyleSheets.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/svl/source/items/IndexedStyleSheets.cxx b/svl/source/items/IndexedStyleSheets.cxx index 260ae109f791..fa68f494e916 100644 --- a/svl/source/items/IndexedStyleSheets.cxx +++ b/svl/source/items/IndexedStyleSheets.cxx @@ -53,7 +53,6 @@ IndexedStyleSheets::IndexedStyleSheets() } ;} - void IndexedStyleSheets::Register(const SfxStyleSheetBase& style, unsigned pos) { @@ -91,6 +90,7 @@ IndexedStyleSheets::GetNumberOfStyleSheets() const void IndexedStyleSheets::AddStyleSheet(const rtl::Reference< SfxStyleSheetBase >& style) { + assert(!style->GetName().isEmpty()); if (!HasStyleSheet(style)) { mStyleSheets.push_back(style); // since we just added an element to the vector, we can safely do -1 as it will always be >= 1 @@ -101,6 +101,7 @@ IndexedStyleSheets::AddStyleSheet(const rtl::Reference< SfxStyleSheetBase >& sty bool IndexedStyleSheets::RemoveStyleSheet(const rtl::Reference< SfxStyleSheetBase >& style) { + assert(!style->GetName().isEmpty()); rtl::OUString styleName = style->GetName(); std::vector<unsigned> positions = FindPositionsByName(styleName); bool found = false; @@ -200,6 +201,7 @@ void IndexedStyleSheets::Clear(StyleSheetDisposer& disposer) { for (VectorType::iterator it = mStyleSheets.begin(); it != mStyleSheets.end(); ++it) { + assert(!(*it)->GetName().isEmpty()); disposer.Dispose(*it); } mStyleSheets.clear(); @@ -207,7 +209,10 @@ IndexedStyleSheets::Clear(StyleSheetDisposer& disposer) } IndexedStyleSheets::~IndexedStyleSheets() -{;} +{ + for (const auto& rStyleSheet : mStyleSheets) + assert(!rStyleSheet->GetName().isEmpty()); +} bool IndexedStyleSheets::HasStyleSheet(const rtl::Reference< SfxStyleSheetBase >& style) const |