1*5b190011SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*5b190011SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*5b190011SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*5b190011SAndrew Rist * distributed with this work for additional information 6*5b190011SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*5b190011SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*5b190011SAndrew Rist * "License"); you may not use this file except in compliance 9*5b190011SAndrew Rist * with the License. You may obtain a copy of the License at 10*5b190011SAndrew Rist * 11*5b190011SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*5b190011SAndrew Rist * 13*5b190011SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*5b190011SAndrew Rist * software distributed under the License is distributed on an 15*5b190011SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*5b190011SAndrew Rist * KIND, either express or implied. See the License for the 17*5b190011SAndrew Rist * specific language governing permissions and limitations 18*5b190011SAndrew Rist * under the License. 19*5b190011SAndrew Rist * 20*5b190011SAndrew Rist *************************************************************/ 21*5b190011SAndrew Rist 22*5b190011SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 25cdf0e10cSrcweir #include "precompiled_sd.hxx" 26cdf0e10cSrcweir 27cdf0e10cSrcweir #ifdef SD_DLLIMPLEMENTATION 28cdf0e10cSrcweir #undef SD_DLLIMPLEMENTATION 29cdf0e10cSrcweir #endif 30cdf0e10cSrcweir 31cdf0e10cSrcweir 32cdf0e10cSrcweir 33cdf0e10cSrcweir #include <editeng/editeng.hxx> 34cdf0e10cSrcweir #include <editeng/eeitem.hxx> 35cdf0e10cSrcweir #include <editeng/flditem.hxx> 36cdf0e10cSrcweir #include <svl/zforlist.hxx> 37cdf0e10cSrcweir #include <sfx2/objsh.hxx> 38cdf0e10cSrcweir #include <sfx2/docfile.hxx> 39cdf0e10cSrcweir #include <svl/itemset.hxx> 40cdf0e10cSrcweir #include <editeng/langitem.hxx> 41cdf0e10cSrcweir #include <unotools/useroptions.hxx> 42cdf0e10cSrcweir 43cdf0e10cSrcweir #include "strings.hrc" 44cdf0e10cSrcweir #include "dlgfield.hrc" 45cdf0e10cSrcweir #include "sdattr.hxx" 46cdf0e10cSrcweir #include "sdresid.hxx" 47cdf0e10cSrcweir #include "sdmod.hxx" 48cdf0e10cSrcweir #include "dlgfield.hxx" 49cdf0e10cSrcweir #include "drawdoc.hxx" 50cdf0e10cSrcweir #include "DrawDocShell.hxx" 51cdf0e10cSrcweir 52cdf0e10cSrcweir /************************************************************************* 53cdf0e10cSrcweir |* 54cdf0e10cSrcweir |* Dialog zum Bearbeiten von Feldbefehlen 55cdf0e10cSrcweir |* 56cdf0e10cSrcweir \************************************************************************/ 57cdf0e10cSrcweir 58cdf0e10cSrcweir SdModifyFieldDlg::SdModifyFieldDlg( Window* pWindow, const SvxFieldData* pInField, const SfxItemSet& rSet ) : 59cdf0e10cSrcweir ModalDialog ( pWindow, SdResId( DLG_FIELD_MODIFY ) ), 60cdf0e10cSrcweir aGrpType ( this, SdResId( GRP_TYPE ) ), 61cdf0e10cSrcweir aRbtFix ( this, SdResId( RBT_FIX ) ), 62cdf0e10cSrcweir aRbtVar ( this, SdResId( RBT_VAR ) ), 63cdf0e10cSrcweir maFtLanguage( this, SdResId( FT_LANGUAGE ) ), 64cdf0e10cSrcweir maLbLanguage( this, SdResId( LB_LANGUAGE ) ), 65cdf0e10cSrcweir aFtFormat ( this, SdResId( FT_FORMAT ) ), 66cdf0e10cSrcweir aLbFormat ( this, SdResId( LB_FORMAT ) ), 67cdf0e10cSrcweir aBtnOK ( this, SdResId( BTN_OK ) ), 68cdf0e10cSrcweir aBtnCancel ( this, SdResId( BTN_CANCEL ) ), 69cdf0e10cSrcweir aBtnHelp ( this, SdResId( BTN_HELP ) ), 70cdf0e10cSrcweir maInputSet ( rSet ), 71cdf0e10cSrcweir pField ( pInField ) 72cdf0e10cSrcweir { 73cdf0e10cSrcweir FreeResource(); 74cdf0e10cSrcweir 75cdf0e10cSrcweir maLbLanguage.SetLanguageList( LANG_LIST_ALL|LANG_LIST_ONLY_KNOWN, false ); 76cdf0e10cSrcweir maLbLanguage.SetSelectHdl( LINK( this, SdModifyFieldDlg, LanguageChangeHdl ) ); 77cdf0e10cSrcweir FillControls(); 78cdf0e10cSrcweir } 79cdf0e10cSrcweir 80cdf0e10cSrcweir /************************************************************************* 81cdf0e10cSrcweir |* 82cdf0e10cSrcweir |* Gibt das neue Feld zurueck, gehoert dem Caller. 83cdf0e10cSrcweir |* Liefert NULL, wenn sich nichts geaendert hat. 84cdf0e10cSrcweir |* 85cdf0e10cSrcweir \************************************************************************/ 86cdf0e10cSrcweir 87cdf0e10cSrcweir SvxFieldData* SdModifyFieldDlg::GetField() 88cdf0e10cSrcweir { 89cdf0e10cSrcweir SvxFieldData* pNewField = NULL; 90cdf0e10cSrcweir 91cdf0e10cSrcweir if( aRbtFix.IsChecked() != aRbtFix.GetSavedValue() || 92cdf0e10cSrcweir aRbtVar.IsChecked() != aRbtVar.GetSavedValue() || 93cdf0e10cSrcweir aLbFormat.GetSelectEntryPos() != aLbFormat.GetSavedValue() ) 94cdf0e10cSrcweir { 95cdf0e10cSrcweir if( pField->ISA( SvxDateField ) ) 96cdf0e10cSrcweir { 97cdf0e10cSrcweir const SvxDateField* pDateField = (const SvxDateField*) pField; 98cdf0e10cSrcweir SvxDateType eType; 99cdf0e10cSrcweir SvxDateFormat eFormat; 100cdf0e10cSrcweir 101cdf0e10cSrcweir if( aRbtFix.IsChecked() ) 102cdf0e10cSrcweir eType = SVXDATETYPE_FIX; 103cdf0e10cSrcweir else 104cdf0e10cSrcweir eType = SVXDATETYPE_VAR; 105cdf0e10cSrcweir 106cdf0e10cSrcweir eFormat = (SvxDateFormat) ( aLbFormat.GetSelectEntryPos() + 2 ); 107cdf0e10cSrcweir 108cdf0e10cSrcweir pNewField = new SvxDateField( *pDateField ); 109cdf0e10cSrcweir ( (SvxDateField*) pNewField )->SetType( eType ); 110cdf0e10cSrcweir ( (SvxDateField*) pNewField )->SetFormat( eFormat ); 111cdf0e10cSrcweir } 112cdf0e10cSrcweir else if( pField->ISA( SvxExtTimeField ) ) 113cdf0e10cSrcweir { 114cdf0e10cSrcweir const SvxExtTimeField* pTimeField = (const SvxExtTimeField*) pField; 115cdf0e10cSrcweir SvxTimeType eType; 116cdf0e10cSrcweir SvxTimeFormat eFormat; 117cdf0e10cSrcweir 118cdf0e10cSrcweir if( aRbtFix.IsChecked() ) 119cdf0e10cSrcweir eType = SVXTIMETYPE_FIX; 120cdf0e10cSrcweir else 121cdf0e10cSrcweir eType = SVXTIMETYPE_VAR; 122cdf0e10cSrcweir 123cdf0e10cSrcweir eFormat = (SvxTimeFormat) ( aLbFormat.GetSelectEntryPos() + 2 ); 124cdf0e10cSrcweir 125cdf0e10cSrcweir pNewField = new SvxExtTimeField( *pTimeField ); 126cdf0e10cSrcweir ( (SvxExtTimeField*) pNewField )->SetType( eType ); 127cdf0e10cSrcweir ( (SvxExtTimeField*) pNewField )->SetFormat( eFormat ); 128cdf0e10cSrcweir } 129cdf0e10cSrcweir else if( pField->ISA( SvxExtFileField ) ) 130cdf0e10cSrcweir { 131cdf0e10cSrcweir const SvxExtFileField* pFileField = (const SvxExtFileField*) pField; 132cdf0e10cSrcweir SvxFileType eType; 133cdf0e10cSrcweir SvxFileFormat eFormat; 134cdf0e10cSrcweir 135cdf0e10cSrcweir if( aRbtFix.IsChecked() ) 136cdf0e10cSrcweir eType = SVXFILETYPE_FIX; 137cdf0e10cSrcweir else 138cdf0e10cSrcweir eType = SVXFILETYPE_VAR; 139cdf0e10cSrcweir 140cdf0e10cSrcweir eFormat = (SvxFileFormat) ( aLbFormat.GetSelectEntryPos() ); 141cdf0e10cSrcweir 142cdf0e10cSrcweir ::sd::DrawDocShell* pDocSh = PTR_CAST( ::sd::DrawDocShell, 143cdf0e10cSrcweir SfxObjectShell::Current() ); 144cdf0e10cSrcweir 145cdf0e10cSrcweir if( pDocSh ) 146cdf0e10cSrcweir { 147cdf0e10cSrcweir SvxExtFileField aFileField( *pFileField ); 148cdf0e10cSrcweir 149cdf0e10cSrcweir String aName; 150cdf0e10cSrcweir if( pDocSh->HasName() ) 151cdf0e10cSrcweir aName = pDocSh->GetMedium()->GetName(); 152cdf0e10cSrcweir 153cdf0e10cSrcweir // #91225# Get current filename, not the one stored in the old field 154cdf0e10cSrcweir pNewField = new SvxExtFileField( aName ); 155cdf0e10cSrcweir ( (SvxExtFileField*) pNewField )->SetType( eType ); 156cdf0e10cSrcweir ( (SvxExtFileField*) pNewField )->SetFormat( eFormat ); 157cdf0e10cSrcweir } 158cdf0e10cSrcweir } 159cdf0e10cSrcweir else if( pField->ISA( SvxAuthorField ) ) 160cdf0e10cSrcweir { 161cdf0e10cSrcweir SvxAuthorType eType; 162cdf0e10cSrcweir SvxAuthorFormat eFormat; 163cdf0e10cSrcweir 164cdf0e10cSrcweir if( aRbtFix.IsChecked() ) 165cdf0e10cSrcweir eType = SVXAUTHORTYPE_FIX; 166cdf0e10cSrcweir else 167cdf0e10cSrcweir eType = SVXAUTHORTYPE_VAR; 168cdf0e10cSrcweir 169cdf0e10cSrcweir eFormat = (SvxAuthorFormat) ( aLbFormat.GetSelectEntryPos() ); 170cdf0e10cSrcweir 171cdf0e10cSrcweir // #91225# Get current state of address, not the old one 172cdf0e10cSrcweir SvtUserOptions aUserOptions; 173cdf0e10cSrcweir pNewField = new SvxAuthorField( aUserOptions.GetFirstName(), aUserOptions.GetLastName(), aUserOptions.GetID() ); 174cdf0e10cSrcweir ( (SvxAuthorField*) pNewField )->SetType( eType ); 175cdf0e10cSrcweir ( (SvxAuthorField*) pNewField )->SetFormat( eFormat ); 176cdf0e10cSrcweir } 177cdf0e10cSrcweir } 178cdf0e10cSrcweir 179cdf0e10cSrcweir return( pNewField ); 180cdf0e10cSrcweir } 181cdf0e10cSrcweir 182cdf0e10cSrcweir /************************************************************************* 183cdf0e10cSrcweir |* 184cdf0e10cSrcweir |* 185cdf0e10cSrcweir |* 186cdf0e10cSrcweir \************************************************************************/ 187cdf0e10cSrcweir 188cdf0e10cSrcweir void SdModifyFieldDlg::FillFormatList() 189cdf0e10cSrcweir { 190cdf0e10cSrcweir LanguageType eLangType = maLbLanguage.GetSelectLanguage(); 191cdf0e10cSrcweir 192cdf0e10cSrcweir aLbFormat.Clear(); 193cdf0e10cSrcweir 194cdf0e10cSrcweir if( pField->ISA( SvxDateField ) ) 195cdf0e10cSrcweir { 196cdf0e10cSrcweir const SvxDateField* pDateField = (const SvxDateField*) pField; 197cdf0e10cSrcweir SvxDateField aDateField( *pDateField ); 198cdf0e10cSrcweir 199cdf0e10cSrcweir //SVXDATEFORMAT_APPDEFAULT, // Wird nicht benutzt 200cdf0e10cSrcweir //SVXDATEFORMAT_SYSTEM, // Wird nicht benutzt 201cdf0e10cSrcweir aLbFormat.InsertEntry( String( SdResId( STR_STANDARD_SMALL ) ) ); 202cdf0e10cSrcweir aLbFormat.InsertEntry( String( SdResId( STR_STANDARD_BIG ) ) ); 203cdf0e10cSrcweir 204cdf0e10cSrcweir SvNumberFormatter* pNumberFormatter = SD_MOD()->GetNumberFormatter(); 205cdf0e10cSrcweir aDateField.SetFormat( SVXDATEFORMAT_A ); // 13.02.96 206cdf0e10cSrcweir aLbFormat.InsertEntry( aDateField.GetFormatted( *pNumberFormatter, eLangType ) ); 207cdf0e10cSrcweir aDateField.SetFormat( SVXDATEFORMAT_B ); // 13.02.1996 208cdf0e10cSrcweir aLbFormat.InsertEntry( aDateField.GetFormatted( *pNumberFormatter, eLangType ) ); 209cdf0e10cSrcweir aDateField.SetFormat( SVXDATEFORMAT_C ); // 13.Feb 1996 210cdf0e10cSrcweir aLbFormat.InsertEntry( aDateField.GetFormatted( *pNumberFormatter, eLangType ) ); 211cdf0e10cSrcweir aDateField.SetFormat( SVXDATEFORMAT_D ); // 13.Februar 1996 212cdf0e10cSrcweir aLbFormat.InsertEntry( aDateField.GetFormatted( *pNumberFormatter, eLangType ) ); 213cdf0e10cSrcweir aDateField.SetFormat( SVXDATEFORMAT_E ); // Die, 13.Februar 1996 214cdf0e10cSrcweir aLbFormat.InsertEntry( aDateField.GetFormatted( *pNumberFormatter, eLangType ) ); 215cdf0e10cSrcweir aDateField.SetFormat( SVXDATEFORMAT_F ); // Dienstag, 13.Februar 1996 216cdf0e10cSrcweir aLbFormat.InsertEntry( aDateField.GetFormatted( *pNumberFormatter, eLangType ) ); 217cdf0e10cSrcweir 218cdf0e10cSrcweir aLbFormat.SelectEntryPos( (sal_uInt16) ( pDateField->GetFormat() - 2 ) ); 219cdf0e10cSrcweir } 220cdf0e10cSrcweir else if( pField->ISA( SvxExtTimeField ) ) 221cdf0e10cSrcweir { 222cdf0e10cSrcweir const SvxExtTimeField* pTimeField = (const SvxExtTimeField*) pField; 223cdf0e10cSrcweir SvxExtTimeField aTimeField( *pTimeField ); 224cdf0e10cSrcweir 225cdf0e10cSrcweir //SVXTIMEFORMAT_APPDEFAULT, // Wird nicht benutzt 226cdf0e10cSrcweir //SVXTIMEFORMAT_SYSTEM, // Wird nicht benutzt 227cdf0e10cSrcweir aLbFormat.InsertEntry( String( SdResId( STR_STANDARD_NORMAL ) ) ); 228cdf0e10cSrcweir 229cdf0e10cSrcweir SvNumberFormatter* pNumberFormatter = SD_MOD()->GetNumberFormatter(); 230cdf0e10cSrcweir aTimeField.SetFormat( SVXTIMEFORMAT_24_HM ); // 13:49 231cdf0e10cSrcweir aLbFormat.InsertEntry( aTimeField.GetFormatted( *pNumberFormatter, eLangType ) ); 232cdf0e10cSrcweir aTimeField.SetFormat( SVXTIMEFORMAT_24_HMS ); // 13:49:38 233cdf0e10cSrcweir aLbFormat.InsertEntry( aTimeField.GetFormatted( *pNumberFormatter, eLangType ) ); 234cdf0e10cSrcweir aTimeField.SetFormat( SVXTIMEFORMAT_24_HMSH ); // 13:49:38.78 235cdf0e10cSrcweir aLbFormat.InsertEntry( aTimeField.GetFormatted( *pNumberFormatter, eLangType ) ); 236cdf0e10cSrcweir aTimeField.SetFormat( SVXTIMEFORMAT_12_HM ); // 01:49 237cdf0e10cSrcweir aLbFormat.InsertEntry( aTimeField.GetFormatted( *pNumberFormatter, eLangType ) ); 238cdf0e10cSrcweir aTimeField.SetFormat( SVXTIMEFORMAT_12_HMS ); // 01:49:38 239cdf0e10cSrcweir aLbFormat.InsertEntry( aTimeField.GetFormatted( *pNumberFormatter, eLangType ) ); 240cdf0e10cSrcweir aTimeField.SetFormat( SVXTIMEFORMAT_12_HMSH ); // 01:49:38.78 241cdf0e10cSrcweir aLbFormat.InsertEntry( aTimeField.GetFormatted( *pNumberFormatter, eLangType ) ); 242cdf0e10cSrcweir //SVXTIMEFORMAT_AM_HM, // 01:49 PM 243cdf0e10cSrcweir //SVXTIMEFORMAT_AM_HMS, // 01:49:38 PM 244cdf0e10cSrcweir //SVXTIMEFORMAT_AM_HMSH // 01:49:38.78 PM 245cdf0e10cSrcweir 246cdf0e10cSrcweir aLbFormat.SelectEntryPos( (sal_uInt16) ( pTimeField->GetFormat() - 2 ) ); 247cdf0e10cSrcweir } 248cdf0e10cSrcweir else if( pField->ISA( SvxExtFileField ) ) 249cdf0e10cSrcweir { 250cdf0e10cSrcweir const SvxExtFileField* pFileField = (const SvxExtFileField*) pField; 251cdf0e10cSrcweir SvxExtFileField aFileField( *pFileField ); 252cdf0e10cSrcweir 253cdf0e10cSrcweir aLbFormat.InsertEntry( String( SdResId( STR_FILEFORMAT_NAME_EXT ) ) ); 254cdf0e10cSrcweir aLbFormat.InsertEntry( String( SdResId( STR_FILEFORMAT_FULLPATH ) ) ); 255cdf0e10cSrcweir aLbFormat.InsertEntry( String( SdResId( STR_FILEFORMAT_PATH ) ) ); 256cdf0e10cSrcweir aLbFormat.InsertEntry( String( SdResId( STR_FILEFORMAT_NAME ) ) ); 257cdf0e10cSrcweir 258cdf0e10cSrcweir aLbFormat.SelectEntryPos( (sal_uInt16) ( pFileField->GetFormat() ) ); 259cdf0e10cSrcweir } 260cdf0e10cSrcweir else if( pField->ISA( SvxAuthorField ) ) 261cdf0e10cSrcweir { 262cdf0e10cSrcweir const SvxAuthorField* pAuthorField = (const SvxAuthorField*) pField; 263cdf0e10cSrcweir SvxAuthorField aAuthorField( *pAuthorField ); 264cdf0e10cSrcweir 265cdf0e10cSrcweir for( sal_uInt16 i = 0; i < 4; i++ ) 266cdf0e10cSrcweir { 267cdf0e10cSrcweir aAuthorField.SetFormat( (SvxAuthorFormat) i ); 268cdf0e10cSrcweir aLbFormat.InsertEntry( aAuthorField.GetFormatted() ); 269cdf0e10cSrcweir } 270cdf0e10cSrcweir 271cdf0e10cSrcweir aLbFormat.SelectEntryPos( (sal_uInt16) ( pAuthorField->GetFormat() ) ); 272cdf0e10cSrcweir 273cdf0e10cSrcweir } 274cdf0e10cSrcweir 275cdf0e10cSrcweir 276cdf0e10cSrcweir } 277cdf0e10cSrcweir 278cdf0e10cSrcweir void SdModifyFieldDlg::FillControls() 279cdf0e10cSrcweir { 280cdf0e10cSrcweir aLbFormat.Clear(); 281cdf0e10cSrcweir 282cdf0e10cSrcweir if( pField->ISA( SvxDateField ) ) 283cdf0e10cSrcweir { 284cdf0e10cSrcweir const SvxDateField* pDateField = (const SvxDateField*) pField; 285cdf0e10cSrcweir SvxDateField aDateField( *pDateField ); 286cdf0e10cSrcweir 287cdf0e10cSrcweir if( pDateField->GetType() == SVXDATETYPE_FIX ) 288cdf0e10cSrcweir aRbtFix.Check(); 289cdf0e10cSrcweir else 290cdf0e10cSrcweir aRbtVar.Check(); 291cdf0e10cSrcweir } 292cdf0e10cSrcweir else if( pField->ISA( SvxExtTimeField ) ) 293cdf0e10cSrcweir { 294cdf0e10cSrcweir const SvxExtTimeField* pTimeField = (const SvxExtTimeField*) pField; 295cdf0e10cSrcweir SvxExtTimeField aTimeField( *pTimeField ); 296cdf0e10cSrcweir 297cdf0e10cSrcweir if( pTimeField->GetType() == SVXTIMETYPE_FIX ) 298cdf0e10cSrcweir aRbtFix.Check(); 299cdf0e10cSrcweir else 300cdf0e10cSrcweir aRbtVar.Check(); 301cdf0e10cSrcweir } 302cdf0e10cSrcweir else if( pField->ISA( SvxExtFileField ) ) 303cdf0e10cSrcweir { 304cdf0e10cSrcweir const SvxExtFileField* pFileField = (const SvxExtFileField*) pField; 305cdf0e10cSrcweir SvxExtFileField aFileField( *pFileField ); 306cdf0e10cSrcweir 307cdf0e10cSrcweir if( pFileField->GetType() == SVXFILETYPE_FIX ) 308cdf0e10cSrcweir aRbtFix.Check(); 309cdf0e10cSrcweir else 310cdf0e10cSrcweir aRbtVar.Check(); 311cdf0e10cSrcweir } 312cdf0e10cSrcweir else if( pField->ISA( SvxAuthorField ) ) 313cdf0e10cSrcweir { 314cdf0e10cSrcweir const SvxAuthorField* pAuthorField = (const SvxAuthorField*) pField; 315cdf0e10cSrcweir SvxAuthorField aAuthorField( *pAuthorField ); 316cdf0e10cSrcweir 317cdf0e10cSrcweir if( pAuthorField->GetType() == SVXAUTHORTYPE_FIX ) 318cdf0e10cSrcweir aRbtFix.Check(); 319cdf0e10cSrcweir else 320cdf0e10cSrcweir aRbtVar.Check(); 321cdf0e10cSrcweir } 322cdf0e10cSrcweir aRbtFix.SaveValue(); 323cdf0e10cSrcweir aRbtVar.SaveValue(); 324cdf0e10cSrcweir 325cdf0e10cSrcweir const SfxPoolItem* pItem; 326cdf0e10cSrcweir if( SFX_ITEM_SET == maInputSet.GetItemState(EE_CHAR_LANGUAGE, sal_True, &pItem ) ) 327cdf0e10cSrcweir maLbLanguage.SelectLanguage( static_cast<const SvxLanguageItem*>(pItem)->GetLanguage() ); 328cdf0e10cSrcweir 329cdf0e10cSrcweir maLbLanguage.SaveValue(); 330cdf0e10cSrcweir 331cdf0e10cSrcweir FillFormatList(); 332cdf0e10cSrcweir aLbFormat.SaveValue(); 333cdf0e10cSrcweir } 334cdf0e10cSrcweir 335cdf0e10cSrcweir 336cdf0e10cSrcweir IMPL_LINK( SdModifyFieldDlg, LanguageChangeHdl, void *, EMPTYARG ) 337cdf0e10cSrcweir { 338cdf0e10cSrcweir FillFormatList(); 339cdf0e10cSrcweir 340cdf0e10cSrcweir return 0L; 341cdf0e10cSrcweir } 342cdf0e10cSrcweir 343cdf0e10cSrcweir SfxItemSet SdModifyFieldDlg::GetItemSet() 344cdf0e10cSrcweir { 345cdf0e10cSrcweir SfxItemSet aOutput( *maInputSet.GetPool(), EE_CHAR_LANGUAGE, EE_CHAR_LANGUAGE_CTL ); 346cdf0e10cSrcweir 347cdf0e10cSrcweir if( maLbLanguage.GetSelectEntryPos() != maLbLanguage.GetSavedValue() ) 348cdf0e10cSrcweir { 349cdf0e10cSrcweir LanguageType eLangType = maLbLanguage.GetSelectLanguage(); 350cdf0e10cSrcweir SvxLanguageItem aItem( eLangType, EE_CHAR_LANGUAGE ); 351cdf0e10cSrcweir aOutput.Put( aItem ); 352cdf0e10cSrcweir 353cdf0e10cSrcweir SvxLanguageItem aItemCJK( eLangType, EE_CHAR_LANGUAGE_CJK ); 354cdf0e10cSrcweir aOutput.Put( aItemCJK ); 355cdf0e10cSrcweir 356cdf0e10cSrcweir SvxLanguageItem aItemCTL( eLangType, EE_CHAR_LANGUAGE_CTL ); 357cdf0e10cSrcweir aOutput.Put( aItemCTL ); 358cdf0e10cSrcweir } 359cdf0e10cSrcweir 360cdf0e10cSrcweir return aOutput; 361cdf0e10cSrcweir } 362cdf0e10cSrcweir 363