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

(-)inc/globlmn.hrc (+36 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 ] = "~Language" ; \
572
    Text [ portuguese_brazilian ] = "Language" ; \
573
    Text [ portuguese ] = "~Language" ; \
574
    Text [ finnish ] = "Language" ; \
575
    Text [ danish ] = "~Language" ; \
576
    Text [ french ] = "Language" ; \
577
    Text [ swedish ] = "Language" ; \
578
    Text [ dutch ] = "Language" ; \
579
    Text [ spanish ] = "Language" ; \
580
    Text [ english_us ] = "Language" ;\
581
	Text[ chinese_simplified ] = "Language";	\
582
	Text[ russian ] = "Language";	\
583
	Text[ polish ] = "Language";	\
584
	Text[ japanese ] = "Language";	\
585
	Text[ chinese_traditional ] = "Language";	\
586
	Text[ arabic ] = "Language";	\
587
	Text[ dutch ] = "Language";	\
588
	Text[ chinese_simplified ] = "Language";	\
589
	Text[ greek ] = "Language";	\
590
	Text[ korean ] = "Language";	\
591
	Text[ turkish ] = "Language";	\
592
	Text[ language_user1 ] = " ";	\
593
	Text[ catalan ] = "Language";	\
594
	Text[ thai ] = "Language";	\
595
	Text[ czech ] = "Language";	\
596
	Text[ hebrew ] = "Language";	\
597
	Text[ hindi ] = "Language";	\
598
	Text[ slovak ] = "Language";
599
564
#define ITEM_FORMAT_ATTR_CHAR_WEIGHT \
600
#define ITEM_FORMAT_ATTR_CHAR_WEIGHT \
565
    Identifier = SID_ATTR_CHAR_WEIGHT ; \
601
    Identifier = SID_ATTR_CHAR_WEIGHT ; \
566
	Command = ".uno:Bold" ; \
602
	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/svxslots.src (+33 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[ english_us ] = "Language";
642
	SlotName[ portuguese ] = "Language";
643
	SlotName[ russian ] = "Language";
644
	SlotName[ dutch ] = "Language";
645
	SlotName[ french ] = "Language";
646
	SlotName[ spanish ] = "Language";
647
	SlotName[ italian ] = "Language";
648
	SlotName[ danish ] = "Language";
649
	SlotName[ swedish ] = "Language";
650
	SlotName[ polish ] = "Language";
651
	SlotName[ portuguese_brazilian ] = "Language";
652
	SlotName[ japanese ] = "Language";
653
	SlotName[ chinese_simplified ] = "Language";
654
	SlotName[ chinese_traditional ] = "Language";
655
	SlotName[ dutch ] = "Language";
656
	SlotName[ chinese_simplified ] = "Language";
657
	SlotName[ greek ] = "Language";
658
	SlotName[ korean ] = "Language";
659
	SlotName[ arabic ] = "Language";
660
	SlotName[ turkish ] = "Language";
661
	SlotName[ language_user1 ] = " ";
662
	SlotName[ catalan ] = "Language";
663
	SlotName[ finnish ] = "Language";
664
	SlotName[ thai ] = "Language";
665
	SlotName[ czech ] = "Language";
666
	SlotName[ hebrew ] = "Language";
667
	SlotName[ hindi ] = "Language";
668
	SlotName[ slovak ] = "Language";
669
};
637
SfxSlotInfo SID_ATTR_CHAR_POSTURE
670
SfxSlotInfo SID_ATTR_CHAR_POSTURE
638
{
671
{
639
	SlotName = "Kursiv";
672
	SlotName = "Kursiv";
(-)source/tbxctrls/tbcontrl.cxx (+215 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
301
	void				ReleaseFocus_Impl();
302
303
protected:
304
	virtual void		Select();
305
	virtual void		DataChanged( const DataChangedEvent& rDCEvt );
306
307
public:
308
					SvxLanguageBox_Impl( Window* pParent,
309
										SvxLanguageToolBoxControl& rCtrl, SfxBindings& rBind );
310
311
	void				StateChanged_Impl( SfxItemState eState,
312
										   const SfxPoolItem* pState );
313
	void				Update( const SvxLanguageItem& rLanguageItem );
314
315
	virtual long		Notify( NotifyEvent& rNEvt );
316
};
317
318
//========================================================================
285
// class SvxColorWindow_Impl --------------------------------------------------
319
// class SvxColorWindow_Impl --------------------------------------------------
286
//========================================================================
320
//========================================================================
287
321
Lines 1002-1007 Link Here
1002
}
1036
}
1003
1037
1004
//========================================================================
1038
//========================================================================
1039
// class SvxLanguageBox_Impl --------------------------------------------------
1040
//========================================================================
1041
1042
SvxLanguageBox_Impl::SvxLanguageBox_Impl( Window* pParent, SvxLanguageToolBoxControl &rCtrl, SfxBindings& rBind ) :
1043
	SvxLanguageBox( pParent, WinBits(WB_DROPDOWN) ),
