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
4b21195e
Kaydet (Commit)
4b21195e
authored
Şub 11, 2013
tarafından
Olivier Hallot
Kaydeden (comit)
Caolán McNamara
Şub 14, 2013
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Widget for asian typography
Change-Id: I70535593c3e06caca48ae8bc8b9476ae09210df8
üst
d242d9e1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
107 additions
and
72 deletions
+107
-72
UI_cui.mk
cui/UI_cui.mk
+1
-0
paragrph.hxx
cui/source/inc/paragrph.hxx
+4
-6
paragrph.cxx
cui/source/tabpages/paragrph.cxx
+19
-21
paragrph.hrc
cui/source/tabpages/paragrph.hrc
+0
-8
paragrph.src
cui/source/tabpages/paragrph.src
+0
-37
asiantypography.ui
cui/uiconfig/ui/asiantypography.ui
+83
-0
No files found.
cui/UI_cui.mk
Dosyayı görüntüle @
4b21195e
...
...
@@ -10,6 +10,7 @@
$(eval $(call gb_UI_UI,cui))
$(eval $(call gb_UI_add_uifiles,cui,\
cui/uiconfig/ui/asiantypography \
cui/uiconfig/ui/backgroundpage \
cui/uiconfig/ui/borderpage \
cui/uiconfig/ui/charnamepage \
...
...
cui/source/inc/paragrph.hxx
Dosyayı görüntüle @
4b21195e
...
...
@@ -278,17 +278,15 @@ private:
//--------------------------------------------------------------------------
class
SvxAsianTabPage
:
public
SfxTabPage
{
FixedLine
aOptionsFL
;
TriStateBox
aForbiddenRulesCB
;
TriStateBox
aHangingPunctCB
;
TriStateBox
aScriptSpaceCB
;
CheckBox
*
m_pForbiddenRulesCB
;
CheckBox
*
m_pHangingPunctCB
;
CheckBox
*
m_pScriptSpaceCB
;
SvxAsianTabPage
(
Window
*
pParent
,
const
SfxItemSet
&
rSet
);
#ifdef _SVX_PARAGRPH_CXX
DECL_LINK
(
ClickHdl_Impl
,
TriState
Box
*
);
DECL_LINK
(
ClickHdl_Impl
,
Check
Box
*
);
#endif
public
:
~
SvxAsianTabPage
();
...
...
cui/source/tabpages/paragrph.cxx
Dosyayı görüntüle @
4b21195e
...
...
@@ -2221,19 +2221,17 @@ void SvxExtParagraphTabPage::PageCreated(SfxAllItemSet aSet)
}
SvxAsianTabPage
::
SvxAsianTabPage
(
Window
*
pParent
,
const
SfxItemSet
&
rSet
)
:
SfxTabPage
(
pParent
,
CUI_RES
(
RID_SVXPAGE_PARA_ASIAN
),
rSet
),
aOptionsFL
(
this
,
CUI_RES
(
FL_AS_OPTIONS
)),
aForbiddenRulesCB
(
this
,
CUI_RES
(
CB_AS_FORBIDDEN
)),
aHangingPunctCB
(
this
,
CUI_RES
(
CB_AS_HANG_PUNC
)),
aScriptSpaceCB
(
this
,
CUI_RES
(
CB_AS_SCRIPT_SPACE
))
//,
SfxTabPage
(
pParent
,
"AsianTypography"
,
"cui/ui/asiantypography.ui"
,
rSet
)
{
FreeResource
();
get
(
m_pForbiddenRulesCB
,
"checkForbidList"
);
get
(
m_pHangingPunctCB
,
"checkHangPunct"
);
get
(
m_pScriptSpaceCB
,
"checkApplySpacing"
);
Link
aLink
=
LINK
(
this
,
SvxAsianTabPage
,
ClickHdl_Impl
);
aHangingPunctCB
.
SetClickHdl
(
aLink
);
aScriptSpaceCB
.
SetClickHdl
(
aLink
);
aForbiddenRulesCB
.
SetClickHdl
(
aLink
);
m_pHangingPunctCB
->
SetClickHdl
(
aLink
);
m_pScriptSpaceCB
->
SetClickHdl
(
aLink
);
m_pForbiddenRulesCB
->
SetClickHdl
(
aLink
);
}
...
...
@@ -2255,34 +2253,34 @@ sal_uInt16* SvxAsianTabPage::GetRanges()
};
return
pRanges
;
}
//FIXME: This crash in Calc, but works in Writer/Draw/Impress
sal_Bool
SvxAsianTabPage
::
FillItemSet
(
SfxItemSet
&
rSet
)
{
sal_Bool
bRet
=
sal_False
;
SfxItemPool
*
pPool
=
rSet
.
GetPool
();
if
(
aScriptSpaceCB
.
IsChecked
()
!=
aScriptSpaceCB
.
GetSavedValue
())
if
(
m_pScriptSpaceCB
->
IsChecked
()
!=
m_pScriptSpaceCB
->
GetSavedValue
())
{
SfxBoolItem
*
pNewItem
=
(
SfxBoolItem
*
)
rSet
.
Get
(
pPool
->
GetWhich
(
SID_ATTR_PARA_SCRIPTSPACE
)).
Clone
();
pNewItem
->
SetValue
(
aScriptSpaceCB
.
IsChecked
());
pNewItem
->
SetValue
(
m_pScriptSpaceCB
->
IsChecked
());
rSet
.
Put
(
*
pNewItem
);
delete
pNewItem
;
bRet
=
sal_True
;
}
if
(
aHangingPunctCB
.
IsChecked
()
!=
aHangingPunctCB
.
GetSavedValue
())
if
(
m_pHangingPunctCB
->
IsChecked
()
!=
m_pHangingPunctCB
->
GetSavedValue
())
{
SfxBoolItem
*
pNewItem
=
(
SfxBoolItem
*
)
rSet
.
Get
(
pPool
->
GetWhich
(
SID_ATTR_PARA_HANGPUNCTUATION
)).
Clone
();
pNewItem
->
SetValue
(
aHangingPunctCB
.
IsChecked
());
pNewItem
->
SetValue
(
m_pHangingPunctCB
->
IsChecked
());
rSet
.
Put
(
*
pNewItem
);
delete
pNewItem
;
bRet
=
sal_True
;
}
if
(
aForbiddenRulesCB
.
IsChecked
()
!=
aForbiddenRulesCB
.
GetSavedValue
())
if
(
m_pForbiddenRulesCB
->
IsChecked
()
!=
m_pForbiddenRulesCB
->
GetSavedValue
())
{
SfxBoolItem
*
pNewItem
=
(
SfxBoolItem
*
)
rSet
.
Get
(
pPool
->
GetWhich
(
SID_ATTR_PARA_FORBIDDEN_RULES
)).
Clone
();
pNewItem
->
SetValue
(
aForbiddenRulesCB
.
IsChecked
());
pNewItem
->
SetValue
(
m_pForbiddenRulesCB
->
IsChecked
());
rSet
.
Put
(
*
pNewItem
);
delete
pNewItem
;
bRet
=
sal_True
;
...
...
@@ -2290,7 +2288,7 @@ sal_Bool SvxAsianTabPage::FillItemSet( SfxItemSet& rSet )
return
bRet
;
}
static
void
lcl_SetBox
(
const
SfxItemSet
&
rSet
,
sal_uInt16
nSlotId
,
TriState
Box
&
rBox
)
static
void
lcl_SetBox
(
const
SfxItemSet
&
rSet
,
sal_uInt16
nSlotId
,
Check
Box
&
rBox
)
{
sal_uInt16
_nWhich
=
rSet
.
GetPool
()
->
GetWhich
(
nSlotId
);
SfxItemState
eState
=
rSet
.
GetItemState
(
_nWhich
,
sal_True
);
...
...
@@ -2309,14 +2307,14 @@ static void lcl_SetBox(const SfxItemSet& rSet, sal_uInt16 nSlotId, TriStateBox&
void
SvxAsianTabPage
::
Reset
(
const
SfxItemSet
&
rSet
)
{
lcl_SetBox
(
rSet
,
SID_ATTR_PARA_FORBIDDEN_RULES
,
a
ForbiddenRulesCB
);
lcl_SetBox
(
rSet
,
SID_ATTR_PARA_HANGPUNCTUATION
,
a
HangingPunctCB
);
lcl_SetBox
(
rSet
,
SID_ATTR_PARA_FORBIDDEN_RULES
,
*
m_p
ForbiddenRulesCB
);
lcl_SetBox
(
rSet
,
SID_ATTR_PARA_HANGPUNCTUATION
,
*
m_p
HangingPunctCB
);
//character distance not yet available
lcl_SetBox
(
rSet
,
SID_ATTR_PARA_SCRIPTSPACE
,
a
ScriptSpaceCB
);
lcl_SetBox
(
rSet
,
SID_ATTR_PARA_SCRIPTSPACE
,
*
m_p
ScriptSpaceCB
);
}
IMPL_LINK
(
SvxAsianTabPage
,
ClickHdl_Impl
,
TriState
Box
*
,
pBox
)
IMPL_LINK
(
SvxAsianTabPage
,
ClickHdl_Impl
,
Check
Box
*
,
pBox
)
{
pBox
->
EnableTriState
(
sal_False
);
return
0
;
...
...
cui/source/tabpages/paragrph.hrc
Dosyayı görüntüle @
4b21195e
...
...
@@ -100,14 +100,6 @@
#define LB_TEXTDIRECTION 92
//asian typography
#define FL_AS_OPTIONS 1
#define CB_AS_HANG_PUNC 2
#define CB_AS_FORBIDDEN 4
#define CB_AS_SCRIPT_SPACE 7
#define STR_EXAMPLE 5010
#define STR_PAGE_STYLE 5011
#endif
...
...
cui/source/tabpages/paragrph.src
Dosyayı görüntüle @
4b21195e
...
...
@@ -692,43 +692,6 @@ TabPage RID_SVXPAGE_EXT_PARAGRAPH
Left = TRUE ;
};
};
// Asian typography
TabPage RID_SVXPAGE_PARA_ASIAN
{
HelpId = HID_SVXPAGE_PARA_ASIAN ;
Hide = TRUE ;
Text [ en-US ] = "Asian Typography";
Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
FixedLine FL_AS_OPTIONS
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 248 , 8 ) ;
Text [ en-US ] = "Line change";
};
TriStateBox CB_AS_FORBIDDEN
{
HelpID = "cui:TriStateBox:RID_SVXPAGE_PARA_ASIAN:CB_AS_FORBIDDEN";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 242 , 10 ) ;
Text [ en-US ] = "Apply list of forbidden characters to the beginning and end of lines";
};
TriStateBox CB_AS_HANG_PUNC
{
HelpID = "cui:TriStateBox:RID_SVXPAGE_PARA_ASIAN:CB_AS_HANG_PUNC";
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 242 , 10 ) ;
Text [ en-US ] = "Allow hanging punctuation";
};
TriStateBox CB_AS_SCRIPT_SPACE
{
HelpID = "cui:TriStateBox:RID_SVXPAGE_PARA_ASIAN:CB_AS_SCRIPT_SPACE";
Pos = MAP_APPFONT ( 12 , 42 ) ;
Size = MAP_APPFONT ( 242 , 10 ) ;
Text [ en-US ] = "Apply spacing between Asian, Latin and Complex text";
};
};
String STR_EXAMPLE
{
Text [ en-US ] = "Example" ;
...
...
cui/uiconfig/ui/asiantypography.ui
0 → 100644
Dosyayı görüntüle @
4b21195e
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object
class=
"GtkFrame"
id=
"AsianTypography"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"border_width"
>
6
</property>
<property
name=
"label_xalign"
>
0
</property>
<property
name=
"shadow_type"
>
none
</property>
<child>
<object
class=
"GtkAlignment"
id=
"alignment1"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"left_padding"
>
12
</property>
<child>
<object
class=
"GtkBox"
id=
"box1"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"orientation"
>
vertical
</property>
<child>
<object
class=
"GtkCheckButton"
id=
"checkForbidList"
>
<property
name=
"label"
translatable=
"yes"
>
Apply list of forbidden characters to the beginning and end of lines
</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=
"inconsistent"
>
True
</property>
<property
name=
"draw_indicator"
>
True
</property>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
0
</property>
</packing>
</child>
<child>
<object
class=
"GtkCheckButton"
id=
"checkHangPunct"
>
<property
name=
"label"
translatable=
"yes"
>
Allow hanging punctuation
</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=
"inconsistent"
>
True
</property>
<property
name=
"draw_indicator"
>
True
</property>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkCheckButton"
id=
"checkApplySpacing"
>
<property
name=
"label"
translatable=
"yes"
>
Apply spacing between Asian, Latin and Complex text
</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=
"inconsistent"
>
True
</property>
<property
name=
"draw_indicator"
>
True
</property>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
2
</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child
type=
"label"
>
<object
class=
"GtkLabel"
id=
"labelLineChange"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Line change
</property>
<attributes>
<attribute
name=
"weight"
value=
"bold"
/>
</attributes>
</object>
</child>
</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