unoprov.cxx (28806869) unoprov.cxx (14aea626)
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

--- 1216 unchanged lines hidden (view full) ---

1225 rString = String( aNewRes );
1226 return sal_True;
1227 }
1228 }
1229
1230 return sal_False;
1231}
1232
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

--- 1216 unchanged lines hidden (view full) ---

1225 rString = String( aNewRes );
1226 return sal_True;
1227 }
1228 }
1229
1230 return sal_False;
1231}
1232
1233//////////////////////////////////////////////////////////////////////////////
1234// #122649# Some comments on the below arrays:
1235// - They need to have the same order and count of items
1236// - They are used to translate between translated and non-translated color names
1237// - To make longer names be found which start with the same basic string,
1238// these have to be in front of others
1239//
1240// It would be nice to:
1241// - evtl. organize these in a single array with 2-dimensional inner to elliminate
1242// the possibility to define it wrong
1243// - change the compare to also work when a shorter name is in front of a longer one
1244
1233static sal_uInt16 __READONLY_DATA SvxUnoColorNameDefResId[] =
1234{
1235 RID_SVXSTR_COLOR_BLUEGREY_DEF,
1236 RID_SVXSTR_COLOR_BLACK_DEF,
1245static sal_uInt16 __READONLY_DATA SvxUnoColorNameDefResId[] =
1246{
1247 RID_SVXSTR_COLOR_BLUEGREY_DEF,
1248 RID_SVXSTR_COLOR_BLACK_DEF,
1249 RID_SVXSTR_COLOR_BLUE_CLASSIC_DEF,
1237 RID_SVXSTR_COLOR_BLUE_DEF,
1238 RID_SVXSTR_COLOR_GREEN_DEF,
1239 RID_SVXSTR_COLOR_CYAN_DEF,
1240 RID_SVXSTR_COLOR_RED_DEF,
1241 RID_SVXSTR_COLOR_MAGENTA_DEF,
1242 RID_SVXSTR_COLOR_GREY_DEF,
1250 RID_SVXSTR_COLOR_BLUE_DEF,
1251 RID_SVXSTR_COLOR_GREEN_DEF,
1252 RID_SVXSTR_COLOR_CYAN_DEF,
1253 RID_SVXSTR_COLOR_RED_DEF,
1254 RID_SVXSTR_COLOR_MAGENTA_DEF,
1255 RID_SVXSTR_COLOR_GREY_DEF,
1256 RID_SVXSTR_COLOR_YELLOWGREEN_DEF,
1243 RID_SVXSTR_COLOR_YELLOW_DEF,
1244 RID_SVXSTR_COLOR_WHITE_DEF,
1245 RID_SVXSTR_COLOR_ORANGE_DEF,
1246 RID_SVXSTR_COLOR_VIOLET_DEF,
1247 RID_SVXSTR_COLOR_BORDEAUX_DEF,
1248 RID_SVXSTR_COLOR_PALE_YELLOW_DEF,
1249 RID_SVXSTR_COLOR_PALE_GREEN_DEF,
1250 RID_SVXSTR_COLOR_DARKVIOLET_DEF,
1251 RID_SVXSTR_COLOR_SALMON_DEF,
1252 RID_SVXSTR_COLOR_SEABLUE_DEF,
1253 RID_SVXSTR_COLOR_CHART_DEF,
1254 RID_SVXSTR_COLOR_PURPLE_DEF,
1255 RID_SVXSTR_COLOR_SKYBLUE_DEF,
1257 RID_SVXSTR_COLOR_YELLOW_DEF,
1258 RID_SVXSTR_COLOR_WHITE_DEF,
1259 RID_SVXSTR_COLOR_ORANGE_DEF,
1260 RID_SVXSTR_COLOR_VIOLET_DEF,
1261 RID_SVXSTR_COLOR_BORDEAUX_DEF,
1262 RID_SVXSTR_COLOR_PALE_YELLOW_DEF,
1263 RID_SVXSTR_COLOR_PALE_GREEN_DEF,
1264 RID_SVXSTR_COLOR_DARKVIOLET_DEF,
1265 RID_SVXSTR_COLOR_SALMON_DEF,
1266 RID_SVXSTR_COLOR_SEABLUE_DEF,
1267 RID_SVXSTR_COLOR_CHART_DEF,
1268 RID_SVXSTR_COLOR_PURPLE_DEF,
1269 RID_SVXSTR_COLOR_SKYBLUE_DEF,
1256 RID_SVXSTR_COLOR_YELLOWGREEN_DEF,
1257 RID_SVXSTR_COLOR_PINK_DEF,
1258 RID_SVXSTR_COLOR_TURQUOISE_DEF,
1270 RID_SVXSTR_COLOR_PINK_DEF,
1271 RID_SVXSTR_COLOR_TURQUOISE_DEF,
1259 RID_SVXSTR_COLOR_BLUE_CLASSIC_DEF
1260};
1261
1262static sal_uInt16 __READONLY_DATA SvxUnoColorNameResId[] =
1263{
1264 RID_SVXSTR_COLOR_BLUEGREY,
1265 RID_SVXSTR_COLOR_BLACK,
1272};
1273
1274static sal_uInt16 __READONLY_DATA SvxUnoColorNameResId[] =
1275{
1276 RID_SVXSTR_COLOR_BLUEGREY,
1277 RID_SVXSTR_COLOR_BLACK,
1278 RID_SVXSTR_COLOR_BLUE_CLASSIC,
1266 RID_SVXSTR_COLOR_BLUE,
1267 RID_SVXSTR_COLOR_GREEN,
1268 RID_SVXSTR_COLOR_CYAN,
1269 RID_SVXSTR_COLOR_RED,
1270 RID_SVXSTR_COLOR_MAGENTA,
1271 RID_SVXSTR_COLOR_GREY,
1279 RID_SVXSTR_COLOR_BLUE,
1280 RID_SVXSTR_COLOR_GREEN,
1281 RID_SVXSTR_COLOR_CYAN,
1282 RID_SVXSTR_COLOR_RED,
1283 RID_SVXSTR_COLOR_MAGENTA,
1284 RID_SVXSTR_COLOR_GREY,
1285 RID_SVXSTR_COLOR_YELLOWGREEN,
1272 RID_SVXSTR_COLOR_YELLOW,
1273 RID_SVXSTR_COLOR_WHITE,
1274 RID_SVXSTR_COLOR_ORANGE,
1275 RID_SVXSTR_COLOR_VIOLET,
1276 RID_SVXSTR_COLOR_BORDEAUX,
1277 RID_SVXSTR_COLOR_PALE_YELLOW,
1278 RID_SVXSTR_COLOR_PALE_GREEN,
1279 RID_SVXSTR_COLOR_DARKVIOLET,
1280 RID_SVXSTR_COLOR_SALMON,
1281 RID_SVXSTR_COLOR_SEABLUE,
1282 RID_SVXSTR_COLOR_CHART,
1283 RID_SVXSTR_COLOR_PURPLE,
1284 RID_SVXSTR_COLOR_SKYBLUE,
1286 RID_SVXSTR_COLOR_YELLOW,
1287 RID_SVXSTR_COLOR_WHITE,
1288 RID_SVXSTR_COLOR_ORANGE,
1289 RID_SVXSTR_COLOR_VIOLET,
1290 RID_SVXSTR_COLOR_BORDEAUX,
1291 RID_SVXSTR_COLOR_PALE_YELLOW,
1292 RID_SVXSTR_COLOR_PALE_GREEN,
1293 RID_SVXSTR_COLOR_DARKVIOLET,
1294 RID_SVXSTR_COLOR_SALMON,
1295 RID_SVXSTR_COLOR_SEABLUE,
1296 RID_SVXSTR_COLOR_CHART,
1297 RID_SVXSTR_COLOR_PURPLE,
1298 RID_SVXSTR_COLOR_SKYBLUE,
1285 RID_SVXSTR_COLOR_YELLOWGREEN,
1286 RID_SVXSTR_COLOR_PINK,
1287 RID_SVXSTR_COLOR_TURQUOISE,
1299 RID_SVXSTR_COLOR_PINK,
1300 RID_SVXSTR_COLOR_TURQUOISE,
1288 RID_SVXSTR_COLOR_BLUE_CLASSIC
1289};
1290
1301};
1302
1303//////////////////////////////////////////////////////////////////////////////
1304
1291bool SvxUnoConvertResourceString( sal_uInt16* pSourceResIds, sal_uInt16* pDestResIds, int nCount, String& rString ) throw()
1292{
1293 int i = 0;
1294
1295 for( i = 0; i < nCount; i++ )
1296 {
1297 String aStrDefName = SVX_RESSTR( pSourceResIds[i] );
1298 if( rString.Search( aStrDefName ) == 0 )

--- 123 unchanged lines hidden ---
1305bool SvxUnoConvertResourceString( sal_uInt16* pSourceResIds, sal_uInt16* pDestResIds, int nCount, String& rString ) throw()
1306{
1307 int i = 0;
1308
1309 for( i = 0; i < nCount; i++ )
1310 {
1311 String aStrDefName = SVX_RESSTR( pSourceResIds[i] );
1312 if( rString.Search( aStrDefName ) == 0 )

--- 123 unchanged lines hidden ---