settings.cxx (b797cecf) | settings.cxx (ddd81bc4) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 681 unchanged lines hidden (view full) --- 690 691::rtl::OUString StyleSettings::ImplSymbolsStyleToName( sal_uLong nStyle ) const 692{ 693 switch ( nStyle ) 694 { 695 case STYLE_SYMBOLS_DEFAULT: return ::rtl::OUString::createFromAscii( "default" ); 696 case STYLE_SYMBOLS_HICONTRAST: return ::rtl::OUString::createFromAscii( "hicontrast" ); 697 case STYLE_SYMBOLS_INDUSTRIAL: return ::rtl::OUString::createFromAscii( "industrial" ); | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 681 unchanged lines hidden (view full) --- 690 691::rtl::OUString StyleSettings::ImplSymbolsStyleToName( sal_uLong nStyle ) const 692{ 693 switch ( nStyle ) 694 { 695 case STYLE_SYMBOLS_DEFAULT: return ::rtl::OUString::createFromAscii( "default" ); 696 case STYLE_SYMBOLS_HICONTRAST: return ::rtl::OUString::createFromAscii( "hicontrast" ); 697 case STYLE_SYMBOLS_INDUSTRIAL: return ::rtl::OUString::createFromAscii( "industrial" ); |
698 case STYLE_SYMBOLS_CRYSTAL: return ::rtl::OUString::createFromAscii( "crystal" ); | |
699 case STYLE_SYMBOLS_TANGO: return ::rtl::OUString::createFromAscii( "tango" ); 700 case STYLE_SYMBOLS_CLASSIC: return ::rtl::OUString::createFromAscii( "classic" ); 701 } 702 703 return ::rtl::OUString::createFromAscii( "auto" ); 704} 705 706// ----------------------------------------------------------------------- 707 708sal_uLong StyleSettings::ImplNameToSymbolsStyle( const ::rtl::OUString &rName ) const 709{ 710 if ( rName == ::rtl::OUString::createFromAscii( "default" ) ) 711 return STYLE_SYMBOLS_DEFAULT; 712 else if ( rName == ::rtl::OUString::createFromAscii( "hicontrast" ) ) 713 return STYLE_SYMBOLS_HICONTRAST; 714 else if ( rName == ::rtl::OUString::createFromAscii( "industrial" ) ) 715 return STYLE_SYMBOLS_INDUSTRIAL; | 698 case STYLE_SYMBOLS_TANGO: return ::rtl::OUString::createFromAscii( "tango" ); 699 case STYLE_SYMBOLS_CLASSIC: return ::rtl::OUString::createFromAscii( "classic" ); 700 } 701 702 return ::rtl::OUString::createFromAscii( "auto" ); 703} 704 705// ----------------------------------------------------------------------- 706 707sal_uLong StyleSettings::ImplNameToSymbolsStyle( const ::rtl::OUString &rName ) const 708{ 709 if ( rName == ::rtl::OUString::createFromAscii( "default" ) ) 710 return STYLE_SYMBOLS_DEFAULT; 711 else if ( rName == ::rtl::OUString::createFromAscii( "hicontrast" ) ) 712 return STYLE_SYMBOLS_HICONTRAST; 713 else if ( rName == ::rtl::OUString::createFromAscii( "industrial" ) ) 714 return STYLE_SYMBOLS_INDUSTRIAL; |
716 else if ( rName == ::rtl::OUString::createFromAscii( "crystal" ) ) 717 return STYLE_SYMBOLS_CRYSTAL; | |
718 else if ( rName == ::rtl::OUString::createFromAscii( "tango" ) ) 719 return STYLE_SYMBOLS_TANGO; 720 else if ( rName == ::rtl::OUString::createFromAscii( "classic" ) ) 721 return STYLE_SYMBOLS_CLASSIC; 722 723 return STYLE_SYMBOLS_AUTO; 724} 725 --- 73 unchanged lines hidden (view full) --- 799 bCont = false; 800 } 801 catch ( ::com::sun::star::uno::Exception& ) 802 { 803 } 804 805 if( bCont ) 806 { | 715 else if ( rName == ::rtl::OUString::createFromAscii( "tango" ) ) 716 return STYLE_SYMBOLS_TANGO; 717 else if ( rName == ::rtl::OUString::createFromAscii( "classic" ) ) 718 return STYLE_SYMBOLS_CLASSIC; 719 720 return STYLE_SYMBOLS_AUTO; 721} 722 --- 73 unchanged lines hidden (view full) --- 796 bCont = false; 797 } 798 catch ( ::com::sun::star::uno::Exception& ) 799 { 800 } 801 802 if( bCont ) 803 { |
807 if( rDesktopEnvironment.equalsIgnoreAsciiCaseAscii( "gnome" ) ) | 804 if( rDesktopEnvironment.equalsIgnoreAsciiCaseAscii( "gnome" ) || 805 rDesktopEnvironment.equalsIgnoreAsciiCaseAscii( "kde" ) ) |
808 nRet = STYLE_SYMBOLS_TANGO; | 806 nRet = STYLE_SYMBOLS_TANGO; |
809 else if( rDesktopEnvironment.equalsIgnoreAsciiCaseAscii( "kde" ) ) 810 nRet = STYLE_SYMBOLS_CRYSTAL; | |
811 } 812 813 // falback to any existing style 814 if ( ! CheckSymbolStyle (nRet) ) 815 { 816 for ( sal_uLong n = 0 ; n <= STYLE_SYMBOLS_THEMES_MAX ; n++ ) 817 { 818 sal_uLong nStyleToCheck = n; --- 1217 unchanged lines hidden --- | 807 } 808 809 // falback to any existing style 810 if ( ! CheckSymbolStyle (nRet) ) 811 { 812 for ( sal_uLong n = 0 ; n <= STYLE_SYMBOLS_THEMES_MAX ; n++ ) 813 { 814 sal_uLong nStyleToCheck = n; --- 1217 unchanged lines hidden --- |