Kaydet (Commit) 33ae095d authored tarafından David Tardon's avatar David Tardon

add missing dependency

Change-Id: I72696c82d9a96709746060ae18bd497da8715d35
üst a64958ab
......@@ -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
......
......@@ -42,4 +42,7 @@ $(eval $(call gb_CppunitTest_add_exception_objects,writerperfect_draw,\
writerperfect/qa/unit/WpftDrawFilterTest \
))
$(call gb_CppunitTest_get_target,writerperfect_draw): \
$(call gb_AllLangResTarget_get_target,sd)
# vim: set noet sw=4 ts=4:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment