Kaydet (Commit) acee1b8b authored tarafından Caolán McNamara's avatar Caolán McNamara

convert border background dialog to .ui

Change-Id: I661384b04fef7f59c2b4feffe093cf75103d55d1
üst 71eb2737
......@@ -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 \
......
......@@ -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 \
......
......@@ -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;
};
......
......@@ -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)
......
......@@ -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: */
/* -*- 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: */
<?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>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment