diff options
Diffstat (limited to 'xmloff/source/text')
-rw-r--r-- | xmloff/source/text/XMLIndexTOCContext.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/XMLSectionImportContext.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/XMLTextColumnsContext.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/XMLTextListAutoStylePool.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/txtflde.cxx | 13 | ||||
-rw-r--r-- | xmloff/source/text/txtfldi.cxx | 33 | ||||
-rw-r--r-- | xmloff/source/text/txtimp.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/txtimppr.cxx | 14 | ||||
-rw-r--r-- | xmloff/source/text/txtparae.cxx | 10 | ||||
-rw-r--r-- | xmloff/source/text/txtparai.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/txtparaimphint.hxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/txtprhdl.cxx | 2 |
12 files changed, 62 insertions, 24 deletions
diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx b/xmloff/source/text/XMLIndexTOCContext.cxx index 497a178760..e3b796d44e 100644 --- a/xmloff/source/text/XMLIndexTOCContext.cxx +++ b/xmloff/source/text/XMLIndexTOCContext.cxx @@ -220,7 +220,7 @@ void XMLIndexTOCContext::StartElement( // index // preliminaries -#ifdef PRODUCT +#ifndef DBG_UTIL OUString sMarker(RTL_CONSTASCII_USTRINGPARAM(" ")); #else OUString sMarker(RTL_CONSTASCII_USTRINGPARAM("Y")); diff --git a/xmloff/source/text/XMLSectionImportContext.cxx b/xmloff/source/text/XMLSectionImportContext.cxx index 3f916db8e0..62f49620fb 100644 --- a/xmloff/source/text/XMLSectionImportContext.cxx +++ b/xmloff/source/text/XMLSectionImportContext.cxx @@ -226,7 +226,7 @@ void XMLSectionImportContext::StartElement( // last paragraph (and marker) when closing a section. Reference<XTextRange> xStart = rHelper->GetCursor()->getStart(); -#ifdef PRODUCT +#ifndef DBG_UTIL static const sal_Char sMarker[] = " "; #else static const sal_Char sMarker[] = "X"; diff --git a/xmloff/source/text/XMLTextColumnsContext.cxx b/xmloff/source/text/XMLTextColumnsContext.cxx index 5bb67f6986..7a9a62c2f3 100644 --- a/xmloff/source/text/XMLTextColumnsContext.cxx +++ b/xmloff/source/text/XMLTextColumnsContext.cxx @@ -43,7 +43,7 @@ #include <xmloff/xmltoken.hxx> #include "XMLTextColumnsContext.hxx" #define _SVSTDARR_USHORTS -#include <svtools/svstdarr.hxx> +#include <svl/svstdarr.hxx> using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/text/XMLTextListAutoStylePool.cxx b/xmloff/source/text/XMLTextListAutoStylePool.cxx index 26a4c4309e..a0a62cab85 100644 --- a/xmloff/source/text/XMLTextListAutoStylePool.cxx +++ b/xmloff/source/text/XMLTextListAutoStylePool.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" #include <tools/debug.hxx> -#include <svtools/cntnrsrt.hxx> +#include <svl/cntnrsrt.hxx> #include <com/sun/star/ucb/XAnyCompareFactory.hpp> #include <com/sun/star/container/XNamed.hpp> #include <com/sun/star/container/XIndexReplace.hpp> diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx index ee9ddbeef4..08aeb7828d 100644 --- a/xmloff/source/text/txtflde.cxx +++ b/xmloff/source/text/txtflde.cxx @@ -707,6 +707,7 @@ sal_Bool XMLTextFieldExport::IsStringField( case FIELD_ID_PAGENUMBER: case FIELD_ID_REFPAGE_SET: case FIELD_ID_REFPAGE_GET: + case FIELD_ID_DOCINFO_CUSTOM: // always number return sal_False; @@ -727,7 +728,6 @@ sal_Bool XMLTextFieldExport::IsStringField( case FIELD_ID_HIDDEN_PARAGRAPH: case FIELD_ID_DOCINFO_CREATION_AUTHOR: case FIELD_ID_DOCINFO_DESCRIPTION: - case FIELD_ID_DOCINFO_CUSTOM: case FIELD_ID_DOCINFO_PRINT_AUTHOR: case FIELD_ID_DOCINFO_TITLE: case FIELD_ID_DOCINFO_SUBJECT: @@ -880,6 +880,7 @@ void XMLTextFieldExport::ExportFieldAutoStyle( case FIELD_ID_USER_GET: case FIELD_ID_EXPRESSION: case FIELD_ID_TABLE_FORMULA: + case FIELD_ID_DOCINFO_CUSTOM: // register number format, if this is a numeric field if (! IsStringField(nToken, xPropSet)) { @@ -943,7 +944,6 @@ void XMLTextFieldExport::ExportFieldAutoStyle( case FIELD_ID_HIDDEN_PARAGRAPH: case FIELD_ID_DOCINFO_CREATION_AUTHOR: case FIELD_ID_DOCINFO_DESCRIPTION: - case FIELD_ID_DOCINFO_CUSTOM: case FIELD_ID_DOCINFO_PRINT_AUTHOR: case FIELD_ID_DOCINFO_TITLE: case FIELD_ID_DOCINFO_SUBJECT: @@ -1503,6 +1503,13 @@ void XMLTextFieldExport::ExportFieldHelper( case FIELD_ID_DOCINFO_CUSTOM: { + ProcessValueAndType(sal_False, // doesn't happen for text + GetIntProperty(sPropertyNumberFormat,rPropSet), + sEmpty, sEmpty, 0.0, // not used + sal_False, sal_False, sal_True, + ! GetOptionalBoolProperty( + sPropertyIsFixedLanguage, + rPropSet, xPropSetInfo, sal_False )); uno::Any aAny = rPropSet->getPropertyValue( sPropertyName ); ::rtl::OUString sName; aAny >>= sName; @@ -2866,7 +2873,7 @@ sal_Bool XMLTextFieldExport::ExplodeFieldMasterName( sal_Int32 nSeparator = sMasterName.indexOf('.', nLength); sal_Bool bReturn = sal_True; -#ifndef PRODUCT +#ifdef DBG_UTIL // check for service name bReturn &= (0 == sFieldMasterPrefix.compareTo(sMasterName, nLength)); #endif diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx index 3b8b551b92..d47e813c34 100644 --- a/xmloff/source/text/txtfldi.cxx +++ b/xmloff/source/text/txtfldi.cxx @@ -2048,6 +2048,11 @@ XMLUserDocInfoImportContext::XMLUserDocInfoImportContext( sLocalName, nToken, sal_False, sal_False) , sPropertyName(RTL_CONSTASCII_USTRINGPARAM(sAPI_name)) + , sPropertyNumberFormat(RTL_CONSTASCII_USTRINGPARAM(sAPI_number_format)) + , sPropertyIsFixedLanguage(RTL_CONSTASCII_USTRINGPARAM(sAPI_is_fixed_language)) + , nFormat(0) + , bFormatOK(sal_False) + , bIsDefaultLanguage( sal_True ) { bValid = sal_False; } @@ -2058,6 +2063,17 @@ void XMLUserDocInfoImportContext::ProcessAttribute( { switch (nAttrToken) { + case XML_TOK_TEXTFIELD_DATA_STYLE_NAME: + { + sal_Int32 nKey = GetImportHelper().GetDataStyleKey( + sAttrValue, &bIsDefaultLanguage); + if (-1 != nKey) + { + nFormat = nKey; + bFormatOK = sal_True; + } + break; + } case XML_TOK_TEXTFIELD_NAME: { if (!bValid) @@ -2080,12 +2096,27 @@ void XMLUserDocInfoImportContext::PrepareField( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> & xPropertySet) { + uno::Any aAny; if ( aName.getLength() ) { - uno::Any aAny; aAny <<= aName; xPropertySet->setPropertyValue(sPropertyName, aAny); } + Reference<XPropertySetInfo> xPropertySetInfo( + xPropertySet->getPropertySetInfo()); + if (bFormatOK && + xPropertySetInfo->hasPropertyByName(sPropertyNumberFormat)) + { + aAny <<= nFormat; + xPropertySet->setPropertyValue(sPropertyNumberFormat, aAny); + + if( xPropertySetInfo->hasPropertyByName( sPropertyIsFixedLanguage ) ) + { + sal_Bool bIsFixedLanguage = ! bIsDefaultLanguage; + aAny.setValue( &bIsFixedLanguage, ::getBooleanCppuType() ); + xPropertySet->setPropertyValue( sPropertyIsFixedLanguage, aAny ); + } + } // call superclass to handle "fixed" XMLSimpleDocInfoImportContext::PrepareField(xPropertySet); diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index b26953b3df..f47aa1016d 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -34,7 +34,7 @@ #include <tools/debug.hxx> #ifndef _SVSTDARR_STRINGSDTOR_DECL #define _SVSTDARR_STRINGSDTOR -#include <svtools/svstdarr.hxx> +#include <svl/svstdarr.hxx> #endif #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/PropertyValue.hpp> diff --git a/xmloff/source/text/txtimppr.cxx b/xmloff/source/text/txtimppr.cxx index 34f1ca038f..218f2fa793 100644 --- a/xmloff/source/text/txtimppr.cxx +++ b/xmloff/source/text/txtimppr.cxx @@ -218,7 +218,7 @@ void XMLTextImportPropertyMapper::FontDefaultsCheck( if( !pFontStyleName ) { aAny <<= sEmpty; - #ifndef PRODUCT + #ifdef DBG_UTIL sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId( pFontFamilyName->mnIndex + 1 ); DBG_ASSERT( nTmp == CTF_FONTSTYLENAME || nTmp == CTF_FONTSTYLENAME_CJK || nTmp == CTF_FONTSTYLENAME_CTL, @@ -232,7 +232,7 @@ void XMLTextImportPropertyMapper::FontDefaultsCheck( { aAny <<= (sal_Int16)com::sun::star::awt::FontFamily::DONTKNOW; - #ifndef PRODUCT + #ifdef DBG_UTIL sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId( pFontFamilyName->mnIndex + 2 ); DBG_ASSERT( nTmp == CTF_FONTFAMILY || nTmp == CTF_FONTFAMILY_CJK || nTmp == CTF_FONTFAMILY_CTL, @@ -245,7 +245,7 @@ void XMLTextImportPropertyMapper::FontDefaultsCheck( if( !pFontPitch ) { aAny <<= (sal_Int16)com::sun::star::awt::FontPitch::DONTKNOW; - #ifndef PRODUCT + #ifdef DBG_UTIL sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId( pFontFamilyName->mnIndex + 3 ); DBG_ASSERT( nTmp == CTF_FONTPITCH || nTmp == CTF_FONTPITCH_CJK || nTmp == CTF_FONTPITCH_CTL, @@ -258,7 +258,7 @@ void XMLTextImportPropertyMapper::FontDefaultsCheck( if( !pFontCharSet ) { aAny <<= (sal_Int16)gsl_getSystemTextEncoding(); - #ifndef PRODUCT + #ifdef DBG_UTIL sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId( pFontFamilyName->mnIndex + 4 ); DBG_ASSERT( nTmp == CTF_FONTCHARSET || nTmp == CTF_FONTCHARSET_CJK || nTmp == CTF_FONTCHARSET_CTL, @@ -408,7 +408,7 @@ void XMLTextImportPropertyMapper::finished( { if( pAllBorderDistance && !pBorderDistances[i] ) { -#ifndef PRODUCT +#ifdef DBG_UTIL sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId( pAllBorderDistance->mnIndex + i + 1 ); DBG_ASSERT( nTmp >= CTF_LEFTBORDERDISTANCE && @@ -422,7 +422,7 @@ void XMLTextImportPropertyMapper::finished( } if( pAllBorder && !pBorders[i] ) { -#ifndef PRODUCT +#ifdef DBG_UTIL sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId( pAllBorder->mnIndex + i + 1 ); DBG_ASSERT( nTmp >= CTF_LEFTBORDER && nTmp <= CTF_BOTTOMBORDER, @@ -461,7 +461,7 @@ void XMLTextImportPropertyMapper::finished( { if( !pBorderDistances[i] ) { -#ifndef PRODUCT +#ifdef DBG_UTIL sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId( pBorders[i]->mnIndex + 5 ); DBG_ASSERT( nTmp >= CTF_LEFTBORDERDISTANCE && diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 21df9d374c..c204881859 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -34,9 +34,9 @@ #include <tools/debug.hxx> #ifndef _SVSTDARR_LONGS_DECL #define _SVSTDARR_LONGS -#include <svtools/svstdarr.hxx> +#include <svl/svstdarr.hxx> #endif -#include <svtools/svarray.hxx> +#include <svl/svarray.hxx> #include <rtl/ustrbuf.hxx> #include <sal/types.h> @@ -265,7 +265,7 @@ SV_IMPL_PTRARR( OUStrings_Impl, OUStringPtr ) SV_DECL_PTRARR_SORT_DEL( OUStringsSort_Impl, OUStringPtr, 20, 10 ) SV_IMPL_OP_PTRARR_SORT( OUStringsSort_Impl, OUStringPtr ) -#ifndef PRODUCT +#ifdef DBG_UTIL static int txtparae_bContainsIllegalCharacters = sal_False; #endif @@ -1303,7 +1303,7 @@ XMLTextParagraphExport::~XMLTextParagraphExport() // delete pExportedLists; // <-- delete pListAutoPool; -#ifndef PRODUCT +#ifdef DBG_UTIL txtparae_bContainsIllegalCharacters = sal_False; #endif // --> OD 2008-04-25 #refactorlists# @@ -3395,7 +3395,7 @@ void XMLTextParagraphExport::exportText( const OUString& rText, default: if( cChar < 0x0020 ) { -#ifndef PRODUCT +#ifdef DBG_UTIL OSL_ENSURE( txtparae_bContainsIllegalCharacters || cChar >= 0x0020, "illegal character in text content" ); diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx index fa68a86bdf..ceeb676e8b 100644 --- a/xmloff/source/text/txtparai.cxx +++ b/xmloff/source/text/txtparai.cxx @@ -36,7 +36,7 @@ #include <tools/debug.hxx> #include <tools/string.hxx> -#include <svtools/svarray.hxx> +#include <svl/svarray.hxx> #include <com/sun/star/text/XTextFrame.hpp> #include <com/sun/star/text/XTextCursor.hpp> #include <com/sun/star/beans/XPropertySet.hpp> diff --git a/xmloff/source/text/txtparaimphint.hxx b/xmloff/source/text/txtparaimphint.hxx index e0975411a5..4a4a1228a0 100644 --- a/xmloff/source/text/txtparaimphint.hxx +++ b/xmloff/source/text/txtparaimphint.hxx @@ -33,7 +33,7 @@ #include <rtl/ustring.hxx> #include <rtl/ustrbuf.hxx> #include <tools/debug.hxx> -#include <svtools/svarray.hxx> +#include <svl/svarray.hxx> #include <xmloff/xmlimp.hxx> #include "XMLTextFrameContext.hxx" #include <xmloff/XMLEventsImportContext.hxx> diff --git a/xmloff/source/text/txtprhdl.cxx b/xmloff/source/text/txtprhdl.cxx index cff7eee8d9..a9c4a0dfd3 100644 --- a/xmloff/source/text/txtprhdl.cxx +++ b/xmloff/source/text/txtprhdl.cxx @@ -32,7 +32,7 @@ #include "precompiled_xmloff.hxx" #include <tools/debug.hxx> #include <rtl/ustrbuf.hxx> -#include <vcl/vclenum.hxx> +#include <tools/fontenum.hxx> #include <com/sun/star/uno/Any.hxx> #include <com/sun/star/style/DropCapFormat.hpp> #include <com/sun/star/text/FontRelief.hpp> |