convert format cells dialog to .ui
Change-Id: I451d3e28cc87f82ffb73b4e4c86a134eb1fc117a
This commit is contained in:
parent
6812efbb4d
commit
a6dab58bd3
7 changed files with 188 additions and 131 deletions
|
@ -40,7 +40,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\
|
|||
cui/source/dialogs/multipat.src \
|
||||
cui/source/dialogs/passwdomdlg.src \
|
||||
cui/source/dialogs/scriptdlg.src \
|
||||
cui/source/dialogs/sdrcelldlg.src \
|
||||
cui/source/dialogs/showcols.src \
|
||||
cui/source/dialogs/srchxtra.src \
|
||||
cui/source/dialogs/svuidlg.src \
|
||||
|
|
|
@ -41,6 +41,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
|
|||
cui/uiconfig/ui/connpooloptions \
|
||||
cui/uiconfig/ui/dbregisterpage \
|
||||
cui/uiconfig/ui/effectspage \
|
||||
cui/uiconfig/ui/formatcellsdialog \
|
||||
cui/uiconfig/ui/hatchpage \
|
||||
cui/uiconfig/ui/hyphenate \
|
||||
cui/uiconfig/ui/insertfloatingframe \
|
||||
|
|
|
@ -28,47 +28,37 @@
|
|||
#include <svx/dialogs.hrc>
|
||||
|
||||
SvxFormatCellsDialog::SvxFormatCellsDialog( Window* pParent, const SfxItemSet* pAttr, SdrModel* pModel )
|
||||
: SfxTabDialog ( pParent, CUI_RES( RID_SVX_FORMAT_CELLS_DLG ), pAttr )
|
||||
, mrOutAttrs ( *pAttr )
|
||||
, mpColorTab ( pModel->GetColorList() )
|
||||
, mpGradientList ( pModel->GetGradientList() )
|
||||
, mpHatchingList ( pModel->GetHatchList() )
|
||||
, mpBitmapList ( pModel->GetBitmapList() )
|
||||
|
||||
{
|
||||
FreeResource();
|
||||
|
||||
AddTabPage( RID_SVXPAGE_CHAR_NAME );
|
||||
AddTabPage( RID_SVXPAGE_CHAR_EFFECTS );
|
||||
AddTabPage( RID_SVXPAGE_BORDER );
|
||||
AddTabPage( RID_SVXPAGE_AREA );
|
||||
}
|
||||
|
||||
SvxFormatCellsDialog::~SvxFormatCellsDialog()
|
||||
: SfxTabDialog(pParent, "FormatCellsDialog", "cui/ui/formatcellsdialog.ui", pAttr)
|
||||
, mrOutAttrs(*pAttr)
|
||||
, mpColorTab(pModel->GetColorList())
|
||||
, mpGradientList(pModel->GetGradientList())
|
||||
, mpHatchingList(pModel->GetHatchList())
|
||||
, mpBitmapList(pModel->GetBitmapList())
|
||||
, m_nAreaPageId(0)
|
||||
{
|
||||
AddTabPage("name", RID_SVXPAGE_CHAR_NAME);
|
||||
AddTabPage("effects", RID_SVXPAGE_CHAR_EFFECTS);
|
||||
AddTabPage("border", RID_SVXPAGE_BORDER );
|
||||
m_nAreaPageId = AddTabPage("area", RID_SVXPAGE_AREA);
|
||||
}
|
||||
|
||||
void SvxFormatCellsDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
|
||||
{
|
||||
switch( nId )
|
||||
if (nId == m_nAreaPageId)
|
||||
{
|
||||
case RID_SVXPAGE_AREA:
|
||||
( (SvxAreaTabPage&) rPage ).SetColorList( mpColorTab );
|
||||
( (SvxAreaTabPage&) rPage ).SetGradientList( mpGradientList );
|
||||
( (SvxAreaTabPage&) rPage ).SetHatchingList( mpHatchingList );
|
||||
( (SvxAreaTabPage&) rPage ).SetBitmapList( mpBitmapList );
|
||||
( (SvxAreaTabPage&) rPage ).SetPageType( PT_AREA );
|
||||
( (SvxAreaTabPage&) rPage ).SetDlgType( 1 );
|
||||
( (SvxAreaTabPage&) rPage ).SetPos( 0 );
|
||||
( (SvxAreaTabPage&) rPage ).Construct();
|
||||
( (SvxAreaTabPage&) rPage ).ActivatePage( mrOutAttrs );
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
SfxTabDialog::PageCreated( nId, rPage );
|
||||
break;
|
||||
SvxAreaTabPage& rAreaPage = ((SvxAreaTabPage&)rPage);
|
||||
rAreaPage.SetColorList( mpColorTab );
|
||||
rAreaPage.SetGradientList( mpGradientList );
|
||||
rAreaPage.SetHatchingList( mpHatchingList );
|
||||
rAreaPage.SetBitmapList( mpBitmapList );
|
||||
rAreaPage.SetPageType( PT_AREA );
|
||||
rAreaPage.SetDlgType( 1 );
|
||||
rAreaPage.SetPos( 0 );
|
||||
rAreaPage.Construct();
|
||||
rAreaPage.ActivatePage( mrOutAttrs );
|
||||
}
|
||||
else
|
||||
SfxTabDialog::PageCreated( nId, rPage );
|
||||
}
|
||||
|
||||
void SvxFormatCellsDialog::Apply()
|
||||
|
|
|
@ -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 <cuires.hrc>
|
||||
#include <svx/dialogs.hrc>
|
||||
|
||||
TabDialog RID_SVX_FORMAT_CELLS_DLG
|
||||
{
|
||||
OutputSize = TRUE ;
|
||||
SVLook = TRUE ;
|
||||
Size = MAP_APPFONT ( 289 , 176 ) ;
|
||||
Text [ en-US ] = "Format Cells" ;
|
||||
Moveable = TRUE ;
|
||||
Closeable = TRUE ;
|
||||
TabControl 1
|
||||
{
|
||||
OutputSize = TRUE ;
|
||||
Pos = MAP_APPFONT ( 3 , 3 ) ;
|
||||
Size = MAP_APPFONT ( 260 , 135 ) ;
|
||||
PageList =
|
||||
{
|
||||
PageItem
|
||||
{
|
||||
Identifier = RID_SVXPAGE_CHAR_NAME ;
|
||||
PageResID = RID_SVXPAGE_CHAR_NAME ;
|
||||
Text [ en-US ] = "Font" ;
|
||||
};
|
||||
PageItem
|
||||
{
|
||||
Identifier = RID_SVXPAGE_CHAR_EFFECTS ;
|
||||
PageResID = RID_SVXPAGE_CHAR_EFFECTS ;
|
||||
Text [ en-US ] = "Font Effects" ;
|
||||
};
|
||||
PageItem
|
||||
{
|
||||
Identifier = RID_SVXPAGE_BORDER;
|
||||
PageResID = RID_SVXPAGE_BORDER;
|
||||
Text [ en-US ] = "Borders" ;
|
||||
};
|
||||
PageItem
|
||||
{
|
||||
Identifier = RID_SVXPAGE_AREA;
|
||||
PageResID = RID_SVXPAGE_AREA;
|
||||
Text [ en-US ] = "Background";
|
||||
};
|
||||
};
|
||||
};
|
||||
OKButton 1
|
||||
{
|
||||
Pos = MAP_APPFONT ( 6 , 151 ) ;
|
||||
Size = MAP_APPFONT ( 50 , 14 ) ;
|
||||
TabStop = TRUE ;
|
||||
};
|
||||
CancelButton 1
|
||||
{
|
||||
Pos = MAP_APPFONT ( 60 , 151 ) ;
|
||||
Size = MAP_APPFONT ( 50 , 14 ) ;
|
||||
TabStop = TRUE ;
|
||||
};
|
||||
HelpButton 1
|
||||
{
|
||||
Pos = MAP_APPFONT ( 114 , 151 ) ;
|
||||
Size = MAP_APPFONT ( 50 , 14 ) ;
|
||||
TabStop = TRUE ;
|
||||
};
|
||||
PushButton 1
|
||||
{
|
||||
Pos = MAP_APPFONT ( 169 , 151 ) ;
|
||||
Size = MAP_APPFONT ( 50 , 14 ) ;
|
||||
Text [ en-US ] = "Return" ;
|
||||
TabStop = TRUE ;
|
||||
};
|
||||
};
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
|
@ -39,10 +39,6 @@
|
|||
#define RID_CUI_GALLERY_START (RID_SVX_START + 360)
|
||||
// RID_CUI_GALLERY_END (RID_SVX_START + 410)
|
||||
|
||||
// tab pages
|
||||
// used in "dialogs"
|
||||
#define RID_SVX_FORMAT_CELLS_DLG ( RID_SVX_START + 42 )
|
||||
|
||||
// used in "tabpages"
|
||||
#define RID_SVXDLG_LINE (RID_SVX_START + 50)
|
||||
#define RID_SVXDLG_BBDLG (RID_SVX_START + 40)
|
||||
|
|
|
@ -35,12 +35,13 @@ private:
|
|||
XHatchListRef mpHatchingList;
|
||||
XBitmapListRef mpBitmapList;
|
||||
|
||||
sal_uInt16 m_nAreaPageId;
|
||||
|
||||
protected:
|
||||
virtual void Apply();
|
||||
|
||||
public:
|
||||
SvxFormatCellsDialog( Window* pParent, const SfxItemSet* pAttr, SdrModel* pModel );
|
||||
~SvxFormatCellsDialog();
|
||||
|
||||
virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
|
||||
|
||||
|
|
161
cui/uiconfig/ui/formatcellsdialog.ui
Normal file
161
cui/uiconfig/ui/formatcellsdialog.ui
Normal file
|
@ -0,0 +1,161 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.0 -->
|
||||
<object class="GtkDialog" id="FormatCellsDialog">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">6</property>
|
||||
<property name="title" translatable="yes">Format Cells</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">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child type="tab">
|
||||
<object class="GtkLabel" id="name">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Font</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="tab_fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child type="tab">
|
||||
<object class="GtkLabel" id="effects">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Font Effects</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
<property name="tab_fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child type="tab">
|
||||
<object class="GtkLabel" id="border">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Borders</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
<property name="tab_fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child type="tab">
|
||||
<object class="GtkLabel" id="area">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Background</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">3</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>
|
Loading…
Reference in a new issue