diff options
Diffstat (limited to 'xmloff')
63 files changed, 181 insertions, 252 deletions
diff --git a/xmloff/inc/VisAreaContext.hxx b/xmloff/inc/VisAreaContext.hxx index ddfff6716772..7a99c4240395 100644 --- a/xmloff/inc/VisAreaContext.hxx +++ b/xmloff/inc/VisAreaContext.hxx @@ -32,7 +32,7 @@ #define _XMLOFF_VISAREACONTEXT_HXX #include <xmloff/xmlictxt.hxx> -#include <vcl/mapunit.hxx> +#include <tools/mapunit.hxx> class Rectangle; diff --git a/xmloff/inc/VisAreaExport.hxx b/xmloff/inc/VisAreaExport.hxx index e49b09801257..e2ce09472607 100644 --- a/xmloff/inc/VisAreaExport.hxx +++ b/xmloff/inc/VisAreaExport.hxx @@ -31,7 +31,7 @@ #ifndef _XMLOFF_VISAREAEXPORT_HXX #define _XMLOFF_VISAREAEXPORT_HXX -#include <vcl/mapunit.hxx> +#include <tools/mapunit.hxx> #include <sal/types.h> class SvXMLExport; diff --git a/xmloff/inc/pch/precompiled_xmloff.hxx b/xmloff/inc/pch/precompiled_xmloff.hxx index f8f890e9050f..06c27d0a7103 100644 --- a/xmloff/inc/pch/precompiled_xmloff.hxx +++ b/xmloff/inc/pch/precompiled_xmloff.hxx @@ -436,15 +436,15 @@ #include "sot/clsids.hxx" -#include "svtools/cntnrsrt.hxx" -#include "svtools/itemset.hxx" -#include "svtools/moduleoptions.hxx" -#include "svtools/nfsymbol.hxx" -#include "svtools/numuno.hxx" -#include "svtools/poolitem.hxx" -#include "svtools/svarray.hxx" -#include "svtools/svstdarr.hxx" -#include "svtools/urihelper.hxx" +#include "svl/cntnrsrt.hxx" +#include "svl/itemset.hxx" +#include "unotools/moduleoptions.hxx" +#include "svl/nfsymbol.hxx" +#include "svl/numuno.hxx" +#include "svl/poolitem.hxx" +#include "svl/svarray.hxx" +#include "svl/svstdarr.hxx" +#include "svl/urihelper.hxx" #include "tools/bigint.hxx" @@ -469,9 +469,9 @@ #include "unotools/processfactory.hxx" #include "unotools/streamwrap.hxx" -#include "vcl/fldunit.hxx" -#include "vcl/fontcvt.hxx" -#include "vcl/mapunit.hxx" +#include "tools/fldunit.hxx" +#include "unotools/fontcvt.hxx" +#include "tools/mapunit.hxx" #include "vos/mutex.hxx" #include "vos/ref.hxx" diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx index b361081a7ce2..96e7e7fee238 100644 --- a/xmloff/inc/txtfldi.hxx +++ b/xmloff/inc/txtfldi.hxx @@ -745,6 +745,11 @@ class XMLUserDocInfoImportContext : public XMLSimpleDocInfoImportContext { rtl::OUString aName; const ::rtl::OUString sPropertyName; + const ::rtl::OUString sPropertyNumberFormat; + const ::rtl::OUString sPropertyIsFixedLanguage; + sal_Int32 nFormat; + sal_Bool bFormatOK; + sal_Bool bIsDefaultLanguage; public: diff --git a/xmloff/inc/xexptran.hxx b/xmloff/inc/xexptran.hxx index 10b89e6291b3..39529a04c88d 100644 --- a/xmloff/inc/xexptran.hxx +++ b/xmloff/inc/xexptran.hxx @@ -38,7 +38,7 @@ #include <com/sun/star/drawing/FlagSequenceSequence.hpp> #include <com/sun/star/drawing/FlagSequence.hpp> #include <com/sun/star/drawing/HomogenMatrix.hpp> -#include <vcl/mapunit.hxx> +#include <tools/mapunit.hxx> #include <vector> diff --git a/xmloff/inc/xmlcnitm.hxx b/xmloff/inc/xmlcnitm.hxx index 93777391b9bc..0da5b64369a9 100644 --- a/xmloff/inc/xmlcnitm.hxx +++ b/xmloff/inc/xmlcnitm.hxx @@ -31,7 +31,7 @@ #ifndef _XMLOFF_XMLCNITM_HXX #define _XMLOFF_XMLCNITM_HXX -#include <svtools/poolitem.hxx> +#include <svl/poolitem.hxx> class SvXMLNamespaceMap; namespace rtl { class OUString; } diff --git a/xmloff/inc/xmlehelp.hxx b/xmloff/inc/xmlehelp.hxx index d5ffaafed3dc..bdf0fad3be3e 100644 --- a/xmloff/inc/xmlehelp.hxx +++ b/xmloff/inc/xmlehelp.hxx @@ -31,7 +31,7 @@ #ifndef _XMLOFF_XMLEHELP_HXX #define _XMLOFF_XMLEHELP_HXX -#include <vcl/mapunit.hxx> +#include <tools/mapunit.hxx> namespace rtl { class OUStringBuffer; } diff --git a/xmloff/inc/xmloff/ProgressBarHelper.hxx b/xmloff/inc/xmloff/ProgressBarHelper.hxx index 7908b575ec36..383f35059ee9 100644 --- a/xmloff/inc/xmloff/ProgressBarHelper.hxx +++ b/xmloff/inc/xmloff/ProgressBarHelper.hxx @@ -52,7 +52,7 @@ class XMLOFF_DLLPUBLIC ProgressBarHelper // #96469#; if the value goes over the Range the progressbar starts again sal_Bool bRepeat; -#ifndef PRODUCT +#ifdef DBG_UTIL sal_Bool bFailure; #endif public: diff --git a/xmloff/inc/xmloff/maptype.hxx b/xmloff/inc/xmloff/maptype.hxx index ba85669d8be2..69d94145d6fc 100644 --- a/xmloff/inc/xmloff/maptype.hxx +++ b/xmloff/inc/xmloff/maptype.hxx @@ -34,7 +34,7 @@ #include <tools/solar.h> #include <com/sun/star/uno/Any.hxx> #include <xmloff/xmltoken.hxx> -#include <svtools/saveopt.hxx> +#include <unotools/saveopt.hxx> /////////////////////////////////////////////////////////////////////////// // diff --git a/xmloff/inc/xmloff/styleexp.hxx b/xmloff/inc/xmloff/styleexp.hxx index e18547c62688..a11b24857b46 100644 --- a/xmloff/inc/xmloff/styleexp.hxx +++ b/xmloff/inc/xmloff/styleexp.hxx @@ -36,7 +36,7 @@ #include <com/sun/star/uno/Reference.h> #ifndef _VCL_MAPUNIT_HXX -//#include <vcl/mapunit.hxx> +//#include <tools/mapunit.hxx> #endif #include <xmloff/uniref.hxx> diff --git a/xmloff/inc/xmloff/xmlcnimp.hxx b/xmloff/inc/xmloff/xmlcnimp.hxx index d964e73a3fed..d0b6ab4d7a63 100644 --- a/xmloff/inc/xmloff/xmlcnimp.hxx +++ b/xmloff/inc/xmloff/xmlcnimp.hxx @@ -35,11 +35,11 @@ #include "xmloff/dllapi.h" #include "sal/types.h" #include <com/sun/star/container/XNameAccess.hpp> -#include <svtools/svarray.hxx> +#include <svl/svarray.hxx> #include <xmloff/nmspmap.hxx> #define _SVSTDARR_USHORTS -#include <svtools/svstdarr.hxx> +#include <svl/svstdarr.hxx> namespace rtl { class OUString; } diff --git a/xmloff/inc/xmloff/xmlexp.hxx b/xmloff/inc/xmloff/xmlexp.hxx index b4d388957f0f..2133a108da78 100644 --- a/xmloff/inc/xmloff/xmlexp.hxx +++ b/xmloff/inc/xmloff/xmlexp.hxx @@ -45,7 +45,7 @@ #include <com/sun/star/util/XNumberFormatsSupplier.hpp> #include <com/sun/star/lang/XUnoTunnel.hpp> #include <rtl/ustring.hxx> -#include <vcl/mapunit.hxx> +#include <tools/mapunit.hxx> #include <xmloff/txtparae.hxx> #include <xmloff/formlayerexport.hxx> #include <xmloff/xmlnumfe.hxx> @@ -68,7 +68,7 @@ #include <com/sun/star/lang/XEventListener.hpp> #include <com/sun/star/container/XNamed.hpp> -#include <svtools/saveopt.hxx> +#include <unotools/saveopt.hxx> #include <xmloff/XMLPageExport.hxx> #include <xmloff/ProgressBarHelper.hxx> @@ -87,7 +87,7 @@ class XMLImageMapExport; class XMLErrors; // --> OD 2006-03-14 #i51726# -#include <svtools/moduleoptions.hxx> +#include <unotools/moduleoptions.hxx> // <-- namespace rtl { class OUString; } @@ -380,7 +380,7 @@ public: = ::rtl::OUString::createFromAscii("gen") ); // Check if common attribute list is empty. -#ifdef PRODUCT +#ifndef DBG_UTIL void CheckAttrList() {} #else void CheckAttrList(); diff --git a/xmloff/inc/xmloff/xmlnume.hxx b/xmloff/inc/xmloff/xmlnume.hxx index 498ad92813fe..7543cddb0bce 100644 --- a/xmloff/inc/xmloff/xmlnume.hxx +++ b/xmloff/inc/xmloff/xmlnume.hxx @@ -32,7 +32,7 @@ #define _XMLOFF_XMLNUME_HXX #include <rtl/ustring.hxx> -#include <vcl/mapunit.hxx> +#include <tools/mapunit.hxx> #include <xmloff/XMLStringVector.hxx> #include <xmloff/attrlist.hxx> diff --git a/xmloff/inc/xmloff/xmluconv.hxx b/xmloff/inc/xmloff/xmluconv.hxx index f71741f8a51b..607a0771e291 100644 --- a/xmloff/inc/xmloff/xmluconv.hxx +++ b/xmloff/inc/xmloff/xmluconv.hxx @@ -38,7 +38,7 @@ #include <limits.h> #include <tools/solar.h> #include <tools/color.hxx> -#include <vcl/mapunit.hxx> +#include <tools/mapunit.hxx> #include <xmloff/xmlement.hxx> #include <xmloff/xmltoken.hxx> #include <com/sun/star/util/Date.hpp> diff --git a/xmloff/prj/build.lst b/xmloff/prj/build.lst index 9396ccdb8f54..8817d4590715 100644 --- a/xmloff/prj/build.lst +++ b/xmloff/prj/build.lst @@ -1,4 +1,4 @@ -xo xmloff : offapi goodies comphelper NULL +xo xmloff : offapi svl vos NULL xo xmloff usr1 - all xo_mkout NULL xo xmloff\prj get - all xo_prj NULL xo xmloff\inc nmake - all xo_inc NULL diff --git a/xmloff/source/chart/XMLErrorBarStylePropertyHdl.cxx b/xmloff/source/chart/XMLErrorBarStylePropertyHdl.cxx index 273e9db4e364..cc67c4ac75fa 100644 --- a/xmloff/source/chart/XMLErrorBarStylePropertyHdl.cxx +++ b/xmloff/source/chart/XMLErrorBarStylePropertyHdl.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" #include "XMLErrorBarStylePropertyHdl.hxx" -#include <svtools/saveopt.hxx> +#include <unotools/saveopt.hxx> #include <com/sun/star/chart/ErrorBarStyle.hpp> #include <com/sun/star/uno/Any.hxx> diff --git a/xmloff/source/core/ProgressBarHelper.cxx b/xmloff/source/core/ProgressBarHelper.cxx index dc35627a8ea2..68df76642196 100644 --- a/xmloff/source/core/ProgressBarHelper.cxx +++ b/xmloff/source/core/ProgressBarHelper.cxx @@ -56,7 +56,7 @@ ProgressBarHelper::ProgressBarHelper(const ::com::sun::star::uno::Reference < :: , fOldPercent(0.0) , bStrict(bTempStrict) , bRepeat(sal_True) -#ifndef PRODUCT +#ifdef DBG_UTIL , bFailure(sal_False) #endif { @@ -130,7 +130,7 @@ void ProgressBarHelper::SetValue(sal_Int32 nTempValue) // fOldPercent = fPercent; // } } -#ifndef PRODUCT +#ifdef DBG_UTIL else if (!bFailure) { DBG_ERROR("tried to set a wrong value on the progressbar"); diff --git a/xmloff/source/core/attrlist.cxx b/xmloff/source/core/attrlist.cxx index 130fc7be832f..75c189ce68b3 100644 --- a/xmloff/source/core/attrlist.cxx +++ b/xmloff/source/core/attrlist.cxx @@ -37,13 +37,6 @@ #include <rtl/uuid.h> #include <rtl/memory.h> -#if OSL_DEBUG_LEVEL == 0 -# ifndef NDEBUG -# define NDEBUG -# endif -#endif -#include <assert.h> - #include <xmloff/attrlist.hxx> using ::rtl::OUString; @@ -183,7 +176,7 @@ void SvXMLAttributeList::Clear() { m_pImpl->vecAttribute.clear(); - assert( ! getLength() ); + OSL_ASSERT( ! getLength() ); } void SvXMLAttributeList::RemoveAttribute( const OUString sName ) @@ -207,7 +200,7 @@ void SvXMLAttributeList::SetAttributeList( const uno::Reference< ::com::sun::sta void SvXMLAttributeList::AppendAttributeList( const uno::Reference< ::com::sun::star::xml::sax::XAttributeList > &r ) { - assert( r.is() ); + OSL_ASSERT( r.is() ); sal_Int16 nMax = r->getLength(); SvXMLAttributeList_Impl::size_type nTotalSize = @@ -220,7 +213,7 @@ void SvXMLAttributeList::AppendAttributeList( const uno::Reference< ::com::sun:: r->getValueByIndex( i ))); } - assert( nTotalSize == (SvXMLAttributeList_Impl::size_type)getLength()); + OSL_ASSERT( nTotalSize == (SvXMLAttributeList_Impl::size_type)getLength()); } void SvXMLAttributeList::SetValueByIndex( sal_Int16 i, diff --git a/xmloff/source/core/i18nmap.cxx b/xmloff/source/core/i18nmap.cxx index e5ef3c394aea..0f8f49d83ece 100644 --- a/xmloff/source/core/i18nmap.cxx +++ b/xmloff/source/core/i18nmap.cxx @@ -32,7 +32,7 @@ #include "precompiled_xmloff.hxx" #include <rtl/ustring.hxx> #include <tools/debug.hxx> -#include <svtools/svarray.hxx> +#include <svl/svarray.hxx> #include "i18nmap.hxx" using namespace rtl; diff --git a/xmloff/source/core/xmlehelp.cxx b/xmloff/source/core/xmlehelp.cxx index 9aed5000913d..12397a621bc0 100644 --- a/xmloff/source/core/xmlehelp.cxx +++ b/xmloff/source/core/xmlehelp.cxx @@ -34,7 +34,6 @@ #include <tools/debug.hxx> #include <tools/bigint.hxx> #include <rtl/ustrbuf.hxx> -#include <vcl/outdev.hxx> #include "xmlehelp.hxx" #ifndef _XMLOFF_XMTOKEN_HXX @@ -228,82 +227,6 @@ void SvXMLExportHelper::AddLength( sal_Int32 nValue, MapUnit eValueUnit, if( eUnit != XML_TOKEN_INVALID ) rOut.append( GetXMLToken(eUnit) ); -#if 0 - enum XMLTokenEnum eUnit; - sal_Int32 nFac = 1; - switch( eOutUnit ) - { - case MAP_100TH_MM: - nFac *= 10L; - case MAP_10TH_MM: - nFac *= 10L; - eOutUnit = MAP_MM; - case MAP_MM: - // 0.01mm - nFac *= 100L; - eUnit = XML_UNIT_MM; - break; - - case MAP_CM: -#ifdef EXACT_VALUES - // 0.001cm - nFac *= 1000L; -#else - // 0.01cm - nFac *= 100L; -#endif - eUnit = XML_UNIT_CM; - break; - - case MAP_TWIP: - case MAP_POINT: -#ifdef EXACT_VALUES - // 0.01pt - nFac *= 100L; -#else - // 0.1pt - nFac *= 10L; -#endif - eUnit = XML_UNIT_PT; - break; - - case MAP_1000TH_INCH: - nFac *= 10L; - case MAP_100TH_INCH: - nFac *= 10L; - case MAP_10TH_INCH: - nFac *= 10L; - case MAP_INCH: - default: - eOutUnit = MAP_INCH; -#ifdef EXACT_VALUES - // 0.0001in - nFac *= 10000L; -#else - // 0.01in - nFac *= 100L; -#endif - eUnit = XML_UNIT_INCH; - break; - } - - if( eValueUnit != eOutUnit ) - nValue = OutputDevice::LogicToLogic( nValue, eValueUnit, eOutUnit ); - - rOut.append( nValue / nFac ); - if( nFac > 1 && (nValue % nFac) != 0 ) - { - rOut.append( sal_Unicode('.') ); - while( nFac > 1 && (nValue % nFac) != 0 ) - { - nFac /= 10L; - rOut.append( (nValue / nFac) % 10L ); - } - } - - rOut.append( GetXMLToken(eUnit) ); -#endif - } void SvXMLExportHelper::AddPercentage( sal_Int32 nValue, OUStringBuffer& rOut ) diff --git a/xmloff/source/core/xmlerror.cxx b/xmloff/source/core/xmlerror.cxx index 5e3173c16597..9331ff228ed1 100644 --- a/xmloff/source/core/xmlerror.cxx +++ b/xmloff/source/core/xmlerror.cxx @@ -126,7 +126,7 @@ void XMLErrors::AddRecord( aErrors.push_back( ErrorRecord( nId, rParams, rExceptionMessage, nRow, nColumn, rPublicId, rSystemId ) ); -#ifndef PRODUCT +#ifdef DBG_UTIL // give detailed assertion on this message diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 55af99802f9d..2028ad26db25 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -86,7 +86,7 @@ #include <comphelper/extract.hxx> #include "PropertySetMerger.hxx" -#include "svtools/urihelper.hxx" +#include "svl/urihelper.hxx" #include "xformsexport.hxx" #include <unotools/docinfohelper.hxx> @@ -1055,7 +1055,7 @@ void SvXMLExport::ClearAttrList() mpAttrList->Clear(); } -#ifndef PRODUCT +#ifdef DBG_UTIL void SvXMLExport::CheckAttrList() { DBG_ASSERT( !mpAttrList->getLength(), diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index 0dece7c6965c..66ae95da5393 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -36,7 +36,7 @@ #include <osl/mutex.hxx> #include <rtl/uuid.h> #include <rtl/memory.h> -#include <svtools/svarray.hxx> +#include <svl/svarray.hxx> #include "unointerfacetouniqueidentifiermapper.hxx" #include <xmloff/nmspmap.hxx> #include <xmloff/xmluconv.hxx> @@ -69,7 +69,7 @@ #include <comphelper/processfactory.hxx> #include <comphelper/documentconstants.hxx> #include <comphelper/storagehelper.hxx> -#include <vcl/fontcvt.hxx> +#include <unotools/fontcvt.hxx> #include <com/sun/star/rdf/XMetadatable.hpp> #include <com/sun/star/rdf/XRepositorySupplier.hpp> @@ -764,7 +764,7 @@ void SAL_CALL SvXMLImport::startElement( const OUString& rName, } void SAL_CALL SvXMLImport::endElement( const OUString& -#ifndef PRODUCT +#ifdef DBG_UTIL rName #endif ) @@ -778,7 +778,7 @@ rName SvXMLImportContext *pContext = (*mpContexts)[nCount-1]; mpContexts->Remove( nCount-1, 1 ); -#ifndef PRODUCT +#ifdef DBG_UTIL // Non product only: check if endElement call matches startELement call. OUString aLocalName; USHORT nPrefix = diff --git a/xmloff/source/core/xmltkmap.cxx b/xmloff/source/core/xmltkmap.cxx index 30a791865f7b..297249e4b8c5 100644 --- a/xmloff/source/core/xmltkmap.cxx +++ b/xmloff/source/core/xmltkmap.cxx @@ -32,7 +32,7 @@ #include "precompiled_xmloff.hxx" #include <tools/debug.hxx> #include <rtl/ustring.hxx> -#include <svtools/svarray.hxx> +#include <svl/svarray.hxx> #include <xmloff/xmltkmap.hxx> #include <xmloff/xmltoken.hxx> diff --git a/xmloff/source/core/xmluconv.cxx b/xmloff/source/core/xmluconv.cxx index 9d1218b876a9..21e03cdaf0e8 100644 --- a/xmloff/source/core/xmluconv.cxx +++ b/xmloff/source/core/xmluconv.cxx @@ -50,7 +50,7 @@ #endif #include <tools/time.hxx> -#include <vcl/fldunit.hxx> +#include <tools/fldunit.hxx> // #110680# //#ifndef _COMPHELPER_PROCESSFACTORY_HXX_ diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index bcac474e97eb..3a0e01631f28 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -559,7 +559,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape const ImplXMLShapeExportInfo& aShapeInfo = aShapeInfoVector[nZIndex]; -#ifndef PRODUCT +#ifdef DBG_UTIL // --------------------------------------- // check if this is the correct ShapesInfo // --------------------------------------- diff --git a/xmloff/source/draw/shapeexport2.cxx b/xmloff/source/draw/shapeexport2.cxx index b2e81d333fba..e09ad66dfeb9 100644 --- a/xmloff/source/draw/shapeexport2.cxx +++ b/xmloff/source/draw/shapeexport2.cxx @@ -55,7 +55,7 @@ #include <xmloff/xmluconv.hxx> #include "XMLImageMapExport.hxx" #include "xexptran.hxx" -#include <vcl/salbtype.hxx> // FRound +#include <tools/gen.hxx> // FRound #include <xmloff/xmltoken.hxx> #include <xmloff/nmspmap.hxx> diff --git a/xmloff/source/draw/shapeexport3.cxx b/xmloff/source/draw/shapeexport3.cxx index d71162da5fd2..543910303d1c 100644 --- a/xmloff/source/draw/shapeexport3.cxx +++ b/xmloff/source/draw/shapeexport3.cxx @@ -38,6 +38,7 @@ #include <com/sun/star/drawing/Position3D.hpp> #include <com/sun/star/drawing/CameraGeometry.hpp> #include <com/sun/star/drawing/DoubleSequence.hpp> +#include <tools/gen.hxx> #ifndef _XMLOFF_SHAPEEXPORT_HXX #include <xmloff/shapeexport.hxx> @@ -59,12 +60,6 @@ using ::rtl::OUStringBuffer; using namespace ::com::sun::star; using namespace ::xmloff::token; -////////////////////////////////////////////////////////////////////////////// - -inline sal_Int32 FRound( double fVal ) -{ - return( fVal > 0.0 ? (sal_Int32) ( fVal + 0.5 ) : -(sal_Int32) ( -fVal + 0.5 ) ); -} ////////////////////////////////////////////////////////////////////////////// diff --git a/xmloff/source/draw/xexptran.cxx b/xmloff/source/draw/xexptran.cxx index 12053fb2fbb2..d48f2430d264 100644 --- a/xmloff/source/draw/xexptran.cxx +++ b/xmloff/source/draw/xexptran.cxx @@ -34,7 +34,7 @@ #include <tools/debug.hxx> #include <rtl/ustrbuf.hxx> #include <xmloff/xmluconv.hxx> -#include <vcl/salbtype.hxx> +#include <tools/gen.hxx> #include <basegfx/vector/b2dvector.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/tuple/b3dtuple.hxx> diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx index 35c1bafbec94..67ee2d044851 100644 --- a/xmloff/source/draw/ximpstyl.cxx +++ b/xmloff/source/draw/ximpstyl.cxx @@ -52,7 +52,7 @@ #include <xmloff/xmlprcon.hxx> #include <xmloff/families.hxx> #include <com/sun/star/container/XNameContainer.hpp> -#include <svtools/zforlist.hxx> +#include <svl/zforlist.hxx> #include "PropertySetMerger.hxx" #include "sdpropls.hxx" #include "layerimp.hxx" diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx index d3dc170e58d5..a17138654730 100644 --- a/xmloff/source/forms/elementexport.cxx +++ b/xmloff/source/forms/elementexport.cxx @@ -58,14 +58,13 @@ #include <com/sun/star/awt/ImagePosition.hpp> /** === end UNO includes === **/ -#include <vcl/wintypes.hxx> // for check states +#include <tools/wintypes.hxx> // for check states #include <xmloff/txtprmap.hxx> #include <com/sun/star/form/binding/XBindableValue.hpp> #include <com/sun/star/form/binding/XListEntrySink.hpp> #include <tools/urlobj.hxx> #include <xmloff/xmlexp.hxx> #include <xmloff/nmspmap.hxx> -#include <vcl/wintypes.hxx> // for check states #include <xmloff/XMLEventExport.hxx> #include <xmloff/xmluconv.hxx> #include <xmloff/xmltoken.hxx> diff --git a/xmloff/source/forms/formenums.cxx b/xmloff/source/forms/formenums.cxx index d34fe30485a5..c9e2d7321a36 100644 --- a/xmloff/source/forms/formenums.cxx +++ b/xmloff/source/forms/formenums.cxx @@ -46,7 +46,7 @@ #include <com/sun/star/awt/ScrollBarOrientation.hpp> #include <com/sun/star/awt/VisualEffect.hpp> #include <com/sun/star/awt/ImageScaleMode.hpp> -#include <vcl/wintypes.hxx> // for check states +#include <tools/wintypes.hxx> // for check states #include <xmloff/xmltoken.hxx> //......................................................................... diff --git a/xmloff/source/forms/layerimport.cxx b/xmloff/source/forms/layerimport.cxx index 1cff242fca69..9172686511bf 100644 --- a/xmloff/source/forms/layerimport.cxx +++ b/xmloff/source/forms/layerimport.cxx @@ -55,7 +55,7 @@ #include <com/sun/star/awt/ScrollBarOrientation.hpp> #include <com/sun/star/awt/VisualEffect.hpp> #include <com/sun/star/form/ListSourceType.hpp> -#include <vcl/wintypes.hxx> // for check states +#include <tools/wintypes.hxx> // for check states #include <com/sun/star/lang/Locale.hpp> #include <xmloff/controlpropertyhdl.hxx> #include "controlpropertymap.hxx" diff --git a/xmloff/source/style/EnumPropertyHdl.cxx b/xmloff/source/style/EnumPropertyHdl.cxx index d3c601cb37c2..9854f99d39e1 100644 --- a/xmloff/source/style/EnumPropertyHdl.cxx +++ b/xmloff/source/style/EnumPropertyHdl.cxx @@ -36,20 +36,6 @@ #include <comphelper/extract.hxx> #include <rtl/ustring.hxx> #include <rtl/ustrbuf.hxx> - -/* -#include <vcl/vclenum.hxx> -#include <tools/solar.h> - -#ifndef _INC_LIMITS -#include <limits.h> -#endif - - -#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_ -#include <toolkit/unohlp.hxx> -#endif -*/ #include <com/sun/star/uno/Any.hxx> using ::rtl::OUString; diff --git a/xmloff/source/style/XMLFontAutoStylePool.cxx b/xmloff/source/style/XMLFontAutoStylePool.cxx index b114d988a729..a5c662ef33a7 100644 --- a/xmloff/source/style/XMLFontAutoStylePool.cxx +++ b/xmloff/source/style/XMLFontAutoStylePool.cxx @@ -31,8 +31,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" #include <tools/debug.hxx> -#include <svtools/cntnrsrt.hxx> -#include <vcl/vclenum.hxx> +#include <svl/cntnrsrt.hxx> +#include <tools/fontenum.hxx> #include "xmlnmspe.hxx" #include <xmloff/xmltoken.hxx> #include <xmloff/xmluconv.hxx> diff --git a/xmloff/source/style/fonthdl.cxx b/xmloff/source/style/fonthdl.cxx index 010544766e77..acfc846883e7 100644 --- a/xmloff/source/style/fonthdl.cxx +++ b/xmloff/source/style/fonthdl.cxx @@ -38,7 +38,7 @@ #include <xmloff/xmluconv.hxx> #include <rtl/ustrbuf.hxx> #include <com/sun/star/uno/Any.hxx> -#include <vcl/vclenum.hxx> +#include <tools/fontenum.hxx> #ifndef _XMLOFF_XMLEMENT_HXX #include <xmloff/xmlelement.hxx> diff --git a/xmloff/source/style/impastpl.hxx b/xmloff/source/style/impastpl.hxx index d63384a71068..39507689fcc1 100644 --- a/xmloff/source/style/impastpl.hxx +++ b/xmloff/source/style/impastpl.hxx @@ -33,7 +33,7 @@ #include <sal/types.h> #include <tools/list.hxx> -#include <svtools/cntnrsrt.hxx> +#include <svl/cntnrsrt.hxx> #include <rtl/ustring.hxx> #include <vector> #include <com/sun/star/uno/Reference.h> diff --git a/xmloff/source/style/numehelp.cxx b/xmloff/source/style/numehelp.cxx index 55ec5ad9abc8..c75207d9e094 100644 --- a/xmloff/source/style/numehelp.cxx +++ b/xmloff/source/style/numehelp.cxx @@ -40,7 +40,7 @@ #include <xmloff/xmlexp.hxx> #include <com/sun/star/uno/Reference.h> #include <rtl/ustring.hxx> -#include <svtools/zforlist.hxx> +#include <svl/zforlist.hxx> #include <com/sun/star/util/NumberFormat.hpp> #include <rtl/math.hxx> #include <tools/debug.hxx> diff --git a/xmloff/source/style/postuhdl.cxx b/xmloff/source/style/postuhdl.cxx index 6c5365b72f73..9f22f6d914ac 100644 --- a/xmloff/source/style/postuhdl.cxx +++ b/xmloff/source/style/postuhdl.cxx @@ -36,7 +36,7 @@ #include <rtl/ustrbuf.hxx> #include <com/sun/star/uno/Any.hxx> #include <com/sun/star/awt/FontSlant.hpp> -#include <vcl/vclenum.hxx> +#include <tools/fontenum.hxx> #ifndef _XMLOFF_XMLEMENT_HXX #include <xmloff/xmlelement.hxx> diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx index f822239d3106..f03c0ac9a78b 100644 --- a/xmloff/source/style/styleexp.cxx +++ b/xmloff/source/style/styleexp.cxx @@ -33,7 +33,7 @@ #include <tools/debug.hxx> #ifndef _SVSTDARR_STRINGSSORTDTOR_DECL #define _SVSTDARR_STRINGSSORTDTOR -#include <svtools/svstdarr.hxx> +#include <svl/svstdarr.hxx> #endif #include <xmloff/nmspmap.hxx> #include "xmlnmspe.hxx" diff --git a/xmloff/source/style/weighhdl.cxx b/xmloff/source/style/weighhdl.cxx index 61c6b2a8e183..3bddf6dd5556 100644 --- a/xmloff/source/style/weighhdl.cxx +++ b/xmloff/source/style/weighhdl.cxx @@ -33,7 +33,7 @@ #include <weighhdl.hxx> #include <xmloff/xmltoken.hxx> #include <xmloff/xmluconv.hxx> -#include <vcl/vclenum.hxx> +#include <tools/fontenum.hxx> #include <tools/solar.h> #ifndef _INC_LIMITS @@ -42,10 +42,8 @@ #include <rtl/ustrbuf.hxx> #include <rtl/ustring.hxx> -#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_ -#include <toolkit/unohlp.hxx> -#endif #include <com/sun/star/uno/Any.hxx> +#include <com/sun/star/awt/FontWeight.hpp> using ::rtl::OUString; using ::rtl::OUStringBuffer; @@ -55,24 +53,24 @@ using namespace ::xmloff::token; struct FontWeightMapper { - FontWeight eWeight; + float fWeight; USHORT nValue; }; FontWeightMapper const aFontWeightMap[] = { - { WEIGHT_DONTKNOW, 0 }, - { WEIGHT_THIN, 100 }, - { WEIGHT_ULTRALIGHT, 150 }, - { WEIGHT_LIGHT, 250 }, - { WEIGHT_SEMILIGHT, 350 }, - { WEIGHT_NORMAL, 400 }, - { WEIGHT_MEDIUM, 450 }, - { WEIGHT_SEMIBOLD, 600 }, - { WEIGHT_BOLD, 700 }, - { WEIGHT_ULTRABOLD, 800 }, - { WEIGHT_BLACK, 900 }, - { (FontWeight)USHRT_MAX, 1000 } + { ::com::sun::star::awt::FontWeight::DONTKNOW, 0 }, + { ::com::sun::star::awt::FontWeight::THIN, 100 }, + { ::com::sun::star::awt::FontWeight::ULTRALIGHT, 150 }, + { ::com::sun::star::awt::FontWeight::LIGHT, 250 }, + { ::com::sun::star::awt::FontWeight::SEMILIGHT, 350 }, + { ::com::sun::star::awt::FontWeight::NORMAL, 400 }, + { ::com::sun::star::awt::FontWeight::NORMAL, 450 }, + { ::com::sun::star::awt::FontWeight::SEMIBOLD, 600 }, + { ::com::sun::star::awt::FontWeight::BOLD, 700 }, + { ::com::sun::star::awt::FontWeight::ULTRABOLD, 800 }, + { ::com::sun::star::awt::FontWeight::BLACK, 900 }, + { ::com::sun::star::awt::FontWeight::DONTKNOW, 1000 } }; /////////////////////////////////////////////////////////////////////////////// @@ -111,8 +109,8 @@ sal_Bool XMLFontWeightPropHdl::importXML( const OUString& rStrImpValue, Any& rVa if( bRet ) { bRet = sal_False; - - for( int i = 0; aFontWeightMap[i].eWeight != USHRT_MAX; i++ ) + static int nCount = sizeof(aFontWeightMap)/sizeof(FontWeightMapper); + for( int i=0; i<nCount; i++ ) { if( (nWeight >= aFontWeightMap[i].nValue) && (nWeight <= aFontWeightMap[i+1].nValue) ) { @@ -120,9 +118,9 @@ sal_Bool XMLFontWeightPropHdl::importXML( const OUString& rStrImpValue, Any& rVa sal_uInt16 nDiff2 = aFontWeightMap[i+1].nValue - nWeight; if( nDiff1 < nDiff2 ) - rValue <<= (float)( VCLUnoHelper::ConvertFontWeight( aFontWeightMap[i].eWeight ) ); + rValue <<= aFontWeightMap[i].fWeight; else - rValue <<= (float)( VCLUnoHelper::ConvertFontWeight( aFontWeightMap[i+1].eWeight ) ); + rValue <<= aFontWeightMap[i+1].fWeight; bRet = sal_True; break; @@ -136,7 +134,6 @@ sal_Bool XMLFontWeightPropHdl::importXML( const OUString& rStrImpValue, Any& rVa sal_Bool XMLFontWeightPropHdl::exportXML( OUString& rStrExpValue, const Any& rValue, const SvXMLUnitConverter& ) const { sal_Bool bRet = sal_False; - FontWeight eWeight; float fValue = float(); if( !( rValue >>= fValue ) ) @@ -151,15 +148,13 @@ sal_Bool XMLFontWeightPropHdl::exportXML( OUString& rStrExpValue, const Any& rVa else bRet = sal_True; - eWeight = VCLUnoHelper::ConvertFontWeight( fValue ); - if( bRet ) { sal_uInt16 nWeight = 0; - - for( int i = 0; aFontWeightMap[i].eWeight != -1; i++ ) + static int nCount = sizeof(aFontWeightMap)/sizeof(FontWeightMapper); + for( int i=0; i<nCount; i++ ) { - if( aFontWeightMap[i].eWeight == eWeight ) + if( fValue <= aFontWeightMap[i].fWeight ) { nWeight = aFontWeightMap[i].nValue; break; diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx index cece11f6fc31..05d85e74d1a7 100644 --- a/xmloff/source/style/xmlexppr.cxx +++ b/xmloff/source/style/xmlexppr.cxx @@ -54,7 +54,7 @@ #ifndef _SVSTDARR_USHORTS #define _SVSTDARR_USHORTS -#include <svtools/svstdarr.hxx> +#include <svl/svstdarr.hxx> #endif using ::rtl::OUString; diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx index 2fd2565ef91a..7233c0f7da8f 100644 --- a/xmloff/source/style/xmlnume.cxx +++ b/xmloff/source/style/xmlnume.cxx @@ -58,7 +58,7 @@ #include "XMLTextListAutoStylePool.hxx" #include <xmloff/xmlnume.hxx> #include <xmloff/xmlexp.hxx> -#include <vcl/vclenum.hxx> +#include <tools/fontenum.hxx> using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx index 3b1330211024..aa5aa2315c3e 100644 --- a/xmloff/source/style/xmlnumfe.cxx +++ b/xmloff/source/style/xmlnumfe.cxx @@ -34,10 +34,10 @@ #define _SVSTDARR_ULONGS #define _ZFORLIST_DECLARE_TABLE -#include <svtools/svstdarr.hxx> -#include <svtools/zforlist.hxx> -#include <svtools/zformat.hxx> -#include <svtools/numuno.hxx> +#include <svl/svstdarr.hxx> +#include <svl/zforlist.hxx> +#include <svl/zformat.hxx> +#include <svl/numuno.hxx> #include <i18npool/mslangid.hxx> #include <tools/debug.hxx> #include <rtl/math.hxx> @@ -60,8 +60,8 @@ #include <xmloff/xmlnumfi.hxx> // SvXMLNumFmtDefaults #define _SVSTDARR_USHORTS -#include <svtools/svstdarr.hxx> -#include <svtools/nfsymbol.hxx> +#include <svl/svstdarr.hxx> +#include <svl/nfsymbol.hxx> #include <xmloff/xmltoken.hxx> #include <xmloff/xmlexp.hxx> diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index 875676bef356..89b300bd0bc0 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -31,13 +31,13 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#include <svtools/syslocale.hxx> +#include <unotools/syslocale.hxx> #define _ZFORLIST_DECLARE_TABLE -#include <svtools/zforlist.hxx> +#include <svl/zforlist.hxx> -#include <svtools/zformat.hxx> -#include <svtools/numuno.hxx> +#include <svl/zformat.hxx> +#include <svl/numuno.hxx> #include <rtl/math.hxx> #include <i18npool/mslangid.hxx> #include <tools/debug.hxx> diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx index 74e1c3dd704c..66f10e7274c6 100644 --- a/xmloff/source/style/xmlnumi.cxx +++ b/xmloff/source/style/xmlnumi.cxx @@ -33,7 +33,7 @@ #include <rtl/ustrbuf.hxx> #include <tools/urlobj.hxx> #include <tools/debug.hxx> -#include <vcl/vclenum.hxx> +#include <tools/fontenum.hxx> #include <xmloff/xmltkmap.hxx> #include <xmloff/nmspmap.hxx> @@ -73,7 +73,7 @@ #include <xmloff/xmlnumi.hxx> #define _SVSTDARR_USHORTS -#include <svtools/svstdarr.hxx> +#include <svl/svstdarr.hxx> using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx index 5e7477bedbff..17a7c0206988 100644 --- a/xmloff/source/style/xmlstyle.cxx +++ b/xmloff/source/style/xmlstyle.cxx @@ -46,8 +46,8 @@ #endif #include <tools/debug.hxx> #include <tools/list.hxx> -#include <svtools/cntnrsrt.hxx> -#include <svtools/itemset.hxx> +#include <svl/cntnrsrt.hxx> +#include <svl/itemset.hxx> #include <xmloff/nmspmap.hxx> #include "xmlnmspe.hxx" #include <xmloff/xmltoken.hxx> @@ -283,7 +283,7 @@ class SvXMLStylesContext_Impl SvXMLStyleIndices_Impl *pIndices; sal_Bool bAutomaticStyle; -#ifndef PRODUCT +#ifdef DBG_UTIL sal_uInt32 nIndexCreated; #endif @@ -317,7 +317,7 @@ SvXMLStylesContext_Impl::SvXMLStylesContext_Impl( sal_Bool bAuto ) : aStyles( 20, 5 ), pIndices( 0 ), bAutomaticStyle( bAuto ) -#ifndef PRODUCT +#ifdef DBG_UTIL , nIndexCreated( 0 ) #endif {} @@ -363,7 +363,7 @@ const SvXMLStyleContext *SvXMLStylesContext_Impl::FindStyleChildContext( if( !pIndices && bCreateIndex && aStyles.Count() > 0 ) { -#ifndef PRODUCT +#ifdef DBG_UTIL DBG_ASSERT( 0==nIndexCreated, "Performance warning: sdbcx::Index created multiple times" ); #endif @@ -379,7 +379,7 @@ const SvXMLStyleContext *SvXMLStylesContext_Impl::FindStyleChildContext( delete pStyleIndex; } } -#ifndef PRODUCT +#ifdef DBG_UTIL ((SvXMLStylesContext_Impl *)this)->nIndexCreated++; #endif } diff --git a/xmloff/source/style/xmltabi.cxx b/xmloff/source/style/xmltabi.cxx index a32c606532be..4f7672289523 100644 --- a/xmloff/source/style/xmltabi.cxx +++ b/xmloff/source/style/xmltabi.cxx @@ -44,7 +44,7 @@ #include "xmltabi.hxx" #define _SVSTDARR_USHORTS -#include <svtools/svstdarr.hxx> +#include <svl/svstdarr.hxx> using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx b/xmloff/source/text/XMLIndexTOCContext.cxx index 92f015344948..9c206ad95430 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 7148bc92fc3a..443aa15dc77c 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 aa85549cc812..eeea34ce1cae 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 3710c16dddb3..509459b96880 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 708133efaf45..05d3694462be 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 632fba8ddddd..f6f768312a94 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 cad922d48fdd..af20bfbb23dc 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> @@ -1568,15 +1568,7 @@ void XMLTextImportHelper::AddOutlineStyleCandidate( const sal_Int8 nOutlineLevel { if( !mpOutlineStylesCandidates ) { -#ifdef IRIX - /* GCC 2 bug when member function is called as part of an array - * initialiser - */ - sal_Int8 count = xChapterNumbering->getCount(); - mpOutlineStylesCandidates = new ::std::vector<OUString>[count]; -#else mpOutlineStylesCandidates = new ::std::vector<OUString>[xChapterNumbering->getCount()]; -#endif } mpOutlineStylesCandidates[nOutlineLevel-1].push_back( rStyleName ); } @@ -1661,8 +1653,14 @@ void XMLTextImportHelper::SetOutlineStyles( sal_Bool bSetEmptyLevels ) pProps->Name = sHeadingStyleName; for ( sal_Int32 i = 0; i < nCount; ++i ) { - pProps->Value <<= sChosenStyles[i]; - xChapterNumbering->replaceByIndex( i, makeAny( aProps ) ); + // --> OD 2009-12-11 #i107610# + if ( bSetEmptyLevels || + sChosenStyles[i].getLength() > 0 ) + // <-- + { + pProps->Value <<= sChosenStyles[i]; + xChapterNumbering->replaceByIndex( i, makeAny( aProps ) ); + } } // <-- } diff --git a/xmloff/source/text/txtimppr.cxx b/xmloff/source/text/txtimppr.cxx index 9feacd0ad3d9..4dca73940dba 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 d46d3a446395..f07d8a89c5ef 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 dda2c3d49030..aaac42d14597 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 f3c8da0bcf03..62582e634c29 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 61d61714cfb9..b382f71db2f1 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> diff --git a/xmloff/source/transform/StyleOOoTContext.cxx b/xmloff/source/transform/StyleOOoTContext.cxx index c4d645277e91..d1941c18585b 100644 --- a/xmloff/source/transform/StyleOOoTContext.cxx +++ b/xmloff/source/transform/StyleOOoTContext.cxx @@ -352,7 +352,7 @@ XMLTypedPropertiesOOoTContext_Impl ++i; } -#ifndef PRODUCT +#ifdef DBG_UTIL if( !( XML_NAMESPACE_NONE == nPrefix || (XML_NAMESPACE_UNKNOWN_FLAG & nPrefix) || XML_PROP_TYPE_END==m_aPropTypes[1] || diff --git a/xmloff/source/transform/TransformerBase.cxx b/xmloff/source/transform/TransformerBase.cxx index 12b36274609e..973b49274031 100644 --- a/xmloff/source/transform/TransformerBase.cxx +++ b/xmloff/source/transform/TransformerBase.cxx @@ -337,7 +337,7 @@ void SAL_CALL XMLTransformerBase::startElement( const OUString& rName, } void SAL_CALL XMLTransformerBase::endElement( const OUString& -#ifndef PRODUCT +#ifdef DBG_UTIL rName #endif ) @@ -348,7 +348,7 @@ rName // Get topmost context ::rtl::Reference< XMLTransformerContext > xContext = m_pContexts->back(); -#ifndef PRODUCT +#ifdef DBG_UTIL OSL_ENSURE( xContext->GetQName() == rName, "XMLTransformerBase::endElement: popped context has wrong lname" ); #endif diff --git a/xmloff/util/makefile.mk b/xmloff/util/makefile.mk index 31852e15175a..bc93c1d4297c 100644 --- a/xmloff/util/makefile.mk +++ b/xmloff/util/makefile.mk @@ -71,15 +71,12 @@ SHL1IMPLIB= _ixo SHL1USE_EXPORTS=name SHL1STDLIBS= \ - $(SVTOOLLIB) \ $(TOOLSLIB) \ $(I18NISOLANGLIB) \ $(VOSLIB) \ $(CPPULIB) \ $(CPPUHELPERLIB)\ $(COMPHELPERLIB)\ - $(VCLLIB) \ - $(TKLIB) \ $(SVLLIB) \ $(SALLIB) \ $(UNOTOOLSLIB) \ |