summaryrefslogtreecommitdiff
path: root/vcl/source/app/salvtables.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/app/salvtables.cxx')
-rw-r--r--vcl/source/app/salvtables.cxx19
1 files changed, 12 insertions, 7 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 4f5c0850418c..9556fcd8c659 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -1313,14 +1313,19 @@ public:
nInsertedAt = m_xTreeView->InsertEntry(rStr, pos == -1 ? COMBOBOX_APPEND : pos);
else
{
- assert((rImage == "dialog-warning" || rImage == "dialog-error" || rImage == "dialog-information") && "unknown stock image");
Image aImage;
- if (rImage == "dialog-warning")
- aImage = Image(BitmapEx(IMG_WARN));
- else if (rImage == "dialog-error")
- aImage = Image(BitmapEx(IMG_ERROR));
- else if (rImage == "dialog-information")
- aImage = Image(BitmapEx(IMG_INFO));
+ if (rImage.lastIndexOf('.') != rImage.getLength() - 4)
+ {
+ assert((rImage == "dialog-warning" || rImage == "dialog-error" || rImage == "dialog-information") && "unknown stock image");
+ if (rImage == "dialog-warning")
+ aImage = Image(BitmapEx(IMG_WARN));
+ else if (rImage == "dialog-error")
+ aImage = Image(BitmapEx(IMG_ERROR));
+ else if (rImage == "dialog-information")
+ aImage = Image(BitmapEx(IMG_INFO));
+ }
+ else
+ aImage = Image(BitmapEx(rImage));
nInsertedAt = m_xTreeView->InsertEntry(rStr, aImage, pos == -1 ? COMBOBOX_APPEND : pos);
}
m_xTreeView->SetEntryData(nInsertedAt, new OUString(rId));