View | Details | Raw Unified | Return to issue 23518
Collapse All | Expand All

(-)inc/globlmn.hrc (+34 lines)
Lines 561-566 Link Here
561
	Text[ hindi ] = "परिमाण";	\
561
	Text[ hindi ] = "परिमाण";	\
562
	Text[ slovak ] = "Veľkosť";
562
	Text[ slovak ] = "Veľkosť";
563
563
564
#define ITEM_FORMAT_ATTR_CHAR_LANGUAGE \
565
    Identifier = SID_ATTR_CHAR_LANGUAGE ; \
566
	Command = ".uno:Language" ; \
567
    HelpID = SID_ATTR_CHAR_LANGUAGE ; \
568
    Text = "Language" ; \
569
    Text [ ENGLISH ] = "~Language" ; \
570
    Text [ norwegian ] = "~Language" ; \
571
    Text [ italian ] = "~Lingua" ; \
572
    Text [ portuguese_brazilian ] = "Idio~ma" ; \
573
    Text [ portuguese ] = "~Língua" ; \
574
    Text [ finnish ] = "~Kieli" ; \
575
    Text [ danish ] = "Sprog" ; \
576
    Text [ french ] = "~Langue" ; \
577
    Text [ swedish ] = "~Språk" ; \
578
    Text [ dutch ] = "Taa~l" ; \
579
    Text [ spanish ] = "~Idioma" ; \
580
    Text [ english_us ] = "~Language" ; \
581
    Text[ chinese_simplified ] = "语言(~L)" ; \
582
    Text[ russian ] = "ßçûê" ; \
583
    Text[ polish ] = "~Jêzyk" ; \
584
    Text[ japanese ] = "言語(~L)" ; \
585
    Text[ chinese_traditional ] = "語言(~L)" ; \
586
    Text[ arabic ] = "ÇááÛÉ" ; \
587
    Text[ greek ] = "Ãëþóóá" ; \
588
    Text[ korean ] = "언어(~L)" ; \
589
    Text[ turkish ] = "~Dil" ; \
590
    Text[ language_user1 ] = " " ; \
591
    Text[ catalan ] = "~Idioma" ; \
592
    Text[ thai ] = "~ภาษา" ; \
593
    Text[ czech ] = "Jazyk" ; \
594
    Text[ hebrew ] = "‮שפה‬" ; \
595
    Text[ hindi ] = "~भाषा" ; \
596
    Text[ slovak ] = "~Jazyk" ;
597
564
#define ITEM_FORMAT_ATTR_CHAR_WEIGHT \
598
#define ITEM_FORMAT_ATTR_CHAR_WEIGHT \
565
    Identifier = SID_ATTR_CHAR_WEIGHT ; \
599
    Identifier = SID_ATTR_CHAR_WEIGHT ; \
566
	Command = ".uno:Bold" ; \
600
	Command = ".uno:Bold" ; \
(-)inc/tbcontrl.hxx (+19 lines)
Lines 206-211 Link Here
206
class SvxBoxInfoItem;
206
class SvxBoxInfoItem;
207
class SvxFontItem;
207
class SvxFontItem;
208
class SvxFontHeightItem;
208
class SvxFontHeightItem;
209
class SvxLanguageItem;
209
class SfxStyleControllerItem_Impl;
210
class SfxStyleControllerItem_Impl;
210
class SfxStyleSheetBasePool;
211
class SfxStyleSheetBasePool;
211
class SfxTemplateItem;
212
class SfxTemplateItem;
Lines 308-313 Link Here
308
};
309
};
309
310
310
#endif // ITEMID_FONTHEIGHT
311
#endif // ITEMID_FONTHEIGHT
312
313
//========================================================================
314
// class SvxLanguageToolBoxControl ---------------------------------------
315
//========================================================================
316
#ifdef ITEMID_LANGUAGE
317
318
class SvxLanguageToolBoxControl : public SfxToolBoxControl
319
{
320
public:
321
	SFX_DECL_TOOLBOX_CONTROL();
322
	SvxLanguageToolBoxControl( USHORT nId, ToolBox& rTbx, SfxBindings& rBindings );
323
324
	virtual void		StateChanged		( USHORT nSID, SfxItemState eState,
325
										  const SfxPoolItem* pState );
326
	virtual Window*	CreateItemWindow	( Window *pParent );
327
};
328
329
#endif // ITEMID_LANGUAGE
311
330
312
//========================================================================
331
//========================================================================
313
// class SvxFontColorToolBoxControl --------------------------------------
332
// class SvxFontColorToolBoxControl --------------------------------------
(-)sdi/svx.sdi (-2 / +2 lines)
Lines 6092-6099 Link Here
6092
	/* config: */
