summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-11-20 12:28:56 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-11-20 12:51:12 +0000
commit6116f37372630740b7a10339b4b43773d7f24bad (patch)
treecdf2ddfd2f832125355b32e93c4b754b4010115d /sd
parent5a3143c1a44d4c9d922aa33812d7c428664a8cf9 (diff)
convert slide design to .ui
Change-Id: I0ecda6e3a29e51dfd1cd36fa8b0a02c8327d4c2c
Diffstat (limited to 'sd')
-rw-r--r--sd/AllLangResTarget_sd.mk1
-rw-r--r--sd/UIConfig_simpress.mk1
-rw-r--r--sd/source/ui/dlg/sdpreslt.cxx70
-rw-r--r--sd/source/ui/dlg/sdpreslt.src91
-rw-r--r--sd/source/ui/inc/sdpreslt.hrc29
-rw-r--r--sd/source/ui/inc/sdpreslt.hxx12
-rw-r--r--sd/uiconfig/simpress/ui/slidedesigndialog.ui184
7 files changed, 222 insertions, 166 deletions
diff --git a/sd/AllLangResTarget_sd.mk b/sd/AllLangResTarget_sd.mk
index 8385a4913428..642d460eca93 100644
--- a/sd/AllLangResTarget_sd.mk
+++ b/sd/AllLangResTarget_sd.mk
@@ -47,7 +47,6 @@ $(eval $(call gb_SrsTarget_add_files,sd/res,\
sd/source/ui/dlg/LayerDialog.src \
sd/source/ui/dlg/navigatr.src \
sd/source/ui/dlg/PaneDockingWindow.src \
- sd/source/ui/dlg/sdpreslt.src \
sd/source/ui/dlg/tpaction.src \
sd/source/ui/slideshow/slideshow.src \
sd/source/ui/view/DocumentRenderer.src \
diff --git a/sd/UIConfig_simpress.mk b/sd/UIConfig_simpress.mk
index 040db6b43ac0..30b8aa33c39d 100644
--- a/sd/UIConfig_simpress.mk
+++ b/sd/UIConfig_simpress.mk
@@ -91,6 +91,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/simpress,\
sd/uiconfig/simpress/ui/prntopts \
sd/uiconfig/simpress/ui/remotedialog \
sd/uiconfig/simpress/ui/sdviewpage \
+ sd/uiconfig/simpress/ui/slidedesigndialog \
sd/uiconfig/simpress/ui/slidetransitionspanel \
sd/uiconfig/simpress/ui/tabledesignpanel \
sd/uiconfig/simpress/ui/templatedialog \
diff --git a/sd/source/ui/dlg/sdpreslt.cxx b/sd/source/ui/dlg/sdpreslt.cxx
index 8597412e1b82..eaad80a53dab 100644
--- a/sd/source/ui/dlg/sdpreslt.cxx
+++ b/sd/source/ui/dlg/sdpreslt.cxx
@@ -24,7 +24,6 @@
#include "strings.hrc"
#include "res_bmp.hrc"
#include "sdpreslt.hxx"
-#include "sdpreslt.hrc"
#include "sdattr.hxx"
#include "sdresid.hxx"
#include "drawdoc.hxx"
@@ -32,27 +31,24 @@
#include "DrawDocShell.hxx"
-SdPresLayoutDlg::SdPresLayoutDlg(
- ::sd::DrawDocShell* pDocShell,
- ::Window* pWindow,
- const SfxItemSet& rInAttrs ):
- ModalDialog (pWindow, SdResId(DLG_PRESLT)),
- mpDocSh ( pDocShell ),
- maFtLayout (this, SdResId(FT_LAYOUT)),
- maVS (this, SdResId(VS_LAYOUT)),
- maBtnOK (this, SdResId(BTN_OK)),
- maBtnCancel (this, SdResId(BTN_CANCEL)),
- maBtnHelp (this, SdResId(BTN_HELP)),
- maCbxMasterPage (this, SdResId(CBX_MASTER_PAGE)),
- maCbxCheckMasters (this, SdResId(CBX_CHECK_MASTERS)),
- maBtnLoad (this, SdResId(BTN_LOAD)),
- mrOutAttrs (rInAttrs),
- maStrNone (SD_RESSTR(STR_NULL))
+SdPresLayoutDlg::SdPresLayoutDlg(::sd::DrawDocShell* pDocShell,
+ ::Window* pWindow, const SfxItemSet& rInAttrs)
+ : ModalDialog(pWindow, "SlideDesignDialog",
+ "modules/simpress/ui/slidedesigndialog.ui")
+ , mpDocSh(pDocShell)
+ , mrOutAttrs(rInAttrs)
+ , maStrNone(SD_RESSTR(STR_NULL))
{
- FreeResource();
+ get(m_pVS, "select");
+ Size aPref(LogicToPixel(Size(144 , 141), MAP_APPFONT));
+ m_pVS->set_width_request(aPref.Width());
+ m_pVS->set_height_request(aPref.Height());
+ get(m_pCbxMasterPage, "masterpage");
+ get(m_pCbxCheckMasters, "checkmasters");
+ get(m_pBtnLoad, "load");
- maVS.SetDoubleClickHdl(LINK(this, SdPresLayoutDlg, ClickLayoutHdl));
- maBtnLoad.SetClickHdl(LINK(this, SdPresLayoutDlg, ClickLoadHdl));
+ m_pVS->SetDoubleClickHdl(LINK(this, SdPresLayoutDlg, ClickLayoutHdl));
+ m_pBtnLoad->SetClickHdl(LINK(this, SdPresLayoutDlg, ClickLoadHdl));
Reset();
}
@@ -73,12 +69,12 @@ void SdPresLayoutDlg::Reset()
if( mrOutAttrs.GetItemState( ATTR_PRESLAYOUT_MASTER_PAGE, sal_False, &pPoolItem ) == SFX_ITEM_SET )
{
sal_Bool bMasterPage = ( (const SfxBoolItem*) pPoolItem)->GetValue();
- maCbxMasterPage.Enable( !bMasterPage );
- maCbxMasterPage.Check( bMasterPage );
+ m_pCbxMasterPage->Enable( !bMasterPage );
+ m_pCbxMasterPage->Check( bMasterPage );
}
// remove not used master pages
- maCbxCheckMasters.Check(sal_False);
+ m_pCbxCheckMasters->Check(sal_False);
if(mrOutAttrs.GetItemState(ATTR_PRESLAYOUT_NAME, sal_True, &pPoolItem) == SFX_ITEM_SET)
maName = ((const SfxStringItem*)pPoolItem)->GetValue();
@@ -95,7 +91,7 @@ void SdPresLayoutDlg::Reset()
}
DBG_ASSERT(nName < mnLayoutCount, "Layout not found");
- maVS.SelectItem((sal_uInt16)nName + 1); // Indices of the ValueSets start at 1
+ m_pVS->SelectItem((sal_uInt16)nName + 1); // Indices of the ValueSets start at 1
}
@@ -104,7 +100,7 @@ void SdPresLayoutDlg::Reset()
*/
void SdPresLayoutDlg::GetAttr(SfxItemSet& rOutAttrs)
{
- short nId = maVS.GetSelectItemId();
+ short nId = m_pVS->GetSelectItemId();
sal_Bool bLoad = nId > mnLayoutCount;
rOutAttrs.Put( SfxBoolItem( ATTR_PRESLAYOUT_LOAD, bLoad ) );
@@ -122,8 +118,8 @@ void SdPresLayoutDlg::GetAttr(SfxItemSet& rOutAttrs)
}
rOutAttrs.Put( SfxStringItem( ATTR_PRESLAYOUT_NAME, aLayoutName ) );
- rOutAttrs.Put( SfxBoolItem( ATTR_PRESLAYOUT_MASTER_PAGE, maCbxMasterPage.IsChecked() ) );
- rOutAttrs.Put( SfxBoolItem( ATTR_PRESLAYOUT_CHECK_MASTERS, maCbxCheckMasters.IsChecked() ) );
+ rOutAttrs.Put( SfxBoolItem( ATTR_PRESLAYOUT_MASTER_PAGE, m_pCbxMasterPage->IsChecked() ) );
+ rOutAttrs.Put( SfxBoolItem( ATTR_PRESLAYOUT_CHECK_MASTERS, m_pCbxCheckMasters->IsChecked() ) );
}
@@ -132,12 +128,12 @@ void SdPresLayoutDlg::GetAttr(SfxItemSet& rOutAttrs)
*/
void SdPresLayoutDlg::FillValueSet()
{
- maVS.SetStyle(maVS.GetStyle() | WB_ITEMBORDER | WB_DOUBLEBORDER
+ m_pVS->SetStyle(m_pVS->GetStyle() | WB_ITEMBORDER | WB_DOUBLEBORDER
| WB_VSCROLL | WB_NAMEFIELD);
- maVS.SetColCount(2);
- maVS.SetLineCount(2);
- maVS.SetExtraSpacing(2);
+ m_pVS->SetColCount(2);
+ m_pVS->SetLineCount(2);
+ m_pVS->SetExtraSpacing(2);
SdDrawDocument* pDoc = mpDocSh->GetDoc();
@@ -153,11 +149,11 @@ void SdPresLayoutDlg::FillValueSet()
maLayoutNames.push_back(aLayoutName);
Image aBitmap(Bitmap(mpDocSh->GetPagePreviewBitmap(pMaster, 90)));
- maVS.InsertItem((sal_uInt16)maLayoutNames.size(), aBitmap, aLayoutName);
+ m_pVS->InsertItem((sal_uInt16)maLayoutNames.size(), aBitmap, aLayoutName);
}
}
- maVS.Show();
+ m_pVS->Show();
}
@@ -227,7 +223,7 @@ IMPL_LINK_NOARG(SdPresLayoutDlg, ClickLoadHdl)
{
bExists = sal_True;
// select template
- maVS.SelectItem( aPos + 1 );
+ m_pVS->SelectItem( aPos + 1 );
}
}
@@ -256,7 +252,7 @@ IMPL_LINK_NOARG(SdPresLayoutDlg, ClickLoadHdl)
maLayoutNames.push_back(aLayoutName);
Image aBitmap(Bitmap(pTemplDocSh->GetPagePreviewBitmap(pMaster, 90)));
- maVS.InsertItem((sal_uInt16)maLayoutNames.size(), aBitmap, aLayoutName);
+ m_pVS->InsertItem((sal_uInt16)maLayoutNames.size(), aBitmap, aLayoutName);
}
}
}
@@ -271,14 +267,14 @@ IMPL_LINK_NOARG(SdPresLayoutDlg, ClickLoadHdl)
{
// empty layout
maLayoutNames.push_back(maStrNone);
- maVS.InsertItem( (sal_uInt16) maLayoutNames.size(),
+ m_pVS->InsertItem( (sal_uInt16) maLayoutNames.size(),
Image(Bitmap(SdResId(BMP_FOIL_NONE))), maStrNone );
}
if (!bCancel)
{
// select template
- maVS.SelectItem( (sal_uInt16) maLayoutNames.size() );
+ m_pVS->SelectItem( (sal_uInt16) maLayoutNames.size() );
}
}
}
diff --git a/sd/source/ui/dlg/sdpreslt.src b/sd/source/ui/dlg/sdpreslt.src
deleted file mode 100644
index 98918ee8cc0b..000000000000
--- a/sd/source/ui/dlg/sdpreslt.src
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "app.hrc"
-#include "sdpreslt.hrc"
-#include "sdcommands.h"
-
-ModalDialog DLG_PRESLT
-{
- HelpID = CMD_SID_PRESENTATION_LAYOUT ;
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 212 , 185 ) ;
- Moveable = TRUE ;
- FixedText FT_LAYOUT
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 110 , 10 ) ;
- Text [ en-US ] = "~Select a slide design" ;
- };
- Control VS_LAYOUT
- {
- Border = TRUE ;
- Hide = TRUE ;
- Pos = MAP_APPFONT ( 6 , 14 ) ;
- Size = MAP_APPFONT ( 144 , 141 ) ;
- TabStop = TRUE ;
- };
- OKButton BTN_OK
- {
- Pos = MAP_APPFONT ( 156 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton BTN_CANCEL
- {
- Pos = MAP_APPFONT ( 156 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- CheckBox CBX_MASTER_PAGE
- {
- HelpID = "sd:CheckBox:DLG_PRESLT:CBX_MASTER_PAGE";
- Pos = MAP_APPFONT ( 6 , 158 ) ;
- Size = MAP_APPFONT ( 120 , 12 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Exchange background page" ;
- };
- CheckBox CBX_CHECK_MASTERS
- {
- HelpID = "sd:CheckBox:DLG_PRESLT:CBX_CHECK_MASTERS";
- Pos = MAP_APPFONT ( 6 , 170 ) ;
- Size = MAP_APPFONT ( 140 , 12 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Delete unused backgrounds";
- };
- PushButton BTN_LOAD
- {
- HelpID = "sd:PushButton:DLG_PRESLT:BTN_LOAD";
- Pos = MAP_APPFONT ( 156 , 155 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Load..." ;
- };
- HelpButton BTN_HELP
- {
- Pos = MAP_APPFONT ( 156 , 53 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- Text [ en-US ] = "Slide Design" ;
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/sdpreslt.hrc b/sd/source/ui/inc/sdpreslt.hrc
deleted file mode 100644
index cf7adf0d44ff..000000000000
--- a/sd/source/ui/inc/sdpreslt.hrc
+++ /dev/null
@@ -1,29 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#define DLG_PRESLT 868
-#define BTN_OK 1
-#define BTN_CANCEL 1
-#define BTN_LOAD 2
-#define BTN_HELP 1
-#define VS_LAYOUT 1
-#define FT_LAYOUT 1
-#define CBX_MASTER_PAGE 1
-#define CBX_CHECK_MASTERS 2
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/sdpreslt.hxx b/sd/source/ui/inc/sdpreslt.hxx
index a952651fa2ca..d86545feea92 100644
--- a/sd/source/ui/inc/sdpreslt.hxx
+++ b/sd/source/ui/inc/sdpreslt.hxx
@@ -53,14 +53,10 @@ public:
private:
::sd::DrawDocShell* mpDocSh;
- FixedText maFtLayout;
- ValueSet maVS;
- OKButton maBtnOK;
- CancelButton maBtnCancel;
- HelpButton maBtnHelp;
- CheckBox maCbxMasterPage;
- CheckBox maCbxCheckMasters;
- PushButton maBtnLoad;
+ ValueSet* m_pVS;
+ CheckBox* m_pCbxMasterPage;
+ CheckBox* m_pCbxCheckMasters;
+ PushButton* m_pBtnLoad;
const SfxItemSet& mrOutAttrs;
diff --git a/sd/uiconfig/simpress/ui/slidedesigndialog.ui b/sd/uiconfig/simpress/ui/slidedesigndialog.ui
new file mode 100644
index 000000000000..901bfc950ac7
--- /dev/null
+++ b/sd/uiconfig/simpress/ui/slidedesigndialog.ui
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <!-- interface-requires LibreOffice 1.0 -->
+ <object class="GtkDialog" id="SlideDesignDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Slide Design</property>
+ <property name="type_hint">dialog</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkGrid" id="grid5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkCheckButton" id="masterpage">
+ <property name="label" translatable="yes">_Exchange background page</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkmasters">
+ <property name="label" translatable="yes">_Delete unused backgrounds</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="svtlo-ValueSet" id="select:border">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Select a slide design</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="ok">
+ <property name="label">gtk-ok</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="cancel">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="help">
+ <property name="label">gtk-help</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="load">
+ <property name="label">_Load...</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">ok</action-widget>
+ <action-widget response="0">cancel</action-widget>
+ <action-widget response="0">help</action-widget>
+ <action-widget response="0">load</action-widget>
+ </action-widgets>
+ </object>
+</interface>