merge the formfield patch from ooo-build
[ooovba.git] / applied_patches / 0356-kde4-oxygen-icons.diff
blobecd8fb3acc5998befef51ef7de63c2776bf1f011
1 diff --git officecfg/registry/schema/org/openoffice/Office/Common.xcs officecfg/registry/schema/org/openoffice/Office/Common.xcs
2 index 6645930..a36dc74 100644
3 --- officecfg/registry/schema/org/openoffice/Office/Common.xcs
4 +++ officecfg/registry/schema/org/openoffice/Office/Common.xcs
5 @@ -5727,6 +5727,11 @@ Dymamic border coloring means that when the mouse is hovered over a control, and
6 <desc>Classic - the OpenOffice.org 2.0 default theme</desc>
7 </info>
8 </enumeration>
9 + <enumeration oor:value="oxygen">
10 + <info>
11 + <desc>Oxygen - the KDE4 default theme</desc>
12 + </info>
13 + </enumeration>
14 </constraints>
15 <value>auto</value>
16 </prop>
17 diff --git packimages/pack/makefile.mk packimages/pack/makefile.mk
18 index a9e1089..2a29b04 100644
19 --- packimages/pack/makefile.mk
20 +++ packimages/pack/makefile.mk
21 @@ -41,13 +41,14 @@ RSCCUSTOMIMG*=$(PRJ)
22 IMAGES := $(COMMONBIN)$/images.zip
23 SORTED_LIST=$(RES)$/img$/sorted.lst
24 # Custom sets, at 24x24 & 16x16 fall-back to industrial preferentially
25 -CUSTOM_IMAGE_SETS=hicontrast industrial crystal tango classic
26 +CUSTOM_IMAGE_SETS=hicontrast industrial crystal tango classic oxygen
27 CUSTOM_IMAGES+=$(foreach,i,$(CUSTOM_IMAGE_SETS) images_$i)
28 CUSTOM_PREFERRED_FALLBACK_1*=-c $(SOLARSRC)$/ooo_custom_images$/tango
29 CUSTOM_PREFERRED_FALLBACK_2*=-c $(SOLARSRC)$/ooo_custom_images$/industrial
31 CRYSTAL_TARBALL=$(SOLARSRC)$/external_images$/ooo_crystal_images-1.tar.gz
32 CLASSIC_TARBALL=$(SOLARSRC)$/ooo_custom_images$/classic/classic_images.tar.gz
33 +OXYGEN_TARBALL=$(SOLARSRC)$/external_images$/ooo_oxygen_images.tar.gz
35 ALLTAR : $(IMAGES) $(CUSTOM_IMAGES) $(COMMONBIN)$/images_brand.zip
37 @@ -88,6 +89,14 @@ $(MISC)$/crystal.flag : $(CRYSTAL_TARBALL)
38 chmod -R g+w $(MISC)$/crystal
39 .ENDIF
40 @$(TYPE) $@ || echo "ERROR: unpacking $(CRYSTAL_TARBALL) failed"
42 +# unpack the Oxygen icon set
43 +$(MISC)$/oxygen.flag : $(OXYGEN_TARBALL)
44 + cd $(MISC) && gzip -d -c $(OXYGEN_TARBALL) | ( tar -xf - ) && $(TOUCH) $(@:f)
45 +.IF "$(GUI)"=="UNX"
46 + chmod -R g+w $(MISC)$/oxygen
47 +.ENDIF
48 + @$(TYPE) $@ || echo "ERROR: unpacking $(OXYGEN_TARBALL) failed"
50 # unpack the classic icon set
51 $(MISC)$/classic.flag : $(CLASSIC_TARBALL)
52 @@ -104,3 +113,5 @@ images_crystal : $(MISC)$/crystal.flag $(RES)$/img$/commandimagelist.ilst
54 images_classic : $(MISC)$/classic.flag $(RES)$/img$/commandimagelist.ilst
56 +images_oxygen : $(MISC)$/oxygen.flag $(RES)$/img$/commandimagelist.ilst
58 diff --git scp2/source/ooo/file_ooo.scp scp2/source/ooo/file_ooo.scp
59 index 1c7465f..5857d16 100644
60 --- scp2/source/ooo/file_ooo.scp
61 +++ scp2/source/ooo/file_ooo.scp
62 @@ -2917,6 +2917,13 @@ File gid_File_ImagesCrystal_Zip
63 Styles = (PACKED);
64 End
66 +File gid_File_ImagesOxygen_Zip
67 + TXT_FILE_BODY;
68 + Dir = gid_Dir_Share_Config;
69 + Name = "images_oxygen.zip";
70 + Styles = (PACKED);
71 +End
73 File gid_File_ImagesHicontrast_Zip
74 TXT_FILE_BODY;
75 Dir = gid_Dir_Share_Config;
76 diff --git scp2/source/ooo/module_hidden_ooo.scp scp2/source/ooo/module_hidden_ooo.scp
77 index 51942be..e311c74 100644
78 --- scp2/source/ooo/module_hidden_ooo.scp
79 +++ scp2/source/ooo/module_hidden_ooo.scp
80 @@ -857,6 +857,7 @@ Module gid_Module_Root_Files_Images
81 Styles = (HIDDEN_ROOT);
82 Files = (gid_File_Images_Zip,
83 gid_File_ImagesCrystal_Zip,
84 + gid_File_ImagesOxygen_Zip,
85 gid_File_ImagesHicontrast_Zip,
86 gid_File_ImagesIndustrial_Zip,
87 gid_File_ImagesTango_Zip,
88 diff --git svtools/inc/imgdef.hxx svtools/inc/imgdef.hxx
89 index 6698e0e..1d38b88 100644
90 --- svtools/inc/imgdef.hxx
91 +++ svtools/inc/imgdef.hxx
92 @@ -47,5 +47,6 @@ enum SfxSymbolsStyle
93 SFX_SYMBOLS_STYLE_CRYSTAL,
94 SFX_SYMBOLS_STYLE_TANGO,
95 - SFX_SYMBOLS_STYLE_CLASSIC
96 + SFX_SYMBOLS_STYLE_CLASSIC,
97 + SFX_SYMBOLS_STYLE_OXYGEN
100 #define SFX_TOOLBOX_CHANGESYMBOLSET 0x0001
101 diff --git svtools/source/config/miscopt.cxx svtools/source/config/miscopt.cxx
102 index 99a225c..03239dc 100644
103 --- svtools/source/config/miscopt.cxx
104 +++ svtools/source/config/miscopt.cxx
105 @@ -308,5 +308,6 @@ static sal_Int16 implSymbolsStyleFromVCL( ULONG nStyle )
106 case STYLE_SYMBOLS_TANGO: return SFX_SYMBOLS_STYLE_TANGO;
107 case STYLE_SYMBOLS_CLASSIC: return SFX_SYMBOLS_STYLE_CLASSIC;
108 + case STYLE_SYMBOLS_OXYGEN: return SFX_SYMBOLS_STYLE_OXYGEN;
111 return SFX_SYMBOLS_STYLE_AUTO;
112 @@ -325,5 +326,6 @@ static ULONG implSymbolsStyleToVCL( sal_Int16 nStyle )
113 case SFX_SYMBOLS_STYLE_TANGO: return STYLE_SYMBOLS_TANGO;
114 case SFX_SYMBOLS_STYLE_CLASSIC: return STYLE_SYMBOLS_CLASSIC;
115 + case SFX_SYMBOLS_STYLE_OXYGEN: return STYLE_SYMBOLS_OXYGEN;
118 return STYLE_SYMBOLS_AUTO;
119 --- svx/source/cui/optgdlg.cxx
120 +++ svx/source/cui/optgdlg.cxx
121 @@ -818,5 +818,6 @@ OfaViewTabPage::OfaViewTabPage(Window* pParent, const SfxItemSet& rSet ) :
122 case STYLE_SYMBOLS_CLASSIC: aAutoStr += aIconStyleLB.GetEntry( 5 ); break;
123 case STYLE_SYMBOLS_HICONTRAST: aAutoStr += aIconStyleLB.GetEntry( 6 ); break;
124 + case STYLE_SYMBOLS_OXYGEN: aAutoStr += aIconStyleLB.GetEntry( 7 ); break;
127 aIconStyleLB.RemoveEntry( 0 );
128 @@ -880,5 +881,6 @@
129 case 5: eSet = SFX_SYMBOLS_STYLE_TANGO; break;
130 case 6: eSet = SFX_SYMBOLS_STYLE_CLASSIC; break;
131 + case 7: eSet = SFX_SYMBOLS_STYLE_OXYGEN; break;
132 default:
133 DBG_ERROR( "OfaViewTabPage::FillItemSet(): This state of aIconStyleLB should not be possible!" );
135 @@ -1052,5 +1054,6 @@
136 case SFX_SYMBOLS_STYLE_TANGO: nStyleLB_InitialSelection = 5; break;
137 case SFX_SYMBOLS_STYLE_CLASSIC: nStyleLB_InitialSelection = 6; break;
138 + case SFX_SYMBOLS_STYLE_OXYGEN: nStyleLB_InitialSelection = 7; break;
139 default: nStyleLB_InitialSelection = 0; break;
143 --- svx/source/cui/optgdlg.src
144 +++ svx/source/cui/optgdlg.src
145 @@ -259,5 +259,6 @@ TabPage OFA_TP_VIEW
146 < "Tango" ; > ;
147 < "Classic" ; > ;
148 + < "Oxygen" ; > ;
151 CheckBox CB_SYSTEM_FONT
152 diff --git vcl/inc/vcl/settings.hxx vcl/inc/vcl/settings.hxx
153 index 2cba172..19848c8 100644
154 --- vcl/inc/vcl/settings.hxx
155 +++ vcl/inc/vcl/settings.hxx
156 @@ -519,6 +519,7 @@ private:
157 #define STYLE_SYMBOLS_TANGO ((ULONG)5)
158 #define STYLE_SYMBOLS_CLASSIC ((ULONG)6)
159 -#define STYLE_SYMBOLS_THEMES_MAX ((ULONG)6)
160 +#define STYLE_SYMBOLS_OXYGEN ((ULONG)7)
161 +#define STYLE_SYMBOLS_THEMES_MAX ((ULONG)7)
163 #define STYLE_CURSOR_NOBLINKTIME ((ULONG)0xFFFFFFFF)
165 diff --git vcl/source/app/settings.cxx vcl/source/app/settings.cxx
166 index f6fcb3e..6ec27f7 100644
167 --- vcl/source/app/settings.cxx
168 +++ vcl/source/app/settings.cxx
169 @@ -711,5 +711,6 @@ void StyleSettings::Set3DColors( const Color& rColor )
170 case STYLE_SYMBOLS_TANGO: return ::rtl::OUString::createFromAscii( "tango" );
171 case STYLE_SYMBOLS_CLASSIC: return ::rtl::OUString::createFromAscii( "classic" );
172 + case STYLE_SYMBOLS_OXYGEN: return ::rtl::OUString::createFromAscii( "oxygen" );
175 return ::rtl::OUString::createFromAscii( "auto" );
176 @@ -734,4 +735,6 @@ ULONG StyleSettings::ImplNameToSymbolsStyle( const ::rtl::OUString &rName ) cons
177 return STYLE_SYMBOLS_CLASSIC;
178 + else if ( rName == ::rtl::OUString::createFromAscii( "oxygen" ) )
179 + return STYLE_SYMBOLS_OXYGEN;
181 return STYLE_SYMBOLS_AUTO;
183 @@ -856,6 +860,8 @@ ULONG StyleSettings::GetAutoSymbolsStyle() const
184 nRet = STYLE_SYMBOLS_HUMAN;
185 else if( rDesktopEnvironment.equalsIgnoreAsciiCaseAscii( "kde" ) )
186 nRet = STYLE_SYMBOLS_CRYSTAL;
187 + else if( rDesktopEnvironment.equalsIgnoreAsciiCaseAscii( "kde4" ) )
188 + nRet = STYLE_SYMBOLS_OXYGEN;
191 return nRet;