[Libreoffice-commits] .: 2 commits - sfx2/inc sfx2/source
Rafael Dominguez
rdominguez at kemper.freedesktop.org
Sun Jul 8 09:33:47 PDT 2012
sfx2/inc/templatedlg.hxx | 2 ++
sfx2/source/doc/templatedlg.cxx | 34 +++++++++++++++++++++++++++++++++-
sfx2/source/doc/templatedlg.src | 4 ++--
3 files changed, 37 insertions(+), 3 deletions(-)
New commits:
commit 7f1674d214c1567638412dba89633b5d5f8d4924
Author: Rafael Dominguez <venccsralph at gmail.com>
Date: Sun Jul 8 11:40:04 2012 -0430
Fix not displaying thumbnail text after opening a template.
Change-Id: I57ccefd5ce115d095e30afe0673aa61cb3b6d39b
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 6143cd7..2b08cf2 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -549,7 +549,7 @@ IMPL_LINK(SfxTemplateManagerDlg, OpenTemplateHdl, ThumbnailViewItem*, pItem)
try
{
- mxDesktop->loadComponentFromURL(pTemplateItem->getPath(),rtl::OUString("_blank"), 0, aArgs );
+ mxDesktop->loadComponentFromURL(pTemplateItem->getPath(),rtl::OUString("_default"), 0, aArgs );
}
catch( const uno::Exception& )
{
commit 27da19cdd62d14d56beaec6c6fce1f68e05c8d86
Author: Rafael Dominguez <venccsralph at gmail.com>
Date: Sun Jul 8 10:58:31 2012 -0430
Center template dialog top buttons.
Change-Id: I18c324a815df279280f3d5efc7b0d9651275bfaa
diff --git a/sfx2/inc/templatedlg.hxx b/sfx2/inc/templatedlg.hxx
index 5fa51ae..7b528ae 100644
--- a/sfx2/inc/templatedlg.hxx
+++ b/sfx2/inc/templatedlg.hxx
@@ -72,6 +72,8 @@ private:
void OnTemplateProperties ();
void OnTemplateDelete ();
+ void centerTopButtons ();
+
private:
PushButton aButtonAll;
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 9ac7512..6143cd7 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -215,6 +215,8 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg (Window *parent)
// Set dialog to correct dimensions
SetSizePixel(aWinSize);
+ centerTopButtons();
+
mpViewBar->Show();
mpActionBar->Show();
@@ -755,6 +757,36 @@ void SfxTemplateManagerDlg::OnTemplateDelete ()
}
}
+void SfxTemplateManagerDlg::centerTopButtons()
+{
+ Point aFirstBtnPos = aButtonAll.GetPosPixel();
+
+ Size aSelBtnSize = maButtonSelMode.GetOutputSize(); // Last button in the list
+ Size aBtnSize = aButtonAll.GetOutputSize();
+ Size aWinSize = GetOutputSize();
+
+ long nTotalWidth = aSelBtnSize.getWidth() + aBtnSize.getWidth()*5;
+ long nSpace = (aWinSize.getWidth() - nTotalWidth)/2;
+
+ Point aBtnPos(nSpace,aFirstBtnPos.getY());
+ aButtonAll.SetPosPixel(aBtnPos);
+
+ aBtnPos.setX(aBtnPos.getX() + aBtnSize.getWidth());
+ aButtonDocs.SetPosPixel(aBtnPos);
+
+ aBtnPos.setX(aBtnPos.getX() + aBtnSize.getWidth());
+ aButtonPresents.SetPosPixel(aBtnPos);
+
+ aBtnPos.setX(aBtnPos.getX() + aBtnSize.getWidth());
+ aButtonSheets.SetPosPixel(aBtnPos);
+
+ aBtnPos.setX(aBtnPos.getX() + aBtnSize.getWidth());
+ aButtonDraws.SetPosPixel(aBtnPos);
+
+ aBtnPos.setX(aBtnPos.getX() + aBtnSize.getWidth());
+ maButtonSelMode.SetPosPixel(aBtnPos);
+}
+
void lcl_createTemplate(uno::Reference< com::sun::star::frame::XComponentLoader > xDesktop,
const FILTER_APPLICATION eApp)
{
diff --git a/sfx2/source/doc/templatedlg.src b/sfx2/source/doc/templatedlg.src
index 0a8f851..f9ce918 100644
--- a/sfx2/source/doc/templatedlg.src
+++ b/sfx2/source/doc/templatedlg.src
@@ -104,8 +104,8 @@ ModalDialog DLG_TEMPLATE_MANAGER
ImageButton BTN_SELECTION_MODE
{
- Pos = MAP_APPFONT(265,5);
- Size = MAP_APPFONT(14,14);
+ Pos = MAP_APPFONT(260,5);
+ Size = MAP_APPFONT(20,14);
TabStop = TRUE;
ButtonImage = Image
More information about the Libreoffice-commits
mailing list