1044
	pCtrl		( &rCtrl ),
1045
	bRelease		( TRUE ),
1046
	rBindings		( rBind )
1047
{
1048
	SvxLanguageBox::SetDropDownLineCount( 15 );
1049
}
1050
1051
// -----------------------------------------------------------------------
1052
1053
void SvxLanguageBox_Impl::ReleaseFocus_Impl()
1054
{
1055
	if ( !bRelease )
1056
	{
1057
		bRelease = TRUE;
1058
		return;
1059
	}
1060
1061
	SfxViewShell* pCurSh = SfxViewShell::Current();
1062
1063
	if ( pCurSh )
1064
	{
1065
		Window* pShellWnd = pCurSh->GetWindow();
1066
1067
		if ( pShellWnd )
1068
			pShellWnd->GrabFocus();
1069
	}
1070
}
1071
1072
// -----------------------------------------------------------------------
1073
1074
void SvxLanguageBox_Impl::Select()
1075
{
1076
	SvxLanguageBox::Select();
1077
1078
	if ( !IsTravelSelect() )
1079
	{
1080
		SvxLanguageItem aLanguageItem( SvxLanguageBox::GetSelectLanguage() );
1081
		rBindings.GetDispatcher()->Execute(
1082
			SID_ATTR_CHAR_LANGUAGE, SFX_CALLMODE_RECORD, &aLanguageItem, 0L );
1083
		ReleaseFocus_Impl();
1084
	}
1085
}
1086
// -----------------------------------------------------------------------
1087
1088
void SvxLanguageBox_Impl::StateChanged_Impl( SfxItemState eState, const SfxPoolItem* pState )
1089
{
1090
}
1091
1092
// -----------------------------------------------------------------------
1093
1094
void SvxLanguageBox_Impl::Update( const SvxLanguageItem& rLanguageItem )
1095
{
1096
	SvxLanguageBox::SetLanguageList( LANG_LIST_ALL, TRUE, FALSE, TRUE );
1097
1098
	LanguageType eLangType = (LanguageType)rLanguageItem.GetValue();
1099
	if ( eLangType != LANGUAGE_DONTKNOW )
1100
	{
1101
		for ( USHORT i = 0; i < GetEntryCount(); ++i )
1102
		{
1103
			if ( (LanguageType)(ULONG)GetEntryData(i) == eLangType )
1104
			{
1105
				SelectEntryPos(i);
1106
				break;
1107
			}
1108
		}
1109
	}
1110
}
1111
1112
// -----------------------------------------------------------------------
1113
1114
long SvxLanguageBox_Impl::Notify( NotifyEvent& rNEvt )
1115
{
1116
	long nHandled = 0;
1117
1118
#if 0
1119
	if ( rNEvt.GetType() == EVENT_KEYINPUT )
1120
	{
1121
		USHORT nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode();
1122
1123
		switch ( nCode )
1124
		{
1125
			case KEY_RETURN:
1126
			case KEY_TAB:
1127
			{
1128
				if ( KEY_TAB == nCode )
1129
					bRelease = FALSE;
1130
				else
1131
					nHandled = 1;
1132
				Select();
1133
				break;
1134
			}
1135
1136
			case KEY_ESCAPE:
1137
				SetText( aCurText );
1138
				ReleaseFocus_Impl();
1139
				nHandled = 1;
1140
				break;
1141
		}
1142
	}
1143
    else if(EVENT_LOSEFOCUS == rNEvt.GetType())
1144
	{
1145
		Window* pFocusWin = Application::GetFocusWindow();
1146
		if(!HasFocus() && GetSubEdit() != pFocusWin)
1147
			SetText(GetSavedValue());
1148
	}
1149
#endif
1150
1151
	return nHandled ? nHandled : SvxLanguageBox::Notify( rNEvt );
1152
}
1153
/* -----------------------------08.03.2002 13:24------------------------------
1154
1155
 ---------------------------------------------------------------------------*/
