diff options
Diffstat (limited to 'xmloff/source/style')
118 files changed, 655 insertions, 734 deletions
diff --git a/xmloff/source/style/AttributeContainerHandler.cxx b/xmloff/source/style/AttributeContainerHandler.cxx index cc542b25675a..94c0f2e25ef2 100644..100755 --- a/xmloff/source/style/AttributeContainerHandler.cxx +++ b/xmloff/source/style/AttributeContainerHandler.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -102,3 +103,5 @@ sal_Bool XMLAttributeContainerHandler::exportXML( OUString& /*rStrExpValue*/, co { return sal_True; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/DashStyle.cxx b/xmloff/source/style/DashStyle.cxx index 9ac798381e0c..6f0e403f607a 100644..100755 --- a/xmloff/source/style/DashStyle.cxx +++ b/xmloff/source/style/DashStyle.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -61,7 +62,7 @@ enum SvXMLTokenMapAttrs XML_TOK_DASH_END=XML_TOK_UNKNOWN }; -static __FAR_DATA SvXMLTokenMapEntry aDashStyleAttrTokenMap[] = +static SvXMLTokenMapEntry aDashStyleAttrTokenMap[] = { { XML_NAMESPACE_DRAW, XML_NAME, XML_TOK_DASH_NAME }, { XML_NAMESPACE_DRAW, XML_DISPLAY_NAME, XML_TOK_DASH_DISPLAY_NAME }, @@ -74,7 +75,7 @@ static __FAR_DATA SvXMLTokenMapEntry aDashStyleAttrTokenMap[] = XML_TOKEN_MAP_END }; -SvXMLEnumMapEntry __READONLY_DATA pXML_DashStyle_Enum[] = +SvXMLEnumMapEntry const pXML_DashStyle_Enum[] = { { XML_RECT, drawing::DashStyle_RECT }, { XML_ROUND, drawing::DashStyle_ROUND }, @@ -330,3 +331,5 @@ sal_Bool XMLDashStyleExport::exportXML( } #endif // #ifndef SVX_LIGHT + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/DrawAspectHdl.cxx b/xmloff/source/style/DrawAspectHdl.cxx index acf49bbab471..754e22b27d47 100644..100755 --- a/xmloff/source/style/DrawAspectHdl.cxx +++ b/xmloff/source/style/DrawAspectHdl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -44,7 +45,7 @@ using namespace ::xmloff::token; // class XMLMeasurePropHdl // -SvXMLEnumMapEntry __READONLY_DATA pXML_DrawAspect_Enum[] = +SvXMLEnumMapEntry const pXML_DrawAspect_Enum[] = { { XML_CONTENT, 1 }, { XML_THUMBNAIL, 2 }, @@ -87,3 +88,4 @@ sal_Bool DrawAspectHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValu return bRet; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/DrawAspectHdl.hxx b/xmloff/source/style/DrawAspectHdl.hxx index 52b14d5af2dd..c644c0dc85fb 100644..100755 --- a/xmloff/source/style/DrawAspectHdl.hxx +++ b/xmloff/source/style/DrawAspectHdl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -43,3 +44,5 @@ public: }; #endif // _XMLOFF_DRAWASPECTHDL_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/EnumPropertyHdl.cxx b/xmloff/source/style/EnumPropertyHdl.cxx index 0c01ba9e6db9..55c3a60491ad 100644..100755 --- a/xmloff/source/style/EnumPropertyHdl.cxx +++ b/xmloff/source/style/EnumPropertyHdl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -71,7 +72,7 @@ sal_Bool XMLEnumPropertyHdl::importXML( const OUString& rStrImpValue, Any& rValu rValue <<= (sal_Int8) nValue; break; default: - DBG_ERROR( "Wrong type for enum property handler!" ); + OSL_FAIL( "Wrong type for enum property handler!" ); return sal_False; } return sal_True; @@ -96,3 +97,4 @@ sal_Bool XMLEnumPropertyHdl::exportXML( OUString& rStrExpValue, const Any& rValu return sal_True; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/FillStyleContext.cxx b/xmloff/source/style/FillStyleContext.cxx index 7038f1b74495..945a42aae6e5 100644..100755 --- a/xmloff/source/style/FillStyleContext.cxx +++ b/xmloff/source/style/FillStyleContext.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -359,3 +360,5 @@ sal_Bool XMLDashStyleContext::IsTransient() const { return sal_True; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/FillStyleContext.hxx b/xmloff/source/style/FillStyleContext.hxx index 32d448cbb0b1..b047ea42b5ef 100644..100755 --- a/xmloff/source/style/FillStyleContext.hxx +++ b/xmloff/source/style/FillStyleContext.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -165,3 +166,5 @@ public: }; #endif // _XMLOFF_FILLSTYLECONTEXTS_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/GradientStyle.cxx b/xmloff/source/style/GradientStyle.cxx index 6e3921593644..9ba744aea6fd 100644..100755 --- a/xmloff/source/style/GradientStyle.cxx +++ b/xmloff/source/style/GradientStyle.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -66,7 +67,7 @@ enum SvXMLTokenMapAttrs }; -SvXMLEnumMapEntry __READONLY_DATA pXML_GradientStyle_Enum[] = +SvXMLEnumMapEntry const pXML_GradientStyle_Enum[] = { { XML_GRADIENTSTYLE_LINEAR, awt::GradientStyle_LINEAR }, { XML_GRADIENTSTYLE_AXIAL, awt::GradientStyle_AXIAL }, @@ -111,7 +112,7 @@ sal_Bool XMLGradientStyleImport::importXML( aGradient.Border = 0; { - static __FAR_DATA SvXMLTokenMapEntry aGradientAttrTokenMap[] = + static SvXMLTokenMapEntry aGradientAttrTokenMap[] = { { XML_NAMESPACE_DRAW, XML_NAME, XML_TOK_GRADIENT_NAME }, { XML_NAMESPACE_DRAW, XML_DISPLAY_NAME, XML_TOK_GRADIENT_DISPLAY_NAME }, @@ -342,3 +343,5 @@ sal_Bool XMLGradientStyleExport::exportXML( } #endif // #ifndef SVX_LIGHT + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/HatchStyle.cxx b/xmloff/source/style/HatchStyle.cxx index 7785d70f2596..c8a2be62a269 100644..100755 --- a/xmloff/source/style/HatchStyle.cxx +++ b/xmloff/source/style/HatchStyle.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -58,7 +59,7 @@ enum SvXMLTokenMapAttrs }; -SvXMLEnumMapEntry __READONLY_DATA pXML_HatchStyle_Enum[] = +SvXMLEnumMapEntry const pXML_HatchStyle_Enum[] = { { XML_HATCHSTYLE_SINGLE, drawing::HatchStyle_SINGLE }, { XML_HATCHSTYLE_DOUBLE, drawing::HatchStyle_DOUBLE }, @@ -100,7 +101,7 @@ sal_Bool XMLHatchStyleImport::importXML( aHatch.Angle = 0; { - static __FAR_DATA SvXMLTokenMapEntry aHatchAttrTokenMap[] = + static SvXMLTokenMapEntry aHatchAttrTokenMap[] = { { XML_NAMESPACE_DRAW, XML_NAME, XML_TOK_HATCH_NAME }, { XML_NAMESPACE_DRAW, XML_DISPLAY_NAME, XML_TOK_HATCH_DISPLAY_NAME }, @@ -261,3 +262,5 @@ sal_Bool XMLHatchStyleExport::exportXML( } #endif // #ifndef SVX_LIGHT + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/ImageStyle.cxx b/xmloff/source/style/ImageStyle.cxx index f6716bfbcfd4..89f19482ca72 100644..100755 --- a/xmloff/source/style/ImageStyle.cxx +++ b/xmloff/source/style/ImageStyle.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -151,7 +152,7 @@ sal_Bool XMLImageStyle::ImpImportXML( const uno::Reference< xml::sax::XAttribute OUString aDisplayName; { - static __FAR_DATA SvXMLTokenMapEntry aHatchAttrTokenMap[] = + static SvXMLTokenMapEntry aHatchAttrTokenMap[] = { { XML_NAMESPACE_DRAW, XML_NAME, XML_TOK_IMAGE_NAME }, { XML_NAMESPACE_DRAW, XML_DISPLAY_NAME, XML_TOK_IMAGE_DISPLAY_NAME }, @@ -223,3 +224,5 @@ sal_Bool XMLImageStyle::ImpImportXML( const uno::Reference< xml::sax::XAttribute return bRet; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/MarkerStyle.cxx b/xmloff/source/style/MarkerStyle.cxx index f0f32bb18c25..1235d9f18483 100644..100755 --- a/xmloff/source/style/MarkerStyle.cxx +++ b/xmloff/source/style/MarkerStyle.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -284,3 +285,5 @@ sal_Bool XMLMarkerStyleExport::exportXML( } #endif // #ifndef SVX_LIGHT + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/MultiPropertySetHelper.cxx b/xmloff/source/style/MultiPropertySetHelper.cxx index 301d1668505f..dc5e2eee6cc7 100644..100755 --- a/xmloff/source/style/MultiPropertySetHelper.cxx +++ b/xmloff/source/style/MultiPropertySetHelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,9 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#ifndef _XMLOFF_MULTIPROPERTYSETHELPER_HXX #include "MultiPropertySetHelper.hxx" -#endif #include <com/sun/star/beans/XPropertySetInfo.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/XMultiPropertySet.hpp> @@ -214,3 +213,5 @@ const Any& MultiPropertySetHelper::getValue( sal_Int16 nIndex, // inline methods defined in header: // inline Any& MultiPropertySetHelper::getValue( sal_Int16 nIndex ) // inline sal_Bool MultiPropertySetHelper::hasProperty( sal_Int16 nValueNo ) + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/NamedBoolPropertyHdl.cxx b/xmloff/source/style/NamedBoolPropertyHdl.cxx index 1402630ec3db..8f008a65751e 100644..100755 --- a/xmloff/source/style/NamedBoolPropertyHdl.cxx +++ b/xmloff/source/style/NamedBoolPropertyHdl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -80,3 +81,4 @@ sal_Bool XMLNamedBoolPropertyHdl::exportXML( OUString& rStrExpValue, const Any& return sal_True; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/PageHeaderFooterContext.cxx b/xmloff/source/style/PageHeaderFooterContext.cxx index b8939b4cf889..5661ec44c16a 100644..100755 --- a/xmloff/source/style/PageHeaderFooterContext.cxx +++ b/xmloff/source/style/PageHeaderFooterContext.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,9 +34,7 @@ // INCLUDE --------------------------------------------------------------- -#ifndef _XMLOFF_PAGEPHEADERFOOTERCONTEXT_HXX #include "PageHeaderFooterContext.hxx" -#endif #include "xmloff/xmlnmspe.hxx" #include <xmloff/xmltoken.hxx> #include "PagePropertySetContext.hxx" @@ -98,3 +97,4 @@ void PageHeaderFooterContext::EndElement() { } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/PageHeaderFooterContext.hxx b/xmloff/source/style/PageHeaderFooterContext.hxx index e5b437f2ce21..b47b99577ccd 100644..100755 --- a/xmloff/source/style/PageHeaderFooterContext.hxx +++ b/xmloff/source/style/PageHeaderFooterContext.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -61,3 +62,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/PageMasterExportPropMapper.cxx b/xmloff/source/style/PageMasterExportPropMapper.cxx index fe14231e51c4..38c74d128356 100644..100755 --- a/xmloff/source/style/PageMasterExportPropMapper.cxx +++ b/xmloff/source/style/PageMasterExportPropMapper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,10 +31,8 @@ #include "PageMasterExportPropMapper.hxx" #include <xmloff/xmltoken.hxx> #include <comphelper/types.hxx> -#include <com/sun/star/table/BorderLine.hpp> -#ifndef _XMLOFF_PAGEMASTERSTYLEMAP_HXX +#include <com/sun/star/table/BorderLine2.hpp> #include <xmloff/PageMasterStyleMap.hxx> -#endif #include <tools/debug.hxx> #include <rtl/ustrbuf.hxx> #include <comphelper/extract.hxx> @@ -54,10 +53,11 @@ inline sal_Bool lcl_HasSameLineWidth( const table::BorderLine& rLine1, const tab (rLine1.LineDistance == rLine2.LineDistance); } -inline sal_Bool operator==( const table::BorderLine& rLine1, const table::BorderLine& rLine2 ) +inline sal_Bool operator==( const table::BorderLine2& rLine1, const table::BorderLine2& rLine2 ) { return (rLine1.Color == rLine2.Color) && - lcl_HasSameLineWidth( rLine1, rLine2 ); + lcl_HasSameLineWidth( rLine1, rLine2 ) && + ( rLine1.LineStyle == rLine2.LineStyle ); } inline void lcl_RemoveState( XMLPropertyState* pState ) @@ -133,7 +133,7 @@ void XMLPropertyStateBuffer::ContextFilter( ::std::vector< XMLPropertyState >& ) { if( pPMBorderTop && pPMBorderBottom && pPMBorderLeft && pPMBorderRight ) { - table::BorderLine aLineTop, aLineBottom, aLineLeft, aLineRight; + table::BorderLine2 aLineTop, aLineBottom, aLineLeft, aLineRight; pPMBorderTop->maValue >>= aLineTop; pPMBorderBottom->maValue >>= aLineBottom; @@ -158,7 +158,7 @@ void XMLPropertyStateBuffer::ContextFilter( ::std::vector< XMLPropertyState >& ) { if( pPMBorderWidthTop && pPMBorderWidthBottom && pPMBorderWidthLeft && pPMBorderWidthRight ) { - table::BorderLine aLineTop, aLineBottom, aLineLeft, aLineRight; + table::BorderLine2 aLineTop, aLineBottom, aLineLeft, aLineRight; pPMBorderWidthTop->maValue >>= aLineTop; pPMBorderWidthBottom->maValue >>= aLineBottom; @@ -442,3 +442,4 @@ void XMLPageMasterExportPropMapper::ContextFilter( SvXMLExportPropertyMapper::ContextFilter(rPropState,rPropSet); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/PageMasterExportPropMapper.hxx b/xmloff/source/style/PageMasterExportPropMapper.hxx index da098ea15de2..20617b0726de 100644..100755 --- a/xmloff/source/style/PageMasterExportPropMapper.hxx +++ b/xmloff/source/style/PageMasterExportPropMapper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -77,3 +78,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/PageMasterImportContext.cxx b/xmloff/source/style/PageMasterImportContext.cxx index bcbb05012fec..fbaff859da3f 100644..100755 --- a/xmloff/source/style/PageMasterImportContext.cxx +++ b/xmloff/source/style/PageMasterImportContext.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,16 +35,10 @@ #include <xmloff/xmltoken.hxx> #include "PageMasterPropHdl.hxx" #include "PagePropertySetContext.hxx" -#ifndef _XMLOFF_PAGEPHEADERFOOTERCONTEXT_HXX #include "PageHeaderFooterContext.hxx" -#endif -#ifndef _XMLOFF_PAGEMASTERPROPMAPPER_HXX #include "PageMasterPropMapper.hxx" -#endif #include "PageMasterImportPropMapper.hxx" -#ifndef _XMLOFF_PAGEMASTERSTYLEMAP_HXX #include <xmloff/PageMasterStyleMap.hxx> -#endif #include <com/sun/star/lang/XMultiServiceFactory.hpp> using namespace ::com::sun::star; @@ -199,3 +194,4 @@ void PageStyleContext::SetDefaults( ) } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/PageMasterImportPropMapper.cxx b/xmloff/source/style/PageMasterImportPropMapper.cxx index 59cff11d65cc..ad3350767d96 100644..100755 --- a/xmloff/source/style/PageMasterImportPropMapper.cxx +++ b/xmloff/source/style/PageMasterImportPropMapper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,14 +31,10 @@ #include "PageMasterImportPropMapper.hxx" -#ifndef _XMLOFF_PAGEMASTERPROPMAPPER_HXX #include "PageMasterPropMapper.hxx" -#endif -#ifndef _XMLOFF_PAGEMASTERSTYLEMAP_HXX #include <xmloff/PageMasterStyleMap.hxx> -#endif #include <xmloff/maptype.hxx> -#include <com/sun/star/table/BorderLine.hpp> +#include <com/sun/star/table/BorderLine2.hpp> #include <com/sun/star/container/XNameContainer.hpp> #include <xmloff/xmlimp.hxx> @@ -62,7 +59,7 @@ PageMasterImportPropertyMapper::~PageMasterImportPropertyMapper() { } -sal_Bool PageMasterImportPropertyMapper::handleSpecialItem( +bool PageMasterImportPropertyMapper::handleSpecialItem( XMLPropertyState& rProperty, ::std::vector< XMLPropertyState >& rProperties, const ::rtl::OUString& rValue, @@ -208,11 +205,11 @@ void PageMasterImportPropertyMapper::finished(::std::vector< XMLPropertyState >& pBorderWidths[i]->mnIndex = -1; if( pBorders[i] ) { - table::BorderLine aBorderLine; + table::BorderLine2 aBorderLine; pBorders[i]->maValue >>= aBorderLine; if( pBorderWidths[i] ) { - table::BorderLine aBorderLineWidth; + table::BorderLine2 aBorderLineWidth; pBorderWidths[i]->maValue >>= aBorderLineWidth; aBorderLine.OuterLineWidth = aBorderLineWidth.OuterLineWidth; aBorderLine.InnerLineWidth = aBorderLineWidth.InnerLineWidth; @@ -230,11 +227,11 @@ void PageMasterImportPropertyMapper::finished(::std::vector< XMLPropertyState >& pHeaderBorderWidths[i]->mnIndex = -1; if( pHeaderBorders[i] ) { - table::BorderLine aBorderLine; + table::BorderLine2 aBorderLine; pHeaderBorders[i]->maValue >>= aBorderLine; if( pHeaderBorderWidths[i] ) { - table::BorderLine aBorderLineWidth; + table::BorderLine2 aBorderLineWidth; pHeaderBorderWidths[i]->maValue >>= aBorderLineWidth; aBorderLine.OuterLineWidth = aBorderLineWidth.OuterLineWidth; aBorderLine.InnerLineWidth = aBorderLineWidth.InnerLineWidth; @@ -252,11 +249,11 @@ void PageMasterImportPropertyMapper::finished(::std::vector< XMLPropertyState >& pFooterBorderWidths[i]->mnIndex = -1; if( pFooterBorders[i] ) { - table::BorderLine aBorderLine; + table::BorderLine2 aBorderLine; pFooterBorders[i]->maValue >>= aBorderLine; if( pFooterBorderWidths[i] ) { - table::BorderLine aBorderLineWidth; + table::BorderLine2 aBorderLineWidth; pFooterBorderWidths[i]->maValue >>= aBorderLineWidth; aBorderLine.OuterLineWidth = aBorderLineWidth.OuterLineWidth; aBorderLine.InnerLineWidth = aBorderLineWidth.InnerLineWidth; @@ -339,3 +336,4 @@ void PageMasterImportPropertyMapper::finished(::std::vector< XMLPropertyState >& } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/PageMasterImportPropMapper.hxx b/xmloff/source/style/PageMasterImportPropMapper.hxx index 56a5014e8ef6..e386104ed8c9 100644..100755 --- a/xmloff/source/style/PageMasterImportPropMapper.hxx +++ b/xmloff/source/style/PageMasterImportPropMapper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -46,7 +47,7 @@ public: virtual ~PageMasterImportPropertyMapper(); /** this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_IMPORT flag set */ - virtual sal_Bool handleSpecialItem( + virtual bool handleSpecialItem( XMLPropertyState& rProperty, ::std::vector< XMLPropertyState >& rProperties, const ::rtl::OUString& rValue, @@ -60,3 +61,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/PageMasterPropHdl.cxx b/xmloff/source/style/PageMasterPropHdl.cxx index 755272db92a7..4fb090f32662 100644..100755 --- a/xmloff/source/style/PageMasterPropHdl.cxx +++ b/xmloff/source/style/PageMasterPropHdl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -424,3 +425,4 @@ sal_Bool XMLPMPropHdl_CenterVertical::exportXML( return bRet; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/PageMasterPropHdl.hxx b/xmloff/source/style/PageMasterPropHdl.hxx index 23a124dd6e3d..b2e1b6ade887 100644..100755 --- a/xmloff/source/style/PageMasterPropHdl.hxx +++ b/xmloff/source/style/PageMasterPropHdl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -178,3 +179,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/PageMasterPropHdlFactory.cxx b/xmloff/source/style/PageMasterPropHdlFactory.cxx index 2888f87e8f7e..3ff8a9c1a75d 100644..100755 --- a/xmloff/source/style/PageMasterPropHdlFactory.cxx +++ b/xmloff/source/style/PageMasterPropHdlFactory.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,14 +33,10 @@ #include <xmloff/xmltoken.hxx> #include "xmlbahdl.hxx" #include <xmloff/NamedBoolPropertyHdl.hxx> -#ifndef _XMLOFF_XMLTEXTCOLUMNSPPROPERTYHANDLER_HXX #include "XMLTextColumnsPropertyHandler.hxx" -#endif #include <xmloff/XMLConstantsPropertyHandler.hxx> #include "PageMasterPropHdl.hxx" -#ifndef _XMLOFF_PAGEMASTERSTYLEMAP_HXX #include <xmloff/PageMasterStyleMap.hxx> -#endif #include <com/sun/star/text/TextGridMode.hpp> @@ -148,3 +145,4 @@ const XMLPropertyHandler* XMLPageMasterPropHdlFactory::GetPropertyHandler( sal_I } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/PageMasterPropHdlFactory.hxx b/xmloff/source/style/PageMasterPropHdlFactory.hxx index af558029f4a3..10b796c59640 100644..100755 --- a/xmloff/source/style/PageMasterPropHdlFactory.hxx +++ b/xmloff/source/style/PageMasterPropHdlFactory.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -45,3 +46,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/PageMasterPropMapper.cxx b/xmloff/source/style/PageMasterPropMapper.cxx index cf27923288c3..97159c698f9c 100644..100755 --- a/xmloff/source/style/PageMasterPropMapper.cxx +++ b/xmloff/source/style/PageMasterPropMapper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,14 +29,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#ifndef _XMLOFF_PAGEMASTERPROPMAPPER_HXX #include "PageMasterPropMapper.hxx" -#endif -#ifndef _XMLOFF_PAGEMASTERSTYLEMAP_HXX #include <xmloff/PageMasterStyleMap.hxx> -#endif #include "PageMasterPropHdlFactory.hxx" using namespace ::com::sun::star; @@ -61,3 +58,4 @@ XMLPageMasterPropSetMapper::~XMLPageMasterPropSetMapper() { } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/PageMasterPropMapper.hxx b/xmloff/source/style/PageMasterPropMapper.hxx index 90ddabdd082d..2b48501b75d7 100644..100755 --- a/xmloff/source/style/PageMasterPropMapper.hxx +++ b/xmloff/source/style/PageMasterPropMapper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -44,3 +45,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/PageMasterStyleMap.cxx b/xmloff/source/style/PageMasterStyleMap.cxx index 6dbda70f5125..a593744fd4ae 100644..100755 --- a/xmloff/source/style/PageMasterStyleMap.cxx +++ b/xmloff/source/style/PageMasterStyleMap.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,9 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#ifndef _XMLOFF_PAGEMASTERSTYLEMAP_HXX #include <xmloff/PageMasterStyleMap.hxx> -#endif #include "xmloff/xmlnmspe.hxx" #include <xmloff/xmltoken.hxx> @@ -189,3 +188,4 @@ const XMLPropertyMapEntry aXMLPageMasterStyleMap[] = { 0L, 0, 0, XML_EMPTY, 0, 0, SvtSaveOptions::ODFVER_010 } }; +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/PagePropertySetContext.cxx b/xmloff/source/style/PagePropertySetContext.cxx index f65cc7689dc0..a17e124fa2ee 100644..100755 --- a/xmloff/source/style/PagePropertySetContext.cxx +++ b/xmloff/source/style/PagePropertySetContext.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,9 +32,7 @@ #include "PagePropertySetContext.hxx" #include "XMLBackgroundImageContext.hxx" #include "XMLTextColumnsContext.hxx" -#ifndef _XMLOFF_PAGEMASTERSTYLEMAP_HXX #include <xmloff/PageMasterStyleMap.hxx> -#endif #include "XMLFootnoteSeparatorImport.hxx" using ::rtl::OUString; @@ -100,6 +99,8 @@ SvXMLImportContext *PagePropertySetContext::CreateChildContext( nFil == mxMapper->getPropertySetMapper() ->GetEntryContextId( rProp.mnIndex-1 ), "invalid property map!"); + (void)nPos; + (void)nFil; pContext = new XMLBackgroundImageContext( GetImport(), nPrefix, rLocalName, xAttrList, @@ -142,3 +143,4 @@ SvXMLImportContext *PagePropertySetContext::CreateChildContext( } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/PagePropertySetContext.hxx b/xmloff/source/style/PagePropertySetContext.hxx index 3bb0f2e84d04..cfa2e554f77b 100644..100755 --- a/xmloff/source/style/PagePropertySetContext.hxx +++ b/xmloff/source/style/PagePropertySetContext.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -64,3 +65,5 @@ public: #endif // _XMLOFF_XMLTEXTPROPERTYSETCONTEXT_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/SinglePropertySetInfoCache.cxx b/xmloff/source/style/SinglePropertySetInfoCache.cxx index 896c4e9fecef..6282828e162f 100644..100755 --- a/xmloff/source/style/SinglePropertySetInfoCache.cxx +++ b/xmloff/source/style/SinglePropertySetInfoCache.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,9 +31,7 @@ #include <com/sun/star/lang/XTypeProvider.hpp> #include <cppuhelper/weakref.hxx> -#ifndef _XMLOFF_SINGLEPROPERTYSETINFOCACHE_HXX #include <xmloff/SinglePropertySetInfoCache.hxx> -#endif using namespace ::com::sun::star::uno; using ::com::sun::star::lang::XTypeProvider; @@ -87,3 +86,5 @@ sal_Bool SinglePropertySetInfoCache::hasProperty( return bRet; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/StyleMap.cxx b/xmloff/source/style/StyleMap.cxx index 07f1bc440d8c..66b9453f4bb8 100644..100755 --- a/xmloff/source/style/StyleMap.cxx +++ b/xmloff/source/style/StyleMap.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -92,3 +93,4 @@ sal_Int64 SAL_CALL StyleMap::getSomething( } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/TransGradientStyle.cxx b/xmloff/source/style/TransGradientStyle.cxx index 073315761076..458ebd038368 100644..100755 --- a/xmloff/source/style/TransGradientStyle.cxx +++ b/xmloff/source/style/TransGradientStyle.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -62,7 +63,7 @@ enum SvXMLTokenMapAttrs }; -SvXMLEnumMapEntry __READONLY_DATA pXML_GradientStyle_Enum[] = +SvXMLEnumMapEntry const pXML_GradientStyle_Enum[] = { { XML_GRADIENTSTYLE_LINEAR, awt::GradientStyle_LINEAR }, { XML_GRADIENTSTYLE_AXIAL, awt::GradientStyle_AXIAL }, @@ -106,7 +107,7 @@ sal_Bool XMLTransGradientStyleImport::importXML( aGradient.Border = 0; { - static __FAR_DATA SvXMLTokenMapEntry aTrGradientAttrTokenMap[] = + static SvXMLTokenMapEntry aTrGradientAttrTokenMap[] = { { XML_NAMESPACE_DRAW, XML_NAME, XML_TOK_GRADIENT_NAME }, { XML_NAMESPACE_DRAW, XML_DISPLAY_NAME, XML_TOK_GRADIENT_DISPLAY_NAME }, @@ -327,3 +328,5 @@ sal_Bool XMLTransGradientStyleExport::exportXML( } #endif // #ifndef SVX_LIGHT + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/VisAreaContext.cxx b/xmloff/source/style/VisAreaContext.cxx index 795d9905243e..727d09293025 100644..100755 --- a/xmloff/source/style/VisAreaContext.cxx +++ b/xmloff/source/style/VisAreaContext.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -132,3 +133,5 @@ SvXMLImportContext *XMLVisAreaContext::CreateChildContext( sal_uInt16 nPrefix, void XMLVisAreaContext::EndElement() { } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/VisAreaExport.cxx b/xmloff/source/style/VisAreaExport.cxx index 6bdcb18c7f43..5ed8dbb2a801 100644..100755 --- a/xmloff/source/style/VisAreaExport.cxx +++ b/xmloff/source/style/VisAreaExport.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -82,3 +83,4 @@ XMLVisAreaExport::~XMLVisAreaExport() } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/WordWrapPropertyHdl.cxx b/xmloff/source/style/WordWrapPropertyHdl.cxx index f3717b95c9cd..c7fc2b26c8b0 100644..100755 --- a/xmloff/source/style/WordWrapPropertyHdl.cxx +++ b/xmloff/source/style/WordWrapPropertyHdl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -100,3 +101,4 @@ sal_Bool XMLWordWrapPropertyHdl::exportXML( OUString& rStrExpValue, const Any& r return sal_True; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/XMLBackgroundImageContext.cxx b/xmloff/source/style/XMLBackgroundImageContext.cxx index d8f84b1d9840..4f3bd37d8a21 100644..100755 --- a/xmloff/source/style/XMLBackgroundImageContext.cxx +++ b/xmloff/source/style/XMLBackgroundImageContext.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -61,7 +62,7 @@ enum SvXMLTokenMapAttrs }; const SvXMLTokenMapEntry* lcl_getBGImgAttributesAttrTokenMap() { - static __FAR_DATA SvXMLTokenMapEntry aBGImgAttributesAttrTokenMap[] = + static SvXMLTokenMapEntry aBGImgAttributesAttrTokenMap[] = { { XML_NAMESPACE_XLINK, XML_HREF, XML_TOK_BGIMG_HREF }, { XML_NAMESPACE_XLINK, XML_TYPE, XML_TOK_BGIMG_TYPE }, @@ -412,3 +413,5 @@ void XMLBackgroundImageContext::EndElement() if( -1 != aTransparencyProp.mnIndex ) rProperties.push_back( aTransparencyProp ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/XMLBackgroundImageExport.cxx b/xmloff/source/style/XMLBackgroundImageExport.cxx index 45039f348603..adeb55009ea4 100644..100755 --- a/xmloff/source/style/XMLBackgroundImageExport.cxx +++ b/xmloff/source/style/XMLBackgroundImageExport.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -172,3 +173,5 @@ void XMLBackgroundImageExport::exportXML( const Any& rURL, } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/XMLBitmapLogicalSizePropertyHandler.cxx b/xmloff/source/style/XMLBitmapLogicalSizePropertyHandler.cxx index 547edb1e5a68..72fedc3c2081 100644..100755 --- a/xmloff/source/style/XMLBitmapLogicalSizePropertyHandler.cxx +++ b/xmloff/source/style/XMLBitmapLogicalSizePropertyHandler.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -64,3 +65,4 @@ sal_Bool XMLBitmapLogicalSizePropertyHandler::exportXML( return sal_False; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/XMLBitmapRepeatOffsetPropertyHandler.cxx b/xmloff/source/style/XMLBitmapRepeatOffsetPropertyHandler.cxx index 32be17ab8fee..6f7143d62da3 100644..100755 --- a/xmloff/source/style/XMLBitmapRepeatOffsetPropertyHandler.cxx +++ b/xmloff/source/style/XMLBitmapRepeatOffsetPropertyHandler.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -103,3 +104,4 @@ sal_Bool XMLBitmapRepeatOffsetPropertyHandler::exportXML( return sal_False; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/XMLClipPropertyHandler.cxx b/xmloff/source/style/XMLClipPropertyHandler.cxx index f90e3346c1ba..af36556370ec 100644..100755 --- a/xmloff/source/style/XMLClipPropertyHandler.cxx +++ b/xmloff/source/style/XMLClipPropertyHandler.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -144,3 +145,5 @@ sal_Bool XMLClipPropertyHandler::exportXML( OUString& rStrExpValue, const uno::A return bRet; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/XMLConstantsPropertyHandler.cxx b/xmloff/source/style/XMLConstantsPropertyHandler.cxx index 5988dd616a9a..55c62fc8d810 100644..100755 --- a/xmloff/source/style/XMLConstantsPropertyHandler.cxx +++ b/xmloff/source/style/XMLConstantsPropertyHandler.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -100,14 +101,15 @@ sal_Bool XMLConstantsPropertyHandler::exportXML( } else { - DBG_ERROR("XMLConstantsPropertyHandler::exportXML() constant is out of range for implementation using sal_uInt16"); + OSL_FAIL("XMLConstantsPropertyHandler::exportXML() constant is out of range for implementation using sal_uInt16"); } } else { - DBG_ERROR("XMLConstantsPropertyHandler::exportXML() could not convert any to sal_Int32"); + OSL_FAIL("XMLConstantsPropertyHandler::exportXML() could not convert any to sal_Int32"); } return bRet; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/XMLElementPropertyContext.cxx b/xmloff/source/style/XMLElementPropertyContext.cxx index 6985d72cf196..1a9bf554a8e5 100644..100755 --- a/xmloff/source/style/XMLElementPropertyContext.cxx +++ b/xmloff/source/style/XMLElementPropertyContext.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -58,3 +59,4 @@ void XMLElementPropertyContext::EndElement( ) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/XMLFillBitmapSizePropertyHandler.cxx b/xmloff/source/style/XMLFillBitmapSizePropertyHandler.cxx index 90c35f849c12..ac23035e9683 100644..100755 --- a/xmloff/source/style/XMLFillBitmapSizePropertyHandler.cxx +++ b/xmloff/source/style/XMLFillBitmapSizePropertyHandler.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -97,3 +98,4 @@ sal_Bool XMLFillBitmapSizePropertyHandler::exportXML( return sal_False; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/XMLFontAutoStylePool.cxx b/xmloff/source/style/XMLFontAutoStylePool.cxx index 0337ff32136f..fb749e6f4edc 100644..100755 --- a/xmloff/source/style/XMLFontAutoStylePool.cxx +++ b/xmloff/source/style/XMLFontAutoStylePool.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -290,3 +291,4 @@ void XMLFontAutoStylePool::exportXML() } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/XMLFontStylesContext.cxx b/xmloff/source/style/XMLFontStylesContext.cxx index c36fd4c55fab..d4823ccf03ee 100644..100755 --- a/xmloff/source/style/XMLFontStylesContext.cxx +++ b/xmloff/source/style/XMLFontStylesContext.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -70,7 +71,7 @@ enum XMLFontStyleAttrTokens const SvXMLTokenMapEntry* lcl_getFontStyleAttrTokenMap() { - static __FAR_DATA SvXMLTokenMapEntry aFontStyleAttrTokenMap[] = + static SvXMLTokenMapEntry aFontStyleAttrTokenMap[] = { { XML_NAMESPACE_SVG, XML_FONT_FAMILY, XML_TOK_FONT_STYLE_ATTR_FAMILY }, @@ -283,3 +284,5 @@ sal_Bool XMLFontStylesContext::FillProperties( const OUString& rName, nFamilyIdx, nPitchIdx, nCharsetIdx ); return 0 != pFontStyle; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/XMLFootnoteSeparatorExport.cxx b/xmloff/source/style/XMLFootnoteSeparatorExport.cxx index b576c697732c..ae775a96d9f7 100644..100755 --- a/xmloff/source/style/XMLFootnoteSeparatorExport.cxx +++ b/xmloff/source/style/XMLFootnoteSeparatorExport.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -35,9 +36,7 @@ #include <xmloff/xmltoken.hxx> #include <xmloff/xmlprmap.hxx> -#ifndef _XMLOFF_PAGEMASTERSTYLEMAP_HXX #include <xmloff/PageMasterStyleMap.hxx> -#endif #include <com/sun/star/text/HorizontalAdjust.hpp> #include <rtl/ustrbuf.hxx> @@ -165,3 +164,5 @@ void XMLFootnoteSeparatorExport::exportXML( SvXMLElementExport aElem(rExport, XML_NAMESPACE_STYLE, XML_FOOTNOTE_SEP, sal_True, sal_True); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/XMLFootnoteSeparatorExport.hxx b/xmloff/source/style/XMLFootnoteSeparatorExport.hxx index 9b3081c53aa1..6d268e16e40f 100644..100755 --- a/xmloff/source/style/XMLFootnoteSeparatorExport.hxx +++ b/xmloff/source/style/XMLFootnoteSeparatorExport.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -60,3 +61,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/XMLFootnoteSeparatorImport.cxx b/xmloff/source/style/XMLFootnoteSeparatorImport.cxx index 7293c1198cea..9a6cb47228fd 100644..100755 --- a/xmloff/source/style/XMLFootnoteSeparatorImport.cxx +++ b/xmloff/source/style/XMLFootnoteSeparatorImport.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -43,9 +44,7 @@ #include <xmloff/nmspmap.hxx> #include <xmloff/maptype.hxx> -#ifndef _XMLOFF_PAGEMASTERSTYLEMAP_HXX #include <xmloff/PageMasterStyleMap.hxx> -#endif #include <tools/debug.hxx> #include <tools/color.hxx> @@ -191,3 +190,5 @@ void XMLFootnoteSeparatorImport::StartElement( XMLPropertyState aLineWeight( nPropIndex, aAny ); rProperties.push_back(aLineWeight); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/XMLFootnoteSeparatorImport.hxx b/xmloff/source/style/XMLFootnoteSeparatorImport.hxx index debe86701fd1..9c929c15315c 100644..100755 --- a/xmloff/source/style/XMLFootnoteSeparatorImport.hxx +++ b/xmloff/source/style/XMLFootnoteSeparatorImport.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -75,3 +76,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/XMLIsPercentagePropertyHandler.cxx b/xmloff/source/style/XMLIsPercentagePropertyHandler.cxx index c75dc1ad9858..96836b738d7c 100644..100755 --- a/xmloff/source/style/XMLIsPercentagePropertyHandler.cxx +++ b/xmloff/source/style/XMLIsPercentagePropertyHandler.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -56,7 +57,8 @@ sal_Bool XMLIsPercentagePropertyHandler::exportXML( const Any&, const SvXMLUnitConverter& ) const { - DBG_ERROR( "XMLIsPercentagePropertyHandler is not for export!" ); + OSL_FAIL( "XMLIsPercentagePropertyHandler is not for export!" ); return sal_False; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/XMLPageExport.cxx b/xmloff/source/style/XMLPageExport.cxx index 915b2291461f..8df7116fc2cf 100644..100755 --- a/xmloff/source/style/XMLPageExport.cxx +++ b/xmloff/source/style/XMLPageExport.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -39,12 +40,8 @@ #include <xmloff/families.hxx> #include <xmloff/xmlexp.hxx> #include "PageMasterPropHdlFactory.hxx" -#ifndef _XMLOFF_PAGEMASTERSTYLEMAP_HXX #include <xmloff/PageMasterStyleMap.hxx> -#endif -#ifndef _XMLOFF_PAGEMASTERPROPMAPPER_HXX #include "PageMasterPropMapper.hxx" -#endif #include "PageMasterExportPropMapper.hxx" #include "PageMasterExportPropMapper.hxx" @@ -280,3 +277,5 @@ void XMLPageExport::exportDefaultStyle() } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/XMLPercentOrMeasurePropertyHandler.cxx b/xmloff/source/style/XMLPercentOrMeasurePropertyHandler.cxx index 7e4ffe5285d2..b3f147cbbdcb 100644..100755 --- a/xmloff/source/style/XMLPercentOrMeasurePropertyHandler.cxx +++ b/xmloff/source/style/XMLPercentOrMeasurePropertyHandler.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -96,3 +97,5 @@ sal_Bool XMLPercentOrMeasurePropertyHandler::exportXML( rStrExpValue = aOut.makeStringAndClear(); return sal_True; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/XMLRectangleMembersHandler.cxx b/xmloff/source/style/XMLRectangleMembersHandler.cxx index acd53e2dfd4e..9e9fef6d9c96 100644..100755 --- a/xmloff/source/style/XMLRectangleMembersHandler.cxx +++ b/xmloff/source/style/XMLRectangleMembersHandler.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,9 +32,7 @@ #include <rtl/ustrbuf.hxx> #include <com/sun/star/uno/Any.hxx> -#ifndef _COM_SUN_STAR_AWT_RECTANGLE_HDL_ #include <com/sun/star/awt/Rectangle.hdl> -#endif #include "XMLRectangleMembersHandler.hxx" #include <xmloff/xmltypes.hxx> @@ -123,3 +122,4 @@ sal_Bool XMLRectangleMembersHdl::exportXML( return sal_True; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/adjushdl.cxx b/xmloff/source/style/adjushdl.cxx index 027bebdb8075..fd050d028111 100644..100755 --- a/xmloff/source/style/adjushdl.cxx +++ b/xmloff/source/style/adjushdl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -41,7 +42,7 @@ using ::rtl::OUStringBuffer; using namespace ::xmloff::token; -SvXMLEnumMapEntry __READONLY_DATA pXML_Para_Adjust_Enum[] = +SvXMLEnumMapEntry const pXML_Para_Adjust_Enum[] = { { XML_START, style::ParagraphAdjust_LEFT }, { XML_END, style::ParagraphAdjust_RIGHT }, @@ -53,7 +54,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_Para_Adjust_Enum[] = { XML_TOKEN_INVALID, 0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_Para_Align_Last_Enum[] = +SvXMLEnumMapEntry const pXML_Para_Align_Last_Enum[] = { { XML_START, style::ParagraphAdjust_LEFT }, { XML_CENTER, style::ParagraphAdjust_CENTER }, @@ -85,7 +86,7 @@ sal_Bool XMLParaAdjustPropHdl::importXML( const OUString& rStrImpValue, uno::Any sal_Bool XMLParaAdjustPropHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& ) const { if(!rValue.hasValue()) - return sal_False; //added by BerryJia for fixing Bug102407 2002-11-5 + return sal_False; OUStringBuffer aOut; sal_Int16 nVal = 0; @@ -134,3 +135,4 @@ sal_Bool XMLLastLineAdjustPropHdl::exportXML( OUString& rStrExpValue, const uno: return bRet; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/adjushdl.hxx b/xmloff/source/style/adjushdl.hxx index 8b9228b4d8ce..20a5c04207b5 100644..100755 --- a/xmloff/source/style/adjushdl.hxx +++ b/xmloff/source/style/adjushdl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -55,3 +56,5 @@ public: }; #endif // _XMLOFF_PROPERTYHANDLER_ADJUSTTYPES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/backhdl.cxx b/xmloff/source/style/backhdl.cxx index df02a6504bac..e6743dd9609e 100644..100755 --- a/xmloff/source/style/backhdl.cxx +++ b/xmloff/source/style/backhdl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -296,3 +297,4 @@ void XMLBackGraphicPositionPropHdl::MergeXMLHoriPos( style::GraphicLocation& ePo } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/backhdl.hxx b/xmloff/source/style/backhdl.hxx index 09fba3bb85f7..bef4912cb5e9 100644..100755 --- a/xmloff/source/style/backhdl.hxx +++ b/xmloff/source/style/backhdl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -51,3 +52,5 @@ private: }; #endif // _XMLOFF_PROPERTYHANDLER_BRUSHTYPES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/bordrhdl.cxx b/xmloff/source/style/bordrhdl.cxx index 5611bbd1f472..7800f8ee3eb7 100644..100755 --- a/xmloff/source/style/bordrhdl.cxx +++ b/xmloff/source/style/bordrhdl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,7 +35,7 @@ #include <xmloff/xmluconv.hxx> #include <rtl/ustrbuf.hxx> #include <com/sun/star/uno/Any.hxx> -#include <com/sun/star/table/BorderLine.hpp> +#include <com/sun/star/table/BorderLine2.hpp> using ::rtl::OUString; using ::rtl::OUStringBuffer; @@ -42,6 +43,10 @@ using ::rtl::OUStringBuffer; using namespace ::com::sun::star; using namespace ::xmloff::token; +const sal_Int16 API_LINE_SOLID = 0; +const sal_Int16 API_LINE_DOTTED = 1; +const sal_Int16 API_LINE_DASHED = 2; + // copied from svx/boxitem.hxx #define DEF_LINE_WIDTH_0 1 #define DEF_LINE_WIDTH_1 35 @@ -101,6 +106,8 @@ using namespace ::xmloff::token; #define SVX_XML_BORDER_STYLE_NONE 0 #define SVX_XML_BORDER_STYLE_SOLID 1 #define SVX_XML_BORDER_STYLE_DOUBLE 2 +#define SVX_XML_BORDER_STYLE_DASHED 3 +#define SVX_XML_BORDER_STYLE_DOTTED 4 #define SVX_XML_BORDER_WIDTH_THIN 0 #define SVX_XML_BORDER_WIDTH_MIDDLE 1 @@ -112,8 +119,8 @@ SvXMLEnumMapEntry pXML_BorderStyles[] = { XML_HIDDEN, SVX_XML_BORDER_STYLE_NONE }, { XML_SOLID, SVX_XML_BORDER_STYLE_SOLID }, { XML_DOUBLE, SVX_XML_BORDER_STYLE_DOUBLE }, - { XML_DOTTED, SVX_XML_BORDER_STYLE_SOLID }, - { XML_DASHED, SVX_XML_BORDER_STYLE_SOLID }, + { XML_DOTTED, SVX_XML_BORDER_STYLE_DOTTED }, + { XML_DASHED, SVX_XML_BORDER_STYLE_DASHED }, { XML_GROOVE, SVX_XML_BORDER_STYLE_SOLID }, { XML_RIDGE, SVX_XML_BORDER_STYLE_SOLID }, { XML_INSET, SVX_XML_BORDER_STYLE_SOLID }, @@ -150,13 +157,13 @@ SvXMLEnumMapEntry pXML_NamedBorderWidths[] = DEF_DOUBLE_LINE##n##_DIST -static sal_uInt16 __READONLY_DATA aSBorderWidths[] = +static sal_uInt16 const aSBorderWidths[] = { SBORDER_ENTRY( 0 ), SBORDER_ENTRY( 1 ), SBORDER_ENTRY( 2 ), SBORDER_ENTRY( 3 ), SBORDER_ENTRY( 4 ) }; -static sal_uInt16 __READONLY_DATA aDBorderWidths[] = +static sal_uInt16 const aDBorderWidths[] = { DBORDER_ENTRY( 0 ), DBORDER_ENTRY( 7 ), @@ -171,34 +178,26 @@ static sal_uInt16 __READONLY_DATA aDBorderWidths[] = DBORDER_ENTRY( 5 ) }; -void lcl_frmitems_setXMLBorderWidth( table::BorderLine &rBorderLine, - sal_uInt16 nWidth, sal_Bool bDouble ) +void lcl_frmitems_setXMLBorderStyle( table::BorderLine2 & rBorderLine, sal_uInt16 nStyle ) { -#ifdef XML_CHECK_UI_CONTSTRAINS - const sal_uInt16 *aWidths; - sal_uInt16 nSize; - if( !bDouble ) - { - aWidths = aSBorderWidths; - nSize = sizeof( aSBorderWidths ); - } - else + sal_Int16 eStyle = API_LINE_SOLID; + switch ( nStyle ) { - aWidths = aDBorderWidths; - nSize = sizeof( aDBorderWidths ); - } - - sal_uInt16 i = (nSize / sizeof(sal_uInt16)) - 4; - while( i>0 && - nWidth <= ((aWidths[i] + aWidths[i-4]) / 2) ) - { - i -= 4; + case SVX_XML_BORDER_STYLE_DOTTED: + eStyle = API_LINE_DOTTED; + break; + case SVX_XML_BORDER_STYLE_DASHED: + eStyle = API_LINE_DASHED; + break; + default: + break; } + rBorderLine.LineStyle = eStyle; +} - rBorderLine.OuterLineWidth = aWidths[i+1]; - rBorderLine.InnerLineWidth = aWidths[i+2]; - rBorderLine.LineDistance = aWidths[i+3]; -#else +void lcl_frmitems_setXMLBorderWidth( table::BorderLine &rBorderLine, + sal_uInt16 nWidth, sal_Bool bDouble ) +{ if( bDouble ) { const sal_uInt16 *aWidths = aDBorderWidths; @@ -221,7 +220,6 @@ void lcl_frmitems_setXMLBorderWidth( table::BorderLine &rBorderLine, rBorderLine.LineDistance = 0; } -#endif } @@ -260,20 +258,7 @@ sal_Bool XMLBorderWidthHdl::importXML( const OUString& rStrImpValue, uno::Any& r if( !rUnitConverter.convertMeasure( nOutWidth, aToken, 0, 500 ) ) return sal_False; -#ifdef XML_CHECK_UI_CONSTRAINS - sal_uInt16 nSize = sizeof( aDBorderWidths ); - for( sal_uInt16 i=0; i < nSize; i += 4 ) - { - if( aDBorderWidths[i+1] == nOutWidth && - aDBorderWidths[i+2] == nInWidth && - aDBorderWidths[i+3] == nDistance ) - break; - } - - sal_uInt16 nWidth = i < nSize ? 0 : nOutWidth + nInWidth + nDistance; -#endif - - table::BorderLine aBorderLine; + table::BorderLine2 aBorderLine; if(!(rValue >>= aBorderLine)) aBorderLine.Color = 0; @@ -289,7 +274,7 @@ sal_Bool XMLBorderWidthHdl::exportXML( OUString& rStrExpValue, const uno::Any& r { OUStringBuffer aOut; - table::BorderLine aBorderLine; + table::BorderLine2 aBorderLine; if(!(rValue >>= aBorderLine)) return sal_False; @@ -368,7 +353,7 @@ sal_Bool XMLBorderHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue if( !bHasStyle || (SVX_XML_BORDER_STYLE_NONE != nStyle && !bHasWidth) ) return sal_False; - table::BorderLine aBorderLine; + table::BorderLine2 aBorderLine; if(!(rValue >>= aBorderLine)) { aBorderLine.Color = 0; @@ -400,11 +385,13 @@ sal_Bool XMLBorderHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue else { lcl_frmitems_setXMLBorderWidth( aBorderLine, nWidth, bDouble ); + lcl_frmitems_setXMLBorderStyle( aBorderLine, nStyle ); } } else { lcl_frmitems_setXMLBorderWidth( aBorderLine, 0, bDouble ); + lcl_frmitems_setXMLBorderStyle( aBorderLine, nStyle ); } // set color @@ -419,7 +406,7 @@ sal_Bool XMLBorderHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue { OUStringBuffer aOut; - table::BorderLine aBorderLine; + table::BorderLine2 aBorderLine; if(!(rValue >>= aBorderLine)) return sal_False; @@ -441,7 +428,20 @@ sal_Bool XMLBorderHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue aOut.append( sal_Unicode( ' ' ) ); - aOut.append( GetXMLToken((0 == nDistance) ? XML_SOLID : XML_DOUBLE) ); + XMLTokenEnum eStyleToken = XML_SOLID; + switch ( aBorderLine.LineStyle ) + { + case API_LINE_DASHED: + eStyleToken = XML_DASHED; + break; + case API_LINE_DOTTED: + eStyleToken = XML_DOTTED; + break; + case API_LINE_SOLID: + default: + eStyleToken = XML_SOLID; + } + aOut.append( GetXMLToken((0 == nDistance) ? eStyleToken : XML_DOUBLE) ); aOut.append( sal_Unicode( ' ' ) ); @@ -452,3 +452,5 @@ sal_Bool XMLBorderHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue return sal_True; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/bordrhdl.hxx b/xmloff/source/style/bordrhdl.hxx index 769d7a563560..eef72569c715 100644..100755 --- a/xmloff/source/style/bordrhdl.hxx +++ b/xmloff/source/style/bordrhdl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -53,3 +54,4 @@ public: #endif // _XMLOFF_PROPERTYHANDLER_CHARLOCALETYPES_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/breakhdl.cxx b/xmloff/source/style/breakhdl.cxx index d95cd2e5e91a..dacbc0e81be6 100644..100755 --- a/xmloff/source/style/breakhdl.cxx +++ b/xmloff/source/style/breakhdl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -191,3 +192,5 @@ sal_Bool XMLFmtBreakAfterPropHdl::exportXML( OUString& rStrExpValue, const uno:: return sal_True; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/breakhdl.hxx b/xmloff/source/style/breakhdl.hxx index 5120d86db0b3..48c9ca12cc08 100644..100755 --- a/xmloff/source/style/breakhdl.hxx +++ b/xmloff/source/style/breakhdl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -55,3 +56,5 @@ public: }; #endif // _XMLOFF_PROPERTYHANDLER_BREAKTYPES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/cdouthdl.cxx b/xmloff/source/style/cdouthdl.cxx index c5f764cf9ac4..cf1577adceee 100644..100755 --- a/xmloff/source/style/cdouthdl.cxx +++ b/xmloff/source/style/cdouthdl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -328,3 +329,4 @@ sal_Bool XMLCrossedOutTextPropHdl::exportXML( OUString& rStrExpValue, const uno: return bRet; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/cdouthdl.hxx b/xmloff/source/style/cdouthdl.hxx index 9d27382bae10..46779e10c70c 100644..100755 --- a/xmloff/source/style/cdouthdl.hxx +++ b/xmloff/source/style/cdouthdl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -70,3 +71,5 @@ public: }; #endif // _XMLOFF_PROPERTYHANDLER_CROSSEDOUTTYPES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/chrhghdl.cxx b/xmloff/source/style/chrhghdl.cxx index bb27a1378eab..d805d9a1274b 100644..100755 --- a/xmloff/source/style/chrhghdl.cxx +++ b/xmloff/source/style/chrhghdl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -165,3 +166,4 @@ sal_Bool XMLCharHeightDiffHdl::exportXML( OUString& rStrExpValue, const uno::Any return rStrExpValue.getLength() != 0; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/chrhghdl.hxx b/xmloff/source/style/chrhghdl.hxx index befa0a632871..9d39294eb6c7 100644..100755 --- a/xmloff/source/style/chrhghdl.hxx +++ b/xmloff/source/style/chrhghdl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -62,3 +63,4 @@ public: #endif // _XMLOFF_PROPERTYHANDLER_CHARHEIGHTTYPES_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/chrlohdl.cxx b/xmloff/source/style/chrlohdl.cxx index 06778d67576f..a7fedf6456a4 100644..100755 --- a/xmloff/source/style/chrlohdl.cxx +++ b/xmloff/source/style/chrlohdl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -142,3 +143,5 @@ sal_Bool XMLCharCountryHdl::exportXML( OUString& rStrExpValue, const uno::Any& r return sal_True; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/chrlohdl.hxx b/xmloff/source/style/chrlohdl.hxx index be5f9d2fef8d..1b1f46b3e08f 100644..100755 --- a/xmloff/source/style/chrlohdl.hxx +++ b/xmloff/source/style/chrlohdl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -57,3 +58,4 @@ public: #endif // _XMLOFF_PROPERTYHANDLER_CHARLOCALETYPES_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/csmaphdl.cxx b/xmloff/source/style/csmaphdl.cxx index 0a29de364bce..6bbd31057319 100644..100755 --- a/xmloff/source/style/csmaphdl.cxx +++ b/xmloff/source/style/csmaphdl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -136,3 +137,5 @@ sal_Bool XMLCaseMapVariantHdl::exportXML( OUString& rStrExpValue, const uno::Any rStrExpValue = aOut.makeStringAndClear(); return rStrExpValue.getLength() != 0; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/csmaphdl.hxx b/xmloff/source/style/csmaphdl.hxx index 64b108bb4338..d437d1a7e559 100644..100755 --- a/xmloff/source/style/csmaphdl.hxx +++ b/xmloff/source/style/csmaphdl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -52,3 +53,5 @@ public: }; #endif // _XMLOFF_PROPERTYHANDLER_CASEMAPTYPES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/durationhdl.cxx b/xmloff/source/style/durationhdl.cxx index 453393842897..d25dcb6f911d 100644..100755 --- a/xmloff/source/style/durationhdl.cxx +++ b/xmloff/source/style/durationhdl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -79,3 +80,5 @@ sal_Bool XMLDurationMS16PropHdl_Impl::exportXML( XMLDurationMS16PropHdl_Impl::~XMLDurationMS16PropHdl_Impl() { } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/durationhdl.hxx b/xmloff/source/style/durationhdl.hxx index 6a12bb5722d3..356c5ddf5df1 100644..100755 --- a/xmloff/source/style/durationhdl.hxx +++ b/xmloff/source/style/durationhdl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -43,3 +44,5 @@ public: }; #endif // _XMLOFF_PROPERTYHANDLER_FMTSPLITTYPES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/escphdl.cxx b/xmloff/source/style/escphdl.cxx index 548f867d6606..f0bbd43f793b 100644..100755 --- a/xmloff/source/style/escphdl.cxx +++ b/xmloff/source/style/escphdl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -170,3 +171,5 @@ sal_Bool XMLEscapementHeightPropHdl::exportXML( OUString& rStrExpValue, const un rStrExpValue = aOut.makeStringAndClear(); return rStrExpValue.getLength() != 0; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/escphdl.hxx b/xmloff/source/style/escphdl.hxx index 4844c0ccc41e..e3021e3b26dc 100644..100755 --- a/xmloff/source/style/escphdl.hxx +++ b/xmloff/source/style/escphdl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -53,3 +54,4 @@ public: #endif // _XMLOFF_PROPERTYHANDLER_ESCAPETYPES_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/fonthdl.cxx b/xmloff/source/style/fonthdl.cxx index d7e6bd7d1725..03f0ccfb69ee 100644..100755 --- a/xmloff/source/style/fonthdl.cxx +++ b/xmloff/source/style/fonthdl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -45,7 +46,7 @@ using namespace ::xmloff::token; const SvXMLEnumMapEntry* lcl_getFontFamilyGenericMapping() { - static SvXMLEnumMapEntry __READONLY_DATA aFontFamilyGenericMapping[] = + static SvXMLEnumMapEntry const aFontFamilyGenericMapping[] = { { XML_DECORATIVE, FAMILY_DECORATIVE }, @@ -59,7 +60,7 @@ const SvXMLEnumMapEntry* lcl_getFontFamilyGenericMapping() return aFontFamilyGenericMapping; } -static SvXMLEnumMapEntry __READONLY_DATA aFontPitchMapping[] = +static SvXMLEnumMapEntry const aFontPitchMapping[] = { { XML_FIXED, PITCH_FIXED }, { XML_VARIABLE, PITCH_VARIABLE }, @@ -317,3 +318,5 @@ sal_Bool XMLFontPitchPropHdl::exportXML( OUString& rStrExpValue, const uno::Any& return bRet; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/fonthdl.hxx b/xmloff/source/style/fonthdl.hxx index 18ddae73af14..3efb801ae3ac 100644..100755 --- a/xmloff/source/style/fonthdl.hxx +++ b/xmloff/source/style/fonthdl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -80,3 +81,5 @@ public: #endif // XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/impastp1.cxx b/xmloff/source/style/impastp1.cxx index 839ae145d4bf..8cfdcb3d994a 100644..100755 --- a/xmloff/source/style/impastp1.cxx +++ b/xmloff/source/style/impastp1.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,7 +31,7 @@ #include <tools/debug.hxx> #include "impastpl.hxx" -using namespace rtl; +using ::rtl::OUString; //############################################################################# // @@ -60,12 +61,13 @@ XMLFamilyData_Impl::~XMLFamilyData_Impl() { if( mpParentList ) delete mpParentList; if( mpNameList ) delete mpNameList; - DBG_ASSERT( !pCache || !pCache->Count(), - "auto style pool cache is not empty!" ); + DBG_ASSERT( !pCache || !pCache->size(), "auto style pool cache is not empty!" ); if( pCache ) { - while( pCache->Count() ) - delete pCache->Remove( 0UL ); + for ( size_t i = 0, n = pCache->size(); i < n; ++i ) + delete (*pCache)[ i ]; + pCache->clear(); + delete pCache; } } @@ -74,12 +76,12 @@ void XMLFamilyData_Impl::ClearEntries() if( mpParentList ) delete mpParentList; mpParentList = new SvXMLAutoStylePoolParentsP_Impl( 5, 5 ); - DBG_ASSERT( !pCache || !pCache->Count(), - "auto style pool cache is not empty!" ); + DBG_ASSERT( !pCache || !pCache->size(), "auto style pool cache is not empty!" ); if( pCache ) { - while( pCache->Count() ) - delete pCache->Remove( 0UL ); + for ( size_t i = 0, n = pCache->size(); i < n; ++i ) + delete (*pCache)[ i ]; + pCache->clear(); } } @@ -130,3 +132,4 @@ IMPL_CONTAINER_SORT( SvXMLAutoStylePoolNamesP_Impl, OUString, SvXMLAutoStylePoolNamesPCmp_Impl ) +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/impastp2.cxx b/xmloff/source/style/impastp2.cxx index afa0341c04b3..d152fe0c70bb 100644..100755 --- a/xmloff/source/style/impastp2.cxx +++ b/xmloff/source/style/impastp2.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,7 +32,9 @@ #include "impastpl.hxx" using namespace std; -using namespace rtl; + +using ::rtl::OUString; +using ::rtl::OUStringBuffer; //############################################################################# // @@ -59,3 +62,5 @@ SvXMLAutoStylePoolPropertiesP_Impl::SvXMLAutoStylePoolPropertiesP_Impl( XMLFamil } while( pFamilyData->mpNameList->Seek_Entry( &msName, 0 ) ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/impastp3.cxx b/xmloff/source/style/impastp3.cxx index 6e4607ef0b89..0c51db505b17 100644..100755 --- a/xmloff/source/style/impastp3.cxx +++ b/xmloff/source/style/impastp3.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,7 +32,8 @@ #include <xmloff/xmlprmap.hxx> using namespace std; -using namespace rtl; + +using ::rtl::OUString; //############################################################################# // @@ -45,8 +47,9 @@ using namespace rtl; SvXMLAutoStylePoolParentP_Impl::~SvXMLAutoStylePoolParentP_Impl() { - while( maPropertiesList.Count() ) - delete maPropertiesList.Remove( maPropertiesList.Count() -1 ); + for( size_t i = maPropertiesList.size(); i > 0; ) + delete maPropertiesList[ --i ]; + maPropertiesList.clear(); } /////////////////////////////////////////////////////////////////////////////// @@ -59,13 +62,13 @@ sal_Bool SvXMLAutoStylePoolParentP_Impl::Add( XMLFamilyData_Impl* pFamilyData, c { sal_Bool bAdded = sal_False; SvXMLAutoStylePoolPropertiesP_Impl *pProperties = 0; - sal_uInt32 i = 0; + size_t i = 0; sal_Int32 nProperties = rProperties.size(); - sal_uInt32 nCount = maPropertiesList.Count(); + size_t nCount = maPropertiesList.size(); for( i = 0; i < nCount; i++ ) { - SvXMLAutoStylePoolPropertiesP_Impl *pIS = maPropertiesList.GetObject( i ); + SvXMLAutoStylePoolPropertiesP_Impl *pIS = maPropertiesList[ i ]; if( nProperties > (sal_Int32)pIS->GetProperties().size() ) { continue; @@ -84,7 +87,9 @@ sal_Bool SvXMLAutoStylePoolParentP_Impl::Add( XMLFamilyData_Impl* pFamilyData, c if( !pProperties ) { pProperties = new SvXMLAutoStylePoolPropertiesP_Impl( pFamilyData, rProperties ); - maPropertiesList.Insert( pProperties, i ); + SvXMLAutoStylePoolPropertiesPList_Impl::iterator it = maPropertiesList.begin(); + ::std::advance( it, i ); + maPropertiesList.insert( it, pProperties ); bAdded = sal_True; } @@ -103,13 +108,13 @@ sal_Bool SvXMLAutoStylePoolParentP_Impl::Add( XMLFamilyData_Impl* pFamilyData, c sal_Bool SvXMLAutoStylePoolParentP_Impl::AddNamed( XMLFamilyData_Impl* pFamilyData, const vector< XMLPropertyState >& rProperties, const OUString& rName ) { sal_Bool bAdded = sal_False; - sal_uInt32 i = 0; + size_t i = 0; sal_Int32 nProperties = rProperties.size(); - sal_uInt32 nCount = maPropertiesList.Count(); + size_t nCount = maPropertiesList.size(); for( i = 0; i < nCount; i++ ) { - SvXMLAutoStylePoolPropertiesP_Impl *pIS = maPropertiesList.GetObject( i ); + SvXMLAutoStylePoolPropertiesP_Impl *pIS = maPropertiesList[ i ]; if( nProperties > (sal_Int32)pIS->GetProperties().size() ) { continue; @@ -126,7 +131,9 @@ sal_Bool SvXMLAutoStylePoolParentP_Impl::AddNamed( XMLFamilyData_Impl* pFamilyDa new SvXMLAutoStylePoolPropertiesP_Impl( pFamilyData, rProperties ); // ignore the generated name pProperties->SetName( rName ); - maPropertiesList.Insert( pProperties, i ); + SvXMLAutoStylePoolPropertiesPList_Impl::iterator it = maPropertiesList.begin(); + ::std::advance( it, i ); + maPropertiesList.insert( it, pProperties ); bAdded = sal_True; } @@ -142,10 +149,10 @@ OUString SvXMLAutoStylePoolParentP_Impl::Find( const XMLFamilyData_Impl* pFamily { OUString sName; vector< XMLPropertyState>::size_type nItems = rProperties.size(); - sal_uInt32 nCount = maPropertiesList.Count(); - for( sal_uInt32 i=0; i < nCount; i++ ) + size_t nCount = maPropertiesList.size(); + for( size_t i = 0; i < nCount; i++ ) { - SvXMLAutoStylePoolPropertiesP_Impl *pIS = maPropertiesList.GetObject( i ); + SvXMLAutoStylePoolPropertiesP_Impl *pIS = maPropertiesList[ i ]; if( nItems > pIS->GetProperties().size() ) { continue; @@ -183,3 +190,5 @@ int SvXMLAutoStylePoolParentPCmp_Impl( const SvXMLAutoStylePoolParentP_Impl& r1, IMPL_CONTAINER_SORT( SvXMLAutoStylePoolParentsP_Impl, SvXMLAutoStylePoolParentP_Impl, SvXMLAutoStylePoolParentPCmp_Impl ) + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/impastp4.cxx b/xmloff/source/style/impastp4.cxx index 38d4f8698761..7e4d81efecc0 100644..100755 --- a/xmloff/source/style/impastp4.cxx +++ b/xmloff/source/style/impastp4.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -37,9 +38,7 @@ #include <xmloff/xmlexppr.hxx> #include <xmloff/xmlexp.hxx> #include <xmloff/families.hxx> -#ifndef _XMLOFF_PAGEMASTERSTYLEMAP_HXX #include <xmloff/PageMasterStyleMap.hxx> -#endif using namespace ::std; using ::rtl::OUString; @@ -222,10 +221,9 @@ sal_Bool SvXMLAutoStylePoolP_Impl::Add(OUString& rName, sal_Int32 nFamily, if( bCache ) { if( !pFamily->pCache ) - pFamily->pCache = new SvXMLAutoStylePoolCache_Impl( 256, 256 ); - if( pFamily->pCache->Count() < MAX_CACHE_SIZE ) - pFamily->pCache->Insert( new OUString( rName ), - pFamily->pCache->Count() ); + pFamily->pCache = new SvXMLAutoStylePoolCache_Impl(); + if( pFamily->pCache->size() < MAX_CACHE_SIZE ) + pFamily->pCache->push_back( new OUString( rName ) ); } } @@ -289,10 +287,9 @@ OUString SvXMLAutoStylePoolP_Impl::AddToCache( sal_Int32 nFamily, if( pFamily ) { if( !pFamily->pCache ) - pFamily->pCache = new SvXMLAutoStylePoolCache_Impl( 256, 256 ); - if( pFamily->pCache->Count() < MAX_CACHE_SIZE ) - pFamily->pCache->Insert( new OUString( rParent ), - pFamily->pCache->Count() ); + pFamily->pCache = new SvXMLAutoStylePoolCache_Impl(); + if( pFamily->pCache->size() < MAX_CACHE_SIZE ) + pFamily->pCache->push_back( new OUString( rParent ) ); } return rParent; @@ -351,9 +348,10 @@ OUString SvXMLAutoStylePoolP_Impl::FindAndRemoveCached( sal_Int32 nFamily ) cons // The cache may be empty already. This happens if it was filled // completly. - if( pFamily->pCache && pFamily->pCache->Count() ) + if( pFamily->pCache && !pFamily->pCache->empty() ) { - OUString *pName = pFamily->pCache->Remove( 0UL ); + OUString *pName = (*pFamily->pCache)[ 0 ]; + pFamily->pCache->erase( pFamily->pCache->begin() ); sName = *pName; delete pName; } @@ -412,11 +410,11 @@ void SvXMLAutoStylePoolP_Impl::exportXML( { const SvXMLAutoStylePoolParentP_Impl* pParent = pParents->GetObject( i ); - sal_uInt32 nProperties = pParent->GetPropertiesList().Count(); - for( sal_uInt32 j=0; j < nProperties; j++ ) + size_t nProperties = pParent->GetPropertiesList().size(); + for( size_t j = 0; j < nProperties; j++ ) { - const SvXMLAutoStylePoolPropertiesP_Impl *pProperties = - pParent->GetPropertiesList().GetObject( j ); + const SvXMLAutoStylePoolPropertiesP_Impl* pProperties = + pParent->GetPropertiesList()[ j ]; nPos = pProperties->GetPos(); DBG_ASSERT( nPos < nCount, "SvXMLAutoStylePool_Impl::exportXML: wrong position" ); @@ -525,3 +523,5 @@ void SvXMLAutoStylePoolP_Impl::ClearEntries() for(sal_uInt32 a = 0L; a < maFamilyList.Count(); a++) maFamilyList[a]->ClearEntries(); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/impastpl.hxx b/xmloff/source/style/impastpl.hxx index d3245290ee9b..5c79e2d8cf44 100644..100755 --- a/xmloff/source/style/impastpl.hxx +++ b/xmloff/source/style/impastpl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,7 +30,6 @@ #define _XMLOFF_XMLASTPL_IMPL_HXX #include <sal/types.h> -#include <tools/list.hxx> #include <svl/cntnrsrt.hxx> #include <rtl/ustring.hxx> #include <vector> @@ -38,6 +38,7 @@ #include <com/sun/star/xml/sax/XDocumentHandler.hpp> #include <xmloff/maptype.hxx> #include <xmloff/xmlexppr.hxx> +#include <vector> class SvXMLAutoStylePoolP; class SvXMLAutoStylePoolParentsP_Impl; @@ -53,8 +54,8 @@ class SvXMLExport; // Implementationclass for stylefamily-information // -typedef ::rtl::OUString *OUStringPtr; -DECLARE_LIST( SvXMLAutoStylePoolCache_Impl, OUStringPtr ) +typedef ::rtl::OUString* OUStringPtr; +typedef ::std::vector< OUStringPtr > SvXMLAutoStylePoolCache_Impl; class XMLFamilyData_Impl { @@ -125,8 +126,8 @@ public: void SetName( const ::rtl::OUString& rNew ) { msName = rNew; } }; -typedef SvXMLAutoStylePoolPropertiesP_Impl *SvXMLAutoStylePoolPropertiesPPtr; -DECLARE_LIST( SvXMLAutoStylePoolPropertiesPList_Impl, SvXMLAutoStylePoolPropertiesPPtr ) +typedef SvXMLAutoStylePoolPropertiesP_Impl* SvXMLAutoStylePoolPropertiesPPtr; +typedef ::std::vector< SvXMLAutoStylePoolPropertiesPPtr > SvXMLAutoStylePoolPropertiesPList_Impl; /////////////////////////////////////////////////////////////////////////////// // @@ -225,3 +226,5 @@ struct SvXMLAutoStylePoolPExport_Impl }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/kernihdl.cxx b/xmloff/source/style/kernihdl.cxx index 7dd0b3ab32b4..27ed1a5a318f 100644..100755 --- a/xmloff/source/style/kernihdl.cxx +++ b/xmloff/source/style/kernihdl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -87,3 +88,5 @@ sal_Bool XMLKerningPropHdl::exportXML( OUString& rStrExpValue, const Any& rValue return bRet; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/kernihdl.hxx b/xmloff/source/style/kernihdl.hxx index 2639eabe8d1f..958aabc3b479 100644..100755 --- a/xmloff/source/style/kernihdl.hxx +++ b/xmloff/source/style/kernihdl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -43,3 +44,5 @@ public: }; #endif // _XMLOFF_PROPERTYHANDLER_KERNINGTYPES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/lspachdl.cxx b/xmloff/source/style/lspachdl.cxx index 6ea6221a0b27..27fa7582cf46 100644..100755 --- a/xmloff/source/style/lspachdl.cxx +++ b/xmloff/source/style/lspachdl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -193,3 +194,5 @@ sal_Bool XMLLineSpacingHdl::exportXML( OUString& rStrExpValue, const uno::Any& r rStrExpValue = aOut.makeStringAndClear(); return rStrExpValue.getLength() != 0; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/lspachdl.hxx b/xmloff/source/style/lspachdl.hxx index 8475453f928d..ab1fc8f53541 100644..100755 --- a/xmloff/source/style/lspachdl.hxx +++ b/xmloff/source/style/lspachdl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -62,3 +63,4 @@ public: #endif // _XMLOFF_PROPERTYHANDLER_CHARHEIGHTTYPES_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/numehelp.cxx b/xmloff/source/style/numehelp.cxx index be98184a41dc..a5c1680ede53 100644..100755 --- a/xmloff/source/style/numehelp.cxx +++ b/xmloff/source/style/numehelp.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -272,7 +273,7 @@ sal_Bool XMLNumberFormatAttributesExportHelper::GetCurrencySymbol(const sal_Int3 } catch ( uno::Exception& ) { - DBG_ERROR("Numberformat not found"); + OSL_FAIL("Numberformat not found"); } } } @@ -300,7 +301,7 @@ sal_Int16 XMLNumberFormatAttributesExportHelper::GetCellType(const sal_Int32 nNu } catch ( uno::Exception& ) { - DBG_ERROR("Numberformat not found"); + OSL_FAIL("Numberformat not found"); } } } @@ -356,7 +357,7 @@ sal_Bool XMLNumberFormatAttributesExportHelper::GetCurrencySymbol(const sal_Int3 } catch ( uno::Exception& ) { - DBG_ERROR("Numberformat not found"); + OSL_FAIL("Numberformat not found"); } } return sal_False; @@ -384,7 +385,7 @@ sal_Int16 XMLNumberFormatAttributesExportHelper::GetCellType(const sal_Int32 nNu } catch ( uno::Exception& ) { - DBG_ERROR("Numberformat not found"); + OSL_FAIL("Numberformat not found"); } } return 0; @@ -537,7 +538,7 @@ void XMLNumberFormatAttributesExportHelper::SetNumberFormatAttributes( WriteAttributes(nTypeKey, rValue, sCurrency, bExportValue); } else { - DBG_ERROR("no SvXMLExport given"); + OSL_FAIL("no SvXMLExport given"); } } @@ -553,6 +554,8 @@ void XMLNumberFormatAttributesExportHelper::SetNumberFormatAttributes( pExport->AddAttribute(sAttrStringValue, rValue); } else { - DBG_ERROR("no SvXMLExport given"); + OSL_FAIL("no SvXMLExport given"); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/opaquhdl.cxx b/xmloff/source/style/opaquhdl.cxx index 41e6ec0d38e8..8ef05d56894d 100644..100755 --- a/xmloff/source/style/opaquhdl.cxx +++ b/xmloff/source/style/opaquhdl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -80,3 +81,5 @@ sal_Bool XMLOpaquePropHdl::exportXML( OUString& rStrExpValue, const Any& rValue, return bRet; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/opaquhdl.hxx b/xmloff/source/style/opaquhdl.hxx index cebce4119153..0c013936fda0 100644..100755 --- a/xmloff/source/style/opaquhdl.hxx +++ b/xmloff/source/style/opaquhdl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -43,3 +44,5 @@ public: }; #endif // _XMLOFF_PROPERTYHANDLER_OPAQUETYPES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/postuhdl.cxx b/xmloff/source/style/postuhdl.cxx index b0885b539d4b..6a8c104fca3a 100644..100755 --- a/xmloff/source/style/postuhdl.cxx +++ b/xmloff/source/style/postuhdl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -41,7 +42,7 @@ using ::rtl::OUStringBuffer; using namespace ::com::sun::star; using namespace ::xmloff::token; -SvXMLEnumMapEntry __READONLY_DATA aPostureGenericMapping[] = +SvXMLEnumMapEntry const aPostureGenericMapping[] = { { XML_POSTURE_NORMAL, ITALIC_NONE }, { XML_POSTURE_ITALIC, ITALIC_NORMAL }, @@ -91,3 +92,4 @@ sal_Bool XMLPosturePropHdl::exportXML( OUString& rStrExpValue, const uno::Any& r return bRet; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/postuhdl.hxx b/xmloff/source/style/postuhdl.hxx index dc09ac1644b1..fffe77ee7f72 100644..100755 --- a/xmloff/source/style/postuhdl.hxx +++ b/xmloff/source/style/postuhdl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -43,3 +44,5 @@ public: }; #endif // _XMLOFF_PROPERTYHANDLER_POSTURETYPES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/prhdlfac.cxx b/xmloff/source/style/prhdlfac.cxx index 27af64469daf..b0652788a927 100644..100755 --- a/xmloff/source/style/prhdlfac.cxx +++ b/xmloff/source/style/prhdlfac.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -75,7 +76,7 @@ SvXMLEnumMapEntry aXML_ColorMode_EnumMap[] = { XML_TOKEN_INVALID, 0 } }; -SvXMLEnumMapEntry __READONLY_DATA aXML_HorizontalAdjust_Enum[] = +SvXMLEnumMapEntry const aXML_HorizontalAdjust_Enum[] = { { XML_LEFT, text::HorizontalAdjust_LEFT }, { XML_CENTER, text::HorizontalAdjust_CENTER }, @@ -86,7 +87,7 @@ SvXMLEnumMapEntry __READONLY_DATA aXML_HorizontalAdjust_Enum[] = // aXML_WritingDirection_Enum is used with and without 'page' // attribute, so you'll find uses of aXML_WritingDirection_Enum // directly, as well as &(aXML_WritingDirection_Enum[1]) -SvXMLEnumMapEntry __READONLY_DATA aXML_WritingDirection_Enum[] = +SvXMLEnumMapEntry const aXML_WritingDirection_Enum[] = { // aXML_WritingDirection_Enum { XML_PAGE, text::WritingMode2::PAGE }, @@ -112,7 +113,7 @@ SvXMLEnumMapEntry __READONLY_DATA aXML_WritingDirection_Enum[] = // XMLPropertyHandlerFactory::~XMLPropertyHandlerFactory() { - for( CacheMap::iterator pPos = maHandlerCache.begin(); pPos != maHandlerCache.end(); pPos++ ) + for( CacheMap::iterator pPos = maHandlerCache.begin(); pPos != maHandlerCache.end(); ++pPos ) delete pPos->second; } @@ -448,3 +449,5 @@ const XMLPropertyHandler* XMLPropertyHandlerFactory::CreatePropertyHandler( sal_ return pPropHdl; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/prstylei.cxx b/xmloff/source/style/prstylei.cxx index 9c736bf8f226..c0261eb0852c 100644..100755 --- a/xmloff/source/style/prstylei.cxx +++ b/xmloff/source/style/prstylei.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,9 +31,7 @@ #include <tools/debug.hxx> -#ifndef __SGI_STL_SET #include <set> -#endif #include "xmloff/xmlnmspe.hxx" #include <xmloff/xmltoken.hxx> #include <xmloff/xmlprcon.hxx> @@ -45,9 +44,7 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <xmloff/xmlimp.hxx> -#ifndef _XMLOFF_PRSTYLEI_HXX #include <xmloff/prstylei.hxx> -#endif #include <xmloff/attrlist.hxx> #include "xmloff/xmlerror.hxx" @@ -212,15 +209,15 @@ void XMLPropStyleContext::CreateAndInsert( sal_Bool bOverwrite ) { aValues.realloc( nLen + 2 ); PropertyValue *pProps = aValues.getArray() + nLen; - pProps->Name = rtl::OUString::createFromAscii("ParaStyleName"); + pProps->Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParaStyleName")); OUString sParent( GetParentName() ); if( sParent.getLength() ) sParent = GetImport().GetStyleDisplayName( GetFamily(), sParent ); else - sParent = rtl::OUString::createFromAscii("Standard"); + sParent = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Standard")); pProps->Value <<= sParent; ++pProps; - pProps->Name = rtl::OUString::createFromAscii("ParaConditionalStyleName"); + pProps->Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParaConditionalStyleName")); pProps->Value <<= sParent; } @@ -229,8 +226,8 @@ void XMLPropStyleContext::CreateAndInsert( sal_Bool bOverwrite ) { Sequence< OUString > aPropNames(1); aPropNames[0] = GetFamily() == XML_STYLE_FAMILY_TEXT_PARAGRAPH ? - rtl::OUString::createFromAscii("ParaAutoStyleName") : - rtl::OUString::createFromAscii("CharAutoStyleName"); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParaAutoStyleName")) : + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CharAutoStyleName")); Sequence< Any > aAny = xAutoStyle->getPropertyValues( aPropNames ); if( aAny.hasElements() ) { @@ -420,3 +417,4 @@ void XMLPropStyleContext::Finish( sal_Bool bOverwrite ) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/shadwhdl.cxx b/xmloff/source/style/shadwhdl.cxx index 75b9249b6683..03fcb8a4eaf9 100644..100755 --- a/xmloff/source/style/shadwhdl.cxx +++ b/xmloff/source/style/shadwhdl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -173,3 +174,5 @@ sal_Bool XMLShadowPropHdl::exportXML( OUString& rStrExpValue, const uno::Any& rV return bRet; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/shadwhdl.hxx b/xmloff/source/style/shadwhdl.hxx index c2cb8eb536eb..6cb957778f01 100644..100755 --- a/xmloff/source/style/shadwhdl.hxx +++ b/xmloff/source/style/shadwhdl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -43,3 +44,5 @@ public: }; #endif // _XMLOFF_PROPERTYHANDLER_BASICTYPES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/shdwdhdl.cxx b/xmloff/source/style/shdwdhdl.cxx index b23c18eec043..c6e2279239db 100644..100755 --- a/xmloff/source/style/shdwdhdl.cxx +++ b/xmloff/source/style/shdwdhdl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -82,3 +83,5 @@ sal_Bool XMLShadowedPropHdl::exportXML( OUString& rStrExpValue, const Any& rValu return bRet; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/shdwdhdl.hxx b/xmloff/source/style/shdwdhdl.hxx index 4f8b4c9b6eca..aba2f6c2c67a 100644..100755 --- a/xmloff/source/style/shdwdhdl.hxx +++ b/xmloff/source/style/shdwdhdl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -43,3 +44,5 @@ public: }; #endif // _XMLOFF_PROPERTYHANDLER_SHADOWEDTYPES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx index ad26398f911c..ec9038578faa 100644..100755 --- a/xmloff/source/style/styleexp.cxx +++ b/xmloff/source/style/styleexp.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -35,9 +36,6 @@ #include <xmloff/nmspmap.hxx> #include "xmloff/xmlnmspe.hxx" #include <xmloff/xmltoken.hxx> -#ifndef _XMLOFF_XMLITMAP_HXX -//#include "xmlitmap.hxx" -#endif #include <xmloff/xmluconv.hxx> #include <xmloff/attrlist.hxx> #include <xmloff/xmlprmap.hxx> @@ -49,14 +47,10 @@ #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/XPropertyState.hpp> -#ifndef _COM_SUN_STAR_DOCUMENT_XEVENTSSUPPLIER_HPP #include <com/sun/star/document/XEventsSupplier.hpp> -#endif #include <com/sun/star/text/XChapterNumberingSupplier.hpp> #include <xmloff/xmlaustp.hxx> -#ifndef _XMLOFF_STYLEEXP_HXX #include <xmloff/styleexp.hxx> -#endif #include <xmloff/xmlexp.hxx> #include <xmloff/XMLEventExport.hxx> @@ -82,7 +76,7 @@ XMLStyleExport::XMLStyleExport( sIsAutoUpdate( RTL_CONSTASCII_USTRINGPARAM( "IsAutoUpdate" ) ), sFollowStyle( RTL_CONSTASCII_USTRINGPARAM( "FollowStyle" ) ), sNumberingStyleName( RTL_CONSTASCII_USTRINGPARAM( "NumberingStyleName" ) ), - sOutlineLevel( RTL_CONSTASCII_USTRINGPARAM( "OutlineLevel" ) ),//#outline level,add by zhaojianwei + sOutlineLevel( RTL_CONSTASCII_USTRINGPARAM( "OutlineLevel" ) ), sPoolStyleName( rPoolStyleName ), pAutoStylePool( pAutoStyleP ) { @@ -104,7 +98,7 @@ sal_Bool XMLStyleExport::exportStyle( const Reference< XStyle >& rStyle, const OUString& rXMLFamily, const UniReference < SvXMLExportPropertyMapper >& rPropMapper, - const Reference< XNameAccess >& xStyles, //#outline level,add by zhaojianwei + const Reference< XNameAccess >& xStyles, const OUString* pPrefix ) { Reference< XPropertySet > xPropSet( rStyle, UNO_QUERY ); @@ -182,7 +176,7 @@ sal_Bool XMLStyleExport::exportStyle( XML_TRUE ); } - // style:default-outline-level"..." //#outline level, add by zhaojianwei.0802 + // style:default-outline-level"..." sal_Int32 nOutlineLevel = 0; if( xPropSetInfo->hasPropertyByName( sOutlineLevel ) ) { @@ -201,12 +195,11 @@ sal_Bool XMLStyleExport::exportStyle( } else { - // --> OD 2009-12-29 #i104889# - // empty value for style:default-outline-level does exist - // since ODF 1.2. Thus, suppress its export for former versions. + /* Empty value for style:default-outline-level does exist + since ODF 1.2. Thus, suppress its export for former versions. (#i104889#) + */ if ( ( GetExport().getExportFlags() & EXPORT_OASIS ) != 0 && GetExport().getDefaultVersion() >= SvtSaveOptions::ODFVER_012 ) - // <-- { GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_DEFAULT_OUTLINE_LEVEL, @@ -214,7 +207,7 @@ sal_Bool XMLStyleExport::exportStyle( } } } - }//<-end,zhaojianwei + } // style:list-style-name="..." (SW paragarph styles only) if( xPropSetInfo->hasPropertyByName( sNumberingStyleName ) ) @@ -229,10 +222,10 @@ sal_Bool XMLStyleExport::exportStyle( OUString sListName; aAny >>= sListName; - // --> OD 2006-09-21 #i69523# - // An direct set empty list style has to be written. Otherwise, - // this information is lost and causes an error, if the parent - // style has a list style set. + /* An direct set empty list style has to be written. Otherwise, + this information is lost and causes an error, if the parent + style has a list style set. (#i69523#) + */ if ( !sListName.getLength() ) { GetExport().AddAttribute( XML_NAMESPACE_STYLE, @@ -241,7 +234,7 @@ sal_Bool XMLStyleExport::exportStyle( } else { - // --> OD 2006-09-27 #i69627# + // Written OpenDocument file format doesn't fit to the created text document (#i69627#) bool bSuppressListStyle( false ); { if ( !GetExport().writeOutlineStyleAsNormalListStyle() ) @@ -270,17 +263,14 @@ sal_Bool XMLStyleExport::exportStyle( } if ( sListName.getLength() && !bSuppressListStyle ) - // <-- { GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_LIST_STYLE_NAME, GetExport().EncodeStyleName( sListName ) ); } } - // <-- } } - //#outline level, add by zhaojianwei.0802 else if( nOutlineLevel > 0 ) { @@ -320,10 +310,8 @@ sal_Bool XMLStyleExport::exportStyle( XML_LIST_STYLE_NAME, OUString( RTL_CONSTASCII_USTRINGPARAM( "" ))); } - //<-end,zhaojianwei } - // style:pool-id="..." is not required any longer since we use // english style names only exportStyleAttributes( rStyle ); @@ -390,32 +378,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, @@ -564,3 +526,4 @@ void XMLStyleExport::exportStyleFamily( } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/tabsthdl.cxx b/xmloff/source/style/tabsthdl.cxx index 718df9a9c28c..c4e84b88858c 100644..100755 --- a/xmloff/source/style/tabsthdl.cxx +++ b/xmloff/source/style/tabsthdl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -90,3 +91,4 @@ sal_Bool XMLTabStopPropHdl::exportXML( ::rtl::OUString&, const ::com::sun::star: return sal_False; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/tabsthdl.hxx b/xmloff/source/style/tabsthdl.hxx index d8a911a88617..008cbcbf2291 100644..100755 --- a/xmloff/source/style/tabsthdl.hxx +++ b/xmloff/source/style/tabsthdl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -46,3 +47,5 @@ public: }; #endif // _XMLOFF_PROPERTYHANDLER_TABSTOPTYPES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/undlihdl.cxx b/xmloff/source/style/undlihdl.cxx index 226ae3207e50..85f72a06cdc8 100644..100755 --- a/xmloff/source/style/undlihdl.cxx +++ b/xmloff/source/style/undlihdl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -43,7 +44,7 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::awt; using namespace ::xmloff::token; -SvXMLEnumMapEntry __READONLY_DATA pXML_UnderlineType_Enum[] = +SvXMLEnumMapEntry const pXML_UnderlineType_Enum[] = { { XML_NONE, FontUnderline::NONE }, { XML_SINGLE, FontUnderline::SINGLE }, @@ -66,7 +67,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_UnderlineType_Enum[] = { XML_TOKEN_INVALID, 0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_UnderlineStyle_Enum[] = +SvXMLEnumMapEntry const pXML_UnderlineStyle_Enum[] = { { XML_NONE, FontUnderline::NONE }, { XML_SOLID, FontUnderline::SINGLE }, @@ -89,7 +90,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_UnderlineStyle_Enum[] = { XML_TOKEN_INVALID, 0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_UnderlineWidth_Enum[] = +SvXMLEnumMapEntry const pXML_UnderlineWidth_Enum[] = { { XML_AUTO, FontUnderline::NONE }, { XML_AUTO, FontUnderline::SINGLE }, @@ -379,3 +380,4 @@ sal_Bool XMLUnderlineWidthPropHdl::exportXML( OUString& rStrExpValue, const uno: return bRet; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/undlihdl.hxx b/xmloff/source/style/undlihdl.hxx index a4d99e625fc7..60818cc35657 100644..100755 --- a/xmloff/source/style/undlihdl.hxx +++ b/xmloff/source/style/undlihdl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -61,3 +62,5 @@ public: }; #endif // _XMLOFF_PROPERTYHANDLER_UNDERLINETYPES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/uniref.cxx b/xmloff/source/style/uniref.cxx index a00eff9e9b25..342df9fa1a51 100644..100755 --- a/xmloff/source/style/uniref.cxx +++ b/xmloff/source/style/uniref.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -38,3 +39,5 @@ void UniRefBase::release() if( !osl_decrementInterlockedCount( &m_refCount ) ) delete this; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/weighhdl.cxx b/xmloff/source/style/weighhdl.cxx index e9eda292723b..9955d446e66f 100644..100755 --- a/xmloff/source/style/weighhdl.cxx +++ b/xmloff/source/style/weighhdl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -173,3 +174,4 @@ sal_Bool XMLFontWeightPropHdl::exportXML( OUString& rStrExpValue, const Any& rVa return bRet; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/weighhdl.hxx b/xmloff/source/style/weighhdl.hxx index 7b13cc4ccb3b..5ac66dd18aff 100644..100755 --- a/xmloff/source/style/weighhdl.hxx +++ b/xmloff/source/style/weighhdl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -44,3 +45,5 @@ public: #endif // _XMLOFF_PROPERTYHANDLER_FONTWEIGHTTYPES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/xmlaustp.cxx b/xmloff/source/style/xmlaustp.cxx index c9ff7b92dade..669a4a169531 100644..100755 --- a/xmloff/source/style/xmlaustp.cxx +++ b/xmloff/source/style/xmlaustp.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -39,9 +40,7 @@ #include <xmloff/xmlexp.hxx> #include "xmloff/XMLTextListAutoStylePool.hxx" -#ifndef _XMLOFF_PAGEMASTERSTYLEMAP_HXX #include <xmloff/PageMasterStyleMap.hxx> -#endif #include "PageMasterExportPropMapper.hxx" #include "XMLBackgroundImageExport.hxx" @@ -122,8 +121,8 @@ void SvXMLAutoStylePoolP::exportStyleAttributes( if (bFoundControlShapeDataStyle) { - DBG_ERROR("SvXMLAutoStylePoolP::exportStyleAttributes: found two properties with the ControlShapeDataStyle context id!"); - // already added the attribute for the first occurence + OSL_FAIL("SvXMLAutoStylePoolP::exportStyleAttributes: found two properties with the ControlShapeDataStyle context id!"); + // already added the attribute for the first occurrence break; } @@ -137,8 +136,8 @@ void SvXMLAutoStylePoolP::exportStyleAttributes( { if (bFoundNumberingRulesName) { - DBG_ERROR("SvXMLAutoStylePoolP::exportStyleAttributes: found two properties with the numbering rules name context id!"); - // already added the attribute for the first occurence + OSL_FAIL("SvXMLAutoStylePoolP::exportStyleAttributes: found two properties with the numbering rules name context id!"); + // already added the attribute for the first occurrence break; } @@ -161,7 +160,7 @@ void SvXMLAutoStylePoolP::exportStyleAttributes( if( nFamily == XML_STYLE_FAMILY_PAGE_MASTER ) { - for( vector< XMLPropertyState >::const_iterator pProp = rProperties.begin(); pProp != rProperties.end(); pProp++ ) + for( vector< XMLPropertyState >::const_iterator pProp = rProperties.begin(); pProp != rProperties.end(); ++pProp ) { if (pProp->mnIndex > -1) { @@ -280,7 +279,7 @@ void SvXMLAutoStylePoolP::exportStyleContent( SvXMLAutoStylePoolP::SvXMLAutoStylePoolP() { - DBG_ERROR("This constuctor is obsoleted and should not be used!"); + OSL_FAIL("This constuctor is obsoleted and should not be used!"); pImpl = NULL; } @@ -446,3 +445,5 @@ void SvXMLAutoStylePoolP::ClearEntries() { pImpl->ClearEntries(); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/xmlbahdl.cxx b/xmloff/source/style/xmlbahdl.cxx index 4cc76c3f3ff5..af4fcaba8f3c 100644..100755 --- a/xmloff/source/style/xmlbahdl.cxx +++ b/xmloff/source/style/xmlbahdl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -247,7 +248,7 @@ sal_Bool XMLBoolPropHdl::importXML( const OUString& rStrImpValue, Any& rValue, c { sal_Bool bRet = sal_False; - sal_Bool bValue; + bool bValue; bRet = SvXMLUnitConverter::convertBool( bValue, rStrImpValue ); rValue <<= sal_Bool(bValue); @@ -285,7 +286,7 @@ sal_Bool XMLNBoolPropHdl::importXML( const OUString& rStrImpValue, Any& rValue, { sal_Bool bRet = sal_False; - sal_Bool bValue; + bool bValue; bRet = SvXMLUnitConverter::convertBool( bValue, rStrImpValue ); rValue <<= sal_Bool(!bValue); @@ -538,13 +539,13 @@ sal_Bool XMLColorPropHdl::exportXML( OUString& rStrExpValue, const Any& rValue, Sequence< double > aHSL; if( (rValue >>= aHSL) && (aHSL.getLength() == 3) ) { - aOut.append( OUString::createFromAscii("hsl(") ); + aOut.append( OUString(RTL_CONSTASCII_USTRINGPARAM("hsl(")) ); aOut.append( aHSL[0] ); - aOut.append( OUString::createFromAscii(",") ); + aOut.append( OUString(RTL_CONSTASCII_USTRINGPARAM(",")) ); aOut.append( aHSL[1] * 100.0 ); - aOut.append( OUString::createFromAscii("%,") ); + aOut.append( OUString(RTL_CONSTASCII_USTRINGPARAM("%,")) ); aOut.append( aHSL[2] * 100.0 ); - aOut.append( OUString::createFromAscii("%)") ); + aOut.append( OUString(RTL_CONSTASCII_USTRINGPARAM("%)")) ); rStrExpValue = aOut.makeStringAndClear(); bRet = sal_True; @@ -808,7 +809,7 @@ XMLIsAutoColorPropHdl::~XMLIsAutoColorPropHdl() sal_Bool XMLIsAutoColorPropHdl::importXML( const OUString& rStrImpValue, Any& rValue, const SvXMLUnitConverter& ) const { - sal_Bool bValue; + bool bValue; // An auto color overrides any other color set! sal_Bool bRet = SvXMLUnitConverter::convertBool( bValue, rStrImpValue ); @@ -942,3 +943,4 @@ sal_Bool XMLNumberWithAutoInsteadZeroPropHdl::exportXML( OUString& rStrExpValue, return sal_True; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/xmlbahdl.hxx b/xmloff/source/style/xmlbahdl.hxx index 811824e71bf8..80f75b0159c7 100644..100755 --- a/xmloff/source/style/xmlbahdl.hxx +++ b/xmloff/source/style/xmlbahdl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -305,3 +306,5 @@ public: }; #endif // _XMLOFF_PROPERTYHANDLER_BASICTYPES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx index 23c55cc4ef04..c13de7e1765d 100644..100755 --- a/xmloff/source/style/xmlexppr.cxx +++ b/xmloff/source/style/xmlexppr.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -37,7 +38,7 @@ #include <com/sun/star/beans/TolerantPropertySetResultType.hpp> #include <rtl/ustrbuf.hxx> #include <list> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <xmloff/xmlexppr.hxx> #include <xmloff/xmltoken.hxx> @@ -233,7 +234,7 @@ public: // ---------------------------------------------------------------------------- -typedef std::hash_map +typedef boost::unordered_map < PropertySetInfoKey, FilterPropertiesInfo_Impl *, @@ -307,7 +308,7 @@ const uno::Sequence<OUString>& FilterPropertiesInfo_Impl::GetApiNames() FilterPropertyInfoList_Impl::iterator aOld = aPropInfos.begin(); FilterPropertyInfoList_Impl::iterator aEnd = aPropInfos.end(); FilterPropertyInfoList_Impl::iterator aCurrent = aOld; - aCurrent++; + ++aCurrent; while ( aCurrent != aEnd ) { @@ -324,7 +325,7 @@ const uno::Sequence<OUString>& FilterPropertiesInfo_Impl::GetApiNames() { // remember old element and continue with next aOld = aCurrent; - aCurrent++; + ++aCurrent; } } } @@ -334,7 +335,7 @@ const uno::Sequence<OUString>& FilterPropertiesInfo_Impl::GetApiNames() OUString *pNames = pApiNames->getArray(); FilterPropertyInfoList_Impl::iterator aItr = aPropInfos.begin(); FilterPropertyInfoList_Impl::iterator aEnd = aPropInfos.end(); - for ( ; aItr != aEnd; aItr++, pNames++) + for ( ; aItr != aEnd; ++aItr, ++pNames) *pNames = aItr->GetApiName(); } @@ -476,7 +477,7 @@ void FilterPropertiesInfo_Impl::FillPropertyStateArray( pPropIter = aPropIters.begin(); XMLPropertyState aNewProperty( -1 ); - for( i = 0; i < nValueCount; i++ ) + for( i = 0; i < nValueCount; ++i ) { aNewProperty.mnIndex = -1; aNewProperty.maValue = *pValues; @@ -502,7 +503,7 @@ void FilterPropertiesInfo_Impl::FillPropertyStateArray( const Any *pValues = aValues.getConstArray(); FilterPropertyInfoList_Impl::iterator aItr = aPropInfos.begin(); - for(sal_uInt32 i = 0; i < nCount; i++ ) + for(sal_uInt32 i = 0; i < nCount; ++i) { // The value is stored in the PropertySet itself, add to list. XMLPropertyState aNewProperty( -1 ); @@ -511,19 +512,19 @@ void FilterPropertiesInfo_Impl::FillPropertyStateArray( for( std::list<sal_uInt32>::iterator aIndexItr = aItr->GetIndexes().begin(); aIndexItr != aItr->GetIndexes().end(); - aIndexItr++ ) + ++aIndexItr ) { aNewProperty.mnIndex = *aIndexItr; aPropStates.AddPropertyState( aNewProperty ); } - aItr++; + ++aItr; } } } else { FilterPropertyInfoList_Impl::iterator aItr = aPropInfos.begin(); - for(sal_uInt32 i = 0; i < nCount; i++ ) + for(sal_uInt32 i = 0; i < nCount; ++i) { sal_Bool bDirectValue = !pStates || *pStates == PropertyState_DIRECT_VALUE; @@ -535,7 +536,7 @@ void FilterPropertiesInfo_Impl::FillPropertyStateArray( for( std::list<sal_uInt32>::const_iterator aIndexItr = aItr->GetIndexes().begin(); aIndexItr != aItr->GetIndexes().end(); - aIndexItr++ ) + ++aIndexItr ) { if( bDirectValue || (rPropMapper->GetEntryFlags( *aIndexItr ) & @@ -562,9 +563,9 @@ void FilterPropertiesInfo_Impl::FillPropertyStateArray( } } - aItr++; + ++aItr; if( pStates ) - pStates++; + ++pStates; } } } @@ -1144,3 +1145,5 @@ void SvXMLExportPropertyMapper::exportElementItems( if( bItemsExported ) rExport.IgnorableWhitespace(); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/xmlimppr.cxx b/xmloff/source/style/xmlimppr.cxx index 79b2974706e5..92747da29722 100644..100755 --- a/xmloff/source/style/xmlimppr.cxx +++ b/xmloff/source/style/xmlimppr.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -69,6 +70,8 @@ using ::com::sun::star::lang::WrappedTargetException; using ::com::sun::star::beans::UnknownPropertyException; using ::com::sun::star::beans::PropertyVetoException; +using rtl::OUString; +using rtl::OUStringBuffer; SvXMLImportPropertyMapper::SvXMLImportPropertyMapper( const UniReference< XMLPropertySetMapper >& rMapper, @@ -354,7 +357,7 @@ void SvXMLImportPropertyMapper::importXML( } /** this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_IMPORT flag set */ -sal_Bool SvXMLImportPropertyMapper::handleSpecialItem( +bool SvXMLImportPropertyMapper::handleSpecialItem( XMLPropertyState& rProperty, vector< XMLPropertyState >& rProperties, const OUString& rValue, @@ -592,7 +595,7 @@ typedef pair<const OUString*, const Any* > PropertyPair; typedef vector<PropertyPair> PropertyPairs; struct PropertyPairLessFunctor : - public binary_function<PropertyPair, PropertyPair, bool> + public std::binary_function<PropertyPair, PropertyPair, bool> { bool operator()( const PropertyPair& a, const PropertyPair& b ) const { @@ -782,3 +785,5 @@ void SvXMLImportPropertyMapper::finished( if( mxNextMapper.is() ) mxNextMapper->finished( rProperties, nStartIndex, nEndIndex ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx index d4e880f09b52..8e4ead1ccf51 100644..100755 --- a/xmloff/source/style/xmlnume.cxx +++ b/xmloff/source/style/xmlnume.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -38,10 +39,8 @@ #include <com/sun/star/text/HoriOrientation.hpp> #include <com/sun/star/text/VertOrientation.hpp> #include <com/sun/star/text/XChapterNumberingSupplier.hpp> -// --> OD 2008-01-16 #newlistlevelattrs# #include <com/sun/star/text/PositionAndSpaceMode.hpp> #include <com/sun/star/text/LabelFollow.hpp> -// <-- #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/beans/XPropertySet.hpp> @@ -71,32 +70,30 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::beans; using namespace ::xmloff::token; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_SYMBOL_TEXT_DISTANCE[] = "SymbolTextDistance"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_PARENT_NUMBERING[] = "ParentNumbering"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_CHAR_STYLE_NAME[] = "CharStyleName"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_BULLET_CHAR[] = "BulletChar"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_BULLET_RELSIZE[] = "BulletRelSize"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_BULLET_COLOR[] = "BulletColor"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_GRAPHIC_BITMAP[] = "GraphicBitmap"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_GRAPHIC_SIZE[] = "GraphicSize"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_VERT_ORIENT[] = "VertOrient"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_NUMBERINGTYPE[] = "NumberingType"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_HEADING_STYLE_NAME[] = "HeadingStyleName"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_PREFIX[] = "Prefix"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_SUFFIX[] = "Suffix"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_ADJUST[] = "Adjust"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_LEFT_MARGIN[] = "LeftMargin"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_FIRST_LINE_OFFSET[] = "FirstLineOffset"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_BULLET_FONT[] = "BulletFont"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_GRAPHICURL[] = "GraphicURL"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_START_WITH[] = "StartWith"; -// --> OD 2008-01-15 #newlistlevelattrs# -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_POSITION_AND_SPACE_MODE[] = "PositionAndSpaceMode"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_LABEL_FOLLOWED_BY[] = "LabelFollowedBy"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_LISTTAB_STOP_POSITION[] = "ListtabStopPosition"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_FIRST_LINE_INDENT[] = "FirstLineIndent"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_INDENT_AT[] = "IndentAt"; -// <-- +static sal_Char const XML_UNO_NAME_NRULE_SYMBOL_TEXT_DISTANCE[] = "SymbolTextDistance"; +static sal_Char const XML_UNO_NAME_NRULE_PARENT_NUMBERING[] = "ParentNumbering"; +static sal_Char const XML_UNO_NAME_NRULE_CHAR_STYLE_NAME[] = "CharStyleName"; +static sal_Char const XML_UNO_NAME_NRULE_BULLET_CHAR[] = "BulletChar"; +static sal_Char const XML_UNO_NAME_NRULE_BULLET_RELSIZE[] = "BulletRelSize"; +static sal_Char const XML_UNO_NAME_NRULE_BULLET_COLOR[] = "BulletColor"; +static sal_Char const XML_UNO_NAME_NRULE_GRAPHIC_BITMAP[] = "GraphicBitmap"; +static sal_Char const XML_UNO_NAME_NRULE_GRAPHIC_SIZE[] = "GraphicSize"; +static sal_Char const XML_UNO_NAME_NRULE_VERT_ORIENT[] = "VertOrient"; +static sal_Char const XML_UNO_NAME_NRULE_NUMBERINGTYPE[] = "NumberingType"; +static sal_Char const XML_UNO_NAME_NRULE_HEADING_STYLE_NAME[] = "HeadingStyleName"; +static sal_Char const XML_UNO_NAME_NRULE_PREFIX[] = "Prefix"; +static sal_Char const XML_UNO_NAME_NRULE_SUFFIX[] = "Suffix"; +static sal_Char const XML_UNO_NAME_NRULE_ADJUST[] = "Adjust"; +static sal_Char const XML_UNO_NAME_NRULE_LEFT_MARGIN[] = "LeftMargin"; +static sal_Char const XML_UNO_NAME_NRULE_FIRST_LINE_OFFSET[] = "FirstLineOffset"; +static sal_Char const XML_UNO_NAME_NRULE_BULLET_FONT[] = "BulletFont"; +static sal_Char const XML_UNO_NAME_NRULE_GRAPHICURL[] = "GraphicURL"; +static sal_Char const XML_UNO_NAME_NRULE_START_WITH[] = "StartWith"; +static sal_Char const XML_UNO_NAME_NRULE_POSITION_AND_SPACE_MODE[] = "PositionAndSpaceMode"; +static sal_Char const XML_UNO_NAME_NRULE_LABEL_FOLLOWED_BY[] = "LabelFollowedBy"; +static sal_Char const XML_UNO_NAME_NRULE_LISTTAB_STOP_POSITION[] = "ListtabStopPosition"; +static sal_Char const XML_UNO_NAME_NRULE_FIRST_LINE_INDENT[] = "FirstLineIndent"; +static sal_Char const XML_UNO_NAME_NRULE_INDENT_AT[] = "IndentAt"; void SvxXMLNumRuleExport::exportLevelStyles( const uno::Reference< ::com::sun::star::container::XIndexReplace > & xNumRule, sal_Bool bOutline ) @@ -139,13 +136,11 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel, sal_Int32 nImageWidth = 0, nImageHeight = 0; sal_Int16 eImageVertOrient = VertOrientation::LINE_CENTER; - // --> OD 2008-01-15 #newlistlevelattrs# sal_Int16 ePosAndSpaceMode = PositionAndSpaceMode::LABEL_WIDTH_AND_POSITION; sal_Int16 eLabelFollowedBy = LabelFollow::LISTTAB; sal_Int32 nListtabStopPosition( 0 ); sal_Int32 nFirstLineIndent( 0 ); sal_Int32 nIndentAt( 0 ); - // <-- const sal_Int32 nCount = rProps.getLength(); const beans::PropertyValue* pPropArray = rProps.getConstArray(); @@ -250,7 +245,6 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel, rProp.Value >>= nValue; eImageVertOrient = nValue; } - // --> OD 2008-01-16 #newlistlevelattrs# else if( rProp.Name.equalsAsciiL( XML_UNO_NAME_NRULE_POSITION_AND_SPACE_MODE, sizeof(XML_UNO_NAME_NRULE_POSITION_AND_SPACE_MODE)-1 ) ) { @@ -280,7 +274,6 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel, { rProp.Value >>= nIndentAt; } - // <-- } if( bOutline && (NumberingType::CHAR_SPECIAL == eType || @@ -387,19 +380,9 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel, SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT, eElem, sal_True, sal_True ); - // --> OD 2008-01-16 #newlistlevelattrs# OUStringBuffer sBuffer; if ( ePosAndSpaceMode == PositionAndSpaceMode::LABEL_WIDTH_AND_POSITION ) { - // --> OD 2008-06-05 #i89178# - // optimization of XML stream size: - // suppress export of property list-level-position-and-space-mode, - // if its value is "label-width-and-position" - its the default value -// GetExport().AddAttribute( XML_NAMESPACE_TEXT, -// XML_LIST_LEVEL_POSITION_AND_SPACE_MODE, -// XML_LABEL_WIDTH_AND_POSITION ); - // <-- - nSpaceBefore += nMinLabelWidth; nMinLabelWidth = -nMinLabelWidth; if( nSpaceBefore != 0 ) @@ -421,18 +404,16 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel, sBuffer.makeStringAndClear() ); } } - // --> OD 2008-06-06 #i89178# - // check, if properties for position-and-space-mode LABEL_ALIGNMENT - // are allowed to be exported. + /* Check, if properties for position-and-space-mode LABEL_ALIGNMENT + are allowed to be exported. (#i89178#) + */ else if ( ePosAndSpaceMode == PositionAndSpaceMode::LABEL_ALIGNMENT && mbExportPositionAndSpaceModeLabelAlignment ) - // <-- { GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_LIST_LEVEL_POSITION_AND_SPACE_MODE, XML_LABEL_ALIGNMENT ); } - // <-- if( HoriOrientation::LEFT != eAdjust ) { enum XMLTokenEnum eValue = XML_TOKEN_INVALID; @@ -508,18 +489,15 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel, } } - // --> OD 2008-01-16 #newlistlevelattrs# -// if( GetExport().GetAttrList().getLength() > 0 ) { SvXMLElementExport aElement( GetExport(), XML_NAMESPACE_STYLE, XML_LIST_LEVEL_PROPERTIES, sal_True, sal_True ); - // --> OD 2008-06-06 #i89178# - // check, if properties for position-and-space-mode LABEL_ALIGNMENT - // are allowed to be exported. + /* Check, if properties for position-and-space-mode LABEL_ALIGNMENT + are allowed to be exported. (#i89178#) + */ if ( ePosAndSpaceMode == PositionAndSpaceMode::LABEL_ALIGNMENT && mbExportPositionAndSpaceModeLabelAlignment ) - // <-- { enum XMLTokenEnum eValue = XML_LISTTAB; if ( eLabelFollowedBy == LabelFollow::SPACE ) @@ -563,7 +541,6 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel, sal_True, sal_True ); } } - // <-- if( NumberingType::CHAR_SPECIAL == eType ) { @@ -674,9 +651,8 @@ SvxXMLNumRuleExport::SvxXMLNumRuleExport( SvXMLExport& rExp ) : sNumberingRules( RTL_CONSTASCII_USTRINGPARAM( "NumberingRules" ) ), sIsPhysical( RTL_CONSTASCII_USTRINGPARAM( "IsPhysical" ) ), sIsContinuousNumbering( RTL_CONSTASCII_USTRINGPARAM( "IsContinuousNumbering" ) ), - // --> OD 2008-06-06 #i89178# + // Let list style creation depend on Load/Save option "ODF format version" (#i89178#) mbExportPositionAndSpaceModeLabelAlignment( true ) - // <-- { switch ( GetExport().getDefaultVersion() ) { @@ -697,57 +673,6 @@ SvxXMLNumRuleExport::~SvxXMLNumRuleExport() { } -// --> OD 2008-06-17 #i90780# -// refactoring: removing unused methods -//void SvxXMLNumRuleExport::Export( const OUString& rName, -// sal_Bool bContNumbering ) -//{ -// GetExport().CheckAttrList(); - -// // style:name="..." -// if( rName.getLength() ) -// { -// sal_Bool bEncoded = sal_False; -// GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_NAME, -// GetExport().EncodeStyleName( rName, &bEncoded ) ); -// if( bEncoded ) -// GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_DISPLAY_NAME, -// rName); -// } - -// // text:consecutive-numbering="..." -// if( bContNumbering ) -// GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_CONSECUTIVE_NUMBERING, -// XML_TRUE ); - -// // other application specific attributes -// AddListStyleAttributes(); - -// OUString sElem = GetExport().GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_TEXT, -// GetXMLToken(XML_LIST_STYLE) ); -// GetExport().IgnorableWhitespace(); -// GetExport().StartElement( XML_NAMESPACE_TEXT, XML_LIST_STYLE, sal_False ); - -// uno::Reference< ::com::sun::star::container::XIndexReplace > xNumRule = GetUNONumRule(); -// if( xNumRule.is() ) -// exportLevelStyles( xNumRule ); - -// GetExport().EndElement( XML_NAMESPACE_TEXT, XML_LIST_STYLE, sal_True ); -//} - -//void SvxXMLNumRuleExport::ExportOutline() -//{ -// GetExport().IgnorableWhitespace( ); -// GetExport().StartElement( XML_NAMESPACE_TEXT, XML_OUTLINE_STYLE, sal_False ); - -// uno::Reference< ::com::sun::star::container::XIndexReplace > xNumRule = GetUNONumRule(); -// if( xNumRule.is() ) -// exportLevelStyles( xNumRule, sal_True ); - -// GetExport().EndElement( XML_NAMESPACE_TEXT, XML_OUTLINE_STYLE, sal_True ); -//} -// <-- - void SvxXMLNumRuleExport::exportNumberingRule( const OUString& rName, const Reference< XIndexReplace >& rNumRule ) @@ -832,9 +757,9 @@ void SvxXMLNumRuleExport::exportOutline() if( xNumRule.is() ) { - // --> OD 2008-06-17 #i90780# - // Outline style has property style:name since ODF 1.2 - // Thus, export this property and adjust fix for issue #i69627# + /* Outline style has property style:name since ODF 1.2 + Thus, export this property and adjust fix for issue #i69627# (#i90780#) + */ OUString sOutlineStyleName; { Reference<XPropertySet> xNumRulePropSet( @@ -968,3 +893,5 @@ sal_Bool SvxXMLNumRuleExport::GetOutlineStyles( XMLStringVector& rStyleNames, return nLevels != 0; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx index 9b22f1a39e29..a867fb53e9cf 100644..100755 --- a/xmloff/source/style/xmlnumfe.cxx +++ b/xmloff/source/style/xmlnumfe.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -43,9 +44,6 @@ #include <com/sun/star/lang/Locale.hpp> #include <rtl/ustrbuf.hxx> -// #110680# -//#include <comphelper/processfactory.hxx> - #include <com/sun/star/i18n/NativeNumberXmlAttributes.hpp> #include <xmloff/xmlnumfe.hxx> @@ -73,8 +71,6 @@ using namespace ::svt; //------------------------------------------------------------------------- -// 4th condition for text formats doesn't work -//#define XMLNUM_MAX_PARTS 4 #define XMLNUM_MAX_PARTS 3 //------------------------------------------------------------------------- @@ -160,25 +156,25 @@ void SvXMLNumUsedList_Impl::SetUsed( sal_uInt32 nKey ) sal_Bool SvXMLNumUsedList_Impl::IsUsed( sal_uInt32 nKey ) const { - SvXMLuInt32Set::iterator aItr = aUsed.find(nKey); + SvXMLuInt32Set::const_iterator aItr = aUsed.find(nKey); return (aItr != aUsed.end()); } sal_Bool SvXMLNumUsedList_Impl::IsWasUsed( sal_uInt32 nKey ) const { - SvXMLuInt32Set::iterator aItr = aWasUsed.find(nKey); + SvXMLuInt32Set::const_iterator aItr = aWasUsed.find(nKey); return (aItr != aWasUsed.end()); } void SvXMLNumUsedList_Impl::Export() { - SvXMLuInt32Set::iterator aItr = aUsed.begin(); + SvXMLuInt32Set::const_iterator aItr = aUsed.begin(); while (aItr != aUsed.end()) { - std::pair<SvXMLuInt32Set::iterator, bool> aPair = aWasUsed.insert( *aItr ); + std::pair<SvXMLuInt32Set::const_iterator, bool> aPair = aWasUsed.insert( *aItr ); if (aPair.second) nWasUsedCount++; - aItr++; + ++aItr; } aUsed.clear(); nUsedCount = 0; @@ -202,7 +198,7 @@ sal_Bool SvXMLNumUsedList_Impl::GetNextUsed(sal_uInt32& nKey) sal_Bool bRet(sal_False); if (aCurrentUsedPos != aUsed.end()) { - aCurrentUsedPos++; + ++aCurrentUsedPos; if (aCurrentUsedPos != aUsed.end()) { nKey = *aCurrentUsedPos; @@ -218,12 +214,12 @@ void SvXMLNumUsedList_Impl::GetWasUsed(uno::Sequence<sal_Int32>& rWasUsed) sal_Int32* pWasUsed = rWasUsed.getArray(); if (pWasUsed) { - SvXMLuInt32Set::iterator aItr = aWasUsed.begin(); + SvXMLuInt32Set::const_iterator aItr = aWasUsed.begin(); while (aItr != aWasUsed.end()) { *pWasUsed = *aItr; - aItr++; - pWasUsed++; + ++aItr; + ++pWasUsed; } } } @@ -235,7 +231,7 @@ void SvXMLNumUsedList_Impl::SetWasUsed(const uno::Sequence<sal_Int32>& rWasUsed) const sal_Int32* pWasUsed = rWasUsed.getConstArray(); for (sal_uInt16 i = 0; i < nCount; i++, pWasUsed++) { - std::pair<SvXMLuInt32Set::iterator, bool> aPair = aWasUsed.insert( *pWasUsed ); + std::pair<SvXMLuInt32Set::const_iterator, bool> aPair = aWasUsed.insert( *pWasUsed ); if (aPair.second) nWasUsedCount++; } @@ -247,7 +243,7 @@ SvXMLNumFmtExport::SvXMLNumFmtExport( SvXMLExport& rExp, const uno::Reference< util::XNumberFormatsSupplier >& rSupp ) : rExport( rExp ), - sPrefix( OUString::createFromAscii( "N" ) ), + sPrefix( OUString(RTL_CONSTASCII_USTRINGPARAM("N")) ), pFormatter( NULL ), pCharClass( NULL ), pLocaleData( NULL ) @@ -269,9 +265,6 @@ SvXMLNumFmtExport::SvXMLNumFmtExport( { lang::Locale aLocale( MsLangId::convertLanguageToLocale( MsLangId::getSystemLanguage() ) ); - // #110680# - // pCharClass = new CharClass( ::comphelper::getProcessServiceFactory(), aLocale ); - // pLocaleData = new LocaleDataWrapper( ::comphelper::getProcessServiceFactory(), aLocale ); pCharClass = new CharClass( rExport.getServiceFactory(), aLocale ); pLocaleData = new LocaleDataWrapper( rExport.getServiceFactory(), aLocale ); } @@ -307,9 +300,6 @@ SvXMLNumFmtExport::SvXMLNumFmtExport( { lang::Locale aLocale( MsLangId::convertLanguageToLocale( MsLangId::getSystemLanguage() ) ); - // #110680# - // pCharClass = new CharClass( ::comphelper::getProcessServiceFactory(), aLocale ); - // pLocaleData = new LocaleDataWrapper( ::comphelper::getProcessServiceFactory(), aLocale ); pCharClass = new CharClass( rExport.getServiceFactory(), aLocale ); pLocaleData = new LocaleDataWrapper( rExport.getServiceFactory(), aLocale ); } @@ -753,7 +743,7 @@ void SvXMLNumFmtExport::WriteMapElement_Impl( sal_Int32 nOp, double fLimit, case NUMBERFORMAT_OP_GT: aCondStr.append( (sal_Unicode) '>' ); break; case NUMBERFORMAT_OP_GE: aCondStr.appendAscii( ">=" ); break; default: - DBG_ERROR("unknown operator"); + OSL_FAIL("unknown operator"); } ::rtl::math::doubleToUStringBuffer( aCondStr, fLimit, rtl_math_StringFormat_Automatic, rtl_math_DecimalPlaces_Max, @@ -814,9 +804,6 @@ sal_Bool SvXMLNumFmtExport::WriteTextWithCurrency_Impl( const OUString& rString, sal_Bool bRet = sal_False; -// pLocaleData->setLocale( rLocale ); -// String sCurString = pLocaleData->getCurrSymbol(); - LanguageType nLang = MsLangId::convertLocaleToLanguage( rLocale ); pFormatter->ChangeIntl( nLang ); String sCurString, sDummy; @@ -976,7 +963,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt NfIndexTableOffset eBuiltIn = pFormatter->GetIndexTableOffset( nKey ); short nFmtType = 0; - sal_Bool bThousand = sal_False; + BOOL bThousand = sal_False; sal_uInt16 nPrecision = 0; sal_uInt16 nLeading = 0; rFormat.GetNumForInfo( nPart, nFmtType, bThousand, nPrecision, nLeading); @@ -1745,7 +1732,7 @@ OUString SvXMLNumFmtExport::GetStyleName( sal_uInt32 nKey ) return lcl_CreateStyleName( nKey, 0, sal_True, sPrefix ); else { - DBG_ERROR("There is no written Data-Style"); + OSL_FAIL("There is no written Data-Style"); return rtl::OUString(); } } @@ -1759,7 +1746,7 @@ void SvXMLNumFmtExport::SetUsed( sal_uInt32 nKey ) if (pFormatter->GetEntry(nKey)) pUsedList->SetUsed( nKey ); else { - DBG_ERROR("no existing Numberformat found with this key"); + OSL_FAIL("no existing Numberformat found with this key"); } } @@ -1818,3 +1805,5 @@ sal_uInt32 SvXMLNumFmtExport::ForceSystemLanguage( sal_uInt32 nKey ) return nRet; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index 492210236be6..a09c88233066 100644..100755 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -40,9 +41,6 @@ #include <tools/debug.hxx> #include <rtl/ustrbuf.hxx> -// #110680# -//#include <comphelper/processfactory.hxx> - #include <xmloff/xmlnumfi.hxx> #include <xmloff/xmltkmap.hxx> #include "xmloff/xmlnmspe.hxx" @@ -102,12 +100,9 @@ class SvXMLNumImpData LocaleDataWrapper* pLocaleData; SvXMLNumFmtEntryArr aNameEntries; - // #110680# ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxServiceFactory; public: - // #110680# - // SvXMLNumImpData( SvNumberFormatter* pFmt ); SvXMLNumImpData( SvNumberFormatter* pFmt, const uno::Reference<lang::XMultiServiceFactory>& xServiceFactory ); @@ -333,14 +328,14 @@ static ColorData aNumFmtStdColors[XML_NUMF_COLORCOUNT] = // maps for SvXMLUnitConverter::convertEnum -static __FAR_DATA SvXMLEnumMapEntry aStyleValueMap[] = +static SvXMLEnumMapEntry aStyleValueMap[] = { { XML_SHORT, sal_False }, { XML_LONG, sal_True }, { XML_TOKEN_INVALID, 0 } }; -static __FAR_DATA SvXMLEnumMapEntry aFormatSourceMap[] = +static SvXMLEnumMapEntry aFormatSourceMap[] = { { XML_FIXED, sal_False }, { XML_LANGUAGE, sal_True }, @@ -362,7 +357,7 @@ struct SvXMLDefaultDateFormat sal_Bool bSystem; }; -static __FAR_DATA SvXMLDefaultDateFormat aDefaultDateFormats[] = +static SvXMLDefaultDateFormat aDefaultDateFormats[] = { // format day-of-week day month year hours minutes seconds format-source @@ -393,8 +388,6 @@ SV_IMPL_OP_PTRARR_SORT( SvXMLEmbeddedElementArr, SvXMLEmbeddedElementPtr ); // SvXMLNumImpData // -// #110680# -// SvXMLNumImpData::SvXMLNumImpData( SvNumberFormatter* pFmt ) : SvXMLNumImpData::SvXMLNumImpData( SvNumberFormatter* pFmt, const uno::Reference<lang::XMultiServiceFactory>& xServiceFactory ) @@ -405,7 +398,6 @@ SvXMLNumImpData::SvXMLNumImpData( pStyleElemAttrTokenMap(NULL), pLocaleData(NULL), - // #110680# mxServiceFactory(xServiceFactory) { DBG_ASSERT( mxServiceFactory.is(), "got no service manager" ); @@ -503,7 +495,7 @@ const SvXMLTokenMap& SvXMLNumImpData::GetStylesElemTokenMap() { if( !pStylesElemTokenMap ) { - static __FAR_DATA SvXMLTokenMapEntry aStylesElemMap[] = + static SvXMLTokenMapEntry aStylesElemMap[] = { // style elements { XML_NAMESPACE_NUMBER, XML_NUMBER_STYLE, XML_TOK_STYLES_NUMBER_STYLE }, @@ -525,7 +517,7 @@ const SvXMLTokenMap& SvXMLNumImpData::GetStyleElemTokenMap() { if( !pStyleElemTokenMap ) { - static __FAR_DATA SvXMLTokenMapEntry aStyleElemMap[] = + static SvXMLTokenMapEntry aStyleElemMap[] = { // elements in a style { XML_NAMESPACE_NUMBER, XML_TEXT, XML_TOK_STYLE_TEXT }, @@ -560,7 +552,7 @@ const SvXMLTokenMap& SvXMLNumImpData::GetStyleAttrTokenMap() { if( !pStyleAttrTokenMap ) { - static __FAR_DATA SvXMLTokenMapEntry aStyleAttrMap[] = + static SvXMLTokenMapEntry aStyleAttrMap[] = { // attributes for a style { XML_NAMESPACE_STYLE, XML_NAME, XML_TOK_STYLE_ATTR_NAME }, @@ -587,7 +579,7 @@ const SvXMLTokenMap& SvXMLNumImpData::GetStyleElemAttrTokenMap() { if( !pStyleElemAttrTokenMap ) { - static __FAR_DATA SvXMLTokenMapEntry aStyleElemAttrMap[] = + static SvXMLTokenMapEntry aStyleElemAttrMap[] = { // attributes for an element within a style { XML_NAMESPACE_NUMBER, XML_DECIMAL_PLACES, XML_TOK_ELEM_ATTR_DECIMAL_PLACES }, @@ -614,11 +606,6 @@ const SvXMLTokenMap& SvXMLNumImpData::GetStyleElemAttrTokenMap() const LocaleDataWrapper& SvXMLNumImpData::GetLocaleData( LanguageType nLang ) { if ( !pLocaleData ) - // #110680# - //pLocaleData = new LocaleDataWrapper( - // (pFormatter ? pFormatter->GetServiceManager() : - // ::comphelper::getProcessServiceFactory()), - // MsLangId::convertLanguageToLocale( nLang ) ); pLocaleData = new LocaleDataWrapper( (pFormatter ? pFormatter->GetServiceManager() : mxServiceFactory), @@ -846,7 +833,7 @@ void lcl_EnquoteIfNecessary( rtl::OUStringBuffer& rContent, const SvXMLNumFormat else if ( rParent.GetType() == XML_TOK_STYLES_PERCENTAGE_STYLE && nLength > 1 ) { // the percent character in percentage styles must be left out of quoting - // (one occurence is enough even if there are several percent characters in the string) + // (one occurrence is enough even if there are several percent characters in the string) rtl::OUString aString( rContent.getStr() ); sal_Int32 nPos = aString.indexOf( (sal_Unicode) '%' ); @@ -892,7 +879,7 @@ void lcl_EnquoteIfNecessary( rtl::OUStringBuffer& rContent, const SvXMLNumFormat { // A quote is turned into "\"" - a quote to end quoted text, an escaped quote, // and a quote to resume quoting. - rtl::OUString aInsert( rtl::OUString::createFromAscii( "\"\\\"" ) ); + rtl::OUString aInsert( RTL_CONSTASCII_USTRINGPARAM( "\"\\\"" ) ); sal_Int32 nPos = 0; while ( nPos < rContent.getLength() ) @@ -950,7 +937,7 @@ SvXMLNumFmtElementContext::SvXMLNumFmtElementContext( SvXMLImport& rImport, { OUString sLanguage, sCountry; sal_Int32 nAttrVal; - sal_Bool bAttrBool; + bool bAttrBool; sal_uInt16 nAttrEnum; double fAttrDouble; @@ -1092,7 +1079,6 @@ void SvXMLNumFmtElementContext::EndElement() if ( rParent.ReplaceNfKeyword( NF_KEY_NNN, NF_KEY_NNNN ) ) { - //!aContent.setLength(0); //! doesn't work, #76293# aContent = OUStringBuffer(); } @@ -1122,25 +1108,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 @@ -1149,11 +1126,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( @@ -1166,11 +1139,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 ) ); @@ -1178,11 +1147,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 ) ); @@ -1253,87 +1218,19 @@ void SvXMLNumFmtElementContext::EndElement() { rParent.AddNumber( aNumInfo ); // simple number - rParent.AddToCode( OUString::createFromAscii( "E+" ) ); + rParent.AddToCode( OUString(RTL_CONSTASCII_USTRINGPARAM("E+")) ); for (sal_Int32 i=0; i<aNumInfo.nExpDigits; i++) rParent.AddToCode( OUString::valueOf((sal_Unicode)'0') ); } break; default: - DBG_ERROR("invalid element ID"); + OSL_FAIL("invalid element ID"); } } //------------------------------------------------------------------------- -sal_Bool SvXMLNumFmtDefaults::IsSystemLongDay( const SvtSysLocale&, sal_Bool bLong ) -{ - // TODO: merge system information and defaults into i18n locale data -#if 0 - return bLong ? rIntn.IsLongDateDayLeadingZero() : rIntn.IsDateDayLeadingZero(); -#else - return !bLong; -#endif -} - -sal_Bool SvXMLNumFmtDefaults::IsSystemLongMonth( const SvtSysLocale&, sal_Bool bLong ) -{ - // TODO: merge system information and defaults into i18n locale data -#if 0 - if (bLong) - { - MonthFormat eMonth = rIntn.GetLongDateMonthFormat(); - return ( eMonth == MONTH_ZERO || eMonth == MONTH_LONG ); - } - else - return rIntn.IsDateMonthLeadingZero(); -#else - return !bLong; -#endif -} - -sal_Bool SvXMLNumFmtDefaults::IsSystemTextualMonth( const SvtSysLocale&, sal_Bool bLong ) -{ - // TODO: merge system information and defaults into i18n locale data -#if 0 - if (bLong) - { - MonthFormat eMonth = rIntn.GetLongDateMonthFormat(); - return ( eMonth == MONTH_SHORT || eMonth == MONTH_LONG ); - } - else - return sal_False; -#else - return bLong; -#endif -} - -sal_Bool SvXMLNumFmtDefaults::IsSystemLongYear( const SvtSysLocale&, sal_Bool bLong ) -{ - // TODO: merge system information and defaults into i18n locale data -#if 0 - return bLong ? rIntn.IsLongDateCentury() : rIntn.IsDateCentury(); -#else - return bLong; -#endif -} - -sal_Bool SvXMLNumFmtDefaults::IsSystemLongEra( const SvtSysLocale& rSysLoc, sal_Bool bLong ) -{ - // TODO: merge system information and defaults into i18n locale data - return IsSystemLongYear( rSysLoc, bLong ); // no separate setting -} - -sal_Bool SvXMLNumFmtDefaults::IsSystemLongDayOfWeek( const SvtSysLocale&, sal_Bool bLong ) -{ - // TODO: merge system information and defaults into i18n locale data -#if 0 - return ( bLong && rIntn.GetLongDateDayOfWeekFormat() == DAYOFWEEK_LONG ); -#else - return bLong && true; -#endif -} - sal_uInt16 SvXMLNumFmtDefaults::GetDefaultDateFormat( SvXMLDateElementAttributes eDOW, SvXMLDateElementAttributes eDay, SvXMLDateElementAttributes eMonth, SvXMLDateElementAttributes eYear, SvXMLDateElementAttributes eHours, @@ -1399,7 +1296,7 @@ SvXMLNumFormatContext::SvXMLNumFormatContext( SvXMLImport& rImport, { OUString sLanguage, sCountry; ::com::sun::star::i18n::NativeNumberXmlAttributes aNatNumAttr; - sal_Bool bAttrBool; + bool bAttrBool; sal_uInt16 nAttrEnum; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; @@ -1415,7 +1312,6 @@ SvXMLNumFormatContext::SvXMLNumFormatContext( SvXMLImport& rImport, switch (nToken) { case XML_TOK_STYLE_ATTR_NAME: -// aName = sValue; break; case XML_TOK_STYLE_ATTR_LANGUAGE: sLanguage = sValue; @@ -1646,7 +1542,7 @@ sal_Int32 SvXMLNumFormatContext::CreateAndInsert(SvNumberFormatter* pFormatter) { if (!pFormatter) { - DBG_ERROR("no number formatter"); + OSL_FAIL("no number formatter"); return -1; } @@ -1739,58 +1635,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 @@ -1827,7 +1672,7 @@ sal_Int32 SvXMLNumFormatContext::CreateAndInsert(SvNumberFormatter* pFormatter) if ( nIndex == NUMBERFORMAT_ENTRY_NOT_FOUND ) { - DBG_ERROR("invalid number format"); + OSL_FAIL("invalid number format"); nIndex = pFormatter->GetStandardIndex( nFormatLang ); } @@ -1842,24 +1687,12 @@ 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; } void SvXMLNumFormatContext::Finish( sal_Bool bOverwrite ) { SvXMLStyleContext::Finish( bOverwrite ); -// AddCondition(); } const LocaleDataWrapper& SvXMLNumFormatContext::GetLocaleData() const @@ -2015,10 +1848,6 @@ void SvXMLNumFormatContext::AddCurrency( const rtl::OUString& rContent, Language OUString aSymbol = rContent; if ( aSymbol.getLength() == 0 ) { - // get currency symbol for language - - //aSymbol = pData->GetLocaleData( nFormatLang ).getCurrSymbol(); - SvNumberFormatter* pFormatter = pData->GetNumberFormatter(); if ( pFormatter ) { @@ -2186,7 +2015,7 @@ void SvXMLNumFormatContext::AddCondition( const sal_Int32 nIndex ) rtl::OUString rCondition = aMyConditions[nIndex].sCondition; SvNumberFormatter* pFormatter = pData->GetNumberFormatter(); sal_uInt32 l_nKey = pData->GetKeyForName( rApplyName ); - OUString sValue = OUString::createFromAscii( "value()" ); //! define constant + OUString sValue(RTL_CONSTASCII_USTRINGPARAM("value()")); //! define constant sal_Int32 nValLen = sValue.getLength(); if ( pFormatter && l_nKey != NUMBERFORMAT_ENTRY_NOT_FOUND && @@ -2236,7 +2065,7 @@ void SvXMLNumFormatContext::AddCondition( const sal_Int32 nIndex ) void SvXMLNumFormatContext::AddCondition( const sal_Int32 nIndex, const rtl::OUString& rFormat, const LocaleDataWrapper& rData ) { rtl::OUString rCondition = aMyConditions[nIndex].sCondition; - OUString sValue = OUString::createFromAscii( "value()" ); //! define constant + OUString sValue(RTL_CONSTASCII_USTRINGPARAM("value()")); //! define constant sal_Int32 nValLen = sValue.getLength(); if ( rCondition.copy( 0, nValLen ) == sValue ) @@ -2335,9 +2164,6 @@ sal_Bool SvXMLNumFormatContext::IsSystemLanguage() // SvXMLNumFmtHelper // -// #110680# -//SvXMLNumFmtHelper::SvXMLNumFmtHelper( -// const uno::Reference<util::XNumberFormatsSupplier>& rSupp ) SvXMLNumFmtHelper::SvXMLNumFmtHelper( const uno::Reference<util::XNumberFormatsSupplier>& rSupp, const uno::Reference<lang::XMultiServiceFactory>& xServiceFactory ) @@ -2351,13 +2177,9 @@ SvXMLNumFmtHelper::SvXMLNumFmtHelper( if (pObj) pFormatter = pObj->GetNumberFormatter(); - // #110680# - // pData = new SvXMLNumImpData( pFormatter ); pData = new SvXMLNumImpData( pFormatter, mxServiceFactory ); } -// #110680# -// SvXMLNumFmtHelper::SvXMLNumFmtHelper( SvNumberFormatter* pNumberFormatter ) SvXMLNumFmtHelper::SvXMLNumFmtHelper( SvNumberFormatter* pNumberFormatter, const uno::Reference<lang::XMultiServiceFactory>& xServiceFactory ) @@ -2365,8 +2187,6 @@ SvXMLNumFmtHelper::SvXMLNumFmtHelper( { DBG_ASSERT( mxServiceFactory.is(), "got no service manager" ); - // #110680# - // pData = new SvXMLNumImpData( pNumberFormatter ); pData = new SvXMLNumImpData( pNumberFormatter, mxServiceFactory ); } @@ -2410,9 +2230,4 @@ const SvXMLTokenMap& SvXMLNumFmtHelper::GetStylesElemTokenMap() return pData->GetStylesElemTokenMap(); } -/*sal_uInt32 SvXMLNumFmtHelper::GetKeyForName( const rtl::OUString& rName ) -{ - return pData->GetKeyForName( rName ); -}*/ - - +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx index 0d45fdc289d0..c410cb6d5daa 100644..100755 --- a/xmloff/source/style/xmlnumi.cxx +++ b/xmloff/source/style/xmlnumi.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,10 +35,8 @@ #include <com/sun/star/awt/FontDescriptor.hpp> #include <com/sun/star/text/HoriOrientation.hpp> #include <com/sun/star/text/VertOrientation.hpp> -// --> OD 2008-01-16 #newlistlevelattrs# #include <com/sun/star/text/PositionAndSpaceMode.hpp> #include <com/sun/star/text/LabelFollow.hpp> -// <-- #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/style/XStyle.hpp> @@ -83,36 +82,37 @@ using namespace ::com::sun::star::frame; using namespace ::xmloff::token; using namespace ::com::sun::star::io; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_SYMBOL_TEXT_DISTANCE[] = +using rtl::OUString; +using rtl::OUStringBuffer; + +static sal_Char const XML_UNO_NAME_NRULE_SYMBOL_TEXT_DISTANCE[] = "SymbolTextDistance"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_PARENT_NUMBERING[] = +static sal_Char const XML_UNO_NAME_NRULE_PARENT_NUMBERING[] = "ParentNumbering"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_CHAR_STYLE_NAME[] = +static sal_Char const XML_UNO_NAME_NRULE_CHAR_STYLE_NAME[] = "CharStyleName"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_BULLET_CHAR[] ="BulletChar"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_BULLET_RELSIZE[] = "BulletRelSize"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_GRAPHIC_SIZE[] = +static sal_Char const XML_UNO_NAME_NRULE_BULLET_CHAR[] ="BulletChar"; +static sal_Char const XML_UNO_NAME_NRULE_BULLET_RELSIZE[] = "BulletRelSize"; +static sal_Char const XML_UNO_NAME_NRULE_GRAPHIC_SIZE[] = "GraphicSize"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_VERT_ORIENT[] ="VertOrient"; - -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_NUMBERINGTYPE[] = "NumberingType"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_PREFIX[] = "Prefix"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_SUFFIX[] = "Suffix"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_ADJUST[] = "Adjust"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_LEFT_MARGIN[] = "LeftMargin"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_FIRST_LINE_OFFSET[] = +static sal_Char const XML_UNO_NAME_NRULE_VERT_ORIENT[] ="VertOrient"; + +static sal_Char const XML_UNO_NAME_NRULE_NUMBERINGTYPE[] = "NumberingType"; +static sal_Char const XML_UNO_NAME_NRULE_PREFIX[] = "Prefix"; +static sal_Char const XML_UNO_NAME_NRULE_SUFFIX[] = "Suffix"; +static sal_Char const XML_UNO_NAME_NRULE_ADJUST[] = "Adjust"; +static sal_Char const XML_UNO_NAME_NRULE_LEFT_MARGIN[] = "LeftMargin"; +static sal_Char const XML_UNO_NAME_NRULE_FIRST_LINE_OFFSET[] = "FirstLineOffset"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_BULLET_FONT[] = "BulletFont"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_GRAPHICURL[] = "GraphicURL"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_START_WITH[] = "StartWith"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_BULLET_COLOR[] = "BulletColor"; -// --> OD 2008-01-15 #newlistlevelattrs# -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_POSITION_AND_SPACE_MODE[] = "PositionAndSpaceMode"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_LABEL_FOLLOWED_BY[] = "LabelFollowedBy"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_LISTTAB_STOP_POSITION[] = "ListtabStopPosition"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_FIRST_LINE_INDENT[] = "FirstLineIndent"; -static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_INDENT_AT[] = "IndentAt"; -// <-- +static sal_Char const XML_UNO_NAME_NRULE_BULLET_FONT[] = "BulletFont"; +static sal_Char const XML_UNO_NAME_NRULE_GRAPHICURL[] = "GraphicURL"; +static sal_Char const XML_UNO_NAME_NRULE_START_WITH[] = "StartWith"; +static sal_Char const XML_UNO_NAME_NRULE_BULLET_COLOR[] = "BulletColor"; +static sal_Char const XML_UNO_NAME_NRULE_POSITION_AND_SPACE_MODE[] = "PositionAndSpaceMode"; +static sal_Char const XML_UNO_NAME_NRULE_LABEL_FOLLOWED_BY[] = "LabelFollowedBy"; +static sal_Char const XML_UNO_NAME_NRULE_LISTTAB_STOP_POSITION[] = "ListtabStopPosition"; +static sal_Char const XML_UNO_NAME_NRULE_FIRST_LINE_INDENT[] = "FirstLineIndent"; +static sal_Char const XML_UNO_NAME_NRULE_INDENT_AT[] = "IndentAt"; // --------------------------------------------------------------------- @@ -131,16 +131,13 @@ public: SvxXMLListLevelStyleContext_Impl& rLLevel ); virtual ~SvxXMLListLevelStyleAttrContext_Impl(); - // --> OD 2008-01-16 #newlistlevelattrs# virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList > & xAttrList ); - // <-- }; // --------------------------------------------------------------------- -// --> OD 2008-01-16 #newlistlevelattrs# class SvxXMLListLevelStyleLabelAlignmentAttrContext_Impl : public SvXMLImportContext { SvxXMLListLevelStyleContext_Impl& rListLevel; @@ -154,7 +151,6 @@ public: SvxXMLListLevelStyleContext_Impl& rLLevel ); virtual ~SvxXMLListLevelStyleLabelAlignmentAttrContext_Impl(); }; -// <-- // --------------------------------------------------------------------- @@ -179,7 +175,7 @@ enum SvxXMLTextListLevelStyleAttrTokens const SvXMLTokenMapEntry* lcl_getLevelAttrTokenMap() { - static __FAR_DATA SvXMLTokenMapEntry aLevelAttrTokenMap[] = + static SvXMLTokenMapEntry aLevelAttrTokenMap[] = { { XML_NAMESPACE_TEXT, XML_LEVEL, XML_TOK_TEXT_LEVEL_ATTR_LEVEL }, { XML_NAMESPACE_TEXT, XML_STYLE_NAME, XML_TOK_TEXT_LEVEL_ATTR_STYLE_NAME }, @@ -238,13 +234,11 @@ class SvxXMLListLevelStyleContext_Impl : public SvXMLImportContext sal_Int16 nRelSize; Color aColor; - // --> OD 2008-01-16 #newlistlevelattrs# sal_Int16 ePosAndSpaceMode; sal_Int16 eLabelFollowedBy; sal_Int32 nListtabStopPosition; sal_Int32 nFirstLineIndent; sal_Int32 nIndentAt; - // <-- sal_Bool bBullet : 1; sal_Bool bImage : 1; @@ -287,7 +281,6 @@ public: Sequence<beans::PropertyValue> GetProperties( const SvI18NMap *pI18NMap=0 ); - // --> OD 2008-01-16 #newlistlevelattrs# inline void SetPosAndSpaceMode( sal_Int16 eValue ) { ePosAndSpaceMode = eValue; @@ -308,7 +301,6 @@ public: { nIndentAt = nValue; } - // <-- }; SvxXMLListLevelStyleContext_Impl::SvxXMLListLevelStyleContext_Impl( @@ -319,7 +311,7 @@ SvxXMLListLevelStyleContext_Impl::SvxXMLListLevelStyleContext_Impl( : SvXMLImportContext( rImport, nPrfx, rLName ) , sStarBats( RTL_CONSTASCII_USTRINGPARAM( "StarBats" ) ) , sStarMath( RTL_CONSTASCII_USTRINGPARAM( "StarMath" ) ) -, sNumFormat( OUString::createFromAscii( "1" ) ) +, sNumFormat( OUString(RTL_CONSTASCII_USTRINGPARAM("1")) ) , nLevel( -1L ) , nSpaceBefore( 0L ) , nMinLabelWidth( 0L ) @@ -336,13 +328,11 @@ SvxXMLListLevelStyleContext_Impl::SvxXMLListLevelStyleContext_Impl( , cBullet( 0 ) , nRelSize(0) , aColor( 0 ) -// --> OD 2008-01-16 #newlistelevelattrs# , ePosAndSpaceMode( PositionAndSpaceMode::LABEL_WIDTH_AND_POSITION ) , eLabelFollowedBy( LabelFollow::LISTTAB ) , nListtabStopPosition( 0 ) , nFirstLineIndent( 0 ) , nIndentAt( 0 ) -// <-- , bBullet( sal_False ) , bImage( sal_False ) , bNum( sal_False ) @@ -507,50 +497,48 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties( beans::PropertyValue *pProps = aPropSeq.getArray(); sal_Int32 nPos = 0; pProps[nPos].Name = - OUString::createFromAscii( XML_UNO_NAME_NRULE_NUMBERINGTYPE ); + OUString(RTL_CONSTASCII_USTRINGPARAM( XML_UNO_NAME_NRULE_NUMBERINGTYPE )); pProps[nPos++].Value <<= (sal_Int16)eType ; - pProps[nPos].Name = OUString::createFromAscii( XML_UNO_NAME_NRULE_PREFIX ); + pProps[nPos].Name = OUString(RTL_CONSTASCII_USTRINGPARAM( XML_UNO_NAME_NRULE_PREFIX )); pProps[nPos++].Value <<= sPrefix; - pProps[nPos].Name = OUString::createFromAscii( XML_UNO_NAME_NRULE_SUFFIX ); + pProps[nPos].Name = OUString(RTL_CONSTASCII_USTRINGPARAM( XML_UNO_NAME_NRULE_SUFFIX )); pProps[nPos++].Value <<= sSuffix; - pProps[nPos].Name = OUString::createFromAscii( XML_UNO_NAME_NRULE_ADJUST ); + pProps[nPos].Name = OUString(RTL_CONSTASCII_USTRINGPARAM( XML_UNO_NAME_NRULE_ADJUST )); pProps[nPos++].Value <<= eAdjust; sal_Int32 nLeftMargin = nSpaceBefore + nMinLabelWidth; pProps[nPos].Name = - OUString::createFromAscii( XML_UNO_NAME_NRULE_LEFT_MARGIN ); + OUString(RTL_CONSTASCII_USTRINGPARAM( XML_UNO_NAME_NRULE_LEFT_MARGIN )); pProps[nPos++].Value <<= (sal_Int32)nLeftMargin; sal_Int32 nFirstLineOffset = -nMinLabelWidth; pProps[nPos].Name = - OUString::createFromAscii( XML_UNO_NAME_NRULE_FIRST_LINE_OFFSET ); + OUString(RTL_CONSTASCII_USTRINGPARAM( XML_UNO_NAME_NRULE_FIRST_LINE_OFFSET )); pProps[nPos++].Value <<= (sal_Int32)nFirstLineOffset; pProps[nPos].Name = - OUString::createFromAscii(XML_UNO_NAME_NRULE_SYMBOL_TEXT_DISTANCE); + OUString(RTL_CONSTASCII_USTRINGPARAM(XML_UNO_NAME_NRULE_SYMBOL_TEXT_DISTANCE)); pProps[nPos++].Value <<= (sal_Int16)nMinLabelDist; - // --> OD 2008-01-16 #newlistlevelattrs# pProps[nPos].Name = - OUString::createFromAscii(XML_UNO_NAME_NRULE_POSITION_AND_SPACE_MODE); + OUString(RTL_CONSTASCII_USTRINGPARAM(XML_UNO_NAME_NRULE_POSITION_AND_SPACE_MODE)); pProps[nPos++].Value <<= (sal_Int16)ePosAndSpaceMode; pProps[nPos].Name = - OUString::createFromAscii(XML_UNO_NAME_NRULE_LABEL_FOLLOWED_BY); + OUString(RTL_CONSTASCII_USTRINGPARAM(XML_UNO_NAME_NRULE_LABEL_FOLLOWED_BY)); pProps[nPos++].Value <<= (sal_Int16)eLabelFollowedBy; pProps[nPos].Name = - OUString::createFromAscii(XML_UNO_NAME_NRULE_LISTTAB_STOP_POSITION); + OUString(RTL_CONSTASCII_USTRINGPARAM(XML_UNO_NAME_NRULE_LISTTAB_STOP_POSITION)); pProps[nPos++].Value <<= (sal_Int32)nListtabStopPosition; pProps[nPos].Name = - OUString::createFromAscii(XML_UNO_NAME_NRULE_FIRST_LINE_INDENT); + OUString(RTL_CONSTASCII_USTRINGPARAM(XML_UNO_NAME_NRULE_FIRST_LINE_INDENT)); pProps[nPos++].Value <<= (sal_Int32)nFirstLineIndent; pProps[nPos].Name = - OUString::createFromAscii(XML_UNO_NAME_NRULE_INDENT_AT); + OUString(RTL_CONSTASCII_USTRINGPARAM(XML_UNO_NAME_NRULE_INDENT_AT)); pProps[nPos++].Value <<= (sal_Int32)nIndentAt; - // <-- OUString sDisplayTextStyleName = GetImport().GetStyleDisplayName( XML_STYLE_FAMILY_TEXT_TEXT, sTextStyleName ); @@ -558,7 +546,7 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties( if( sStyleName.getLength() && pI18NMap ) sStyleName = pI18NMap->Get( SFX_STYLE_FAMILY_CHAR, sStyleName ); pProps[nPos].Name = - OUString::createFromAscii( XML_UNO_NAME_NRULE_CHAR_STYLE_NAME ); + OUString(RTL_CONSTASCII_USTRINGPARAM( XML_UNO_NAME_NRULE_CHAR_STYLE_NAME )); pProps[nPos++].Value <<= sDisplayTextStyleName; if( bBullet ) @@ -594,12 +582,12 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties( OUStringBuffer sTmp(1); sTmp.append( cBullet ); pProps[nPos].Name = - OUString::createFromAscii( XML_UNO_NAME_NRULE_BULLET_CHAR ); + OUString(RTL_CONSTASCII_USTRINGPARAM( XML_UNO_NAME_NRULE_BULLET_CHAR )); pProps[nPos++].Value <<= sTmp.makeStringAndClear(); } pProps[nPos].Name = - OUString::createFromAscii( XML_UNO_NAME_NRULE_BULLET_FONT ); + OUString(RTL_CONSTASCII_USTRINGPARAM( XML_UNO_NAME_NRULE_BULLET_FONT )); pProps[nPos++].Value <<= aFDesc; } @@ -621,41 +609,41 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties( if( sStr.getLength() ) { pProps[nPos].Name = - OUString::createFromAscii( XML_UNO_NAME_NRULE_GRAPHICURL ); + OUString(RTL_CONSTASCII_USTRINGPARAM( XML_UNO_NAME_NRULE_GRAPHICURL )); pProps[nPos++].Value <<= sStr; } awt::Size aSize( nImageWidth, nImageHeight ); pProps[nPos].Name = - OUString::createFromAscii( XML_UNO_NAME_NRULE_GRAPHIC_SIZE ); + OUString(RTL_CONSTASCII_USTRINGPARAM( XML_UNO_NAME_NRULE_GRAPHIC_SIZE )); pProps[nPos++].Value <<= aSize; pProps[nPos].Name = - OUString::createFromAscii( XML_UNO_NAME_NRULE_VERT_ORIENT ); + OUString(RTL_CONSTASCII_USTRINGPARAM( XML_UNO_NAME_NRULE_VERT_ORIENT )); pProps[nPos++].Value <<= (sal_Int16)eImageVertOrient; } if( bNum ) { pProps[nPos].Name = - OUString::createFromAscii( XML_UNO_NAME_NRULE_START_WITH ); + OUString(RTL_CONSTASCII_USTRINGPARAM( XML_UNO_NAME_NRULE_START_WITH )); pProps[nPos++].Value <<= (sal_Int16)nNumStartValue; pProps[nPos].Name = - OUString::createFromAscii(XML_UNO_NAME_NRULE_PARENT_NUMBERING); + OUString(RTL_CONSTASCII_USTRINGPARAM(XML_UNO_NAME_NRULE_PARENT_NUMBERING)); pProps[nPos++].Value <<= (sal_Int16)nNumDisplayLevels; } if( ( bNum || bBullet ) && nRelSize ) { pProps[nPos].Name = - OUString::createFromAscii( XML_UNO_NAME_NRULE_BULLET_RELSIZE ); + OUString(RTL_CONSTASCII_USTRINGPARAM( XML_UNO_NAME_NRULE_BULLET_RELSIZE )); pProps[nPos++].Value <<= nRelSize; } if( !bImage && bHasColor ) { - pProps[nPos].Name = OUString::createFromAscii( XML_UNO_NAME_NRULE_BULLET_COLOR ); + pProps[nPos].Name = OUString(RTL_CONSTASCII_USTRINGPARAM( XML_UNO_NAME_NRULE_BULLET_COLOR )); pProps[nPos++].Value <<= (sal_Int32)aColor.GetColor(); } @@ -686,15 +674,12 @@ enum SvxXMLStyleAttributesAttrTokens XML_TOK_STYLE_ATTRIBUTES_ATTR_COLOR, XML_TOK_STYLE_ATTRIBUTES_ATTR_WINDOW_FONT_COLOR, XML_TOK_STYLE_ATTRIBUTES_ATTR_FONT_SIZE, - // --> OD 2008-01-16 #newlistlevelattrs# XML_TOK_STYLE_ATTRIBUTES_ATTR_POSITION_AND_SPACE_MODE, - // <-- - XML_TOK_STYLE_ATTRIBUTES_ATTR_END=XML_TOK_UNKNOWN }; const SvXMLTokenMapEntry* lcl_getStyleAttributesAttrTokenMap() { - static __FAR_DATA SvXMLTokenMapEntry aStyleAttributesAttrTokenMap[] = + static SvXMLTokenMapEntry aStyleAttributesAttrTokenMap[] = { { XML_NAMESPACE_TEXT, XML_SPACE_BEFORE, XML_TOK_STYLE_ATTRIBUTES_ATTR_SPACE_BEFORE }, @@ -730,11 +715,8 @@ const SvXMLTokenMapEntry* lcl_getStyleAttributesAttrTokenMap() XML_TOK_STYLE_ATTRIBUTES_ATTR_WINDOW_FONT_COLOR }, { XML_NAMESPACE_FO, XML_FONT_SIZE, XML_TOK_STYLE_ATTRIBUTES_ATTR_FONT_SIZE }, - // --> OD 2008-01-16 #newlistlevelattrs# { XML_NAMESPACE_TEXT, XML_LIST_LEVEL_POSITION_AND_SPACE_MODE, XML_TOK_STYLE_ATTRIBUTES_ATTR_POSITION_AND_SPACE_MODE }, - // <-- - XML_TOKEN_MAP_END }; return aStyleAttributesAttrTokenMap; @@ -839,7 +821,6 @@ SvxXMLListLevelStyleAttrContext_Impl::SvxXMLListLevelStyleAttrContext_Impl( if(SvXMLUnitConverter::convertPercent( nVal, rValue ) ) rListLevel.SetRelSize( (sal_Int16)nVal ); break; - // --> OD 2008-01-16 #newlistlevelattrs# case XML_TOK_STYLE_ATTRIBUTES_ATTR_POSITION_AND_SPACE_MODE: { sal_Int16 ePosAndSpaceMode = PositionAndSpaceMode::LABEL_WIDTH_AND_POSITION; @@ -848,7 +829,6 @@ SvxXMLListLevelStyleAttrContext_Impl::SvxXMLListLevelStyleAttrContext_Impl( rListLevel.SetPosAndSpaceMode( ePosAndSpaceMode ); } break; - // <-- } } @@ -986,7 +966,6 @@ SvxXMLListLevelStyleAttrContext_Impl::~SvxXMLListLevelStyleAttrContext_Impl() { } -// --> OD 2008-01-16 #newlistlevelattrs# SvXMLImportContext* SvxXMLListLevelStyleAttrContext_Impl::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList > & xAttrList ) @@ -1008,11 +987,9 @@ SvXMLImportContext* SvxXMLListLevelStyleAttrContext_Impl::CreateChildContext( return pContext; } -// <-- // --------------------------------------------------------------------- -// --> OD 2008-01-16 #newlistlevelattrs# enum SvxXMLStyleAttributesLabelAlignmentAttrTokens { XML_TOK_STYLE_ATTRIBUTES_ATTR_LABEL_FOLLOWED_BY, @@ -1024,7 +1001,7 @@ enum SvxXMLStyleAttributesLabelAlignmentAttrTokens }; const SvXMLTokenMapEntry* lcl_getStyleAlignmentAttributesAttrTokenMap() { - static __FAR_DATA SvXMLTokenMapEntry aStyleAlignmentAttributesAttrTokenMap[] = + static SvXMLTokenMapEntry aStyleAlignmentAttributesAttrTokenMap[] = { { XML_NAMESPACE_TEXT, XML_LABEL_FOLLOWED_BY, XML_TOK_STYLE_ATTRIBUTES_ATTR_LABEL_FOLLOWED_BY }, @@ -1092,7 +1069,6 @@ SvxXMLListLevelStyleLabelAlignmentAttrContext_Impl::SvxXMLListLevelStyleLabelAli SvxXMLListLevelStyleLabelAlignmentAttrContext_Impl::~SvxXMLListLevelStyleLabelAlignmentAttrContext_Impl() { } -// <-- // --------------------------------------------------------------------- @@ -1224,7 +1200,7 @@ void SvxXMLListStyleContext::FillUnoNumRule( } catch( Exception& ) { - DBG_ERROR( "SvxXMLListStyleContext::FillUnoNumRule - Exception catched" ); + OSL_FAIL( "SvxXMLListStyleContext::FillUnoNumRule - Exception catched" ); } } @@ -1366,7 +1342,7 @@ void SvxXMLListStyleContext::SetDefaultStyle( beans::PropertyValue *pProps = aPropSeq.getArray(); pProps->Name = - OUString::createFromAscii( XML_UNO_NAME_NRULE_NUMBERINGTYPE ); + OUString(RTL_CONSTASCII_USTRINGPARAM( XML_UNO_NAME_NRULE_NUMBERINGTYPE )); (pProps++)->Value <<= (sal_Int16)(bOrdered ? NumberingType::ARABIC : NumberingType::CHAR_SPECIAL ); if( !bOrdered ) @@ -1387,16 +1363,16 @@ void SvxXMLListStyleContext::SetDefaultStyle( aFDesc.Weight = WEIGHT_DONTKNOW; //aFDesc.Transparant = sal_True; pProps->Name = - OUString::createFromAscii( XML_UNO_NAME_NRULE_BULLET_FONT ); + OUString(RTL_CONSTASCII_USTRINGPARAM( XML_UNO_NAME_NRULE_BULLET_FONT )); (pProps++)->Value <<= aFDesc; OUStringBuffer sTmp(1); sTmp.append( (sal_Unicode)(0xF000 + 149) ); pProps->Name = - OUString::createFromAscii( XML_UNO_NAME_NRULE_BULLET_CHAR ); + OUString(RTL_CONSTASCII_USTRINGPARAM( XML_UNO_NAME_NRULE_BULLET_CHAR )); (pProps++)->Value <<= sTmp.makeStringAndClear(); pProps->Name = - OUString::createFromAscii( XML_UNO_NAME_NRULE_CHAR_STYLE_NAME ); + OUString(RTL_CONSTASCII_USTRINGPARAM( XML_UNO_NAME_NRULE_CHAR_STYLE_NAME )); (pProps++)->Value <<= OUString( RTL_CONSTASCII_USTRINGPARAM( "Numbering Symbols" ) ); } @@ -1406,3 +1382,4 @@ void SvxXMLListStyleContext::SetDefaultStyle( rNumRule->replaceByIndex( nLevel, aAny ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/xmlprcon.cxx b/xmloff/source/style/xmlprcon.cxx index b87148958ddf..84c0cee372e3 100644..100755 --- a/xmloff/source/style/xmlprcon.cxx +++ b/xmloff/source/style/xmlprcon.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -102,3 +103,4 @@ SvXMLImportContext *SvXMLPropertySetContext::CreateChildContext( } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/xmlprhdl.cxx b/xmloff/source/style/xmlprhdl.cxx index 666471a3d79d..b43377c8f70d 100644..100755 --- a/xmloff/source/style/xmlprhdl.cxx +++ b/xmloff/source/style/xmlprhdl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -39,3 +40,5 @@ bool XMLPropertyHandler::equals( const ::com::sun::star::uno::Any& r1, const ::c { return (r1 == r2); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/xmlprmap.cxx b/xmloff/source/style/xmlprmap.cxx index eb4347f4d7d2..766f25bfa426 100644..100755 --- a/xmloff/source/style/xmlprmap.cxx +++ b/xmloff/source/style/xmlprmap.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -106,7 +107,7 @@ void XMLPropertySetMapper::AddMapperEntry( for( vector < UniReference < XMLPropertyHandlerFactory > >::iterator aFIter = rMapper->aHdlFactories.begin(); aFIter != rMapper->aHdlFactories.end(); - aFIter++ ) + ++aFIter ) { aHdlFactories.push_back( *aFIter ); } @@ -114,7 +115,7 @@ void XMLPropertySetMapper::AddMapperEntry( for( vector < XMLPropertySetMapperEntry_Impl >::iterator aEIter = rMapper->aMapEntries.begin(); aEIter != rMapper->aMapEntries.end(); - aEIter++ ) + ++aEIter ) { aMapEntries.push_back( *aEIter ); } @@ -247,6 +248,8 @@ void XMLPropertySetMapper::RemoveEntry( sal_Int32 nIndex ) return; vector < XMLPropertySetMapperEntry_Impl >::iterator aEIter = aMapEntries.begin(); for( sal_Int32 nN=0; nN<nIndex; nN++ ) - aEIter++; + ++aEIter; aMapEntries.erase( aEIter ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx index cce7d30577f3..c64c783698d4 100644..100755 --- a/xmloff/source/style/xmlstyle.cxx +++ b/xmloff/source/style/xmlstyle.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -38,30 +39,21 @@ #include <com/sun/star/style/XStyleFamiliesSupplier.hpp> #include <com/sun/star/style/XAutoStylesSupplier.hpp> #include <com/sun/star/style/XAutoStyleFamily.hpp> -#ifndef _XMLOFF_PAGEMASTERPROPMAPPER_HXX #include "PageMasterPropMapper.hxx" -#endif #include <tools/debug.hxx> -#include <tools/list.hxx> #include <svl/cntnrsrt.hxx> #include <svl/itemset.hxx> #include <xmloff/nmspmap.hxx> #include "xmloff/xmlnmspe.hxx" #include <xmloff/xmltoken.hxx> -#ifndef _XMLOFF_FAMILIES_HXX #include <xmloff/families.hxx> -#endif #include <xmloff/xmlimp.hxx> #include <xmloff/xmlnumi.hxx> #include <xmloff/xmlimppr.hxx> #include <xmloff/xmlstyle.hxx> -#ifndef _XMLOFF_TXTSTYLI_HXX #include <xmloff/txtstyli.hxx> -#endif -#ifndef _XMLOFF_TXTPRMAP_HXX #include <xmloff/txtprmap.hxx> -#endif #include <xmloff/xmlnumfi.hxx> #include "XMLChartStyleContext.hxx" #include "XMLChartPropertySetMapper.hxx" @@ -73,8 +65,11 @@ #include "PageMasterImportContext.hxx" #include "PageMasterImportPropMapper.hxx" +#include <vector> + using ::rtl::OUString; using ::rtl::OUStringBuffer; +using ::std::vector; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -84,7 +79,7 @@ using namespace ::xmloff::token; // --------------------------------------------------------------------- -static __FAR_DATA SvXMLTokenMapEntry aStyleStylesElemTokenMap[] = +static SvXMLTokenMapEntry aStyleStylesElemTokenMap[] = { { XML_NAMESPACE_STYLE, XML_STYLE, XML_TOK_STYLE_STYLE }, { XML_NAMESPACE_STYLE, XML_PAGE_LAYOUT, XML_TOK_STYLE_PAGE_MASTER }, @@ -267,7 +262,7 @@ int SvXMLStyleIndexCmp_Impl( const SvXMLStyleIndex_Impl& r1, // --------------------------------------------------------------------- typedef SvXMLStyleContext *SvXMLStyleContextPtr; -DECLARE_LIST( SvXMLStyleContexts_Impl, SvXMLStyleContextPtr ) +typedef vector< SvXMLStyleContextPtr > SvXMLStyleContexts_Impl; DECLARE_CONTAINER_SORT_DEL( SvXMLStyleIndices_Impl, SvXMLStyleIndex_Impl ) IMPL_CONTAINER_SORT( SvXMLStyleIndices_Impl, SvXMLStyleIndex_Impl, @@ -290,16 +285,16 @@ public: SvXMLStylesContext_Impl( sal_Bool bAuto ); ~SvXMLStylesContext_Impl(); - sal_uInt32 GetStyleCount() const { return aStyles.Count(); } + size_t GetStyleCount() const { return aStyles.size(); } - const SvXMLStyleContext *GetStyle( sal_uInt32 i ) const + const SvXMLStyleContext *GetStyle( size_t i ) const { - return i < aStyles.Count() ? aStyles.GetObject(i) : 0; + return i < aStyles.size() ? aStyles[ i ] : 0; } - SvXMLStyleContext *GetStyle( sal_uInt32 i ) + SvXMLStyleContext *GetStyle( size_t i ) { - return i < aStyles.Count() ? aStyles.GetObject(i) : 0; + return i < aStyles.size() ? aStyles[ i ] : 0; } inline void AddStyle( SvXMLStyleContext *pStyle ); @@ -311,7 +306,6 @@ public: }; SvXMLStylesContext_Impl::SvXMLStylesContext_Impl( sal_Bool bAuto ) : - aStyles( 20, 5 ), pIndices( 0 ), bAutomaticStyle( bAuto ) #ifdef DBG_UTIL @@ -323,17 +317,17 @@ SvXMLStylesContext_Impl::~SvXMLStylesContext_Impl() { delete pIndices; - while( aStyles.Count() ) + for ( size_t i = 0, n = aStyles.size(); i < n; ++i ) { - SvXMLStyleContext *pStyle = aStyles.GetObject(0); - aStyles.Remove( 0UL ); + SvXMLStyleContext *pStyle = aStyles[ i ]; pStyle->ReleaseRef(); } + aStyles.clear(); } inline void SvXMLStylesContext_Impl::AddStyle( SvXMLStyleContext *pStyle ) { - aStyles.Insert( pStyle, aStyles.Count() ); + aStyles.push_back( pStyle ); pStyle->AddRef(); FlushIndex(); @@ -343,12 +337,12 @@ void SvXMLStylesContext_Impl::Clear() { FlushIndex(); - while( aStyles.Count() ) + for ( size_t i = 0, n = aStyles.size(); i < n; ++i ) { - SvXMLStyleContext *pStyle = aStyles.GetObject(0); - aStyles.Remove( 0UL ); + SvXMLStyleContext *pStyle = aStyles[ i ]; pStyle->ReleaseRef(); } + aStyles.clear(); } const SvXMLStyleContext *SvXMLStylesContext_Impl::FindStyleChildContext( @@ -358,7 +352,7 @@ const SvXMLStyleContext *SvXMLStylesContext_Impl::FindStyleChildContext( { const SvXMLStyleContext *pStyle = 0; - if( !pIndices && bCreateIndex && aStyles.Count() > 0 ) + if( !pIndices && bCreateIndex && !aStyles.empty() ) { #ifdef DBG_UTIL DBG_ASSERT( 0==nIndexCreated, @@ -366,13 +360,13 @@ const SvXMLStyleContext *SvXMLStylesContext_Impl::FindStyleChildContext( #endif ((SvXMLStylesContext_Impl *)this)->pIndices = new SvXMLStyleIndices_Impl( - sal::static_int_cast< sal_uInt16 >(aStyles.Count()), 5 ); - for( sal_uInt32 i=0; i < aStyles.Count(); i++ ) + sal::static_int_cast< sal_uInt16 >( aStyles.size() ), 5 ); + for( size_t i = 0; i < aStyles.size(); i++ ) { - SvXMLStyleIndex_Impl* pStyleIndex = new SvXMLStyleIndex_Impl( aStyles.GetObject(i)); + SvXMLStyleIndex_Impl* pStyleIndex = new SvXMLStyleIndex_Impl( aStyles[ i ] ); if (!pIndices->Insert( pStyleIndex )) { - DBG_ERROR("Here is a double Style"); + OSL_FAIL("Here is a double Style"); delete pStyleIndex; } } @@ -390,9 +384,9 @@ const SvXMLStyleContext *SvXMLStylesContext_Impl::FindStyleChildContext( } else { - for( sal_uInt32 i=0; !pStyle && i < aStyles.Count(); i++ ) + for( size_t i = 0; !pStyle && i < aStyles.size(); i++ ) { - const SvXMLStyleContext *pS = aStyles.GetObject( i ); + const SvXMLStyleContext *pS = aStyles[ i ]; if( pS->GetFamily() == nFamily && pS->GetName() == rName ) pStyle = pS; @@ -974,3 +968,5 @@ const SvXMLStyleContext *SvXMLStylesContext::FindStyleChildContext( { return mpImpl->FindStyleChildContext( nFamily, rName, bCreateIndex ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/xmltabe.cxx b/xmloff/source/style/xmltabe.cxx index 64c294c3da2f..b4725e6c9837 100644..100755 --- a/xmloff/source/style/xmltabe.cxx +++ b/xmloff/source/style/xmltabe.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -117,7 +118,7 @@ void SvxXMLTabStopExport::Export( const uno::Any& rAny ) uno::Sequence< ::com::sun::star::style::TabStop> aSeq; if(!(rAny >>= aSeq)) { - DBG_ERROR( "SvxXMLTabStopExport needs a Sequence ::com::sun::star::style::TabStop>" ); + OSL_FAIL( "SvxXMLTabStopExport needs a Sequence ::com::sun::star::style::TabStop>" ); } else { @@ -140,3 +141,4 @@ void SvxXMLTabStopExport::Export( const uno::Any& rAny ) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/xmltabi.cxx b/xmloff/source/style/xmltabi.cxx index 24402e61c240..a5c92fb5469d 100644..100755 --- a/xmloff/source/style/xmltabi.cxx +++ b/xmloff/source/style/xmltabi.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -61,7 +62,7 @@ enum SvXMLTokenMapAttrs XML_TOK_TABSTOP_END=XML_TOK_UNKNOWN }; -static __FAR_DATA SvXMLTokenMapEntry aTabsAttributesAttrTokenMap[] = +static SvXMLTokenMapEntry aTabsAttributesAttrTokenMap[] = { { XML_NAMESPACE_STYLE, XML_POSITION, XML_TOK_TABSTOP_POSITION }, { XML_NAMESPACE_STYLE, XML_TYPE, XML_TOK_TABSTOP_TYPE }, @@ -291,3 +292,4 @@ void SvxXMLTabStopImportContext::EndElement( ) +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |