Kaydet (Commit) 686e55d9 authored tarafından Gabor Kelemen's avatar Gabor Kelemen Kaydeden (comit) Katarina Behrens

tdf#113959 Use svxlo-FrameDirectionListBox instead of ListBox

To reduce the number of translatable stings

Change-Id: I1aeea6767d3389dd24a5bf8b074817ef601502a7
Reviewed-on: https://gerrit.libreoffice.org/45823Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarKatarina Behrens <Katarina.Behrens@cib.de>
üst ccc4a306
......@@ -21,7 +21,7 @@
#include <editeng/svxenum.hxx>
#include <svx/dialogs.hrc>
#include <strings.hrc>
#include <svx/strings.hrc>
#include <bitmaps.hlst>
#include <svx/rotmodit.hxx>
......@@ -212,9 +212,10 @@ AlignmentTabPage::AlignmentTabPage( vcl::Window* pParent, const SfxItemSet& rCor
// Asian vertical mode
m_pCbAsianMode->Show( SvtCJKOptions().IsVerticalTextEnabled() );
m_pLbFrameDir->InsertEntryValue( CuiResId( RID_SVXSTR_FRAMEDIR_LTR ), SvxFrameDirection::Horizontal_LR_TB );
m_pLbFrameDir->InsertEntryValue( CuiResId( RID_SVXSTR_FRAMEDIR_RTL ), SvxFrameDirection::Horizontal_RL_TB );
m_pLbFrameDir->InsertEntryValue( CuiResId( RID_SVXSTR_FRAMEDIR_SUPER ), SvxFrameDirection::Environment );
std::locale loc(Translate::Create("svx"));
m_pLbFrameDir->InsertEntryValue( Translate::get( RID_SVXSTR_FRAMEDIR_LTR, loc ), SvxFrameDirection::Horizontal_LR_TB );
m_pLbFrameDir->InsertEntryValue( Translate::get( RID_SVXSTR_FRAMEDIR_RTL, loc ), SvxFrameDirection::Horizontal_RL_TB );
m_pLbFrameDir->InsertEntryValue( Translate::get( RID_SVXSTR_FRAMEDIR_SUPER, loc ), SvxFrameDirection::Environment );
// This page needs ExchangeSupport.
SetExchangeSupport();
......
......@@ -29,7 +29,7 @@
#include <svl/languageoptions.hxx>
#include <svl/cjkoptions.hxx>
#include <editeng/pgrditem.hxx>
#include <strings.hrc>
#include <svx/strings.hrc>
#include <paragrph.hxx>
#include <editeng/frmdiritem.hxx>
#include <editeng/lspcitem.hxx>
......@@ -1034,9 +1034,10 @@ SvxParaAlignTabPage::SvxParaAlignTabPage( vcl::Window* pParent, const SfxItemSet
m_pLastLineLB->SetSelectHdl( LINK( this, SvxParaAlignTabPage, LastLineHdl_Impl ) );
m_pTextDirectionLB->SetSelectHdl( LINK( this, SvxParaAlignTabPage, TextDirectionHdl_Impl ) );
m_pTextDirectionLB->InsertEntryValue( CuiResId( RID_SVXSTR_FRAMEDIR_SUPER ), SvxFrameDirection::Environment );
m_pTextDirectionLB->InsertEntryValue( CuiResId( RID_SVXSTR_FRAMEDIR_LTR ), SvxFrameDirection::Horizontal_LR_TB );
m_pTextDirectionLB->InsertEntryValue( CuiResId( RID_SVXSTR_FRAMEDIR_RTL ), SvxFrameDirection::Horizontal_RL_TB );
std::locale loc(Translate::Create("svx"));
m_pTextDirectionLB->InsertEntryValue( Translate::get( RID_SVXSTR_FRAMEDIR_SUPER, loc ), SvxFrameDirection::Environment );
m_pTextDirectionLB->InsertEntryValue( Translate::get( RID_SVXSTR_FRAMEDIR_LTR, loc ), SvxFrameDirection::Horizontal_LR_TB );
m_pTextDirectionLB->InsertEntryValue( Translate::get( RID_SVXSTR_FRAMEDIR_RTL, loc ), SvxFrameDirection::Horizontal_RL_TB );
setPreviewsToSamePlace(pParent, this);
}
......
......@@ -1628,6 +1628,10 @@
#define RID_SUBSETSTR_SYRIAC_SUPPLEMENT NC_("RID_SUBSETMAP", "Syriac Supplement")
#define RID_SUBSETSTR_ZANABAZAR_SQUARE NC_("RID_SUBSETMAP", "Zanabazar Square")
#define RID_SVXSTR_FRAMEDIR_LTR NC_("RID_SVXSTR_FRAMEDIR_LTR", "Left-to-right (LTR)")
#define RID_SVXSTR_FRAMEDIR_RTL NC_("RID_SVXSTR_FRAMEDIR_RTL", "Right-to-left (RTL)")
#define RID_SVXSTR_FRAMEDIR_SUPER NC_("RID_SVXSTR_FRAMEDIR_SUPER", "Use superordinate object settings")
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -38,6 +38,8 @@
#include <sfx2/htmlmode.hxx>
#include <strings.hrc>
#include <svx/strings.hrc>
#include <svx/dialmgr.hxx>
#include <docsh.hxx>
#include <wrtsh.hxx>
......@@ -91,6 +93,10 @@ SwFormatTablePage::SwFormatTablePage(vcl::Window* pParent, const SfxItemSet& rSe
get(m_pBottomMF, "belowmf");
get(m_pTextDirectionLB, "textdirection");
m_pTextDirectionLB->InsertEntryValue( SvxResId( RID_SVXSTR_FRAMEDIR_LTR ), SvxFrameDirection::Horizontal_LR_TB );
m_pTextDirectionLB->InsertEntryValue( SvxResId( RID_SVXSTR_FRAMEDIR_RTL ), SvxFrameDirection::Horizontal_RL_TB );
m_pTextDirectionLB->InsertEntryValue( SvxResId( RID_SVXSTR_FRAMEDIR_SUPER ), SvxFrameDirection::Environment );
SetExchangeSupport();
const SfxPoolItem* pItem;
......
......@@ -25,6 +25,7 @@
#include <actctrl.hxx>
#include <prcntfld.hxx>
#include <swtypes.hxx>
#include <svx/frmdirlbox.hxx>
class SwWrtShell;
class SwTableRep;
......@@ -58,7 +59,7 @@ class SwFormatTablePage : public SfxTabPage
VclPtr<FixedText> m_pBottomFT;
VclPtr<MetricField> m_pBottomMF;
VclPtr<ListBox> m_pTextDirectionLB;
VclPtr<svx::FrameDirectionListBox> m_pTextDirectionLB;
SwTableRep* pTableData;
SwTwips nSaveWidth;
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.1 -->
<interface domain="sw">
<!-- interface-requires gtk+ 3.0 -->
<requires lib="gtk+" version="3.0"/>
<!-- interface-requires LibreOffice 1.0 -->
<object class="GtkAdjustment" id="adjustment1">
<property name="upper">99.989999999999995</property>
<property name="step_increment">0.050000000000000003</property>
......@@ -125,7 +127,6 @@
<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>
<property name="digits">2</property>
</object>
......@@ -258,7 +259,6 @@
<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">adjustment2</property>
<property name="digits">2</property>
</object>
......@@ -274,7 +274,6 @@
<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">adjustment2</property>
<property name="digits">2</property>
</object>
......@@ -290,7 +289,6 @@
<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>
<property name="digits">2</property>
</object>
......@@ -306,7 +304,6 @@
<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>
<property name="digits">2</property>
</object>
......@@ -539,10 +536,9 @@
</packing>
</child>
<child>
<object class="GtkComboBox" id="textdirection">
<object class="svxlo-FrameDirectionListBox" id="textdirection">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="model">liststore1</property>
</object>
<packing>
<property name="left_attach">1</property>
......@@ -574,28 +570,6 @@
</packing>
</child>
</object>
<object class="GtkListStore" id="liststore1">
<columns>
<!-- column-name gchararray1 -->
<column type="gchararray"/>
<!-- column-name gint1 -->
<column type="gint"/>
</columns>
<data>
<row>
<col id="0" translatable="yes" context="formattablepage|liststore1">Left-to-right</col>
<col id="1">0</col>
</row>
<row>
<col id="0" translatable="yes" context="formattablepage|liststore1">Right-to-left</col>
<col id="1">1</col>
</row>
<row>
<col id="0" translatable="yes" context="formattablepage|liststore1">Use superordinate object settings</col>
<col id="1">4</col>
</row>
</data>
</object>
<object class="GtkSizeGroup" id="sizegroup1">
<property name="ignore_hidden">True</property>
<widgets>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment