diff options
author | Povilas Kanapickas <povilas.kanapickas@gmail.com> | 2010-10-18 19:37:48 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2010-10-18 19:38:00 +0100 |
commit | bc8fcf207ffeee1dd6fb4a361b0ad5c5def21beb (patch) | |
tree | 43f54910146344613e641bd0b54cee3069292624 /xmloff/source/style | |
parent | 34f1c06830ae530bea4f11aca91e2836a53fd764 (diff) |
remove non-compiled code
Diffstat (limited to 'xmloff/source/style')
-rw-r--r-- | xmloff/source/style/styleexp.cxx | 26 | ||||
-rw-r--r-- | xmloff/source/style/xmlnumfi.cxx | 87 |
2 files changed, 2 insertions, 111 deletions
diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx index cb403008b424..29e126fe7310 100644 --- a/xmloff/source/style/styleexp.cxx +++ b/xmloff/source/style/styleexp.cxx @@ -384,32 +384,6 @@ sal_Bool XMLStyleExport::exportDefaultStyle( return sal_True; } -#if 0 -void XMLStyleExport::exportStyleFamily( - const sal_Char *pFamily, - const OUString& rXMLFamily, - const UniReference < XMLPropertySetMapper >& rPropMapper, - sal_Bool bUsed, sal_uInt16 nFamily, const OUString* pPrefix) -{ - const OUString sFamily(OUString::createFromAscii(pFamily )); - UniReference < SvXMLExportPropertyMapper > xExpPropMapper = - new SvXMLExportPropertyMapper( rPropMapper ); - exportStyleFamily( sFamily, rXMLFamily, xExpPropMapper, bUsed, nFamily, - pPrefix); -} - -void XMLStyleExport::exportStyleFamily( - const OUString& rFamily, const OUString& rXMLFamily, - const UniReference < XMLPropertySetMapper >& rPropMapper, - sal_Bool bUsed, sal_uInt16 nFamily, const OUString* pPrefix) -{ - UniReference < SvXMLExportPropertyMapper > xExpPropMapper = - new SvXMLExportPropertyMapper( rPropMapper ); - exportStyleFamily( rFamily, rXMLFamily, xExpPropMapper, bUsed, nFamily, - pPrefix); -} -#endif - void XMLStyleExport::exportStyleFamily( const sal_Char *pFamily, const OUString& rXMLFamily, diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index 71fc599d9565..32610072b572 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -1123,25 +1123,16 @@ void SvXMLNumFmtElementContext::EndElement() case XML_TOK_STYLE_DAY: rParent.UpdateCalendar( sCalendar ); -#if 0 //! I18N doesn't provide SYSTEM or extended date information yet - if ( rParent.IsFromSystem() ) - bEffLong = SvXMLNumFmtDefaults::IsSystemLongDay( rParent.GetInternational(), bLong ); -#endif + rParent.AddNfKeyword( sal::static_int_cast< sal_uInt16 >( bEffLong ? NF_KEY_DD : NF_KEY_D ) ); break; case XML_TOK_STYLE_MONTH: rParent.UpdateCalendar( sCalendar ); -#if 0 //! I18N doesn't provide SYSTEM or extended date information yet - if ( rParent.IsFromSystem() ) - { - bEffLong = SvXMLNumFmtDefaults::IsSystemLongMonth( rParent.GetInternational(), bLong ); - bTextual = SvXMLNumFmtDefaults::IsSystemTextualMonth( rParent.GetInternational(), bLong ); - } -#endif + rParent.AddNfKeyword( sal::static_int_cast< sal_uInt16 >( bTextual @@ -1150,11 +1141,7 @@ void SvXMLNumFmtElementContext::EndElement() break; case XML_TOK_STYLE_YEAR: rParent.UpdateCalendar( sCalendar ); -#if 0 //! I18N doesn't provide SYSTEM or extended date information yet - if ( rParent.IsFromSystem() ) - bEffLong = SvXMLNumFmtDefaults::IsSystemLongYear( rParent.GetInternational(), bLong ); -#endif // Y after G (era) is replaced by E if ( rParent.HasEra() ) rParent.AddNfKeyword( @@ -1167,11 +1154,7 @@ void SvXMLNumFmtElementContext::EndElement() break; case XML_TOK_STYLE_ERA: rParent.UpdateCalendar( sCalendar ); -#if 0 //! I18N doesn't provide SYSTEM or extended date information yet - if ( rParent.IsFromSystem() ) - bEffLong = SvXMLNumFmtDefaults::IsSystemLongEra( rParent.GetInternational(), bLong ); -#endif rParent.AddNfKeyword( sal::static_int_cast< sal_uInt16 >( bEffLong ? NF_KEY_GGG : NF_KEY_G ) ); @@ -1179,11 +1162,7 @@ void SvXMLNumFmtElementContext::EndElement() break; case XML_TOK_STYLE_DAY_OF_WEEK: rParent.UpdateCalendar( sCalendar ); -#if 0 //! I18N doesn't provide SYSTEM or extended date information yet - if ( rParent.IsFromSystem() ) - bEffLong = SvXMLNumFmtDefaults::IsSystemLongDayOfWeek( rParent.GetInternational(), bLong ); -#endif rParent.AddNfKeyword( sal::static_int_cast< sal_uInt16 >( bEffLong ? NF_KEY_NNNN : NF_KEY_NN ) ); @@ -1740,58 +1719,7 @@ sal_Int32 SvXMLNumFormatContext::CreateAndInsert(SvNumberFormatter* pFormatter) } } -#if 0 //! I18N doesn't provide SYSTEM or extended date information yet - if ( nIndex != NUMBERFORMAT_ENTRY_NOT_FOUND && !bFromSystem ) - { - // instead of automatic date format, use fixed formats if bFromSystem is not set - //! prevent use of automatic formats in other cases, force user-defined format? - - sal_uInt32 nNewIndex = nIndex; - - NfIndexTableOffset eOffset = pFormatter->GetIndexTableOffset( nIndex ); - if ( eOffset == NF_DATE_SYSTEM_SHORT ) - { - const International& rInt = pData->GetInternational( nFormatLang ); - if ( rInt.IsDateDayLeadingZero() && rInt.IsDateMonthLeadingZero() ) - { - if ( rInt.IsDateCentury() ) - nNewIndex = pFormatter->GetFormatIndex( NF_DATE_SYS_DDMMYYYY, nFormatLang ); - else - nNewIndex = pFormatter->GetFormatIndex( NF_DATE_SYS_DDMMYY, nFormatLang ); - } - } - else if ( eOffset == NF_DATE_SYSTEM_LONG ) - { - const International& rInt = pData->GetInternational( nFormatLang ); - if ( !rInt.IsLongDateDayLeadingZero() ) - { - sal_Bool bCentury = rInt.IsLongDateCentury(); - MonthFormat eMonth = rInt.GetLongDateMonthFormat(); - if ( eMonth == MONTH_LONG && bCentury ) - { - if ( rInt.GetLongDateDayOfWeekFormat() == DAYOFWEEK_LONG ) - nNewIndex = pFormatter->GetFormatIndex( NF_DATE_SYS_NNNNDMMMMYYYY, nFormatLang ); - else - nNewIndex = pFormatter->GetFormatIndex( NF_DATE_SYS_NNDMMMMYYYY, nFormatLang ); - } - else if ( eMonth == MONTH_SHORT && !bCentury ) - nNewIndex = pFormatter->GetFormatIndex( NF_DATE_SYS_NNDMMMYY, nFormatLang ); - } - } - - if ( nNewIndex != nIndex ) - { - // verify the fixed format really matches the format string - // (not the case with some formats from locale data) - - const SvNumberformat* pFixedFormat = pFormatter->GetEntry( nNewIndex ); - if ( pFixedFormat && pFixedFormat->GetFormatstring() == String(sFormat) ) - nIndex = nNewIndex; - } - } -#endif - if ( nIndex != NUMBERFORMAT_ENTRY_NOT_FOUND && !bAutoOrder ) { // use fixed-order formats instead of SYS... if bAutoOrder is false @@ -1843,17 +1771,6 @@ sal_Int32 SvXMLNumFormatContext::CreateAndInsert(SvNumberFormatter* pFormatter) if (!bRemoveAfterUse) GetImport().AddNumberStyle( nKey, GetName() ); -#if 0 - ByteString aByte( String(sFormatName), gsl_getSystemTextEncoding() ); - aByte.Append( " | " ); - aByte.Append(ByteString( String(sFormat), gsl_getSystemTextEncoding() )); - aByte.Append( " | " ); - aByte.Append(ByteString::CreateFromInt32( nIndex )); - -// DBG_ERROR(aByte.GetBuffer()); - int xxx=42; -#endif - return nKey; } |