convert number format page to .ui

Change-Id: Icaae0aa69156ebffab5750a1820a0a7a94a39022
This commit is contained in:
Caolán McNamara
2012-12-06 11:54:45 +00:00
parent b01fb77366
commit 43137f0650
11 changed files with 917 additions and 1215 deletions

View File

@@ -118,7 +118,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\
cui/source/tabpages/labdlg.src \
cui/source/tabpages/macroass.src \
cui/source/tabpages/measure.src \
cui/source/tabpages/numfmt.src \
cui/source/tabpages/numpages.src \
cui/source/tabpages/page.src \
cui/source/tabpages/paragrph.src \

View File

@@ -49,6 +49,11 @@ String RID_SVXSTR_COL
Text [ en-US ] = "Insert Columns" ;
};
String RID_SVXSTR_AUTO_ENTRY
{
Text [ en-US ] = "Automatic";
};
#define MASKCOLOR MaskColor = \
Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; };

View File

@@ -429,7 +429,8 @@
#define RID_SVXSTR_SELECTOR_RUN (RID_SVX_START + 1200)
#define RID_SVXSTR_ROW (RID_SVX_START + 1201)
#define RID_SVXSTR_COL (RID_SVX_START + 1202)
#define RID_SVXSTR_AUTO_ENTRY (RID_SVX_START + 1203)
#define RID_SVXDLG_CERTPATH (RID_SVX_START + 1203)
#define RID_SVXDLG_CERTPATH (RID_SVX_START + 1204)
#endif

View File

@@ -256,12 +256,9 @@
#define HID_TPROTATION_CTRL2 "CUI_HID_TPROTATION_CTRL2"
#define HID_TRANS_ANGLE "CUI_HID_TRANS_ANGLE"
#define HID_TPPOSITION_CTRL "CUI_HID_TPPOSITION_CTRL"
#define HID_NUMBERFORMAT_LB_FORMAT "CUI_HID_NUMBERFORMAT_LB_FORMAT"
#define HID_NUMBERFORMAT_WND_NUMBER_PREVIEW "CUI_HID_NUMBERFORMAT_WND_NUMBER_PREVIEW"
#define HID_TRANS_SLANT "CUI_HID_TRANS_SLANT"
#define HID_TPHATCH_CTRL "CUI_HID_TPHATCH_CTRL"
#define HID_SEARCHATTR_CTL_ATTR "CUI_HID_SEARCHATTR_CTL_ATTR"
#define HID_NUMBERFORMAT_TBI_INFO "CUI_HID_NUMBERFORMAT_TBI_INFO"
#define HID_SEARCHATTR "CUI_HID_SEARCHATTR"
#define HID_ALIGNMENT_CTR_DIAL "CUI_HID_ALIGNMENT_CTR_DIAL"
#define HID_ALIGNMENT_CTR_BORDER_LOCK "CUI_HID_ALIGNMENT_CTR_BORDER_LOCK"
@@ -298,9 +295,6 @@
#define HID_CAPTION_CTL_TYPE "CUI_HID_CAPTION_CTL_TYPE"
#define HID_PAGE_MEASURE "CUI_HID_PAGE_MEASURE"
#define HID_MEASURE_CTL_POSITION "CUI_HID_MEASURE_CTL_POSITION"
#define HID_NUMBERFORMAT "CUI_HID_NUMBERFORMAT"
#define HID_NUMBERFORMAT_TBI_ADD "CUI_HID_NUMBERFORMAT_TBI_ADD"
#define HID_NUMBERFORMAT_TBI_REMOVE "CUI_HID_NUMBERFORMAT_TBI_REMOVE"
#define HID_FORMAT_PAGE "CUI_HID_FORMAT_PAGE"
#define HID_REDLINING_DLG "CUI_HID_REDLINING_DLG"
#define HID_REDLINING_EDIT "CUI_HID_REDLINING_EDIT"

View File