6092
	/* config: */
6093
	AccelConfig = FALSE,
6093
	AccelConfig = FALSE,
6094
	MenuConfig = FALSE,
6094
	MenuConfig = FALSE,
6095
	StatusBarConfig = FALSE,
6095
	StatusBarConfig = TRUE,
6096
	ToolBoxConfig = FALSE,
6096
	ToolBoxConfig = TRUE,
6097
	GroupId = GID_FORMAT;
6097
	GroupId = GID_FORMAT;
6098
]
6098
]
6099
6099
(-)sdi/svxslots.src (+32 lines)
Lines 634-639 Link Here
634
	SlotName[ hindi ] = "फ़ॉन्ट का परिमाण";
634
	SlotName[ hindi ] = "फ़ॉन्ट का परिमाण";
635
	SlotName[ slovak ] = "Veľkosť písma";
635
	SlotName[ slovak ] = "Veľkosť písma";
636
};
636
};
637
SfxSlotInfo SID_ATTR_CHAR_LANGUAGE
638
{
639
	SlotName = "Language";
640
 	SlotName[ ENGLISH ] = "~Language" ;
641
	SlotName[ norwegian ] = "~Language" ;
642
	SlotName[ italian ] = "~Lingua" ;
643
	SlotName[ portuguese_brazilian ] = "Idio~ma" ;
644
	SlotName[ portuguese ] = "~Língua" ;
645
	SlotName[ finnish ] = "~Kieli" ;
646
	SlotName[ danish ] = "Sprog" ;
647
	SlotName[ french ] = "~Langue" ;
648
	SlotName[ swedish ] = "~Språk" ;
649
	SlotName[ dutch ] = "Taa~l" ;
650
	SlotName[ spanish ] = "~Idioma" ;
651
	SlotName[ english_us ] = "~Language" ;
652
	SlotName[ chinese_simplified ] = "语言(~L)";
653
	SlotName[ russian ] = "ßçûê";
654
	SlotName[ polish ] = "~Jêzyk";
655
	SlotName[ japanese ] = "言語(~L)";
656
	SlotName[ chinese_traditional ] = "語言(~L)";
657
	SlotName[ arabic ] = "ÇááÛÉ";
658
	SlotName[ greek ] = "Ãëþóóá";
659
	SlotName[ korean ] = "언어(~L)";
660
	SlotName[ turkish ] = "~Dil";
661
	SlotName[ language_user1 ] = " ";
662
	SlotName[ catalan ] = "~Idioma";
663
	SlotName[ thai ] = "~ภาษา";
664
	SlotName[ czech ] = "Jazyk";
665
	SlotName[ hebrew ] = "‮שפה‬";
666
	SlotName[ hindi ] = "~भाषा";
667
	SlotName[ slovak ] = "~Jazyk";
668
};
637
SfxSlotInfo SID_ATTR_CHAR_POSTURE
669
SfxSlotInfo SID_ATTR_CHAR_POSTURE
638
{
670
{
639
	SlotName = "Kursiv";
671
	SlotName = "Kursiv";
(-)source/tbxctrls/tbcontrl.cxx (+219 lines)
Lines 127-132 Link Here
127
#define ITEMID_FONTLIST		SID_ATTR_CHAR_FONTLIST
127
#define ITEMID_FONTLIST		SID_ATTR_CHAR_FONTLIST
128
#define ITEMID_FONT			SID_ATTR_CHAR_FONT
128
#define ITEMID_FONT			SID_ATTR_CHAR_FONT
129
#define ITEMID_FONTHEIGHT	SID_ATTR_CHAR_FONTHEIGHT
129
#define ITEMID_FONTHEIGHT	SID_ATTR_CHAR_FONTHEIGHT
130
#define ITEMID_LANGUAGE 		SID_ATTR_CHAR_LANGUAGE
130
#define ITEMID_COLOR		SID_ATTR_CHAR_COLOR
131
#define ITEMID_COLOR		SID_ATTR_CHAR_COLOR
131
#define ITEMID_BRUSH		SID_ATTR_BRUSH
132
#define ITEMID_BRUSH		SID_ATTR_BRUSH
132
#define ITEMID_BOX			SID_ATTR_BORDER_OUTER
133
#define ITEMID_BOX			SID_ATTR_BORDER_OUTER
Lines 137-142 Link Here
137
#include "xtable.hxx"
138
#include "xtable.hxx"
138
#include "fontitem.hxx"
139
#include "fontitem.hxx"
139
#include "fhgtitem.hxx"
140
#include "fhgtitem.hxx"
141
#include "langitem.hxx"
140
#include "brshitem.hxx"
142
#include "brshitem.hxx"
141
#include "boxitem.hxx"
143
#include "boxitem.hxx"
142
#include "colritem.hxx"
144
#include "colritem.hxx"
Lines 146-151 Link Here
146
#include "tbcontrl.hxx"
148
#include "tbcontrl.hxx"
147
#include "dlgutil.hxx"
149
#include "dlgutil.hxx"
148
#include "dialmgr.hxx"
150
#include "dialmgr.hxx"
151
#include "langbox.hxx"
149
152
150
// ------------------------------------------------------------------------
153
// ------------------------------------------------------------------------
151
154
Lines 166-171 Link Here
166
SFX_IMPL_TOOLBOX_CONTROL( SvxStyleToolBoxControl, SfxTemplateItem );
169
SFX_IMPL_TOOLBOX_CONTROL( SvxStyleToolBoxControl, SfxTemplateItem );
167
SFX_IMPL_TOOLBOX_CONTROL( SvxFontNameToolBoxControl, SvxFontItem );
170
SFX_IMPL_TOOLBOX_CONTROL( SvxFontNameToolBoxControl, SvxFontItem );
168
SFX_IMPL_TOOLBOX_CONTROL( SvxFontHeightToolBoxControl, SvxFontHeightItem );
171
SFX_IMPL_TOOLBOX_CONTROL( SvxFontHeightToolBoxControl, SvxFontHeightItem );
172
SFX_IMPL_TOOLBOX_CONTROL( SvxLanguageToolBoxControl, SvxLanguageItem );
169
SFX_IMPL_TOOLBOX_CONTROL( SvxFontColorToolBoxControl, SvxColorItem );
173
SFX_IMPL_TOOLBOX_CONTROL( SvxFontColorToolBoxControl, SvxColorItem );
170
SFX_IMPL_TOOLBOX_CONTROL( SvxFontColorExtToolBoxControl, SvxColorItem );
174
SFX_IMPL_TOOLBOX_CONTROL( SvxFontColorExtToolBoxControl, SvxColorItem );
171
SFX_IMPL_TOOLBOX_CONTROL( SvxColorToolBoxControl, SvxColorItem );
175
SFX_IMPL_TOOLBOX_CONTROL( SvxColorToolBoxControl, SvxColorItem );
Lines 282-287 Link Here
282
};
286
};
283
287
284
//========================================================================
288
//========================================================================
289
// class SvxLanguageBox_Impl ---------------------------------------------
290
//========================================================================
291
292
class SvxLanguageToolBoxControl;
293
294
class SvxLanguageBox_Impl : public SvxLanguageBox
295
{
296
private:
297
	SvxLanguageToolBoxControl*	pCtrl;
298
	BOOL				bRelease;
299
	SfxBindings&			rBindings;
300
        Size                            aControlSize;
301
302
	void				ReleaseFocus_Impl();
303
304
protected:
305
	virtual void		Select();
306
	virtual void		DataChanged( const DataChangedEvent& rDCEvt );
307
308
public:
309
					SvxLanguageBox_Impl( Window* pParent,SvxLanguageToolBoxControl& rCtrl, SfxBindings& rBind );
310
311
	void				StateChanged_Impl( SfxItemState eState,const SfxPoolItem* pState );
312
	void				Update( const SvxLanguageItem& rLanguageItem );
313
314
	virtual long		Notify( NotifyEvent& rNEvt );
315
};
316
317
//========================================================================
285
// class SvxColorWindow_Impl --------------------------------------------------
318
// class SvxColorWindow_Impl --------------------------------------------------
286
//========================================================================
319
//========================================================================
287
320
Lines 1002-1007 Link Here
1002
}
1035
}
1003
1036
1004
//========================================================================
1037
//========================================================================
1038
// class SvxLanguageBox_Impl --------------------------------------------------
1039
//========================================================================
1040
1041
SvxLanguageBox_Impl::SvxLanguageBox_Impl( Window* pParent, SvxLanguageToolBoxControl &rCtrl, SfxBindings& rBind ) :
1042
	SvxLanguageBox( pParent, WinBits(WB_DROPDOWN) ),
