[Libreoffice-commits] .: Branch 'feature/template-dialog' - 3 commits - sfx2/inc sfx2/source
Rafael Dominguez
rdominguez at kemper.freedesktop.org
Wed Jul 4 08:41:02 PDT 2012
sfx2/inc/sfx2/templateview.hxx | 2 --
sfx2/inc/templatedlg.hxx | 1 -
sfx2/source/control/templateview.cxx | 25 +++----------------------
sfx2/source/doc/templatedlg.cxx | 7 -------
4 files changed, 3 insertions(+), 32 deletions(-)
New commits:
commit 40ec7e20e369f241a748808ba85fd5fc34980eb5
Author: Rafael Dominguez <venccsralph at gmail.com>
Date: Wed Jul 4 11:11:40 2012 -0430
Remove unused method.
Change-Id: I5b084fa1aa88ef7d1e55700033b05c57a0979ea2
diff --git a/sfx2/inc/templatedlg.hxx b/sfx2/inc/templatedlg.hxx
index 3698381..2efa11d 100644
--- a/sfx2/inc/templatedlg.hxx
+++ b/sfx2/inc/templatedlg.hxx
@@ -70,7 +70,6 @@ private:
void OnTemplateSearch ();
void OnTemplateEdit ();
void OnTemplateProperties ();
- void OnTemplateMove ();
void OnTemplateDelete ();
private:
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index a7cf3c0..29d664a 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -323,9 +323,6 @@ IMPL_LINK_NOARG(SfxTemplateManagerDlg,TBXTemplateHdl)
case TBI_TEMPLATE_PROPERTIES:
OnTemplateProperties();
break;
- case TBI_TEMPLATE_MOVE:
- OnTemplateMove();
- break;
case TBI_TEMPLATE_DELETE:
OnTemplateDelete();
break;
@@ -723,10 +720,6 @@ void SfxTemplateManagerDlg::OnTemplateProperties ()
{
}
-void SfxTemplateManagerDlg::OnTemplateMove ()
-{
-}
-
void SfxTemplateManagerDlg::OnTemplateDelete ()
{
std::set<const ThumbnailViewItem*>::const_iterator pIter;
commit 41e17582a92acdbe533106ddfac44368543fe2e0
Author: Rafael Dominguez <venccsralph at gmail.com>
Date: Wed Jul 4 11:10:02 2012 -0430
Make title edit box 50% of the overlay width.
Change-Id: If8fb15738c0c87f67a39ae53f36e7f3839ca7dcc
diff --git a/sfx2/source/control/templateview.cxx b/sfx2/source/control/templateview.cxx
index 71f3b70..1ffd1c8 100644
--- a/sfx2/source/control/templateview.cxx
+++ b/sfx2/source/control/templateview.cxx
@@ -25,7 +25,6 @@
#include "templateview.hrc"
-#define EDIT_WIDTH 180
#define EDIT_HEIGHT 20
using namespace basegfx;
@@ -42,8 +41,6 @@ TemplateView::TemplateView (Window *pParent, SfxDocumentTemplates *pTemplates)
mpEditName(new Edit(this, WB_BORDER | WB_HIDE))
{
mnHeaderHeight = 30;
-
- mpEditName->SetSizePixel(Size(EDIT_WIDTH,EDIT_HEIGHT));
}
TemplateView::~TemplateView ()
@@ -134,14 +131,15 @@ void TemplateView::InsertItems (const std::vector<TemplateViewItem*> &rTemplates
void TemplateView::Resize()
{
// Set editbox size and position
- Size aEditSize = mpEditName->GetSizePixel();
Size aWinSize = GetOutputSize();
+ Size aEditSize(aWinSize.getWidth()/2,EDIT_HEIGHT);
+
Point aPos;
aPos.X() = (aWinSize.getWidth() - aEditSize.getWidth())/2;
aPos.Y() = (mnHeaderHeight - aEditSize.getHeight())/2;
- mpEditName->SetPosPixel(aPos);
+ mpEditName->SetPosSizePixel(aPos,aEditSize);
ThumbnailView::Resize();
}
commit d431029cfa3d84935c7d9fdcb5bdcc50943ff280
Author: Rafael Dominguez <venccsralph at gmail.com>
Date: Wed Jul 4 10:53:30 2012 -0430
Remove deprecated method.
Change-Id: I60bae94c3d86d48f570ae687f16400e034be872c
diff --git a/sfx2/inc/sfx2/templateview.hxx b/sfx2/inc/sfx2/templateview.hxx
index 8934b58..0ed278c 100644
--- a/sfx2/inc/sfx2/templateview.hxx
+++ b/sfx2/inc/sfx2/templateview.hxx
@@ -33,8 +33,6 @@ public:
virtual void Paint (const Rectangle &rRect);
- void InsertItem (const TemplateViewItem *pItem);
-
void InsertItems (const std::vector<TemplateViewItem*> &rTemplates);
void setDblClickHdl (const Link &rLink) { maDblClickHdl = rLink; }
diff --git a/sfx2/source/control/templateview.cxx b/sfx2/source/control/templateview.cxx
index d9748f5..71f3b70 100644
--- a/sfx2/source/control/templateview.cxx
+++ b/sfx2/source/control/templateview.cxx
@@ -109,23 +109,6 @@ void TemplateView::Paint (const Rectangle &rRect)
mpProcessor->process(aSeq);
}
-void TemplateView::InsertItem (const TemplateViewItem *pItem)
-{
- TemplateViewItem *pCloneItem = new TemplateViewItem(*this,this);
-
- pCloneItem->mnId = pItem->mnId;
- pCloneItem->maText = pItem->maText;
- pCloneItem->setPath(pItem->getPath());
- pCloneItem->setFileType(pItem->getFileType());
- pCloneItem->maPreview1 = pItem->maPreview1;
-
- mItemList.push_back(pCloneItem);
-
- CalculateItemPositions();
-
- Invalidate();
-}
-
void TemplateView::InsertItems (const std::vector<TemplateViewItem*> &rTemplates)
{
for (size_t i = 0, n = rTemplates.size(); i < n; ++i )
More information about the Libreoffice-commits
mailing list