@@ -41,7 +41,7 @@ class vector;
//------------------------------------------------------------------------
class SvxNumberPreviewImpl : public Window
class SvxNumberPreview : public Window
{
private:
String aPrevStr;
@@ -56,8 +56,7 @@ protected:
virtual void DataChanged( const DataChangedEvent& rDCEvt );
public:
SvxNumberPreviewImpl( Window* pParent, const ResId& rResId );
~SvxNumberPreviewImpl();
SvxNumberPreview(Window* pParent, WinBits nStyle = WB_BORDER);
void NotifyChange( const String& rPrevStr, const Color* pColor = NULL );
};
@@ -90,31 +89,31 @@ public:
private:
SvxNumberFormatTabPage( Window* pParent,
const SfxItemSet& rCoreAttrs );
FixedText aFtCategory;
ListBox aLbCategory;
FixedText aFtFormat;
ListBox aLbCurrency;
SvxFontListBox aLbFormat;
FixedText aFtLanguage;
SvxLanguageBox aLbLanguage;
CheckBox aCbSourceFormat;
SvxNumberPreviewImpl aWndPreview;
FixedLine aFlOptions;
FixedText aFtDecimals;
NumericField aEdDecimals;
CheckBox aBtnNegRed;
FixedText aFtLeadZeroes;
NumericField aEdLeadZeroes;
CheckBox aBtnThousand;
FixedText* m_pFtCategory;
ListBox* m_pLbCategory;
FixedText* m_pFtFormat;
ListBox* m_pLbCurrency;
SvxFontListBox* m_pLbFormat;
FixedText* m_pFtLanguage;
SvxLanguageBox* m_pLbLanguage;
CheckBox* m_pCbSourceFormat;
SvxNumberPreview* m_pWndPreview;
FixedText* m_pFtOptions;
FixedText* m_pFtDecimals;
NumericField* m_pEdDecimals;
CheckBox* m_pBtnNegRed;
FixedText* m_pFtLeadZeroes;
NumericField* m_pEdLeadZeroes;
CheckBox* m_pBtnThousand;
FixedText aFtEdFormat;
Edit aEdFormat;
ImageButton aIbAdd;
ImageButton aIbInfo;
ImageButton aIbRemove;
FixedText* m_pFtEdFormat;
Edit* m_pEdFormat;
PushButton* m_pIbAdd;
PushButton* m_pIbInfo;
PushButton* m_pIbRemove;
FixedText aFtComment;
Edit aEdComment;
FixedText* m_pFtComment;
Edit* m_pEdComment;
Timer aResetWinTimer;
@@ -127,17 +126,10 @@ private:
sal_Bool bOneAreaFlag;
short nFixedCategory;
long nCatHeight;
long nCurFormatY;
long nCurFormatHeight;
long nStdFormatY;
long nStdFormatHeight;
String sAutomaticEntry;
Window* pLastActivWindow;
#ifdef _SVX_NUMFMT_CXX
void Init_Impl();
void FillCurrencyBox();
void FillFormatListBox_Impl( std::vector<String*>& rEntries );
@@ -155,12 +147,10 @@ private:
DECL_LINK( LostFocusHdl_Impl, Edit* pEd );
DECL_LINK( DoubleClickHdl_Impl, SvxFontListBox* pLb );
DECL_LINK( SelFormatHdl_Impl, void * );
DECL_LINK( ClickHdl_Impl, ImageButton* pIB );
DECL_LINK( ClickHdl_Impl, PushButton* pIB );
DECL_LINK( EditHdl_Impl, Edit* pEdFormat );
DECL_LINK( OptHdl_Impl, void * );
DECL_LINK(TimeHdl_Impl, void *);
#endif
};
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -1,59 +0,0 @@
/*
* 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 .
*/
#ifndef _SVX_NUMFMT_HRC
#define _SVX_NUMFMT_HRC
// defines ------------------------------------------------------------------
//================================================
// number TabPage:
#define WND_NUMBER_PREVIEW 2
#define FT_CATEGORY 3
#define FT_FORMAT 4
#define FT_OPTIONS 5
#define FT_EDFORMAT 6
#define LB_CATEGORY 9
#define LB_FORMAT 10
#define FL_OPTIONS 11
#define FT_LANGUAGE 12
#define LB_LANGUAGE 13
#define ED_FORMAT 14
#define BTN_ADD 15
#define BTN_REMOVE 16
#define FT_DECIMALS 21
#define ED_DECIMALS 22
#define FT_LEADZEROES 23
#define ED_LEADZEROES 24
#define BTN_NEGRED 25
#define BTN_THOUSAND 26
#define FT_COMMENT 27
#define ED_COMMENT 28
#define IB_ADD 29
#define IB_REMOVE 30
#define IB_INFO 31
#define IL_ICON 32
#define LB_CURRENCY 33
#define CB_SOURCEFORMAT 34
#define STR_AUTO_ENTRY 36
#define IID_ADD 1
#define IID_REMOVE 2
#define IID_INFO 3
#endif

View File

@@ -1,250 +0,0 @@
/*
* 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 "helpid.hrc"
#include "numfmt.hrc"
#include <svx/dialogs.hrc>
// RID_SVXPAGE_NUMBERFORMAT ----------------------------------------------
TabPage RID_SVXPAGE_NUMBERFORMAT
{
HelpId = HID_NUMBERFORMAT ;
Hide = TRUE ;
Text [ en-US ] = "Number Format" ;
Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
FixedText FT_CATEGORY
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 70 , 8 ) ;
Text [ en-US ] = "~Category" ;
};
ListBox LB_CATEGORY
{
HelpID = "cui:ListBox:RID_SVXPAGE_NUMBERFORMAT:LB_CATEGORY";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 14 ) ;
Size = MAP_APPFONT ( 70 , 71 ) ;
AutoHScroll = TRUE ;
StringList [ en-US ] =
{
< "All" ; Default ; > ;
< "User-defined" ; Default ; > ;
< "Number" ; Default ; > ;
< "Percent" ; Default ; > ;
< "Currency" ; Default ; > ;
< "Date" ; Default ; > ;
< "Time" ; Default ; > ;
< "Scientific" ; Default ; > ;
< "Fraction" ; Default ; > ;
< "Boolean Value" ; Default ; > ;
< "Text" ; Default ; > ;
};
};
FixedText FT_EDFORMAT
{
Pos = MAP_APPFONT ( 6 , 136 ) ;
Size = MAP_APPFONT ( 248 , 8 ) ;
Text [ en-US ] = "~Format code" ;
};
Edit ED_FORMAT
{
HelpID = "cui:Edit:RID_SVXPAGE_NUMBERFORMAT:ED_FORMAT";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 147 ) ;
Size = MAP_APPFONT ( 200 , 12 ) ;
};
FixedText FT_COMMENT
{
Pos = MAP_APPFONT ( 6 , 163 ) ;
Size = MAP_APPFONT ( 248 , 16 ) ;
WordBreak = TRUE ;
NoLabel = TRUE ;
};
Edit ED_COMMENT
{
HelpID = "cui:Edit:RID_SVXPAGE_NUMBERFORMAT:ED_COMMENT";
Hide = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 163 ) ;
Size = MAP_APPFONT ( 248 , 12 ) ;
};
FixedText FT_FORMAT
{
Pos = MAP_APPFONT ( 82 , 3 ) ;
Size = MAP_APPFONT ( 90 , 8 ) ;
Text [ en-US ] = "F~ormat" ;
};
ListBox LB_CURRENCY
{
HelpID = "cui:ListBox:RID_SVXPAGE_NUMBERFORMAT:LB_CURRENCY";
Border = TRUE ;
Pos = MAP_APPFONT ( 82 , 14 ) ;
Size = MAP_APPFONT ( 90 , 71 ) ;
DropDown = TRUE ;
TabStop = TRUE ;
StringList [ en-US ] =
{
< "Automatically" ; Default ; > ;
};
};
Control LB_FORMAT
{
HelpId = HID_NUMBERFORMAT_LB_FORMAT ;
Border = TRUE ;
Pos = MAP_APPFONT ( 82 , 27 ) ;
Size = MAP_APPFONT ( 90 , 58 ) ;
TabStop = TRUE ;
};
FixedText FT_DECIMALS
{
Pos = MAP_APPFONT ( 12 , 104 ) ;
Size = MAP_APPFONT ( 69 , 8 ) ;
Text [ en-US ] = "~Decimal places" ;
};
NumericField ED_DECIMALS
{
HelpID = "cui:NumericField:RID_SVXPAGE_NUMBERFORMAT:ED_DECIMALS";
Border = TRUE ;
Pos = MAP_APPFONT ( 84 , 102 ) ;
Size = MAP_APPFONT ( 24 , 12 ) ;
Spin = TRUE ;
Maximum = 20 ;
Last = 15 ;
First = 0 ;
StrictFormat = TRUE ;
SpinSize = 1 ;
Repeat = TRUE ;
};
FixedText FT_LEADZEROES
{
Pos = MAP_APPFONT ( 12 , 120 ) ;
Size = MAP_APPFONT ( 69 , 8 ) ;
Text [ en-US ] = "Leading ~zeroes" ;
};
NumericField ED_LEADZEROES
{
HelpID = "cui:NumericField:RID_SVXPAGE_NUMBERFORMAT:ED_LEADZEROES";
Border = TRUE ;
Pos = MAP_APPFONT ( 84 , 118 ) ;
Size = MAP_APPFONT ( 24 , 12 ) ;
Spin = TRUE ;
Maximum = 20 ;
Last = 15 ;
First = 0 ;
StrictFormat = TRUE ;
SpinSize = 1 ;
Repeat = TRUE ;
};
CheckBox BTN_NEGRED
{
HelpID = "cui:CheckBox:RID_SVXPAGE_NUMBERFORMAT:BTN_NEGRED";
Pos = MAP_APPFONT ( 133 , 104 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
Text [ en-US ] = "~Negative numbers red" ;
};
CheckBox BTN_THOUSAND
{
HelpID = "cui:CheckBox:RID_SVXPAGE_NUMBERFORMAT:BTN_THOUSAND";
Pos = MAP_APPFONT ( 133 , 120 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
Text [ en-US ] = "~Thousands separator" ;
};
FixedLine FL_OPTIONS
{
Pos = MAP_APPFONT ( 6 , 91 ) ;
Size = MAP_APPFONT ( 248 , 8 ) ;
Text [ en-US ] = "Options" ;
};
FixedText FT_LANGUAGE
{
Pos = MAP_APPFONT ( 178 , 3 ) ;
Size = MAP_APPFONT ( 76 , 8 ) ;
Text [ en-US ] = "~Language" ;
};
ListBox LB_LANGUAGE
{
HelpID = "cui:ListBox:RID_SVXPAGE_NUMBERFORMAT:LB_LANGUAGE";
Border = TRUE ;
Sort = TRUE ;
Pos = MAP_APPFONT ( 178 , 14 ) ;
Size = MAP_APPFONT ( 76 , 71 ) ;
DropDown = TRUE ;
};
CheckBox CB_SOURCEFORMAT
{
HelpID = "cui:CheckBox:RID_SVXPAGE_NUMBERFORMAT:CB_SOURCEFORMAT";
Pos = MAP_APPFONT ( 178 , 42 ) ;
Size = MAP_APPFONT ( 76 , 10 ) ;
Text [ en-US ] = "So~urce format" ;
};
Window WND_NUMBER_PREVIEW
{
Border = TRUE ;
SVLook = TRUE ;
Pos = MAP_APPFONT ( 178 , 67 ) ;
Size = MAP_APPFONT ( 76 , 18 ) ;
HelpId = HID_NUMBERFORMAT_WND_NUMBER_PREVIEW ;
};
ImageButton IB_ADD
{
SVLook = TRUE ;
Pos = MAP_APPFONT ( 208 , 146 ) ;
Size = MAP_APPFONT ( 14 , 14 ) ;
HelpId = HID_NUMBERFORMAT_TBI_ADD ;
QuickHelpText [ en-US ] = "Add" ;
};
ImageButton IB_REMOVE
{
SVLook = TRUE ;
Pos = MAP_APPFONT ( 240 , 146 ) ;
Size = MAP_APPFONT ( 14 , 14 ) ;
HelpId = HID_NUMBERFORMAT_TBI_REMOVE ;
QuickHelpText [ en-US ] = "Remove" ;
};
ImageButton IB_INFO
{
SVLook = TRUE ;
Pos = MAP_APPFONT ( 224 , 146 ) ;
Size = MAP_APPFONT ( 14 , 14 ) ;
HelpId = HID_NUMBERFORMAT_TBI_INFO ;
QuickHelpText [ en-US ] = "Edit Comment" ;
};
ImageList IL_ICON
{
Prefix = "nu";
MaskColor = Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; };
IdList =
{
IID_ADD ;
IID_REMOVE ;
IID_INFO ;
};
IdCount = { 3 ; };
};
String STR_AUTO_ENTRY
{
Text [ en-US ] = "Automatic";
};
};
// ********************************************************************** EOF

View File

@@ -1,59 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkDialog" id="NumberingFormatPage">
<property name="can_focus">False</property>
<property name="border_width">5</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">2</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="button1">
<property name="label" translatable="yes">button</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</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="button2">
<property name="label" translatable="yes">button</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</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="GtkGrid" id="grid2">
<object class="GtkGrid" id="NumberFormatPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">10</property>
@@ -78,7 +26,7 @@
<property name="column_spacing">6</property>
<property name="row_homogeneous">True</property>
<child>
<object class="GtkEntry" id="1003">
<object class="GtkEntry" id="formated">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="valign">center</property>
@@ -99,6 +47,8 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="has_tooltip">True</property>
<property name="tooltip_markup" translatable="yes">Add</property>
<property name="tooltip_text" translatable="yes">Add</property>
<property name="valign">center</property>
<property name="use_action_appearance">False</property>
@@ -117,6 +67,8 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="has_tooltip">True</property>
<property name="tooltip_markup" translatable="yes">Edit Comment</property>
<property name="tooltip_text" translatable="yes">Edit Comment</property>
<property name="valign">center</property>
<property name="use_action_appearance">False</property>
@@ -135,6 +87,8 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="has_tooltip">True</property>
<property name="tooltip_markup" translatable="yes">Remove</property>
<property name="tooltip_text" translatable="yes">Remove</property>
<property name="valign">center</property>
<property name="use_action_appearance">False</property>
@@ -148,7 +102,7 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="label3">
<object class="GtkLabel" id="commentft">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
@@ -161,7 +115,7 @@
</packing>
</child>
<child>
<object class="GtkEntry" id="entry1">
<object class="GtkEntry" id="commented">
<property name="can_focus">True</property>
<property name="no_show_all">True</property>
<property name="invisible_char">●</property>
@@ -179,7 +133,7 @@
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label6">
<object class="GtkLabel" id="formatf">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Format code</property>
@@ -215,11 +169,12 @@
<property name="row_spacing">10</property>
<property name="column_spacing">20</property>
<child>
<object class="GtkSpinButton" id="101">
<object class="GtkSpinButton" id="decimalsed">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">•</property>
<property name="invisible_char_set">True</property>
<property name="adjustment">adjustment1</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -229,11 +184,12 @@
</packing>
</child>
<child>
<object class="GtkSpinButton" id="102">
<object class="GtkSpinButton" id="leadzerosed">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">•</property>
<property name="invisible_char_set">True</property>
<property name="adjustment">adjustment1</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -243,7 +199,7 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="5">
<object class="GtkLabel" id="decimalsft">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Decimal places</property>
@@ -256,7 +212,7 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="6">
<object class="GtkLabel" id="leadzerosft">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Leading zeroes </property>
@@ -269,7 +225,7 @@
</packing>
</child>
<child>
<object class="GtkCheckButton" id="11">
<object class="GtkCheckButton" id="negnumred">
<property name="label" translatable="yes">Negative numbers red</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
@@ -287,7 +243,7 @@
</packing>
</child>
<child>
<object class="GtkCheckButton" id="12">
<object class="GtkCheckButton" id="thousands">
<property name="label" translatable="yes">Thousands separator</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
@@ -309,7 +265,7 @@
</object>
</child>
<child type="label">
<object class="GtkLabel" id="4">
<object class="GtkLabel" id="optionsft">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Options</property>
@@ -331,12 +287,14 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkFrame" id="frame1">
<object class="GtkFrame" id="categoryframe">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="vexpand">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
@@ -345,9 +303,16 @@
<property name="can_focus">False</property>
<property name="top_padding">6</property>
<child>
<object class="GtkTreeView" id="treeview1">
<object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTreeView" id="categorylb">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="model">liststore1</property>
<property name="search_column">0</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection"/>
</child>
@@ -355,8 +320,10 @@
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label7">
<object class="GtkLabel" id="categoryft">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Category</property>
@@ -374,31 +341,59 @@
</packing>
</child>
<child>
<object class="GtkFrame" id="frame2">
<object class="GtkFrame" id="formatframe">
<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="alignment4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="vexpand">True</property>
<property name="top_padding">6</property>
<child>
<object class="GtkTreeView" id="treeview3">
<object class="GtkGrid" id="grid2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="vexpand">True</property>
<property name="row_spacing">6</property>
<child>
<object class="svxlo:SvxFontListBox" id="formatlb">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection1"/>
<property name="vexpand">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="GtkComboBox" id="currencylb">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">start</property>
<property name="model">liststore2</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">
<object class="GtkLabel" id="formatft">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Format</property>
@@ -416,22 +411,26 @@
</packing>
</child>
<child>
<object class="GtkFrame" id="frame3">
<object class="GtkFrame" id="languageframe">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="vexpand">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="vexpand">True</property>
<property name="top_padding">6</property>
<child>
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="vexpand">True</property>
<property name="row_spacing">6</property>
<child>
<object class="GtkComboBox" id="combobox1">
<object class="svxcorelo:SvxLanguageBox" id="languagelb">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">start</property>
@@ -444,10 +443,30 @@
</packing>
</child>
<child>
<object class="GtkDrawingArea" id="drawingarea1">
<object class="cuilo:SvxNumberPreview" id="preview">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="valign">end</property>
<property name="vexpand">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="GtkCheckButton" id="sourceformat">
<property name="label" translatable="yes">Source Format</property>
<property name="use_action_appearance">False</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="no_show_all">True</property>
<property name="use_action_appearance">False</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -461,7 +480,7 @@
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label2">
<object class="GtkLabel" id="languageft">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Language</property>
@@ -487,18 +506,10 @@
</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">button1</action-widget>
<action-widget response="0">button2</action-widget>
</action-widgets>
<object class="GtkAdjustment" id="adjustment1">
<property name="upper">20</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
@@ -515,4 +526,56 @@
<property name="can_focus">False</property>
<property name="pixbuf">svx/res/nu03.png</property>
</object>
<object class="GtkListStore" id="liststore1">
<columns>
<!-- column-name gchararray1 -->
<column type="gchararray"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">All</col>
</row>
<row>
<col id="0" translatable="yes">User-defined</col>
</row>
<row>
<col id="0" translatable="yes">Number</col>
</row>
<row>
<col id="0" translatable="yes">Percent</col>
</row>
<row>
<col id="0" translatable="yes">Currency</col>
</row>
<row>
<col id="0" translatable="yes">Date</col>
</row>
<row>
<col id="0" translatable="yes">Time</col>
</row>
<row>
<col id="0" translatable="yes">Scientific</col>
</row>
<row>
<col id="0" translatable="yes">Fraction</col>
</row>
<row>
<col id="0" translatable="yes">Boolean Value</col>
</row>
<row>
<col id="0" translatable="yes">Text</col>
</row>
</data>
</object>
<object class="GtkListStore" id="liststore2">
<columns>
<!-- column-name gchararray1 -->
<column type="gchararray"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">Automatically</col>
</row>
</data>
</object>
</interface>

View File

@@ -70,7 +70,8 @@ private:
bool mbUseFont; /// true = Use maEntryFont/mpEntryColor in InitEntry().
public:
SvxFontListBox( Window* pParent, const ResId& rResId );
SvxFontListBox(Window* pParent, const ResId& rResId);
SvxFontListBox(Window* pParent, WinBits nStyle = WB_BORDER);
/** Inserts a list entry and sets the font used for this entry.
@param pColor The font color. NULL = use default listbox text color. */

