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 | |
parent | 34f1c06830ae530bea4f11aca91e2836a53fd764 (diff) |
remove non-compiled code
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/core/xmlexp.cxx | 26 | ||||
-rw-r--r-- | xmloff/source/meta/MetaExportComponent.cxx | 13 | ||||
-rw-r--r-- | xmloff/source/style/styleexp.cxx | 26 | ||||
-rw-r--r-- | xmloff/source/style/xmlnumfi.cxx | 87 |
4 files changed, 3 insertions, 149 deletions
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 6f3c881a3ae5..04a3f00a6753 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -1248,19 +1248,6 @@ void SvXMLExport::ImplExportAutoStyles( sal_Bool ) SvXMLElementExport aElem( *this, XML_NAMESPACE_OFFICE, XML_AUTOMATIC_STYLES, sal_True, sal_True ); -#if 0 - AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE ); - AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, XML_STYLES_HREF ); - AddAttribute( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD ); - AddAttribute( XML_NAMESPACE_XLINK, XML_ROLE, - pNamespaceMap->GetQNameByKey( XML_NAMESPACE_OFFICE, - GetXMLToken(XML_STYLESHEET)) ); - { - // <style:use-styles> - SvXMLElementExport aElem( *this, XML_NAMESPACE_OFFICE, - XML_USE_STYLES, sal_True, sal_True ); - } -#endif _ExportAutoStyles(); } } @@ -1275,19 +1262,6 @@ void SvXMLExport::ImplExportMasterStyles( sal_Bool ) _ExportMasterStyles(); } -#if 0 - AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE ); - AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, XML_AUTO_STYLES_HREF ); - AddAttribute( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD ); - AddAttribute( XML_NAMESPACE_XLINK, XML_ROLE, - pNamespaceMap->GetQNameByKey( XML_NAMESPACE_OFFICE, - GetXMLToken(XML_STYLESHEET) ) ); - { - // <style:use-styles> - SvXMLElementExport aElem( *this, XML_NAMESPACE_OFFICE, - XML_USE_STYLES, sal_True, sal_True ); - } -#endif } void SvXMLExport::ImplExportContent() diff --git a/xmloff/source/meta/MetaExportComponent.cxx b/xmloff/source/meta/MetaExportComponent.cxx index f96b38c5cbf6..1c78dc98fbe4 100644 --- a/xmloff/source/meta/MetaExportComponent.cxx +++ b/xmloff/source/meta/MetaExportComponent.cxx @@ -141,17 +141,7 @@ sal_uInt32 XMLMetaExportComponent::exportDoc( enum XMLTokenEnum ) xDocHandler->startDocument(); { -#if 0 - GetAttrList().AddAttribute( - GetNamespaceMap().GetAttrNameByKey( XML_NAMESPACE_DC ), - GetNamespaceMap().GetNameByKey( XML_NAMESPACE_DC ) ); - GetAttrList().AddAttribute( - GetNamespaceMap().GetAttrNameByKey( XML_NAMESPACE_META ), - GetNamespaceMap().GetNameByKey( XML_NAMESPACE_META ) ); - GetAttrList().AddAttribute( - GetNamespaceMap().GetAttrNameByKey( XML_NAMESPACE_OFFICE ), - GetNamespaceMap().GetNameByKey( XML_NAMESPACE_OFFICE ) ); -#else + const SvXMLNamespaceMap& rMap = GetNamespaceMap(); sal_uInt16 nPos = rMap.GetFirstKey(); while( USHRT_MAX != nPos ) @@ -159,7 +149,6 @@ sal_uInt32 XMLMetaExportComponent::exportDoc( enum XMLTokenEnum ) GetAttrList().AddAttribute( rMap.GetAttrNameByKey( nPos ), rMap.GetNameByKey( nPos ) ); nPos = GetNamespaceMap().GetNextKey( nPos ); } -#endif const sal_Char* pVersion = 0; switch( getDefaultVersion() ) 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; } |