1043
	pCtrl		( &rCtrl ),
1044
	bRelease		( TRUE ),
1045
	rBindings		( rBind )
1046
{
1047
        SvxLanguageBox::SetLanguageList( LANG_LIST_ALL, TRUE, FALSE, TRUE );
1048
1049
        aControlSize = CalcMinimumSize();
1050
        aControlSize.setWidth( aControlSize.getWidth() * 0.8 );
1051
        SetSizePixel( aControlSize );  
1052
	SvxLanguageBox::SetDropDownLineCount( 20 );
1053
}
1054
1055
// -----------------------------------------------------------------------
1056
1057
void SvxLanguageBox_Impl::ReleaseFocus_Impl()
1058
{
1059
	if ( !bRelease )
1060
	{
1061
		bRelease = TRUE;
1062
		return;
1063
	}
1064
1065
	SfxViewShell* pCurSh = SfxViewShell::Current();
1066
1067
	if ( pCurSh )
1068
	{
1069
		Window* pShellWnd = pCurSh->GetWindow();
1070
1071
		if ( pShellWnd )
1072
			pShellWnd->GrabFocus();
1073
	}
1074
}
1075
1076
// -----------------------------------------------------------------------
1077
1078
void SvxLanguageBox_Impl::Select()
1079
{
1080
	SvxLanguageBox::Select();
1081
1082
	if ( !IsTravelSelect() )
1083
	{
1084
		SvxLanguageItem aLanguageItem( SvxLanguageBox::GetSelectLanguage() );
1085
		rBindings.GetDispatcher()->Execute(
1086
			SID_ATTR_CHAR_LANGUAGE, SFX_CALLMODE_RECORD, &aLanguageItem, 0L );
1087
		ReleaseFocus_Impl();
1088
	}
1089
}
1090
// -----------------------------------------------------------------------
1091
1092
void SvxLanguageBox_Impl::StateChanged_Impl( SfxItemState eState, const SfxPoolItem* pState )
1093
{
1094
}
1095
1096
// -----------------------------------------------------------------------
1097
1098
void SvxLanguageBox_Impl::Update( const SvxLanguageItem& rLanguageItem )
1099
{
1100
	SvxLanguageBox::SetLanguageList( LANG_LIST_ALL, TRUE, FALSE, TRUE );
1101
1102
	LanguageType eLangType = (LanguageType)rLanguageItem.GetValue();
1103
	if ( eLangType != LANGUAGE_DONTKNOW )
1104
	{
1105
		for ( USHORT i = 0; i < GetEntryCount(); ++i )
1106
		{
1107
			if ( (LanguageType)(ULONG)GetEntryData(i) == eLangType )
1108
			{
1109
				SelectEntryPos(i);
1110
				break;
1111
			}
1112
		}
1113
	}
1114
}
1115
1116
// -----------------------------------------------------------------------
1117
1118
long SvxLanguageBox_Impl::Notify( NotifyEvent& rNEvt )
1119
{
1120
	long nHandled = 0;
1121
1122
#if 0
1123
	if ( rNEvt.GetType() == EVENT_KEYINPUT )
1124
	{
1125
		USHORT nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode();
1126
1127
		switch ( nCode )
1128
		{
1129
			case KEY_RETURN:
1130
			case KEY_TAB:
1131
			{
1132
				if ( KEY_TAB == nCode )
1133
					bRelease = FALSE;
1134
				else
1135
					nHandled = 1;
1136
				Select();
1137
				break;
1138
			}
1139
1140
			case KEY_ESCAPE:
1141
				SetText( aCurText );
1142
				ReleaseFocus_Impl();
1143
				nHandled = 1;
1144
				break;
1145
		}
1146
	}
1147
    else if(EVENT_LOSEFOCUS == rNEvt.GetType())
1148
	{
1149
		Window* pFocusWin = Application::GetFocusWindow();
1150
		if(!HasFocus() && GetSubEdit() != pFocusWin)
1151
			SetText(GetSavedValue());
1152
	}
1153
#endif
1154
1155
	return nHandled ? nHandled : SvxLanguageBox::Notify( rNEvt );
1156
}
1157
/* -----------------------------08.03.2002 13:24------------------------------
1158
1159
 ---------------------------------------------------------------------------*/