View File

@@ -18,6 +18,7 @@
*/
#include "svx/fontlb.hxx"
#include <vcl/builder.hxx>
#include <vcl/svapp.hxx>
#include "svtools/treelistentry.hxx"
#include "svtools/viewdataentry.hxx"
@@ -87,15 +88,29 @@ void SvLBoxFontString::InitViewData( SvTreeListBox* pView, SvTreeListEntry* pEnt
// ============================================================================
SvxFontListBox::SvxFontListBox( Window* pParent, const ResId& rResId ) :
SvTabListBox( pParent, rResId ),
maStdFont( GetFont() ),
mbUseFont( false )
SvxFontListBox::SvxFontListBox(Window* pParent, const ResId& rResId)
: SvTabListBox(pParent, rResId)
, maStdFont(GetFont())
, mbUseFont(false)
{
maStdFont.SetTransparent( sal_True );
maStdFont.SetTransparent(sal_True);
maEntryFont = maStdFont;
}
SvxFontListBox::SvxFontListBox(Window* pParent, WinBits nStyle)
: SvTabListBox(pParent, nStyle)
, maStdFont(GetFont())
, mbUseFont(false)
{
maStdFont.SetTransparent(sal_True);
maEntryFont = maStdFont;
}
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxFontListBox(Window *pParent, VclBuilder::stringmap &)
{
return new SvxFontListBox(pParent, 0);
}
void SvxFontListBox::InsertFontEntry( const String& rString, const Font& rFont, const Color* pColor )
{
mbUseFont = true; // InitEntry() will use maEntryFont