Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
3a9d2f27
Kaydet (Commit)
3a9d2f27
authored
Şub 03, 2014
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert chinese dictionary dialog to .ui
Change-Id: I2c239c1e7115d26f7b1dba00b08256b650cc183e
üst
98c94047
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
639 additions
and
685 deletions
+639
-685
file_resource_ooo.scp
scp2/source/ooo/file_resource_ooo.scp
+0
-1
module_lang_template.scp
scp2/source/ooo/module_lang_template.scp
+0
-1
AllLangResTarget_textconversiondlgs.mk
svx/AllLangResTarget_textconversiondlgs.mk
+0
-34
Library_textconversiondlgs.mk
svx/Library_textconversiondlgs.mk
+0
-1
Module_svx.mk
svx/Module_svx.mk
+0
-1
UIConfig_svx.mk
svx/UIConfig_svx.mk
+1
-0
helpid.hrc
svx/inc/helpid.hrc
+0
-7
buttongroup.hrc
svx/source/unodialogs/textconversiondlgs/buttongroup.hrc
+0
-2
chinese_dictionarydialog.cxx
...nodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
+194
-234
chinese_dictionarydialog.hrc
...nodialogs/textconversiondlgs/chinese_dictionarydialog.hrc
+0
-47
chinese_dictionarydialog.hxx
...nodialogs/textconversiondlgs/chinese_dictionarydialog.hxx
+36
-42
chinese_dictionarydialog.src
...nodialogs/textconversiondlgs/chinese_dictionarydialog.src
+0
-197
chinese_translationdialog.cxx
...odialogs/textconversiondlgs/chinese_translationdialog.cxx
+0
-4
resid.cxx
svx/source/unodialogs/textconversiondlgs/resid.cxx
+0
-44
resid.hxx
svx/source/unodialogs/textconversiondlgs/resid.hxx
+0
-44
resids.hrc
svx/source/unodialogs/textconversiondlgs/resids.hrc
+0
-26
chinesedictionary.ui
svx/uiconfig/ui/chinesedictionary.ui
+408
-0
No files found.
scp2/source/ooo/file_resource_ooo.scp
Dosyayı görüntüle @
3a9d2f27
...
...
@@ -83,7 +83,6 @@ STD_RES_FILE( gid_File_Res_Svt, svt )
STD_RES_FILE( gid_File_Res_Svx, svx )
STD_RES_FILE( gid_File_Res_Editeng, editeng )
STD_RES_FILE( gid_File_Res_TextConversionDlgs, textconversiondlgs )
STD_RES_FILE( gid_File_Res_Cui, cui )
...
...
scp2/source/ooo/module_lang_template.scp
Dosyayı görüntüle @
3a9d2f27
...
...
@@ -93,7 +93,6 @@ Module gid_Module_Langpack_Resource_Template
gid_File_Res_Svt,
gid_File_Res_Svx,
gid_File_Res_Cui,
gid_File_Res_TextConversionDlgs,
gid_File_Res_Sw,
gid_File_Res_Tk,
gid_File_Res_Acc,
...
...
svx/AllLangResTarget_textconversiondlgs.mk
deleted
100644 → 0
Dosyayı görüntüle @
98c94047
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# 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 .
#
$(eval $(call gb_AllLangResTarget_AllLangResTarget,textconversiondlgs))
$(eval $(call gb_AllLangResTarget_set_reslocation,textconversiondlgs,svx))
$(eval $(call gb_AllLangResTarget_add_srs,textconversiondlgs,\
svx/textconversiondlgs \
))
$(eval $(call gb_SrsTarget_SrsTarget,svx/textconversiondlgs))
$(eval $(call gb_SrsTarget_add_files,svx/textconversiondlgs,\
svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.src \
))
# vim: set noet sw=4 ts=4:
svx/Library_textconversiondlgs.mk
Dosyayı görüntüle @
3a9d2f27
...
...
@@ -50,7 +50,6 @@ $(eval $(call gb_Library_add_exception_objects,textconversiondlgs,\
svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog \
svx/source/unodialogs/textconversiondlgs/chinese_translationdialog \
svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog \
svx/source/unodialogs/textconversiondlgs/resid \
))
# vim: set noet sw=4 ts=4:
svx/Module_svx.mk
Dosyayı görüntüle @
3a9d2f27
...
...
@@ -29,7 +29,6 @@ $(eval $(call gb_Module_add_l10n_targets,svx,\
AllLangResTarget_svx \
AllLangResTarget_ofa \
AllLangResTarget_gal \
AllLangResTarget_textconversiondlgs \
UIConfig_svx \
))
...
...
svx/UIConfig_svx.mk
Dosyayı görüntüle @
3a9d2f27
...
...
@@ -19,6 +19,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
svx/uiconfig/ui/addsubmissiondialog \
svx/uiconfig/ui/asianphoneticguidedialog \
svx/uiconfig/ui/chineseconversiondialog \
svx/uiconfig/ui/chinesedictionary \
svx/uiconfig/ui/compressgraphicdialog \
svx/uiconfig/ui/deleteheaderdialog \
svx/uiconfig/ui/deletefooterdialog \
...
...
svx/inc/helpid.hrc
Dosyayı görüntüle @
3a9d2f27
...
...
@@ -154,14 +154,7 @@
#define HID_REDLINING_TABCONTROL "SVX_HID_REDLINING_TABCONTROL"
#define HID_STYLE_LISTBOX "SVX_HID_STYLE_LISTBOX"
#define HID_SVXTBX_UNDO_REDO_CTRL "SVX_HID_SVXTBX_UNDO_REDO_CTRL"
#define HID_SVX_CHINESE_DICTIONARY_CB_REVERSE "SVX_HID_SVX_CHINESE_DICTIONARY_CB_REVERSE"
#define HID_SVX_CHINESE_DICTIONARY_LB_HEADER "SVX_HID_SVX_CHINESE_DICTIONARY_LB_HEADER"
#define HID_SVX_CHINESE_DICTIONARY_LB_TO_SIMPLIFIED "SVX_HID_SVX_CHINESE_DICTIONARY_LB_TO_SIMPLIFIED"
#define HID_SVX_CHINESE_DICTIONARY_LB_TO_TRADITIONAL "SVX_HID_SVX_CHINESE_DICTIONARY_LB_TO_TRADITIONAL"
#define HID_SVX_CHINESE_DICTIONARY_RB_CONVERSION_TO_SIMPLIFIED "SVX_HID_SVX_CHINESE_DICTIONARY_RB_CONVERSION_TO_SIMPLIFIED"
#define HID_SVX_CHINESE_DICTIONARY_RB_CONVERSION_TO_TRADITIONAL "SVX_HID_SVX_CHINESE_DICTIONARY_RB_CONVERSION_TO_TRADITIONAL"
#define HID_SVX_CHINESE_TRANSLATION_RB_CONVERSION_TO_SIMPLIFIED "SVX_HID_SVX_CHINESE_TRANSLATION_RB_CONVERSION_TO_SIMPLIFIED"
#define HID_SVX_CHINESE_TRANSLATION_RB_CONVERSION_TO_TRADITIONAL "SVX_HID_SVX_CHINESE_TRANSLATION_RB_CONVERSION_TO_TRADITIONAL"
#define HID_SVX_MDLG_DOCRECOVERY_BROKEN "SVX_HID_SVX_MDLG_DOCRECOVERY_BROKEN"
#define HID_SVX_MDLG_DOCRECOVERY_PROGR "SVX_HID_SVX_MDLG_DOCRECOVERY_PROGR"
#define HID_SVX_MDLG_ERR_REP_OPTIONS "SVX_HID_SVX_MDLG_ERR_REP_OPTIONS"
...
...
svx/source/unodialogs/textconversiondlgs/buttongroup.hrc
Dosyayı görüntüle @
3a9d2f27
...
...
@@ -19,8 +19,6 @@
#ifndef _UNODIALOGS_BUTTONGROUP_HRC
#define _UNODIALOGS_BUTTONGROUP_HRC
#include "resids.hrc"
#define PB_OK 1
#define PB_CANCEL 1
#define PB_HELP 1
...
...
svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
Dosyayı görüntüle @
3a9d2f27
...
...
@@ -19,8 +19,6 @@
#include "chinese_dictionarydialog.hxx"
#include "chinese_dictionarydialog.hrc"
#include "resid.hxx"
#include <cppuhelper/bootstrap.hxx>
#include <com/sun/star/i18n/TextConversionOption.hpp>
#include <com/sun/star/linguistic2/ConversionDictionaryType.hpp>
...
...
@@ -55,21 +53,12 @@ using namespace ::com::sun::star::uno;
#define HEADER_BAR_BITS ( HIB_LEFT | HIB_VCENTER | HIB_CLICKABLE | HIB_FIXED | HIB_FIXEDPOS )
DictionaryList
::
DictionaryList
(
Window
*
pParent
,
const
ResId
&
rResId
)
:
Sv
HeaderTabListBox
(
pParent
,
rResId
)
DictionaryList
::
DictionaryList
(
SvSimpleTableContainer
&
rParent
,
WinBits
nBits
)
:
Sv
SimpleTable
(
rParent
,
nBits
)
,
m_xDictionary
(
0
)
,
m_pHeaderBar
(
0
)
,
m_pPropertyTypeNameListBox
(
0
)
,
m_aToBeDeleted
()
,
m_nSortColumnIndex
(
0
)
{
}
DictionaryList
::
DictionaryList
(
Window
*
pParent
)
:
SvHeaderTabListBox
(
pParent
,
0
)
,
m_xDictionary
(
0
)
,
m_pHeaderBar
(
0
)
,
m_pPropertyTypeNameListBox
(
0
)
,
m_pED_Term
(
0
)
,
m_pED_Mapping
(
0
)
,
m_pLB_Property
(
0
)
,
m_aToBeDeleted
()
,
m_nSortColumnIndex
(
0
)
{
...
...
@@ -77,13 +66,13 @@ DictionaryList::DictionaryList( Window* pParent )
OUString
DictionaryList
::
getPropertyTypeName
(
sal_Int16
nConversionPropertyType
)
const
{
if
(
!
m_p
PropertyTypeNameListBox
||
!
m_pPropertyTypeNameListBox
->
GetEntryCount
())
if
(
!
m_p
LB_Property
||
!
m_pLB_Property
->
GetEntryCount
())
return
OUString
();
sal_uInt16
nPos
=
static_cast
<
sal_uInt16
>
(
nConversionPropertyType
)
-
1
;
if
(
nPos
<
m_p
PropertyTypeNameListBox
->
GetEntryCount
())
return
m_p
PropertyTypeNameListBox
->
GetEntry
(
nPos
);
return
m_p
PropertyTypeNameListBox
->
GetEntry
(
0
);
if
(
nPos
<
m_p
LB_Property
->
GetEntryCount
())
return
m_p
LB_Property
->
GetEntry
(
nPos
);
return
m_p
LB_Property
->
GetEntry
(
0
);
}
OUString
DictionaryList
::
makeTabString
(
const
DictionaryEntry
&
rEntry
)
const
...
...
@@ -96,21 +85,6 @@ OUString DictionaryList::makeTabString( const DictionaryEntry& rEntry ) const
return
aStr
;
}
void
DictionaryList
::
initDictionaryControl
(
const
Reference
<
linguistic2
::
XConversionDictionary
>&
xDictionary
,
ListBox
*
pPropertyTypeNameListBox
)
{
SetStyle
(
WB_VSCROLL
|
WB_TABSTOP
);
SetSelectionMode
(
SINGLE_SELECTION
);
SetBorderStyle
(
WINDOW_BORDER_MONO
);
SetHighlightRange
();
if
(
m_xDictionary
.
is
())
return
;
m_xDictionary
=
xDictionary
;
m_pPropertyTypeNameListBox
=
pPropertyTypeNameListBox
;
}
void
DictionaryList
::
save
()
{
if
(
!
m_xDictionary
.
is
()
)
...
...
@@ -289,55 +263,6 @@ sal_uIntPtr DictionaryList::deleteEntries( const OUString& rTerm )
return
nPos
;
}
DictionaryList
::~
DictionaryList
()
{
}
void
DictionaryList
::
activate
(
HeaderBar
*
pHeaderBar
)
{
if
(
!
m_pHeaderBar
)
{
m_pHeaderBar
=
pHeaderBar
;
Point
aPos
=
GetPosPixel
();
Size
aSize
=
GetSizePixel
();
Size
aHeadSize
=
pHeaderBar
->
GetSizePixel
();
aPos
.
Y
()
+=
aHeadSize
.
Height
();
SetPosSizePixel
(
aPos
,
Size
(
aSize
.
Width
(),
aSize
.
Height
()
-
aHeadSize
.
Height
()
)
);
InitHeaderBar
(
pHeaderBar
);
}
Show
();
}
HeaderBar
*
DictionaryList
::
createHeaderBar
(
const
OUString
&
rColumn1
,
const
OUString
&
rColumn2
,
const
OUString
&
rColumn3
,
long
nWidth1
,
long
nWidth2
,
long
nWidth3
)
{
HeaderBar
*
pHeaderBar
=
new
HeaderBar
(
Control
::
GetParent
(),
WB_BUTTONSTYLE
|
WB_BOTTOMBORDER
);
pHeaderBar
->
SetPosSizePixel
(
GetPosPixel
(),
pHeaderBar
->
CalcWindowSizePixel
()
);
HeaderBarItemBits
nBits
=
HEADER_BAR_BITS
;
pHeaderBar
->
InsertItem
(
1
,
rColumn1
,
nWidth1
,
nBits
|
HIB_UPARROW
);
pHeaderBar
->
InsertItem
(
2
,
rColumn2
,
nWidth2
,
nBits
);
pHeaderBar
->
InsertItem
(
3
,
rColumn3
,
nWidth3
,
nBits
);
pHeaderBar
->
Show
();
return
pHeaderBar
;
}
void
DictionaryList
::
Resize
()
{
SvHeaderTabListBox
::
Resize
();
Size
aBoxSize
=
GetOutputSizePixel
();
if
(
!
aBoxSize
.
Width
()
)
return
;
Size
aBarSize
=
m_pHeaderBar
->
GetSizePixel
();
aBarSize
.
Width
()
=
GetSizePixel
().
Width
();
m_pHeaderBar
->
SetSizePixel
(
aBarSize
);
}
void
DictionaryList
::
sortByColumn
(
sal_uInt16
nSortColumnIndex
,
bool
bSortAtoZ
)
{
m_nSortColumnIndex
=
nSortColumnIndex
;
...
...
@@ -437,52 +362,115 @@ bool DictionaryEntry::operator==( const DictionaryEntry& rE ) const
&&
m_nConversionPropertyType
==
rE
.
m_nConversionPropertyType
;
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
void
DictionaryList
::
setColSizes
()
{
HeaderBar
&
rBar
=
GetTheHeaderBar
();
if
(
rBar
.
GetItemCount
()
<
3
)
return
;
long
nWidth1
=
m_pED_Term
->
get_preferred_size
().
Width
();
long
nWidth2
=
m_pED_Mapping
->
get_preferred_size
().
Width
();
long
nWidth3
=
m_pLB_Property
->
get_preferred_size
().
Width
();
long
nWidth
=
GetSizePixel
().
Width
();
long
nPos3
=
nWidth
-
nWidth3
;
long
nRemainder
=
nWidth
-
(
nWidth1
+
nWidth2
+
nWidth3
);
long
aStaticTabs
[]
=
{
3
,
0
,
nWidth1
+
(
nRemainder
/
2
),
nPos3
};
SvSimpleTable
::
SetTabs
(
aStaticTabs
,
MAP_PIXEL
);
}
void
DictionaryList
::
Resize
()
{
SvSimpleTable
::
Resize
();
setColSizes
();
}
void
DictionaryList
::
init
(
const
Reference
<
linguistic2
::
XConversionDictionary
>&
xDictionary
,
Window
*
pED_Term
,
Window
*
pED_Mapping
,
ListBox
*
pLB_Property
,
Window
*
pFT_Term
,
Window
*
pFT_Mapping
,
Window
*
pFT_Property
)
{
SetStyle
(
WB_VSCROLL
|
WB_TABSTOP
);
SetSelectionMode
(
SINGLE_SELECTION
);
SetBorderStyle
(
WINDOW_BORDER_MONO
);
SetHighlightRange
();
if
(
m_xDictionary
.
is
())
return
;
m_xDictionary
=
xDictionary
;
m_pED_Term
=
pED_Term
;
m_pED_Mapping
=
pED_Mapping
;
m_pLB_Property
=
pLB_Property
;
HeaderBar
&
rHeaderBar
=
GetTheHeaderBar
();
OUString
aColumn1
(
OutputDevice
::
GetNonMnemonicString
(
pFT_Term
->
GetText
()
)
);
OUString
aColumn2
(
OutputDevice
::
GetNonMnemonicString
(
pFT_Mapping
->
GetText
()
)
);
OUString
aColumn3
(
OutputDevice
::
GetNonMnemonicString
(
pFT_Property
->
GetText
()
)
);
long
nWidth1
=
m_pED_Term
->
get_preferred_size
().
Width
();
long
nWidth2
=
m_pED_Mapping
->
get_preferred_size
().
Width
();
long
nWidth3
=
m_pLB_Property
->
get_preferred_size
().
Width
();
HeaderBarItemBits
nBits
=
HEADER_BAR_BITS
;
rHeaderBar
.
InsertItem
(
1
,
aColumn1
,
nWidth1
,
nBits
|
HIB_UPARROW
);
rHeaderBar
.
InsertItem
(
2
,
aColumn2
,
nWidth2
,
nBits
);
rHeaderBar
.
InsertItem
(
3
,
aColumn3
,
nWidth3
,
nBits
);
long
pTabs
[]
=
{
3
,
0
,
nWidth1
,
nWidth1
+
nWidth2
};
SetTabs
(
&
pTabs
[
0
],
MAP_PIXEL
);
}
void
ChineseDictionaryDialog
::
initDictionaryControl
(
DictionaryList
*
pList
,
const
Reference
<
linguistic2
::
XConversionDictionary
>&
xDictionary
)
{
//init HeaderBar and set tabs
HeaderBar
&
rHeaderBar
=
pList
->
GetTheHeaderBar
();
//set hdl
rHeaderBar
.
SetSelectHdl
(
LINK
(
this
,
ChineseDictionaryDialog
,
HeaderBarClick
)
);
//set widgets to track the width of for columns
pList
->
init
(
xDictionary
,
m_pED_Term
,
m_pED_Mapping
,
m_pLB_Property
,
m_pFT_Term
,
m_pFT_Mapping
,
m_pFT_Property
);
}
ChineseDictionaryDialog
::
ChineseDictionaryDialog
(
Window
*
pParent
)
:
ModalDialog
(
pParent
,
TextConversionDlgs_ResId
(
DLG_CHINESEDICTIONARY
)
)
,
m_nTextConversionOptions
(
i18n
::
TextConversionOption
::
NONE
)
,
m_aRB_To_Simplified
(
this
,
TextConversionDlgs_ResId
(
RB_TO_SIMPLIFIED
)
)
,
m_aRB_To_Traditional
(
this
,
TextConversionDlgs_ResId
(
RB_TO_TRADITIONAL
)
)
,
m_aCB_Reverse
(
this
,
TextConversionDlgs_ResId
(
CB_REVERSE
)
)
,
m_aFT_Term
(
this
,
TextConversionDlgs_ResId
(
FT_TERM
)
)
,
m_aED_Term
(
this
,
TextConversionDlgs_ResId
(
ED_TERM
)
)
,
m_aFT_Mapping
(
this
,
TextConversionDlgs_ResId
(
FT_MAPPING
)
)
,
m_aED_Mapping
(
this
,
TextConversionDlgs_ResId
(
ED_MAPPING
)
)
,
m_aFT_Property
(
this
,
TextConversionDlgs_ResId
(
FT_PROPERTY
)
)
,
m_aLB_Property
(
this
,
TextConversionDlgs_ResId
(
LB_PROPERTY
)
)
,
m_pHeaderBar
(
0
)
,
m_aCT_DictionaryToSimplified
(
this
,
TextConversionDlgs_ResId
(
CT_MAPPINGLIST
)
)
,
m_aCT_DictionaryToTraditional
(
this
)
,
m_aPB_Add
(
this
,
TextConversionDlgs_ResId
(
PB_ADD
)
)
,
m_aPB_Modify
(
this
,
TextConversionDlgs_ResId
(
PB_MODIFY
)
)
,
m_aPB_Delete
(
this
,
TextConversionDlgs_ResId
(
PB_DELETE
)
)
,
m_aFL_Bottomline
(
this
,
TextConversionDlgs_ResId
(
FL_BOTTOMLINE
)
)
,
m_aBP_OK
(
this
,
TextConversionDlgs_ResId
(
PB_OK
)
)
,
m_aBP_Cancel
(
this
,
TextConversionDlgs_ResId
(
PB_CANCEL
)
)
,
m_aBP_Help
(
this
,
TextConversionDlgs_ResId
(
PB_HELP
)
)
,
m_xContext
(
0
)
{
FreeResource
();
m_aRB_To_Simplified
.
SetHelpId
(
HID_SVX_CHINESE_DICTIONARY_RB_CONVERSION_TO_SIMPLIFIED
);
m_aRB_To_Traditional
.
SetHelpId
(
HID_SVX_CHINESE_DICTIONARY_RB_CONVERSION_TO_TRADITIONAL
);
m_aCB_Reverse
.
SetHelpId
(
HID_SVX_CHINESE_DICTIONARY_CB_REVERSE
);
m_aCT_DictionaryToSimplified
.
SetHelpId
(
HID_SVX_CHINESE_DICTIONARY_LB_TO_SIMPLIFIED
);
m_aCT_DictionaryToTraditional
.
SetHelpId
(
HID_SVX_CHINESE_DICTIONARY_LB_TO_TRADITIONAL
);
:
ModalDialog
(
pParent
,
"ChineseDictionaryDialog"
,
"svx/ui/chinesedictionary.ui"
)
,
m_nTextConversionOptions
(
i18n
::
TextConversionOption
::
NONE
)
,
m_xContext
(
0
)
{
get
(
m_pRB_To_Simplified
,
"tradtosimple"
);
get
(
m_pRB_To_Traditional
,
"simpletotrad"
);
get
(
m_pCB_Reverse
,
"reverse"
);
get
(
m_pFT_Term
,
"termft"
);
get
(
m_pED_Term
,
"term"
);
get
(
m_pFT_Mapping
,
"mappingft"
);
get
(
m_pED_Mapping
,
"mapping"
);
get
(
m_pFT_Property
,
"propertyft"
);
get
(
m_pLB_Property
,
"property"
);
get
(
m_pPB_Add
,
"add"
);
get
(
m_pPB_Modify
,
"modify"
);
get
(
m_pPB_Delete
,
"delete"
);
get
(
mpToSimplifiedContainer
,
"tradtosimpleview"
);
mpToSimplifiedContainer
->
set_height_request
(
mpToSimplifiedContainer
->
GetTextHeight
()
*
8
);
m_pCT_DictionaryToSimplified
=
new
DictionaryList
(
*
mpToSimplifiedContainer
,
0
);
get
(
mpToTraditionalContainer
,
"simpletotradview"
);
mpToTraditionalContainer
->
set_height_request
(
mpToTraditionalContainer
->
GetTextHeight
()
*
8
);
m_pCT_DictionaryToTraditional
=
new
DictionaryList
(
*
mpToTraditionalContainer
,
0
);
SvtLinguConfig
aLngCfg
;
sal_Bool
bValue
=
sal_Bool
();
Any
aAny
(
aLngCfg
.
GetProperty
(
OUString
(
UPN_IS_REVERSE_MAPPING
)
)
);
if
(
aAny
>>=
bValue
)
m_
aCB_Reverse
.
Check
(
bValue
);
m_
pCB_Reverse
->
Check
(
bValue
);
m_
aLB_Property
.
SetDropDownLineCount
(
m_aLB_Property
.
GetEntryCount
()
);
m_
aLB_Property
.
SelectEntryPos
(
0
);
m_
pLB_Property
->
SetDropDownLineCount
(
m_pLB_Property
->
GetEntryCount
()
);
m_
pLB_Property
->
SelectEntryPos
(
0
);
Reference
<
linguistic2
::
XConversionDictionary
>
xDictionary_To_Simplified
(
0
);
Reference
<
linguistic2
::
XConversionDictionary
>
xDictionary_To_Traditional
(
0
);
...
...
@@ -533,79 +521,53 @@ ChineseDictionaryDialog::ChineseDictionaryDialog( Window* pParent )
xDictionary_To_Traditional
->
setActive
(
sal_True
);
}
catch
(
uno
::
Exception
&
)
catch
(
const
uno
::
Exception
&
)
{
}
}
}
}
//init HeaderBar and set tabs
{
OUString
aColumn1
(
OutputDevice
::
GetNonMnemonicString
(
m_aFT_Term
.
GetText
()
)
);
OUString
aColumn2
(
OutputDevice
::
GetNonMnemonicString
(
m_aFT_Mapping
.
GetText
()
)
);
OUString
aColumn3
(
OutputDevice
::
GetNonMnemonicString
(
m_aFT_Property
.
GetText
()
)
);
long
nWidth1
=
m_aED_Mapping
.
GetPosPixel
().
X
()
-
m_aED_Term
.
GetPosPixel
().
X
();
long
nWidth2
=
m_aLB_Property
.
GetPosPixel
().
X
()
-
m_aED_Mapping
.
GetPosPixel
().
X
();
long
nWidth3
=
m_aLB_Property
.
GetSizePixel
().
Width
();
m_pHeaderBar
=
m_aCT_DictionaryToSimplified
.
createHeaderBar
(
aColumn1
,
aColumn2
,
aColumn3
,
nWidth1
,
nWidth2
,
nWidth3
);
if
(
m_pHeaderBar
)
m_pHeaderBar
->
SetHelpId
(
HID_SVX_CHINESE_DICTIONARY_LB_HEADER
);
long
pTabs
[]
=
{
3
,
0
,
nWidth1
,
nWidth1
+
nWidth2
};
m_aCT_DictionaryToSimplified
.
SetTabs
(
&
pTabs
[
0
],
MAP_PIXEL
);
m_aCT_DictionaryToTraditional
.
SetTabs
(
&
pTabs
[
0
],
MAP_PIXEL
);
}
//init dictionary controls
m_aCT_DictionaryToTraditional
.
SetPosPixel
(
m_aCT_DictionaryToSimplified
.
GetPosPixel
()
);
m_aCT_DictionaryToTraditional
.
SetSizePixel
(
m_aCT_DictionaryToSimplified
.
GetSizePixel
()
);
initDictionaryControl
(
m_pCT_DictionaryToSimplified
,
xDictionary_To_Simplified
);
initDictionaryControl
(
m_pCT_DictionaryToTraditional
,
xDictionary_To_Traditional
);
m_aCT_DictionaryToSimplified
.
initDictionaryControl
(
xDictionary_To_Simplified
,
&
m_aLB_Property
);
m_aCT_DictionaryToTraditional
.
initDictionaryControl
(
xDictionary_To_Traditional
,
&
m_aLB_Property
);
//
updateAfterDirectionChange
();
//set hdl
if
(
m_pHeaderBar
)
m_pHeaderBar
->
SetSelectHdl
(
LINK
(
this
,
ChineseDictionaryDialog
,
HeaderBarClick
)
);
m_aED_Term
.
SetModifyHdl
(
LINK
(
this
,
ChineseDictionaryDialog
,
EditFieldsHdl
)
);
m_aED_Mapping
.
SetModifyHdl
(
LINK
(
this
,
ChineseDictionaryDialog
,
EditFieldsHdl
)
);
m_aLB_Property
.
SetSelectHdl
(
LINK
(
this
,
ChineseDictionaryDialog
,
EditFieldsHdl
)
);
m_pED_Term
->
SetModifyHdl
(
LINK
(
this
,
ChineseDictionaryDialog
,
EditFieldsHdl
)
);
m_pED_Mapping
->
SetModifyHdl
(
LINK
(
this
,
ChineseDictionaryDialog
,
EditFieldsHdl
)
);
m_pLB_Property
->
SetSelectHdl
(
LINK
(
this
,
ChineseDictionaryDialog
,
EditFieldsHdl
)
);
m_
aRB_To_Simplified
.
SetClickHdl
(
LINK
(
this
,
ChineseDictionaryDialog
,
DirectionHdl
)
);
m_
aRB_To_Traditional
.
SetClickHdl
(
LINK
(
this
,
ChineseDictionaryDialog
,
DirectionHdl
)
);
m_
pRB_To_Simplified
->
SetClickHdl
(
LINK
(
this
,
ChineseDictionaryDialog
,
DirectionHdl
)
);
m_
pRB_To_Traditional
->
SetClickHdl
(
LINK
(
this
,
ChineseDictionaryDialog
,
DirectionHdl
)
);
m_
aCT_DictionaryToSimplified
.
SetSelectHdl
(
LINK
(
this
,
ChineseDictionaryDialog
,
MappingSelectHdl
));
m_
aCT_DictionaryToTraditional
.
SetSelectHdl
(
LINK
(
this
,
ChineseDictionaryDialog
,
MappingSelectHdl
));
m_
pCT_DictionaryToSimplified
->
SetSelectHdl
(
LINK
(
this
,
ChineseDictionaryDialog
,
MappingSelectHdl
));
m_
pCT_DictionaryToTraditional
->
SetSelectHdl
(
LINK
(
this
,
ChineseDictionaryDialog
,
MappingSelectHdl
));
m_
aPB_Add
.
SetClickHdl
(
LINK
(
this
,
ChineseDictionaryDialog
,
AddHdl
)
);
m_
aPB_Modify
.
SetClickHdl
(
LINK
(
this
,
ChineseDictionaryDialog
,
ModifyHdl
)
);
m_
aPB_Delete
.
SetClickHdl
(
LINK
(
this
,
ChineseDictionaryDialog
,
DeleteHdl
)
);
m_
pPB_Add
->
SetClickHdl
(
LINK
(
this
,
ChineseDictionaryDialog
,
AddHdl
)
);
m_
pPB_Modify
->
SetClickHdl
(
LINK
(
this
,
ChineseDictionaryDialog
,
ModifyHdl
)
);
m_
pPB_Delete
->
SetClickHdl
(
LINK
(
this
,
ChineseDictionaryDialog
,
DeleteHdl
)
);
}
ChineseDictionaryDialog
::~
ChineseDictionaryDialog
()
{
m_xContext
=
0
;
delete
m_pHeaderBar
;
delete
m_pCT_DictionaryToSimplified
;
delete
m_pCT_DictionaryToTraditional
;
}
void
ChineseDictionaryDialog
::
setDirectionAndTextConversionOptions
(
bool
bDirectionToSimplified
,
sal_Int32
nTextConversionOptions
/*i18n::TextConversionOption*/
)
{
if
(
bDirectionToSimplified
==
bool
(
m_
aRB_To_Simplified
.
IsChecked
())
if
(
bDirectionToSimplified
==
bool
(
m_
pRB_To_Simplified
->
IsChecked
())
&&
nTextConversionOptions
==
m_nTextConversionOptions
)
return
;
m_nTextConversionOptions
=
nTextConversionOptions
;
if
(
bDirectionToSimplified
)
m_
aRB_To_Simplified
.
Check
();
m_
pRB_To_Simplified
->
Check
();
else
m_
aRB_To_Traditional
.
Check
();
m_
pRB_To_Traditional
->
Check
();
updateAfterDirectionChange
();
}
...
...
@@ -619,17 +581,17 @@ void ChineseDictionaryDialog::updateAfterDirectionChange()
{
Reference
<
linguistic2
::
XConversionDictionary
>
xDictionary
(
0
);
if
(
m_
aRB_To_Simplified
.
IsChecked
()
)
if
(
m_
pRB_To_Simplified
->
IsChecked
()
)
{
m
_aCT_DictionaryToSimplified
.
activate
(
m_pHeaderBar
);
m
_aCT_DictionaryToTraditional
.
Hide
();
xDictionary
=
m_
aCT_DictionaryToSimplified
.
m_xDictionary
;
m
pToTraditionalContainer
->
Hide
(
);
m
pToSimplifiedContainer
->
Show
();
xDictionary
=
m_
pCT_DictionaryToSimplified
->
m_xDictionary
;
}
else
{
m
_aCT_DictionaryToTraditional
.
activate
(
m_pHeaderBar
);
m
_aCT_DictionaryToSimplified
.
Hide
();
xDictionary
=
m_
aCT_DictionaryToTraditional
.
m_xDictionary
;
m
pToSimplifiedContainer
->
Hide
(
);
m
pToTraditionalContainer
->
Show
();
xDictionary
=
m_
pCT_DictionaryToTraditional
->
m_xDictionary
;
}
updateButtons
();
...
...
@@ -645,13 +607,13 @@ IMPL_LINK_NOARG(ChineseDictionaryDialog, MappingSelectHdl)
DictionaryEntry
*
pE
=
getActiveDictionary
().
getFirstSelectedEntry
();
if
(
pE
)
{
m_
aED_Term
.
SetText
(
pE
->
m_aTerm
);
m_
aED_Mapping
.
SetText
(
pE
->
m_aMapping
);
m_
pED_Term
->
SetText
(
pE
->
m_aTerm
);
m_
pED_Mapping
->
SetText
(
pE
->
m_aMapping
);
sal_Int16
nPos
=
pE
->
m_nConversionPropertyType
-
1
;
if
(
nPos
<
0
||
nPos
>=
m_
aLB_Property
.
GetEntryCount
()
)
if
(
nPos
<
0
||
nPos
>=
m_
pLB_Property
->
GetEntryCount
()
)
nPos
=
0
;
if
(
m_
aLB_Property
.
GetEntryCount
()
)
m_
aLB_Property
.
SelectEntryPos
(
nPos
);
if
(
m_
pLB_Property
->
GetEntryCount
()
)
m_
pLB_Property
->
SelectEntryPos
(
nPos
);
}
updateButtons
();
...
...
@@ -660,7 +622,7 @@ IMPL_LINK_NOARG(ChineseDictionaryDialog, MappingSelectHdl)
bool
ChineseDictionaryDialog
::
isEditFieldsHaveContent
()
const
{
return
!
m_
aED_Term
.
GetText
().
isEmpty
()
&&
!
m_aED_Mapping
.
GetText
().
isEmpty
();
return
!
m_
pED_Term
->
GetText
().
isEmpty
()
&&
!
m_pED_Mapping
->
GetText
().
isEmpty
();
}
bool
ChineseDictionaryDialog
::
isEditFieldsContentEqualsSelectedListContent
()
const
...
...
@@ -668,11 +630,11 @@ bool ChineseDictionaryDialog::isEditFieldsContentEqualsSelectedListContent() con
DictionaryEntry
*
pE
=
getActiveDictionary
().
getFirstSelectedEntry
();
if
(
pE
)
{
if
(
pE
->
m_aTerm
!=
OUString
(
m_
aED_Term
.
GetText
()
)
)
if
(
pE
->
m_aTerm
!=
OUString
(
m_
pED_Term
->
GetText
()
)
)
return
false
;
if
(
pE
->
m_aMapping
!=
OUString
(
m_
aED_Mapping
.
GetText
()
)
)
if
(
pE
->
m_aMapping
!=
OUString
(
m_
pED_Mapping
->
GetText
()
)
)
return
false
;
if
(
pE
->
m_nConversionPropertyType
!=
m_
aLB_Property
.
GetSelectEntryPos
()
+
1
)
if
(
pE
->
m_nConversionPropertyType
!=
m_
pLB_Property
->
GetSelectEntryPos
()
+
1
)
return
false
;
return
true
;
}
...
...
@@ -681,38 +643,38 @@ bool ChineseDictionaryDialog::isEditFieldsContentEqualsSelectedListContent() con
const
DictionaryList
&
ChineseDictionaryDialog
::
getActiveDictionary
()
const
{
if
(
m_
aRB_To_Traditional
.
IsChecked
()
)
return
m_a
CT_DictionaryToTraditional
;
return
m_a
CT_DictionaryToSimplified
;
if
(
m_
pRB_To_Traditional
->
IsChecked
()
)
return
*
m_p
CT_DictionaryToTraditional
;
return
*
m_p
CT_DictionaryToSimplified
;
}
DictionaryList
&
ChineseDictionaryDialog
::
getActiveDictionary
()
{
if
(
m_
aRB_To_Traditional
.
IsChecked
()
)
return
m_a
CT_DictionaryToTraditional
;
return
m_a
CT_DictionaryToSimplified
;
if
(
m_
pRB_To_Traditional
->
IsChecked
()
)
return
*
m_p
CT_DictionaryToTraditional
;
return
*
m_p
CT_DictionaryToSimplified
;
}
const
DictionaryList
&
ChineseDictionaryDialog
::
getReverseDictionary
()
const
{
if
(
m_
aRB_To_Traditional
.
IsChecked
()
)
return
m_a
CT_DictionaryToSimplified
;
return
m_a
CT_DictionaryToTraditional
;
if
(
m_
pRB_To_Traditional
->
IsChecked
()
)
return
*
m_p
CT_DictionaryToSimplified
;
return
*
m_p
CT_DictionaryToTraditional
;
}
DictionaryList
&
ChineseDictionaryDialog
::
getReverseDictionary
()
{
if
(
m_
aRB_To_Traditional
.
IsChecked
()
)
return
m_a
CT_DictionaryToSimplified
;
return
m_a
CT_DictionaryToTraditional
;
if
(
m_
pRB_To_Traditional
->
IsChecked
()
)
return
*
m_p
CT_DictionaryToSimplified
;
return
*
m_p
CT_DictionaryToTraditional
;
}
void
ChineseDictionaryDialog
::
updateButtons
()
{
bool
bAdd
=
isEditFieldsHaveContent
()
&&
!
getActiveDictionary
().
hasTerm
(
m_
aED_Term
.
GetText
()
);
m_
aPB_Add
.
Enable
(
bAdd
);
bool
bAdd
=
isEditFieldsHaveContent
()
&&
!
getActiveDictionary
().
hasTerm
(
m_
pED_Term
->
GetText
()
);
m_
pPB_Add
->
Enable
(
bAdd
);
m_
aPB_Delete
.
Enable
(
!
bAdd
&&
getActiveDictionary
().
GetSelectedRowCount
()
>
0
);
m_
pPB_Delete
->
Enable
(
!
bAdd
&&
getActiveDictionary
().
GetSelectedRowCount
()
>
0
);
// DictionaryEntry* pFirstSelectedEntry = getActiveDictionary().getFirstSelectedEntry();
...
...
@@ -720,11 +682,11 @@ void ChineseDictionaryDialog::updateButtons()
{
DictionaryEntry
*
pFirstSelectedEntry
=
getActiveDictionary
().
getFirstSelectedEntry
();
bModify
=
!
bAdd
&&
getActiveDictionary
().
GetSelectedRowCount
()
==
1
&&
pFirstSelectedEntry
&&
pFirstSelectedEntry
->
m_aTerm
.
equals
(
m_
aED_Term
.
GetText
()
);
&&
pFirstSelectedEntry
&&
pFirstSelectedEntry
->
m_aTerm
.
equals
(
m_
pED_Term
->
GetText
()
);
if
(
bModify
&&
isEditFieldsContentEqualsSelectedListContent
()
)
bModify
=
false
;
}
m_
aPB_Modify
.
Enable
(
bModify
);
m_
pPB_Modify
->
Enable
(
bModify
);
}
IMPL_LINK_NOARG
(
ChineseDictionaryDialog
,
AddHdl
)
...
...
@@ -732,14 +694,14 @@ IMPL_LINK_NOARG(ChineseDictionaryDialog, AddHdl)
if
(
!
isEditFieldsHaveContent
()
)
return
0
;
sal_Int16
nConversionPropertyType
=
m_
aLB_Property
.
GetSelectEntryPos
()
+
1
;
sal_Int16
nConversionPropertyType
=
m_
pLB_Property
->
GetSelectEntryPos
()
+
1
;
getActiveDictionary
().
addEntry
(
m_
aED_Term
.
GetText
(),
m_aED_Mapping
.
GetText
(),
nConversionPropertyType
);
getActiveDictionary
().
addEntry
(
m_
pED_Term
->
GetText
(),
m_pED_Mapping
->
GetText
(),
nConversionPropertyType
);
if
(
m_
aCB_Reverse
.
IsChecked
()
)
if
(
m_
pCB_Reverse
->
IsChecked
()
)
{
getReverseDictionary
().
deleteEntries
(
m_
aED_Mapping
.
GetText
()
);
getReverseDictionary
().
addEntry
(
m_
aED_Mapping
.
GetText
(),
m_aED_Term
.
GetText
(),
nConversionPropertyType
);
getReverseDictionary
().
deleteEntries
(
m_
pED_Mapping
->
GetText
()
);
getReverseDictionary
().
addEntry
(
m_
pED_Mapping
->
GetText
(),
m_pED_Term
->
GetText
(),
nConversionPropertyType
);
}
updateButtons
();
...
...
@@ -747,9 +709,9 @@ IMPL_LINK_NOARG(ChineseDictionaryDialog, AddHdl)
}
IMPL_LINK_NOARG
(
ChineseDictionaryDialog
,
ModifyHdl
)
{
OUString
aTerm
(
m_
aED_Term
.
GetText
()
);
OUString
aMapping
(
m_
aED_Mapping
.
GetText
()
);
sal_Int16
nConversionPropertyType
=
m_
aLB_Property
.
GetSelectEntryPos
()
+
1
;
OUString
aTerm
(
m_
pED_Term
->
GetText
()
);
OUString
aMapping
(
m_
pED_Mapping
->
GetText
()
);
sal_Int16
nConversionPropertyType
=
m_
pLB_Property
->
GetSelectEntryPos
()
+
1
;
DictionaryList
&
rActive
=
getActiveDictionary
();
DictionaryList
&
rReverse
=
getReverseDictionary
();
...
...
@@ -762,7 +724,7 @@ IMPL_LINK_NOARG(ChineseDictionaryDialog, ModifyHdl)
{
if
(
pE
->
m_aMapping
!=
aMapping
||
pE
->
m_nConversionPropertyType
!=
nConversionPropertyType
)
{
if
(
m_
aCB_Reverse
.
IsChecked
()
)
if
(
m_
pCB_Reverse
->
IsChecked
()
)
{
sal_uIntPtr
nPos
=
rReverse
.
deleteEntries
(
pE
->
m_aMapping
);
nPos
=
rReverse
.
deleteEntries
(
aMapping
);
...
...
@@ -797,7 +759,7 @@ IMPL_LINK_NOARG(ChineseDictionaryDialog, DeleteHdl)
{
aMapping
=
pEntry
->
m_aMapping
;
rActive
.
deleteEntryOnPos
(
nN
);
if
(
m_
aCB_Reverse
.
IsChecked
()
)
if
(
m_
pCB_Reverse
->
IsChecked
()
)
rReverse
.
deleteEntries
(
aMapping
);
}
break
;
...
...
@@ -815,8 +777,8 @@ short ChineseDictionaryDialog::Execute()
if
(
m_nTextConversionOptions
&
i18n
::
TextConversionOption
::
USE_CHARACTER_VARIANTS
)
nTextConversionOptions
=
nTextConversionOptions
^
i18n
::
TextConversionOption
::
USE_CHARACTER_VARIANTS
;
m_
aCT_DictionaryToSimplified
.
refillFromDictionary
(
nTextConversionOptions
);
m_
aCT_DictionaryToTraditional
.
refillFromDictionary
(
m_nTextConversionOptions
);
m_
pCT_DictionaryToSimplified
->
refillFromDictionary
(
nTextConversionOptions
);
m_
pCT_DictionaryToTraditional
->
refillFromDictionary
(
m_nTextConversionOptions
);
short
nRet
=
ModalDialog
::
Execute
();
...
...
@@ -825,41 +787,39 @@ short ChineseDictionaryDialog::Execute()
//save settings to configuration
SvtLinguConfig
aLngCfg
;
Any
aAny
;
aAny
<<=
sal_Bool
(
!!
m_
aCB_Reverse
.
IsChecked
()
);
aAny
<<=
sal_Bool
(
!!
m_
pCB_Reverse
->
IsChecked
()
);
aLngCfg
.
SetProperty
(
OUString
(
UPN_IS_REVERSE_MAPPING
),
aAny
);
m_
aCT_DictionaryToSimplified
.
save
();
m_
aCT_DictionaryToTraditional
.
save
();
m_
pCT_DictionaryToSimplified
->
save
();
m_
pCT_DictionaryToTraditional
->
save
();
}
m_
aCT_DictionaryToSimplified
.
deleteAll
();
m_
aCT_DictionaryToTraditional
.
deleteAll
();
m_
pCT_DictionaryToSimplified
->
deleteAll
();
m_
pCT_DictionaryToTraditional
->
deleteAll
();
return
nRet
;
}
IMPL_LINK
_NOARG
(
ChineseDictionaryDialog
,
HeaderBarClick
)
IMPL_LINK
(
ChineseDictionaryDialog
,
HeaderBarClick
,
HeaderBar
*
,
pHeaderBar
)
{
if
(
m_pHeaderBar
)
sal_uInt16
nId
=
pHeaderBar
->
GetCurItemId
();
HeaderBarItemBits
nBits
=
pHeaderBar
->
GetItemBits
(
nId
);
if
(
nBits
&
HIB_CLICKABLE
)
{
sal_uInt16
nId
=
m_pHeaderBar
->
GetCurItemId
();
HeaderBarItemBits
nBits
=
m_pHeaderBar
->
GetItemBits
(
nId
);
if
(
nBits
&
HIB_CLICKABLE
)
{
//set new arrow positions in headerbar
m_pHeaderBar
->
SetItemBits
(
getActiveDictionary
().
getSortColumn
()
+
1
,
HEADER_BAR_BITS
);
if
(
nBits
&
HIB_UPARROW
)
m_pHeaderBar
->
SetItemBits
(
nId
,
HEADER_BAR_BITS
|
HIB_DOWNARROW
);
else
m_pHeaderBar
->
SetItemBits
(
nId
,
HEADER_BAR_BITS
|
HIB_UPARROW
);
//set new arrow positions in headerbar
pHeaderBar
->
SetItemBits
(
getActiveDictionary
().
getSortColumn
()
+
1
,
HEADER_BAR_BITS
);
if
(
nBits
&
HIB_UPARROW
)
pHeaderBar
->
SetItemBits
(
nId
,
HEADER_BAR_BITS
|
HIB_DOWNARROW
);
else
pHeaderBar
->
SetItemBits
(
nId
,
HEADER_BAR_BITS
|
HIB_UPARROW
);
//sort lists
nBits
=
m_pHeaderBar
->
GetItemBits
(
nId
);
bool
bSortAtoZ
=
nBits
&
HIB_UPARROW
;
getActiveDictionary
().
sortByColumn
(
nId
-
1
,
bSortAtoZ
);
getReverseDictionary
().
sortByColumn
(
nId
-
1
,
bSortAtoZ
);
}
//sort lists
nBits
=
pHeaderBar
->
GetItemBits
(
nId
);
bool
bSortAtoZ
=
nBits
&
HIB_UPARROW
;
getActiveDictionary
().
sortByColumn
(
nId
-
1
,
bSortAtoZ
);
getReverseDictionary
().
sortByColumn
(
nId
-
1
,
bSortAtoZ
);
}
return
0
;
}
...
...
svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hrc
deleted
100644 → 0
Dosyayı görüntüle @
98c94047
/* -*- 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 .
*/
#ifndef _TEXTCONVERSIONDLGS_CHINESE_DICTIONARYDLG_HRC
#define _TEXTCONVERSIONDLGS_CHINESE_DICTIONARYDLG_HRC
#include "resids.hrc"
#include "buttongroup.hrc"
#include "chinese_direction_ids.hrc"
#define ED_TERM 1
#define ED_MAPPING 2
#define LB_PROPERTY 1
#define CB_REVERSE 1
#define FT_TERM 1
#define FT_MAPPING 2
#define FT_PROPERTY 3
#define CT_MAPPINGLIST 1
#define PB_ADD 1
#define PB_MODIFY 2
#define PB_DELETE 3
#define FL_BOTTOMLINE 1
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx
Dosyayı görüntüle @
3a9d2f27
...
...
@@ -29,8 +29,7 @@
#include <vcl/edit.hxx>
// header for class ListBox
#include <vcl/lstbox.hxx>
// header for class SvHeaderTabListBox
#include <svtools/svtabbx.hxx>
#include <svtools/simptabl.hxx>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/linguistic2/XConversionDictionary.hpp>
...
...
@@ -62,19 +61,15 @@ struct DictionaryEntry
bool
m_bNewEntry
;
};
class
DictionaryList
:
public
Sv
HeaderTabListBox
class
DictionaryList
:
public
Sv
SimpleTable
{
public
:
DictionaryList
(
Window
*
pParent
,
const
ResId
&
);
DictionaryList
(
Window
*
pParent
);
virtual
~
DictionaryList
();
DictionaryList
(
SvSimpleTableContainer
&
rParent
,
WinBits
nBits
);
HeaderBar
*
createHeaderBar
(
const
OUString
&
rColumn1
,
const
OUString
&
rColumn2
,
const
OUString
&
rColumn3
,
long
nWidth1
,
long
nWidth2
,
long
nWidth3
);
void
init
(
const
css
::
uno
::
Reference
<
css
::
linguistic2
::
XConversionDictionary
>&
xDictionary
,
Window
*
pED_Term
,
Window
*
pED_Mapping
,
ListBox
*
pLB_Property
,
Window
*
pFT_Term
,
Window
*
pFT_Mapping
,
Window
*
pFT_Property
);
void
initDictionaryControl
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
linguistic2
::
XConversionDictionary
>&
xDictionary
,
ListBox
*
pPropertyTypeNameListBox
);
void
activate
(
HeaderBar
*
pHeaderBar
);
void
deleteAll
();
void
refillFromDictionary
(
sal_Int32
nTextConversionOptions
/*i18n::TextConversionOption*/
);
void
save
();
...
...
@@ -92,8 +87,6 @@ public:
void
sortByColumn
(
sal_uInt16
nSortColumnIndex
,
bool
bSortAtoZ
);
sal_uInt16
getSortColumn
()
const
;
virtual
void
Resize
();
private
:
OUString
getPropertyTypeName
(
sal_Int16
nConversionPropertyType
/*linguistic2::ConversionPropertyType*/
)
const
;
OUString
makeTabString
(
const
DictionaryEntry
&
rEntry
)
const
;
...
...
@@ -102,13 +95,17 @@ private:
sal_Int32
ColumnCompare
(
SvTreeListEntry
*
pLeft
,
SvTreeListEntry
*
pRight
);
SvLBoxItem
*
getItemAtColumn
(
SvTreeListEntry
*
pEntry
,
sal_uInt16
nColumn
)
const
;
void
setColSizes
();
virtual
void
Resize
();
public
:
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
linguistic2
::
XConversionDictionary
>
m_xDictionary
;
css
::
uno
::
Reference
<
css
::
linguistic2
::
XConversionDictionary
>
m_xDictionary
;
private
:
HeaderBar
*
m_pHeaderBar
;
ListBox
*
m_pPropertyTypeNameListBox
;
Window
*
m_pED_Term
;
Window
*
m_pED_Mapping
;
ListBox
*
m_pLB_Property
;
std
::
vector
<
DictionaryEntry
*
>
m_aToBeDeleted
;
...
...
@@ -133,7 +130,10 @@ private:
DECL_LINK
(
AddHdl
,
void
*
);
DECL_LINK
(
ModifyHdl
,
void
*
);
DECL_LINK
(
DeleteHdl
,
void
*
);
DECL_LINK
(
HeaderBarClick
,
void
*
);
DECL_LINK
(
HeaderBarClick
,
HeaderBar
*
);
void
initDictionaryControl
(
DictionaryList
*
pList
,
const
css
::
uno
::
Reference
<
css
::
linguistic2
::
XConversionDictionary
>&
xDictionary
);
void
updateAfterDirectionChange
();
void
updateButtons
();
...
...
@@ -148,38 +148,32 @@ private:
const
DictionaryList
&
getReverseDictionary
()
const
;
private
:
sal_Int32
m_nTextConversionOptions
;
//i18n::TextConversionOption
RadioButton
m_aRB_To_Simplified
;
RadioButton
m_aRB_To_Traditional
;
CheckBox
m_aCB_Reverse
;
sal_Int32
m_nTextConversionOptions
;
//i18n::TextConversionOption
FixedText
m_aFT_Term
;
Edit
m_aED_Term
;
RadioButton
*
m_pRB_To_Simplified
;
RadioButton
*
m_pRB_To_Traditional
;
FixedText
m_aFT_Mapping
;
Edit
m_aED_Mapping
;
CheckBox
*
m_pCB_Reverse
;
FixedText
m_aFT_Property
;
ListBox
m_aLB_Property
;
FixedText
*
m_pFT_Term
;
Edit
*
m_pED_Term
;
HeaderBar
*
m_pHeaderBar
;
DictionaryList
m_aCT_DictionaryToSimplified
;
DictionaryList
m_aCT_DictionaryToTraditional
;
FixedText
*
m_pFT_Mapping
;
Edit
*
m_pED_Mapping
;
PushButton
m_aPB_Add
;
PushButton
m_aPB_Modify
;
PushButton
m_aPB_Delete
;
FixedText
*
m_pFT_Property
;
ListBox
*
m_pLB_Property
;
FixedLine
m_aFL_Bottomline
;
SvSimpleTableContainer
*
mpToSimplifiedContainer
;
DictionaryList
*
m_pCT_DictionaryToSimplified
;
SvSimpleTableContainer
*
mpToTraditionalContainer
;
DictionaryList
*
m_pCT_DictionaryToTraditional
;
OKButton
m_aBP_OK
;
CancelButton
m_aBP_Cancel
;
HelpButton
m_aBP_Help
;
PushButton
*
m_pPB_Add
;
PushButton
*
m_pPB_Modify
;
PushButton
*
m_pPB_Delete
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XComponentContext
>
m_xContext
;
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>
m_xContext
;
};
//.............................................................................
...
...
svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.src
deleted
100644 → 0
Dosyayı görüntüle @
98c94047
/* -*- 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 "chinese_dictionarydialog.hrc"
#include <svtools/controldims.hrc>
#define DIRECTION_RADIOBUTTONS( D_XPOS, D_YPOS, D_FULLWIDTH ) \
RadioButton RB_TO_SIMPLIFIED \
{ \
Pos = MAP_APPFONT( D_XPOS, D_YPOS ); \
Size = MAP_APPFONT ( D_FULLWIDTH, RSC_CD_RADIOBUTTON_HEIGHT ) ; \
Text [ en-US ] = "~Traditional Chinese to simplified Chinese"; \
}; \
RadioButton RB_TO_TRADITIONAL \
{ \
Pos = MAP_APPFONT( D_XPOS, D_YPOS + RSC_CD_RADIOBUTTON_HEIGHT+RSC_SP_CTRL_GROUP_Y ); \
Size = MAP_APPFONT ( D_FULLWIDTH, RSC_CD_RADIOBUTTON_HEIGHT ) ; \
Text [ en-US ] = "~Simplified Chinese to traditional Chinese"; \
};
//-----------------------------------------------------------------------------
//defines for positions and sizes:
#define FULL_WIDTH (245)
#define FULL_HEIGHT (165)
#define ROW_1 (RSC_SP_DLG_INNERBORDER_TOP)
#define ROW_2 (ROW_1+RSC_CD_RADIOBUTTON_HEIGHT+RSC_SP_CTRL_GROUP_Y)
#define ROW_3 (ROW_2+RSC_CD_RADIOBUTTON_HEIGHT+RSC_SP_CTRL_GROUP_Y)
#define ROW_4 (ROW_3+RSC_CD_CHECKBOX_HEIGHT+RSC_SP_CTRL_GROUP_Y)
#define ROW_5 (ROW_4+RSC_CD_FIXEDTEXT_HEIGHT+RSC_SP_CTRL_DESC_Y)
#define ROW_6 (ROW_5+RSC_CD_TEXTBOX_HEIGHT+RSC_SP_CTRL_DESC_Y)
#define ROW_5a (ROW_5+RSC_CD_PUSHBUTTON_HEIGHT+RSC_SP_CTRL_DESC_Y)
#define ROW_5b (ROW_5a+RSC_CD_PUSHBUTTON_HEIGHT+RSC_SP_CTRL_DESC_Y)
#define ROW_8 (FULL_HEIGHT-RSC_SP_DLG_INNERBORDER_BOTTOM-RSC_CD_PUSHBUTTON_HEIGHT)
#define ROW_7 (ROW_8-RSC_CD_FIXEDLINE_HEIGHT-2)
#define LIST_HEIGHT (ROW_7-RSC_SP_CTRL_Y-ROW_6)
#define COL_WIDTH 60
#define BUTTONCOL_WIDTH 40
#define COL_1 (RSC_SP_DLG_INNERBORDER_LEFT+RSC_SP_FLGR_SPACE_X)
#define COL_2 (COL_1+COL_WIDTH+1)
#define COL_3 (COL_2+COL_WIDTH+1)
#define COL_4 (FULL_WIDTH-RSC_SP_DLG_INNERBORDER_RIGHT-BUTTONCOL_WIDTH)
#define REST_COL_WIDTH (COL_4-COL_3-RSC_SP_CTRL_GROUP_X)
//-----------------------------------------------------------------------------
ModalDialog DLG_CHINESEDICTIONARY
{
HelpID = "svx:ModalDialog:DLG_CHINESEDICTIONARY";
//HelpId = ;
Size = MAP_APPFONT( FULL_WIDTH, FULL_HEIGHT );
OutputSize = TRUE;
Closeable = TRUE ;
Moveable = TRUE ;
SVLook = TRUE;
Text [ en-US ] = "Edit Dictionary";
DIRECTION_RADIOBUTTONS( COL_1, ROW_1, FULL_WIDTH - COL_1 - RSC_SP_DLG_INNERBORDER_RIGHT )
CheckBox CB_REVERSE
{
HelpID = "svx:CheckBox:DLG_CHINESEDICTIONARY:CB_REVERSE";
Pos = MAP_APPFONT ( COL_1, ROW_3 ) ;
Size = MAP_APPFONT ( FULL_WIDTH - COL_1 - RSC_SP_DLG_INNERBORDER_RIGHT , RSC_CD_CHECKBOX_HEIGHT ) ;
Text [ en-US ] = "Reverse mapping";
};
FixedText FT_TERM
{
Pos = MAP_APPFONT ( COL_1 , ROW_4 ) ;
Size = MAP_APPFONT ( COL_WIDTH, RSC_CD_FIXEDTEXT_HEIGHT ) ;
Text [ en-US ] = "Term";
};
Edit ED_TERM
{
HelpID = "svx:Edit:DLG_CHINESEDICTIONARY:ED_TERM";
Border = TRUE ;
Pos = MAP_APPFONT ( COL_1 , ROW_5 ) ;
Size = MAP_APPFONT ( COL_WIDTH , RSC_CD_TEXTBOX_HEIGHT ) ;
};
FixedText FT_MAPPING
{
Pos = MAP_APPFONT ( COL_2 , ROW_4 ) ;
Size = MAP_APPFONT ( COL_WIDTH, RSC_CD_FIXEDTEXT_HEIGHT ) ;
Text [ en-US ] = "Mapping";
};
Edit ED_MAPPING
{
HelpID = "svx:Edit:DLG_CHINESEDICTIONARY:ED_MAPPING";
Border = TRUE ;
Pos = MAP_APPFONT ( COL_2 , ROW_5 ) ;
Size = MAP_APPFONT ( COL_WIDTH , RSC_CD_TEXTBOX_HEIGHT ) ;
};
FixedText FT_PROPERTY
{
Pos = MAP_APPFONT ( COL_3 , ROW_4 ) ;
Size = MAP_APPFONT ( REST_COL_WIDTH, RSC_CD_FIXEDTEXT_HEIGHT ) ;
Text [ en-US ] = "Property";
};
ListBox LB_PROPERTY
{
HelpID = "svx:ListBox:DLG_CHINESEDICTIONARY:LB_PROPERTY";
Border = TRUE ;
Pos = MAP_APPFONT ( COL_3 , ROW_5 ) ;
Size = MAP_APPFONT ( REST_COL_WIDTH , RSC_CD_TEXTBOX_HEIGHT ) ;
DropDown = TRUE ;
stringlist [ en-US ] =
{
< "Other" ; Default ; > ;
< "Foreign" ; > ;
< "First name" ; > ;
< "Last name" ; > ;
< "Title" ; > ;
< "Status" ; > ;
< "Place name" ; > ;
< "Business" ; > ;
< "Adjective" ; > ;
< "Idiom" ; > ;
< "Abbreviation" ; > ;
< "Numerical" ; > ;
< "Noun" ; > ;
< "Verb" ; > ;
< "Brand name" ; > ;
};
};
Control CT_MAPPINGLIST
{
Pos = MAP_APPFONT ( COL_1, ROW_6 ) ;
Size = MAP_APPFONT ( COL_4 - COL_1 - RSC_SP_CTRL_GROUP_X, LIST_HEIGHT ) ;
TabStop = TRUE ;
};
PushButton PB_ADD
{
HelpID = "svx:PushButton:DLG_CHINESEDICTIONARY:PB_ADD";
Pos = MAP_APPFONT( COL_4, ROW_5 );
Size = MAP_APPFONT( BUTTONCOL_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT );
Text [ en-US ] = "~Add";
};
PushButton PB_MODIFY
{
HelpID = "svx:PushButton:DLG_CHINESEDICTIONARY:PB_MODIFY";
Pos = MAP_APPFONT( COL_4, ROW_5a );
Size = MAP_APPFONT( BUTTONCOL_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT );
Text [ en-US ] = "~Modify";
};
PushButton PB_DELETE
{
HelpID = "svx:PushButton:DLG_CHINESEDICTIONARY:PB_DELETE";
Pos = MAP_APPFONT( COL_4, ROW_5b );
Size = MAP_APPFONT( BUTTONCOL_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT );
Text [ en-US ] = "~Delete";
};
FixedLine FL_BOTTOMLINE
{
Pos = MAP_APPFONT ( 0 , ROW_7 ) ;
Size = MAP_APPFONT ( FULL_WIDTH, RSC_CD_FIXEDLINE_HEIGHT ) ;
};
BUTTONS_OK_CANCEL_HELP_ABREAST( FULL_WIDTH - RSC_SP_DLG_INNERBORDER_RIGHT, ROW_8 )
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx
Dosyayı görüntüle @
3a9d2f27
...
...
@@ -19,7 +19,6 @@
#include "chinese_translationdialog.hxx"
#include "resid.hxx"
#include "chinese_dictionarydialog.hxx"
#include <com/sun/star/i18n/TextConversionOption.hpp>
// header for define RET_OK
...
...
@@ -47,9 +46,6 @@ ChineseTranslationDialog::ChineseTranslationDialog( Window* pParent )
get
(
m_pRB_To_Traditional
,
"totraditional"
);
get
(
m_pCB_Translate_Commonterms
,
"commonterms"
);
m_pRB_To_Simplified
->
SetHelpId
(
HID_SVX_CHINESE_TRANSLATION_RB_CONVERSION_TO_SIMPLIFIED
);
m_pRB_To_Traditional
->
SetHelpId
(
HID_SVX_CHINESE_TRANSLATION_RB_CONVERSION_TO_TRADITIONAL
);
SvtLinguConfig
aLngCfg
;
sal_Bool
bValue
=
sal_Bool
();
Any
aAny
(
aLngCfg
.
GetProperty
(
OUString
(
UPN_IS_DIRECTION_TO_SIMPLIFIED
)
)
);
...
...
svx/source/unodialogs/textconversiondlgs/resid.cxx
deleted
100644 → 0
Dosyayı görüntüle @
98c94047
/* -*- 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 "resid.hxx"
#include <tools/resmgr.hxx>
//.............................................................................
namespace
textconversiondlgs
{
//.............................................................................
static
ResMgr
*
getTextConversionResMgr
()
{
static
ResMgr
*
pMgr
=
NULL
;
if
(
!
pMgr
)
pMgr
=
ResMgr
::
CreateResMgr
(
"textconversiondlgs"
);
return
pMgr
;
}
TextConversionDlgs_ResId
::
TextConversionDlgs_ResId
(
sal_uInt16
nId
)
:
ResId
(
nId
,
*
getTextConversionResMgr
()
)
{
}
//.............................................................................
}
//end namespace
//.............................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
svx/source/unodialogs/textconversiondlgs/resid.hxx
deleted
100644 → 0
Dosyayı görüntüle @
98c94047
/* -*- 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 .
*/
#ifndef INCLUDED_SVX_SOURCE_UNODIALOGS_TEXTCONVERSIONDLGS_RESID_HXX
#define INCLUDED_SVX_SOURCE_UNODIALOGS_TEXTCONVERSIONDLGS_RESID_HXX
#include <tools/resid.hxx>
//.............................................................................
namespace
textconversiondlgs
{
//.............................................................................
//-----------------------------------------------------------------------------
/**
*/
class
TextConversionDlgs_ResId
:
public
ResId
{
public
:
TextConversionDlgs_ResId
(
sal_uInt16
nId
);
};
//.............................................................................
}
//end namespace
//.............................................................................
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
svx/source/unodialogs/textconversiondlgs/resids.hrc
deleted
100644 → 0
Dosyayı görüntüle @
98c94047
/* -*- 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 .
*/
#ifndef _TEXTCONVERSIONDLGS_RESID_HRC
#define _TEXTCONVERSIONDLGS_RESID_HRC
#define DLG_CHINESEDICTIONARY 301
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
svx/uiconfig/ui/chinesedictionary.ui
0 → 100644
Dosyayı görüntüle @
3a9d2f27
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.1 -->
<interface>
<requires
lib=
"gtk+"
version=
"3.0"
/>
<!-- interface-requires LibreOffice 1.0 -->
<object
class=
"GtkDialog"
id=
"ChineseDictionaryDialog"
>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"border_width"
>
6
</property>
<property
name=
"title"
translatable=
"yes"
>
Edit Dictionary
</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>
</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=
"grid1"
>
<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"
>
12
</property>
<child>
<object
class=
"GtkGrid"
id=
"grid2"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"row_spacing"
>
6
</property>
<child>
<object
class=
"GtkRadioButton"
id=
"tradtosimple"
>
<property
name=
"label"
translatable=
"yes"
>
_Traditional Chinese to simplified Chinese
</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=
"active"
>
True
</property>
<property
name=
"draw_indicator"
>
True
</property>
<property
name=
"group"
>
simpletotrad
</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>
<child>
<object
class=
"GtkRadioButton"
id=
"simpletotrad"
>
<property
name=
"label"
translatable=
"yes"
>
_Simplified Chinese to traditional Chinese
</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>
<property
name=
"group"
>
tradtosimple
</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=
"reverse"
>
<property
name=
"label"
translatable=
"yes"
>
Reverse mapping
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
False
</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>
</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>
<child>
<object
class=
"GtkGrid"
id=
"grid5"
>
<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=
"GtkLabel"
id=
"termft"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"xalign"
>
0
</property>
<property
name=
"label"
translatable=
"yes"
>
Term
</property>
<property
name=
"use_underline"
>
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>
<child>
<object
class=
"GtkEntry"
id=
"term"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"hexpand"
>
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=
"GtkLabel"
id=
"mappingft"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"xalign"
>
0
</property>
<property
name=
"label"
translatable=
"yes"
>
Mapping
</property>
<property
name=
"use_underline"
>
True
</property>
</object>
<packing>
<property
name=
"left_attach"
>
1
</property>
<property
name=
"top_attach"
>
0
</property>
<property
name=
"width"
>
1
</property>
<property
name=
"height"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkEntry"
id=
"mapping"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"hexpand"
>
True
</property>
</object>
<packing>
<property
name=
"left_attach"
>
1
</property>
<property
name=
"top_attach"
>
1
</property>
<property
name=
"width"
>
1
</property>
<property
name=
"height"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"propertyft"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"xalign"
>
0
</property>
<property
name=
"label"
translatable=
"yes"
>
Property
</property>
<property
name=
"use_underline"
>
True
</property>
</object>
<packing>
<property
name=
"left_attach"
>
2
</property>
<property
name=
"top_attach"
>
0
</property>
<property
name=
"width"
>
1
</property>
<property
name=
"height"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkComboBoxText"
id=
"property"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<items>
<item
translatable=
"yes"
>
Other
</item>
<item
translatable=
"yes"
>
Foreign
</item>
<item
translatable=
"yes"
>
First name
</item>
<item
translatable=
"yes"
>
Last name
</item>
<item
translatable=
"yes"
>
Title
</item>
<item
translatable=
"yes"
>
Status
</item>
<item
translatable=
"yes"
>
Place name
</item>
<item
translatable=
"yes"
>
Business
</item>
<item
translatable=
"yes"
>
Adjective
</item>
<item
translatable=
"yes"
>
Idiom
</item>
<item
translatable=
"yes"
>
Abbreviation
</item>
<item
translatable=
"yes"
>
Numerical
</item>
<item
translatable=
"yes"
>
Noun
</item>
<item
translatable=
"yes"
>
Verb
</item>
<item
translatable=
"yes"
>
Brand name
</item>
</items>
</object>
<packing>
<property
name=
"left_attach"
>
2
</property>
<property
name=
"top_attach"
>
1
</property>
<property
name=
"width"
>
1
</property>
<property
name=
"height"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkButtonBox"
id=
"buttonbox1"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"orientation"
>
vertical
</property>
<property
name=
"spacing"
>
6
</property>
<property
name=
"layout_style"
>
start
</property>
<child>
<object
class=
"GtkButton"
id=
"add"
>
<property
name=
"label"
>
gtk-add
</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"
>
0
</property>
</packing>
</child>
<child>
<object
class=
"GtkButton"
id=
"modify"
>
<property
name=
"label"
translatable=
"yes"
>
_Modify
</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"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkButton"
id=
"delete"
>
<property
name=
"label"
>
gtk-delete
</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>
</object>
<packing>
<property
name=
"left_attach"
>
3
</property>
<property
name=
"top_attach"
>
1
</property>
<property
name=
"width"
>
1
</property>
<property
name=
"height"
>
2
</property>
</packing>
</child>
<child>
<object
class=
"GtkGrid"
id=
"grid3"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"vexpand"
>
True
</property>
<child>
<object
class=
"svtlo-SvSimpleTableContainer"
id=
"tradtosimpleview:border"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"hexpand"
>
True
</property>
<property
name=
"vexpand"
>
True
</property>
<child
internal-child=
"selection"
>
<object
class=
"GtkTreeSelection"
id=
"Simple Table Container-selection"
/>
</child>
</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>
<child>
<object
class=
"svtlo-SvSimpleTableContainer"
id=
"simpletotradview:border"
>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"no_show_all"
>
True
</property>
<property
name=
"hexpand"
>
True
</property>
<property
name=
"vexpand"
>
True
</property>
<child
internal-child=
"selection"
>
<object
class=
"GtkTreeSelection"
id=
"Simple Table Container-selection1"
/>
</child>
</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>
</object>
<packing>
<property
name=
"left_attach"
>
0
</property>
<property
name=
"top_attach"
>
2
</property>
<property
name=
"width"
>
3
</property>
<property
name=
"height"
>
1
</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</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>
</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-widgets>
</object>
<object
class=
"GtkSizeGroup"
id=
"sizegroup2"
>
<widgets>
<widget
name=
"termft"
/>
<widget
name=
"term"
/>
</widgets>
</object>
<object
class=
"GtkSizeGroup"
id=
"sizegroup3"
>
<widgets>
<widget
name=
"mappingft"
/>
<widget
name=
"mapping"
/>
</widgets>
</object>
<object
class=
"GtkSizeGroup"
id=
"sizegroup4"
>
<widgets>
<widget
name=
"propertyft"
/>
<widget
name=
"property"
/>
</widgets>
</object>
<object
class=
"GtkSizeGroup"
id=
"sizegroup1"
>
<property
name=
"mode"
>
both
</property>
<widgets>
<widget
name=
"tradtosimpleview:border"
/>
<widget
name=
"simpletotradview:border"
/>
</widgets>
</object>
</interface>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment