svdattr.cxx (1e9c32af) svdattr.cxx (027cdf4a)
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

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

1405{
1406 sal_Int32 nValue(GetValue());
1407
1408 if(!nValue)
1409 nValue = -1L;
1410
1411 if(nValue < 0)
1412 {
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

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

1405{
1406 sal_Int32 nValue(GetValue());
1407
1408 if(!nValue)
1409 nValue = -1L;
1410
1411 if(nValue < 0)
1412 {
1413 sal_Char aText[] = "pixel";
1413 const sal_Char aText[] = "pixel";
1414
1415 rText = UniString::CreateFromInt32(-nValue);
1414
1415 rText = UniString::CreateFromInt32(-nValue);
1416 rText += UniString(aText, sizeof(aText-1));
1416 rText += UniString(aText, sizeof(aText)-1);
1417 }
1418 else
1419 {
1420 SdrFormatter aFmt((MapUnit)eCoreMetric, (MapUnit)ePresMetric);
1421 XubString aStr;
1422
1423 aFmt.TakeStr(nValue, rText);
1424 aFmt.TakeUnitStr((MapUnit)ePresMetric, aStr);

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

2036sal_uInt16 __EXPORT SdrMeasureUnitItem::GetValueCount() const { return 14; }
2037
2038XubString __EXPORT SdrMeasureUnitItem::GetValueTextByPos(sal_uInt16 nPos) const
2039{
2040 XubString aRetval;
2041
2042 if((FieldUnit)nPos == FUNIT_NONE)
2043 {
1417 }
1418 else
1419 {
1420 SdrFormatter aFmt((MapUnit)eCoreMetric, (MapUnit)ePresMetric);
1421 XubString aStr;
1422
1423 aFmt.TakeStr(nValue, rText);
1424 aFmt.TakeUnitStr((MapUnit)ePresMetric, aStr);

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

2036sal_uInt16 __EXPORT SdrMeasureUnitItem::GetValueCount() const { return 14; }
2037
2038XubString __EXPORT SdrMeasureUnitItem::GetValueTextByPos(sal_uInt16 nPos) const
2039{
2040 XubString aRetval;
2041
2042 if((FieldUnit)nPos == FUNIT_NONE)
2043 {
2044 sal_Char aText[] = "default";
2045 aRetval += UniString(aText, sizeof(aText-1));
2044 cont sal_Char aText[] = "default";
2045 aRetval += UniString(aText, sizeof(aText)-1);
2046 }
2047 else
2048 {
2049 SdrFormatter::TakeUnitStr((FieldUnit)nPos, aRetval);
2050 }
2051
2052 return aRetval;
2053}

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

2349XubString __EXPORT SdrGrafModeItem::GetValueTextByPos(sal_uInt16 nPos) const
2350{
2351 XubString aStr;
2352
2353 switch(nPos)
2354 {
2355 case 1:
2356 {
2046 }
2047 else
2048 {
2049 SdrFormatter::TakeUnitStr((FieldUnit)nPos, aRetval);
2050 }
2051
2052 return aRetval;
2053}

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

2349XubString __EXPORT SdrGrafModeItem::GetValueTextByPos(sal_uInt16 nPos) const
2350{
2351 XubString aStr;
2352
2353 switch(nPos)
2354 {
2355 case 1:
2356 {
2357 sal_Char aTextGreys[] = "Greys";
2358 aStr += UniString(aTextGreys, sizeof(aTextGreys-1));
2357 const sal_Char aTextGreys[] = "Greys";
2358 aStr += UniString(aTextGreys, sizeof(aTextGreys)-1);
2359 break;
2360 }
2361 case 2:
2362 {
2359 break;
2360 }
2361 case 2:
2362 {
2363 sal_Char aTextBlackWhite[] = "Black/White";
2364 aStr += UniString(aTextBlackWhite, sizeof(aTextBlackWhite-1));
2363 const sal_Char aTextBlackWhite[] = "Black/White";
2364 aStr += UniString(aTextBlackWhite, sizeof(aTextBlackWhite)-1);
2365 break;
2366 }
2367 case 3:
2368 {
2365 break;
2366 }
2367 case 3:
2368 {
2369 sal_Char aTextWatermark[] = "Watermark";
2370 aStr += UniString(aTextWatermark, sizeof(aTextWatermark-1));
2369 const sal_Char aTextWatermark[] = "Watermark";
2370 aStr += UniString(aTextWatermark, sizeof(aTextWatermark)-1);
2371 break;
2372 }
2373 default:
2374 {
2371 break;
2372 }
2373 default:
2374 {
2375 sal_Char aTextStandard[] = "Standard";
2376 aStr += UniString(aTextStandard, sizeof(aTextStandard-1));
2375 const sal_Char aTextStandard[] = "Standard";
2376 aStr += UniString(aTextStandard, sizeof(aTextStandard)-1);
2377 break;
2378 }
2379 }
2380
2381 return aStr;
2382}
2383
2384SfxItemPresentation __EXPORT SdrGrafModeItem::GetPresentation( SfxItemPresentation ePres,

--- 40 unchanged lines hidden ---
2377 break;
2378 }
2379 }
2380
2381 return aStr;
2382}
2383
2384SfxItemPresentation __EXPORT SdrGrafModeItem::GetPresentation( SfxItemPresentation ePres,

--- 40 unchanged lines hidden ---