diff options
author | Thorsten Behrens <thb@openoffice.org> | 2002-07-26 08:50:47 +0000 |
---|---|---|
committer | Thorsten Behrens <thb@openoffice.org> | 2002-07-26 08:50:47 +0000 |
commit | 0882b3c236df0241024affdb01a39fe755500e7d (patch) | |
tree | 99b5e37eeae57e02d2677e043bc43a8e965c7fc5 /sd/source | |
parent | 98978996f61ea759d897cc23c91f9795046d34cd (diff) |
#101743# Pass outliner language to popup menu
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/ui/app/sdpopup.cxx | 34 | ||||
-rw-r--r-- | sd/source/ui/inc/sdpopup.hxx | 8 | ||||
-rw-r--r-- | sd/source/ui/view/drviews4.cxx | 15 |
3 files changed, 33 insertions, 24 deletions
diff --git a/sd/source/ui/app/sdpopup.cxx b/sd/source/ui/app/sdpopup.cxx index 344d3c34d09b..be46f64d1bf4 100644 --- a/sd/source/ui/app/sdpopup.cxx +++ b/sd/source/ui/app/sdpopup.cxx @@ -2,9 +2,9 @@ * * $RCSfile: sdpopup.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: thb $ $Date: 2001-09-03 15:22:28 $ + * last change: $Author: thb $ $Date: 2002-07-26 09:48:00 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -94,11 +94,11 @@ |* \************************************************************************/ -SdFieldPopup::SdFieldPopup( const SvxFieldData* pInField ) : +SdFieldPopup::SdFieldPopup( const SvxFieldData* pInField, LanguageType eLanguage ) : PopupMenu (), pField ( pInField ) { - Fill(); + Fill( eLanguage ); } /************************************************************************* @@ -117,7 +117,7 @@ SdFieldPopup::~SdFieldPopup() |* \************************************************************************/ -void SdFieldPopup::Fill() +void SdFieldPopup::Fill( LanguageType eLanguage ) { USHORT nID = 1; USHORT nStyle = MIB_RADIOCHECK | MIB_AUTOCHECK; @@ -142,18 +142,18 @@ void SdFieldPopup::Fill() SvNumberFormatter* pNumberFormatter = SD_MOD()->GetNumberFormatter(); aDateField.SetFormat( SVXDATEFORMAT_A ); // 13.02.96 - InsertItem( nID++, aDateField.GetFormatted( *pNumberFormatter, LANGUAGE_SYSTEM ), nStyle ); + InsertItem( nID++, aDateField.GetFormatted( *pNumberFormatter, eLanguage ), nStyle ); aDateField.SetFormat( SVXDATEFORMAT_B ); // 13.02.1996 - InsertItem( nID++, aDateField.GetFormatted( *pNumberFormatter, LANGUAGE_SYSTEM ), nStyle ); + InsertItem( nID++, aDateField.GetFormatted( *pNumberFormatter, eLanguage ), nStyle ); aDateField.SetFormat( SVXDATEFORMAT_C ); // 13.Feb 1996 - InsertItem( nID++, aDateField.GetFormatted( *pNumberFormatter, LANGUAGE_SYSTEM ), nStyle ); + InsertItem( nID++, aDateField.GetFormatted( *pNumberFormatter, eLanguage ), nStyle ); aDateField.SetFormat( SVXDATEFORMAT_D ); // 13.Februar 1996 - InsertItem( nID++, aDateField.GetFormatted( *pNumberFormatter, LANGUAGE_SYSTEM ), nStyle ); + InsertItem( nID++, aDateField.GetFormatted( *pNumberFormatter, eLanguage ), nStyle ); aDateField.SetFormat( SVXDATEFORMAT_E ); // Die, 13.Februar 1996 - InsertItem( nID++, aDateField.GetFormatted( *pNumberFormatter, LANGUAGE_SYSTEM ), nStyle ); + InsertItem( nID++, aDateField.GetFormatted( *pNumberFormatter, eLanguage ), nStyle ); aDateField.SetFormat( SVXDATEFORMAT_F ); // Dienstag, 13.Februar 1996 - InsertItem( nID++, aDateField.GetFormatted( *pNumberFormatter, LANGUAGE_SYSTEM ), nStyle ); + InsertItem( nID++, aDateField.GetFormatted( *pNumberFormatter, eLanguage ), nStyle ); CheckItem( (USHORT) ( pDateField->GetFormat() ) + 1 ); // - 2 + 3 ! } @@ -173,18 +173,18 @@ void SdFieldPopup::Fill() SvNumberFormatter* pNumberFormatter = SD_MOD()->GetNumberFormatter(); aTimeField.SetFormat( SVXTIMEFORMAT_24_HM ); // 13:49 - InsertItem( nID++, aTimeField.GetFormatted( *pNumberFormatter, LANGUAGE_SYSTEM ), nStyle ); + InsertItem( nID++, aTimeField.GetFormatted( *pNumberFormatter, eLanguage ), nStyle ); aTimeField.SetFormat( SVXTIMEFORMAT_24_HMS ); // 13:49:38 - InsertItem( nID++, aTimeField.GetFormatted( *pNumberFormatter, LANGUAGE_SYSTEM ), nStyle ); + InsertItem( nID++, aTimeField.GetFormatted( *pNumberFormatter, eLanguage ), nStyle ); aTimeField.SetFormat( SVXTIMEFORMAT_24_HMSH ); // 13:49:38.78 - InsertItem( nID++, aTimeField.GetFormatted( *pNumberFormatter, LANGUAGE_SYSTEM ), nStyle ); + InsertItem( nID++, aTimeField.GetFormatted( *pNumberFormatter, eLanguage ), nStyle ); aTimeField.SetFormat( SVXTIMEFORMAT_12_HM ); // 01:49 - InsertItem( nID++, aTimeField.GetFormatted( *pNumberFormatter, LANGUAGE_SYSTEM ), nStyle ); + InsertItem( nID++, aTimeField.GetFormatted( *pNumberFormatter, eLanguage ), nStyle ); aTimeField.SetFormat( SVXTIMEFORMAT_12_HMS ); // 01:49:38 - InsertItem( nID++, aTimeField.GetFormatted( *pNumberFormatter, LANGUAGE_SYSTEM ), nStyle ); + InsertItem( nID++, aTimeField.GetFormatted( *pNumberFormatter, eLanguage ), nStyle ); aTimeField.SetFormat( SVXTIMEFORMAT_12_HMSH ); // 01:49:38.78 - InsertItem( nID++, aTimeField.GetFormatted( *pNumberFormatter, LANGUAGE_SYSTEM ), nStyle ); + InsertItem( nID++, aTimeField.GetFormatted( *pNumberFormatter, eLanguage ), nStyle ); //SVXTIMEFORMAT_AM_HM, // 01:49 PM //SVXTIMEFORMAT_AM_HMS, // 01:49:38 PM //SVXTIMEFORMAT_AM_HMSH // 01:49:38.78 PM diff --git a/sd/source/ui/inc/sdpopup.hxx b/sd/source/ui/inc/sdpopup.hxx index 7f0088d8be2e..02a95c0d49e4 100644 --- a/sd/source/ui/inc/sdpopup.hxx +++ b/sd/source/ui/inc/sdpopup.hxx @@ -2,9 +2,9 @@ * * $RCSfile: sdpopup.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:48:41 $ + * last change: $Author: thb $ $Date: 2002-07-26 09:46:22 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -81,10 +81,10 @@ class SdFieldPopup : public PopupMenu private: const SvxFieldData* pField; - void Fill(); + void Fill( LanguageType eLanguage ); public: - SdFieldPopup( const SvxFieldData* pInField ); + SdFieldPopup( const SvxFieldData* pInField, LanguageType eLanguage ); ~SdFieldPopup(); //virtual void Select(); diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx index 93db3da94091..c51be6720d75 100644 --- a/sd/source/ui/view/drviews4.cxx +++ b/sd/source/ui/view/drviews4.cxx @@ -2,9 +2,9 @@ * * $RCSfile: drviews4.cxx,v $ * - * $Revision: 1.12 $ + * $Revision: 1.13 $ * - * last change: $Author: aw $ $Date: 2002-03-14 17:44:36 $ + * last change: $Author: thb $ $Date: 2002-07-26 09:50:47 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -613,7 +613,16 @@ void SdDrawViewShell::Command(const CommandEvent& rCEvt, SdWindow* pWin) pFldItem->GetField()->ISA( SvxExtFileField ) || pFldItem->GetField()->ISA( SvxAuthorField ) ) ) { - SdFieldPopup aFieldPopup( pFldItem->GetField() ); + LanguageType eLanguage( LANGUAGE_SYSTEM ); + + // #101743# Format popup with outliner language, if possible + if( pOLV->GetOutliner() ) + { + ESelection aSelection( pOLV->GetSelection() ); + eLanguage = pOLV->GetOutliner()->GetLanguage( aSelection.nStartPara, aSelection.nStartPos ); + } + + SdFieldPopup aFieldPopup( pFldItem->GetField(), eLanguage ); if ( rCEvt.IsMouseEvent() ) aMPos = rCEvt.GetMousePosPixel(); |