1160
void SvxLanguageBox_Impl::DataChanged( const DataChangedEvent& rDCEvt )
1161
{
1162
    SvxLanguageBox::DataChanged( rDCEvt );
1163
}
1164
1165
//========================================================================
1005
// class SvxColorWindow_Impl --------------------------------------------------
1166
// class SvxColorWindow_Impl --------------------------------------------------
1006
//========================================================================
1167
//========================================================================
1007
#ifndef WB_NO_DIRECTSELECT
1168
#ifndef WB_NO_DIRECTSELECT
Lines 2436-2441 Link Here
2436
Window* SvxFontHeightToolBoxControl::CreateItemWindow( Window *pParent )
2597
Window* SvxFontHeightToolBoxControl::CreateItemWindow( Window *pParent )
2437
{
2598
{
2438
    pBox = new SvxFontSizeBox_Impl( pParent, *this, GetBindings() );
2599
    pBox = new SvxFontSizeBox_Impl( pParent, *this, GetBindings() );
2600
	return pBox;
2601
}
2602
2603
//========================================================================
2604
// class SvxLanguageToolBoxControl ---------------------------------------
2605
//========================================================================
2606
2607
SvxLanguageToolBoxControl::SvxLanguageToolBoxControl(
2608
											USHORT		nId,
2609
											ToolBox&		rTbx ,
2610
											SfxBindings&	rBindings)
2611
	:	SfxToolBoxControl( nId, rTbx, rBindings )
2612
{
2613
}
2614
2615
// -----------------------------------------------------------------------
2616
2617
void SvxLanguageToolBoxControl::StateChanged(
2618
	USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
2619
{
2620
	USHORT 				nId	= GetId();
2621
	ToolBox&				rTbx   = GetToolBox();
2622
	SvxLanguageBox_Impl*	pBox   = (SvxLanguageBox_Impl*)(rTbx.GetItemWindow( nId ));
2623
2624
	DBG_ASSERT( pBox, "Control not found!" );
2625
2626
	if ( SFX_ITEM_DISABLED == eState )
2627
	{
2628
		pBox->Disable();
2629
		pBox->Update( NULL );
2630
	}
2631
	else
2632
	{
2633
		pBox->Enable();
2634
2635
		if ( SFX_ITEM_AVAILABLE == eState )
2636
		{
2637
			SvxLanguageItem *pLangItem = (eState == SFX_ITEM_AVAILABLE) ? (SvxLanguageItem*)pState : NULL;
2638
2639
			if( ! pLangItem->ISA(SvxLanguageItem) )
2640
				fprintf( stderr, "SvxLanguageToolBoxControl::StateChanged() - bad ItemType, expected SvxLanguageItem" );
2641
2642
			if ( pLangItem )
2643
				pBox->Update( *pLangItem );
2644
		}
2645
		else
2646
			pBox->SelectLanguage( LANGUAGE_DONTKNOW );
2647
		pBox->SaveValue();
2648
	}
2649
2650
	rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
2651
}
2652
2653
// -----------------------------------------------------------------------
2654
2655
Window* SvxLanguageToolBoxControl::CreateItemWindow( Window *pParent )
2656
{
2657
	SvxLanguageBox_Impl* pBox = new SvxLanguageBox_Impl( pParent, *this, GetBindings() );
2439
	return pBox;
2658
	return pBox;
2440
}
2659
}
2441
2660

Return to issue 23518