summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/control/templateview.cxx23
1 files changed, 23 insertions, 0 deletions
diff --git a/sfx2/source/control/templateview.cxx b/sfx2/source/control/templateview.cxx
index 63fec5d16659..8ef3be40c420 100644
--- a/sfx2/source/control/templateview.cxx
+++ b/sfx2/source/control/templateview.cxx
@@ -90,6 +90,29 @@ void TemplateView::Paint (const Rectangle &rRect)
mpProcessor->process(aSeq);
}
+void TemplateView::MouseButtonDown (const MouseEvent &rMEvt)
+{
+ if (rMEvt.IsLeft())
+ {
+ Size aWinSize = GetOutputSizePixel();
+ Size aImageSize = maCloseImg.GetSizePixel();
+
+ Point aPos;
+ aPos.Y() = (mnHeaderHeight - aImageSize.Height())/2;
+ aPos.X() = aWinSize.Width() - aImageSize.Width() - aPos.Y();
+
+ Rectangle aImgRect(aPos,aImageSize);
+
+ if (aImgRect.IsInside(rMEvt.GetPosPixel()))
+ {
+ Show(false);
+ Clear();
+ }
+ }
+
+ ThumbnailView::MouseButtonDown(rMEvt);
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */