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

(-)inc/globlmn.hrc (+35 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 ] = "语è¨<80>(~L)" ; \
582
    Text[ russian ] = "ßçûê" ; \
583
    Text[ polish ] = "~Jêzyk" ; \
584
    Text[ japanese ] = "è¨<80>èª<9E>(~L)" ; \
585
    Text[ chinese_traditional ] = "èª<9E>è¨<80>(~L)" ; \
586
    Text[ arabic ] = "ÇááÛÉ" ; \
587
    Text[ greek ] = "Ãëþóóá" ; \
588
    Text[ korean ] = "ì<96>¸ì<96>´(~L)" ; \
589
    Text[ turkish ] = "~Dil" ; \
590
    Text[ language_user1 ] = " " ; \
591
    Text[ catalan ] = "~Idioma" ; \
592
    Text[ thai ] = "~ภาษา" ; \
593
    Text[ czech ] = "Jazyk" ; \
594
    Text[ hebrew ] = "â<80>®×©×¤×<94>â<80>¬" ; \
595
    Text[ hindi ] = "~भाषा" ; \
596
    Text[ slovak ] = "~Jazyk" ;
597
598
564
#define ITEM_FORMAT_ATTR_CHAR_WEIGHT \
599
#define ITEM_FORMAT_ATTR_CHAR_WEIGHT \
565
    Identifier = SID_ATTR_CHAR_WEIGHT ; \
600
    Identifier = SID_ATTR_CHAR_WEIGHT ; \
566
	Command = ".uno:Bold" ; \
601
	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 6028-6035 Link Here
6028
	/* config: */
6028
	/* config: */
6029
	AccelConfig = FALSE,
6029
	AccelConfig = FALSE,
6030
	MenuConfig = FALSE,
6030
	MenuConfig = FALSE,
6031
	StatusBarConfig = FALSE,
6031
	StatusBarConfig = TRUE,
6032
	ToolBoxConfig = FALSE,
6032
	ToolBoxConfig = TRUE,
6033
	GroupId = GID_FORMAT;
6033
	GroupId = GID_FORMAT;
6034
]
6034
]
6035
6035
(-)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[ english_us ] = "Language";
642
	SlotName[ portuguese ] = "Língua";
643
	SlotName[ russian ] = "ßçûê";
644
	SlotName[ dutch ] = "Taal";
645
	SlotName[ french ] = "Langue";
646
	SlotName[ spanish ] = "Idioma";
647
	SlotName[ italian ] = "Lingua";
648
	SlotName[ danish ] = "Sprog";
649
	SlotName[ swedish ] = "Språk";
650
	SlotName[ polish ] = "Jêzyk";
651
	SlotName[ portuguese_brazilian ] = "Idioma";
652
	SlotName[ japanese ] = "è¨<80>èª<9E>";
653
	SlotName[ chinese_simplified ] = "语è¨<80>";
654
	SlotName[ chinese_traditional ] = "èª<9E>è¨<80>";
655
	SlotName[ chinese_simplified ] = "Language";
656
	SlotName[ greek ] = "Ãëþóóá";
657
	SlotName[ korean ] = "ì<96>¸ì<96>´";
658
	SlotName[ arabic ] = "ÇááÛÉ";
659
	SlotName[ turkish ] = "Dil";
660
	SlotName[ language_user1 ] = " ";
661
	SlotName[ catalan ] = "Idioma";
662
	SlotName[ finnish ] = "Kieli";
663
	SlotName[ thai ] = "ภาษา";
664
	SlotName[ czech ] = "Jazyk";
665
	SlotName[ hebrew ] = "â<80>®×©×¤×<94>â<80>¬";
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 (+187 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,
310
										SvxLanguageToolBoxControl& rCtrl, SfxBindings& rBind );
311
312
	void				StateChanged_Impl( SfxItemState eState,
313
										   const SfxPoolItem* pState );
314
	void				Update( const SvxLanguageItem& rLanguageItem );
315
316
	virtual long		Notify( NotifyEvent& rNEvt );
317
};
318
319
//========================================================================
285
// class SvxColorWindow_Impl --------------------------------------------------
320
// class SvxColorWindow_Impl --------------------------------------------------
286
//========================================================================
321
//========================================================================
287
322
Lines 1002-1007 Link Here
1002
}
1037
}
1003
1038
1004
//========================================================================
1039
//========================================================================
1040
// class SvxLanguageBox_Impl --------------------------------------------------
1041
//========================================================================
1042
1043
SvxLanguageBox_Impl::SvxLanguageBox_Impl( Window* pParent, SvxLanguageToolBoxControl &rCtrl, SfxBindings& rBind ) :
1044
	SvxLanguageBox( pParent, WinBits(WB_DROPDOWN) ),
1045
	pCtrl		( &rCtrl ),
1046
	bRelease		( TRUE ),
1047
	rBindings		( rBind )
