summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-12-19 12:30:43 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-12-19 12:42:13 +0000
commitacee1b8b8c68c5c9d7492dbcc95635e68551713f (patch)
treed5cd76cfe28e2ec4c0ba5e858465d799ce27bd2c
parent71eb27376a92f61c91567f2bfc2a74dba7192aab (diff)
convert border background dialog to .ui
Change-Id: I661384b04fef7f59c2b4feffe093cf75103d55d1
-rw-r--r--cui/AllLangResTarget_cui.mk1
-rw-r--r--cui/UIConfig_cui.mk1
-rw-r--r--cui/source/inc/bbdlg.hxx11
-rw-r--r--cui/source/inc/cuires.hrc1
-rw-r--r--cui/source/tabpages/bbdlg.cxx34
-rw-r--r--cui/source/tabpages/bbdlg.src54
-rw-r--r--cui/uiconfig/ui/borderbackgrounddialog.ui133
7 files changed, 147 insertions, 88 deletions
diff --git a/cui/AllLangResTarget_cui.mk b/cui/AllLangResTarget_cui.mk
index 3265c7e2fb8e..9bf5505cd229 100644
--- a/cui/AllLangResTarget_cui.mk
+++ b/cui/AllLangResTarget_cui.mk
@@ -59,7 +59,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\
cui/source/options/treeopt.src \
cui/source/tabpages/align.src \
cui/source/tabpages/autocdlg.src \
- cui/source/tabpages/bbdlg.src \
cui/source/tabpages/border.src \
cui/source/tabpages/dstribut.src \
cui/source/tabpages/frmdirlbox.src \
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 1ae0d8377d5e..174b243c7359 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -24,6 +24,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/autocorrectdialog \
cui/uiconfig/ui/backgroundpage \
cui/uiconfig/ui/bitmaptabpage \
+ cui/uiconfig/ui/borderbackgrounddialog \
cui/uiconfig/ui/borderpage \
cui/uiconfig/ui/breaknumberoption \
cui/uiconfig/ui/cellalignment \
diff --git a/cui/source/inc/bbdlg.hxx b/cui/source/inc/bbdlg.hxx
index a1bddb35c5b4..0b3139a6da73 100644
--- a/cui/source/inc/bbdlg.hxx
+++ b/cui/source/inc/bbdlg.hxx
@@ -28,17 +28,14 @@
class SvxBorderBackgroundDlg: public SfxTabDialog
{
public:
- SvxBorderBackgroundDlg( Window *pParent,
- const SfxItemSet& rCoreSet,
- sal_Bool bEnableSelector = sal_False );
-
- ~SvxBorderBackgroundDlg();
-
+ SvxBorderBackgroundDlg(Window *pParent, const SfxItemSet& rCoreSet,
+ bool bEnableSelector = false);
protected:
virtual void PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage );
private:
- sal_Bool bEnableBackgroundSelector; ///< for Border/Background
+ bool m_bEnableBackgroundSelector; ///< for Border/Background
+ sal_uInt16 m_nBackgroundPageId;
};
diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc
index fc70da2587b5..da21280a0c94 100644
--- a/cui/source/inc/cuires.hrc
+++ b/cui/source/inc/cuires.hrc
@@ -41,7 +41,6 @@
// used in "tabpages"
#define RID_SVXDLG_LINE (RID_SVX_START + 50)
-#define RID_SVXDLG_BBDLG (RID_SVX_START + 40)
#define RID_SVXDLG_CAPTION (RID_SVX_START + 151)
#define RID_SVXSTRARY_PAPERSIZE_STD (RID_SVX_START + 142)
#define RID_SVXSTRARY_PAPERSIZE_DRAW (RID_SVX_START + 143)
diff --git a/cui/source/tabpages/bbdlg.cxx b/cui/source/tabpages/bbdlg.cxx
index dc99b22a932e..30a487c7f12f 100644
--- a/cui/source/tabpages/bbdlg.cxx
+++ b/cui/source/tabpages/bbdlg.cxx
@@ -17,43 +17,27 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <tools/shl.hxx>
-#include <svx/dialogs.hrc>
-#include <cuires.hrc>
-
#include "bbdlg.hxx"
#include "border.hxx"
#include "backgrnd.hxx"
-#include <dialmgr.hxx>
-
-// class SvxBorderBackgroundDlg ------------------------------------------
-
-SvxBorderBackgroundDlg::SvxBorderBackgroundDlg( Window *pParent,
- const SfxItemSet& rCoreSet,
- sal_Bool bEnableSelector ) :
-
- SfxTabDialog( pParent, CUI_RES( RID_SVXDLG_BBDLG ), &rCoreSet ),
- bEnableBackgroundSelector( bEnableSelector )
-{
- FreeResource();
- AddTabPage( RID_SVXPAGE_BORDER, SvxBorderTabPage::Create, 0 );
- AddTabPage( RID_SVXPAGE_BACKGROUND, SvxBackgroundTabPage::Create, 0 );
-}
-// -----------------------------------------------------------------------
+SvxBorderBackgroundDlg::SvxBorderBackgroundDlg(Window *pParent,
+ const SfxItemSet& rCoreSet, bool bEnableSelector)
-SvxBorderBackgroundDlg::~SvxBorderBackgroundDlg()
+ : SfxTabDialog(pParent, "BorderBackgroundDialog",
+ "cui/ui/borderbackgrounddialog.ui", &rCoreSet)
+ , m_bEnableBackgroundSelector(bEnableSelector)
+ , m_nBackgroundPageId(0)
{
+ AddTabPage("borders", SvxBorderTabPage::Create, 0 );
+ m_nBackgroundPageId = AddTabPage("background", SvxBackgroundTabPage::Create, 0 );
}
-// -----------------------------------------------------------------------
-
void SvxBorderBackgroundDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage )
{
// Make it possible to switch between color/graphic:
- if ( bEnableBackgroundSelector && (RID_SVXPAGE_BACKGROUND == nPageId) )
+ if ( m_bEnableBackgroundSelector && (nPageId == m_nBackgroundPageId) )
((SvxBackgroundTabPage&)rTabPage).ShowSelector( );
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/tabpages/bbdlg.src b/cui/source/tabpages/bbdlg.src
deleted file mode 100644
index da680a9f4e3a..000000000000
--- a/cui/source/tabpages/bbdlg.src
+++ /dev/null
@@ -1,54 +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 <cuires.hrc>
-#include <svx/dialogs.hrc>
-
- // RID_SVXDLG_BBDLG ------------------------------------------------------
-TabDialog RID_SVXDLG_BBDLG
-{
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 328 , 155 ) ;
- Text [ en-US ] = "Border / Background" ;
- Moveable = TRUE ;
- // Closeable = TRUE; hat ja einen OKButton
- TabControl 1
- {
- OutputSize = TRUE ;
- Pos = MAP_APPFONT ( 2 , 10 ) ;
- Size = MAP_APPFONT ( 260 , 135 ) ;
- PageList =
- {
- PageItem
- {
- Identifier = RID_SVXPAGE_BORDER ;
- Text [ en-US ] = "Borders" ;
- };
- PageItem
- {
- Identifier = RID_SVXPAGE_BACKGROUND ;
- Text [ en-US ] = "Background" ;
- };
- };
- };
-};
- // ********************************************************************** EOF
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/uiconfig/ui/borderbackgrounddialog.ui b/cui/uiconfig/ui/borderbackgrounddialog.ui
new file mode 100644
index 000000000000..9b9b71ff2373
--- /dev/null
+++ b/cui/uiconfig/ui/borderbackgrounddialog.ui
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkDialog" id="BorderBackgroundDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Border / Background</property>
+ <property name="type_hint">dialog</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox1">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <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">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">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="reset">
+ <property name="label">gtk-revert-to-saved</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">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">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkNotebook" id="tabcontrol">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="borders">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Borders</property>
+ </object>
+ <packing>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="background">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Background</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</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">reset</action-widget>
+ </action-widgets>
+ </object>
+</interface>