1156
void SvxLanguageBox_Impl::DataChanged( const DataChangedEvent& rDCEvt )
1157
{
1158
    SvxLanguageBox::DataChanged( rDCEvt );
1159
}
1160
1161
//========================================================================
1005
// class SvxColorWindow_Impl --------------------------------------------------
1162
// class SvxColorWindow_Impl --------------------------------------------------
1006
//========================================================================
1163
//========================================================================
1007
#ifndef WB_NO_DIRECTSELECT
1164
#ifndef WB_NO_DIRECTSELECT
Lines 2431-2436 Link Here
2431
Window* SvxFontHeightToolBoxControl::CreateItemWindow( Window *pParent )
2588
Window* SvxFontHeightToolBoxControl::CreateItemWindow( Window *pParent )
2432
{
2589
{
2433
    pBox = new SvxFontSizeBox_Impl( pParent, *this, GetBindings() );
2590
    pBox = new SvxFontSizeBox_Impl( pParent, *this, GetBindings() );
2591
	return pBox;
2592
}
2593
2594
//========================================================================
2595
// class SvxLangaugeToolBoxControl ---------------------------------------
2596
//========================================================================
2597
2598
SvxLanguageToolBoxControl::SvxLanguageToolBoxControl(
2599
											USHORT		nId,
2600
											ToolBox&		rTbx ,
2601
											SfxBindings&	rBindings)
2602
	:	SfxToolBoxControl( nId, rTbx, rBindings )
2603
{
2604
}
2605
2606
// -----------------------------------------------------------------------
2607
2608
void SvxLanguageToolBoxControl::StateChanged(
2609
	USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
2610
{
2611
	USHORT 				nId	= GetId();
2612
	ToolBox&				rTbx   = GetToolBox();
2613
	SvxLanguageBox_Impl*	pBox   = (SvxLanguageBox_Impl*)(rTbx.GetItemWindow( nId ));
2614
2615
	DBG_ASSERT( pBox, "Control not found!" );
2616
2617
	if ( SFX_ITEM_DISABLED == eState )
2618
	{
2619
		pBox->Disable();
2620
		pBox->Update( (const SvxLanguageItem*)NULL );
2621
	}
2622
	else
2623
	{
2624
		pBox->Enable();
2625
2626
		if ( SFX_ITEM_AVAILABLE == eState )
2627
		{
2628
			SvxLanguageItem *pLangItem = (eState == SFX_ITEM_AVAILABLE) ? (SvxLanguageItem*)pState : NULL;
2629
2630
			if( ! pLangItem->ISA(SvxLanguageItem) )
2631
				fprintf( stderr, "SvxLanguageToolBoxControl::StateChanged() - bad ItemType, expected SvxLanguageItem" );
2632
2633
			if ( pLangItem )
2634
				pBox->Update( *pLangItem );
2635
		}
2636
		else
2637
			pBox->SelectLanguage( LANGUAGE_DONTKNOW );
2638
		pBox->SaveValue();
2639
	}
2640
2641
	rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
2642
}
2643
2644
// -----------------------------------------------------------------------
2645
2646
Window* SvxLanguageToolBoxControl::CreateItemWindow( Window *pParent )
2647
{
2648
	SvxLanguageBox_Impl* pBox = new SvxLanguageBox_Impl( pParent, *this, GetBindings() );
2434
	return pBox;
2649
	return pBox;
2435
}
2650
}
2436
2651

Return to issue 23518