1048
{
1049
	SvxLanguageBox::SetLanguageList( LANG_LIST_ALL, TRUE, FALSE, TRUE );
1050
	
1051
	aControlSize = CalcMinimumSize();
1052
	aControlSize.setWidth( aControlSize.getWidth() * 0.8 );
1053
	SetSizePixel( aControlSize );
1054
	SetDropDownLineCount( 20 );
1055
}
1056
1057
// -----------------------------------------------------------------------
1058
1059
void SvxLanguageBox_Impl::ReleaseFocus_Impl()
1060
{
1061
	if ( !bRelease )
1062
	{
1063
		bRelease = TRUE;
1064
		return;
1065
	}
1066
1067
	SfxViewShell* pCurSh = SfxViewShell::Current();
1068
1069
	if ( pCurSh )
1070
	{
1071
		Window* pShellWnd = pCurSh->GetWindow();
1072
1073
		if ( pShellWnd )
1074
			pShellWnd->GrabFocus();
1075
	}
1076
}
1077
1078
// -----------------------------------------------------------------------
1079
1080
void SvxLanguageBox_Impl::Select()
1081
{
1082
	SvxLanguageBox::Select();
1083
1084
	if ( !IsTravelSelect() )
1085
	{
1086
		SvxLanguageItem aLanguageItem( SvxLanguageBox::GetSelectLanguage() );
1087
		rBindings.GetDispatcher()->Execute(
1088
			SID_ATTR_CHAR_LANGUAGE, SFX_CALLMODE_RECORD, &aLanguageItem, 0L );
1089
		ReleaseFocus_Impl();
1090
	}
1091
}
1092
// -----------------------------------------------------------------------
1093
1094
void SvxLanguageBox_Impl::StateChanged_Impl( SfxItemState eState, const SfxPoolItem* pState )
1095
{
1096
}
1097
1098
// -----------------------------------------------------------------------
1099
1100
void SvxLanguageBox_Impl::Update( const SvxLanguageItem& rLanguageItem )
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
	SvxLanguageBox::Notify( rNEvt );
1121
}
1122
/* -----------------------------08.03.2002 13:24------------------------------
1123
1124
 ---------------------------------------------------------------------------*/
1125
void SvxLanguageBox_Impl::DataChanged( const DataChangedEvent& rDCEvt )
1126
{
1127
	if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) )
1128
        SetSizePixel( aControlSize );
1129
1130
    SvxLanguageBox::DataChanged( rDCEvt );
1131
}
1132
1133
//========================================================================
1005
// class SvxColorWindow_Impl --------------------------------------------------
1134
// class SvxColorWindow_Impl --------------------------------------------------
1006
//========================================================================
1135
//========================================================================
1007
#ifndef WB_NO_DIRECTSELECT
1136
#ifndef WB_NO_DIRECTSELECT
Lines 2431-2436 Link Here
2431
Window* SvxFontHeightToolBoxControl::CreateItemWindow( Window *pParent )
2560
Window* SvxFontHeightToolBoxControl::CreateItemWindow( Window *pParent )
2432
{
2561
{
2433
    pBox = new SvxFontSizeBox_Impl( pParent, *this, GetBindings() );
2562
    pBox = new SvxFontSizeBox_Impl( pParent, *this, GetBindings() );
2563
	return pBox;
2564
}
2565
2566
//========================================================================
2567
// class SvxLangaugeToolBoxControl ---------------------------------------
2568
//========================================================================
2569
2570
SvxLanguageToolBoxControl::SvxLanguageToolBoxControl(
2571
											USHORT		nId,
2572
											ToolBox&		rTbx ,
2573
											SfxBindings&	rBindings)
2574
	:	SfxToolBoxControl( nId, rTbx, rBindings )
2575
{
2576
}
2577
2578
// -----------------------------------------------------------------------
2579
2580
void SvxLanguageToolBoxControl::StateChanged(
2581
	USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
2582
{
2583
	USHORT 				nId	= GetId();
2584
	ToolBox&				rTbx   = GetToolBox();
2585
	SvxLanguageBox_Impl*	pBox   = (SvxLanguageBox_Impl*)(rTbx.GetItemWindow( nId ));
2586
2587
	DBG_ASSERT( pBox, "Control not found!" );
2588
2589
	if ( SFX_ITEM_DISABLED == eState )
2590
	{
2591
		pBox->Disable();
2592
		pBox->Update( NULL );
2593
	}
2594
	else
2595
	{
2596
		pBox->Enable();
2597
2598
		if ( SFX_ITEM_AVAILABLE == eState )
2599
		{
2600
			SvxLanguageItem *pLangItem = (eState == SFX_ITEM_AVAILABLE) ? (SvxLanguageItem*)pState : NULL;
2601
2602
			if( ! pLangItem->ISA(SvxLanguageItem) )
2603
				fprintf( stderr, "SvxLanguageToolBoxControl::StateChanged() - bad ItemType, expected SvxLanguageItem" );
2604
2605
			if ( pLangItem )
2606
				pBox->Update( *pLangItem );
2607
		}
2608
		else
2609
			pBox->SelectLanguage( LANGUAGE_DONTKNOW );
2610
		pBox->SaveValue();
2611
	}
2612
2613
	rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
2614
}
2615
2616
// -----------------------------------------------------------------------
2617
2618
Window* SvxLanguageToolBoxControl::CreateItemWindow( Window *pParent )
2619
{
2620
	SvxLanguageBox_Impl* pBox = new SvxLanguageBox_Impl( pParent, *this, GetBindings() );
2434
	return pBox;
2621
	return pBox;
2435
}
2622
}
2436
2623

Return to issue 23518