diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-06-19 12:24:29 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-06-19 12:24:29 +0200 |
commit | 92667c8edbaee9a252b1d5d221eb62849f76697c (patch) | |
tree | 8f1d329f2259b7d5bff054bc14d0965637df6961 /xmloff | |
parent | baecdfb578cb7bc992944857ad4d8882ef7e842c (diff) | |
parent | 48b4a99ce2451f1ddf2e8e128bbfcd6683072999 (diff) |
Merge branch 'master' into feature/gnumake4
Conflicts:
connectivity/source/cpool/Zregistration.cxx
connectivity/source/drivers/evoab/LCatalog.cxx
connectivity/source/drivers/evoab/LColumnAlias.cxx
connectivity/source/drivers/evoab/LColumnAlias.hxx
connectivity/source/drivers/evoab/LColumns.cxx
connectivity/source/drivers/evoab/LColumns.hxx
connectivity/source/drivers/evoab/LConfigAccess.cxx
connectivity/source/drivers/evoab/LConfigAccess.hxx
connectivity/source/drivers/evoab/LConnection.cxx
connectivity/source/drivers/evoab/LConnection.hxx
connectivity/source/drivers/evoab/LDatabaseMetaData.cxx
connectivity/source/drivers/evoab/LDatabaseMetaData.hxx
connectivity/source/drivers/evoab/LDriver.cxx
connectivity/source/drivers/evoab/LDriver.hxx
connectivity/source/drivers/evoab/LFolderList.cxx
connectivity/source/drivers/evoab/LFolderList.hxx
connectivity/source/drivers/evoab/LNoException.cxx
connectivity/source/drivers/evoab/LPreparedStatement.cxx
connectivity/source/drivers/evoab/LPreparedStatement.hxx
connectivity/source/drivers/evoab/LResultSet.cxx
connectivity/source/drivers/evoab/LResultSet.hxx
connectivity/source/drivers/evoab/LServices.cxx
connectivity/source/drivers/evoab/LStatement.cxx
connectivity/source/drivers/evoab/LStatement.hxx
connectivity/source/drivers/evoab/LTable.cxx
connectivity/source/drivers/evoab/LTable.hxx
connectivity/source/drivers/evoab/LTables.cxx
connectivity/source/drivers/evoab/LTables.hxx
connectivity/source/drivers/evoab/evoab.xml
connectivity/source/drivers/evoab/makefile.mk
editeng/Library_editeng.mk
framework/Library_fwe.mk
framework/test/test.cxx
idl/prj/d.lst
idl/util/idlpch.cxx
linguistic/Makefile
linguistic/Module_linguistic.mk
linguistic/inc/linguistic/lngdllapi.h
linguistic/inc/linguistic/lngprophelp.hxx
linguistic/inc/linguistic/misc.hxx
linguistic/prj/build.lst
linguistic/prj/d.lst
linguistic/qa/unoapi/Test.java
linguistic/source/grammarchecker.cxx
linguistic/source/grammarchecker.hxx
linguistic/source/hyphdta.cxx
linguistic/source/lngprophelp.cxx
linguistic/source/makefile.mk
linguistic/source/spelldta.cxx
sfx2/Library_qstart.mk
sfx2/Library_sfx.mk
sfx2/inc/sfx2/qswin32.h
sfx2/prj/build.lst
sfx2/qa/cppunit/makefile.mk
xmlscript/inc/xmlscript/xcrdllapi.h
xmlscript/prj/d.lst
xmlscript/util/makefile.mk
Diffstat (limited to 'xmloff')
784 files changed, 4460 insertions, 4801 deletions
diff --git a/xmloff/JunitTest_xmloff_unoapi.mk b/xmloff/JunitTest_xmloff_unoapi.mk index d4e5a3c65c8d..3a9824dc6877 100755 --- a/xmloff/JunitTest_xmloff_unoapi.mk +++ b/xmloff/JunitTest_xmloff_unoapi.mk @@ -42,12 +42,8 @@ $(eval $(call gb_JunitTest_add_jars,xmloff_unoapi,\ $(OUTDIR)/bin/jurt.jar \ )) -$(eval $(call gb_JunitTest_add_sourcefiles,xmloff_unoapi,\ - xmloff/qa/unoapi/Test \ -)) - $(eval $(call gb_JunitTest_add_classes,xmloff_unoapi,\ - org.openoffice.xmloff.qa.unoapi.Test \ + org.openoffice.test.UnoApiTest \ )) # vim: set noet sw=4 ts=4: diff --git a/xmloff/Library_xo.mk b/xmloff/Library_xo.mk index ff2a0401181c..1ded182ff63e 100644 --- a/xmloff/Library_xo.mk +++ b/xmloff/Library_xo.mk @@ -35,10 +35,8 @@ $(eval $(call gb_Library_add_precompiled_header,xo,$(SRCDIR)/xmloff/inc/pch/prec $(eval $(call gb_Library_set_include,xo,\ $$(SOLARINC) \ - -I. \ - -I$(SRCDIR)/xmloff/inc \ - -I$(SRCDIR)/xmloff/source/inc \ - -I$(SRCDIR)/xmloff/inc/pch \ + -I$(realpath $(SRCDIR)/xmloff/inc) \ + -I$(realpath $(SRCDIR)/xmloff/inc/pch) \ -I$(OUTDIR)/inc/offuh \ )) @@ -53,11 +51,10 @@ $(eval $(call gb_Library_add_linked_libs,xo,\ cppuhelper \ i18nisolang1 \ sal \ - stl \ + salhelper \ svl \ tl \ utl \ - vos3 \ $(gb_STDLIBS) \ )) diff --git a/xmloff/Library_xof.mk b/xmloff/Library_xof.mk index 455daadaf6e3..2ed555d7ac41 100644 --- a/xmloff/Library_xof.mk +++ b/xmloff/Library_xof.mk @@ -30,9 +30,8 @@ $(eval $(call gb_Library_Library,xof)) $(eval $(call gb_Library_set_componentfile,xof,xmloff/source/transform/xof)) $(eval $(call gb_Library_set_include,xof,\ - -I$(SRCDIR)/xmloff/inc/pch \ - -I$(SRCDIR)/xmloff/inc \ - -I$(SRCDIR)/xmloff/source/inc \ + -I$(realpath $(SRCDIR)/xmloff/inc/pch) \ + -I$(realpath $(SRCDIR)/xmloff/inc) \ $$(INCLUDE) \ -I$(OUTDIR)/inc/offuh \ )) @@ -43,7 +42,6 @@ $(eval $(call gb_Library_add_linked_libs,xof,\ cppuhelper \ sal \ salhelper \ - stl \ xo \ $(gb_STDLIBS) \ )) diff --git a/xmloff/Makefile b/xmloff/Makefile index a79aff831024..a79aff831024 100644..100755 --- a/xmloff/Makefile +++ b/xmloff/Makefile diff --git a/xmloff/Module_xmloff.mk b/xmloff/Module_xmloff.mk index 74a1aa3aaa1e..74a1aa3aaa1e 100644..100755 --- a/xmloff/Module_xmloff.mk +++ b/xmloff/Module_xmloff.mk diff --git a/xmloff/Package_dtd.mk b/xmloff/Package_dtd.mk index 7f2d5a4e0f1d..7f2d5a4e0f1d 100644..100755 --- a/xmloff/Package_dtd.mk +++ b/xmloff/Package_dtd.mk diff --git a/xmloff/Package_inc.mk b/xmloff/Package_inc.mk index 4e11c2b4b5d9..4e11c2b4b5d9 100644..100755 --- a/xmloff/Package_inc.mk +++ b/xmloff/Package_inc.mk diff --git a/xmloff/dtd/Blocklist.dtd b/xmloff/dtd/Blocklist.dtd index f7bb8eb321bb..f7bb8eb321bb 100644..100755 --- a/xmloff/dtd/Blocklist.dtd +++ b/xmloff/dtd/Blocklist.dtd diff --git a/xmloff/dtd/chart.mod b/xmloff/dtd/chart.mod index e72bab68c3f9..e72bab68c3f9 100644..100755 --- a/xmloff/dtd/chart.mod +++ b/xmloff/dtd/chart.mod diff --git a/xmloff/dtd/datastyl.mod b/xmloff/dtd/datastyl.mod index daacfad66f5b..daacfad66f5b 100644..100755 --- a/xmloff/dtd/datastyl.mod +++ b/xmloff/dtd/datastyl.mod diff --git a/xmloff/dtd/defs.mod b/xmloff/dtd/defs.mod index 98c964fe99e3..98c964fe99e3 100644..100755 --- a/xmloff/dtd/defs.mod +++ b/xmloff/dtd/defs.mod diff --git a/xmloff/dtd/drawing.mod b/xmloff/dtd/drawing.mod index 93d7544b4fb9..93d7544b4fb9 100644..100755 --- a/xmloff/dtd/drawing.mod +++ b/xmloff/dtd/drawing.mod diff --git a/xmloff/dtd/dtypes.mod b/xmloff/dtd/dtypes.mod index 4de538ced12b..4de538ced12b 100644..100755 --- a/xmloff/dtd/dtypes.mod +++ b/xmloff/dtd/dtypes.mod diff --git a/xmloff/dtd/form.mod b/xmloff/dtd/form.mod index 511fb180f488..511fb180f488 100644..100755 --- a/xmloff/dtd/form.mod +++ b/xmloff/dtd/form.mod diff --git a/xmloff/dtd/meta.mod b/xmloff/dtd/meta.mod index 1ea845bcb02d..1ea845bcb02d 100644..100755 --- a/xmloff/dtd/meta.mod +++ b/xmloff/dtd/meta.mod diff --git a/xmloff/dtd/nmspace.mod b/xmloff/dtd/nmspace.mod index addcdc59224f..addcdc59224f 100644..100755 --- a/xmloff/dtd/nmspace.mod +++ b/xmloff/dtd/nmspace.mod diff --git a/xmloff/dtd/office.dtd b/xmloff/dtd/office.dtd index c66bc8d2ad4b..c66bc8d2ad4b 100644..100755 --- a/xmloff/dtd/office.dtd +++ b/xmloff/dtd/office.dtd diff --git a/xmloff/dtd/office.mod b/xmloff/dtd/office.mod index a7d50df0cf06..a7d50df0cf06 100644..100755 --- a/xmloff/dtd/office.mod +++ b/xmloff/dtd/office.mod diff --git a/xmloff/dtd/openoffice-2.0-schema.rng b/xmloff/dtd/openoffice-2.0-schema.rng index 36a319876682..36a319876682 100644..100755 --- a/xmloff/dtd/openoffice-2.0-schema.rng +++ b/xmloff/dtd/openoffice-2.0-schema.rng diff --git a/xmloff/dtd/script.mod b/xmloff/dtd/script.mod index 5e255ac6df4d..5e255ac6df4d 100644..100755 --- a/xmloff/dtd/script.mod +++ b/xmloff/dtd/script.mod diff --git a/xmloff/dtd/settings.mod b/xmloff/dtd/settings.mod index bb9224237fa8..bb9224237fa8 100644..100755 --- a/xmloff/dtd/settings.mod +++ b/xmloff/dtd/settings.mod diff --git a/xmloff/dtd/style.mod b/xmloff/dtd/style.mod index fef8f73630ef..fef8f73630ef 100644..100755 --- a/xmloff/dtd/style.mod +++ b/xmloff/dtd/style.mod diff --git a/xmloff/dtd/table.mod b/xmloff/dtd/table.mod index be30da54293c..be30da54293c 100644..100755 --- a/xmloff/dtd/table.mod +++ b/xmloff/dtd/table.mod diff --git a/xmloff/dtd/text.mod b/xmloff/dtd/text.mod index 909321312df8..909321312df8 100644..100755 --- a/xmloff/dtd/text.mod +++ b/xmloff/dtd/text.mod diff --git a/xmloff/inc/AttributeContainerHandler.hxx b/xmloff/inc/AttributeContainerHandler.hxx index efa28c9602ee..64f6ac6d2863 100644 --- a/xmloff/inc/AttributeContainerHandler.hxx +++ b/xmloff/inc/AttributeContainerHandler.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,5 @@ public: }; #endif // _XMLOFF_ATTRIBUTECONTAINERHANDLER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/DomBuilderContext.hxx b/xmloff/inc/DomBuilderContext.hxx index 219b1d1d6870..4ae1dc374a1e 100644 --- a/xmloff/inc/DomBuilderContext.hxx +++ b/xmloff/inc/DomBuilderContext.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. @@ -107,3 +108,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/DomExport.hxx b/xmloff/inc/DomExport.hxx index b13bc4549127..aa7b245be136 100644 --- a/xmloff/inc/DomExport.hxx +++ b/xmloff/inc/DomExport.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. @@ -41,3 +42,5 @@ void exportDom( SvXMLExport&, const com::sun::star::uno::Reference<com::sun::sta void exportDom( SvXMLExport&, const com::sun::star::uno::Reference<com::sun::star::xml::dom::XNode>& ); #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/EnhancedCustomShapeToken.hxx b/xmloff/inc/EnhancedCustomShapeToken.hxx index ae48752e3e7f..66b973746979 100644 --- a/xmloff/inc/EnhancedCustomShapeToken.hxx +++ b/xmloff/inc/EnhancedCustomShapeToken.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. @@ -164,3 +165,5 @@ namespace xmloff { namespace EnhancedCustomShapeToken { } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/MetaExportComponent.hxx b/xmloff/inc/MetaExportComponent.hxx index eb37047343f4..67cd7d514b43 100644 --- a/xmloff/inc/MetaExportComponent.hxx +++ b/xmloff/inc/MetaExportComponent.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. @@ -81,3 +82,4 @@ protected: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/MetaImportComponent.hxx b/xmloff/inc/MetaImportComponent.hxx index 27f8981c9e0e..afa9fe298698 100644 --- a/xmloff/inc/MetaImportComponent.hxx +++ b/xmloff/inc/MetaImportComponent.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. @@ -81,3 +82,4 @@ protected: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/MultiPropertySetHelper.hxx b/xmloff/inc/MultiPropertySetHelper.hxx index 81b08eabd930..a64e8c8524dd 100644 --- a/xmloff/inc/MultiPropertySetHelper.hxx +++ b/xmloff/inc/MultiPropertySetHelper.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. @@ -202,3 +203,5 @@ sal_Bool MultiPropertySetHelper::hasProperty( sal_Int16 nValueNo ) } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/PageMasterImportContext.hxx b/xmloff/inc/PageMasterImportContext.hxx index 752547e3d0d5..7a4f5be70d61 100644 --- a/xmloff/inc/PageMasterImportContext.hxx +++ b/xmloff/inc/PageMasterImportContext.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. @@ -65,3 +66,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/PropertySetMerger.hxx b/xmloff/inc/PropertySetMerger.hxx index 81851f09aa8a..d5b1d02fa29c 100644 --- a/xmloff/inc/PropertySetMerger.hxx +++ b/xmloff/inc/PropertySetMerger.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. @@ -36,3 +37,5 @@ extern ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rPropSet2 ) throw(); #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/RDFaExportHelper.hxx b/xmloff/inc/RDFaExportHelper.hxx index f8e991060eea..268cd97ca077 100644 --- a/xmloff/inc/RDFaExportHelper.hxx +++ b/xmloff/inc/RDFaExportHelper.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. @@ -76,3 +77,4 @@ public: #endif // RDFAEXPORTHELPER_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/RDFaImportHelper.hxx b/xmloff/inc/RDFaImportHelper.hxx index 030e1a840b9b..e68e833b9937 100644 --- a/xmloff/inc/RDFaImportHelper.hxx +++ b/xmloff/inc/RDFaImportHelper.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. @@ -102,3 +103,4 @@ public: #endif // RDFAIMPORTHELPER_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/SchXMLExport.hxx b/xmloff/inc/SchXMLExport.hxx index 49a471a31729..f5034b0983c3 100644 --- a/xmloff/inc/SchXMLExport.hxx +++ b/xmloff/inc/SchXMLExport.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. @@ -88,3 +89,5 @@ public: }; #endif // SCH_XMLEXPORT_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/SchXMLImport.hxx b/xmloff/inc/SchXMLImport.hxx index 6b11e885f72e..11b90ca5a34f 100644 --- a/xmloff/inc/SchXMLImport.hxx +++ b/xmloff/inc/SchXMLImport.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. @@ -196,3 +197,5 @@ public: }; #endif // SCH_XMLIMPORT_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/StyleMap.hxx b/xmloff/inc/StyleMap.hxx index e13d7575d321..da11f0a33e03 100644 --- a/xmloff/inc/StyleMap.hxx +++ b/xmloff/inc/StyleMap.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. @@ -30,7 +31,7 @@ #include <com/sun/star/lang/XUnoTunnel.hpp> #include <cppuhelper/implbase1.hxx> -#include <hash_map> +#include <boost/unordered_map.hpp> struct StyleNameKey_Impl { @@ -72,7 +73,7 @@ inline bool StyleNameHash_Impl::operator()( class StyleMap : public ::cppu::WeakImplHelper1< ::com::sun::star::lang::XUnoTunnel>, - public ::std::hash_map< StyleNameKey_Impl, ::rtl::OUString, + public ::boost::unordered_map< StyleNameKey_Impl, ::rtl::OUString, StyleNameHash_Impl, StyleNameHash_Impl > { @@ -93,3 +94,4 @@ public: #endif // _XMLOFF_STYLEMAP_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/TransGradientStyle.hxx b/xmloff/inc/TransGradientStyle.hxx index 34c949b97792..74ad5cbcced2 100644 --- a/xmloff/inc/TransGradientStyle.hxx +++ b/xmloff/inc/TransGradientStyle.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. @@ -68,3 +69,5 @@ public: }; #endif // _XMLOFF_TRANSGRADIENTSTYLE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/XMLBackgroundImageContext.hxx b/xmloff/inc/XMLBackgroundImageContext.hxx index 3029a9cc3a8e..6e61bd072ef1 100644 --- a/xmloff/inc/XMLBackgroundImageContext.hxx +++ b/xmloff/inc/XMLBackgroundImageContext.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. @@ -81,3 +82,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/XMLBackgroundImageExport.hxx b/xmloff/inc/XMLBackgroundImageExport.hxx index 341a784c13a5..201d4f302111 100644 --- a/xmloff/inc/XMLBackgroundImageExport.hxx +++ b/xmloff/inc/XMLBackgroundImageExport.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. @@ -28,9 +29,7 @@ #ifndef _XMLBACKGROUNDIMAGEEXPORT_HXX #define _XMLBACKGROUNDIMAGEEXPORT_HXX -#ifndef _SAL_TYPES_H #include <sal/types.h> -#endif namespace rtl { class OUString; } namespace com { namespace sun { namespace star { namespace uno { @@ -63,3 +62,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/XMLBase64Export.hxx b/xmloff/inc/XMLBase64Export.hxx index 309199a889ce..558809cd9926 100644 --- a/xmloff/inc/XMLBase64Export.hxx +++ b/xmloff/inc/XMLBase64Export.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. @@ -58,3 +59,5 @@ public: #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/XMLBasicExportFilter.hxx b/xmloff/inc/XMLBasicExportFilter.hxx index 87e44afcb2cf..3ab3d9f4cb4f 100644 --- a/xmloff/inc/XMLBasicExportFilter.hxx +++ b/xmloff/inc/XMLBasicExportFilter.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_XMLBASICEXPORTFILTER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/XMLBitmapLogicalSizePropertyHandler.hxx b/xmloff/inc/XMLBitmapLogicalSizePropertyHandler.hxx index 18b616d3ed28..de8a2ffe0dee 100644 --- a/xmloff/inc/XMLBitmapLogicalSizePropertyHandler.hxx +++ b/xmloff/inc/XMLBitmapLogicalSizePropertyHandler.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 // _XMLOFF_XMLBITMAPLOGICALSIZEPROPERTYHANDLER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/XMLBitmapRepeatOffsetPropertyHandler.hxx b/xmloff/inc/XMLBitmapRepeatOffsetPropertyHandler.hxx index eade5eec0315..e94c113d0386 100644 --- a/xmloff/inc/XMLBitmapRepeatOffsetPropertyHandler.hxx +++ b/xmloff/inc/XMLBitmapRepeatOffsetPropertyHandler.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. @@ -63,3 +64,5 @@ public: }; #endif // _XMLOFF_XMLBITMAPREPEATOFFSETPROPERTYHANDLER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/XMLChartPropertySetMapper.hxx b/xmloff/inc/XMLChartPropertySetMapper.hxx index a08e7fb45949..21e2ff56563f 100644 --- a/xmloff/inc/XMLChartPropertySetMapper.hxx +++ b/xmloff/inc/XMLChartPropertySetMapper.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. @@ -112,7 +113,7 @@ public: const SvXMLImport& rImport ); virtual ~XMLChartImportPropertyMapper(); - virtual sal_Bool handleSpecialItem( + virtual bool handleSpecialItem( XMLPropertyState& rProperty, ::std::vector< XMLPropertyState >& rProperties, const ::rtl::OUString& rValue, @@ -125,3 +126,5 @@ public: }; #endif // _XMLOFF_CHARTPROPERTYSETMAPPER_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/XMLChartStyleContext.hxx b/xmloff/inc/XMLChartStyleContext.hxx index 24e32fb184ae..ea4ae8853f90 100644 --- a/xmloff/inc/XMLChartStyleContext.hxx +++ b/xmloff/inc/XMLChartStyleContext.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. @@ -65,3 +66,5 @@ public: }; #endif // _XMLOFF_XMLCHARTSTYLECONTEXT_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/XMLClipPropertyHandler.hxx b/xmloff/inc/XMLClipPropertyHandler.hxx index 37d055a9f988..c63da912ebfe 100644 --- a/xmloff/inc/XMLClipPropertyHandler.hxx +++ b/xmloff/inc/XMLClipPropertyHandler.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_BASICTYPES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/XMLElementPropertyContext.hxx b/xmloff/inc/XMLElementPropertyContext.hxx index 776c80fdadc5..8baf3ac53dca 100644 --- a/xmloff/inc/XMLElementPropertyContext.hxx +++ b/xmloff/inc/XMLElementPropertyContext.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. @@ -66,3 +67,4 @@ public: #endif // _XMLOFF_ELEMENTPROPERTYCONTEXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/XMLEmbeddedObjectImportContext.hxx b/xmloff/inc/XMLEmbeddedObjectImportContext.hxx index c7858a96938e..280ca1109ff9 100644 --- a/xmloff/inc/XMLEmbeddedObjectImportContext.hxx +++ b/xmloff/inc/XMLEmbeddedObjectImportContext.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 // _XMLOFF_XMLEMBEDDEDOBJECTIMPORTCONTEXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/XMLEventImportHelper.hxx b/xmloff/inc/XMLEventImportHelper.hxx index 9bd14cd6e6b4..5a1c84b4ec4d 100644 --- a/xmloff/inc/XMLEventImportHelper.hxx +++ b/xmloff/inc/XMLEventImportHelper.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. @@ -104,3 +105,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/XMLFillBitmapSizePropertyHandler.hxx b/xmloff/inc/XMLFillBitmapSizePropertyHandler.hxx index 78af75b99268..930939ca1f9a 100644 --- a/xmloff/inc/XMLFillBitmapSizePropertyHandler.hxx +++ b/xmloff/inc/XMLFillBitmapSizePropertyHandler.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 // _XMLOFF_XMLFILLBITMAPSIZEPROPERTYHANDLER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx b/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx index 3a919dca7c31..a950e405c22f 100644 --- a/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx +++ b/xmloff/inc/XMLFootnoteConfigurationImportContext.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. @@ -101,10 +102,10 @@ public: const SvXMLTokenMap& GetFtnConfigAttrTokenMap(); /// set configuration at document; calls ProcessSettings - // --> OD 2005-01-31 #i40579# - move code from <CreateAndInsertLate(..)> - // to <Finish(..)>, because at this time all styles it references have been set. + /* Move code from <CreateAndInsertLate(..)> to <Finish(..)>, because + at this time all styles it references have been set. (#i40579#) + */ virtual void Finish( sal_Bool bOverwrite); - // <-- /// set configuration at document void ProcessSettings( @@ -119,3 +120,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/XMLImageMapContext.hxx b/xmloff/inc/XMLImageMapContext.hxx index fbb9a2a65099..339a0c72e9f9 100644 --- a/xmloff/inc/XMLImageMapContext.hxx +++ b/xmloff/inc/XMLImageMapContext.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. @@ -74,3 +75,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/XMLImageMapExport.hxx b/xmloff/inc/XMLImageMapExport.hxx index c926c362cfcf..d0e39f43390b 100644 --- a/xmloff/inc/XMLImageMapExport.hxx +++ b/xmloff/inc/XMLImageMapExport.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. @@ -117,3 +118,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx b/xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx index 029e542b37c0..9d8fbdbf8089 100644 --- a/xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx +++ b/xmloff/inc/XMLIndexBibliographyConfigurationContext.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. @@ -105,3 +106,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/XMLIsPercentagePropertyHandler.hxx b/xmloff/inc/XMLIsPercentagePropertyHandler.hxx index 70eb07b9f520..17b7b351980d 100644 --- a/xmloff/inc/XMLIsPercentagePropertyHandler.hxx +++ b/xmloff/inc/XMLIsPercentagePropertyHandler.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. @@ -50,3 +51,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/XMLLineNumberingImportContext.hxx b/xmloff/inc/XMLLineNumberingImportContext.hxx index 61a8078354b7..e00282d4e284 100644 --- a/xmloff/inc/XMLLineNumberingImportContext.hxx +++ b/xmloff/inc/XMLLineNumberingImportContext.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. @@ -124,3 +125,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/XMLNumberStylesImport.hxx b/xmloff/inc/XMLNumberStylesImport.hxx index 60c0ab0dda2d..29f279ee440e 100644 --- a/xmloff/inc/XMLNumberStylesImport.hxx +++ b/xmloff/inc/XMLNumberStylesImport.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 // _XMLOFF_NUMBERSTYLESIMPORT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/XMLPercentOrMeasurePropertyHandler.hxx b/xmloff/inc/XMLPercentOrMeasurePropertyHandler.hxx index ff132f7093d4..1d45876d57f3 100644 --- a/xmloff/inc/XMLPercentOrMeasurePropertyHandler.hxx +++ b/xmloff/inc/XMLPercentOrMeasurePropertyHandler.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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/XMLRectangleMembersHandler.hxx b/xmloff/inc/XMLRectangleMembersHandler.hxx index 3d4bdef99592..22a55e805e76 100644 --- a/xmloff/inc/XMLRectangleMembersHandler.hxx +++ b/xmloff/inc/XMLRectangleMembersHandler.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,5 @@ public: }; #endif // _XMLOFF_XMLRECTANGLEMEMBERSHANDLER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/XMLReplacementImageContext.hxx b/xmloff/inc/XMLReplacementImageContext.hxx index 3b07c4693033..2c391ba2c67f 100644 --- a/xmloff/inc/XMLReplacementImageContext.hxx +++ b/xmloff/inc/XMLReplacementImageContext.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,4 @@ public: #endif // _XMLOFF_XMLREPLACEMENTIMAGECONTEXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/XMLScriptContextFactory.hxx b/xmloff/inc/XMLScriptContextFactory.hxx index a4c3bcac8b82..156c8fcf4729 100644 --- a/xmloff/inc/XMLScriptContextFactory.hxx +++ b/xmloff/inc/XMLScriptContextFactory.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. @@ -65,3 +66,5 @@ public: }; #endif // _XMLOFF_XMLSCRIPTCONTEXTFACTORY_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/XMLScriptExportHandler.hxx b/xmloff/inc/XMLScriptExportHandler.hxx index 31a712660997..0ee6b8b6c23b 100644 --- a/xmloff/inc/XMLScriptExportHandler.hxx +++ b/xmloff/inc/XMLScriptExportHandler.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,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/XMLShapePropertySetContext.hxx b/xmloff/inc/XMLShapePropertySetContext.hxx index 84d11060cd27..2c9b1038ecc0 100644 --- a/xmloff/inc/XMLShapePropertySetContext.hxx +++ b/xmloff/inc/XMLShapePropertySetContext.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/inc/XMLStarBasicContextFactory.hxx b/xmloff/inc/XMLStarBasicContextFactory.hxx index 586ddc8383bb..b4fbb62618ef 100644 --- a/xmloff/inc/XMLStarBasicContextFactory.hxx +++ b/xmloff/inc/XMLStarBasicContextFactory.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. @@ -66,3 +67,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/XMLStarBasicExportHandler.hxx b/xmloff/inc/XMLStarBasicExportHandler.hxx index f15770dc24cc..56876e8d5a6e 100644 --- a/xmloff/inc/XMLStarBasicExportHandler.hxx +++ b/xmloff/inc/XMLStarBasicExportHandler.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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/XMLStringBufferImportContext.hxx b/xmloff/inc/XMLStringBufferImportContext.hxx index 6a43702f4e7e..89f87448ba49 100644 --- a/xmloff/inc/XMLStringBufferImportContext.hxx +++ b/xmloff/inc/XMLStringBufferImportContext.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. @@ -30,9 +31,7 @@ #include <xmloff/xmlictxt.hxx> -#ifndef _XMLOFF_XMLIMP_HXX_ #include <xmloff/xmlimp.hxx> -#endif #include <rtl/ustrbuf.hxx> @@ -69,3 +68,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/XMLTextColumnsContext.hxx b/xmloff/inc/XMLTextColumnsContext.hxx index 54a8992788d1..c8bc74ea1c87 100644 --- a/xmloff/inc/XMLTextColumnsContext.hxx +++ b/xmloff/inc/XMLTextColumnsContext.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,6 +46,7 @@ class XMLTextColumnsContext :public XMLElementPropertyContext const ::rtl::OUString sSeparatorLineVerticalAlignment; const ::rtl::OUString sIsAutomatic; const ::rtl::OUString sAutomaticDistance; + const ::rtl::OUString sSeparatorLineStyle; XMLTextColumnsArray_Impl *pColumns; @@ -77,3 +79,5 @@ public: #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/XMLTextColumnsExport.hxx b/xmloff/inc/XMLTextColumnsExport.hxx index 9236ad3da1d2..b108e1982b53 100644 --- a/xmloff/inc/XMLTextColumnsExport.hxx +++ b/xmloff/inc/XMLTextColumnsExport.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. @@ -42,6 +43,7 @@ class XMLTextColumnsExport const ::rtl::OUString sSeparatorLineVerticalAlignment; const ::rtl::OUString sIsAutomatic; const ::rtl::OUString sAutomaticDistance; + const ::rtl::OUString sSeparatorLineStyle; protected: @@ -56,3 +58,5 @@ public: #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/XMLTextColumnsPropertyHandler.hxx b/xmloff/inc/XMLTextColumnsPropertyHandler.hxx index 2cb014722765..4c949d225a08 100644 --- a/xmloff/inc/XMLTextColumnsPropertyHandler.hxx +++ b/xmloff/inc/XMLTextColumnsPropertyHandler.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. @@ -54,3 +55,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/XMLTextHeaderFooterContext.hxx b/xmloff/inc/XMLTextHeaderFooterContext.hxx index 06fd057954e5..e80bb576bc82 100644 --- a/xmloff/inc/XMLTextHeaderFooterContext.hxx +++ b/xmloff/inc/XMLTextHeaderFooterContext.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. @@ -28,9 +29,7 @@ #define _XMLOFF_TEXTHEADERFOOTERCONTEXT_HXX_ -#ifndef _XMLOFF_XMLICTXT_HXX_ #include <xmloff/xmlictxt.hxx> -#endif namespace com { namespace sun { namespace star { namespace text { class XTextCursor; } @@ -75,3 +74,5 @@ public: #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/anim.hxx b/xmloff/inc/anim.hxx index 5542e48792f9..2e5a1547efb4 100644 --- a/xmloff/inc/anim.hxx +++ b/xmloff/inc/anim.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. @@ -102,3 +103,4 @@ void SdXMLImplSetEffect( ::com::sun::star::presentation::AnimationEffect eEffect #endif // _XMLOFF_ANIM_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/animationexport.hxx b/xmloff/inc/animationexport.hxx index 80ba45252197..d14f74ad5d0a 100644 --- a/xmloff/inc/animationexport.hxx +++ b/xmloff/inc/animationexport.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. @@ -54,3 +55,4 @@ public: #endif // _XMLOFF_ANIMATIONEXPORT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/animationimport.hxx b/xmloff/inc/animationimport.hxx index de7e4cfcc1fd..f3e5b9456f02 100644 --- a/xmloff/inc/animationimport.hxx +++ b/xmloff/inc/animationimport.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,4 @@ public: #endif // _XMLOFF_ANIMATIONIMPORT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/animations.hxx b/xmloff/inc/animations.hxx index 12dedaf67bd2..b67fd8ea268b 100644 --- a/xmloff/inc/animations.hxx +++ b/xmloff/inc/animations.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. @@ -65,3 +66,4 @@ extern struct ImplAttributeNameConversion* getAnimationAttributeNamesConversionL #endif // _XMLOFF_ANIMATIONS_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/animimp.hxx b/xmloff/inc/animimp.hxx index 7e795e6021f8..a7a67f5b0d3a 100644 --- a/xmloff/inc/animimp.hxx +++ b/xmloff/inc/animimp.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,4 @@ public: #endif // _XMLOFF_ANIMIMP_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/forms/form_handler_factory.hxx b/xmloff/inc/forms/form_handler_factory.hxx index 8752b8384fef..8752b8384fef 100755..100644 --- a/xmloff/inc/forms/form_handler_factory.hxx +++ b/xmloff/inc/forms/form_handler_factory.hxx diff --git a/xmloff/inc/forms/property_handler.hxx b/xmloff/inc/forms/property_handler.hxx index d2675ba58ad0..d2675ba58ad0 100755..100644 --- a/xmloff/inc/forms/property_handler.hxx +++ b/xmloff/inc/forms/property_handler.hxx diff --git a/xmloff/inc/forms/property_ids.hxx b/xmloff/inc/forms/property_ids.hxx index 31004f2d9ff2..31004f2d9ff2 100755..100644 --- a/xmloff/inc/forms/property_ids.hxx +++ b/xmloff/inc/forms/property_ids.hxx diff --git a/xmloff/inc/functional.hxx b/xmloff/inc/functional.hxx new file mode 100644 index 000000000000..6d27da04f742 --- /dev/null +++ b/xmloff/inc/functional.hxx @@ -0,0 +1,30 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +#ifndef _XMLOFF_FUNCTIONAL_HXX +#define _XMLOFF_FUNCTIONAL_HXX + +#include <rtl/ustring.hxx> + +/* THIS HEADER IS DEPRECATED. USE comphelper/stl_types.hxx INSTEAD!!! */ + +/** @#file + * + * re-implement STL functors as needed + * + * The standard comparison operators from the STL cause warnings with + * several compilers about our sal_Bool (=unsigned char) being + * converted to bool (C++ bool). We wish to avoid that. + */ + +struct less_functor +{ + bool operator()(const ::rtl::OUString& x, + const ::rtl::OUString& y) const + { + return 0 != (x<y); + } +}; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/pch/precompiled_xmloff.cxx b/xmloff/inc/pch/precompiled_xmloff.cxx index 3a50f7fcdf79..31570f2a2bb1 100644 --- a/xmloff/inc/pch/precompiled_xmloff.cxx +++ b/xmloff/inc/pch/precompiled_xmloff.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. @@ -27,3 +28,4 @@ #include "precompiled_xmloff.hxx" +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/pch/precompiled_xmloff.hxx b/xmloff/inc/pch/precompiled_xmloff.hxx index fb541f48d73d..22f11be546ca 100644 --- a/xmloff/inc/pch/precompiled_xmloff.hxx +++ b/xmloff/inc/pch/precompiled_xmloff.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. @@ -450,7 +451,6 @@ #include "tools/gen.hxx" #include "tools/globname.hxx" #include "tools/inetdef.hxx" -#include "tools/list.hxx" #include "tools/ref.hxx" #include "tools/rtti.hxx" #include "tools/solar.h" @@ -470,11 +470,13 @@ #include "unotools/fontcvt.hxx" #include "tools/mapunit.hxx" -#include "vos/mutex.hxx" -#include "vos/ref.hxx" -#include "vos/refernce.hxx" +#include "osl/mutex.hxx" +#include "rtl/ref.hxx" +#include "salhelper/simplereferenceobject.hxx" #include "xmloff/dllapi.h" //---MARKER--- #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/txtflde.hxx b/xmloff/inc/txtflde.hxx index 190568c2ed1e..2c94703596ea 100644 --- a/xmloff/inc/txtflde.hxx +++ b/xmloff/inc/txtflde.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. @@ -544,3 +545,5 @@ private: #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx index 22519c378f59..597994ffab49 100644 --- a/xmloff/inc/txtfldi.hxx +++ b/xmloff/inc/txtfldi.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. @@ -1591,3 +1592,5 @@ protected: #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/txtlists.hxx b/xmloff/inc/txtlists.hxx index 6fe7c20443b7..b8735e8b7856 100644 --- a/xmloff/inc/txtlists.hxx +++ b/xmloff/inc/txtlists.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. @@ -65,13 +66,11 @@ class XMLTextListsHelper : private boost::noncopyable // keeping track of processed lists for import and export - // --> OD 2008-08-15 #i92811# - // - add optional parameter <sListStyleDefaultListId> + // Add optional parameter <sListStyleDefaultListId> (#i92811#) void KeepListAsProcessed( ::rtl::OUString sListId, ::rtl::OUString sListStyleName, ::rtl::OUString sContinueListId, ::rtl::OUString sListStyleDefaultListId = ::rtl::OUString() ); - // <-- sal_Bool IsListProcessed( const ::rtl::OUString sListId ) const; ::rtl::OUString GetListStyleOfProcessedList( @@ -83,11 +82,8 @@ class XMLTextListsHelper : private boost::noncopyable ::rtl::OUString GenerateNewListId() const; - // --> OD 2008-08-15 #i92811# - // provide list id for a certain list block for import + // Provide list id for a certain list block for import (#i92811#) ::rtl::OUString GetListIdForListBlock( XMLTextListBlockContext& rListBlock ); - // <-- - // keep track of continue list chain for export void StoreLastContinuingList( ::rtl::OUString sListId, @@ -157,12 +153,11 @@ class XMLTextListsHelper : private boost::noncopyable ::rtl::OUString msLastProcessedListId; ::rtl::OUString msListStyleOfLastProcessedList; - // --> OD 2008-08-15 #i92811# - // additional container for processed lists. - // map with <ListStyleName> as key and pair( <ListId, ListStyleDefaultListId> ) - // as value. + /* additional container for processed lists. + map with <ListStyleName> as key and pair( <ListId, ListStyleDefaultListId> ) + as value. (#i92811#) + */ tMapForLists* mpMapListIdToListStyleDefaultListId; - // <-- // container type to build up continue list chain: // map with <ListId> of master list as key and <ListId> of last list @@ -192,3 +187,5 @@ class XMLTextListsHelper : private boost::noncopyable }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/txtvfldi.hxx b/xmloff/inc/txtvfldi.hxx index fe14aaa5dd1e..fdd2383d12c2 100644 --- a/xmloff/inc/txtvfldi.hxx +++ b/xmloff/inc/txtvfldi.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. @@ -616,3 +617,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/unointerfacetouniqueidentifiermapper.hxx b/xmloff/inc/unointerfacetouniqueidentifiermapper.hxx index 2aeb9072851d..0baf405c6b2e 100644 --- a/xmloff/inc/unointerfacetouniqueidentifiermapper.hxx +++ b/xmloff/inc/unointerfacetouniqueidentifiermapper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ #ifndef __COMPHELPER_UNOINTERFACETOUNIQUEIDENTIFIERMAPPER__ #define __COMPHELPER_UNOINTERFACETOUNIQUEIDENTIFIERMAPPER__ @@ -50,3 +51,5 @@ private: } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xexptran.hxx b/xmloff/inc/xexptran.hxx index d28c50c61137..bd2c55d6557e 100644 --- a/xmloff/inc/xexptran.hxx +++ b/xmloff/inc/xexptran.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. @@ -199,3 +200,5 @@ public: #endif // _XEXPTRANSFORM_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmlehelp.hxx b/xmloff/inc/xmlehelp.hxx index 4b21c7427f5c..10595408092b 100644 --- a/xmloff/inc/xmlehelp.hxx +++ b/xmloff/inc/xmlehelp.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. @@ -49,3 +50,4 @@ public: #endif // _XMLOFF_XMLEHELP_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/DashStyle.hxx b/xmloff/inc/xmloff/DashStyle.hxx index f6e39df1d122..5d3d5b0615b4 100644 --- a/xmloff/inc/xmloff/DashStyle.hxx +++ b/xmloff/inc/xmloff/DashStyle.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. @@ -71,3 +72,5 @@ public: }; #endif // _XMLOFF_DASHSTYLE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/DocumentSettingsContext.hxx b/xmloff/inc/xmloff/DocumentSettingsContext.hxx index 62eaedb0e89f..e02a60fa689f 100644 --- a/xmloff/inc/xmloff/DocumentSettingsContext.hxx +++ b/xmloff/inc/xmloff/DocumentSettingsContext.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 @@ private: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/EnumPropertyHdl.hxx b/xmloff/inc/xmloff/EnumPropertyHdl.hxx index 9c3ba6ccd482..3e9d14d91f30 100644 --- a/xmloff/inc/xmloff/EnumPropertyHdl.hxx +++ b/xmloff/inc/xmloff/EnumPropertyHdl.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. @@ -50,3 +51,5 @@ public: }; #endif // _XMLOFF_ENUMPROPERTYHANDLER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/GradientStyle.hxx b/xmloff/inc/xmloff/GradientStyle.hxx index f4a2fd474225..89b3739312a7 100644 --- a/xmloff/inc/xmloff/GradientStyle.hxx +++ b/xmloff/inc/xmloff/GradientStyle.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. @@ -72,3 +73,5 @@ public: }; #endif // _XMLOFF_GRADIENTSTYLE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/HatchStyle.hxx b/xmloff/inc/xmloff/HatchStyle.hxx index 49d7296c3766..c6ff364ee4f6 100644 --- a/xmloff/inc/xmloff/HatchStyle.hxx +++ b/xmloff/inc/xmloff/HatchStyle.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. @@ -69,3 +70,5 @@ public: }; #endif // _XMLOFF_HATCHELEMENT_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/ImageStyle.hxx b/xmloff/inc/xmloff/ImageStyle.hxx index 704cc6eec37b..f35e1da77097 100644 --- a/xmloff/inc/xmloff/ImageStyle.hxx +++ b/xmloff/inc/xmloff/ImageStyle.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. @@ -58,3 +59,5 @@ private: }; #endif // _XMLOFF_IMAGESTYLE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/MarkerStyle.hxx b/xmloff/inc/xmloff/MarkerStyle.hxx index 5d2111ece2e3..11c214c7343e 100644 --- a/xmloff/inc/xmloff/MarkerStyle.hxx +++ b/xmloff/inc/xmloff/MarkerStyle.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. @@ -71,3 +72,5 @@ public: }; #endif // _XMLOFF_MARKERSTYLE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/NamedBoolPropertyHdl.hxx b/xmloff/inc/xmloff/NamedBoolPropertyHdl.hxx index 2973a7eae12a..712b269cd57e 100644 --- a/xmloff/inc/xmloff/NamedBoolPropertyHdl.hxx +++ b/xmloff/inc/xmloff/NamedBoolPropertyHdl.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 // _XMLOFF_NAMEDBOOLPROPERTYHANDLER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/PageMasterStyleMap.hxx b/xmloff/inc/xmloff/PageMasterStyleMap.hxx index 592949ca2b82..573d8836bafb 100644 --- a/xmloff/inc/xmloff/PageMasterStyleMap.hxx +++ b/xmloff/inc/xmloff/PageMasterStyleMap.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. @@ -164,9 +165,12 @@ #define CTF_PM_FTN_LINE_ADJUST (XML_PM_CTF_START + 0x0064) #define CTF_PM_FTN_LINE_DISTANCE (XML_PM_CTF_START + 0x0065) #define CTF_PM_FTN_DISTANCE (XML_PM_CTF_START + 0x0066) +#define CTF_PM_FTN_LINE_STYLE (XML_PM_CTF_START + 0x0067) extern const XMLPropertyMapEntry aXMLPageMasterStyleMap[]; extern const XMLPropertyMapEntry aXMLPageMasterHeaderImportStyleMap[]; extern const XMLPropertyMapEntry aXMLPageMasterFooterImportStyleMap[]; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/ProgressBarHelper.hxx b/xmloff/inc/xmloff/ProgressBarHelper.hxx index b89134f595a5..749ab46f8b82 100644 --- a/xmloff/inc/xmloff/ProgressBarHelper.hxx +++ b/xmloff/inc/xmloff/ProgressBarHelper.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. @@ -76,3 +77,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/PropertySetInfoHash.hxx b/xmloff/inc/xmloff/PropertySetInfoHash.hxx index a789b99912f2..802f2445c770 100644 --- a/xmloff/inc/xmloff/PropertySetInfoHash.hxx +++ b/xmloff/inc/xmloff/PropertySetInfoHash.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. @@ -63,3 +64,5 @@ inline bool PropertySetInfoHash::operator()( return memcmp( pId1, pId2, 16 * sizeof( sal_Int8 ) ) == 0; } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/PropertySetInfoKey.hxx b/xmloff/inc/xmloff/PropertySetInfoKey.hxx index 725f5dff060d..744b0bbac826 100644 --- a/xmloff/inc/xmloff/PropertySetInfoKey.hxx +++ b/xmloff/inc/xmloff/PropertySetInfoKey.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. @@ -65,3 +66,5 @@ inline PropertySetInfoKey::PropertySetInfoKey( } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/SchXMLExportHelper.hxx b/xmloff/inc/xmloff/SchXMLExportHelper.hxx index bf60d44d63fd..45206492a50e 100644 --- a/xmloff/inc/xmloff/SchXMLExportHelper.hxx +++ b/xmloff/inc/xmloff/SchXMLExportHelper.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. @@ -71,3 +72,5 @@ private: }; #endif // _XMLOFF_SCH_XMLEXPORTHELPER_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/SchXMLImportHelper.hxx b/xmloff/inc/xmloff/SchXMLImportHelper.hxx index afc637aead74..ea4c459148ad 100644 --- a/xmloff/inc/xmloff/SchXMLImportHelper.hxx +++ b/xmloff/inc/xmloff/SchXMLImportHelper.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. @@ -161,3 +162,5 @@ public: }; #endif // _XMLOFF_SCH_XMLIMPORTHELPER_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/SettingsExportHelper.hxx b/xmloff/inc/xmloff/SettingsExportHelper.hxx index 63c7d9f5df54..6d42f5df0f8a 100644 --- a/xmloff/inc/xmloff/SettingsExportHelper.hxx +++ b/xmloff/inc/xmloff/SettingsExportHelper.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. @@ -109,3 +110,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/SinglePropertySetInfoCache.hxx b/xmloff/inc/xmloff/SinglePropertySetInfoCache.hxx index e419817d5480..4458417a125b 100644 --- a/xmloff/inc/xmloff/SinglePropertySetInfoCache.hxx +++ b/xmloff/inc/xmloff/SinglePropertySetInfoCache.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. @@ -30,10 +31,10 @@ #include <com/sun/star/beans/XPropertySet.hpp> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <xmloff/PropertySetInfoHash.hxx> -typedef std::hash_map +typedef boost::unordered_map < PropertySetInfoKey, sal_Bool, @@ -77,3 +78,5 @@ inline sal_Bool SinglePropertySetInfoCache::hasProperty( } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/VisAreaContext.hxx b/xmloff/inc/xmloff/VisAreaContext.hxx index 80a0e8c75659..cdb04a90c802 100644 --- a/xmloff/inc/xmloff/VisAreaContext.hxx +++ b/xmloff/inc/xmloff/VisAreaContext.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. @@ -67,3 +68,5 @@ private: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/VisAreaExport.hxx b/xmloff/inc/xmloff/VisAreaExport.hxx index 5b8206387435..9a98db5a04f8 100644 --- a/xmloff/inc/xmloff/VisAreaExport.hxx +++ b/xmloff/inc/xmloff/VisAreaExport.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 +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/WordWrapPropertyHdl.hxx b/xmloff/inc/xmloff/WordWrapPropertyHdl.hxx index 0a0095d79f17..a39b5b55878f 100644 --- a/xmloff/inc/xmloff/WordWrapPropertyHdl.hxx +++ b/xmloff/inc/xmloff/WordWrapPropertyHdl.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 @@ public: }; #endif // _XMLOFF_NAMEDBOOLPROPERTYHANDLER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/XMLBase64ImportContext.hxx b/xmloff/inc/xmloff/XMLBase64ImportContext.hxx index e938edcebea8..e94e7ae18371 100644 --- a/xmloff/inc/xmloff/XMLBase64ImportContext.hxx +++ b/xmloff/inc/xmloff/XMLBase64ImportContext.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_XMLBASE64IMPORTCONTEXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/XMLCharContext.hxx b/xmloff/inc/xmloff/XMLCharContext.hxx index a649f88b77c6..6ced863e9391 100644 --- a/xmloff/inc/xmloff/XMLCharContext.hxx +++ b/xmloff/inc/xmloff/XMLCharContext.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. @@ -69,3 +70,5 @@ public: }; // --------------------------------------------------------------------- #endif // INCLUDED__XMLOFF_CHARCONTEXT_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/XMLConstantsPropertyHandler.hxx b/xmloff/inc/xmloff/XMLConstantsPropertyHandler.hxx index 591447ba57d5..5e3024909b26 100644 --- a/xmloff/inc/xmloff/XMLConstantsPropertyHandler.hxx +++ b/xmloff/inc/xmloff/XMLConstantsPropertyHandler.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. @@ -67,3 +68,5 @@ public: }; #endif // _XMLOFF_XMLCONSTANTSPROPERTYHANDLER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/XMLEmbeddedObjectExportFilter.hxx b/xmloff/inc/xmloff/XMLEmbeddedObjectExportFilter.hxx index 179f74112dfe..2c9af8b4c400 100644 --- a/xmloff/inc/xmloff/XMLEmbeddedObjectExportFilter.hxx +++ b/xmloff/inc/xmloff/XMLEmbeddedObjectExportFilter.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. @@ -90,3 +91,5 @@ public: }; #endif // _XMLOFF_XMLEMBEDDEDOBJECTEXPORTFILTER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/XMLEventExport.hxx b/xmloff/inc/xmloff/XMLEventExport.hxx index b0ec63b45b35..991ec360c55b 100644 --- a/xmloff/inc/xmloff/XMLEventExport.hxx +++ b/xmloff/inc/xmloff/XMLEventExport.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. @@ -137,3 +138,5 @@ private: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/XMLEventsImportContext.hxx b/xmloff/inc/xmloff/XMLEventsImportContext.hxx index 851fd2154eb3..7d0f47d6e4a0 100644 --- a/xmloff/inc/xmloff/XMLEventsImportContext.hxx +++ b/xmloff/inc/xmloff/XMLEventsImportContext.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. @@ -136,3 +137,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/XMLFilterServiceNames.h b/xmloff/inc/xmloff/XMLFilterServiceNames.h index 525143cd2b09..627f3bbcda9b 100644..100755 --- a/xmloff/inc/xmloff/XMLFilterServiceNames.h +++ b/xmloff/inc/xmloff/XMLFilterServiceNames.h @@ -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 @@ #define XML_EXPORT_FILTER_CHART "com.sun.star.comp.Chart.XMLOasisExporter" #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/XMLFontAutoStylePool.hxx b/xmloff/inc/xmloff/XMLFontAutoStylePool.hxx index b0ae5eed1e0d..6016f15b0c07 100644 --- a/xmloff/inc/xmloff/XMLFontAutoStylePool.hxx +++ b/xmloff/inc/xmloff/XMLFontAutoStylePool.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. @@ -73,3 +74,5 @@ public: }; #endif // _XMLOFF_XMLFONTAUTOSTYLEPOOL_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/XMLFontStylesContext.hxx b/xmloff/inc/xmloff/XMLFontStylesContext.hxx index 2e9c58e50e17..9813ab708302 100644 --- a/xmloff/inc/xmloff/XMLFontStylesContext.hxx +++ b/xmloff/inc/xmloff/XMLFontStylesContext.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. @@ -30,13 +31,9 @@ #include "sal/config.h" #include "xmloff/dllapi.h" -#ifndef __SGI_STL_VECTOR #include <vector> -#endif -#ifndef _XMLOFF_XMLSTYLE_HXX_ #include <xmloff/xmlstyle.hxx> -#endif struct XMLPropertyState; class SvXMLTokenMap; @@ -97,3 +94,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/XMLGraphicsDefaultStyle.hxx b/xmloff/inc/xmloff/XMLGraphicsDefaultStyle.hxx index 88d9f161013e..6a1731f84529 100644 --- a/xmloff/inc/xmloff/XMLGraphicsDefaultStyle.hxx +++ b/xmloff/inc/xmloff/XMLGraphicsDefaultStyle.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 // _XMLOFF_XMLGRAPHICSDEFAULTSTYLE_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/XMLPageExport.hxx b/xmloff/inc/xmloff/XMLPageExport.hxx index 88eb74dfd54c..9b9bd2781e75 100644 --- a/xmloff/inc/xmloff/XMLPageExport.hxx +++ b/xmloff/inc/xmloff/XMLPageExport.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. @@ -32,9 +33,7 @@ #include "xmloff/dllapi.h" #include "sal/types.h" #include <rtl/ustring.hxx> -#ifndef __SGI_STL_VECTOR #include <vector> -#endif #include <xmloff/attrlist.hxx> #include <xmloff/uniref.hxx> #include <com/sun/star/container/XIndexAccess.hpp> @@ -112,3 +111,4 @@ public: #endif // _XMLOFF_XMLTEXTMASTERPAGEEXPORT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/XMLSettingsExportContext.hxx b/xmloff/inc/xmloff/XMLSettingsExportContext.hxx index d3e0b6a8c5ee..aea52317e90a 100644 --- a/xmloff/inc/xmloff/XMLSettingsExportContext.hxx +++ b/xmloff/inc/xmloff/XMLSettingsExportContext.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 @@ namespace xmloff //........................................................................ #endif // XML_SETTINGS_EXPORT_CONTEXT_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/XMLShapeStyleContext.hxx b/xmloff/inc/xmloff/XMLShapeStyleContext.hxx index f14d3af5c91d..de35727e7a5c 100644 --- a/xmloff/inc/xmloff/XMLShapeStyleContext.hxx +++ b/xmloff/inc/xmloff/XMLShapeStyleContext.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. @@ -74,3 +75,5 @@ public: }; #endif // _XMLOFF_XMLSHAPESTYLECONTEXT_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/XMLStringVector.hxx b/xmloff/inc/xmloff/XMLStringVector.hxx index fe3181a8b530..3f63fc96c7d8 100644 --- a/xmloff/inc/xmloff/XMLStringVector.hxx +++ b/xmloff/inc/xmloff/XMLStringVector.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. @@ -37,3 +38,4 @@ typedef ::std::vector < ::rtl::OUString> XMLStringVector; #endif // _XMLOFF_XMLSTRINGVECTOR_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/XMLTextListAutoStylePool.hxx b/xmloff/inc/xmloff/XMLTextListAutoStylePool.hxx index 0b3e631ae095..b1dbb673c1a5 100644 --- a/xmloff/inc/xmloff/XMLTextListAutoStylePool.hxx +++ b/xmloff/inc/xmloff/XMLTextListAutoStylePool.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. @@ -82,3 +83,5 @@ public: #endif // _XMLOFF_XMLTEXTLISTAUTOSTYLEPOOL_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/XMLTextMasterPageContext.hxx b/xmloff/inc/xmloff/XMLTextMasterPageContext.hxx index ff51c96f0092..67c3e99698e7 100644 --- a/xmloff/inc/xmloff/XMLTextMasterPageContext.hxx +++ b/xmloff/inc/xmloff/XMLTextMasterPageContext.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. @@ -31,9 +32,7 @@ #include "xmloff/dllapi.h" #include "sal/types.h" -#ifndef _XMLOFF_XMLSTYLE_HXX_ #include <xmloff/xmlstyle.hxx> -#endif namespace com { namespace sun { namespace star { namespace style { class XStyle; } @@ -90,3 +89,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/XMLTextMasterPageExport.hxx b/xmloff/inc/xmloff/XMLTextMasterPageExport.hxx index 32d6c15e4d98..38052c59fc4a 100644 --- a/xmloff/inc/xmloff/XMLTextMasterPageExport.hxx +++ b/xmloff/inc/xmloff/XMLTextMasterPageExport.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. @@ -69,3 +70,4 @@ public: #endif // _XMLOFF_XMLTEXTMASTERPAGEEXPORT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/XMLTextMasterStylesContext.hxx b/xmloff/inc/xmloff/XMLTextMasterStylesContext.hxx index 8682321d8a6a..064beff7aede 100644 --- a/xmloff/inc/xmloff/XMLTextMasterStylesContext.hxx +++ b/xmloff/inc/xmloff/XMLTextMasterStylesContext.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,4 @@ public: #endif // _XMLOFF_XMLTEXTMASTERSTYLECONTEXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/XMLTextShapeImportHelper.hxx b/xmloff/inc/xmloff/XMLTextShapeImportHelper.hxx index 96c17334dfcd..7dd3526ec93c 100644 --- a/xmloff/inc/xmloff/XMLTextShapeImportHelper.hxx +++ b/xmloff/inc/xmloff/XMLTextShapeImportHelper.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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/XMLTextShapeStyleContext.hxx b/xmloff/inc/xmloff/XMLTextShapeStyleContext.hxx index b7431cf9e15a..246491d2484d 100644 --- a/xmloff/inc/xmloff/XMLTextShapeStyleContext.hxx +++ b/xmloff/inc/xmloff/XMLTextShapeStyleContext.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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/XMLTextTableContext.hxx b/xmloff/inc/xmloff/XMLTextTableContext.hxx index e3d7e77087bb..81112f926035 100644 --- a/xmloff/inc/xmloff/XMLTextTableContext.hxx +++ b/xmloff/inc/xmloff/XMLTextTableContext.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,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/animexp.hxx b/xmloff/inc/xmloff/animexp.hxx index 6fc0a6b5b089..7726d5a411b5 100644 --- a/xmloff/inc/xmloff/animexp.hxx +++ b/xmloff/inc/xmloff/animexp.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. @@ -50,3 +51,4 @@ public: #endif // _XMLOFF_ANIMEXP_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/attrlist.hxx b/xmloff/inc/xmloff/attrlist.hxx index dedd2d22656a..33a2fcb8184b 100644 --- a/xmloff/inc/xmloff/attrlist.hxx +++ b/xmloff/inc/xmloff/attrlist.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. @@ -91,3 +92,5 @@ public: #endif // _XMLOFF_ATTRLIST_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/contextid.hxx b/xmloff/inc/xmloff/contextid.hxx index 2b96c91187ba..e4fffcd4cced 100644 --- a/xmloff/inc/xmloff/contextid.hxx +++ b/xmloff/inc/xmloff/contextid.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 @@ #define CTF_ALIEN_ATTRIBUTE_IMPORT 0x00007fff #endif // _XMLOFF_CONTEXTID_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/controlpropertyhdl.hxx b/xmloff/inc/xmloff/controlpropertyhdl.hxx index ae990c3771ae..ffb636cd7163 100644 --- a/xmloff/inc/xmloff/controlpropertyhdl.hxx +++ b/xmloff/inc/xmloff/controlpropertyhdl.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. @@ -31,7 +32,7 @@ #include "sal/config.h" #include "xmloff/dllapi.h" #include <xmloff/prhdlfac.hxx> -#include <vos/ref.hxx> +#include <rtl/ref.hxx> #include <rtl/ustring.hxx> #include <xmloff/xmlexppr.hxx> #include <xmloff/XMLConstantsPropertyHandler.hxx> @@ -141,3 +142,4 @@ namespace xmloff #endif // _XMLOFF_FORMS_CONTROLPROPERTYHDL_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/dllapi.h b/xmloff/inc/xmloff/dllapi.h index e1802baf6461..d89653cccb71 100644..100755 --- a/xmloff/inc/xmloff/dllapi.h +++ b/xmloff/inc/xmloff/dllapi.h @@ -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 @@ #endif #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/families.hxx b/xmloff/inc/xmloff/families.hxx index 65f1f6d8cc6a..2751efa81770 100644 --- a/xmloff/inc/xmloff/families.hxx +++ b/xmloff/inc/xmloff/families.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. @@ -114,3 +115,5 @@ #define XML_STYLE_FAMILY_CONTROL_PREFIX "ctrl" #endif // _XMLOFF_FAMILIES_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/formlayerexport.hxx b/xmloff/inc/xmloff/formlayerexport.hxx index 476b2f9d8272..f628dcffd869 100644 --- a/xmloff/inc/xmloff/formlayerexport.hxx +++ b/xmloff/inc/xmloff/formlayerexport.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. @@ -30,12 +31,12 @@ #include "sal/config.h" #include "xmloff/dllapi.h" -#include <vos/refernce.hxx> #include <com/sun/star/drawing/XDrawPage.hpp> #include <com/sun/star/container/XIndexAccess.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/frame/XModel.hpp> -#include <vos/ref.hxx> +#include <rtl/ref.hxx> +#include <salhelper/simplereferenceobject.hxx> #include <xmloff/xmlexppr.hxx> namespace com { namespace sun { namespace star { namespace awt { @@ -57,7 +58,7 @@ namespace xmloff /** provides functionallity for exporting a complete form layer. */ class XMLOFF_DLLPUBLIC OFormLayerXMLExport - :public ::vos::OReference + :public ::salhelper::SimpleReferenceObject { protected: /// our export context @@ -207,3 +208,4 @@ namespace xmloff #endif // _XMLOFF_FORMLAYEREXPORT_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/formlayerimport.hxx b/xmloff/inc/xmloff/formlayerimport.hxx index 37aa8e440444..5f814f6638fc 100644 --- a/xmloff/inc/xmloff/formlayerimport.hxx +++ b/xmloff/inc/xmloff/formlayerimport.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. @@ -30,11 +31,11 @@ #include "sal/config.h" #include "xmloff/dllapi.h" -#include <vos/refernce.hxx> #include <com/sun/star/drawing/XDrawPage.hpp> #include <com/sun/star/xml/sax/XAttributeList.hpp> #include <com/sun/star/beans/XPropertySet.hpp> -#include <vos/ref.hxx> +#include <rtl/ref.hxx> +#include <salhelper/simplereferenceobject.hxx> #include <xmloff/xmlimppr.hxx> class SvXMLImport; @@ -54,7 +55,7 @@ namespace xmloff /** allows you to import a <form:form> element */ class XMLOFF_DLLPUBLIC OFormLayerXMLImport - :public ::vos::OReference + :public ::salhelper::SimpleReferenceObject { OFormLayerXMLImport_Impl* m_pImpl; @@ -164,3 +165,4 @@ namespace xmloff #endif // _XMLOFF_FORMLAYERIMPORT_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/formsimp.hxx b/xmloff/inc/xmloff/formsimp.hxx index c2bbdc97a98f..3fadb7195e51 100644 --- a/xmloff/inc/xmloff/formsimp.hxx +++ b/xmloff/inc/xmloff/formsimp.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. @@ -47,3 +48,4 @@ public: #endif // _XMLOFF_ANIMIMP_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/functional.hxx b/xmloff/inc/xmloff/functional.hxx index 7928930f07fe..c7b4938d2925 100644 --- a/xmloff/inc/xmloff/functional.hxx +++ b/xmloff/inc/xmloff/functional.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,4 @@ struct less_functor #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/i18nmap.hxx b/xmloff/inc/xmloff/i18nmap.hxx index 331c8bc5a758..2f56e26bf5f8 100644 --- a/xmloff/inc/xmloff/i18nmap.hxx +++ b/xmloff/inc/xmloff/i18nmap.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. @@ -67,3 +68,4 @@ public: #endif // _XMLOFF_I18NMAP_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/maptype.hxx b/xmloff/inc/xmloff/maptype.hxx index c956a9d77141..a4afdd020887 100644 --- a/xmloff/inc/xmloff/maptype.hxx +++ b/xmloff/inc/xmloff/maptype.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. @@ -72,3 +73,5 @@ struct XMLPropertyState }; #endif // _XMLOFF_PROPMAPPINGTYPES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/nmspmap.hxx b/xmloff/inc/xmloff/nmspmap.hxx index 6869820d82b1..e56983a58df8 100644 --- a/xmloff/inc/xmloff/nmspmap.hxx +++ b/xmloff/inc/xmloff/nmspmap.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. @@ -32,11 +33,9 @@ #include "xmloff/dllapi.h" #include "sal/types.h" #include <rtl/ustring.hxx> -#include <hash_map> -#ifndef __SGI_STL_MAP +#include <boost/unordered_map.hpp> #include <map> -#endif -#include <vos/ref.hxx> +#include <rtl/ref.hxx> #include <cppuhelper/weak.hxx> #include <limits.h> @@ -92,9 +91,9 @@ struct QNamePairEq } }; -typedef ::std::hash_map < QNamePair, ::rtl::OUString, QNamePairHash, QNamePairEq > QNameCache; -typedef ::std::hash_map < ::rtl::OUString, ::vos::ORef <NameSpaceEntry >, rtl::OUStringHash, OUStringEqFunc > NameSpaceHash; -typedef ::std::map < sal_uInt16, ::vos::ORef < NameSpaceEntry >, uInt32lt > NameSpaceMap; +typedef ::boost::unordered_map < QNamePair, ::rtl::OUString, QNamePairHash, QNamePairEq > QNameCache; +typedef ::boost::unordered_map < ::rtl::OUString, ::rtl::Reference <NameSpaceEntry >, rtl::OUStringHash, OUStringEqFunc > NameSpaceHash; +typedef ::std::map < sal_uInt16, ::rtl::Reference < NameSpaceEntry >, uInt32lt > NameSpaceMap; class XMLOFF_DLLPUBLIC SvXMLNamespaceMap { @@ -183,3 +182,5 @@ public: }; #endif // _XMLOFF_NMSPMAP_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/numehelp.hxx b/xmloff/inc/xmloff/numehelp.hxx index bf0b6d6c6113..f6eeeed55877 100644 --- a/xmloff/inc/xmloff/numehelp.hxx +++ b/xmloff/inc/xmloff/numehelp.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. @@ -34,9 +35,7 @@ #include <com/sun/star/frame/XModel.hpp> #include <com/sun/star/util/XNumberFormatsSupplier.hpp> -#ifndef __SGI_STL_SET #include <set> -#endif class SvXMLExport; namespace rtl @@ -127,3 +126,4 @@ public : #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/odffields.hxx b/xmloff/inc/xmloff/odffields.hxx index 2be06b578acd..ae2c78ddc59f 100644 --- a/xmloff/inc/xmloff/odffields.hxx +++ b/xmloff/inc/xmloff/odffields.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. @@ -6,9 +7,6 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: $ - * $Revision: $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -53,4 +51,11 @@ #define ODF_PAGEREF "vnd.oasis.opendocument.field.PAGEREF" +#define ODF_UNHANDLED "vnd.oasis.opendocument.field.UNHANDLED" +#define ODF_OLE_PARAM "vnd.oasis.opendocument.field.ole" +#define ODF_ID_PARAM "vnd.oasis.opendocument.field.id" +#define ODF_CODE_PARAM "vnd.oasis.opendocument.field.code" + #endif /* _ODFFIELDS_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/prhdlfac.hxx b/xmloff/inc/xmloff/prhdlfac.hxx index 162c95642351..c13d43654dea 100644 --- a/xmloff/inc/xmloff/prhdlfac.hxx +++ b/xmloff/inc/xmloff/prhdlfac.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. @@ -32,9 +33,7 @@ #include "xmloff/dllapi.h" #include "sal/types.h" -#ifndef __SGI_STL_MAP #include <map> -#endif #include <xmloff/uniref.hxx> #include <xmloff/xmlprhdl.hxx> @@ -109,3 +108,5 @@ private: }; #endif // _XMLOFF_PROPERTYHANDLERFACTORY_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/prstylei.hxx b/xmloff/inc/xmloff/prstylei.hxx index 8dfe1dfaddaf..d777206da2a2 100644 --- a/xmloff/inc/xmloff/prstylei.hxx +++ b/xmloff/inc/xmloff/prstylei.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. @@ -31,12 +32,8 @@ #include "xmloff/dllapi.h" #include "sal/types.h" #include <com/sun/star/style/XStyle.hpp> -#ifndef __SGI_STL_VECTOR #include <vector> -#endif -#ifndef _XMLOFF_XMLSTYLE_HXX_ #include <xmloff/xmlstyle.hxx> -#endif struct XMLPropertyState; class SvXMLStylesContext; @@ -107,3 +104,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/shapeexport.hxx b/xmloff/inc/xmloff/shapeexport.hxx index e583a208fd83..fd97c522f257 100644 --- a/xmloff/inc/xmloff/shapeexport.hxx +++ b/xmloff/inc/xmloff/shapeexport.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. @@ -199,11 +200,6 @@ private: const rtl::OUString msStartShape; const rtl::OUString msEndShape; const rtl::OUString msOnClick; -#ifdef ISSUE66550_HLINK_FOR_SHAPES - const rtl::OUString msOnAction; - const rtl::OUString msAction; - const rtl::OUString msURL; -#endif const rtl::OUString msEventType; const rtl::OUString msPresentation; const rtl::OUString msMacroName; @@ -340,3 +336,5 @@ public: #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/shapeimport.hxx b/xmloff/inc/xmloff/shapeimport.hxx index 4e97c24e720f..80e4f861cfbe 100644 --- a/xmloff/inc/xmloff/shapeimport.hxx +++ b/xmloff/inc/xmloff/shapeimport.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,6 +44,7 @@ #include "xmloff/table/XMLTableImport.hxx" #include <basegfx/vector/b3dvector.hxx> +#include <vector> class SvXMLImport; class SvXMLImportContext; @@ -189,8 +191,8 @@ class SdXML3DLightContext: public SvXMLImportContext // local parameters which need to be read Color maDiffuseColor; ::basegfx::B3DVector maDirection; - sal_Bool mbEnabled; - sal_Bool mbSpecular; + bool mbEnabled; + bool mbSpecular; public: SdXML3DLightContext( @@ -208,7 +210,7 @@ public: ////////////////////////////////////////////////////////////////////////////// -DECLARE_LIST(Imp3DLightList, SdXML3DLightContext*) +typedef ::std::vector< SdXML3DLightContext* > Imp3DLightList; class SdXML3DSceneAttributesHelper { @@ -228,7 +230,7 @@ protected: sal_Int32 mnShadowSlant; com::sun::star::drawing::ShadeMode mxShadeMode; Color maAmbientColor; - sal_Bool mbLightingMode; + bool mbLightingMode; ::basegfx::B3DVector maVRP; ::basegfx::B3DVector maVPN; @@ -437,3 +439,5 @@ public: }; #endif // _XMLOFF_SHAPEIMPORT_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/styleexp.hxx b/xmloff/inc/xmloff/styleexp.hxx index 10e9db410430..3931c76146ef 100644 --- a/xmloff/inc/xmloff/styleexp.hxx +++ b/xmloff/inc/xmloff/styleexp.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. @@ -32,9 +33,6 @@ #include <rtl/ustring.hxx> #include <com/sun/star/uno/Reference.h> -#ifndef _VCL_MAPUNIT_HXX -//#include <tools/mapunit.hxx> -#endif #include <xmloff/uniref.hxx> namespace com { namespace sun { namespace star @@ -47,10 +45,10 @@ namespace com { namespace sun { namespace star { class XPropertySet; } - namespace container //#outline level,add by zhaojianwei + namespace container { class XNameAccess; - } //<-end,zhaojianwei + } } } } @@ -67,7 +65,7 @@ protected: const ::rtl::OUString sIsAutoUpdate; const ::rtl::OUString sFollowStyle; const ::rtl::OUString sNumberingStyleName; - const ::rtl::OUString sOutlineLevel; //#outline level,add by zhaojianwei + const ::rtl::OUString sOutlineLevel; SvXMLExport& GetExport() { return rExport; } const SvXMLExport& GetExport() const { return rExport; } @@ -80,19 +78,13 @@ private: protected: - //virtual sal_Bool exportStyle( //#outline level,zhaojianwei - // const ::com::sun::star::uno::Reference< - // ::com::sun::star::style::XStyle > & rStyle, - // const ::rtl::OUString& rXMLFamily, - // const UniReference < SvXMLExportPropertyMapper >& rPropMapper, - // const ::rtl::OUString* pPrefix = 0L ); - virtual sal_Bool exportStyle( //add by zhaojianwei + virtual sal_Bool exportStyle( const ::com::sun::star::uno::Reference< ::com::sun::star::style::XStyle > & rStyle, const ::rtl::OUString& rXMLFamily, const UniReference < SvXMLExportPropertyMapper >& rPropMapper, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > & xStyles, - const ::rtl::OUString* pPrefix = 0L ); //<-end,zhaojianwei + const ::rtl::OUString* pPrefix = 0L ); virtual void exportStyleAttributes( const ::com::sun::star::uno::Reference< @@ -140,3 +132,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/table/XMLTableExport.hxx b/xmloff/inc/xmloff/table/XMLTableExport.hxx index 86906a91ec06..8b51d1e30c70 100644 --- a/xmloff/inc/xmloff/table/XMLTableExport.hxx +++ b/xmloff/inc/xmloff/table/XMLTableExport.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. @@ -110,3 +111,5 @@ private: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/table/XMLTableImport.hxx b/xmloff/inc/xmloff/table/XMLTableImport.hxx index 42d3cb52b479..3479129e66cb 100644 --- a/xmloff/inc/xmloff/table/XMLTableImport.hxx +++ b/xmloff/inc/xmloff/table/XMLTableImport.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. @@ -76,3 +77,5 @@ private: }; #endif /*XMLTABLEIMPORT_HXX_*/ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/txtimp.hxx b/xmloff/inc/xmloff/txtimp.hxx index 20be794308a3..e625cb66b0d4 100644 --- a/xmloff/inc/xmloff/txtimp.hxx +++ b/xmloff/inc/xmloff/txtimp.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. @@ -37,7 +38,6 @@ #include <boost/utility.hpp> #include <boost/shared_ptr.hpp> -#include <tools/list.hxx> #include <xmloff/xmltkmap.hxx> // xmloff/functional.hxx is obsolete and should be replaced by its comphelper @@ -45,11 +45,7 @@ #include <comphelper/stl_types.hxx> #include <xmloff/uniref.hxx> - -// --> OD 2008-04-25 #refactorlists# class XMLTextListsHelper; -// <-- - class SvXMLImportContext; class SvXMLTokenMap; class SvXMLImportPropertyMapper; @@ -289,10 +285,8 @@ enum XMLTextListBlockAttrTokens XML_TOK_TEXT_LIST_BLOCK_XMLID, XML_TOK_TEXT_LIST_BLOCK_STYLE_NAME, XML_TOK_TEXT_LIST_BLOCK_CONTINUE_NUMBERING, - // --> OD 2008-04-22 #refactorlists# XML_TOK_TEXT_LIST_BLOCK_ID, XML_TOK_TEXT_LIST_BLOCK_CONTINUE_LIST, - // <-- XML_TOK_TEXT_LIST_BLOCK_END=XML_TOK_UNKNOWN }; @@ -380,9 +374,6 @@ enum XMLTextType #define XML_TEXT_RENAME_TYPE_FRAME 10 #define XML_TEXT_RENAME_TYPE_TABLE 20 -// create type for section list, XMLSectionList_Impl -DECLARE_LIST( XMLSectionList_Impl, XMLSectionImportContext* ) - class XMLOFF_DLLPUBLIC XMLTextImportHelper : public UniRefBase, private boost::noncopyable { @@ -462,8 +453,6 @@ public: bool IsOrganizerMode() const; bool IsProgress() const; - XMLSectionList_Impl & GetSectionList(); - ::rtl::OUString ConvertStarFonts( const ::rtl::OUString& rChars, const ::rtl::OUString& rStyleName, sal_uInt8& rFlags, @@ -481,9 +470,8 @@ public: void InsertTextContent( ::com::sun::star::uno::Reference < ::com::sun::star::text::XTextContent > & xContent); - // --> OD 2007-07-25 #i73509# - add parameter <bOutlineLevelAttrFound> - // --> OD 2007-08-17 #i80724# - // add parameter <bSetListAttrs> in order to suppress the handling of the list attributes + // Add parameter <bOutlineLevelAttrFound> (#i73509#) + // Add parameter <bSetListAttrs> in order to suppress the handling of the list attributes (#i80724#) ::rtl::OUString SetStyleAndAttrs( SvXMLImport& rImport, const ::com::sun::star::uno::Reference < @@ -493,22 +481,19 @@ public: sal_Bool bOutlineLevelAttrFound = sal_False, sal_Int8 nOutlineLevel = -1, sal_Bool bSetListAttrs = sal_True ); - // <-- /** Find a suitable name for the given outline level. * If rStyleName is empty, change it to a previously used or default style * name for that level. Otherwise, leave rStyleName unmodified. */ - // --> OD 2006-10-12 #i69629# - adjust 2nd parameter + // Adjust 2nd parameter (#i69629#) void FindOutlineStyleName( ::rtl::OUString& rStyleName, sal_Int8 nOutlineLevel ); - // <-- - // --> OD 2006-10-12 #i69629# - // change method name to reflect change of data structure + // Change method name to reflect change of data structure (#i69629#) void AddOutlineStyleCandidate( const sal_Int8 nOutlineLevel, const ::rtl::OUString& rStyleName ); - // <-- + void SetOutlineStyles( sal_Bool bSetEmpty ); void SetHyperlink( @@ -741,9 +726,7 @@ public: SvXMLImport & GetXMLImport(); - // --> OD 2008-04-25 #refactorlists# XMLTextListsHelper & GetTextListHelper(); - // <-- // forwards to TextListHelper; these are used in many places /// push a list context on the list context stack @@ -756,3 +739,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/txtimppr.hxx b/xmloff/inc/xmloff/txtimppr.hxx index ca2446a01352..1a1394b87386 100644 --- a/xmloff/inc/xmloff/txtimppr.hxx +++ b/xmloff/inc/xmloff/txtimppr.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,7 +58,7 @@ class XMLOFF_DLLPUBLIC XMLTextImportPropertyMapper : public SvXMLImportPropertyM XMLPropertyState** ppNewFontCharSet ) const; protected: - virtual sal_Bool handleSpecialItem( + virtual bool handleSpecialItem( XMLPropertyState& rProperty, ::std::vector< XMLPropertyState >& rProperties, const ::rtl::OUString& rValue, @@ -79,3 +80,5 @@ public: }; #endif // _XMLOFF_XMLIMPPR_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/txtparae.hxx b/xmloff/inc/xmloff/txtparae.hxx index 01907415a024..c354fc5fbcaa 100644 --- a/xmloff/inc/xmloff/txtparae.hxx +++ b/xmloff/inc/xmloff/txtparae.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. @@ -39,12 +40,9 @@ #include <xmloff/xmltoken.hxx> #include <xmloff/SinglePropertySetInfoCache.hxx> #include <xmloff/XMLStringVector.hxx> - -// --> OD 2008-04-25 #refactorlists# -class XMLTextListsHelper; #include <vector> -// <-- +class XMLTextListsHelper; class SvXMLExport; class SvXMLAutoStylePoolP; class XMLTextFieldExport; @@ -52,7 +50,6 @@ class OUStrings_Impl; class OUStringsSort_Impl; class XMLTextNumRuleInfo; class XMLTextListAutoStylePool; -class SvLongs; class XMLSectionExport; class XMLIndexMarkExport; class XMLRedlineExport; @@ -91,9 +88,6 @@ class XMLOFF_DLLPUBLIC XMLTextParagraphExport : public XMLStyleExport const ::std::auto_ptr< ::xmloff::BoundFrameSets > pBoundFrameSets; XMLTextFieldExport *pFieldExport; OUStrings_Impl *pListElements; - // --> OD 2008-05-07 #refactorlists# - no longer needed -// OUStringsSort_Impl *pExportedLists; - // <-- XMLTextListAutoStylePool *pListAutoPool; XMLSectionExport *pSectionExport; XMLIndexMarkExport *pIndexMarkExport; @@ -111,21 +105,17 @@ class XMLOFF_DLLPUBLIC XMLTextParagraphExport : public XMLStyleExport ::rtl::OUString sOpenRubyCharStyle; sal_Bool bOpenRuby; - // --> OD 2008-05-07 #refactorlists# XMLTextListsHelper* mpTextListsHelper; ::std::vector< XMLTextListsHelper* > maTextListsHelperStack; - // <-- enum FrameType { FT_TEXT, FT_GRAPHIC, FT_EMBEDDED, FT_SHAPE }; protected: const ::rtl::OUString sActualSize; - // --> OD 2009-07-22 #i73249# -// const ::rtl::OUString sAlternativeText; + // Implement Title/Description Elements UI (#i73249#) const ::rtl::OUString sTitle; const ::rtl::OUString sDescription; - // <-- const ::rtl::OUString sAnchorCharStyleName; const ::rtl::OUString sAnchorPageNo; const ::rtl::OUString sAnchorType; @@ -424,7 +414,7 @@ protected: void exportTextMark( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> & xPropSet, - const ::rtl::OUString sProperty, + const ::rtl::OUString& rProperty, const enum ::xmloff::token::XMLTokenEnum pElements[], sal_Bool bAutoStyles); @@ -613,12 +603,10 @@ public: virtual void exportTextAutoStyles(); void exportEvents( const ::com::sun::star::uno::Reference < com::sun::star::beans::XPropertySet > & rPropSet ); - // --> OD 2009-07-22 #i73249# -// void exportAlternativeText( const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet > & rPropSet, -// const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySetInfo > & rPropSetInfo ); + + // Implement Title/Description Elements UI (#i73249#) void exportTitleAndDescription( const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet > & rPropSet, const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySetInfo > & rPropSetInfo ); - // <-- // This method exports the given XText void exportText( @@ -684,11 +672,11 @@ public: sal_Int32 GetHeadingLevel( const ::rtl::OUString& rStyleName ); - // --> OD 2008-05-08 #refactorlists# void PushNewTextListsHelper(); + void PopTextListsHelper(); - // <-- - private: + +private: XMLTextParagraphExport(XMLTextParagraphExport &); // private copy-ctor because of explicit copy-ctor of auto_ptr }; @@ -743,3 +731,5 @@ inline void XMLTextParagraphExport::exportShape( } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/txtprmap.hxx b/xmloff/inc/xmloff/txtprmap.hxx index a02151cd0993..f7c7a3859cec 100644 --- a/xmloff/inc/xmloff/txtprmap.hxx +++ b/xmloff/inc/xmloff/txtprmap.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. @@ -157,9 +158,10 @@ #define CTF_FRAMEWIDTH_REL (XML_TEXT_CTF_START + 126) #define CTF_FRAMEWIDTH_TYPE (XML_TEXT_CTF_START + 127) #define CTF_BORDER_MODEL (XML_TEXT_CTF_START + 128) -// --> OD 2004-08-09 #i28749# - define CTF ids for positioning properties of -// shapes, because on export to OpenOffice.org file format these have to -// be handled special, if shape isn't anchored as-character. +/* Define CTF ids for positioning properties of + shapes, because on export to OpenOffice.org file format these have to + be handled special, if shape isn't anchored as-character. (#i28749#) +*/ #define CTF_SHAPE_HORIZONTALPOS (XML_TEXT_CTF_START + 129) #define CTF_SHAPE_HORIZONTALPOS_MIRRORED (XML_TEXT_CTF_START + 130) #define CTF_SHAPE_HORIZONTALREL (XML_TEXT_CTF_START + 131) @@ -170,7 +172,6 @@ #define CTF_SHAPE_VERTICALREL (XML_TEXT_CTF_START + 136) #define CTF_SHAPE_VERTICALREL_PAGE (XML_TEXT_CTF_START + 137) #define CTF_SHAPE_VERTICALREL_FRAME (XML_TEXT_CTF_START + 138) -// <-- #define CTF_PARA_ADJUSTLAST (XML_TEXT_CTF_START + 139) #define CTF_DEFAULT_OUTLINE_LEVEL (XML_TEXT_CTF_START + 140) #define CTF_OLD_FLOW_WITH_TEXT (XML_TEXT_CTF_START + 141) @@ -208,3 +209,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/txtstyle.hxx b/xmloff/inc/xmloff/txtstyle.hxx index d8325b76b690..67a0762cb001 100644 --- a/xmloff/inc/xmloff/txtstyle.hxx +++ b/xmloff/inc/xmloff/txtstyle.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. @@ -58,3 +59,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/txtstyli.hxx b/xmloff/inc/xmloff/txtstyli.hxx index 1c1b97bf3137..79eb6cfb3cd5 100644 --- a/xmloff/inc/xmloff/txtstyli.hxx +++ b/xmloff/inc/xmloff/txtstyli.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,7 +45,7 @@ class XMLOFF_DLLPUBLIC XMLTextStyleContext : public XMLPropStyleContext const ::rtl::OUString sIsAutoUpdate; const ::rtl::OUString sCategory; const ::rtl::OUString sNumberingStyleName; - const ::rtl::OUString sOutlineLevel; //#outline level,add by zhaojianwei + const ::rtl::OUString sOutlineLevel; public: const ::rtl::OUString sDropCapCharStyleName; @@ -58,10 +59,8 @@ private: sal_Bool bHasCombinedCharactersLetter : 1; - // --> OD 2006-09-21 #i69523# - // introduce import of empty list style + // Introduce import of empty list style (#i69523#) sal_Bool mbListStyleSet : 1; - // <-- XMLEventsImportContext* pEventContext; @@ -91,12 +90,12 @@ public: sal_Bool IsAutoUpdate() const { return bAutoUpdate; } const ::rtl::OUString& GetListStyle() const { return sListStyleName; } - // --> OD 2006-10-13 #i69629# + // XML import: reconstrution of assignment of paragraph style to outline levels (#i69629#) sal_Bool IsListStyleSet() const { return mbListStyleSet; } - // <-- + const ::rtl::OUString& GetMasterPageName() const { return sMasterPageName; } sal_Bool HasMasterPageName() const { return bHasMasterPageName; } const ::rtl::OUString& GetDropCapStyleName() const { return sDropCapTextStyleName; } @@ -118,3 +117,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/uniref.hxx b/xmloff/inc/xmloff/uniref.hxx index fd600107a932..0a9d8e9dd6d4 100644 --- a/xmloff/inc/xmloff/uniref.hxx +++ b/xmloff/inc/xmloff/uniref.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. @@ -227,3 +228,5 @@ inline sal_Bool UniReference< T >::operator != ( const UniReference & rRef ) con } #endif // _UNIVERSALL_REFERENCE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/unoatrcn.hxx b/xmloff/inc/xmloff/unoatrcn.hxx index 250eb2670f88..a393b033ee10 100644 --- a/xmloff/inc/xmloff/unoatrcn.hxx +++ b/xmloff/inc/xmloff/unoatrcn.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. @@ -33,9 +34,7 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XUnoTunnel.hpp> -#ifndef _CPPUHELPER_IMPLBASE1_HXX_ #include <cppuhelper/implbase3.hxx> -#endif extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SvUnoAttributeContainer_CreateInstance(); @@ -87,3 +86,4 @@ public: friend ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SvUnoAttributeContainer_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr ) throw( ::com::sun::star::uno::Exception ); }; +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/xformsexport.hxx b/xmloff/inc/xmloff/xformsexport.hxx index 4ee7ac107f88..1c6b1c7122af 100644 --- a/xmloff/inc/xmloff/xformsexport.hxx +++ b/xmloff/inc/xmloff/xformsexport.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. @@ -58,3 +59,5 @@ void XMLOFF_DLLPUBLIC getXFormsSettings( ); #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/xformsimport.hxx b/xmloff/inc/xmloff/xformsimport.hxx index 2626c07927d5..09136241706c 100644 --- a/xmloff/inc/xmloff/xformsimport.hxx +++ b/xmloff/inc/xmloff/xformsimport.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. @@ -89,3 +90,4 @@ void XMLOFF_DLLPUBLIC applyXFormsSettings( #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/xmlaustp.hxx b/xmloff/inc/xmloff/xmlaustp.hxx index f0aa95c8275e..1eb26a766e90 100644 --- a/xmloff/inc/xmloff/xmlaustp.hxx +++ b/xmloff/inc/xmloff/xmlaustp.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. @@ -135,3 +136,5 @@ public: }; #endif // _XMLOFF_XMLASTPLP_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/xmlcnimp.hxx b/xmloff/inc/xmloff/xmlcnimp.hxx index 51d3cf3c8ff4..013dfb874733 100644 --- a/xmloff/inc/xmloff/xmlcnimp.hxx +++ b/xmloff/inc/xmloff/xmlcnimp.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. @@ -127,3 +128,4 @@ inline const ::rtl::OUString& SvXMLAttrContainerData::GetPrefix( sal_uInt16 i ) #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/xmlcnitm.hxx b/xmloff/inc/xmloff/xmlcnitm.hxx index 9c0010d5df5b..9f65282816c0 100644 --- a/xmloff/inc/xmloff/xmlcnitm.hxx +++ b/xmloff/inc/xmloff/xmlcnitm.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,8 +62,8 @@ public: virtual sal_uInt16 GetVersion( sal_uInt16 nFileFormatVersion ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxPoolItem *Clone( SfxItemPool * = 0) const { return new SvXMLAttrContainerItem( *this ); } @@ -88,3 +89,4 @@ public: #endif // _XMLOFF_XMLCNITM_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/xmlement.hxx b/xmloff/inc/xmloff/xmlement.hxx index 011e3b27dff0..58845603963e 100644 --- a/xmloff/inc/xmloff/xmlement.hxx +++ b/xmloff/inc/xmloff/xmlement.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. @@ -28,9 +29,7 @@ #ifndef _XMLOFF_XMLEMENT_HXX #define _XMLOFF_XMLEMENT_HXX -#ifndef _SAL_TYPES_H #include <sal/types.h> -#endif #include <xmloff/xmltoken.hxx> /** Map an XMLTokenEnum to a sal_uInt16 value. @@ -58,3 +57,4 @@ struct SvXMLEnumStringMapEntry #endif // _XMLOFF_XMLEMENT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/xmlerror.hxx b/xmloff/inc/xmloff/xmlerror.hxx index 407ef6b3666d..46595f6737a8 100644 --- a/xmloff/inc/xmloff/xmlerror.hxx +++ b/xmloff/inc/xmloff/xmlerror.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. @@ -90,8 +91,8 @@ // SvXMLExport/SvXMLImport error flags #define ERROR_NO 0x0000 #define ERROR_DO_NOTHING 0x0001 -#define ERROR_ERROR_OCCURED 0x0002 -#define ERROR_WARNING_OCCURED 0x0004 +#define ERROR_ERROR_OCCURRED 0x0002 +#define ERROR_WARNING_OCCURRED 0x0004 @@ -164,3 +165,5 @@ public: #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/xmlevent.hxx b/xmloff/inc/xmloff/xmlevent.hxx index d4cf77e06594..2b240d350c35 100644 --- a/xmloff/inc/xmloff/xmlevent.hxx +++ b/xmloff/inc/xmloff/xmlevent.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. @@ -150,3 +151,5 @@ public: #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/xmlexp.hxx b/xmloff/inc/xmloff/xmlexp.hxx index 03903f38a331..153065f9b970 100644 --- a/xmloff/inc/xmloff/xmlexp.hxx +++ b/xmloff/inc/xmloff/xmlexp.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. @@ -54,12 +55,8 @@ #include <com/sun/star/document/XFilter.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/document/XExporter.hpp> -#ifndef _COM_SUN_STAR_DRAWING_XGRAPHICOBJECTRESOLVER_HPP_ #include <com/sun/star/document/XGraphicObjectResolver.hpp> -#endif -#ifndef _COM_SUN_STAR_DRAWING_XEMBEDDEDOBJECTRESOLVER_HPP_ #include <com/sun/star/document/XEmbeddedObjectResolver.hpp> -#endif #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/lang/XEventListener.hpp> @@ -83,9 +80,8 @@ class XMLSettingsExportHelper; class XMLImageMapExport; class XMLErrors; -// --> OD 2006-03-14 #i51726# +// Shapes in Writer cannot be named via context menu (#i51726#) #include <unotools/moduleoptions.hxx> -// <-- namespace rtl { class OUString; } namespace com { namespace sun { namespace star { @@ -173,10 +169,9 @@ public: private: - // --> OD 2006-03-10 #i51726# + // Shapes in Writer cannot be named via context menu (#i51726#) SvtModuleOptions::EFactory meModelType; SAL_DLLPRIVATE void _DetermineModelType(); - // <-- SAL_DLLPRIVATE void ImplExportMeta(); // <office:meta> SAL_DLLPRIVATE void ImplExportSettings(); // <office:settings> @@ -374,7 +369,7 @@ public: ::rtl::OUString EnsureNamespace(::rtl::OUString const & i_rNamespace, ::rtl::OUString const & i_rPreferredPrefix - = ::rtl::OUString::createFromAscii("gen") ); + = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("gen")) ); // Check if common attribute list is empty. #ifndef DBG_UTIL @@ -535,7 +530,7 @@ public: void IgnorableWhitespace(); /** - * Record an error condition that occured during export. The + * Record an error condition that occurred during export. The * behavior of SetError can be modified using the error flag * constants. */ @@ -570,16 +565,14 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > GetComponentContext() const; - // --> OD 2006-03-10 #i51726# + // Shapes in Writer cannot be named via context menu (#i51726#) SvtModuleOptions::EFactory GetModelType() const { return meModelType; } - // <-- - // --> OD 2006-09-27 #i69627# + // Written OpenDocument file format doesn't fit to the created text document (#i69627#) sal_Bool writeOutlineStyleAsNormalListStyle() const; - // <-- bool isExperimentalOdfExportEnabled() const { return mbEnableExperimentalOdfExport; } ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > GetTargetStorage(); @@ -604,9 +597,7 @@ public: void AddAttributesRDFa( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent> const & i_xTextContent); - // --> OD 2008-11-26 #158694# sal_Bool exportTextNumberElement() const; - // <-- /// set null date from model to unit converter, if not already done sal_Bool SetNullDateOnUnitConverter(); @@ -731,3 +722,4 @@ public: #endif // _XMLOFF_SVXMLEXP_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/xmlexppr.hxx b/xmloff/inc/xmloff/xmlexppr.hxx index 36b7e0ec02a8..2cbafe089910 100644 --- a/xmloff/inc/xmloff/xmlexppr.hxx +++ b/xmloff/inc/xmloff/xmlexppr.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. @@ -202,3 +203,5 @@ public: }; #endif // _XMLOFF_XMLEXPPR_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/xmlictxt.hxx b/xmloff/inc/xmloff/xmlictxt.hxx index 9288645a0ad1..52a358431029 100644 --- a/xmloff/inc/xmloff/xmlictxt.hxx +++ b/xmloff/inc/xmloff/xmlictxt.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. @@ -106,3 +107,4 @@ SV_IMPL_REF( SvXMLImportContext ) #endif // _XMLOFF_XMLICTXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/xmlimp.hxx b/xmloff/inc/xmloff/xmlimp.hxx index 871703bf9ed7..02b90a5103f5 100644 --- a/xmloff/inc/xmloff/xmlimp.hxx +++ b/xmloff/inc/xmloff/xmlimp.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. @@ -361,7 +362,7 @@ public: ::rtl::OUString GetODFVersion() const; /** - * Record an error condition that occured during import. The + * Record an error condition that occurred during import. The * behavior of SetError can be modified using the error flag * constants. */ @@ -408,13 +409,10 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > GetComponentContext() const; - // --> OD 2004-08-10 #i28749# + // Convert drawing object positions from OOo file format to OASIS file format and vice versa (#i28749#) sal_Bool IsShapePositionInHoriL2R() const; - // <-- - // --> OD 2007-12-19 #152540# sal_Bool IsTextDocInOOoFileFormat() const; - // <-- String GetBaseURL() const; String GetDocumentBase() const; @@ -534,3 +532,5 @@ inline SvXMLNumFmtHelper* SvXMLImport::GetDataStylesImport() #endif // _XMLOFF_XMLIMP_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/xmlimppr.hxx b/xmloff/inc/xmloff/xmlimppr.hxx index e29e53e4e1c6..eb1e245a044a 100644 --- a/xmloff/inc/xmloff/xmlimppr.hxx +++ b/xmloff/inc/xmloff/xmlimppr.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. @@ -33,15 +34,11 @@ #include <tools/solar.h> #include <com/sun/star/xml/sax/XAttributeList.hpp> #include <com/sun/star/beans/XPropertySet.hpp> -#ifndef _COM_SUN_STAR_BEANS_XPROPERTYVALUE_HPP_ #include <com/sun/star/beans/PropertyValue.hpp> -#endif #include <com/sun/star/beans/XMultiPropertySet.hpp> #include <com/sun/star/beans/XTolerantMultiPropertySet.hpp> -#ifndef __SGI_STL_VECTOR #include <vector> -#endif #include <xmloff/uniref.hxx> struct XMLPropertyState; @@ -114,7 +111,7 @@ public: sal_Int32 nStartIdx, sal_Int32 nEndIdx ) const; /** 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, @@ -209,3 +206,5 @@ inline const UniReference< XMLPropertySetMapper >& } #endif // _XMLOFF_XMLIMPPR_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/xmlmetae.hxx b/xmloff/inc/xmloff/xmlmetae.hxx index ccc000e4fe19..abbcd03124b0 100644 --- a/xmloff/inc/xmloff/xmlmetae.hxx +++ b/xmloff/inc/xmloff/xmlmetae.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. @@ -125,3 +126,4 @@ public: #endif // _XMLOFF_XMLMETAE_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/xmlmetai.hxx b/xmloff/inc/xmloff/xmlmetai.hxx index 2ddd51920054..7f285ddd1ad5 100644 --- a/xmloff/inc/xmloff/xmlmetai.hxx +++ b/xmloff/inc/xmloff/xmlmetai.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. @@ -76,3 +77,4 @@ public: #endif // _XMLOFF_XMLMETAI_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/xmlnmspe.hxx b/xmloff/inc/xmloff/xmlnmspe.hxx index 7b7b7e131ec7..2f4615da2a2c 100644 --- a/xmloff/inc/xmloff/xmlnmspe.hxx +++ b/xmloff/inc/xmloff/xmlnmspe.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. @@ -104,6 +105,10 @@ XML_OLD_NAMESPACE( META, 6U ) // experimental namespaces XML_NAMESPACE( FIELD, 100U ) +XML_NAMESPACE( CSS3TEXT, 103U ) // CSS Text Level 3 +XML_NAMESPACE( FORMX, 101U ) // form interop extensions #endif // _XMLOFF_XMLNMSPE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/xmlnume.hxx b/xmloff/inc/xmloff/xmlnume.hxx index 5643c7a5cb37..473bec6d5dec 100644 --- a/xmloff/inc/xmloff/xmlnume.hxx +++ b/xmloff/inc/xmloff/xmlnume.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. @@ -54,13 +55,11 @@ class SvxXMLNumRuleExport const ::rtl::OUString sNumberingRules; const ::rtl::OUString sIsPhysical; const ::rtl::OUString sIsContinuousNumbering; - // --> OD 2008-06-06 #i89178# // Boolean indicating, if properties for position-and-space-mode LABEL_ALIGNEMNT - // are exported or not. + // are exported or not. (#i89178#) // These properties have been introduced in ODF 1.2. Thus, its export have // to be suppressed on writing ODF 1.0 respectively ODF 1.1 bool mbExportPositionAndSpaceModeLabelAlignment; - // <-- void exportLevelStyles( const ::com::sun::star::uno::Reference< @@ -100,12 +99,6 @@ public: const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexReplace > & xNumRule ); - // --> OD 2008-06-17 #i90780# - // refactoring: removing unused methods -// void Export( const ::rtl::OUString& rOutline, sal_Bool bContNumbering ); -// void ExportOutline(); - // <-- - static sal_Bool GetOutlineStyles( XMLStringVector& rStyleNames, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & rModel ); @@ -114,3 +107,4 @@ public: #endif // _XMLOFF_XMLNUME_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/xmlnumfe.hxx b/xmloff/inc/xmloff/xmlnumfe.hxx index dfd86dcb10ac..b1f00e72ca95 100644 --- a/xmloff/inc/xmloff/xmlnumfe.hxx +++ b/xmloff/inc/xmloff/xmlnumfe.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. @@ -138,3 +139,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/xmlnumfi.hxx b/xmloff/inc/xmloff/xmlnumfi.hxx index 537e789cfea2..d5ccc45354ff 100644 --- a/xmloff/inc/xmloff/xmlnumfi.hxx +++ b/xmloff/inc/xmloff/xmlnumfi.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. @@ -36,9 +37,7 @@ #include <xmloff/xmlstyle.hxx> #include <rtl/ustrbuf.hxx> #include <i18npool/lang.h> -#ifndef __SGI_STL_VECTOR #include <vector> -#endif #include <unotools/localedatawrapper.hxx> #define XML_NUMBERSTYLES "NumberStyles" @@ -116,13 +115,6 @@ public: class SvXMLNumFmtDefaults { public: - static sal_Bool IsSystemLongDay( const SvtSysLocale& rSysLoc, sal_Bool bLong ); - static sal_Bool IsSystemLongMonth( const SvtSysLocale& rSysLoc, sal_Bool bLong ); - static sal_Bool IsSystemTextualMonth( const SvtSysLocale& rSysLoc, sal_Bool bLong ); - static sal_Bool IsSystemLongYear( const SvtSysLocale& rSysLoc, sal_Bool bLong ); - static sal_Bool IsSystemLongEra( const SvtSysLocale& rSysLoc, sal_Bool bLong ); - static sal_Bool IsSystemLongDayOfWeek( const SvtSysLocale& rSysLoc, sal_Bool bLong ); - // return value is NfIndexTableOffset static sal_uInt16 GetDefaultDateFormat( SvXMLDateElementAttributes eDOW, SvXMLDateElementAttributes eDay, SvXMLDateElementAttributes eMonth, @@ -231,3 +223,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/xmlnumi.hxx b/xmloff/inc/xmloff/xmlnumi.hxx index dee231fb3774..c1c342165730 100644 --- a/xmloff/inc/xmloff/xmlnumi.hxx +++ b/xmloff/inc/xmloff/xmlnumi.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. @@ -109,3 +110,4 @@ public: #endif // _XMLOFF_XMLNUMI_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/xmlprcon.hxx b/xmloff/inc/xmloff/xmlprcon.hxx index 04da34bd4254..123f23ed76a7 100644 --- a/xmloff/inc/xmloff/xmlprcon.hxx +++ b/xmloff/inc/xmloff/xmlprcon.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. @@ -76,3 +77,4 @@ public: #endif // _XMLOFF_XMLPROPERTYSETCONTEXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/xmlprhdl.hxx b/xmloff/inc/xmloff/xmlprhdl.hxx index c6dd14dee3e4..e6dfdb2cc36e 100644 --- a/xmloff/inc/xmloff/xmlprhdl.hxx +++ b/xmloff/inc/xmloff/xmlprhdl.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,5 @@ public: }; #endif // _XMLOFF_PROPERTYHANDLERBASE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/xmlprmap.hxx b/xmloff/inc/xmloff/xmlprmap.hxx index 7dcb3c5cc926..41b997af86c0 100644 --- a/xmloff/inc/xmloff/xmlprmap.hxx +++ b/xmloff/inc/xmloff/xmlprmap.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. @@ -34,9 +35,7 @@ #include <com/sun/star/uno/Any.hxx> #include <com/sun/star/beans/XPropertySet.hpp> -#ifndef __SGI_STL_VECTOR #include <vector> -#endif #include <xmloff/uniref.hxx> #include <xmloff/maptype.hxx> #include <xmloff/xmltypes.hxx> @@ -187,3 +186,5 @@ public: }; #endif // _XMLOFF_PROPERTYSETMAPPER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/xmlreg.hxx b/xmloff/inc/xmloff/xmlreg.hxx index 5b835630ab03..3e9974d7a01c 100644 --- a/xmloff/inc/xmloff/xmlreg.hxx +++ b/xmloff/inc/xmloff/xmlreg.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. @@ -41,3 +42,4 @@ sal_Bool XMLRegisterServices( ::com::sun::star::uno::Reference< ::com::sun::star #endif // _XMLOFF_XMLREG_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/xmlscripti.hxx b/xmloff/inc/xmloff/xmlscripti.hxx index 561dda0f0473..74ae34073544 100644 --- a/xmloff/inc/xmloff/xmlscripti.hxx +++ b/xmloff/inc/xmloff/xmlscripti.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. @@ -59,3 +60,4 @@ public: #endif // _XMLOFF_XMLSCRIPTI_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/xmlstyle.hxx b/xmloff/inc/xmloff/xmlstyle.hxx index 9361e11eb8b4..2c42b7cddb57 100644 --- a/xmloff/inc/xmloff/xmlstyle.hxx +++ b/xmloff/inc/xmloff/xmlstyle.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. @@ -267,3 +268,4 @@ public: #endif // _XMLOFF_XMLSTYLE_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/xmltabe.hxx b/xmloff/inc/xmloff/xmltabe.hxx index 988261eb5768..a53166554fb1 100644 --- a/xmloff/inc/xmloff/xmltabe.hxx +++ b/xmloff/inc/xmloff/xmltabe.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. @@ -58,3 +59,4 @@ public: #endif // _XMLOFF_XMLTABE_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/xmltkmap.hxx b/xmloff/inc/xmloff/xmltkmap.hxx index cfbb50bbe277..711d9eb310d5 100644 --- a/xmloff/inc/xmloff/xmltkmap.hxx +++ b/xmloff/inc/xmloff/xmltkmap.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. @@ -65,3 +66,4 @@ public: #endif // _XMLOFF_XMLTKMAP_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/xmltoken.hxx b/xmloff/inc/xmloff/xmltoken.hxx index 39186a044311..a923f467ea2d 100644 --- a/xmloff/inc/xmloff/xmltoken.hxx +++ b/xmloff/inc/xmloff/xmltoken.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. @@ -145,12 +146,20 @@ namespace xmloff { namespace token { XML_NP_OFFICE_EXT, XML_N_OFFICE_EXT, + // jonp: 2008-09-24 Excel Interop + XML_NP_FORMX, + XML_N_FORMX, + XML_NP_TABLE_EXT, XML_N_TABLE_EXT, XML_NP_DRAW_EXT, XML_N_DRAW_EXT, + // css text level 3 + XML_NP_CSS3TEXT, + XML_N_CSS3TEXT, + // units XML_UNIT_MM, XML_UNIT_M, @@ -606,6 +615,7 @@ namespace xmloff { namespace token { XML_DISTANCE, XML_DISTANCE_AFTER_SEP, XML_DISTANCE_BEFORE_SEP, + XML_DISTRIBUTE, XML_DISTRIBUTE_LETTER, XML_DISTRIBUTE_SPACE, XML_DIVIDE, @@ -919,14 +929,12 @@ namespace xmloff { namespace token { XML_HINT, XML_HORIZONTAL, XML_HORIZONTAL_LINES, - // --> OD 2005-05-12 #i49139# // XML_HORIZONTAL_ON_LEFT_PAGES and XML_HORIZONTAL_ON_RIGHT_PAGES // are replaced by XML_HORIZONTAL_ON_EVEN and XML_HORIZONTAL_ON_ODD. // Usage is deprecated, but the old token are needed for the - // OpenOffice.org file format import/export filter for the renaming + // OpenOffice.org file format import/export filter for the renaming (#i49139#) XML_HORIZONTAL_ON_LEFT_PAGES, XML_HORIZONTAL_ON_RIGHT_PAGES, - // <-- XML_HORIZONTAL_POS, XML_HORIZONTAL_REL, XML_HORIZONTAL_SCROLLBAR_WIDTH, @@ -1067,6 +1075,7 @@ namespace xmloff { namespace token { XML_LINE_NUMBER, XML_LINE_SKEW, XML_LINE_SPACING, + XML_LINE_STYLE, XML_LINEAR, XML_LINENUMBERING_CONFIGURATION, XML_LINENUMBERING_SEPARATOR, @@ -1411,6 +1420,8 @@ namespace xmloff { namespace token { XML_PROTECT_SIZE, XML_PROTECTED, XML_PROTECTION_KEY, + XML_PROTECTION_KEY_DIGEST_ALGORITHM, + XML_PROTECTION_KEY_DIGEST_ALGORITHM_2, XML_PRSUBSET, XML_PUBLISHER, XML_PUNCTUATION_WRAP, @@ -1520,6 +1531,8 @@ namespace xmloff { namespace token { XML_SECTION_NAME, XML_SECTION_SOURCE, XML_SELECT_PAGE, + XML_SELECT_PROTECTED_CELLS, + XML_SELECT_UNPROTECTED_CELLS, XML_SELECTOR, XML_SEMANTICS, XML_SEMI_AUTOMATIC, @@ -1732,6 +1745,7 @@ namespace xmloff { namespace token { XML_TABLE_OF_CONTENT_ENTRY_TEMPLATE, XML_TABLE_OF_CONTENT_SOURCE, XML_TABLE_PAGE, + XML_TABLE_PROTECTION, XML_TABLE_ROW, XML_TABLE_ROW_GROUP, XML_TABLE_ROWS, @@ -1771,6 +1785,7 @@ namespace xmloff { namespace token { XML_TEXT_GLOBAL, XML_TEXT_INDENT, XML_TEXT_INPUT, + XML_TEXT_JUSTIFY, XML_TEXT_OUTLINE, XML_TEXT_POSITION, XML_TEXT_ROTATION_ANGLE, @@ -1904,6 +1919,7 @@ namespace xmloff { namespace token { XML_VERSION_LIST, XML_VERTICAL, XML_VERTICAL_ALIGN, + XML_VERTICAL_JUSTIFY, XML_VERTICAL_LINES, XML_VERTICAL_POS, XML_VERTICAL_REL, @@ -2089,6 +2105,7 @@ namespace xmloff { namespace token { XML_LAYOUT_GRID_STANDARD_MODE, XML_LAYOUT_GRID_BASE_WIDTH, XML_LAYOUT_GRID_SNAP_TO_CHARS, + XML_LAYOUT_GRID_SNAP_TO, XML_SNAP_TO_LAYOUT_GRID, XML_DONT_BALANCE_TEXT_COLUMNS, @@ -2355,13 +2372,13 @@ namespace xmloff { namespace token { XML_REPEAT_CONTENT, XML_SHRINK_TO_FIT, - // OD 2004-05-05 #i28701# + /* Core impl. of the positioning of floating screen objects without + considering its wrapping style (#i28701#) + */ XML_WRAP_INFLUENCE_ON_POSITION, - // --> OD 2004-10-18 #i35017# - tokens have been renamed and - // <XML_ITERATIVE> has been added + // Tokens have been renamed and <XML_ITERATIVE> has been added (#i35017#) XML_ONCE_SUCCESSIVE, XML_ONCE_CONCURRENT, - // <-- // Names for OOo format only XML_N_OFFICE_OOO, @@ -2511,6 +2528,7 @@ namespace xmloff { namespace token { XML_SHOW_FILTER_BUTTON, XML_DRILL_DOWN_ON_DOUBLE_CLICK, + XML_HEADER_GRID_LAYOUT, XML_GROUPED_BY, XML_DAYS, XML_MONTHS, @@ -2877,11 +2895,9 @@ namespace xmloff { namespace token { XML_URI_W3_PREFIX, XML_URI_XFORMS_SUFFIX, - // --> OD 2005-05-12 #i49139# // XML_HORIZONTAL_ON_LEFT_PAGES and XML_HORIZONTAL_ON_RIGHT_PAGES - // are replaced by XML_HORIZONTAL_ON_EVEN and XML_HORIZONTAL_ON_ODD. + // are replaced by XML_HORIZONTAL_ON_EVEN and XML_HORIZONTAL_ON_ODD. (#i49139#) XML_HORIZONTAL_ON_EVEN, - // --> OJ 2005-09-01 XML_N_RPT_OASIS, XML_N_RPT, XML_GROUP, @@ -2957,15 +2973,11 @@ namespace xmloff { namespace token { XML_ODD_ROWS, XML_EVEN_COLUMNS, XML_ODD_COLUMNS, - // <-- XML_HORIZONTAL_ON_ODD, - // <-- - // --> OD 2005-10-10 #i45874# + // Password error from 1.4 to 2.0 Beta (#i45874#) XML_RESTART_NUMBERING, - // <-- - // --> FLR #i52127# + // OpenDocument <text:numbered-paragraph> element not supported on OpenDocument import (#i52127#) XML_NUMBERED_PARAGRAPH, - // <-- XML_MASTER_DETAIL_FIELDS, XML_MASTER_DETAIL_FIELD, XML_SUB_DOCUMENT, @@ -3023,11 +3035,9 @@ namespace xmloff { namespace token { XML_TABLE_INCLUDE_FILTER, XML_DEFAULT_ROW_STYLE_NAME, XML_ANGLE_OFFSET, - // --> OD 2007-09-14 #i81002# + // Core implementation for direct cross-references (#i81002#) XML_NUMBER_NO_SUPERIOR, XML_NUMBER_ALL_SUPERIOR, - // <-- - // --> OD 2008-01-15 #newlistlevelattrs# XML_LIST_LEVEL_POSITION_AND_SPACE_MODE, XML_LABEL_WIDTH_AND_POSITION, XML_LABEL_ALIGNMENT, @@ -3037,16 +3047,13 @@ namespace xmloff { namespace token { XML_SPACE, XML_NOTHING, XML_LIST_TAB_STOP_POSITION, - // <-- XML_STANDARD_ERROR, XML_CELL_RANGE, XML_ERROR_LOWER_RANGE, XML_ERROR_UPPER_RANGE, - // --> OD 2008-04-22 #refactorlists# XML_CONTINUE_LIST, XML_STYLE_OVERRIDE, - // <-- // fs: #i90243# XML_XFORM_MODEL_SETTINGS, @@ -3156,3 +3163,5 @@ namespace xmloff { namespace token { } } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/xmltypes.hxx b/xmloff/inc/xmloff/xmltypes.hxx index 5fce50158089..922ad3f340d0 100644 --- a/xmloff/inc/xmloff/xmltypes.hxx +++ b/xmloff/inc/xmloff/xmltypes.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. @@ -284,3 +285,5 @@ #define XML_DB_TYPES_START (0x6 << XML_TYPE_APP_SHIFT) #endif // _XMLOFF_XMLTYPES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmloff/xmluconv.hxx b/xmloff/inc/xmloff/xmluconv.hxx index ea8200d83a27..c593e99ebbbb 100644 --- a/xmloff/inc/xmloff/xmluconv.hxx +++ b/xmloff/inc/xmloff/xmluconv.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. @@ -173,7 +174,7 @@ public: MapUnit eDstUnit ); /** convert string to boolean */ - static sal_Bool convertBool( sal_Bool& rBool, + static sal_Bool convertBool( bool& rBool, const ::rtl::OUString& rString ); /** convert boolean to string */ @@ -443,3 +444,5 @@ inline MapUnit SvXMLUnitConverter::getXMLMeasureUnit() const } #endif // _XMLOFF_XMLUCONV_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmltabi.hxx b/xmloff/inc/xmltabi.hxx index ea46b1d228ce..8114e801503b 100644 --- a/xmloff/inc/xmltabi.hxx +++ b/xmloff/inc/xmltabi.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. @@ -63,3 +64,4 @@ public: #endif // _XMLOFF_XMLTABI_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/xmlversion.hxx b/xmloff/inc/xmlversion.hxx index da30b5e20dd2..880e468b5f28 100644 --- a/xmloff/inc/xmlversion.hxx +++ b/xmloff/inc/xmlversion.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. @@ -153,3 +154,5 @@ public: throw( ::com::sun::star::uno::Exception ); #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/prj/build.lst b/xmloff/prj/build.lst index e522f8b79714..1a8261d7a37e 100644 --- a/xmloff/prj/build.lst +++ b/xmloff/prj/build.lst @@ -1,2 +1,2 @@ -xo xmloff : LIBXSLT:libxslt offapi svl vos NULL +xo xmloff : LIBXSLT:libxslt offapi svl NULL xo xmloff\prj nmake - all xo_prj NULL diff --git a/xmloff/prj/makefile.mk b/xmloff/prj/makefile.mk index e312a7ccab65..e312a7ccab65 100644..100755 --- a/xmloff/prj/makefile.mk +++ b/xmloff/prj/makefile.mk diff --git a/xmloff/qa/unoapi/Test.java b/xmloff/qa/unoapi/Test.java deleted file mode 100644 index 833c2d770c9f..000000000000 --- a/xmloff/qa/unoapi/Test.java +++ /dev/null @@ -1,52 +0,0 @@ -/************************************************************************* -* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -* -* Copyright 2000, 2010 Oracle and/or its affiliates. -* -* OpenOffice.org - a multi-platform office productivity suite -* -* This file is part of OpenOffice.org. -* -* OpenOffice.org is free software: you can redistribute it and/or modify -* it under the terms of the GNU Lesser General Public License version 3 -* only, as published by the Free Software Foundation. -* -* OpenOffice.org is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU Lesser General Public License version 3 for more details -* (a copy is included in the LICENSE file that accompanied this code). -* -* You should have received a copy of the GNU Lesser General Public License -* version 3 along with OpenOffice.org. If not, see -* <http://www.openoffice.org/license.html> -* for a copy of the LGPLv3 License. -************************************************************************/ - -package org.openoffice.xmloff.qa.unoapi; - -import org.openoffice.Runner; -import org.openoffice.test.OfficeConnection; -import org.openoffice.test.Argument; -import static org.junit.Assert.*; - -public final class Test { - @org.junit.Before public void setUp() throws Exception { - connection.setUp(); - } - - @org.junit.After public void tearDown() - throws InterruptedException, com.sun.star.uno.Exception - { - connection.tearDown(); - } - - @org.junit.Test public void test() { - assertTrue( - Runner.run( - "-sce", Argument.get("sce"), "-xcl", Argument.get("xcl"), "-tdoc", - Argument.get("tdoc"), "-cs", connection.getDescription())); - } - - private final OfficeConnection connection = new OfficeConnection(); -} diff --git a/xmloff/qa/unoapi/knownissues.xcl b/xmloff/qa/unoapi/knownissues.xcl index 974280f032bd..974280f032bd 100644..100755 --- a/xmloff/qa/unoapi/knownissues.xcl +++ b/xmloff/qa/unoapi/knownissues.xcl diff --git a/xmloff/qa/unoapi/testdocuments/emptyChart.sds b/xmloff/qa/unoapi/testdocuments/emptyChart.sds Binary files differindex 853a44a12cf8..853a44a12cf8 100644..100755 --- a/xmloff/qa/unoapi/testdocuments/emptyChart.sds +++ b/xmloff/qa/unoapi/testdocuments/emptyChart.sds diff --git a/xmloff/qa/unoapi/xmloff.sce b/xmloff/qa/unoapi/xmloff.sce index 69166aec6204..69166aec6204 100644..100755 --- a/xmloff/qa/unoapi/xmloff.sce +++ b/xmloff/qa/unoapi/xmloff.sce diff --git a/xmloff/source/chart/ColorPropertySet.cxx b/xmloff/source/chart/ColorPropertySet.cxx index e65f00ef135f..e4a8525f5a1f 100644 --- a/xmloff/source/chart/ColorPropertySet.cxx +++ b/xmloff/source/chart/ColorPropertySet.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. @@ -155,7 +156,7 @@ void SAL_CALL ColorPropertySet::addPropertyChangeListener( const OUString& /* aP lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE( false, "Not Implemented" ); + OSL_FAIL( "Not Implemented" ); return; } @@ -164,7 +165,7 @@ void SAL_CALL ColorPropertySet::removePropertyChangeListener( const OUString& /* lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE( false, "Not Implemented" ); + OSL_FAIL( "Not Implemented" ); return; } @@ -173,7 +174,7 @@ void SAL_CALL ColorPropertySet::addVetoableChangeListener( const OUString& /* Pr lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE( false, "Not Implemented" ); + OSL_FAIL( "Not Implemented" ); return; } @@ -182,7 +183,7 @@ void SAL_CALL ColorPropertySet::removeVetoableChangeListener( const OUString& /* lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE( false, "Not Implemented" ); + OSL_FAIL( "Not Implemented" ); return; } @@ -223,3 +224,5 @@ uno::Any SAL_CALL ColorPropertySet::getPropertyDefault( const OUString& aPropert } // namespace chart } // namespace xmloff + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/ColorPropertySet.hxx b/xmloff/source/chart/ColorPropertySet.hxx index 32d11182c3b2..003c6119817a 100644 --- a/xmloff/source/chart/ColorPropertySet.hxx +++ b/xmloff/source/chart/ColorPropertySet.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. @@ -124,3 +125,5 @@ private: // XMLOFF_COLORPROPERTYSET_HXX #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/MultiPropertySetHandler.hxx b/xmloff/source/chart/MultiPropertySetHandler.hxx index a908c69711fd..160b9f218807 100644 --- a/xmloff/source/chart/MultiPropertySetHandler.hxx +++ b/xmloff/source/chart/MultiPropertySetHandler.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. @@ -213,14 +214,6 @@ MultiPropertySetHandler::~MultiPropertySetHandler (void) } -/* -template<class T> void MultiPropertySetHandler::Add (const ::rtl::OUString & sName, T& pValue) -{ - aPropertyList[sName] = new PropertyWrapper<T> (sName, pValue); -} -*/ - - sal_Bool MultiPropertySetHandler::GetProperties (void) { @@ -292,3 +285,4 @@ sal_Bool MultiPropertySetHandler::SingleGet (const ::com::sun::star::uno::Se #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/PropertyMap.hxx b/xmloff/source/chart/PropertyMap.hxx index 8ba1d5a6a510..d0aab8b962cc 100644 --- a/xmloff/source/chart/PropertyMap.hxx +++ b/xmloff/source/chart/PropertyMap.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. @@ -323,3 +324,5 @@ SvXMLEnumMapEntry aXMLChartMissingValueTreatmentEnumMap[] = #endif // XML_SCH_CREATE_GLOBAL_MAPS #endif // _PROPERTYMAP_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/PropertyMaps.cxx b/xmloff/source/chart/PropertyMaps.cxx index d2be11a0013e..6cb029d9b1bf 100644 --- a/xmloff/source/chart/PropertyMaps.cxx +++ b/xmloff/source/chart/PropertyMaps.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. @@ -216,7 +217,7 @@ void XMLChartExportPropertyMapper::ContextFilter( // filter properties for( std::vector< XMLPropertyState >::iterator property = rProperties.begin(); property != rProperties.end(); - property++ ) + ++property ) { // find properties with context // to prevent writing this property set mnIndex member to -1 @@ -225,24 +226,24 @@ void XMLChartExportPropertyMapper::ContextFilter( // if Auto... is set the corresponding properties mustn't be exported case XML_SCH_CONTEXT_MIN: bCheckAuto = sal_True; - aAutoPropName = ::rtl::OUString::createFromAscii( "AutoMin" ); + aAutoPropName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "AutoMin" )); break; case XML_SCH_CONTEXT_MAX: bCheckAuto = sal_True; - aAutoPropName = ::rtl::OUString::createFromAscii( "AutoMax" ); + aAutoPropName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "AutoMax" )); break; case XML_SCH_CONTEXT_STEP_MAIN: bCheckAuto = sal_True; - aAutoPropName = ::rtl::OUString::createFromAscii( "AutoStepMain" ); + aAutoPropName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "AutoStepMain" )); break; case XML_SCH_CONTEXT_STEP_HELP_COUNT: bCheckAuto = sal_True; - aAutoPropName = ::rtl::OUString::createFromAscii( "AutoStepHelp" ); + aAutoPropName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "AutoStepHelp" )); break; case XML_SCH_CONTEXT_ORIGIN: bCheckAuto = sal_True; - aAutoPropName = ::rtl::OUString::createFromAscii( "AutoOrigin" ); + aAutoPropName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "AutoOrigin" )); break; // the following property is deprecated @@ -489,14 +490,13 @@ XMLChartImportPropertyMapper::XMLChartImportPropertyMapper( const UniReference< // do not chain text properties: on import this is done by shape mapper // to import old documents -// ChainImportMapper( XMLTextImportHelper::CreateParaExtPropMapper()); } XMLChartImportPropertyMapper::~XMLChartImportPropertyMapper() { } -sal_Bool XMLChartImportPropertyMapper::handleSpecialItem( +bool XMLChartImportPropertyMapper::handleSpecialItem( XMLPropertyState& rProperty, ::std::vector< XMLPropertyState >& rProperties, const ::rtl::OUString& rValue, @@ -510,7 +510,7 @@ sal_Bool XMLChartImportPropertyMapper::handleSpecialItem( if( nContextId ) { sal_Int32 nValue = 0; - sal_Bool bValue = sal_False; + bool bValue = false; switch( nContextId ) { @@ -616,3 +616,5 @@ sal_Bool XMLChartImportPropertyMapper::handleSpecialItem( void XMLChartImportPropertyMapper::finished( ::std::vector< XMLPropertyState >& /*rProperties*/, sal_Int32 /*nStartIndex*/, sal_Int32 /*nEndIndex*/ ) const { } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/SchXMLAutoStylePoolP.cxx b/xmloff/source/chart/SchXMLAutoStylePoolP.cxx index fc70b5831d9b..9f6f10a8886b 100644 --- a/xmloff/source/chart/SchXMLAutoStylePoolP.cxx +++ b/xmloff/source/chart/SchXMLAutoStylePoolP.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. @@ -89,3 +90,5 @@ void SchXMLAutoStylePoolP::exportStyleAttributes( } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/SchXMLAutoStylePoolP.hxx b/xmloff/source/chart/SchXMLAutoStylePoolP.hxx index d16973347c1d..bffa2cce3d13 100644 --- a/xmloff/source/chart/SchXMLAutoStylePoolP.hxx +++ b/xmloff/source/chart/SchXMLAutoStylePoolP.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 @@ public: }; #endif // _SCH_XMLAUTOSTYLEPOOLP_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/SchXMLAxisContext.cxx b/xmloff/source/chart/SchXMLAxisContext.cxx index f9828fa04931..0084d1751f07 100755..100644 --- a/xmloff/source/chart/SchXMLAxisContext.cxx +++ b/xmloff/source/chart/SchXMLAxisContext.cxx @@ -178,21 +178,21 @@ Reference< drawing::XShape > SchXMLAxisContext::getTitleShape() { case SCH_XML_AXIS_X: if( m_aCurrentAxis.nAxisIndex == 0 ) - aPropName = OUString::createFromAscii( "HasXAxisTitle" ); + aPropName = OUString(RTL_CONSTASCII_USTRINGPARAM( "HasXAxisTitle" )); else - aPropName = OUString::createFromAscii( "HasSecondaryXAxisTitle" ); + aPropName = OUString(RTL_CONSTASCII_USTRINGPARAM( "HasSecondaryXAxisTitle" )); break; case SCH_XML_AXIS_Y: if( m_aCurrentAxis.nAxisIndex == 0 ) - aPropName = OUString::createFromAscii( "HasYAxisTitle" ); + aPropName = OUString(RTL_CONSTASCII_USTRINGPARAM( "HasYAxisTitle" )); else - aPropName = OUString::createFromAscii( "HasSecondaryYAxisTitle" ); + aPropName = OUString(RTL_CONSTASCII_USTRINGPARAM( "HasSecondaryYAxisTitle" )); break; case SCH_XML_AXIS_Z: - aPropName = OUString::createFromAscii( "HasZAxisTitle" ); + aPropName = OUString(RTL_CONSTASCII_USTRINGPARAM( "HasZAxisTitle" )); break; case SCH_XML_AXIS_UNDEF: - DBG_ERROR( "Invalid axis" ); + OSL_TRACE( "Invalid axis" ); break; } xDiaProp->setPropertyValue( aPropName, uno::makeAny(sal_True) ); @@ -212,24 +212,24 @@ void SchXMLAxisContext::CreateGrid( OUString sAutoStyleName, bool bIsMajor ) { case SCH_XML_AXIS_X: if( bIsMajor ) - aPropName = OUString::createFromAscii("HasXAxisGrid"); + aPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("HasXAxisGrid")); else - aPropName = OUString::createFromAscii("HasXAxisHelpGrid"); + aPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("HasXAxisHelpGrid")); break; case SCH_XML_AXIS_Y: if( bIsMajor ) - aPropName = OUString::createFromAscii("HasYAxisGrid"); + aPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("HasYAxisGrid")); else - aPropName = OUString::createFromAscii("HasYAxisHelpGrid"); + aPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("HasYAxisHelpGrid")); break; case SCH_XML_AXIS_Z: if( bIsMajor ) - aPropName = OUString::createFromAscii("HasZAxisGrid"); + aPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("HasZAxisGrid")); else - aPropName = OUString::createFromAscii("HasZAxisHelpGrid"); + aPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("HasZAxisHelpGrid")); break; case SCH_XML_AXIS_UNDEF: - DBG_ERROR( "Invalid axis" ); + OSL_TRACE( "Invalid axis" ); break; } xDiaProp->setPropertyValue( aPropName, uno::makeAny(sal_True) ); @@ -376,7 +376,7 @@ Reference< chart2::XAxis > lcl_getAxis( const Reference< frame::XModel >& xChart } catch( uno::Exception & ) { - DBG_ERROR( "Couldn't get axis" ); + OSL_TRACE( "Couldn't get axis" ); } return xAxis; @@ -418,24 +418,24 @@ void SchXMLAxisContext::CreateAxis() { case SCH_XML_AXIS_X: if( m_aCurrentAxis.nAxisIndex == 0 ) - aPropName = OUString::createFromAscii("HasXAxis"); + aPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("HasXAxis")); else - aPropName = OUString::createFromAscii("HasSecondaryXAxis"); + aPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("HasSecondaryXAxis")); break; case SCH_XML_AXIS_Y: if( m_aCurrentAxis.nAxisIndex == 0 ) - aPropName = OUString::createFromAscii("HasYAxis"); + aPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("HasYAxis")); else - aPropName = OUString::createFromAscii("HasSecondaryYAxis"); + aPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("HasSecondaryYAxis")); break; case SCH_XML_AXIS_Z: if( m_aCurrentAxis.nAxisIndex == 0 ) - aPropName = OUString::createFromAscii("HasXAxis"); + aPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("HasXAxis")); else - aPropName = OUString::createFromAscii("HasSecondaryXAxis"); + aPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("HasSecondaryXAxis")); break; case SCH_XML_AXIS_UNDEF: - DBG_ERROR( "Invalid axis" ); + OSL_TRACE( "Invalid axis" ); break; } try @@ -444,7 +444,7 @@ void SchXMLAxisContext::CreateAxis() } catch( beans::UnknownPropertyException & ) { - DBG_ERROR( "Couldn't turn on axis" ); + OSL_TRACE( "Couldn't turn on axis" ); } if( m_aCurrentAxis.eDimension==SCH_XML_AXIS_Z ) { @@ -455,7 +455,7 @@ void SchXMLAxisContext::CreateAxis() } catch( beans::UnknownPropertyException & ) { - DBG_ERROR( "Couldn't turn on z axis" ); + OSL_TRACE( "Couldn't turn on z axis" ); } if( !bSettingZAxisSuccedded ) return; @@ -468,11 +468,11 @@ void SchXMLAxisContext::CreateAxis() { try { - xDiaProp->setPropertyValue( OUString::createFromAscii( "HasXAxis" ), uno::makeAny(sal_True) ); + xDiaProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( "HasXAxis" )), uno::makeAny(sal_True) ); } catch( beans::UnknownPropertyException & ) { - DBG_ERROR( "Couldn't turn on x axis" ); + OSL_TRACE( "Couldn't turn on x axis" ); } } @@ -486,13 +486,13 @@ void SchXMLAxisContext::CreateAxis() m_xAxisProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "LineColor" )), uno::makeAny( COL_BLACK )); - m_xAxisProps->setPropertyValue( OUString::createFromAscii( "DisplayLabels" ), aFalseBool ); + m_xAxisProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( "DisplayLabels" )), aFalseBool ); // #88077# AutoOrigin 'on' is default - m_xAxisProps->setPropertyValue( OUString::createFromAscii( "AutoOrigin" ), aTrueBool ); + m_xAxisProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( "AutoOrigin" )), aTrueBool ); if( m_bAxisTypeImported ) - m_xAxisProps->setPropertyValue( OUString::createFromAscii( "AxisType" ), uno::makeAny(m_nAxisType) ); + m_xAxisProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( "AxisType" )), uno::makeAny(m_nAxisType) ); if( m_aAutoStyleName.getLength()) { @@ -548,7 +548,7 @@ void SchXMLAxisContext::CreateAxis() Reference< beans::XPropertySet > xNewAxisProp( xAxis, uno::UNO_QUERY ); if( xNewAxisProp.is() ) { - xNewAxisProp->setPropertyValue( OUString::createFromAscii("LineStyle") + xNewAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("LineStyle")) , uno::makeAny(drawing::LineStyle_NONE)); } } @@ -614,7 +614,7 @@ void SchXMLAxisContext::SetAxisTitle() } catch( beans::UnknownPropertyException & ) { - DBG_ERROR( "Property String for Title not available" ); + OSL_TRACE( "Property String for Title not available" ); } } } @@ -794,31 +794,31 @@ void SchXMLAxisContext::CorrectAxisPositions( const Reference< chart2::XChartDoc chart2::ScaleData aMainXScale = xMainXAxis->getScaleData(); if( 0 == rChartTypeServiceName.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart2.ScatterChartType" ) ) ) { - xMainYAxisProp->setPropertyValue( OUString::createFromAscii("CrossoverPosition") + xMainYAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("CrossoverPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisPosition_VALUE) ); double fCrossoverValue = 0.0; aMainXScale.Origin >>= fCrossoverValue; - xMainYAxisProp->setPropertyValue( OUString::createFromAscii("CrossoverValue") + xMainYAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("CrossoverValue")) , uno::makeAny( fCrossoverValue ) ); if( aMainXScale.Orientation == chart2::AxisOrientation_REVERSE ) { - xMainYAxisProp->setPropertyValue( OUString::createFromAscii("LabelPosition") + xMainYAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("LabelPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisLabelPosition_OUTSIDE_END) ); - xMainYAxisProp->setPropertyValue( OUString::createFromAscii("MarkPosition") + xMainYAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("MarkPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisMarkPosition_AT_LABELS) ); if( xSecondaryYAxisProp.is() ) - xSecondaryYAxisProp->setPropertyValue( OUString::createFromAscii("CrossoverPosition") + xSecondaryYAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("CrossoverPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisPosition_START) ); } else { - xMainYAxisProp->setPropertyValue( OUString::createFromAscii("LabelPosition") + xMainYAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("LabelPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisLabelPosition_OUTSIDE_START) ); - xMainYAxisProp->setPropertyValue( OUString::createFromAscii("MarkPosition") + xMainYAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("MarkPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisMarkPosition_AT_LABELS) ); if( xSecondaryYAxisProp.is() ) - xSecondaryYAxisProp->setPropertyValue( OUString::createFromAscii("CrossoverPosition") + xSecondaryYAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("CrossoverPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisPosition_END) ); } } @@ -826,48 +826,48 @@ void SchXMLAxisContext::CorrectAxisPositions( const Reference< chart2::XChartDoc { if( aMainXScale.Orientation == chart2::AxisOrientation_REVERSE ) { - xMainYAxisProp->setPropertyValue( OUString::createFromAscii("CrossoverPosition") + xMainYAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("CrossoverPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisPosition_END) ); if( xSecondaryYAxisProp.is() ) - xSecondaryYAxisProp->setPropertyValue( OUString::createFromAscii("CrossoverPosition") + xSecondaryYAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("CrossoverPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisPosition_START) ); } else { - xMainYAxisProp->setPropertyValue( OUString::createFromAscii("CrossoverPosition") + xMainYAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("CrossoverPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisPosition_START) ); if( xSecondaryYAxisProp.is() ) - xSecondaryYAxisProp->setPropertyValue( OUString::createFromAscii("CrossoverPosition") + xSecondaryYAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("CrossoverPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisPosition_END) ); } } chart2::ScaleData aMainYScale = xMainYAxis->getScaleData(); - xMainXAxisProp->setPropertyValue( OUString::createFromAscii("CrossoverPosition") + xMainXAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("CrossoverPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisPosition_VALUE) ); double fCrossoverValue = 0.0; aMainYScale.Origin >>= fCrossoverValue; - xMainXAxisProp->setPropertyValue( OUString::createFromAscii("CrossoverValue") + xMainXAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("CrossoverValue")) , uno::makeAny( fCrossoverValue ) ); if( aMainYScale.Orientation == chart2::AxisOrientation_REVERSE ) { - xMainXAxisProp->setPropertyValue( OUString::createFromAscii("LabelPosition") + xMainXAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("LabelPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisLabelPosition_OUTSIDE_END) ); - xMainXAxisProp->setPropertyValue( OUString::createFromAscii("MarkPosition") + xMainXAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("MarkPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisMarkPosition_AT_LABELS) ); if( xSecondaryXAxisProp.is() ) - xSecondaryXAxisProp->setPropertyValue( OUString::createFromAscii("CrossoverPosition") + xSecondaryXAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("CrossoverPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisPosition_START) ); } else { - xMainXAxisProp->setPropertyValue( OUString::createFromAscii("LabelPosition") + xMainXAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("LabelPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisLabelPosition_OUTSIDE_START) ); - xMainXAxisProp->setPropertyValue( OUString::createFromAscii("MarkPosition") + xMainXAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("MarkPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisMarkPosition_AT_LABELS) ); if( xSecondaryXAxisProp.is() ) - xSecondaryXAxisProp->setPropertyValue( OUString::createFromAscii("CrossoverPosition") + xSecondaryXAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("CrossoverPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisPosition_END) ); } } @@ -990,7 +990,7 @@ void DateScaleContext::StartElement( const Reference< xml::sax::XAttributeList > bool bSetNewIncrement=false; chart::TimeIncrement aIncrement; - m_xAxisProps->getPropertyValue( OUString::createFromAscii( "TimeIncrement" )) >>= aIncrement; + m_xAxisProps->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( "TimeIncrement" ))) >>= aIncrement; for( sal_Int16 i = 0; i < nAttrCount; i++ ) { @@ -1047,7 +1047,7 @@ void DateScaleContext::StartElement( const Reference< xml::sax::XAttributeList > } if( bSetNewIncrement ) - m_xAxisProps->setPropertyValue( OUString::createFromAscii( "TimeIncrement" ), uno::makeAny( aIncrement ) ); + m_xAxisProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( "TimeIncrement" )), uno::makeAny( aIncrement ) ); } // ======================================== diff --git a/xmloff/source/chart/SchXMLAxisContext.hxx b/xmloff/source/chart/SchXMLAxisContext.hxx index 2689c6adff6d..2689c6adff6d 100755..100644 --- a/xmloff/source/chart/SchXMLAxisContext.hxx +++ b/xmloff/source/chart/SchXMLAxisContext.hxx diff --git a/xmloff/source/chart/SchXMLCalculationSettingsContext.cxx b/xmloff/source/chart/SchXMLCalculationSettingsContext.cxx index 78c1ac42430f..531388d943e6 100755..100644 --- a/xmloff/source/chart/SchXMLCalculationSettingsContext.cxx +++ b/xmloff/source/chart/SchXMLCalculationSettingsContext.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. @@ -84,3 +85,5 @@ void SchXMLCalculationSettingsContext::EndElement() xPropSet->setPropertyValue ( sNullDate, m_aNullDate ); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/SchXMLCalculationSettingsContext.hxx b/xmloff/source/chart/SchXMLCalculationSettingsContext.hxx index 423d6fdfd11a..79496296ff0e 100755..100644 --- a/xmloff/source/chart/SchXMLCalculationSettingsContext.hxx +++ b/xmloff/source/chart/SchXMLCalculationSettingsContext.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. @@ -49,3 +50,5 @@ public: #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx index 9f9d1cf2bb1d..ccce0fc6bb33 100644 --- a/xmloff/source/chart/SchXMLChartContext.cxx +++ b/xmloff/source/chart/SchXMLChartContext.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,7 +88,7 @@ void lcl_setRoleAtLabeledSequence( { uno::Reference< beans::XPropertySet > xProp( xValues, uno::UNO_QUERY ); if( xProp.is()) - xProp->setPropertyValue(OUString::createFromAscii("Role"), uno::makeAny( rRole )); + xProp->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM( "Role" )), uno::makeAny( rRole )); } } @@ -116,7 +117,7 @@ void lcl_MoveDataToCandleStickSeries( } catch( uno::Exception & ) { - OSL_ENSURE( false, "Exception caught while moving data to candlestick series" ); + OSL_FAIL( "Exception caught while moving data to candlestick series" ); } } @@ -176,7 +177,7 @@ void lcl_removeEmptyChartTypeGroups( const uno::Reference< chart2::XChartDocumen { String aStr( ex.Message ); ByteString aBStr( aStr, RTL_TEXTENCODING_ASCII_US ); - DBG_ERROR1( "Exception caught while removing empty chart types: %s", aBStr.GetBuffer()); + OSL_TRACE( "Exception caught while removing empty chart types: %s", aBStr.GetBuffer()); } } @@ -343,7 +344,7 @@ void SchXMLChartContext::StartElement( const uno::Reference< xml::sax::XAttribut if( aOldChartTypeName.getLength()<= 0 ) { - DBG_ERROR( "need a charttype to create a diagram" ); + OSL_FAIL( "need a charttype to create a diagram" ); //set a fallback value: ::rtl::OUString aChartClass_Bar( GetXMLToken(XML_BAR ) ); aOldChartTypeName = SchXMLTools::GetChartTypeByClassName( aChartClass_Bar, true /* bUseOldNames */ ); @@ -365,13 +366,13 @@ void SchXMLChartContext::StartElement( const uno::Reference< xml::sax::XAttribut { try { - xDocProp->getPropertyValue( ::rtl::OUString::createFromAscii("BaseDiagram")) >>= aOldChartTypeName; + xDocProp->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "BaseDiagram" ))) >>= aOldChartTypeName; maChartTypeServiceName = SchXMLTools::GetNewChartTypeName( aOldChartTypeName ); - xDocProp->setPropertyValue( rtl::OUString::createFromAscii( "RefreshAddInAllowed" ) , uno::makeAny( sal_False) ); + xDocProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RefreshAddInAllowed" )) , uno::makeAny( sal_False) ); } catch( uno::Exception & ) { - DBG_ERROR( "Exception during import SchXMLChartContext::StartElement" ); + OSL_FAIL( "Exception during import SchXMLChartContext::StartElement" ); } } } @@ -489,23 +490,6 @@ void lcl_swapPointAndSeriesStylesForDonutCharts( ::std::list< DataRowPointStyle } nOldSeriesCount = nMaxOldSeriesIndex+1; } - /* - sal_Int32 nOldSeriesCount = 0; - { - sal_Int32 nMaxOldSeriesIndex = 0; - sal_Int32 nOldSeriesIndex = 0; - for( aIt = rStyleList.begin(); aIt != aEnd; ++aIt ) - { - DataRowPointStyle aStyle(*aIt); - if(aStyle.meType == DataRowPointStyle::DATA_SERIES ) - { - nMaxOldSeriesIndex = nOldSeriesIndex; - nOldSeriesIndex++; - } - } - nOldSeriesCount = nMaxOldSeriesIndex+1; - } - */ //initialize new series styles @@ -641,15 +625,15 @@ void lcl_ApplyDataFromRectangularRangeToDiagram( uno::Sequence< beans::PropertyValue > aArgs( 3 ); aArgs[0] = beans::PropertyValue( - ::rtl::OUString::createFromAscii("CellRangeRepresentation"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "CellRangeRepresentation" )), -1, uno::makeAny( rRectangularRange ), beans::PropertyState_DIRECT_VALUE ); aArgs[1] = beans::PropertyValue( - ::rtl::OUString::createFromAscii("DataRowSource"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DataRowSource" )), -1, uno::makeAny( eDataRowSource ), beans::PropertyState_DIRECT_VALUE ); aArgs[2] = beans::PropertyValue( - ::rtl::OUString::createFromAscii("FirstCellAsLabel"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FirstCellAsLabel" )), -1, uno::makeAny( bFirstCellAsLabel ), beans::PropertyState_DIRECT_VALUE ); @@ -657,7 +641,7 @@ void lcl_ApplyDataFromRectangularRangeToDiagram( { aArgs.realloc( aArgs.getLength() + 1 ); aArgs[ aArgs.getLength() - 1 ] = beans::PropertyValue( - ::rtl::OUString::createFromAscii("SequenceMapping"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "SequenceMapping" )), -1, uno::makeAny( sColTrans.getLength() ? lcl_getNumberSequenceFromString( sColTrans, bHasCateories && !xNewDoc->hasInternalDataProvider() ) : lcl_getNumberSequenceFromString( sRowTrans, bHasCateories && !xNewDoc->hasInternalDataProvider() ) ), @@ -683,7 +667,7 @@ void lcl_ApplyDataFromRectangularRangeToDiagram( { aArgs.realloc( aArgs.getLength() + 1 ); aArgs[ aArgs.getLength() - 1 ] = beans::PropertyValue( - ::rtl::OUString::createFromAscii("ChartOleObjectName"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ChartOleObjectName" )), -1, uno::makeAny( aChartOleObjectName ), beans::PropertyState_DIRECT_VALUE ); } @@ -695,11 +679,11 @@ void lcl_ApplyDataFromRectangularRangeToDiagram( aArgs.realloc( aArgs.getLength() + 2 ); aArgs[ aArgs.getLength() - 2 ] = beans::PropertyValue( - ::rtl::OUString::createFromAscii("HasCategories"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HasCategories" )), -1, uno::makeAny( bHasCateories ), beans::PropertyState_DIRECT_VALUE ); aArgs[ aArgs.getLength() - 1 ] = beans::PropertyValue( - ::rtl::OUString::createFromAscii("UseCategoriesAsX"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UseCategoriesAsX")), -1, uno::makeAny( sal_False ),//categories in ODF files are not to be used as x values (independent from what is offered in our ui) beans::PropertyState_DIRECT_VALUE ); @@ -727,7 +711,7 @@ void SchXMLChartContext::EndElement() } catch( beans::UnknownPropertyException ) { - DBG_ERROR( "Property String for Title not available" ); + OSL_FAIL( "Property String for Title not available" ); } } } @@ -744,7 +728,7 @@ void SchXMLChartContext::EndElement() } catch( beans::UnknownPropertyException ) { - DBG_ERROR( "Property String for Title not available" ); + OSL_FAIL( "Property String for Title not available" ); } } } @@ -777,9 +761,9 @@ void SchXMLChartContext::EndElement() return; bool bHasOwnData = false; - if( m_aXLinkHRefAttributeToIndicateDataProvider.equalsAscii( "." ) ) //data comes from the chart itself + if( m_aXLinkHRefAttributeToIndicateDataProvider.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "." ) ) ) //data comes from the chart itself bHasOwnData = true; - else if( m_aXLinkHRefAttributeToIndicateDataProvider.equalsAscii( ".." ) ) //data comes from the parent application + else if( m_aXLinkHRefAttributeToIndicateDataProvider.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".." ) ) ) //data comes from the parent application bHasOwnData = false; else if( m_aXLinkHRefAttributeToIndicateDataProvider.getLength() ) //not supported so far to get the data by sibling objects -> fall back to chart itself if data are available bHasOwnData = m_bHasTableElement; @@ -788,7 +772,7 @@ void SchXMLChartContext::EndElement() if( xNewDoc->hasInternalDataProvider()) { - if( !m_bHasTableElement && !m_aXLinkHRefAttributeToIndicateDataProvider.equalsAscii( "." ) ) + if( !m_bHasTableElement && !m_aXLinkHRefAttributeToIndicateDataProvider.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "." ) ) ) { //#i103147# ODF, workaround broken files with a missing table:cell-range-address at the plot-area bool bSwitchSuccessful = SchXMLTools::switchBackToDataProviderFromParent( xNewDoc, maLSequencesPerIndex ); @@ -802,7 +786,7 @@ void SchXMLChartContext::EndElement() xNewDoc->createInternalDataProvider( sal_False /* bCloneExistingData */ ); } if( bHasOwnData ) - msChartAddress = ::rtl::OUString::createFromAscii("all"); + msChartAddress = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "all" )); bool bSwitchRangesFromOuterToInternalIfNecessary = false; if( !bHasOwnData && mbAllRangeAddressesAvailable ) @@ -845,11 +829,11 @@ void SchXMLChartContext::EndElement() catch( uno::Exception & ) { //try to fallback to internal data - DBG_ERROR( "Exception during import SchXMLChartContext::lcl_ApplyDataFromRectangularRangeToDiagram try to fallback to internal data" ); + OSL_FAIL( "Exception during import SchXMLChartContext::lcl_ApplyDataFromRectangularRangeToDiagram try to fallback to internal data" ); if(!bHasOwnData) { bHasOwnData = true; - msChartAddress = ::rtl::OUString::createFromAscii("all"); + msChartAddress = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "all" )); if( !xNewDoc->hasInternalDataProvider() ) { xNewDoc->createInternalDataProvider( sal_False /* bCloneExistingData */ ); @@ -860,7 +844,7 @@ void SchXMLChartContext::EndElement() } catch( uno::Exception & ) { - DBG_ERROR( "Exception during import SchXMLChartContext::lcl_ApplyDataFromRectangularRangeToDiagram fallback to internal data failed also" ); + OSL_FAIL( "Exception during import SchXMLChartContext::lcl_ApplyDataFromRectangularRangeToDiagram fallback to internal data failed also" ); } } } @@ -869,7 +853,7 @@ void SchXMLChartContext::EndElement() } else { - DBG_ERROR( " Must not get here" ); + OSL_FAIL( " Must not get here" ); } // now all series and data point properties are available and can be set @@ -934,7 +918,7 @@ void SchXMLChartContext::EndElement() } if( xProp.is()) - xProp->setPropertyValue( rtl::OUString::createFromAscii( "RefreshAddInAllowed" ) , uno::makeAny( sal_True) ); + xProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RefreshAddInAllowed" )) , uno::makeAny( sal_True) ); } void SchXMLChartContext::MergeSeriesForStockChart() @@ -963,7 +947,7 @@ void SchXMLChartContext::MergeSeriesForStockChart() { xDSContainer.set( aChartTypes[nCTIdx], uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xCTProp( aChartTypes[nCTIdx], uno::UNO_QUERY_THROW ); - xCTProp->getPropertyValue( ::rtl::OUString::createFromAscii("Japanese")) >>= bHasJapaneseCandlestick; + xCTProp->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Japanese" ))) >>= bHasJapaneseCandlestick; break; } } @@ -985,34 +969,34 @@ void SchXMLChartContext::MergeSeriesForStockChart() if( bHasJapaneseCandlestick ) { // open values - lcl_setRoleAtFirstSequence( aSeriesSeq[ nSeriesIndex ], OUString::createFromAscii("values-first")); + lcl_setRoleAtFirstSequence( aSeriesSeq[ nSeriesIndex ], OUString(RTL_CONSTASCII_USTRINGPARAM( "values-first" ))); aNewSeries[i] = aSeriesSeq[ nSeriesIndex ]; // low values lcl_MoveDataToCandleStickSeries( uno::Reference< chart2::data::XDataSource >( aSeriesSeq[ ++nSeriesIndex ], uno::UNO_QUERY_THROW ), - aNewSeries[i], OUString::createFromAscii("values-min")); + aNewSeries[i], OUString(RTL_CONSTASCII_USTRINGPARAM( "values-min" ))); } else { // low values - lcl_setRoleAtFirstSequence( aSeriesSeq[ nSeriesIndex ], OUString::createFromAscii("values-min")); + lcl_setRoleAtFirstSequence( aSeriesSeq[ nSeriesIndex ], OUString(RTL_CONSTASCII_USTRINGPARAM( "values-min" ))); aNewSeries[i] = aSeriesSeq[ nSeriesIndex ]; } // high values lcl_MoveDataToCandleStickSeries( uno::Reference< chart2::data::XDataSource >( aSeriesSeq[ ++nSeriesIndex ], uno::UNO_QUERY_THROW ), - aNewSeries[i], OUString::createFromAscii("values-max")); + aNewSeries[i], OUString(RTL_CONSTASCII_USTRINGPARAM( "values-max" ))); // close values lcl_MoveDataToCandleStickSeries( uno::Reference< chart2::data::XDataSource >( aSeriesSeq[ ++nSeriesIndex ], uno::UNO_QUERY_THROW ), - aNewSeries[i], OUString::createFromAscii("values-last")); + aNewSeries[i], OUString(RTL_CONSTASCII_USTRINGPARAM( "values-last" ))); } xDSContainer->setDataSeries( aNewSeries ); } } catch( uno::Exception & ) { - DBG_ERROR( "Exception while merging series for stock chart" ); + OSL_FAIL( "Exception while merging series for stock chart" ); } } @@ -1048,7 +1032,7 @@ SvXMLImportContext* SchXMLChartContext::CreateChildContext( { if( xProp.is()) { - xProp->setPropertyValue( rtl::OUString::createFromAscii( "HasMainTitle" ), aTrueBool ); + xProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HasMainTitle" )), aTrueBool ); } uno::Reference< drawing::XShape > xTitleShape( xDoc->getTitle(), uno::UNO_QUERY ); pContext = new SchXMLTitleContext( mrImportHelper, GetImport(), @@ -1061,7 +1045,7 @@ SvXMLImportContext* SchXMLChartContext::CreateChildContext( { if( xProp.is()) { - xProp->setPropertyValue( rtl::OUString::createFromAscii( "HasSubTitle" ), aTrueBool ); + xProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HasSubTitle" )), aTrueBool ); } uno::Reference< drawing::XShape > xTitleShape( xDoc->getSubTitle(), uno::UNO_QUERY ); pContext = new SchXMLTitleContext( mrImportHelper, GetImport(), @@ -1259,3 +1243,6 @@ SvXMLImportContext* SchXMLTitleContext::CreateChildContext( } // ---------------------------------------- + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/SchXMLChartContext.hxx b/xmloff/source/chart/SchXMLChartContext.hxx index e34b50c4f62d..af50fc5df26c 100644 --- a/xmloff/source/chart/SchXMLChartContext.hxx +++ b/xmloff/source/chart/SchXMLChartContext.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. @@ -172,3 +173,5 @@ public: }; #endif // _SCH_XMLCHARTCONTEXT_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/SchXMLEnumConverter.cxx b/xmloff/source/chart/SchXMLEnumConverter.cxx index fd4d7914a2fe..fd4d7914a2fe 100755..100644 --- a/xmloff/source/chart/SchXMLEnumConverter.cxx +++ b/xmloff/source/chart/SchXMLEnumConverter.cxx diff --git a/xmloff/source/chart/SchXMLEnumConverter.hxx b/xmloff/source/chart/SchXMLEnumConverter.hxx index 63a9fb7ffb95..63a9fb7ffb95 100755..100644 --- a/xmloff/source/chart/SchXMLEnumConverter.hxx +++ b/xmloff/source/chart/SchXMLEnumConverter.hxx diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index 9e9ea12d40e2..f87160839d03 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.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. @@ -256,8 +257,9 @@ public: void exportText( const ::rtl::OUString& rText, bool bConvertTabsLFs = false ); void exportErrorBarRanges(); +private: SchXMLExportHelper_Impl(SchXMLExportHelper_Impl &); // not defined - void operator =(SchXMLExportHelper_Impl &); // not defined + SchXMLExportHelper_Impl operator =(SchXMLExportHelper_Impl &); // not defined public: SvXMLExport& mrExport; @@ -295,7 +297,7 @@ Reference< uno::XComponentContext > lcl_getComponentContext() { Reference< beans::XPropertySet > xFactProp( comphelper::getProcessServiceFactory(), uno::UNO_QUERY ); if( xFactProp.is()) - xFactProp->getPropertyValue(OUString::createFromAscii("DefaultContext")) >>= xContext; + xFactProp->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))) >>= xContext; } catch( uno::Exception& ) {} @@ -378,7 +380,7 @@ Reference< chart2::data::XLabeledDataSequence > lcl_getCategories( const Referen catch( uno::Exception & ex ) { (void)ex; // avoid warning for pro build - OSL_ENSURE( false, OUStringToOString( + OSL_FAIL( OUStringToOString( OUString( RTL_CONSTASCII_USTRINGPARAM( "Exception caught. Type: " )) + OUString::createFromAscii( typeid( ex ).name()) + OUString( RTL_CONSTASCII_USTRINGPARAM( ", Message: " )) + @@ -396,7 +398,7 @@ Reference< chart2::data::XDataSource > lcl_createDataSource( if( xContext.is() ) xSink.set( xContext->getServiceManager()->createInstanceWithContext( - OUString::createFromAscii("com.sun.star.chart2.data.DataSource"), + OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.data.DataSource" )), xContext ), uno::UNO_QUERY_THROW ); if( xSink.is()) xSink->setData( aData ); @@ -462,12 +464,12 @@ Reference< chart2::data::XDataSource > lcl_pressUsedDataIntoRectangularFormat( c //the first x-values is always the next sequence //todo ... other x-values get lost for old format Reference< chart2::data::XLabeledDataSequence > xXValues( - lcl_getDataSequenceByRole( aSeriesSeqVector, OUString::createFromAscii("values-x" ) ) ); + lcl_getDataSequenceByRole( aSeriesSeqVector, OUString(RTL_CONSTASCII_USTRINGPARAM( "values-x" )) ) ); if( xXValues.is() ) aLabeledSeqVector.push_back( xXValues ); //add all other sequences now without x-values - lcl_MatchesRole aHasXValues( OUString::createFromAscii("values-x" ) ); + lcl_MatchesRole aHasXValues( OUString(RTL_CONSTASCII_USTRINGPARAM( "values-x" )) ); for( sal_Int32 nN=0; nN<aSeriesSeqVector.getLength(); nN++ ) { if( !aHasXValues( aSeriesSeqVector[nN] ) ) @@ -496,7 +498,7 @@ bool lcl_isSeriesAttachedToFirstAxis( catch( uno::Exception & ex ) { (void)ex; // avoid warning for pro build - OSL_ENSURE( false, OUStringToOString( + OSL_FAIL( OUStringToOString( OUString( RTL_CONSTASCII_USTRINGPARAM( "Exception caught. Type: " )) + OUString::createFromAscii( typeid( ex ).name()) + OUString( RTL_CONSTASCII_USTRINGPARAM( ", Message: " )) + @@ -580,7 +582,7 @@ bool lcl_hasChartType( const Reference< chart2::XDiagram > & xDiagram, const OUS } catch( uno::Exception & ) { - DBG_ERROR( "Exception while searching for chart type in diagram" ); + OSL_FAIL( "Exception while searching for chart type in diagram" ); } return false; } @@ -995,10 +997,6 @@ void lcl_exportNumberFormat( const OUString& rPropertyName, const Reference< bea return aResult; const OUString aRolePrefix( RTL_CONSTASCII_USTRINGPARAM( "error-bars-" )); -// const OUString aXRolePrefix( aRolePrefix + OUString( RTL_CONSTASCII_USTRINGPARAM( "x-" ))); -// const OUString aYRolePrefix( aRolePrefix + OUString( RTL_CONSTASCII_USTRINGPARAM( "y-" ))); -// const OUString aPositivePostfix( RTL_CONSTASCII_USTRINGPARAM( "positive" )); -// const OUString aNegativePostfix( RTL_CONSTASCII_USTRINGPARAM( "negative" )); Sequence< Reference< chart2::data::XLabeledDataSequence > > aSequences( xErrorBarDataSource->getDataSequences()); @@ -1024,7 +1022,7 @@ void lcl_exportNumberFormat( const OUString& rPropertyName, const Reference< bea #ifdef DBG_UTIL String aStr( rEx.Message ); ByteString aBStr( aStr, RTL_TEXTENCODING_ASCII_US ); - DBG_ERROR1( "chart:exporting error bar ranges: %s", aBStr.GetBuffer()); + OSL_TRACE( "chart:exporting error bar ranges: %s", aBStr.GetBuffer()); #else (void)rEx; // avoid warning #endif @@ -1145,7 +1143,7 @@ SchXMLExportHelper_Impl::SchXMLExportHelper_Impl( msCLSID = OUString( SvGlobalName( SO3_SCH_CLASSID ).GetHexName()); } - msTableName = OUString::createFromAscii( "local-table" ); + msTableName = OUString(RTL_CONSTASCII_USTRINGPARAM( "local-table" )); // create factory mxPropertyHandlerFactory = new XMLChartPropHdlFactory; @@ -1161,16 +1159,16 @@ SchXMLExportHelper_Impl::SchXMLExportHelper_Impl( // register chart auto-style family mrAutoStylePool.AddFamily( XML_STYLE_FAMILY_SCH_CHART_ID, - OUString::createFromAscii( XML_STYLE_FAMILY_SCH_CHART_NAME ), + OUString(RTL_CONSTASCII_USTRINGPARAM( XML_STYLE_FAMILY_SCH_CHART_NAME )), mxExpPropMapper.get(), - OUString::createFromAscii( XML_STYLE_FAMILY_SCH_CHART_PREFIX )); + OUString(RTL_CONSTASCII_USTRINGPARAM( XML_STYLE_FAMILY_SCH_CHART_PREFIX ))); // register shape family mrAutoStylePool.AddFamily( XML_STYLE_FAMILY_SD_GRAPHICS_ID, - OUString::createFromAscii( XML_STYLE_FAMILY_SD_GRAPHICS_NAME ), + OUString(RTL_CONSTASCII_USTRINGPARAM( XML_STYLE_FAMILY_SD_GRAPHICS_NAME )), mxExpPropMapper.get(), - OUString::createFromAscii( XML_STYLE_FAMILY_SD_GRAPHICS_PREFIX )); + OUString(RTL_CONSTASCII_USTRINGPARAM( XML_STYLE_FAMILY_SD_GRAPHICS_PREFIX ))); // register paragraph family also for shapes mrAutoStylePool.AddFamily( XML_STYLE_FAMILY_TEXT_PARAGRAPH, @@ -1232,7 +1230,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >& Reference< chart2::XChartDocument > xNewDoc( rChartDoc, uno::UNO_QUERY ); if( !rChartDoc.is() || !xNewDoc.is() ) { - DBG_ERROR( "No XChartDocument was given for export." ); + OSL_FAIL( "No XChartDocument was given for export." ); return; } @@ -1296,7 +1294,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >& { DBG_WARNING( "Required property not found in ChartDocument" ); } - } // if( xDocPropSet.is()) + } if ( bIncludeTable && (aNullDate.Day != 30 || aNullDate.Month != 12 || aNullDate.Year != 1899 ) ) { @@ -1595,7 +1593,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >& // get a sequence of non-chart shapes (inserted via clipboard) try { - Any aShapesAny = xDocPropSet->getPropertyValue( OUString::createFromAscii( "AdditionalShapes" )); + Any aShapesAny = xDocPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( "AdditionalShapes" ))); aShapesAny >>= mxAdditionalShapes; } catch( uno::Exception & rEx ) @@ -1641,8 +1639,6 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >& rShapeExport->collectShapeAutoStyles( xShape ); } - // this would be the easier way if it worked: - // mrExport.GetShapeExport()->collectShapesAutoStyles( mxAdditionalShapes ); } } } @@ -2063,7 +2059,7 @@ void SchXMLExportHelper_Impl::exportPlotArea( #ifdef DBG_UTIL String aStr( rEx.Message ); ByteString aBStr( aStr, RTL_TEXTENCODING_ASCII_US ); - DBG_ERROR1( "chart:TableNumberList property caught: %s", aBStr.GetBuffer()); + OSL_TRACE( "chart:TableNumberList property caught: %s", aBStr.GetBuffer()); #else (void)rEx; // avoid warning #endif @@ -2100,7 +2096,7 @@ void SchXMLExportHelper_Impl::exportPlotArea( #ifdef DBG_UTIL String aStr( rEx.Message ); ByteString aBStr( aStr, RTL_TEXTENCODING_ASCII_US ); - DBG_ERROR1( "chart:exportPlotAreaException caught: %s", aBStr.GetBuffer()); + OSL_TRACE( "chart:exportPlotAreaException caught: %s", aBStr.GetBuffer()); #else (void)rEx; // avoid warning #endif @@ -2320,7 +2316,7 @@ void SchXMLExportHelper_Impl::exportDateScale( const Reference< beans::XProperty return; chart::TimeIncrement aIncrement; - if( (xAxisProps->getPropertyValue( OUString::createFromAscii( "TimeIncrement" )) >>= aIncrement) ) + if( (xAxisProps->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( "TimeIncrement" ))) >>= aIncrement) ) { sal_Int32 nTimeResolution = ::com::sun::star::chart::TimeUnit::DAY; if( aIncrement.TimeResolution >>= nTimeResolution ) @@ -2444,7 +2440,7 @@ void SchXMLExportHelper_Impl::exportAxis( bool bHasTitle, bool bHasMajorGrid, bool bHasMinorGrid, bool bExportContent ) { - static const OUString sNumFormat( OUString::createFromAscii( "NumberFormat" )); + static const OUString sNumFormat( OUString(RTL_CONSTASCII_USTRINGPARAM( "NumberFormat" ))); std::vector< XMLPropertyState > aPropertyStates; SvXMLElementExport* pAxis = NULL; @@ -2728,8 +2724,8 @@ void SchXMLExportHelper_Impl::exportSeries( std::vector< XMLPropertyState > aPropertyStates; - const OUString sNumFormat( OUString::createFromAscii( "NumberFormat" )); - const OUString sPercentageNumFormat( OUString::createFromAscii( "PercentageNumberFormat" )); + const OUString sNumFormat(RTL_CONSTASCII_USTRINGPARAM("NumberFormat")); + const OUString sPercentageNumFormat(RTL_CONSTASCII_USTRINGPARAM( "PercentageNumberFormat")); Sequence< Reference< chart2::XCoordinateSystem > > aCooSysSeq( xBCooSysCnt->getCoordinateSystems()); @@ -2754,7 +2750,7 @@ void SchXMLExportHelper_Impl::exportSeries( sal_Bool bJapaneseCandleSticks = sal_False; Reference< beans::XPropertySet > xCTProp( aCTSeq[nCTIdx], uno::UNO_QUERY ); if( xCTProp.is()) - xCTProp->getPropertyValue( OUString::createFromAscii("Japanese")) >>= bJapaneseCandleSticks; + xCTProp->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( "Japanese" ))) >>= bJapaneseCandleSticks; exportCandleStickSeries( xDSCnt->getDataSeries(), xNewDiagram, bJapaneseCandleSticks, bExportContent ); continue; @@ -2771,7 +2767,6 @@ void SchXMLExportHelper_Impl::exportSeries( SvXMLElementExport* pSeries = NULL; Sequence< Reference< chart2::data::XLabeledDataSequence > > aSeqCnt( xSource->getDataSequences()); - sal_Int32 nMainSequenceIndex = -1; sal_Int32 nSeriesLength = 0; sal_Int32 nAttachedAxis = chart::ChartAxisAssign::PRIMARY_Y; sal_Bool bHasMeanValueLine = false; @@ -2786,6 +2781,7 @@ void SchXMLExportHelper_Impl::exportSeries( Reference< chart2::data::XDataSequence > xValuesSeq; Reference< chart2::data::XDataSequence > xLabelSeq; sal_Int32 nSeqIdx=0; + sal_Int32 nMainSequenceIndex = -1; for( ; nSeqIdx<aSeqCnt.getLength(); ++nSeqIdx ) { OUString aRole; @@ -2794,7 +2790,7 @@ void SchXMLExportHelper_Impl::exportSeries( { Reference< beans::XPropertySet > xSeqProp( xTempValueSeq, uno::UNO_QUERY ); if( xSeqProp.is()) - xSeqProp->getPropertyValue(OUString::createFromAscii("Role")) >>= aRole; + xSeqProp->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM( "Role" ))) >>= aRole; // "main" sequence if( aRole.equals( aLabelRole )) { @@ -2936,7 +2932,7 @@ void SchXMLExportHelper_Impl::exportSeries( Reference< chart2::data::XDataSequence > xYValuesForBubbleChart; if( bIsBubbleChart ) { - Reference< chart2::data::XLabeledDataSequence > xSequence( lcl_getDataSequenceByRole( aSeqCnt, OUString::createFromAscii("values-y" ) ) ); + Reference< chart2::data::XLabeledDataSequence > xSequence( lcl_getDataSequenceByRole( aSeqCnt, OUString(RTL_CONSTASCII_USTRINGPARAM( "values-y" )) ) ); if( xSequence.is() ) { xYValuesForBubbleChart = xSequence->getValues(); @@ -2946,7 +2942,7 @@ void SchXMLExportHelper_Impl::exportSeries( } if( bIsScatterChart || bIsBubbleChart ) { - Reference< chart2::data::XLabeledDataSequence > xSequence( lcl_getDataSequenceByRole( aSeqCnt, OUString::createFromAscii("values-x" ) ) ); + Reference< chart2::data::XLabeledDataSequence > xSequence( lcl_getDataSequenceByRole( aSeqCnt, OUString(RTL_CONSTASCII_USTRINGPARAM( "values-x" )) ) ); if( xSequence.is() ) { Reference< chart2::data::XDataSequence > xValues( xSequence->getValues() ); @@ -2992,7 +2988,7 @@ void SchXMLExportHelper_Impl::exportSeries( catch( uno::Exception & rEx ) { (void)rEx; // avoid warning for pro build - DBG_ERROR1( "Exception caught during Export of series - optional DataMeanValueProperties not available: %s", + OSL_TRACE( "Exception caught during Export of series - optional DataMeanValueProperties not available: %s", OUStringToOString( rEx.Message, RTL_TEXTENCODING_ASCII_US ).getStr() ); } @@ -3040,7 +3036,7 @@ void SchXMLExportHelper_Impl::exportSeries( catch( uno::Exception & rEx ) { (void)rEx; // avoid warning for pro build - DBG_ERROR1( "Exception caught during Export of series - optional DataErrorProperties not available: %s", + OSL_TRACE( "Exception caught during Export of series - optional DataErrorProperties not available: %s", OUStringToOString( rEx.Message, RTL_TEXTENCODING_ASCII_US ).getStr() ); } @@ -3116,7 +3112,7 @@ void SchXMLExportHelper_Impl::exportRegressionCurve( catch( uno::Exception & rEx ) { (void)rEx; // avoid warning for pro build - DBG_ERROR1( "Exception caught during Export of series - optional DataRegressionProperties not available: %s", + OSL_TRACE( "Exception caught during Export of series - optional DataRegressionProperties not available: %s", OUStringToOString( rEx.Message, RTL_TEXTENCODING_ASCII_US ).getStr() ); } @@ -3209,7 +3205,6 @@ void SchXMLExportHelper_Impl::exportCandleStickSeries( sal_Bool bJapaneseCandleSticks, sal_Bool bExportContent ) { -// std::vector< XMLPropertyState > aPropertyStates; for( sal_Int32 nSeriesIdx=0; nSeriesIdx<aSeriesSeq.getLength(); ++nSeriesIdx ) { @@ -3228,7 +3223,7 @@ void SchXMLExportHelper_Impl::exportCandleStickSeries( xSource->getDataSequences()); sal_Int32 nSeriesLength = - lcl_getSequenceLengthByRole( aSeqCnt, OUString::createFromAscii("values-last")); + lcl_getSequenceLengthByRole( aSeqCnt, OUString(RTL_CONSTASCII_USTRINGPARAM( "values-last" ))); if( bExportContent ) { @@ -3239,7 +3234,7 @@ void SchXMLExportHelper_Impl::exportCandleStickSeries( if( bJapaneseCandleSticks ) { tLabelAndValueRange aRanges( lcl_getLabelAndValueRangeByRole( - aSeqCnt, OUString::createFromAscii("values-first"), xNewDoc, m_aDataSequencesToExport )); + aSeqCnt, OUString(RTL_CONSTASCII_USTRINGPARAM( "values-first" )), xNewDoc, m_aDataSequencesToExport )); if( aRanges.second.getLength()) mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_VALUES_CELL_RANGE_ADDRESS, aRanges.second ); if( aRanges.first.getLength()) @@ -3256,7 +3251,7 @@ void SchXMLExportHelper_Impl::exportCandleStickSeries( // low { tLabelAndValueRange aRanges( lcl_getLabelAndValueRangeByRole( - aSeqCnt, OUString::createFromAscii("values-min"), xNewDoc, m_aDataSequencesToExport )); + aSeqCnt, OUString(RTL_CONSTASCII_USTRINGPARAM( "values-min" )), xNewDoc, m_aDataSequencesToExport )); if( aRanges.second.getLength()) mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_VALUES_CELL_RANGE_ADDRESS, aRanges.second ); if( aRanges.first.getLength()) @@ -3273,7 +3268,7 @@ void SchXMLExportHelper_Impl::exportCandleStickSeries( // high { tLabelAndValueRange aRanges( lcl_getLabelAndValueRangeByRole( - aSeqCnt, OUString::createFromAscii("values-max"), xNewDoc, m_aDataSequencesToExport )); + aSeqCnt, OUString(RTL_CONSTASCII_USTRINGPARAM( "values-max" )), xNewDoc, m_aDataSequencesToExport )); if( aRanges.second.getLength()) mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_VALUES_CELL_RANGE_ADDRESS, aRanges.second ); if( aRanges.first.getLength()) @@ -3290,7 +3285,7 @@ void SchXMLExportHelper_Impl::exportCandleStickSeries( // close { tLabelAndValueRange aRanges( lcl_getLabelAndValueRangeByRole( - aSeqCnt, OUString::createFromAscii("values-last"), xNewDoc, m_aDataSequencesToExport )); + aSeqCnt, OUString(RTL_CONSTASCII_USTRINGPARAM( "values-last" )), xNewDoc, m_aDataSequencesToExport )); if( aRanges.second.getLength()) mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_VALUES_CELL_RANGE_ADDRESS, aRanges.second ); if( aRanges.first.getLength()) @@ -3299,12 +3294,6 @@ void SchXMLExportHelper_Impl::exportCandleStickSeries( mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_ATTACHED_AXIS, XML_SECONDARY_Y ); else mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_ATTACHED_AXIS, XML_PRIMARY_Y ); - // write style name -// AddAutoStyleAttribute( aPropertyStates ); - // chart type -// mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_CLASS, -// mrExport.GetNamespaceMap().GetQNameByKey( -// XML_NAMESPACE_CHART, GetXMLToken( XML_STOCK ))); SvXMLElementExport aCloseSeries( mrExport, XML_NAMESPACE_CHART, XML_SERIES, sal_True, sal_True ); // export empty data points exportDataPoints( 0, nSeriesLength, xDiagram, bExportContent ); @@ -3313,10 +3302,8 @@ void SchXMLExportHelper_Impl::exportCandleStickSeries( else // autostyles { // for close series -// CollectAutoStyle( aPropertyStates ); } // remove property states for autostyles -// aPropertyStates.clear(); } } } @@ -3346,8 +3333,8 @@ void SchXMLExportHelper_Impl::exportDataPoints( std::vector< XMLPropertyState > aPropertyStates; - const OUString sNumFormat( OUString::createFromAscii( "NumberFormat" )); - const OUString sPercentageNumFormat( OUString::createFromAscii( "PercentageNumberFormat" )); + const OUString sNumFormat(RTL_CONSTASCII_USTRINGPARAM("NumberFormat")); + const OUString sPercentageNumFormat(RTL_CONSTASCII_USTRINGPARAM( "PercentageNumberFormat")); bool bVaryColorsByPoint = false; Sequence< sal_Int32 > aDataPointSeq; @@ -3373,9 +3360,6 @@ void SchXMLExportHelper_Impl::exportDataPoints( ::std::list< SchXMLDataPointStruct > aDataPointList; - sal_Int32 nLastIndex = -1; - sal_Int32 nCurrIndex = 0; - // collect elements if( bVaryColorsByPoint && xColorScheme.is() ) { @@ -3399,7 +3383,7 @@ void SchXMLExportHelper_Impl::exportDataPoints( catch( uno::Exception & rEx ) { (void)rEx; // avoid warning for pro build - DBG_ERROR1( "Exception caught during Export of data point: %s", + OSL_TRACE( "Exception caught during Export of data point: %s", OUStringToOString( rEx.Message, RTL_TEXTENCODING_ASCII_US ).getStr() ); } } @@ -3444,6 +3428,10 @@ void SchXMLExportHelper_Impl::exportDataPoints( } else { + + sal_Int32 nLastIndex = -1; + sal_Int32 nCurrIndex = 0; + for( nElement = 0; nElement < nSize; ++nElement ) { aPropertyStates.clear(); @@ -3471,7 +3459,7 @@ void SchXMLExportHelper_Impl::exportDataPoints( catch( uno::Exception & rEx ) { (void)rEx; // avoid warning for pro build - DBG_ERROR1( "Exception caught during Export of data point: %s", + OSL_TRACE( "Exception caught during Export of data point: %s", OUStringToOString( rEx.Message, RTL_TEXTENCODING_ASCII_US ).getStr() ); } if( xPropSet.is()) @@ -3715,7 +3703,7 @@ void SchXMLExport::_ExportAutoStyles() } else { - DBG_ERROR( "Couldn't export chart due to wrong XModel (must be XChartDocument)" ); + OSL_FAIL( "Couldn't export chart due to wrong XModel (must be XChartDocument)" ); } } } @@ -3748,7 +3736,7 @@ void SchXMLExport::_ExportContent() if( xServ.is()) { if( xServ->supportsService( - OUString::createFromAscii( "com.sun.star.chart.ChartTableAddressSupplier" ))) + OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart.ChartTableAddressSupplier" )))) { Reference< beans::XPropertySet > xProp( xServ, uno::UNO_QUERY ); if( xProp.is()) @@ -3758,13 +3746,13 @@ void SchXMLExport::_ExportContent() { OUString sChartAddress; aAny = xProp->getPropertyValue( - OUString::createFromAscii( "ChartRangeAddress" )); + OUString(RTL_CONSTASCII_USTRINGPARAM( "ChartRangeAddress" ))); aAny >>= sChartAddress; maExportHelper.m_pImpl->SetChartRangeAddress( sChartAddress ); OUString sTableNumberList; aAny = xProp->getPropertyValue( - OUString::createFromAscii( "TableNumberList" )); + OUString(RTL_CONSTASCII_USTRINGPARAM( "TableNumberList" ))); aAny >>= sTableNumberList; maExportHelper.m_pImpl->SetTableNumberList( sTableNumberList ); @@ -3773,7 +3761,7 @@ void SchXMLExport::_ExportContent() } catch( beans::UnknownPropertyException & ) { - DBG_ERROR( "Property ChartRangeAddress not supported by ChartDocument" ); + OSL_FAIL( "Property ChartRangeAddress not supported by ChartDocument" ); } } } @@ -3783,7 +3771,7 @@ void SchXMLExport::_ExportContent() } else { - DBG_ERROR( "Couldn't export chart due to wrong XModel" ); + OSL_FAIL( "Couldn't export chart due to wrong XModel" ); } } @@ -3851,7 +3839,7 @@ void SchXMLExportHelper_Impl::InitRangeSegmentationProperties( const Reference< catch( uno::Exception & ex ) { (void)ex; // avoid warning for pro build - OSL_ENSURE( false, OUStringToOString( + OSL_FAIL( OUStringToOString( OUString( RTL_CONSTASCII_USTRINGPARAM( "Exception caught. Type: " )) + OUString::createFromAscii( typeid( ex ).name()) + OUString( RTL_CONSTASCII_USTRINGPARAM( ", Message: " )) + @@ -3879,7 +3867,6 @@ Reference< uno::XInterface > SAL_CALL SchXMLExport_createInstance(const Referenc { // #110680# // #103997# removed some flags from EXPORT_ALL - // return (cppu::OWeakObject*)new SchXMLExport( EXPORT_ALL ^ ( EXPORT_SETTINGS | EXPORT_MASTERSTYLES | EXPORT_SCRIPTS )); return (cppu::OWeakObject*)new SchXMLExport( rSMgr, EXPORT_ALL ^ ( EXPORT_SETTINGS | EXPORT_MASTERSTYLES | EXPORT_SCRIPTS )); } @@ -3922,7 +3909,6 @@ OUString SAL_CALL SchXMLExport_Styles_getImplementationName() throw() Reference< uno::XInterface > SAL_CALL SchXMLExport_Styles_createInstance(const Reference< lang::XMultiServiceFactory >& rSMgr) throw( uno::Exception ) { // #110680# - // return (cppu::OWeakObject*)new SchXMLExport( EXPORT_STYLES ); return (cppu::OWeakObject*)new SchXMLExport( rSMgr, EXPORT_STYLES ); } @@ -3961,7 +3947,6 @@ OUString SAL_CALL SchXMLExport_Content_getImplementationName() throw() Reference< uno::XInterface > SAL_CALL SchXMLExport_Content_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) throw( uno::Exception ) { // #110680# - // return (cppu::OWeakObject*)new SchXMLExport( EXPORT_AUTOSTYLES | EXPORT_CONTENT | EXPORT_FONTDECLS ); return (cppu::OWeakObject*)new SchXMLExport( rSMgr, EXPORT_AUTOSTYLES | EXPORT_CONTENT | EXPORT_FONTDECLS ); } @@ -3985,23 +3970,6 @@ Reference< uno::XInterface > SAL_CALL SchXMLExport_Oasis_Content_createInstance( // ------------------------------------------------------------ -// Sequence< OUString > SAL_CALL SchXMLExport_Meta_getSupportedServiceNames() throw() -// { -// const OUString aServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Chart.XMLMetaExporter" )); -// const Sequence< OUString > aSeq( &aServiceName, 1 ); -// return aSeq; -// } - -// OUString SAL_CALL SchXMLExport_Meta_getImplementationName() throw() -// { -// return OUString( RTL_CONSTASCII_USTRINGPARAM( "SchXMLExport.Meta" )); -// } - -// Reference< uno::XInterface > SAL_CALL SchXMLExport_Meta_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) throw( uno::Exception ) -// { -// return (cppu::OWeakObject*)new SchXMLExport( EXPORT_META ); -// } - // Oasis format Sequence< OUString > SAL_CALL SchXMLExport_Oasis_Meta_getSupportedServiceNames() throw() { @@ -4032,8 +4000,6 @@ OUString SAL_CALL SchXMLExport::getImplementationName() throw( uno::RuntimeExcep return SchXMLExport_Styles_getImplementationName(); case ( EXPORT_AUTOSTYLES | EXPORT_CONTENT | EXPORT_FONTDECLS ): return SchXMLExport_Content_getImplementationName(); -// case EXPORT_META: -// return SchXMLExport_Meta_getImplementationName(); // Oasis format case ( EXPORT_ALL | EXPORT_OASIS ): @@ -4048,6 +4014,8 @@ OUString SAL_CALL SchXMLExport::getImplementationName() throw( uno::RuntimeExcep case EXPORT_SETTINGS: // there is no settings component in chart default: - return OUString::createFromAscii( "SchXMLExport" ); + return OUString(RTL_CONSTASCII_USTRINGPARAM( "SchXMLExport" )); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx index 12bea7e50e1b..387f3a453eda 100644 --- a/xmloff/source/chart/SchXMLImport.cxx +++ b/xmloff/source/chart/SchXMLImport.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,7 +81,7 @@ Reference< uno::XComponentContext > lcl_getComponentContext() { Reference< beans::XPropertySet > xFactProp( comphelper::getProcessServiceFactory(), uno::UNO_QUERY ); if( xFactProp.is()) - xFactProp->getPropertyValue(OUString::createFromAscii("DefaultContext")) >>= xContext; + xFactProp->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))) >>= xContext; } catch( uno::Exception& ) {} @@ -195,7 +196,7 @@ SvXMLImportContext* SchXMLImportHelper::CreateChartContext( } else { - DBG_ERROR( "No valid XChartDocument given as XModel" ); + OSL_FAIL( "No valid XChartDocument given as XModel" ); pContext = new SvXMLImportContext( rImport, nPrefix, rLocalName ); } @@ -210,7 +211,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetDocElemTokenMap() { if( ! mpChartDocElemTokenMap ) { - static __FAR_DATA SvXMLTokenMapEntry aDocElemTokenMap[] = + static SvXMLTokenMapEntry aDocElemTokenMap[] = { { XML_NAMESPACE_OFFICE, XML_AUTOMATIC_STYLES, XML_TOK_DOC_AUTOSTYLES }, { XML_NAMESPACE_OFFICE, XML_STYLES, XML_TOK_DOC_STYLES }, @@ -229,7 +230,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetTableElemTokenMap() { if( ! mpTableElemTokenMap ) { - static __FAR_DATA SvXMLTokenMapEntry aTableElemTokenMap[] = + static SvXMLTokenMapEntry aTableElemTokenMap[] = { { XML_NAMESPACE_TABLE, XML_TABLE_HEADER_COLUMNS, XML_TOK_TABLE_HEADER_COLS }, { XML_NAMESPACE_TABLE, XML_TABLE_COLUMNS, XML_TOK_TABLE_COLUMNS }, @@ -250,7 +251,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetChartElemTokenMap() { if( ! mpChartElemTokenMap ) { - static __FAR_DATA SvXMLTokenMapEntry aChartElemTokenMap[] = + static SvXMLTokenMapEntry aChartElemTokenMap[] = { { XML_NAMESPACE_CHART, XML_PLOT_AREA, XML_TOK_CHART_PLOT_AREA }, { XML_NAMESPACE_CHART, XML_TITLE, XML_TOK_CHART_TITLE }, @@ -270,7 +271,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetPlotAreaElemTokenMap() { if( ! mpPlotAreaElemTokenMap ) { - static __FAR_DATA SvXMLTokenMapEntry aPlotAreaElemTokenMap[] = + static SvXMLTokenMapEntry aPlotAreaElemTokenMap[] = { { XML_NAMESPACE_CHART_EXT, XML_COORDINATE_REGION, XML_TOK_PA_COORDINATE_REGION_EXT }, { XML_NAMESPACE_CHART, XML_COORDINATE_REGION, XML_TOK_PA_COORDINATE_REGION }, @@ -295,7 +296,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetSeriesElemTokenMap() { if( ! mpSeriesElemTokenMap ) { - static __FAR_DATA SvXMLTokenMapEntry aSeriesElemTokenMap[] = + static SvXMLTokenMapEntry aSeriesElemTokenMap[] = { { XML_NAMESPACE_CHART, XML_DATA_POINT, XML_TOK_SERIES_DATA_POINT }, { XML_NAMESPACE_CHART, XML_DOMAIN, XML_TOK_SERIES_DOMAIN }, @@ -317,7 +318,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetChartAttrTokenMap() { if( ! mpChartAttrTokenMap ) { - static __FAR_DATA SvXMLTokenMapEntry aChartAttrTokenMap[] = + static SvXMLTokenMapEntry aChartAttrTokenMap[] = { { XML_NAMESPACE_XLINK, XML_HREF, XML_TOK_CHART_HREF }, { XML_NAMESPACE_CHART, XML_CLASS, XML_TOK_CHART_CLASS }, @@ -339,7 +340,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetPlotAreaAttrTokenMap() { if( ! mpPlotAreaAttrTokenMap ) { - static __FAR_DATA SvXMLTokenMapEntry aPlotAreaAttrTokenMap[] = + static SvXMLTokenMapEntry aPlotAreaAttrTokenMap[] = { { XML_NAMESPACE_SVG, XML_X, XML_TOK_PA_X }, { XML_NAMESPACE_SVG, XML_Y, XML_TOK_PA_Y }, @@ -372,7 +373,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetAutoStyleAttrTokenMap() { if( ! mpAutoStyleAttrTokenMap ) { - static __FAR_DATA SvXMLTokenMapEntry aAutoStyleAttrTokenMap[] = + static SvXMLTokenMapEntry aAutoStyleAttrTokenMap[] = { { XML_NAMESPACE_STYLE, XML_FAMILY, XML_TOK_AS_FAMILY }, { XML_NAMESPACE_STYLE, XML_NAME, XML_TOK_AS_NAME }, @@ -389,7 +390,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetCellAttrTokenMap() { if( ! mpCellAttrTokenMap ) { - static __FAR_DATA SvXMLTokenMapEntry aCellAttrTokenMap[] = + static SvXMLTokenMapEntry aCellAttrTokenMap[] = { { XML_NAMESPACE_OFFICE, XML_VALUE_TYPE, XML_TOK_CELL_VAL_TYPE }, { XML_NAMESPACE_OFFICE, XML_VALUE, XML_TOK_CELL_VALUE }, @@ -406,7 +407,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetSeriesAttrTokenMap() { if( ! mpSeriesAttrTokenMap ) { - static __FAR_DATA SvXMLTokenMapEntry aSeriesAttrTokenMap[] = + static SvXMLTokenMapEntry aSeriesAttrTokenMap[] = { { XML_NAMESPACE_CHART, XML_VALUES_CELL_RANGE_ADDRESS, XML_TOK_SERIES_CELL_RANGE }, { XML_NAMESPACE_CHART, XML_LABEL_CELL_ADDRESS, XML_TOK_SERIES_LABEL_ADDRESS }, @@ -426,7 +427,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetRegEquationAttrTokenMap() { if( ! mpRegEquationAttrTokenMap ) { - static __FAR_DATA SvXMLTokenMapEntry aRegressionEquationAttrTokenMap[] = + static SvXMLTokenMapEntry aRegressionEquationAttrTokenMap[] = { { XML_NAMESPACE_CHART, XML_STYLE_NAME, XML_TOK_REGEQ_STYLE_NAME }, { XML_NAMESPACE_CHART, XML_DISPLAY_EQUATION, XML_TOK_REGEQ_DISPLAY_EQUATION }, @@ -484,7 +485,7 @@ void SchXMLImportHelper::DeleteDataSeries( catch( uno::Exception & ex ) { (void)ex; // avoid warning for pro build - OSL_ENSURE( false, OUStringToOString( + OSL_FAIL( OUStringToOString( OUString( RTL_CONSTASCII_USTRINGPARAM( "Exception caught. Type: " )) + OUString::createFromAscii( typeid( ex ).name()) + OUString( RTL_CONSTASCII_USTRINGPARAM( ", Message: " )) + @@ -556,7 +557,7 @@ Reference< chart2::XDataSeries > SchXMLImportHelper::GetNewDataSeries( { xResult.set( xContext->getServiceManager()->createInstanceWithContext( - OUString::createFromAscii("com.sun.star.chart2.DataSeries"), + OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.DataSeries" )), xContext ), uno::UNO_QUERY_THROW ); } if( xResult.is() ) @@ -567,7 +568,7 @@ Reference< chart2::XDataSeries > SchXMLImportHelper::GetNewDataSeries( catch( uno::Exception & ex ) { (void)ex; // avoid warning for pro build - OSL_ENSURE( false, OUStringToOString( + OSL_FAIL( OUStringToOString( OUString( RTL_CONSTASCII_USTRINGPARAM( "Exception caught. Type: " )) + OUString::createFromAscii( typeid( ex ).name()) + OUString( RTL_CONSTASCII_USTRINGPARAM( ", Message: " )) + @@ -580,7 +581,7 @@ Reference< chart2::XDataSeries > SchXMLImportHelper::GetNewDataSeries( Reference< chart2::data::XLabeledDataSequence > SchXMLImportHelper::GetNewLabeledDataSequence() { // @todo: remove this asap - OSL_ENSURE( false, "Do not call this method" ); + OSL_FAIL( "Do not call this method" ); Reference< chart2::data::XLabeledDataSequence > xResult; // DO NOT USED -- DEPRECATED. Use SchXMLTools::GetNewLabeledDataSequence() instead return xResult; @@ -675,8 +676,8 @@ SvXMLImportContext *SchXMLImport::CreateContext( sal_uInt16 nPrefix, const OUStr if (xDPS.is()) { uno::Reference<xml::sax::XDocumentHandler> xDocBuilder( mxServiceFactory->createInstance( - ::rtl::OUString::createFromAscii( - "com.sun.star.xml.dom.SAXDocumentBuilder")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.xml.dom.SAXDocumentBuilder"))), uno::UNO_QUERY_THROW); pContext = (IsXMLToken(rLocalName, XML_DOCUMENT_META)) ? new SvXMLMetaDocumentContext(*this, @@ -779,7 +780,7 @@ void SAL_CALL SchXMLImport::setTargetDocument( const uno::Reference< lang::XComp #ifdef DBG_UTIL String aStr( rEx.Message ); ByteString aBStr( aStr, RTL_TEXTENCODING_ASCII_US ); - DBG_ERROR1( "SchXMLChartContext::StartElement(): Exception caught: %s", aBStr.GetBuffer()); + OSL_TRACE( "SchXMLChartContext::StartElement(): Exception caught: %s", aBStr.GetBuffer()); #else (void)rEx; // avoid warning for pro build #endif @@ -805,7 +806,6 @@ OUString SAL_CALL SchXMLImport_getImplementationName() throw() Reference< uno::XInterface > SAL_CALL SchXMLImport_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) throw( uno::Exception ) { // #110680# - // return (cppu::OWeakObject*)new SchXMLImport(); return (cppu::OWeakObject*)new SchXMLImport(rSMgr); } @@ -828,7 +828,6 @@ OUString SAL_CALL SchXMLImport_Styles_getImplementationName() throw() Reference< uno::XInterface > SAL_CALL SchXMLImport_Styles_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) throw( uno::Exception ) { // #110680# - // return (cppu::OWeakObject*)new SchXMLImport( IMPORT_STYLES ); return (cppu::OWeakObject*)new SchXMLImport( rSMgr, IMPORT_STYLES ); } @@ -849,7 +848,6 @@ OUString SAL_CALL SchXMLImport_Content_getImplementationName() throw() Reference< uno::XInterface > SAL_CALL SchXMLImport_Content_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) throw( uno::Exception ) { // #110680# - // return (cppu::OWeakObject*)new SchXMLImport( IMPORT_CONTENT | IMPORT_AUTOSTYLES | IMPORT_FONTDECLS ); return (cppu::OWeakObject*)new SchXMLImport( rSMgr, IMPORT_CONTENT | IMPORT_AUTOSTYLES | IMPORT_FONTDECLS ); } @@ -870,7 +868,6 @@ OUString SAL_CALL SchXMLImport_Meta_getImplementationName() throw() Reference< uno::XInterface > SAL_CALL SchXMLImport_Meta_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) throw( uno::Exception ) { // #110680# - // return (cppu::OWeakObject*)new SchXMLImport( IMPORT_META ); return (cppu::OWeakObject*)new SchXMLImport( rSMgr, IMPORT_META ); } @@ -891,6 +888,8 @@ OUString SAL_CALL SchXMLImport::getImplementationName() throw( uno::RuntimeExcep case IMPORT_SETTINGS: // there is no settings component in chart default: - return OUString::createFromAscii( "SchXMLImport" ); + return OUString(RTL_CONSTASCII_USTRINGPARAM( "SchXMLImport" )); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/SchXMLLegendContext.cxx b/xmloff/source/chart/SchXMLLegendContext.cxx index 6220fdfca46a..c85353d7ca36 100755..100644 --- a/xmloff/source/chart/SchXMLLegendContext.cxx +++ b/xmloff/source/chart/SchXMLLegendContext.cxx @@ -114,11 +114,11 @@ void SchXMLLegendContext::StartElement( const uno::Reference< xml::sax::XAttribu { try { - xDocProp->setPropertyValue( rtl::OUString::createFromAscii( "HasLegend" ), uno::makeAny( sal_True ) ); + xDocProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HasLegend" )), uno::makeAny( sal_True ) ); } catch( beans::UnknownPropertyException ) { - DBG_ERROR( "Property HasLegend not found" ); + OSL_TRACE( "Property HasLegend not found" ); } } @@ -126,7 +126,7 @@ void SchXMLLegendContext::StartElement( const uno::Reference< xml::sax::XAttribu uno::Reference< beans::XPropertySet > xLegendProps( xLegendShape, uno::UNO_QUERY ); if( !xLegendShape.is() || !xLegendProps.is() ) { - DBG_ERROR( "legend could not be created" ); + OSL_TRACE( "legend could not be created" ); return; } @@ -160,11 +160,11 @@ void SchXMLLegendContext::StartElement( const uno::Reference< xml::sax::XAttribu try { if( SchXMLEnumConverter::getLegendPositionConverter().importXML( aValue, aAny, GetImport().GetMM100UnitConverter() ) ) - xLegendProps->setPropertyValue( rtl::OUString::createFromAscii( "Alignment" ), aAny ); + xLegendProps->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Alignment" )), aAny ); } catch( beans::UnknownPropertyException ) { - DBG_ERROR( "Property Alignment (legend) not found" ); + OSL_TRACE( "Property Alignment (legend) not found" ); } } break; @@ -205,7 +205,7 @@ void SchXMLLegendContext::StartElement( const uno::Reference< xml::sax::XAttribu xLegendShape->setPosition( aLegendPos ); if( bHasExpansion && nLegendExpansion!= chart::ChartLegendExpansion_CUSTOM ) - xLegendProps->setPropertyValue( rtl::OUString::createFromAscii( "Expansion" ), uno::makeAny(nLegendExpansion) ); + xLegendProps->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Expansion" )), uno::makeAny(nLegendExpansion) ); else if( bHasHeight && bHasWidth ) xLegendShape->setSize( aLegendSize ); diff --git a/xmloff/source/chart/SchXMLLegendContext.hxx b/xmloff/source/chart/SchXMLLegendContext.hxx index 1841b0cef24b..d3fa5b7516d3 100755..100644 --- a/xmloff/source/chart/SchXMLLegendContext.hxx +++ b/xmloff/source/chart/SchXMLLegendContext.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 @@ private: }; #endif // _SCH_XMLLEGENDCONTEXT_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/SchXMLParagraphContext.cxx b/xmloff/source/chart/SchXMLParagraphContext.cxx index 7835f0cbe4d3..5528d96b51b1 100644 --- a/xmloff/source/chart/SchXMLParagraphContext.cxx +++ b/xmloff/source/chart/SchXMLParagraphContext.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. @@ -116,3 +117,5 @@ void SchXMLParagraphContext::Characters( const OUString& rChars ) { maBuffer.append( rChars ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/SchXMLParagraphContext.hxx b/xmloff/source/chart/SchXMLParagraphContext.hxx index fc6cccf97c43..8304bf590d7b 100644 --- a/xmloff/source/chart/SchXMLParagraphContext.hxx +++ b/xmloff/source/chart/SchXMLParagraphContext.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,5 @@ public: }; #endif // _SCH_XMLPARAGRAPHCONTEXT_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx index 8b559d6279a8..41288969af64 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.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. @@ -114,7 +115,7 @@ void SchXML3DSceneAttributesHelper::getCameraDefaultFromDiagram( const uno::Refe if( xProp.is() ) { drawing::CameraGeometry aCamGeo; - xProp->getPropertyValue( ::rtl::OUString::createFromAscii("D3DCameraGeometry")) >>= aCamGeo; + xProp->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "D3DCameraGeometry" ))) >>= aCamGeo; maVRP.setX( aCamGeo.vrp.PositionX ); maVRP.setY( aCamGeo.vrp.PositionY ); maVRP.setZ( aCamGeo.vrp.PositionZ ); @@ -131,7 +132,7 @@ void SchXML3DSceneAttributesHelper::getCameraDefaultFromDiagram( const uno::Refe #ifdef DBG_UTIL String aStr( rEx.Message ); ByteString aBStr( aStr, RTL_TEXTENCODING_ASCII_US ); - DBG_ERROR1( "Exception caught for property NumberOfLines: %s", aBStr.GetBuffer()); + OSL_TRACE( "Exception caught for property NumberOfLines: %s", aBStr.GetBuffer()); #else (void)rEx; // avoid warning for pro build #endif @@ -208,40 +209,40 @@ SchXMLPlotAreaContext::SchXMLPlotAreaContext( try { xProp->setPropertyValue( - rtl::OUString::createFromAscii( "HasXAxis" ), aFalseBool ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HasXAxis" )), aFalseBool ); xProp->setPropertyValue( - rtl::OUString::createFromAscii( "HasXAxisGrid" ), aFalseBool ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HasXAxisGrid" )), aFalseBool ); xProp->setPropertyValue( - rtl::OUString::createFromAscii( "HasXAxisDescription" ), aFalseBool ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HasXAxisDescription" )), aFalseBool ); xProp->setPropertyValue( - rtl::OUString::createFromAscii( "HasSecondaryXAxis" ), aFalseBool ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HasSecondaryXAxis" )), aFalseBool ); xProp->setPropertyValue( - rtl::OUString::createFromAscii( "HasSecondaryXAxisDescription" ), aFalseBool ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HasSecondaryXAxisDescription" )), aFalseBool ); xProp->setPropertyValue( - rtl::OUString::createFromAscii( "HasYAxis" ), aFalseBool ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HasYAxis" )), aFalseBool ); xProp->setPropertyValue( - rtl::OUString::createFromAscii( "HasYAxisGrid" ), aFalseBool ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HasYAxisGrid" )), aFalseBool ); xProp->setPropertyValue( - rtl::OUString::createFromAscii( "HasYAxisDescription" ), aFalseBool ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HasYAxisDescription" )), aFalseBool ); xProp->setPropertyValue( - rtl::OUString::createFromAscii( "HasSecondaryYAxis" ), aFalseBool ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HasSecondaryYAxis" )), aFalseBool ); xProp->setPropertyValue( - rtl::OUString::createFromAscii( "HasSecondaryYAxisDescription" ), aFalseBool ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HasSecondaryYAxisDescription" )), aFalseBool ); xProp->setPropertyValue( - rtl::OUString::createFromAscii( "HasZAxis" ), aFalseBool ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HasZAxis" )), aFalseBool ); xProp->setPropertyValue( - rtl::OUString::createFromAscii( "HasZAxisDescription" ), aFalseBool ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HasZAxisDescription" )), aFalseBool ); uno::Any aAny; chart::ChartDataRowSource eSource = chart::ChartDataRowSource_COLUMNS; aAny <<= eSource; - xProp->setPropertyValue( rtl::OUString::createFromAscii( "DataRowSource" ), aAny ); + xProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DataRowSource" )), aAny ); } catch( beans::UnknownPropertyException & ) { - DBG_ERROR( "Property required by service not supported" ); + OSL_FAIL( "Property required by service not supported" ); } } } @@ -315,12 +316,12 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri uno::Any aAny; aAny <<= (sal_Bool)(mrColHasLabels); xDocProp->setPropertyValue( - ::rtl::OUString::createFromAscii( "DataSourceLabelsInFirstColumn" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DataSourceLabelsInFirstColumn" )), aAny ); aAny <<= (sal_Bool)(mrRowHasLabels); xDocProp->setPropertyValue( - ::rtl::OUString::createFromAscii( "DataSourceLabelsInFirstRow" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DataSourceLabelsInFirstRow" )), aAny ); } catch( beans::UnknownPropertyException & ) @@ -350,7 +351,7 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri pPropStyleContext->FillPropertySet( xProp ); // get the data row source that was set without having data - xProp->getPropertyValue( ::rtl::OUString::createFromAscii("DataRowSource")) + xProp->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DataRowSource" ))) >>= mrDataRowSource; //lines on/off @@ -436,7 +437,7 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri #ifdef DBG_UTIL String aStr( rEx.Message ); ByteString aBStr( aStr, RTL_TEXTENCODING_ASCII_US ); - DBG_ERROR1( "PlotAreaContext:EndElement(): Exception caught: %s", aBStr.GetBuffer()); + OSL_TRACE( "PlotAreaContext:EndElement(): Exception caught: %s", aBStr.GetBuffer()); #else (void)rEx; // avoid warning for pro build #endif @@ -444,9 +445,9 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri // bool bCreateInternalDataProvider = false; - if( m_rXLinkHRefAttributeToIndicateDataProvider.equalsAscii( "." ) ) //data comes from the chart itself + if( m_rXLinkHRefAttributeToIndicateDataProvider.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "." ) ) ) //data comes from the chart itself bCreateInternalDataProvider = true; - else if( m_rXLinkHRefAttributeToIndicateDataProvider.equalsAscii( ".." ) ) //data comes from the parent application + else if( m_rXLinkHRefAttributeToIndicateDataProvider.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".." ) ) ) //data comes from the parent application bCreateInternalDataProvider = false; else if( m_rXLinkHRefAttributeToIndicateDataProvider.getLength() ) //not supported so far to get the data by sibling objects -> fall back to chart itself bCreateInternalDataProvider = true; @@ -460,7 +461,7 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri // data yet. mxNewDoc->createInternalDataProvider( false /* bCloneExistingData */ ); if( xProp.is() && mrDataRowSource!=chart::ChartDataRowSource_COLUMNS ) - xProp->setPropertyValue( rtl::OUString::createFromAscii( "DataRowSource" ), uno::makeAny(mrDataRowSource) ); + xProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DataRowSource" )), uno::makeAny(mrDataRowSource) ); } } @@ -588,7 +589,7 @@ void SchXMLPlotAreaContext::EndElement() if( xDiaProp.is()) { sal_Bool bIsThreeDim = sal_False; - uno::Any aAny = xDiaProp->getPropertyValue( ::rtl::OUString::createFromAscii( "Dim3D" )); + uno::Any aAny = xDiaProp->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Dim3D" ))); aAny >>= bIsThreeDim; // set 3d scene attributes @@ -613,7 +614,7 @@ void SchXMLPlotAreaContext::EndElement() #ifdef DBG_UTIL String aStr( rEx.Message ); ByteString aBStr( aStr, RTL_TEXTENCODING_ASCII_US ); - DBG_ERROR1( "Exception caught for property NumberOfLines: %s", aBStr.GetBuffer()); + OSL_TRACE( "Exception caught for property NumberOfLines: %s", aBStr.GetBuffer()); #else (void)rEx; // avoid warning for pro build #endif @@ -635,7 +636,7 @@ void SchXMLPlotAreaContext::EndElement() #ifdef DBG_UTIL String aStr( rEx.Message ); ByteString aBStr( aStr, RTL_TEXTENCODING_ASCII_US ); - DBG_ERROR1( "Exception caught for property Volume: %s", aBStr.GetBuffer()); + OSL_TRACE( "Exception caught for property Volume: %s", aBStr.GetBuffer()); #else (void)rEx; // avoid warning for pro build #endif @@ -1101,8 +1102,8 @@ void SchXMLEquationContext::StartElement( const uno::Reference< xml::sax::XAttri const SvXMLTokenMap& rAttrTokenMap = mrImportHelper.GetRegEquationAttrTokenMap(); OUString sAutoStyleName; - sal_Bool bShowEquation = sal_True; - sal_Bool bShowRSquare = sal_False; + bool bShowEquation = true; + bool bShowRSquare = false; awt::Point aPosition; bool bHasXPos = false; bool bHasYPos = false; @@ -1176,3 +1177,5 @@ void SchXMLEquationContext::StartElement( const uno::Reference< xml::sax::XAttri } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.hxx b/xmloff/source/chart/SchXMLPlotAreaContext.hxx index 0437d5cabbc3..0f71542e2074 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.hxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.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. @@ -328,3 +329,5 @@ private: }; #endif // _SCH_XMLPLOTAREACONTEXT_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx index f45f9a5e5f48..eef2f7b972ff 100644 --- a/xmloff/source/chart/SchXMLSeries2Context.cxx +++ b/xmloff/source/chart/SchXMLSeries2Context.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. @@ -54,9 +55,7 @@ #include <rtl/ustrbuf.hxx> #include "xmloff/xmlnmspe.hxx" #include <xmloff/xmlimp.hxx> -#ifndef _XMLOFF_NMSPMAP_HX #include <xmloff/nmspmap.hxx> -#endif #include "SchXMLImport.hxx" // header for class XMLPropStyleContext #include <xmloff/prstylei.hxx> @@ -240,7 +239,7 @@ Reference< chart2::data::XLabeledDataSequence > lcl_createAndAddSequenceToSeries Reference< chart2::data::XDataSequence > xSeq = SchXMLTools::CreateDataSequence( rRange, xChartDoc ); Reference< beans::XPropertySet > xSeqProp( xSeq, uno::UNO_QUERY ); if( xSeqProp.is()) - xSeqProp->setPropertyValue(OUString::createFromAscii("Role"), uno::makeAny( rRole)); + xSeqProp->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM( "Role" )), uno::makeAny( rRole)); xLabeledSeq->setValues( xSeq ); // add new sequence to data series / push to front to have the correct sequence order if charttype is changed afterwards @@ -388,7 +387,7 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib && m_bStockHasVolume && mnSeriesIndex == 0 ) { - maSeriesChartTypeName = OUString::createFromAscii( "com.sun.star.chart2.ColumnChartType" ); + maSeriesChartTypeName = OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.ColumnChartType" )); bIsCandleStick = false; } else @@ -429,10 +428,10 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib Reference< beans::XPropertySet > xSeqProp( xSeq, uno::UNO_QUERY ); if( xSeqProp.is()) { - OUString aMainRole( OUString::createFromAscii("values-y") ); + OUString aMainRole(RTL_CONSTASCII_USTRINGPARAM("values-y")); if( maSeriesChartTypeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.chart2.BubbleChartType") ) ) - aMainRole = OUString::createFromAscii("values-size"); - xSeqProp->setPropertyValue(OUString::createFromAscii("Role"), uno::makeAny( aMainRole )); + aMainRole = OUString(RTL_CONSTASCII_USTRINGPARAM( "values-size" )); + xSeqProp->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM( "Role" )), uno::makeAny( aMainRole )); } xLabeledSeq->setValues( xSeq ); @@ -465,7 +464,7 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib catch( uno::Exception & ex ) { (void)ex; // avoid warning for pro build - OSL_ENSURE( false, ::rtl::OUStringToOString( + OSL_FAIL( ::rtl::OUStringToOString( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Exception caught. Type: " )) + ::rtl::OUString::createFromAscii( typeid( ex ).name()) + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ", Message: " )) + @@ -521,7 +520,7 @@ void SchXMLSeries2Context::EndElement() //different handling for different chart types necessary if( bIsScatterChart || ( nDomainCount==1 && !bIsBubbleChart ) ) { - DomainInfo aDomainInfo( OUString::createFromAscii("values-x"), m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress, m_rGlobalSeriesImportInfo.nFirstFirstDomainIndex ) ; + DomainInfo aDomainInfo( OUString(RTL_CONSTASCII_USTRINGPARAM( "values-x" )), m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress, m_rGlobalSeriesImportInfo.nFirstFirstDomainIndex ) ; bool bCreateXValues = true; if( !maDomainAddresses.empty() ) { @@ -554,7 +553,7 @@ void SchXMLSeries2Context::EndElement() { if( nDomainCount>1 ) { - DomainInfo aDomainInfo( OUString::createFromAscii("values-x"), maDomainAddresses[1], m_rGlobalSeriesImportInfo.nCurrentDataIndex ) ; + DomainInfo aDomainInfo( OUString(RTL_CONSTASCII_USTRINGPARAM( "values-x" )), maDomainAddresses[1], m_rGlobalSeriesImportInfo.nCurrentDataIndex ) ; if( !m_rGlobalSeriesImportInfo.aFirstSecondDomainAddress.getLength() ) { //for bubble chart the second domain contains the x values which should become an index smaller than y values for own data table @@ -567,12 +566,12 @@ void SchXMLSeries2Context::EndElement() } else if( m_rGlobalSeriesImportInfo.aFirstSecondDomainAddress.getLength() ) { - DomainInfo aDomainInfo( OUString::createFromAscii("values-x"), m_rGlobalSeriesImportInfo.aFirstSecondDomainAddress, m_rGlobalSeriesImportInfo.nFirstSecondDomainIndex ) ; + DomainInfo aDomainInfo( OUString(RTL_CONSTASCII_USTRINGPARAM( "values-x" )), m_rGlobalSeriesImportInfo.aFirstSecondDomainAddress, m_rGlobalSeriesImportInfo.nFirstSecondDomainIndex ) ; aDomainInfos.push_back( aDomainInfo ); } if( nDomainCount>0) { - DomainInfo aDomainInfo( OUString::createFromAscii("values-y"), maDomainAddresses.front(), m_rGlobalSeriesImportInfo.nCurrentDataIndex ) ; + DomainInfo aDomainInfo( OUString(RTL_CONSTASCII_USTRINGPARAM( "values-y" )), maDomainAddresses.front(), m_rGlobalSeriesImportInfo.nCurrentDataIndex ) ; if( !m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress.getLength() ) { m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress = maDomainAddresses.front(); @@ -583,7 +582,7 @@ void SchXMLSeries2Context::EndElement() } else if( m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress.getLength() ) { - DomainInfo aDomainInfo( OUString::createFromAscii("values-y"), m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress, m_rGlobalSeriesImportInfo.nFirstFirstDomainIndex ) ; + DomainInfo aDomainInfo( OUString(RTL_CONSTASCII_USTRINGPARAM("values-y")), m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress, m_rGlobalSeriesImportInfo.nFirstFirstDomainIndex ) ; aDomainInfos.push_back( aDomainInfo ); } } @@ -861,7 +860,7 @@ void SchXMLSeries2Context::setStylesToSeries( SeriesDefaultsAndStyles& rSeriesDe catch( uno::Exception & rEx ) { (void)rEx; // avoid warning for pro build - DBG_ERROR1( "Exception caught during setting styles to series: %s", + OSL_TRACE( "Exception caught during setting styles to series: %s", OUStringToOString( rEx.Message, RTL_TEXTENCODING_ASCII_US ).getStr() ); } } @@ -945,7 +944,7 @@ void SchXMLSeries2Context::setStylesToStatisticsObjects( SeriesDefaultsAndStyles catch( uno::Exception & rEx ) { (void)rEx; // avoid warning for pro build - DBG_ERROR1( "Exception caught during setting styles to series: %s", + OSL_TRACE( "Exception caught during setting styles to series: %s", OUStringToOString( rEx.Message, RTL_TEXTENCODING_ASCII_US ).getStr() ); } } @@ -1044,7 +1043,7 @@ void SchXMLSeries2Context::setStylesToDataPoints( SeriesDefaultsAndStyles& rSeri catch( uno::Exception & rEx ) { (void)rEx; // avoid warning for pro build - DBG_ERROR1( "Exception caught during setting styles to data points: %s", + OSL_TRACE( "Exception caught during setting styles to data points: %s", OUStringToOString( rEx.Message, RTL_TEXTENCODING_ASCII_US ).getStr() ); } } @@ -1076,3 +1075,5 @@ void SchXMLSeries2Context::switchSeriesLinesOff( ::std::list< DataRowPointStyle } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/SchXMLSeries2Context.hxx b/xmloff/source/chart/SchXMLSeries2Context.hxx index 80deb2c705bc..0bb17b0519ce 100644 --- a/xmloff/source/chart/SchXMLSeries2Context.hxx +++ b/xmloff/source/chart/SchXMLSeries2Context.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. @@ -133,3 +134,5 @@ public: // XMLOFF_SCHXMLSERIES2CONTEXT_HXX #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/SchXMLSeriesHelper.cxx b/xmloff/source/chart/SchXMLSeriesHelper.cxx index a7518a6cbade..4519b2c12ddd 100644 --- a/xmloff/source/chart/SchXMLSeriesHelper.cxx +++ b/xmloff/source/chart/SchXMLSeriesHelper.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,7 +83,7 @@ using ::rtl::OUString; { (void)ex; // avoid warning for pro build - OSL_ENSURE( false, OUStringToOString( OUString( + OSL_FAIL( OUStringToOString( OUString( OUString( RTL_CONSTASCII_USTRINGPARAM( "Exception caught. Type: " )) + OUString::createFromAscii( typeid( ex ).name()) + OUString( RTL_CONSTASCII_USTRINGPARAM( ", Message: " )) + @@ -206,7 +207,7 @@ Reference< chart2::XDataSeries > SchXMLSeriesHelper::getFirstCandleStickSeries( for( sal_Int32 nCTIdx=0; !xResult.is() && nCTIdx<aCTSeq.getLength(); ++nCTIdx ) { if( aCTSeq[nCTIdx]->getChartType().equals( - ::rtl::OUString::createFromAscii("com.sun.star.chart2.CandleStickChartType"))) + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.CandleStickChartType" )))) { Reference< chart2::XDataSeriesContainer > xSeriesCnt( aCTSeq[nCTIdx], uno::UNO_QUERY_THROW ); Sequence< Reference< chart2::XDataSeries > > aSeriesSeq( xSeriesCnt->getDataSeries() ); @@ -219,7 +220,7 @@ Reference< chart2::XDataSeries > SchXMLSeriesHelper::getFirstCandleStickSeries( } catch( const uno::Exception & ) { - OSL_ENSURE( false, "Exception caught" ); + OSL_FAIL( "Exception caught" ); } return xResult; } @@ -239,7 +240,7 @@ uno::Reference< beans::XPropertySet > SchXMLSeriesHelper::createOldAPISeriesProp if( xFactory.is() ) { xRet = uno::Reference< beans::XPropertySet >( xFactory->createInstance( - OUString::createFromAscii( "com.sun.star.comp.chart2.DataSeriesWrapper" ) ), uno::UNO_QUERY ); + OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart2.DataSeriesWrapper" )) ), uno::UNO_QUERY ); Reference< lang::XInitialization > xInit( xRet, uno::UNO_QUERY ); if(xInit.is()) { @@ -252,7 +253,7 @@ uno::Reference< beans::XPropertySet > SchXMLSeriesHelper::createOldAPISeriesProp catch( uno::Exception & rEx ) { (void)rEx; // avoid warning for pro build - DBG_ERROR1( "Exception caught SchXMLSeriesHelper::createOldAPISeriesPropertySet: %s", + OSL_TRACE( "Exception caught SchXMLSeriesHelper::createOldAPISeriesPropertySet: %s", OUStringToOString( rEx.Message, RTL_TEXTENCODING_ASCII_US ).getStr() ); } } @@ -276,7 +277,7 @@ uno::Reference< beans::XPropertySet > SchXMLSeriesHelper::createOldAPIDataPointP if( xFactory.is() ) { xRet = uno::Reference< beans::XPropertySet >( xFactory->createInstance( - OUString::createFromAscii( "com.sun.star.comp.chart2.DataSeriesWrapper" ) ), uno::UNO_QUERY ); + OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart2.DataSeriesWrapper" )) ), uno::UNO_QUERY ); Reference< lang::XInitialization > xInit( xRet, uno::UNO_QUERY ); if(xInit.is()) { @@ -291,7 +292,7 @@ uno::Reference< beans::XPropertySet > SchXMLSeriesHelper::createOldAPIDataPointP { (void)rEx; // avoid warning for pro build - DBG_ERROR1( "Exception caught SchXMLSeriesHelper::createOldAPIDataPointPropertySet: %s", + OSL_TRACE( "Exception caught SchXMLSeriesHelper::createOldAPIDataPointPropertySet: %s", OUStringToOString( rEx.Message, RTL_TEXTENCODING_ASCII_US ).getStr() ); } } @@ -299,3 +300,4 @@ uno::Reference< beans::XPropertySet > SchXMLSeriesHelper::createOldAPIDataPointP return xRet; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/SchXMLSeriesHelper.hxx b/xmloff/source/chart/SchXMLSeriesHelper.hxx index 3af1654ef55b..b5fc1ad91821 100644 --- a/xmloff/source/chart/SchXMLSeriesHelper.hxx +++ b/xmloff/source/chart/SchXMLSeriesHelper.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. @@ -78,3 +79,5 @@ public: // _XMLOFF_SCH_XML_SERIESHELPER_HXX #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx index 5e9751d73ded..0252117adf4e 100644 --- a/xmloff/source/chart/SchXMLTableContext.cxx +++ b/xmloff/source/chart/SchXMLTableContext.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. @@ -1248,3 +1249,5 @@ void SchXMLRangeSomewhereContext::EndElement() { mrRangeString = maRangeStringBuffer.makeStringAndClear(); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/SchXMLTableContext.hxx b/xmloff/source/chart/SchXMLTableContext.hxx index 14315fa8daeb..5deee981cc9e 100644 --- a/xmloff/source/chart/SchXMLTableContext.hxx +++ b/xmloff/source/chart/SchXMLTableContext.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 @@ #include <xmloff/xmlictxt.hxx> #include "SchXMLImport.hxx" -// #include "SchXMLChartContext.hxx" #include <com/sun/star/uno/Sequence.hxx> #include <com/sun/star/chart/ChartDataRowSource.hpp> @@ -227,3 +227,5 @@ public: }; #endif // _SCH_XMLTABLECONTEXT_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/SchXMLTextListContext.cxx b/xmloff/source/chart/SchXMLTextListContext.cxx index 7a9007aa3527..21a1d947ec31 100755..100644 --- a/xmloff/source/chart/SchXMLTextListContext.cxx +++ b/xmloff/source/chart/SchXMLTextListContext.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. @@ -134,3 +135,5 @@ SvXMLImportContext* SchXMLTextListContext::CreateChildContext( pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName ); return pContext; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/SchXMLTextListContext.hxx b/xmloff/source/chart/SchXMLTextListContext.hxx index 4d260d05cd69..25e1de6aa79c 100755..100644 --- a/xmloff/source/chart/SchXMLTextListContext.hxx +++ b/xmloff/source/chart/SchXMLTextListContext.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. @@ -56,3 +57,5 @@ private: }; #endif // _SCH_XMLTEXTLISTCONTEXT_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx index 2aed07dca617..cfe5553b6c56 100644 --- a/xmloff/source/chart/SchXMLTools.cxx +++ b/xmloff/source/chart/SchXMLTools.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,16 +31,12 @@ #include "SchXMLTools.hxx" -/* -#include <tools/debug.hxx> -*/ #include <rtl/ustrbuf.hxx> #include <comphelper/InlineContainer.hxx> // header for class SvXMLUnitConverter #include <xmloff/xmluconv.hxx> // header for struct SvXMLEnumMapEntry #include <xmloff/xmlement.hxx> -// header for define __FAR_DATA #include <tools/solar.h> // header for class SvXMLImportPropertyMapper @@ -84,7 +81,7 @@ Reference< uno::XComponentContext > lcl_getComponentContext() { Reference< beans::XPropertySet > xFactProp( comphelper::getProcessServiceFactory(), uno::UNO_QUERY ); if( xFactProp.is()) - xFactProp->getPropertyValue(OUString::createFromAscii("DefaultContext")) >>= xContext; + xFactProp->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))) >>= xContext; } catch( uno::Exception& ) {} @@ -163,7 +160,7 @@ Reference< chart2::data::XDataSequence > lcl_createNewSequenceFromCachedXMLRange namespace SchXMLTools { -static __FAR_DATA SvXMLEnumMapEntry aXMLChartClassMap[] = +static SvXMLEnumMapEntry aXMLChartClassMap[] = { { XML_LINE, XML_CHART_CLASS_LINE }, { XML_AREA, XML_CHART_CLASS_AREA }, @@ -196,35 +193,35 @@ const tMakeStringStringMap& lcl_getChartTypeNameMap() //shape property -- chart model object property static tMakeStringStringMap g_aChartTypeNameMap = tMakeStringStringMap - ( ::rtl::OUString::createFromAscii( "com.sun.star.chart.LineDiagram" ) - , ::rtl::OUString::createFromAscii( "com.sun.star.chart2.LineChartType" ) ) + ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart.LineDiagram" )) + , ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.LineChartType" )) ) - ( ::rtl::OUString::createFromAscii( "com.sun.star.chart.AreaDiagram" ) - , ::rtl::OUString::createFromAscii( "com.sun.star.chart2.AreaChartType" ) ) + ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart.AreaDiagram" )) + , ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.AreaChartType" )) ) - ( ::rtl::OUString::createFromAscii( "com.sun.star.chart.BarDiagram" ) - , ::rtl::OUString::createFromAscii( "com.sun.star.chart2.ColumnChartType" ) ) + ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart.BarDiagram" )) + , ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.ColumnChartType" )) ) - ( ::rtl::OUString::createFromAscii( "com.sun.star.chart.PieDiagram" ) - , ::rtl::OUString::createFromAscii( "com.sun.star.chart2.PieChartType" ) ) + ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart.PieDiagram" )) + , ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.PieChartType" )) ) - ( ::rtl::OUString::createFromAscii( "com.sun.star.chart.DonutDiagram" ) - , ::rtl::OUString::createFromAscii( "com.sun.star.chart2.DonutChartType" ) ) + ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart.DonutDiagram" )) + , ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.DonutChartType" )) ) - ( ::rtl::OUString::createFromAscii( "com.sun.star.chart.XYDiagram" ) - , ::rtl::OUString::createFromAscii( "com.sun.star.chart2.ScatterChartType" ) ) + ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart.XYDiagram" )) + , ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.ScatterChartType" )) ) - ( ::rtl::OUString::createFromAscii( "com.sun.star.chart.NetDiagram" ) - , ::rtl::OUString::createFromAscii( "com.sun.star.chart2.NetChartType" ) ) + ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart.NetDiagram" )) + , ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.NetChartType" )) ) - ( ::rtl::OUString::createFromAscii( "com.sun.star.chart.FilledNetDiagram" ) - , ::rtl::OUString::createFromAscii( "com.sun.star.chart2.FilledNetChartType" ) ) + ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart.FilledNetDiagram" )) + , ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.FilledNetChartType" )) ) - ( ::rtl::OUString::createFromAscii( "com.sun.star.chart.StockDiagram" ) - , ::rtl::OUString::createFromAscii( "com.sun.star.chart2.CandleStickChartType" ) ) + ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart.StockDiagram" )) + , ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.CandleStickChartType" )) ) - ( ::rtl::OUString::createFromAscii( "com.sun.star.chart.BubbleDiagram" ) - , ::rtl::OUString::createFromAscii( "com.sun.star.chart2.BubbleChartType" ) ) + ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart.BubbleDiagram" )) + , ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.BubbleChartType" )) ) ; return g_aChartTypeNameMap; @@ -346,28 +343,28 @@ XMLTokenEnum getTokenByChartType( { OUString aServiceName( rChartTypeService.copy( nSkip, nTypeLength )); - if( aServiceName.equalsAscii("Line")) + if( aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Line"))) eResult = XML_LINE; - else if( aServiceName.equalsAscii("Area")) + else if( aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Area"))) eResult = XML_AREA; - else if( aServiceName.equalsAscii("Bar") || - (!bUseOldNames && aServiceName.equalsAscii("Column"))) + else if( aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Bar")) || + (!bUseOldNames && aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Column")))) eResult = XML_BAR; - else if( aServiceName.equalsAscii("Pie")) + else if( aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Pie"))) eResult = XML_CIRCLE; - else if( aServiceName.equalsAscii("Donut")) + else if( aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Donut"))) eResult = XML_RING; - else if( (bUseOldNames && aServiceName.equalsAscii("XY")) || - (!bUseOldNames && aServiceName.equalsAscii("Scatter"))) + else if( (bUseOldNames && aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("XY"))) || + (!bUseOldNames && aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Scatter")))) eResult = XML_SCATTER; - else if( aServiceName.equalsAscii("Bubble")) + else if( aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Bubble"))) eResult = XML_BUBBLE; - else if( aServiceName.equalsAscii("Net")) + else if( aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Net"))) eResult = XML_RADAR; - else if( aServiceName.equalsAscii("FilledNet")) + else if( aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("FilledNet"))) eResult = XML_FILLED_RADAR; - else if( (bUseOldNames && aServiceName.equalsAscii("Stock")) || - (!bUseOldNames && aServiceName.equalsAscii("CandleStick"))) + else if( (bUseOldNames && aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Stock"))) || + (!bUseOldNames && aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("CandleStick")))) eResult = XML_STOCK; } } @@ -385,7 +382,7 @@ Reference< chart2::data::XLabeledDataSequence > GetNewLabeledDataSequence() if( xContext.is() ) xResult.set( xContext->getServiceManager()->createInstanceWithContext( - OUString::createFromAscii("com.sun.star.chart2.data.LabeledDataSequence"), + OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.data.LabeledDataSequence" )), xContext ), uno::UNO_QUERY_THROW ); return xResult; } @@ -398,14 +395,14 @@ Reference< chart2::data::XDataSequence > CreateDataSequence( if( !xChartDoc.is() ) { - DBG_ERROR( "need a chart document" ); + OSL_FAIL( "need a chart document" ); return xRet; } Reference< chart2::data::XDataProvider > xDataProvider( xChartDoc->getDataProvider() ); if( !xDataProvider.is() ) { - DBG_ERROR( "need a data provider" ); + OSL_FAIL( "need a data provider" ); return xRet; } @@ -416,7 +413,7 @@ Reference< chart2::data::XDataSequence > CreateDataSequence( } catch( const lang::IllegalArgumentException & ) { - DBG_ERROR( "could not create data sequence" ); + OSL_FAIL( "could not create data sequence" ); } if( !xRet.is() && !xChartDoc->hasInternalDataProvider() && rRange.getLength() ) @@ -431,7 +428,7 @@ Reference< chart2::data::XDataSequence > CreateDataSequence( } catch( const lang::IllegalArgumentException & ) { - DBG_ERROR( "could not create data sequence" ); + OSL_FAIL( "could not create data sequence" ); } } return xRet; @@ -496,7 +493,7 @@ void CreateCategories( catch( const lang::IllegalArgumentException & ex ) { (void)ex; // avoid warning for pro build - OSL_ENSURE( false, ::rtl::OUStringToOString( + OSL_FAIL( ::rtl::OUStringToOString( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IllegalArgumentException caught, Message: " )) + ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr()); } @@ -518,7 +515,7 @@ void CreateCategories( } catch( uno::Exception & ) { - OSL_ENSURE( false, "Exception caught while creating Categories" ); + OSL_FAIL( "Exception caught while creating Categories" ); } } @@ -673,7 +670,7 @@ void setXMLRangePropertyAtDataSequence( catch( const uno::Exception & ex ) { (void)ex; // avoid warning for pro build - OSL_ENSURE( false, ::rtl::OUStringToOString( + OSL_FAIL( ::rtl::OUStringToOString( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Exception caught, Message: " )) + ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr()); } @@ -703,7 +700,7 @@ bool getXMLRangePropertyFromDataSequence( catch( const uno::Exception & ex ) { (void)ex; // avoid warning for pro build - OSL_ENSURE( false, ::rtl::OUStringToOString( + OSL_FAIL( ::rtl::OUStringToOString( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Exception caught, Message: " )) + ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr()); } @@ -738,7 +735,7 @@ void copyProperties( } catch( const uno::Exception & ) { - OSL_ENSURE( false, "Copying property sets failed!" ); + OSL_FAIL( "Copying property sets failed!" ); } } @@ -895,3 +892,5 @@ Reference< chart2::data::XDataProvider > getDataProviderFromParent( const Refere } } // namespace SchXMLTools + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/SchXMLTools.hxx b/xmloff/source/chart/SchXMLTools.hxx index d8841bf3861b..6ac1c2be283b 100644 --- a/xmloff/source/chart/SchXMLTools.hxx +++ b/xmloff/source/chart/SchXMLTools.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. @@ -150,3 +151,5 @@ namespace SchXMLTools } #endif // SCH_XML_TOOLS_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/XMLAxisPositionPropertyHdl.cxx b/xmloff/source/chart/XMLAxisPositionPropertyHdl.cxx index 3b16ca293901..74700f6b16ab 100644 --- a/xmloff/source/chart/XMLAxisPositionPropertyHdl.cxx +++ b/xmloff/source/chart/XMLAxisPositionPropertyHdl.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. @@ -126,3 +127,5 @@ sal_Bool XMLAxisPositionPropertyHdl::exportXML( OUString& rStrExpValue, } return bResult; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/XMLAxisPositionPropertyHdl.hxx b/xmloff/source/chart/XMLAxisPositionPropertyHdl.hxx index 0f7438698816..5008ae426187 100644 --- a/xmloff/source/chart/XMLAxisPositionPropertyHdl.hxx +++ b/xmloff/source/chart/XMLAxisPositionPropertyHdl.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 @@ private: }; #endif // _XMLAXISPOSITIONPROPERTYHDL_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/XMLChartPropertyContext.cxx b/xmloff/source/chart/XMLChartPropertyContext.cxx index c61fd2c610ea..28c5cd645451 100644 --- a/xmloff/source/chart/XMLChartPropertyContext.cxx +++ b/xmloff/source/chart/XMLChartPropertyContext.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 @@ SvXMLImportContext* XMLChartPropertyContext::CreateChildContext( return pContext; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/XMLChartPropertyContext.hxx b/xmloff/source/chart/XMLChartPropertyContext.hxx index c6f629d29fc6..b7eb736c444c 100644 --- a/xmloff/source/chart/XMLChartPropertyContext.hxx +++ b/xmloff/source/chart/XMLChartPropertyContext.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. @@ -56,3 +57,5 @@ private: }; #endif // _XMLOFF_CHARTPROPERTYCONTEXT_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/XMLChartStyleContext.cxx b/xmloff/source/chart/XMLChartStyleContext.cxx index f97a9da192f0..855f203e6740 100644 --- a/xmloff/source/chart/XMLChartStyleContext.cxx +++ b/xmloff/source/chart/XMLChartStyleContext.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. @@ -159,3 +160,5 @@ SvXMLImportContext *XMLChartStyleContext::CreateChildContext( return pContext; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/XMLErrorBarStylePropertyHdl.cxx b/xmloff/source/chart/XMLErrorBarStylePropertyHdl.cxx index 2520454f1176..fa88a09957d0 100644 --- a/xmloff/source/chart/XMLErrorBarStylePropertyHdl.cxx +++ b/xmloff/source/chart/XMLErrorBarStylePropertyHdl.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,3 +67,5 @@ sal_Bool XMLErrorBarStylePropertyHdl::exportXML( OUString& rStrExpValue, return XMLEnumPropertyHdl::exportXML( rStrExpValue, aValue, rUnitConverter ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/XMLErrorBarStylePropertyHdl.hxx b/xmloff/source/chart/XMLErrorBarStylePropertyHdl.hxx index af9b34b3bff7..09e4dfddba72 100644 --- a/xmloff/source/chart/XMLErrorBarStylePropertyHdl.hxx +++ b/xmloff/source/chart/XMLErrorBarStylePropertyHdl.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. @@ -39,3 +40,5 @@ public: }; #endif // _XMLERRORBARSTYLEPROPERTYHDL_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/XMLErrorIndicatorPropertyHdl.cxx b/xmloff/source/chart/XMLErrorIndicatorPropertyHdl.cxx index 6dbb39926c6c..966f33ef85d3 100644 --- a/xmloff/source/chart/XMLErrorIndicatorPropertyHdl.cxx +++ b/xmloff/source/chart/XMLErrorIndicatorPropertyHdl.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,7 +41,7 @@ XMLErrorIndicatorPropertyHdl::~XMLErrorIndicatorPropertyHdl() sal_Bool XMLErrorIndicatorPropertyHdl::importXML( const ::rtl::OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& /*rUnitConverter*/ ) const { - sal_Bool bValue; + bool bValue; SvXMLUnitConverter::convertBool( bValue, rStrImpValue ); // modify existing value @@ -103,3 +104,5 @@ sal_Bool XMLErrorIndicatorPropertyHdl::exportXML( ::rtl::OUString& rStrExpValue, // only export if set to true return bValue; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/XMLErrorIndicatorPropertyHdl.hxx b/xmloff/source/chart/XMLErrorIndicatorPropertyHdl.hxx index 70304f196379..311b3168662a 100644 --- a/xmloff/source/chart/XMLErrorIndicatorPropertyHdl.hxx +++ b/xmloff/source/chart/XMLErrorIndicatorPropertyHdl.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 // _XMLERRORINDICATORPROPERTYHDL_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/XMLLabelSeparatorContext.cxx b/xmloff/source/chart/XMLLabelSeparatorContext.cxx index 27ac6bd82b23..00f1d57a3783 100644 --- a/xmloff/source/chart/XMLLabelSeparatorContext.cxx +++ b/xmloff/source/chart/XMLLabelSeparatorContext.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. @@ -85,3 +86,5 @@ void XMLLabelSeparatorContext::EndElement() XMLElementPropertyContext::EndElement(); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/XMLLabelSeparatorContext.hxx b/xmloff/source/chart/XMLLabelSeparatorContext.hxx index 2a60dca21599..e222e195d719 100644 --- a/xmloff/source/chart/XMLLabelSeparatorContext.hxx +++ b/xmloff/source/chart/XMLLabelSeparatorContext.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 @@ private: }; #endif // _XMLOFF_SYMBOLIMAGECONTEXT_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/XMLSymbolImageContext.cxx b/xmloff/source/chart/XMLSymbolImageContext.cxx index 1d7421ebc22f..406b1c5491ac 100644 --- a/xmloff/source/chart/XMLSymbolImageContext.cxx +++ b/xmloff/source/chart/XMLSymbolImageContext.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. @@ -49,7 +50,7 @@ enum SvXMLTokenMapAttrs XML_TOK_SYMBOL_IMAGE_END = XML_TOK_UNKNOWN }; -static __FAR_DATA SvXMLTokenMapEntry aSymbolImageAttrTokenMap[] = +static SvXMLTokenMapEntry aSymbolImageAttrTokenMap[] = { { XML_NAMESPACE_XLINK, ::xmloff::token::XML_HREF, XML_TOK_SYMBOL_IMAGE_HREF }, { XML_NAMESPACE_XLINK, ::xmloff::token::XML_TYPE, XML_TOK_SYMBOL_IMAGE_TYPE }, @@ -148,3 +149,5 @@ void XMLSymbolImageContext::EndElement() XMLElementPropertyContext::EndElement(); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/XMLSymbolImageContext.hxx b/xmloff/source/chart/XMLSymbolImageContext.hxx index 233d36a44368..765f92bc5e30 100644 --- a/xmloff/source/chart/XMLSymbolImageContext.hxx +++ b/xmloff/source/chart/XMLSymbolImageContext.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,5 @@ private: }; #endif // _XMLOFF_SYMBOLIMAGECONTEXT_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/XMLSymbolTypePropertyHdl.cxx b/xmloff/source/chart/XMLSymbolTypePropertyHdl.cxx index b476a094540a..4eba27eb4307 100644 --- a/xmloff/source/chart/XMLSymbolTypePropertyHdl.cxx +++ b/xmloff/source/chart/XMLSymbolTypePropertyHdl.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. @@ -168,3 +169,5 @@ sal_Bool XMLSymbolTypePropertyHdl::exportXML( OUString& rStrExpValue, return bResult; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/XMLSymbolTypePropertyHdl.hxx b/xmloff/source/chart/XMLSymbolTypePropertyHdl.hxx index df6f7310c18a..b7e9698d0db5 100644 --- a/xmloff/source/chart/XMLSymbolTypePropertyHdl.hxx +++ b/xmloff/source/chart/XMLSymbolTypePropertyHdl.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 @@ private: }; #endif // _XMLSYMBOLTYPEPROPERTYHDL_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/XMLTextOrientationHdl.cxx b/xmloff/source/chart/XMLTextOrientationHdl.cxx index 706cf5044178..691f0dc7b449 100644 --- a/xmloff/source/chart/XMLTextOrientationHdl.cxx +++ b/xmloff/source/chart/XMLTextOrientationHdl.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. @@ -78,3 +79,5 @@ sal_Bool XMLTextOrientationHdl::exportXML( return bRetval; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/XMLTextOrientationHdl.hxx b/xmloff/source/chart/XMLTextOrientationHdl.hxx index a7fa80cef5c6..9d9a1cf86789 100644 --- a/xmloff/source/chart/XMLTextOrientationHdl.hxx +++ b/xmloff/source/chart/XMLTextOrientationHdl.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 // _XMLTEXTORIENTATIONHDL_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/contexts.cxx b/xmloff/source/chart/contexts.cxx index 18dcfa293a3c..1ba23abe24d1 100644 --- a/xmloff/source/chart/contexts.cxx +++ b/xmloff/source/chart/contexts.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. @@ -231,3 +232,4 @@ SvXMLImportContext* SchXMLBodyContext::CreateChildContext( } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/contexts.hxx b/xmloff/source/chart/contexts.hxx index e3ec8b512793..8cccc0975960 100644 --- a/xmloff/source/chart/contexts.hxx +++ b/xmloff/source/chart/contexts.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. @@ -113,3 +114,5 @@ public: // ======================================== #endif // _SCH_XML_CONTEXTS_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/makefile.mk b/xmloff/source/chart/makefile.mk index 3151d633d13f..3151d633d13f 100644..100755 --- a/xmloff/source/chart/makefile.mk +++ b/xmloff/source/chart/makefile.mk diff --git a/xmloff/source/chart/transporttypes.cxx b/xmloff/source/chart/transporttypes.cxx index c0a1e65e0eba..66d54b6e8e3c 100644 --- a/xmloff/source/chart/transporttypes.cxx +++ b/xmloff/source/chart/transporttypes.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. @@ -36,3 +37,5 @@ bool operator < ( const tSchXMLIndexWithPart & rFirst, const tSchXMLIndexWithPar return (static_cast< int >( rFirst.second ) < static_cast< int >( rSecond.second )); return (rFirst.first < rSecond.first); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/transporttypes.hxx b/xmloff/source/chart/transporttypes.hxx index 30f70d882ed0..ffa4111a84df 100644 --- a/xmloff/source/chart/transporttypes.hxx +++ b/xmloff/source/chart/transporttypes.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. @@ -223,3 +224,5 @@ typedef ::std::multimap< ::rtl::OUString, ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > > tSchXMLRangeSequenceMap; #endif // SCH_XML_TRANSPORTTYPES_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx index e83cb732e523..3727b4d0265c 100644 --- a/xmloff/source/core/DocumentSettingsContext.cxx +++ b/xmloff/source/core/DocumentSettingsContext.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,9 +39,7 @@ #include <xmloff/xmluconv.hxx> #include <tools/debug.hxx> -#ifndef __SGI_STL_LIST #include <list> -#endif #include <com/sun/star/i18n/XForbiddenCharacters.hpp> #include <com/sun/star/container/XIndexContainer.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> @@ -104,8 +103,8 @@ uno::Sequence<beans::PropertyValue> XMLMyList::GetSequence() while (aItr != aProps.end()) { *pProps = *aItr; - pProps++; - aItr++; + ++pProps; + ++aItr; } } return aSeq; @@ -116,8 +115,6 @@ uno::Reference<container::XNameContainer> XMLMyList::GetNameContainer() uno::Reference<container::XNameContainer> xNameContainer; // #110680# - // uno::Reference<lang::XMultiServiceFactory> xServiceFactory = comphelper::getProcessServiceFactory(); - // DBG_ASSERT( xServiceFactory.is(), "got no service manager" ); if( mxServiceFactory.is() ) { @@ -129,7 +126,7 @@ uno::Reference<container::XNameContainer> XMLMyList::GetNameContainer() while (aItr != aProps.end()) { xNameContainer->insertByName(aItr->Name, aItr->Value); - aItr++; + ++aItr; } } } @@ -140,8 +137,6 @@ uno::Reference<container::XIndexContainer> XMLMyList::GetIndexContainer() { uno::Reference<container::XIndexContainer> xIndexContainer; // #110680# - // uno::Reference<lang::XMultiServiceFactory> xServiceFactory = comphelper::getProcessServiceFactory(); - // DBG_ASSERT( xServiceFactory.is(), "got no service manager" ); if( mxServiceFactory.is() ) { @@ -154,8 +149,8 @@ uno::Reference<container::XIndexContainer> XMLMyList::GetIndexContainer() while (aItr != aProps.end()) { xIndexContainer->insertByIndex(i, aItr->Value); - aItr++; - i++; + ++aItr; + ++i; } } } @@ -456,10 +451,18 @@ void XMLDocumentSettingsContext::EndElement() } sal_Bool bLoadDocPrinter( sal_True ); - ::comphelper::ConfigurationHelper::readDirectKey( - ::comphelper::getProcessServiceFactory(), - C2U("org.openoffice.Office.Common/"), C2U("Save/Document"), C2U("LoadPrinter"), - ::comphelper::ConfigurationHelper::E_READONLY ) >>= bLoadDocPrinter; + + try + { + ::comphelper::ConfigurationHelper::readDirectKey( + ::comphelper::getProcessServiceFactory(), + C2U("org.openoffice.Office.Common/"), C2U("Save/Document"), C2U("LoadPrinter"), + ::comphelper::ConfigurationHelper::E_READONLY ) >>= bLoadDocPrinter; + } + catch( const uno::Exception& ) + { + } + uno::Sequence<beans::PropertyValue> aSeqConfigProps; if ( m_pData->aConfigProps >>= aSeqConfigProps ) { @@ -604,7 +607,7 @@ void XMLConfigItemContext::Characters( const ::rtl::OUString& rChars ) if( sTrimmedChars.getLength() ) { rtl::OUString sChars; - if( msValue ) + if( msValue.getLength() ) { sChars = msValue; sChars += sTrimmedChars; @@ -689,7 +692,7 @@ void XMLConfigItemContext::EndElement() mrAny <<= maDecoded; } else { - DBG_ERROR("wrong type"); + OSL_FAIL("wrong type"); } ManipulateConfigItem(); @@ -697,7 +700,7 @@ void XMLConfigItemContext::EndElement() mpBaseContext->AddPropertyValue(); } else { - DBG_ERROR("no BaseContext"); + OSL_FAIL("no BaseContext"); } } @@ -786,7 +789,7 @@ void XMLConfigItemMapNamedContext::EndElement() mpBaseContext->AddPropertyValue(); } else { - DBG_ERROR("no BaseContext"); + OSL_FAIL("no BaseContext"); } } @@ -895,7 +898,7 @@ void XMLConfigItemMapIndexedContext::EndElement() } catch( uno::Exception& ) { - DBG_ERROR( "Exception while importing forbidden characters" ); + OSL_FAIL( "Exception while importing forbidden characters" ); } } } @@ -903,7 +906,7 @@ void XMLConfigItemMapIndexedContext::EndElement() } else { - DBG_ERROR( "could not get the XForbiddenCharacters from document!" ); + OSL_FAIL( "could not get the XForbiddenCharacters from document!" ); mrAny <<= maProps.GetIndexContainer(); } } @@ -1008,7 +1011,8 @@ void XMLConfigItemMapIndexedContext::EndElement() mpBaseContext->AddPropertyValue(); } else { - DBG_ERROR("no BaseContext"); + OSL_FAIL("no BaseContext"); } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/core/DomBuilderContext.cxx b/xmloff/source/core/DomBuilderContext.cxx index 5a6e6ed80329..c669af1733bd 100644 --- a/xmloff/source/core/DomBuilderContext.cxx +++ b/xmloff/source/core/DomBuilderContext.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. @@ -262,3 +263,5 @@ Reference<XNode> lcl_createElement( SvXMLImport& rImport, xParent->appendChild( xNode ); return xNode; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/core/DomExport.cxx b/xmloff/source/core/DomExport.cxx index 2936951ac091..7e3e217b8f1a 100644 --- a/xmloff/source/core/DomExport.cxx +++ b/xmloff/source/core/DomExport.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. @@ -135,7 +136,7 @@ void visitNode( DomVisitor& rVisitor, const Reference<XNode>& xNode ) rVisitor.character( Reference<XCharacterData>( xNode, UNO_QUERY_THROW ) ); break; default: - DBG_ERROR( "unknown DOM node type" ); + OSL_FAIL( "unknown DOM node type" ); break; } } @@ -303,3 +304,5 @@ void exportDom( SvXMLExport& rExport, const Reference<XNode>& xNode ) DomExport aDomExport( rExport ); visit( aDomExport, xNode ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/core/ProgressBarHelper.cxx b/xmloff/source/core/ProgressBarHelper.cxx index 7e5f8569e964..83edfb771f3c 100644 --- a/xmloff/source/core/ProgressBarHelper.cxx +++ b/xmloff/source/core/ProgressBarHelper.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. @@ -101,8 +102,6 @@ void ProgressBarHelper::SetValue(sal_Int32 nTempValue) nValue = nReference; else { -// xStatusIndicator->end(); -// xStatusIndicator->start(); xStatusIndicator->reset(); nValue = 0; } @@ -120,20 +119,15 @@ void ProgressBarHelper::SetValue(sal_Int32 nTempValue) xmloff::token::DecRescheduleCount(); // #95181# disabled, because we want to call setValue very often to enable a good reschedule -// double fPercent ((fNewValue * 100) / nRange); -// if (fPercent >= (fOldPercent + fProgressStep)) -// { -// xStatusIndicator->setValue((sal_Int32)fNewValue); -// fOldPercent = fPercent; -// } } #ifdef DBG_UTIL else if (!bFailure) { - DBG_ERROR("tried to set a wrong value on the progressbar"); + OSL_FAIL("tried to set a wrong value on the progressbar"); bFailure = sal_True; } #endif } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/core/PropertySetMerger.cxx b/xmloff/source/core/PropertySetMerger.cxx index 56fa7ac049fd..a6c6f5cf270f 100644 --- a/xmloff/source/core/PropertySetMerger.cxx +++ b/xmloff/source/core/PropertySetMerger.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 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::lang; -#ifndef _CPPUHELPER_IMPLBASE1_HXX_ #include <cppuhelper/implbase3.hxx> -#endif class SvXMLAttrContainerItem_Impl; @@ -265,3 +264,5 @@ Reference< XPropertySet > PropertySetMerger_CreateInstance( Reference< XProperty { return new PropertySetMergerImpl( rPropSet1, rPropSet2 ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/core/RDFaExportHelper.cxx b/xmloff/source/core/RDFaExportHelper.cxx index 1fbcc506e7ed..952c7cf6d229 100644 --- a/xmloff/source/core/RDFaExportHelper.cxx +++ b/xmloff/source/core/RDFaExportHelper.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,8 +104,8 @@ getRelativeReference(SvXMLExport const& rExport, ::rtl::OUString const& rURI) xContext->getServiceManager(), uno::UNO_SET_THROW); uno::Reference<uri::XUriReferenceFactory> const xUriFactory( xServiceFactory->createInstanceWithContext( - ::rtl::OUString::createFromAscii( - "com.sun.star.uri.UriReferenceFactory"), xContext), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.uri.UriReferenceFactory")), xContext), uno::UNO_QUERY_THROW); uno::Reference< uri::XUriReference > const xBaseURI( @@ -214,7 +215,7 @@ RDFaExportHelper::AddRDFa( ::boost::bind(&makeCURIE, &m_rExport, ::boost::bind(&rdf::Statement::Predicate, _1))), ::comphelper::OUStringBufferAppender(property), - ::rtl::OUString::createFromAscii(" ")); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" "))); m_rExport.AddAttribute(XML_NAMESPACE_XHTML, token::XML_PROPERTY, property.makeStringAndClear()); @@ -223,9 +224,10 @@ RDFaExportHelper::AddRDFa( } catch (uno::Exception &) { - OSL_ENSURE(false, "AddRDFa: exception"); + OSL_FAIL("AddRDFa: exception"); } } } // namespace xmloff +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/core/RDFaImportHelper.cxx b/xmloff/source/core/RDFaImportHelper.cxx index 611889497812..043b9f70e5fa 100644 --- a/xmloff/source/core/RDFaImportHelper.cxx +++ b/xmloff/source/core/RDFaImportHelper.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. @@ -194,7 +195,7 @@ RDFaReader::ReadCURIE(::rtl::OUString const & i_rCURIE) const ::rtl::OUString Namespace; sal_uInt16 nKey( GetImport().GetNamespaceMap()._GetKeyByAttrName( i_rCURIE, &Prefix, &LocalName, &Namespace) ); - if (Prefix.equalsAscii("_")) + if (Prefix.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("_"))) { // eeek, it's a bnode! // "_" is not a valid URI scheme => we can identify bnodes @@ -208,7 +209,6 @@ RDFaReader::ReadCURIE(::rtl::OUString const & i_rCURIE) const { // N.B.: empty LocalName is valid! const ::rtl::OUString URI(Namespace + LocalName); -// return GetImport().GetAbsoluteReference(URI); return GetAbsoluteReference(URI); } else @@ -274,7 +274,6 @@ RDFaReader::ReadURIOrSafeCURIE(::rtl::OUString const & i_rURIOrSafeCURIE) const } else { -// return GetImport().GetAbsoluteReference(i_rURIOrSafeCURIE); return GetAbsoluteReference(i_rURIOrSafeCURIE); } } @@ -309,7 +308,7 @@ RDFaInserter::MakeURI( ::rtl::OUString const & i_rURI) const } catch (uno::Exception &) { - OSL_ENSURE(false, "MakeURI: cannot create URI"); + OSL_FAIL("MakeURI: cannot create URI"); return 0; } } @@ -404,7 +403,7 @@ void RDFaInserter::InsertRDFaEntry( } catch (uno::Exception &) { - OSL_ENSURE(false, "InsertRDFaEntry: setStatementRDFa failed?"); + OSL_FAIL("InsertRDFaEntry: setStatementRDFa failed?"); } } @@ -456,12 +455,12 @@ RDFaImportHelper::AddRDFa( { if (!i_xObject.is()) { - OSL_ENSURE(false, "AddRDFa: invalid arg: null textcontent"); + OSL_FAIL("AddRDFa: invalid arg: null textcontent"); return; } if (!i_pRDFaAttributes.get()) { - OSL_ENSURE(false, "AddRDFa: invalid arg: null RDFa attributes"); + OSL_FAIL("AddRDFa: invalid arg: null RDFa attributes"); return; } m_RDFaEntries.push_back(RDFaEntry(i_xObject, i_pRDFaAttributes)); @@ -499,3 +498,4 @@ void RDFaImportHelper::InsertRDFa( } // namespace xmloff +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/core/SettingsExportHelper.cxx b/xmloff/source/core/SettingsExportHelper.cxx index 7541feb38999..7125df8f53c2 100644 --- a/xmloff/source/core/SettingsExportHelper.cxx +++ b/xmloff/source/core/SettingsExportHelper.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,7 +83,7 @@ void XMLSettingsExportHelper::CallTypeFunction(const uno::Any& rAny, * This assertion pops up when exporting values which are set to: * PropertyAttribute::MAYBEVOID, and thus are _supposed_ to have * a VOID value...so I'm removing it ...mtg - * DBG_ERROR("no type"); + * OSL_FAIL("no type"); */ } break; @@ -179,7 +180,7 @@ void XMLSettingsExportHelper::CallTypeFunction(const uno::Any& rAny, exportSymbolDescriptors(aProps, rName); } else { - DBG_ERROR("this type is not implemented now"); + OSL_FAIL("this type is not implemented now"); } } break; @@ -310,7 +311,6 @@ void XMLSettingsExportHelper::exportSymbolDescriptors( const rtl::OUString rName) const { // #110680# - // uno::Reference< lang::XMultiServiceFactory > xServiceFactory( comphelper::getProcessServiceFactory() ); uno::Reference< lang::XMultiServiceFactory > xServiceFactory( m_rContext.GetServiceFactory() ); DBG_ASSERT( xServiceFactory.is(), "XMLSettingsExportHelper::exportSymbolDescriptors: got no service manager" ); @@ -430,7 +430,7 @@ void XMLSettingsExportHelper::exportIndexAccess( DBG_ASSERT(rName.getLength(), "no name"); DBG_ASSERT(aIndexed->getElementType().equals(getCppuType( (uno::Sequence<beans::PropertyValue> *)0 ) ), "wrong IndexAccess" ); - rtl::OUString sEmpty;// ( RTLCONSTASCII_USTRINGPARAM( "View" ) ); + rtl::OUString sEmpty; if(aIndexed->hasElements()) { m_rContext.AddAttribute( XML_NAME, rName ); @@ -460,7 +460,6 @@ void XMLSettingsExportHelper::exportForbiddenCharacters( return; // #110680# - // uno::Reference< lang::XMultiServiceFactory > xServiceFactory( comphelper::getProcessServiceFactory() ); uno::Reference< lang::XMultiServiceFactory > xServiceFactory( m_rContext.GetServiceFactory() ); DBG_ASSERT( xServiceFactory.is(), "XMLSettingsExportHelper::exportForbiddenCharacters: got no service manager" ); @@ -567,3 +566,5 @@ void XMLSettingsExportHelper::ManipulateSetting( uno::Any& rAny, const rtl::OUSt } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/core/XMLBase64Export.cxx b/xmloff/source/core/XMLBase64Export.cxx index 3833e9924153..cca38edbe776 100644 --- a/xmloff/source/core/XMLBase64Export.cxx +++ b/xmloff/source/core/XMLBase64Export.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. @@ -93,3 +94,4 @@ sal_Bool XMLBase64Export::exportOfficeBinaryDataElement( ::xmloff::token::XML_BINARY_DATA ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/core/XMLBase64ImportContext.cxx b/xmloff/source/core/XMLBase64ImportContext.cxx index 1a134f02bcfe..cdbbe4eaa50d 100644 --- a/xmloff/source/core/XMLBase64ImportContext.cxx +++ b/xmloff/source/core/XMLBase64ImportContext.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,7 +70,7 @@ void XMLBase64ImportContext::Characters( const ::rtl::OUString& rChars ) if( sTrimmedChars.getLength() ) { OUString sChars; - if( sBase64CharsLeft ) + if( sBase64CharsLeft.getLength() ) { sChars = sBase64CharsLeft; sChars += sTrimmedChars; @@ -89,3 +90,5 @@ void XMLBase64ImportContext::Characters( const ::rtl::OUString& rChars ) } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/core/XMLBasicExportFilter.cxx b/xmloff/source/core/XMLBasicExportFilter.cxx index 6b7bbff57d6e..b9d7e8c078d5 100644 --- a/xmloff/source/core/XMLBasicExportFilter.cxx +++ b/xmloff/source/core/XMLBasicExportFilter.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. @@ -123,3 +124,5 @@ void XMLBasicExportFilter::setDocumentLocator( const Reference< xml::sax::XLocat } // ----------------------------------------------------------------------------- + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/core/XMLEmbeddedObjectExportFilter.cxx b/xmloff/source/core/XMLEmbeddedObjectExportFilter.cxx index a55b6505981f..088eae39807b 100644 --- a/xmloff/source/core/XMLEmbeddedObjectExportFilter.cxx +++ b/xmloff/source/core/XMLEmbeddedObjectExportFilter.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. @@ -180,3 +181,5 @@ Sequence< OUString > SAL_CALL XMLEmbeddedObjectExportFilter::getSupportedService Sequence< OUString > aSeq; return aSeq; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx index 83eeb8afb534..72ecefabcc5b 100644 --- a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx +++ b/xmloff/source/core/XMLEmbeddedObjectImportContext.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,11 +32,6 @@ #include <com/sun/star/util/XModifiable.hpp> #include <com/sun/star/util/XModifiable2.hpp> #include <com/sun/star/frame/XStorable.hpp> - -// #110680# -//#ifndef _COMPHELPER_PROCESSFACTORY_HXX_ -//#include <comphelper/processfactory.hxx> -//#endif #include <tools/globname.hxx> #include <sot/clsids.hxx> #include <tools/globname.hxx> @@ -167,8 +163,6 @@ sal_Bool XMLEmbeddedObjectImportContext::SetComponent( Sequence<Any> aArgs( 0 ); - // #110680# - // Reference< XMultiServiceFactory > xServiceFactory = comphelper::getProcessServiceFactory(); Reference< XMultiServiceFactory > xServiceFactory = GetImport().getServiceFactory(); xHandler = Reference < XDocumentHandler >( @@ -332,30 +326,6 @@ void XMLEmbeddedObjectImportContext::EndElement() GetPrefix(), GetLocalName() ) ); xHandler->endDocument(); - - // storing part is commented out since it should be done through the object, not the model - // TODO/LATER: probably an object should be provided here an be stored here - -// // Save the object. That's required because the object should not be -// // modified (it has been loaded just now). Setting it to unmodified -// // only does not work, because it is then assumed that it has been -// // stored. -// Reference < XStorable > xStorable( xComp, UNO_QUERY ); -// if( xStorable.is() ) -// { -// try -// { -// xStorable->store(); -// } -// catch( ::com::sun::star::beans::PropertyVetoException& ) -// { -// Sequence<OUString> aSeq( 0 ); -// GetImport().SetError( XMLERROR_FLAG_WARNING | -// XMLERROR_API, -// aSeq ); -// } -// } - try { Reference < XModifiable2 > xModifiable2( xComp, UNO_QUERY_THROW ); @@ -365,25 +335,6 @@ void XMLEmbeddedObjectImportContext::EndElement() catch( Exception& ) { } - - -// // reset modifies state for the object since it has been imported -// // completly and therfor hasn't been modified. -// Reference < XModifiable > xModifiable( xComp, UNO_QUERY ); -// if( xModifiable.is() ) -// { -// try -// { -// xModifiable->setModified( sal_False ); -// } -// catch( ::com::sun::star::beans::PropertyVetoException& e ) -// { -// Sequence<OUString> aSeq( 0 ); -// GetImport().SetError( XMLERROR_FLAG_WARNING | -// XMLERROR_API, -// aSeq ); -// } -// } } } @@ -393,3 +344,4 @@ void XMLEmbeddedObjectImportContext::Characters( const ::rtl::OUString& rChars ) xHandler->characters( rChars ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/core/attrlist.cxx b/xmloff/source/core/attrlist.cxx index 4bf051198c89..9216f694bc6b 100644 --- a/xmloff/source/core/attrlist.cxx +++ b/xmloff/source/core/attrlist.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,8 +32,8 @@ #include <vector> #include <osl/mutex.hxx> #include <xmloff/xmltoken.hxx> -#include <rtl/uuid.h> #include <rtl/memory.h> +#include <comphelper/servicehelper.hxx> #include <xmloff/attrlist.hxx> @@ -255,21 +256,15 @@ sal_Int16 SvXMLAttributeList::GetIndexByName( const OUString& rName ) const return -1; } +namespace +{ + class theSvXMLAttributeListUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theSvXMLAttributeListUnoTunnelId> {}; +} + // XUnoTunnel & co const uno::Sequence< sal_Int8 > & SvXMLAttributeList::getUnoTunnelId() throw() { - static uno::Sequence< sal_Int8 > * pSeq = 0; - if( !pSeq ) - { - Guard< Mutex > aGuard( Mutex::getGlobalMutex() ); - if( !pSeq ) - { - static uno::Sequence< sal_Int8 > aSeq( 16 ); - rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True ); - pSeq = &aSeq; - } - } - return *pSeq; + return theSvXMLAttributeListUnoTunnelId::get().getSeq(); } SvXMLAttributeList* SvXMLAttributeList::getImplementation( uno::Reference< uno::XInterface > xInt ) throw() @@ -299,3 +294,4 @@ sal_Int64 SAL_CALL SvXMLAttributeList::getSomething( const uno::Sequence< sal_In } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/core/facreg.cxx b/xmloff/source/core/facreg.cxx index 5dd1aac9fe12..e50ecad6710d 100644 --- a/xmloff/source/core/facreg.cxx +++ b/xmloff/source/core/facreg.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. @@ -42,9 +43,10 @@ #include <uno/lbnames.h> #include "xmloff/xmlreg.hxx" -using namespace rtl; using namespace com::sun::star; +using ::rtl::OUString; + #define SERVICE( className ) \ extern OUString SAL_CALL className##_getImplementationName() throw(); \ extern uno::Sequence< OUString > SAL_CALL className##_getSupportedServiceNames() throw();\ @@ -281,3 +283,4 @@ XMLOFF_DLLPUBLIC void * SAL_CALL component_getFactory( const sal_Char * pImplNam } #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/core/i18nmap.cxx b/xmloff/source/core/i18nmap.cxx index e6dc7930e673..bf615a02e645 100644 --- a/xmloff/source/core/i18nmap.cxx +++ b/xmloff/source/core/i18nmap.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,7 +33,7 @@ #include <svl/svarray.hxx> #include "xmloff/i18nmap.hxx" -using namespace rtl; +using ::rtl::OUString; class SvI18NMapEntry_Impl { @@ -124,3 +125,4 @@ const OUString& SvI18NMap::Get( sal_uInt16 nKind, const OUString& rName ) const } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/core/nmspmap.cxx b/xmloff/source/core/nmspmap.cxx index 994db71763ae..977bf46b175b 100644 --- a/xmloff/source/core/nmspmap.cxx +++ b/xmloff/source/core/nmspmap.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/ustring.hxx> #include <rtl/ustrbuf.hxx> -#ifndef _XMLTOKEN_HXX #include <xmloff/xmltoken.hxx> -#endif #include <xmloff/nmspmap.hxx> #include "xmloff/xmlnmspe.hxx" @@ -44,7 +43,7 @@ using ::rtl::OUStringBuffer; using namespace ::xmloff::token; /* The basic idea of this class is that we have two two ways to search our - * data...by prefix and by key. We use an STL hash_map for fast prefix + * data...by prefix and by key. We use an STL boost::unordered_map for fast prefix * searching and an STL map for fast key searching. * * The references to an 'Index' refer to an earlier implementation of the @@ -82,7 +81,7 @@ SvXMLNamespaceMap::~SvXMLNamespaceMap() while ( aIter != aEnd ) { const OUString *pString = (*aIter).first.second; - aIter++; + ++aIter; delete pString; } } @@ -107,7 +106,7 @@ sal_uInt16 SvXMLNamespaceMap::_Add( const OUString& rPrefix, const OUString &rNa } while ( sal_True ); } - ::vos::ORef<NameSpaceEntry> pEntry(new NameSpaceEntry); + ::rtl::Reference<NameSpaceEntry> pEntry(new NameSpaceEntry); pEntry->sName = rName; pEntry->nKey = nKey; pEntry->sPrefix = rPrefix; @@ -172,7 +171,7 @@ sal_uInt16 SvXMLNamespaceMap::GetKeyByName( const OUString& rName ) const nKey = (*aIter).second->nKey; break; } - aIter++; + ++aIter; } return nKey; } @@ -309,7 +308,7 @@ sal_uInt16 SvXMLNamespaceMap::_GetKeyByAttrName( const OUString& rAttrName, it = aNameCache.end(); if ( it != aNameCache.end() ) { - const NameSpaceEntry &rEntry = (*it).second.getBody(); + const NameSpaceEntry &rEntry = *((*it).second); if ( pPrefix ) *pPrefix = rEntry.sPrefix; if ( pLocalName ) @@ -323,7 +322,7 @@ sal_uInt16 SvXMLNamespaceMap::_GetKeyByAttrName( const OUString& rAttrName, } else { - vos::ORef<NameSpaceEntry> xEntry(new NameSpaceEntry()); + rtl::Reference<NameSpaceEntry> xEntry(new NameSpaceEntry()); sal_Int32 nColonPos = rAttrName.indexOf( sal_Unicode(':') ); if( -1L == nColonPos ) @@ -361,7 +360,7 @@ sal_uInt16 SvXMLNamespaceMap::_GetKeyByAttrName( const OUString& rAttrName, if (bCache) { - typedef std::pair< const rtl::OUString, vos::ORef<NameSpaceEntry> > value_type; + typedef std::pair< const rtl::OUString, rtl::Reference<NameSpaceEntry> > value_type; (void) const_cast<NameSpaceHash*>(&aNameCache)->insert (value_type (rAttrName, xEntry)); } } @@ -591,3 +590,5 @@ sal_Bool SvXMLNamespaceMap::NormalizeOasisURN( ::rtl::OUString& rName ) return sal_True; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/core/unoatrcn.cxx b/xmloff/source/core/unoatrcn.cxx index 9b5ca4106c46..38e0d4c53fd3 100644 --- a/xmloff/source/core/unoatrcn.cxx +++ b/xmloff/source/core/unoatrcn.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,8 +31,8 @@ #include <tools/debug.hxx> #include <com/sun/star/xml/AttributeData.hpp> #include <rtl/ustrbuf.hxx> -#include <rtl/uuid.h> #include <rtl/memory.h> +#include <comphelper/servicehelper.hxx> #include <xmloff/xmlcnimp.hxx> @@ -108,20 +109,14 @@ sal_uInt16 SvUnoAttributeContainer::getIndexByName(const OUString& aName ) const return USHRT_MAX; } +namespace +{ + class theSvUnoAttributeContainerUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theSvUnoAttributeContainerUnoTunnelId> {}; +} + const ::com::sun::star::uno::Sequence< sal_Int8 > & SvUnoAttributeContainer::getUnoTunnelId() throw() { - static ::com::sun::star::uno::Sequence< sal_Int8 > * pSeq = 0; - if( !pSeq ) - { - ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ); - if( !pSeq ) - { - static ::com::sun::star::uno::Sequence< sal_Int8 > aSeq( 16 ); - rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True ); - pSeq = &aSeq; - } - } - return *pSeq; + return theSvUnoAttributeContainerUnoTunnelId::get().getSeq(); } SvUnoAttributeContainer* SvUnoAttributeContainer::getImplementation( uno::Reference< uno::XInterface > xInt ) throw() @@ -159,7 +154,7 @@ uno::Any SAL_CALL SvUnoAttributeContainer::getByName(const OUString& aName) xml::AttributeData aData; aData.Namespace = mpContainer->GetAttrNamespace(nAttr); - aData.Type = OUString::createFromAscii("CDATA"); + aData.Type = OUString(RTL_CONSTASCII_USTRINGPARAM("CDATA")); aData.Value = mpContainer->GetAttrValue(nAttr); uno::Any aAny; @@ -286,13 +281,13 @@ void SAL_CALL SvUnoAttributeContainer::removeByName(const OUString& Name) //XServiceInfo OUString SAL_CALL SvUnoAttributeContainer::getImplementationName(void) throw( uno::RuntimeException ) { - return OUString::createFromAscii( "SvUnoAttributeContainer" ); + return OUString(RTL_CONSTASCII_USTRINGPARAM( "SvUnoAttributeContainer" )); } uno::Sequence< OUString > SvUnoAttributeContainer::getSupportedServiceNames(void) throw( uno::RuntimeException ) { - OUString aSN( OUString::createFromAscii( "com.sun.star.xml.AttributeContainer" ) ); + OUString aSN( OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.AttributeContainer" )) ); uno::Sequence< OUString > aNS( &aSN, 1L ); return aNS; } @@ -313,3 +308,4 @@ sal_Bool SvUnoAttributeContainer::supportsService(const OUString& ServiceName) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/core/unointerfacetouniqueidentifiermapper.cxx b/xmloff/source/core/unointerfacetouniqueidentifiermapper.cxx index 7026ae8cf2e9..6503a97bee03 100644 --- a/xmloff/source/core/unointerfacetouniqueidentifiermapper.cxx +++ b/xmloff/source/core/unointerfacetouniqueidentifiermapper.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. @@ -169,3 +170,4 @@ bool UnoInterfaceToUniqueIdentifierMapper::findIdentifier( const OUString& rIden } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/core/xmlcnitm.cxx b/xmloff/source/core/xmlcnitm.cxx index e1bd55ff040b..7c7864b5df5f 100644 --- a/xmloff/source/core/xmlcnitm.cxx +++ b/xmloff/source/core/xmlcnitm.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,12 +35,13 @@ #include <xmloff/xmlcnimp.hxx> #include "xmloff/unoatrcn.hxx" -using namespace rtl; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::xml; +using ::rtl::OUString; + typedef ::rtl::OUString *OUStringPtr; SV_DECL_PTRARR_DEL( SvXMLAttrContainerData_Impl, OUStringPtr, 5, 5 ) SV_IMPL_PTRARR( SvXMLAttrContainerData_Impl, OUStringPtr ) @@ -195,7 +197,7 @@ void SvXMLAttrContainerData::Remove( sal_uInt16 i ) } else { - DBG_ERROR( "illegal index" ); + OSL_FAIL( "illegal index" ); } } @@ -216,3 +218,4 @@ const ::rtl::OUString& SvXMLAttrContainerData::GetAttrValue(sal_uInt16 i) const return *(*pValues)[i]; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/core/xmlehelp.cxx b/xmloff/source/core/xmlehelp.cxx index 866595cd2047..fe38c798921b 100644 --- a/xmloff/source/core/xmlehelp.cxx +++ b/xmloff/source/core/xmlehelp.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 <rtl/ustrbuf.hxx> #include "xmlehelp.hxx" -#ifndef _XMLOFF_XMTOKEN_HXX #include <xmloff/xmltoken.hxx> -#endif using ::rtl::OUString; using ::rtl::OUStringBuffer; @@ -403,7 +402,7 @@ double SvXMLExportHelper::GetConversionFactor(::rtl::OUStringBuffer& rUnit, break; } default: - DBG_ERROR("xmloff::SvXMLExportHelper::GetConversionFactor(), illegal eCoreUnit value!"); + OSL_FAIL("xmloff::SvXMLExportHelper::GetConversionFactor(), illegal eCoreUnit value!"); break; } @@ -498,3 +497,5 @@ MapUnit SvXMLExportHelper::GetUnitFromString(const ::rtl::OUString& rString, Map return eRetUnit; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/core/xmlenums.hxx b/xmloff/source/core/xmlenums.hxx index 9d08d3ba17fa..5a4a881da446 100644 --- a/xmloff/source/core/xmlenums.hxx +++ b/xmloff/source/core/xmlenums.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,5 @@ enum XMLSymbolDescriptorsEnum XML_SYMBOL_DESCRIPTOR_MAX }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/core/xmlerror.cxx b/xmloff/source/core/xmlerror.cxx index 7581739aae13..640720166428 100644 --- a/xmloff/source/core/xmlerror.cxx +++ b/xmloff/source/core/xmlerror.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. @@ -73,8 +74,8 @@ public: OUString sExceptionMessage;/// message of original exception (if available) // XLocator information: - sal_Int32 nRow; /// row number where error occured (or -1 for unknown) - sal_Int32 nColumn; /// column number where error occured (or -1) + sal_Int32 nRow; /// row number where error occurred (or -1 for unknown) + sal_Int32 nColumn; /// column number where error occurred (or -1) OUString sPublicId; /// public identifier OUString sSystemId; /// public identifier @@ -129,7 +130,7 @@ void XMLErrors::AddRecord( OUStringBuffer sMessage; - sMessage.appendAscii( "An error or a warning has occured during XML import/export!\n" ); + sMessage.appendAscii( "An error or a warning has occurred during XML import/export!\n" ); // ID & flags sMessage.appendAscii( "Error-Id: 0x"); @@ -194,7 +195,7 @@ void XMLErrors::AddRecord( // convert to byte string and signal the error ByteString aError( String( sMessage.makeStringAndClear() ), RTL_TEXTENCODING_ASCII_US ); - DBG_ERROR( aError.GetBuffer() ); + OSL_FAIL( aError.GetBuffer() ); #endif } @@ -241,7 +242,7 @@ void XMLErrors::ThrowErrorAsSAXException(sal_Int32 nIdMask) // search first error/warning that matches the nIdMask for( ErrorList::iterator aIter = aErrors.begin(); aIter != aErrors.end(); - aIter++ ) + ++aIter ) { if ( (aIter->nId & nIdMask) != 0 ) { @@ -255,3 +256,5 @@ void XMLErrors::ThrowErrorAsSAXException(sal_Int32 nIdMask) } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 32b4d322bba2..2d407f41bfc3 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.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,7 +34,6 @@ #endif #include "unointerfacetouniqueidentifiermapper.hxx" #include <osl/mutex.hxx> -#include <rtl/uuid.h> #include <tools/debug.hxx> #include <tools/urlobj.hxx> #include <comphelper/genericpropertyset.hxx> @@ -78,10 +78,11 @@ #include "xmloff/XMLFilterServiceNames.h" #include "xmloff/XMLEmbeddedObjectExportFilter.hxx" #include "XMLBasicExportFilter.hxx" -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <rtl/logfile.hxx> #include <cppuhelper/implbase1.hxx> #include <comphelper/extract.hxx> +#include <comphelper/servicehelper.hxx> #include "PropertySetMerger.hxx" #include "svl/urihelper.hxx" @@ -112,10 +113,8 @@ using namespace ::com::sun::star::xml::sax; using namespace ::com::sun::star::io; using namespace ::xmloff::token; -sal_Char __READONLY_DATA sXML_1_1[] = "1.1"; -sal_Char __READONLY_DATA sXML_1_2[] = "1.2"; - -const sal_Char *sOpenOfficeOrgProject ="OpenOffice.org_project"; +sal_Char const sXML_1_1[] = "1.1"; +sal_Char const sXML_1_2[] = "1.2"; // #i115030#: the XSLT is not finished, and not available via HTTP const sal_Char s_grddl_xsl[] = "http://FIXME"; @@ -269,12 +268,9 @@ public: uno::Reference< uri::XUriReferenceFactory > mxUriReferenceFactory; rtl::OUString msPackageURI; rtl::OUString msPackageURIScheme; - // --> OD 2006-09-27 #i69627# + // Written OpenDocument file format doesn't fit to the created text document (#i69627#) sal_Bool mbOutlineStyleAsNormalListStyle; - // <-- - // --> PB 2007-07-06 #i146851# sal_Bool mbSaveBackwardCompatibleODF; - // <-- uno::Reference< embed::XStorage > mxTargetStorage; @@ -296,9 +292,7 @@ public: ::std::auto_ptr< ::xmloff::RDFaExportHelper> mpRDFaHelper; - // --> OD 2008-11-26 #158694# sal_Bool mbExportTextNumberElement; - // <-- sal_Bool mbNullDateInitialized; void SetSchemeOf( const ::rtl::OUString& rOrigFileName ) @@ -310,20 +304,15 @@ public: }; SvXMLExport_Impl::SvXMLExport_Impl() - // --> OD 2006-09-27 #i69627# + // Written OpenDocument file format doesn't fit to the created text document (#i69627#) : mbOutlineStyleAsNormalListStyle( false ) - // <-- - // --> PB 2007-07-06 #i146851# ,mbSaveBackwardCompatibleODF( sal_True ) - // <-- ,mxComponentContext( ::comphelper::getProcessComponentContext() ) ,mStreamName() ,mNamespaceMaps() ,mDepth(0) ,mpRDFaHelper() // lazy - // --> OD 2008-11-26 #158694# ,mbExportTextNumberElement( sal_False ) - // <-- ,mbNullDateInitialized( sal_False ) { OSL_ENSURE(mxComponentContext.is(), "SvXMLExport: no ComponentContext"); @@ -409,6 +398,7 @@ void SvXMLExport::_InitCtor() mpNamespaceMap->Add( GetXMLToken(XML_NP_XSD), GetXMLToken(XML_N_XSD), XML_NAMESPACE_XSD ); mpNamespaceMap->Add( GetXMLToken(XML_NP_XSI), GetXMLToken(XML_N_XSI), XML_NAMESPACE_XSI ); mpNamespaceMap->Add( GetXMLToken(XML_NP_FIELD), GetXMLToken(XML_N_FIELD), XML_NAMESPACE_FIELD ); + mpNamespaceMap->Add( GetXMLToken(XML_NP_FORMX), GetXMLToken(XML_N_FORMX), XML_NAMESPACE_FORMX ); } // RDFa: needed for content and header/footer styles if( (getExportFlags() & (EXPORT_STYLES|EXPORT_AUTOSTYLES|EXPORT_MASTERSTYLES|EXPORT_CONTENT) ) != 0 ) @@ -422,6 +412,12 @@ void SvXMLExport::_InitCtor() mpNamespaceMap->Add( GetXMLToken(XML_NP_GRDDL), GetXMLToken(XML_N_GRDDL), XML_NAMESPACE_GRDDL ); } + // CSS Text Level 3 for distributed text justification. + if ( (getExportFlags() & (EXPORT_STYLES|EXPORT_AUTOSTYLES|EXPORT_MASTERSTYLES)) != 0 ) + { + mpNamespaceMap->Add( + GetXMLToken(XML_NP_CSS3TEXT), GetXMLToken(XML_N_CSS3TEXT), XML_NAMESPACE_CSS3TEXT ); + } mxAttrList = (xml::sax::XAttributeList*)mpAttrList; @@ -436,14 +432,11 @@ void SvXMLExport::_InitCtor() mxModel->addEventListener(mxEventListener); } - // --> OD 2006-03-10 #i51726# - determine model type + // Determine model type (#i51726#) _DetermineModelType(); - // <-- mbEnableExperimentalOdfExport = getenv("ENABLE_EXPERIMENTAL_ODF_EXPORT") != NULL; - // --> PB 2007-07-06 #146851# - load mbSaveBackwardCompatibleODF from configuration - // cl: but only if we do export to current oasis format, old openoffice format *must* always be compatible if( (getExportFlags() & EXPORT_OASIS) != 0 ) { @@ -456,10 +449,9 @@ void SvXMLExport::_InitCtor() mpImpl->mbSaveBackwardCompatibleODF = bTemp; } } - // <-- } -// --> OD 2006-03-14 #i51726# +// Shapes in Writer cannot be named via context menu (#i51726#) void SvXMLExport::_DetermineModelType() { meModelType = SvtModuleOptions::E_UNKNOWN_FACTORY; @@ -469,18 +461,14 @@ void SvXMLExport::_DetermineModelType() meModelType = SvtModuleOptions::ClassifyFactoryByModel( mxModel ); } } -// <-- -// #110680# SvXMLExport::SvXMLExport( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, MapUnit eDfltUnit, const enum XMLTokenEnum eClass, sal_uInt16 nExportFlags ) : mpImpl( new SvXMLExport_Impl ), - // #110680# mxServiceFactory(xServiceFactory), mpAttrList( new SvXMLAttributeList ), mpNamespaceMap( new SvXMLNamespaceMap ), - // #110680# mpUnitConv( new SvXMLUnitConverter( MAP_100TH_MM, eDfltUnit, getServiceFactory() ) ), mpNumExport(0L), mpProgressBarHelper( NULL ), @@ -498,21 +486,18 @@ SvXMLExport::SvXMLExport( _InitCtor(); } -// #110680# SvXMLExport::SvXMLExport( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, const OUString &rFileName, const uno::Reference< xml::sax::XDocumentHandler > & rHandler, MapUnit eDfltUnit ) : mpImpl( new SvXMLExport_Impl ), - // #110680# mxServiceFactory(xServiceFactory), mxHandler( rHandler ), mxExtHandler( rHandler, uno::UNO_QUERY ), mpAttrList( new SvXMLAttributeList ), msOrigFileName( rFileName ), mpNamespaceMap( new SvXMLNamespaceMap ), - // #110680# mpUnitConv( new SvXMLUnitConverter( MAP_100TH_MM, eDfltUnit, getServiceFactory() ) ), mpNumExport(0L), mpProgressBarHelper( NULL ), @@ -534,7 +519,6 @@ SvXMLExport::SvXMLExport( mpNumExport = new SvXMLNumFmtExport(*this, mxNumberFormatsSupplier); } -// #110680# SvXMLExport::SvXMLExport( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, const OUString &rFileName, @@ -542,7 +526,6 @@ SvXMLExport::SvXMLExport( const Reference< XModel >& rModel, sal_Int16 eDfltUnit ) : mpImpl( new SvXMLExport_Impl ), - // #110680# mxServiceFactory(xServiceFactory), mxModel( rModel ), mxHandler( rHandler ), @@ -551,8 +534,6 @@ SvXMLExport::SvXMLExport( mpAttrList( new SvXMLAttributeList ), msOrigFileName( rFileName ), mpNamespaceMap( new SvXMLNamespaceMap ), - // #110680# - // pUnitConv( new SvXMLUnitConverter( MAP_100TH_MM, SvXMLUnitConverter::GetMapUnit(eDfltUnit) ) ), mpUnitConv( new SvXMLUnitConverter( MAP_100TH_MM, SvXMLUnitConverter::GetMapUnit(eDfltUnit), getServiceFactory() ) ), mpNumExport(0L), mpProgressBarHelper( NULL ), @@ -574,7 +555,6 @@ SvXMLExport::SvXMLExport( mpNumExport = new SvXMLNumFmtExport(*this, mxNumberFormatsSupplier); } -// #110680# SvXMLExport::SvXMLExport( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, const OUString &rFileName, @@ -583,7 +563,6 @@ SvXMLExport::SvXMLExport( const Reference< document::XGraphicObjectResolver >& rEmbeddedGraphicObjects, sal_Int16 eDfltUnit ) : mpImpl( new SvXMLExport_Impl ), - // #110680# mxServiceFactory(xServiceFactory), mxModel( rModel ), mxHandler( rHandler ), @@ -593,7 +572,6 @@ SvXMLExport::SvXMLExport( mpAttrList( new SvXMLAttributeList ), msOrigFileName( rFileName ), mpNamespaceMap( new SvXMLNamespaceMap ), - // #110680# mpUnitConv( new SvXMLUnitConverter( MAP_100TH_MM, SvXMLUnitConverter::GetMapUnit(eDfltUnit), getServiceFactory() ) ), mpNumExport(0L), mpProgressBarHelper( NULL ), @@ -724,12 +702,10 @@ void SAL_CALL SvXMLExport::setSourceDocument( const uno::Reference< lang::XCompo } } - // --> PB 2007-07-06 #i146851# if ( mpImpl->mbSaveBackwardCompatibleODF ) mnExportFlags |= EXPORT_SAVEBACKWARDCOMPATIBLE; else mnExportFlags &= ~EXPORT_SAVEBACKWARDCOMPATIBLE; - // <-- // namespaces for user defined attributes Reference< XMultiServiceFactory > xFactory( mxModel, UNO_QUERY ); @@ -765,9 +741,8 @@ void SAL_CALL SvXMLExport::setSourceDocument( const uno::Reference< lang::XCompo } } - // --> OD 2006-03-10 #i51726# - determine model type + // Determine model type (#i51726#) _DetermineModelType(); - // <-- } // XInitialize @@ -857,7 +832,7 @@ void SAL_CALL SvXMLExport::initialize( const uno::Sequence< uno::Any >& aArgumen } mpImpl->mStreamName = sName; // Note: may be empty (XSLT) - // --> OD 2006-09-26 #i69627# + // Written OpenDocument file format doesn't fit to the created text document (#i69627#) const ::rtl::OUString sOutlineStyleAsNormalListStyle( RTL_CONSTASCII_USTRINGPARAM("OutlineStyleAsNormalListStyle") ); if( xPropertySetInfo->hasPropertyByName( sOutlineStyleAsNormalListStyle ) ) @@ -865,13 +840,11 @@ void SAL_CALL SvXMLExport::initialize( const uno::Sequence< uno::Any >& aArgumen uno::Any aAny = mxExportInfo->getPropertyValue( sOutlineStyleAsNormalListStyle ); aAny >>= (mpImpl->mbOutlineStyleAsNormalListStyle); } - // <-- OUString sTargetStorage( RTL_CONSTASCII_USTRINGPARAM("TargetStorage") ); if( xPropertySetInfo->hasPropertyByName( sTargetStorage ) ) mxExportInfo->getPropertyValue( sTargetStorage ) >>= mpImpl->mxTargetStorage; - // --> OD 2008-11-26 #158694# const ::rtl::OUString sExportTextNumberElement( RTL_CONSTASCII_USTRINGPARAM("ExportTextNumberElement") ); if( xPropertySetInfo->hasPropertyByName( sExportTextNumberElement ) ) @@ -879,7 +852,6 @@ void SAL_CALL SvXMLExport::initialize( const uno::Sequence< uno::Any >& aArgumen uno::Any aAny = mxExportInfo->getPropertyValue( sExportTextNumberElement ); aAny >>= (mpImpl->mbExportTextNumberElement); } - // <-- } } @@ -950,8 +922,8 @@ sal_Bool SAL_CALL SvXMLExport::filter( const uno::Sequence< beans::PropertyValue aSeq, e.Message, NULL ); } - // return true only if no error occured - return (GetErrorFlags() & (ERROR_DO_NOTHING|ERROR_ERROR_OCCURED)) == 0; + // return true only if no error occurred + return (GetErrorFlags() & (ERROR_DO_NOTHING|ERROR_ERROR_OCCURRED)) == 0; } void SAL_CALL SvXMLExport::cancel() throw(uno::RuntimeException) @@ -1190,7 +1162,6 @@ void SvXMLExport::ImplExportStyles( sal_Bool ) { CheckAttrList(); -// AddAttribute( XML_NAMESPACE_NONE, XML_ID, XML_STYLES_ID ); { // <style:styles> SvXMLElementExport aElem( *this, XML_NAMESPACE_OFFICE, XML_STYLES, @@ -1234,25 +1205,11 @@ void SvXMLExport::ImplExportAutoStyles( sal_Bool ) mxAutoStylePool->RegisterNames( aStyleFamilies, aStyleNames ); } -// AddAttributeASCII( XML_NAMESPACE_NONE, XML_ID, XML_AUTO_STYLES_ID ); { // <style:automatic-styles> SvXMLElementExport aElem( *this, XML_NAMESPACE_OFFICE, XML_AUTOMATIC_STYLES, sal_True, sal_True ); -#if 0 - AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE ); - AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, XML_STYLES_HREF ); - AddAttribute( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD ); - AddAttribute( XML_NAMESPACE_XLINK, XML_ROLE, - pNamespaceMap->GetQNameByKey( XML_NAMESPACE_OFFICE, - GetXMLToken(XML_STYLESHEET)) ); - { - // <style:use-styles> - SvXMLElementExport aElem( *this, XML_NAMESPACE_OFFICE, - XML_USE_STYLES, sal_True, sal_True ); - } -#endif _ExportAutoStyles(); } } @@ -1267,19 +1224,6 @@ void SvXMLExport::ImplExportMasterStyles( sal_Bool ) _ExportMasterStyles(); } -#if 0 - AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE ); - AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, XML_AUTO_STYLES_HREF ); - AddAttribute( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD ); - AddAttribute( XML_NAMESPACE_XLINK, XML_ROLE, - pNamespaceMap->GetQNameByKey( XML_NAMESPACE_OFFICE, - GetXMLToken(XML_STYLESHEET) ) ); - { - // <style:use-styles> - SvXMLElementExport aElem( *this, XML_NAMESPACE_OFFICE, - XML_USE_STYLES, sal_True, sal_True ); - } -#endif } void SvXMLExport::ImplExportContent() @@ -1329,7 +1273,7 @@ lcl_AddGrddl(SvXMLExport & rExport, const sal_Int32 /*nExportMode*/) if (EXPORT_SETTINGS != nExportMode) // meta, content, styles { rExport.AddAttribute( XML_NAMESPACE_GRDDL, XML_TRANSFORMATION, - OUString::createFromAscii(s_grddl_xsl) ); + OUString(RTL_CONSTASCII_USTRINGPARAM(s_grddl_xsl)) ); } #endif } @@ -1406,7 +1350,7 @@ sal_uInt32 SvXMLExport::exportDoc( enum ::xmloff::token::XMLTokenEnum eClass ) // get filter component Reference< xml::sax::XDocumentHandler > xTmpDocHandler( xFactory->createInstanceWithArguments( - OUString::createFromAscii("com.sun.star.comp.Oasis2OOoTransformer"), + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Oasis2OOoTransformer")), aArgs), UNO_QUERY); OSL_ENSURE( xTmpDocHandler.is(), "can't instantiate OASIS transformer component" ); @@ -1457,7 +1401,7 @@ sal_uInt32 SvXMLExport::exportDoc( enum ::xmloff::token::XMLTokenEnum eClass ) case SvtSaveOptions::ODFVER_010: break; default: - DBG_ERROR("xmloff::SvXMLExport::exportDoc(), unexpected odf default version!"); + OSL_FAIL("xmloff::SvXMLExport::exportDoc(), unexpected odf default version!"); } if( pVersion ) @@ -1504,20 +1448,6 @@ sal_uInt32 SvXMLExport::exportDoc( enum ::xmloff::token::XMLTokenEnum eClass ) } } -// if( (getExportFlags() & EXPORT_NODOCTYPE) == 0 && -// xExtHandler.is() ) -// { -// OUStringBuffer aDocType( -// GetXMLToken(XML_XML_DOCTYPE_PREFIX).getLength() + -// GetXMLToken(XML_XML_DOCTYPE_SUFFIX).getLength() + 30 ); -// -// aDocType.append( GetXMLToken(XML_XML_DOCTYPE_PREFIX) ); -// aDocType.append( GetNamespaceMap().GetQNameByKey( -// XML_NAMESPACE_OFFICE, GetXMLToken(eRootService) ) ); -// aDocType.append( GetXMLToken(XML_XML_DOCTYPE_SUFFIX) ); -// xExtHandler->unknown( aDocType.makeStringAndClear() ); -// } - SvXMLElementExport aElem( *this, XML_NAMESPACE_OFFICE, eRootService, sal_True, sal_True ); // meta information @@ -2159,21 +2089,15 @@ XMLImageMapExport& SvXMLExport::GetImageMapExport() return *mpImageMapExport; } +namespace +{ + class theSvXMLExportUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theSvXMLExportUnoTunnelId> {}; +} + // XUnoTunnel & co const uno::Sequence< sal_Int8 > & SvXMLExport::getUnoTunnelId() throw() { - static uno::Sequence< sal_Int8 > * pSeq = 0; - if( !pSeq ) - { - Guard< Mutex > aGuard( Mutex::getGlobalMutex() ); - if( !pSeq ) - { - static uno::Sequence< sal_Int8 > aSeq( 16 ); - rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True ); - pSeq = &aSeq; - } - } - return *pSeq; + return theSvXMLExportUnoTunnelId::get().getSeq(); } SvXMLExport* SvXMLExport::getImplementation( uno::Reference< uno::XInterface > xInt ) throw() @@ -2450,14 +2374,14 @@ void SvXMLExport::SetError( const Reference<XLocator>& rLocator ) { // allow multi-threaded access to the cancel() method - static ::vos::OMutex aMutex; - ::vos::OGuard aGuard(aMutex); + static osl::Mutex aMutex; + osl::MutexGuard aGuard(aMutex); // maintain error flags if ( ( nId & XMLERROR_FLAG_ERROR ) != 0 ) - mnErrorFlags |= ERROR_ERROR_OCCURED; + mnErrorFlags |= ERROR_ERROR_OCCURRED; if ( ( nId & XMLERROR_FLAG_WARNING ) != 0 ) - mnErrorFlags |= ERROR_WARNING_OCCURED; + mnErrorFlags |= ERROR_WARNING_OCCURRED; if ( ( nId & XMLERROR_FLAG_SEVERE ) != 0 ) mnErrorFlags |= ERROR_DO_NOTHING; @@ -2486,16 +2410,13 @@ XMLErrors* SvXMLExport::GetErrors() void SvXMLExport::DisposingModel() { mxModel.clear(); - // --> OD 2006-03-13 #i51726# + // Shapes in Writer cannot be named via context menu (#i51726#) meModelType = SvtModuleOptions::E_UNKNOWN_FACTORY;; - // <-- mxEventListener.clear(); } -// #110680# ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > SvXMLExport::getServiceFactory() { - // #110680# return mxServiceFactory; } @@ -2510,12 +2431,11 @@ SvXMLExport::GetComponentContext() const return mpImpl->maInterfaceToIdentifierMapper; } -// --> OD 2006-09-27 #i69627# +// Written OpenDocument file format doesn't fit to the created text document (#i69627#) sal_Bool SvXMLExport::writeOutlineStyleAsNormalListStyle() const { return mpImpl->mbOutlineStyleAsNormalListStyle; } -// <-- uno::Reference< embed::XStorage > SvXMLExport::GetTargetStorage() { @@ -2565,11 +2485,10 @@ SvXMLExport::AddAttributeXmlId(uno::Reference<uno::XInterface> const & i_xIfc) const uno::Reference<rdf::XMetadatable> xMeta(i_xIfc, uno::UNO_QUERY); //FIXME not yet... -// OSL_ENSURE(xMeta.is(), "xml:id: not XMetadatable"); if ( xMeta.is() ) { const beans::StringPair mdref( xMeta->getMetadataReference() ); - if ( !mdref.Second.equalsAscii("") ) + if ( mdref.Second.getLength() ) { const ::rtl::OUString streamName( GetStreamName() ); if ( streamName.getLength() ) @@ -2580,7 +2499,7 @@ SvXMLExport::AddAttributeXmlId(uno::Reference<uno::XInterface> const & i_xIfc) } else { - OSL_ENSURE(false, "SvXMLExport::AddAttributeXmlId: " + OSL_FAIL("SvXMLExport::AddAttributeXmlId: " "invalid stream name"); } } @@ -2592,7 +2511,7 @@ SvXMLExport::AddAttributeXmlId(uno::Reference<uno::XInterface> const & i_xIfc) // a) just omit styles.xml ids -- they are unlikely anyway... // b) somehow find out whether we are currently exporting styles // or content, and prefix "s" or "c" => unique - if ( mdref.First.equalsAscii("content.xml") ) + if ( mdref.First.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("content.xml")) ) { AddAttribute( XML_NAMESPACE_XML, XML_ID, mdref.Second ); } @@ -2631,12 +2550,10 @@ SvXMLExport::AddAttributesRDFa( mpImpl->mpRDFaHelper->AddRDFa(xMeta); } -// --> OD 2008-11-26 #158694# sal_Bool SvXMLExport::exportTextNumberElement() const { return mpImpl->mbExportTextNumberElement; } -// <-- sal_Bool SvXMLExport::SetNullDateOnUnitConverter() { @@ -2760,3 +2677,4 @@ SvXMLElementExport::~SvXMLElementExport() } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/core/xmlictxt.cxx b/xmloff/source/core/xmlictxt.cxx index 659381b03cd2..35fddeb25957 100644 --- a/xmloff/source/core/xmlictxt.cxx +++ b/xmloff/source/core/xmlictxt.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 @@ void SvXMLImportContext::Characters( const OUString& ) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index ff16d453cae9..816be91c48b9 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.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,6 @@ #include <tools/debug.hxx> #include <tools/urlobj.hxx> #include <osl/mutex.hxx> -#include <rtl/uuid.h> #include <rtl/memory.h> #include <svl/svarray.hxx> #include "unointerfacetouniqueidentifiermapper.hxx" @@ -58,6 +58,7 @@ #include <com/sun/star/xml/sax/XLocator.hpp> #include <com/sun/star/packages/zip/ZipIOException.hpp> #include <comphelper/namecontainer.hxx> +#include <comphelper/servicehelper.hxx> #include <rtl/logfile.hxx> #include <tools/string.hxx> // used in StartElement for logging #include <cppuhelper/implbase1.hxx> @@ -88,45 +89,47 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::document; using namespace ::xmloff::token; -sal_Char __READONLY_DATA sXML_np__office[] = "_office"; -sal_Char __READONLY_DATA sXML_np__office_ext[] = "_office_ooo"; -sal_Char __READONLY_DATA sXML_np__ooo[] = "_ooo"; -sal_Char __READONLY_DATA sXML_np__ooow[] = "_ooow"; -sal_Char __READONLY_DATA sXML_np__oooc[] = "_oooc"; -sal_Char __READONLY_DATA sXML_np__of[] = "_of"; -sal_Char __READONLY_DATA sXML_np__style[] = "_style"; -sal_Char __READONLY_DATA sXML_np__text[] = "_text"; -sal_Char __READONLY_DATA sXML_np__table[] = "_table"; -sal_Char __READONLY_DATA sXML_np__table_ext[] = "_table_ooo"; -sal_Char __READONLY_DATA sXML_np__draw[] = "_draw"; -sal_Char __READONLY_DATA sXML_np__draw_ext[] = "_draw_ooo"; -sal_Char __READONLY_DATA sXML_np__dr3d[] = "_dr3d"; -sal_Char __READONLY_DATA sXML_np__fo[] = "_fo"; -sal_Char __READONLY_DATA sXML_np__xlink[] = "_xlink"; -sal_Char __READONLY_DATA sXML_np__dc[] = "_dc"; -sal_Char __READONLY_DATA sXML_np__dom[] = "_dom"; -sal_Char __READONLY_DATA sXML_np__meta[] = "_meta"; -sal_Char __READONLY_DATA sXML_np__number[] = "_number"; -sal_Char __READONLY_DATA sXML_np__svg[] = "_svg"; -sal_Char __READONLY_DATA sXML_np__chart[] = "_chart"; -sal_Char __READONLY_DATA sXML_np__math[] = "_math"; -sal_Char __READONLY_DATA sXML_np__form[] = "_form"; -sal_Char __READONLY_DATA sXML_np__script[] = "_script"; -sal_Char __READONLY_DATA sXML_np__config[] = "_config"; -sal_Char __READONLY_DATA sXML_np__db[] = "_db"; -sal_Char __READONLY_DATA sXML_np__xforms[] = "_xforms"; -sal_Char __READONLY_DATA sXML_np__xsd[] = "_xsd"; -sal_Char __READONLY_DATA sXML_np__xsi[] = "_xsi"; -sal_Char __READONLY_DATA sXML_np__field[] = "_field"; -sal_Char __READONLY_DATA sXML_np__xhtml[] = "_xhtml"; - -sal_Char __READONLY_DATA sXML_np__fo_old[] = "__fo"; -sal_Char __READONLY_DATA sXML_np__xlink_old[] = "__xlink"; -sal_Char __READONLY_DATA sXML_np__office_old[] = "__office"; -sal_Char __READONLY_DATA sXML_np__style_old[] = "__style"; -sal_Char __READONLY_DATA sXML_np__text_old[] = "__text"; -sal_Char __READONLY_DATA sXML_np__table_old[] = "__table"; -sal_Char __READONLY_DATA sXML_np__meta_old[] = "__meta"; +sal_Char const sXML_np__office[] = "_office"; +sal_Char const sXML_np__office_ext[] = "_office_ooo"; +sal_Char const sXML_np__ooo[] = "_ooo"; +sal_Char const sXML_np__ooow[] = "_ooow"; +sal_Char const sXML_np__oooc[] = "_oooc"; +sal_Char const sXML_np__of[] = "_of"; +sal_Char const sXML_np__style[] = "_style"; +sal_Char const sXML_np__text[] = "_text"; +sal_Char const sXML_np__table[] = "_table"; +sal_Char const sXML_np__table_ext[] = "_table_ooo"; +sal_Char const sXML_np__draw[] = "_draw"; +sal_Char const sXML_np__draw_ext[] = "_draw_ooo"; +sal_Char const sXML_np__dr3d[] = "_dr3d"; +sal_Char const sXML_np__fo[] = "_fo"; +sal_Char const sXML_np__xlink[] = "_xlink"; +sal_Char const sXML_np__dc[] = "_dc"; +sal_Char const sXML_np__dom[] = "_dom"; +sal_Char const sXML_np__meta[] = "_meta"; +sal_Char const sXML_np__number[] = "_number"; +sal_Char const sXML_np__svg[] = "_svg"; +sal_Char const sXML_np__chart[] = "_chart"; +sal_Char const sXML_np__math[] = "_math"; +sal_Char const sXML_np__form[] = "_form"; +sal_Char const sXML_np__script[] = "_script"; +sal_Char const sXML_np__config[] = "_config"; +sal_Char const sXML_np__db[] = "_db"; +sal_Char const sXML_np__xforms[] = "_xforms"; +sal_Char const sXML_np__formx[] = "_formx"; +sal_Char const sXML_np__xsd[] = "_xsd"; +sal_Char const sXML_np__xsi[] = "_xsi"; +sal_Char const sXML_np__field[] = "_field"; +sal_Char const sXML_np__xhtml[] = "_xhtml"; +sal_Char const sXML_np__css3text[] = "_css3text"; + +sal_Char const sXML_np__fo_old[] = "__fo"; +sal_Char const sXML_np__xlink_old[] = "__xlink"; +sal_Char const sXML_np__office_old[] = "__office"; +sal_Char const sXML_np__style_old[] = "__style"; +sal_Char const sXML_np__text_old[] = "__text"; +sal_Char const sXML_np__table_old[] = "__table"; +sal_Char const sXML_np__meta_old[] = "__meta"; @@ -182,14 +185,11 @@ public: ::rtl::OUString aODFVersion; - // --> OD 2004-08-10 #i28749# - boolean, indicating that position attributes + // Boolean, indicating that position attributes // of shapes are given in horizontal left-to-right layout. This is the case - // for the OpenOffice.org file format. + // for the OpenOffice.org file format. (#i28749#) sal_Bool mbShapePositionInHoriL2R; - // <-- - // --> OD 2007-12-19 #152540# sal_Bool mbTextDocInOOoFileFormat; - // <-- const uno::Reference< uno::XComponentContext > mxComponentContext; @@ -200,12 +200,9 @@ public: mbOwnGraphicResolver( false ), mbOwnEmbeddedResolver( false ), mStreamName(), - // --> OD 2004-08-11 #i28749# + // Convert drawing object positions from OOo file format to OASIS (#i28749#) mbShapePositionInHoriL2R( sal_False ), - // <-- - // --> OD 2007-12-19 #152540# mbTextDocInOOoFileFormat( sal_False ), - // <-- mxComponentContext( ::comphelper::getProcessComponentContext() ), mpRDFaHelper() // lazy { @@ -309,6 +306,9 @@ void SvXMLImport::_InitCtor() mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__xforms) ), GetXMLToken(XML_N_XFORMS_1_0), XML_NAMESPACE_XFORMS ); + mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__formx) ), + GetXMLToken( XML_N_FORMX ), + XML_NAMESPACE_FORMX ); mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__xsd) ), GetXMLToken(XML_N_XSD), XML_NAMESPACE_XSD ); @@ -323,6 +323,9 @@ void SvXMLImport::_InitCtor() mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__xhtml ) ), GetXMLToken(XML_N_XHTML), XML_NAMESPACE_XHTML ); + mpNamespaceMap->Add( + OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_np__css3text ) ), + GetXMLToken(XML_N_CSS3TEXT), XML_NAMESPACE_CSS3TEXT ); } msPackageProtocol = OUString( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.Package:" ) ); @@ -348,7 +351,6 @@ SvXMLImport::SvXMLImport( mpNamespaceMap( new SvXMLNamespaceMap ), // #110680# - // pUnitConv( new SvXMLUnitConverter( MAP_100TH_MM, MAP_100TH_MM ) ), mpUnitConv( new SvXMLUnitConverter( MAP_100TH_MM, MAP_100TH_MM, xServiceFactory ) ), mpContexts( new SvXMLImportContexts_Impl ), @@ -378,7 +380,6 @@ SvXMLImport::SvXMLImport( mpImpl( new SvXMLImport_Impl() ), mpNamespaceMap( new SvXMLNamespaceMap ), // #110680# - // pUnitConv( new SvXMLUnitConverter( MAP_100TH_MM, MAP_100TH_MM ) ), mpUnitConv( new SvXMLUnitConverter( MAP_100TH_MM, MAP_100TH_MM, xServiceFactory ) ), mpContexts( new SvXMLImportContexts_Impl ), mpNumImport( NULL ), @@ -409,7 +410,6 @@ SvXMLImport::SvXMLImport( mpImpl( new SvXMLImport_Impl() ), mpNamespaceMap( new SvXMLNamespaceMap ), // #110680# - // pUnitConv( new SvXMLUnitConverter( MAP_100TH_MM, MAP_100TH_MM ) ), mpUnitConv( new SvXMLUnitConverter( MAP_100TH_MM, MAP_100TH_MM, xServiceFactory ) ), mpContexts( new SvXMLImportContexts_Impl ), mpNumImport( NULL ), @@ -447,8 +447,6 @@ SvXMLImport::~SvXMLImport() throw () delete mpContexts; } - // delete pImageMapImportHelper; - // #i9518# the import component might not be deleted until after the document has been closed, // so the stuff that accesses the document has been moved to endDocument. @@ -466,21 +464,15 @@ SvXMLImport::~SvXMLImport() throw () mxModel->removeEventListener(mxEventListener); } +namespace +{ + class theSvXMLImportUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theSvXMLImportUnoTunnelId> {}; +} + // XUnoTunnel & co const uno::Sequence< sal_Int8 > & SvXMLImport::getUnoTunnelId() throw() { - static uno::Sequence< sal_Int8 > * pSeq = 0; - if( !pSeq ) - { - Guard< Mutex > aGuard( Mutex::getGlobalMutex() ); - if( !pSeq ) - { - static uno::Sequence< sal_Int8 > aSeq( 16 ); - rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True ); - pSeq = &aSeq; - } - } - return *pSeq; + return theSvXMLImportUnoTunnelId::get().getSeq(); } SvXMLImport* SvXMLImport::getImplementation( uno::Reference< uno::XInterface > xInt ) throw() @@ -659,7 +651,7 @@ void SAL_CALL SvXMLImport::startElement( const OUString& rName, for( sal_Int16 i=0; i < nAttrCount; i++ ) { const OUString& rAttrName = xAttrList->getNameByIndex( i ); - if ( rAttrName.equalsAscii("office:version") ) + if ( rAttrName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("office:version")) ) { mpImpl->aODFVersion = xAttrList->getValueByIndex( i ); @@ -990,22 +982,19 @@ void SAL_CALL SvXMLImport::initialize( const uno::Sequence< uno::Any >& aArgumen mpImpl->aBaseURL.insertName( sName ); } mpImpl->mStreamName = sName; // Note: may be empty (XSLT) - // --> OD 2004-08-10 #i28749# - retrieve property <ShapePositionInHoriL2R> + // Retrieve property <ShapePositionInHoriL2R> (#i28749#) sPropName = OUString( RTL_CONSTASCII_USTRINGPARAM("ShapePositionInHoriL2R" ) ); if( xPropertySetInfo->hasPropertyByName(sPropName) ) { uno::Any aAny = mxImportInfo->getPropertyValue(sPropName); aAny >>= (mpImpl->mbShapePositionInHoriL2R); } - // <-- - // --> OD 2007-12-19 #152540# sPropName = OUString( RTL_CONSTASCII_USTRINGPARAM("TextDocInOOoFileFormat" ) ); if( xPropertySetInfo->hasPropertyByName(sPropName) ) { uno::Any aAny = mxImportInfo->getPropertyValue(sPropName); aAny >>= (mpImpl->mbTextDocInOOoFileFormat); } - // <-- } } } @@ -1054,19 +1043,15 @@ XMLShapeImportHelper* SvXMLImport::CreateShapeImport() return new XMLShapeImportHelper( *this, mxModel ); } -#ifndef SVX_LIGHT SchXMLImportHelper* SvXMLImport::CreateChartImport() { return new SchXMLImportHelper(); } -#endif -#ifndef SVX_LIGHT ::xmloff::OFormLayerXMLImport* SvXMLImport::CreateFormImport() { return new ::xmloff::OFormLayerXMLImport(*this); } -#endif // #ifndef SVX_LIGHT /////////////////////////////////////////////////////////////////////////////// @@ -1487,17 +1472,16 @@ void SvXMLImport::AddNumberStyle(sal_Int32 nKey, const OUString& rName) } catch ( uno::Exception& ) { - DBG_ERROR("Numberformat could not be inserted"); + OSL_FAIL("Numberformat could not be inserted"); } } else { - DBG_ERROR("not possible to create NameContainer"); + OSL_FAIL("not possible to create NameContainer"); } } XMLEventImportHelper& SvXMLImport::GetEventImport() { -#ifndef SVX_LIGHT if (!mpEventImportHelper) { // construct event helper and register StarBasic handler and standard @@ -1516,7 +1500,6 @@ XMLEventImportHelper& SvXMLImport::GetEventImport() mpEventImportHelper->RegisterFactory(sStarBasicCap, new XMLStarBasicContextFactory()); } -#endif return *mpEventImportHelper; } @@ -1563,10 +1546,8 @@ void SvXMLImport::SetAutoStyles( SvXMLStylesContext *pAutoStyles ) mxAutoStyles = pAutoStyles; GetTextImport()->SetAutoStyles( pAutoStyles ); GetShapeImport()->SetAutoStylesContext( pAutoStyles ); -#ifndef SVX_LIGHT GetChartImport()->SetAutoStylesContext( pAutoStyles ); GetFormImport()->setAutoStyleContext( pAutoStyles ); -#endif } void SvXMLImport::SetMasterStyles( SvXMLStylesContext *pMasterStyles ) @@ -1754,9 +1735,9 @@ void SvXMLImport::SetError( { // maintain error flags if ( ( nId & XMLERROR_FLAG_ERROR ) != 0 ) - mnErrorFlags |= ERROR_ERROR_OCCURED; + mnErrorFlags |= ERROR_ERROR_OCCURRED; if ( ( nId & XMLERROR_FLAG_WARNING ) != 0 ) - mnErrorFlags |= ERROR_WARNING_OCCURED; + mnErrorFlags |= ERROR_WARNING_OCCURRED; if ( ( nId & XMLERROR_FLAG_SEVERE ) != 0 ) mnErrorFlags |= ERROR_DO_NOTHING; @@ -1889,21 +1870,17 @@ String SvXMLImport::GetDocumentBase() const return mpImpl->mStreamName; } -// --> OD 2004-08-10 #i28749# +// Convert drawing object positions from OOo file format to OASIS (#i28749#) sal_Bool SvXMLImport::IsShapePositionInHoriL2R() const { return mpImpl->mbShapePositionInHoriL2R; } -// <-- -// --> OD 2007-12-19 #152540# sal_Bool SvXMLImport::IsTextDocInOOoFileFormat() const { return mpImpl->mbTextDocInOOoFileFormat; } -// <-- - void SvXMLImport::initXForms() { // dummy method; to be implemented by derived classes supporting XForms @@ -1973,7 +1950,6 @@ void SvXMLImport::SetXmlId(uno::Reference<uno::XInterface> const & i_xIfc, const uno::Reference<rdf::XMetadatable> xMeta(i_xIfc, uno::UNO_QUERY); //FIXME: not yet -// OSL_ENSURE(xMeta.is(), "xml:id: not XMetadatable"); if (xMeta.is()) { const beans::StringPair mdref( GetStreamName(), i_rXmlId ); try { @@ -1984,7 +1960,7 @@ void SvXMLImport::SetXmlId(uno::Reference<uno::XInterface> const & i_xIfc, } } } catch (uno::Exception &) { - OSL_ENSURE(false, "SvXMLImport::SetXmlId: exception?"); + OSL_FAIL("SvXMLImport::SetXmlId: exception?"); } } } @@ -2013,3 +1989,4 @@ SvXMLImport::AddRDFa(uno::Reference<rdf::XMetadatable> i_xObject, i_rAbout, i_rProperty, i_rContent, i_rDatatype); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/core/xmltkmap.cxx b/xmloff/source/core/xmltkmap.cxx index 807c3c060d14..7a96814eee41 100644 --- a/xmloff/source/core/xmltkmap.cxx +++ b/xmloff/source/core/xmltkmap.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,10 @@ #include <xmloff/xmltkmap.hxx> #include <xmloff/xmltoken.hxx> -using namespace rtl; using namespace ::xmloff::token; +using ::rtl::OUString; + class SvXMLTokenMapEntry_Impl { sal_uInt16 nPrefixKey; @@ -120,3 +122,4 @@ sal_uInt16 SvXMLTokenMap::Get( sal_uInt16 nKeyPrefix, } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx index ec0039f16771..b07e77a9bedf 100644 --- a/xmloff/source/core/xmltoken.cxx +++ b/xmloff/source/core/xmltoken.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. @@ -27,6 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" +#include <sal/macros.h> #include <xmloff/xmltoken.hxx> #include <tools/debug.hxx> #include <rtl/ustring.hxx> @@ -76,7 +78,6 @@ namespace xmloff { namespace token { TOKEN( " PUBLIC \"-//OpenOffice.org//DTD OfficeDocument 1.0//EN\" \"office.dtd\">", XML_XML_DOCTYPE_SUFFIX ), // namespace prefixes and names -// TOKEN( "xml", XML_NP_XML ), TOKEN( "http://www.w3.org/XML/1998/namespace", XML_N_XML ), TOKEN( "office", XML_NP_OFFICE ), TOKEN( "urn:oasis:names:tc:opendocument:xmlns:office:1.0", XML_N_OFFICE ), @@ -153,12 +154,18 @@ namespace xmloff { namespace token { TOKEN( "officeooo", XML_NP_OFFICE_EXT ), TOKEN( "http://openoffice.org/2009/office", XML_N_OFFICE_EXT ), + // jonp: 2008-09-24 Excel Interop + TOKEN( "formx", XML_NP_FORMX ), + TOKEN( "urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0", XML_N_FORMX ), TOKEN( "tableooo", XML_NP_TABLE_EXT ), TOKEN( "http://openoffice.org/2009/table", XML_N_TABLE_EXT ), TOKEN( "drawooo", XML_NP_DRAW_EXT ), TOKEN( "http://openoffice.org/2010/draw", XML_N_DRAW_EXT ), + TOKEN( "css3t", XML_NP_CSS3TEXT ), + TOKEN( "http://www.w3.org/TR/css3-text/", XML_N_CSS3TEXT ), + // units TOKEN( "mm", XML_UNIT_MM ), TOKEN( "m", XML_UNIT_M ), @@ -614,6 +621,7 @@ namespace xmloff { namespace token { TOKEN( "distance", XML_DISTANCE ), TOKEN( "distance-after-sep", XML_DISTANCE_AFTER_SEP ), TOKEN( "distance-before-sep", XML_DISTANCE_BEFORE_SEP ), + TOKEN( "distribute", XML_DISTRIBUTE ), TOKEN( "distribute-letter", XML_DISTRIBUTE_LETTER ), TOKEN( "distribute-space", XML_DISTRIBUTE_SPACE ), TOKEN( "divide", XML_DIVIDE ), @@ -927,14 +935,13 @@ namespace xmloff { namespace token { TOKEN( "hint", XML_HINT), TOKEN( "horizontal", XML_HORIZONTAL ), TOKEN( "horizontal-lines", XML_HORIZONTAL_LINES ), - // --> OD 2005-05-12 #i49139# - // XML_HORIZONTAL_ON_LEFT_PAGES and XML_HORIZONTAL_ON_RIGHT_PAGES - // are replaced by XML_HORIZONTAL_ON_EVEN and XML_HORIZONTAL_ON_ODD. - // Usage is deprecated, but the old token are needed for the - // OpenOffice.org file format import/export filter for the renaming + /* XML_HORIZONTAL_ON_LEFT_PAGES and XML_HORIZONTAL_ON_RIGHT_PAGES + are replaced by XML_HORIZONTAL_ON_EVEN and XML_HORIZONTAL_ON_ODD. + Usage is deprecated, but the old token are needed for the + OpenOffice.org file format import/export filter for the renaming (#i49139#) + */ TOKEN( "horizontal-on-left-pages", XML_HORIZONTAL_ON_LEFT_PAGES ), TOKEN( "horizontal-on-right-pages", XML_HORIZONTAL_ON_RIGHT_PAGES ), - // <-- TOKEN( "horizontal-pos", XML_HORIZONTAL_POS ), TOKEN( "horizontal-rel", XML_HORIZONTAL_REL ), TOKEN( "horizontal-scrollbar-width", XML_HORIZONTAL_SCROLLBAR_WIDTH ), @@ -1075,6 +1082,7 @@ namespace xmloff { namespace token { TOKEN( "line-number", XML_LINE_NUMBER ), TOKEN( "line-skew", XML_LINE_SKEW ), TOKEN( "line-spacing", XML_LINE_SPACING ), + TOKEN( "line-style", XML_LINE_STYLE ), TOKEN( "linear", XML_LINEAR ), TOKEN( "linenumbering-configuration", XML_LINENUMBERING_CONFIGURATION ), TOKEN( "linenumbering-separator", XML_LINENUMBERING_SEPARATOR ), @@ -1419,6 +1427,8 @@ namespace xmloff { namespace token { TOKEN( "size", XML_PROTECT_SIZE ), TOKEN( "protected", XML_PROTECTED ), TOKEN( "protection-key", XML_PROTECTION_KEY ), + TOKEN( "protection-key-digest-algorithm", XML_PROTECTION_KEY_DIGEST_ALGORITHM ), + TOKEN( "protection-key-digest-algorithm-2", XML_PROTECTION_KEY_DIGEST_ALGORITHM_2 ), TOKEN( "prsubset", XML_PRSUBSET ), TOKEN( "publisher", XML_PUBLISHER ), TOKEN( "punctuation-wrap", XML_PUNCTUATION_WRAP ), @@ -1528,6 +1538,8 @@ namespace xmloff { namespace token { TOKEN( "section-name", XML_SECTION_NAME ), TOKEN( "section-source", XML_SECTION_SOURCE ), TOKEN( "select-page", XML_SELECT_PAGE ), + TOKEN( "select-protected-cells", XML_SELECT_PROTECTED_CELLS ), + TOKEN( "select-unprotected-cells", XML_SELECT_UNPROTECTED_CELLS ), TOKEN( "selector", XML_SELECTOR ), TOKEN( "semantics", XML_SEMANTICS ), TOKEN( "semi-automatic", XML_SEMI_AUTOMATIC ), @@ -1740,6 +1752,7 @@ namespace xmloff { namespace token { TOKEN( "table-of-content-entry-template", XML_TABLE_OF_CONTENT_ENTRY_TEMPLATE ), TOKEN( "table-of-content-source", XML_TABLE_OF_CONTENT_SOURCE ), TOKEN( "table-page", XML_TABLE_PAGE ), + TOKEN( "table-protection", XML_TABLE_PROTECTION ), TOKEN( "table-row", XML_TABLE_ROW ), TOKEN( "table-row-group", XML_TABLE_ROW_GROUP ), TOKEN( "table-rows", XML_TABLE_ROWS ), @@ -1779,6 +1792,7 @@ namespace xmloff { namespace token { TOKEN( "text-global", XML_TEXT_GLOBAL ), TOKEN( "text-indent", XML_TEXT_INDENT ), TOKEN( "text-input", XML_TEXT_INPUT ), + TOKEN( "text-justify", XML_TEXT_JUSTIFY ), TOKEN( "text-outline", XML_TEXT_OUTLINE ), TOKEN( "text-position", XML_TEXT_POSITION ), TOKEN( "text-rotation-angle", XML_TEXT_ROTATION_ANGLE ), @@ -1912,6 +1926,7 @@ namespace xmloff { namespace token { TOKEN( "version-list", XML_VERSION_LIST ), TOKEN( "vertical", XML_VERTICAL ), TOKEN( "vertical-align", XML_VERTICAL_ALIGN ), + TOKEN( "vertical-justify", XML_VERTICAL_JUSTIFY ), TOKEN( "vertical-lines", XML_VERTICAL_LINES ), TOKEN( "vertical-pos", XML_VERTICAL_POS ), TOKEN( "vertical-rel", XML_VERTICAL_REL ), @@ -2098,7 +2113,8 @@ namespace xmloff { namespace token { TOKEN( "default-page-layout", XML_DEFAULT_PAGE_LAYOUT ), TOKEN( "layout-grid-standard-mode", XML_LAYOUT_GRID_STANDARD_MODE ), TOKEN( "layout-grid-base-width", XML_LAYOUT_GRID_BASE_WIDTH ), - TOKEN( "layout-grid-snap-to-characters", XML_LAYOUT_GRID_SNAP_TO_CHARS ), + TOKEN( "layout-grid-snap-to-characters", XML_LAYOUT_GRID_SNAP_TO_CHARS ), + TOKEN( "layout-grid-snap-to", XML_LAYOUT_GRID_SNAP_TO ), TOKEN( "snap-to-layout-grid", XML_SNAP_TO_LAYOUT_GRID ), @@ -2363,8 +2379,7 @@ namespace xmloff { namespace token { // OD 2004-05-05 #i28701# TOKEN( "wrap-influence-on-position", XML_WRAP_INFLUENCE_ON_POSITION ), - // --> OD 2004-10-18 #i35017# - tokens have been renamed and - // <XML_ITERATIVE> has been added + // Tokens have been renamed and <XML_ITERATIVE> has been added (#i35017#) TOKEN( "once-successive", XML_ONCE_SUCCESSIVE ), TOKEN( "once-concurrent", XML_ONCE_CONCURRENT ), @@ -2516,6 +2531,7 @@ namespace xmloff { namespace token { TOKEN( "show-filter-button", XML_SHOW_FILTER_BUTTON ), TOKEN( "drill-down-on-double-click", XML_DRILL_DOWN_ON_DOUBLE_CLICK ), + TOKEN( "header-grid-layout", XML_HEADER_GRID_LAYOUT ), TOKEN( "grouped-by", XML_GROUPED_BY ), TOKEN( "days", XML_DAYS ), TOKEN( "months", XML_MONTHS ), @@ -2876,12 +2892,10 @@ namespace xmloff { namespace token { TOKEN( "http://www.w3.org/", XML_URI_W3_PREFIX ), TOKEN( "/xforms", XML_URI_XFORMS_SUFFIX ), - // --> OD 2005-05-12 #i49139# - // XML_HORIZONTAL_ON_LEFT_PAGES and XML_HORIZONTAL_ON_RIGHT_PAGES - // are replaced by XML_HORIZONTAL_ON_EVEN and XML_HORIZONTAL_ON_ODD. + /* XML_HORIZONTAL_ON_LEFT_PAGES and XML_HORIZONTAL_ON_RIGHT_PAGES + are replaced by XML_HORIZONTAL_ON_EVEN and XML_HORIZONTAL_ON_ODD. (#i49139#) + */ TOKEN( "horizontal-on-even", XML_HORIZONTAL_ON_EVEN ), - // <-- - // --> OJ 2005-09-01 TOKEN( "urn:oasis:names:tc:opendocument:xmlns:report:1.0", XML_N_RPT_OASIS ), TOKEN( "http://openoffice.org/2005/report", XML_N_RPT ), TOKEN( "group", XML_GROUP ), @@ -2957,15 +2971,11 @@ namespace xmloff { namespace token { TOKEN( "odd-rows", XML_ODD_ROWS ), TOKEN( "even-columns", XML_EVEN_COLUMNS ), TOKEN( "odd-columns", XML_ODD_COLUMNS ), - - // <-- TOKEN( "horizontal-on-odd", XML_HORIZONTAL_ON_ODD ), - // --> OD 2005-10-10 #i45874# + // Password error from 1.4 to 2.0 Beta (#i45874#) TOKEN( "restart-numbering", XML_RESTART_NUMBERING), - // <-- - // -> FLR #i52127# + // OpenDocument <text:numbered-paragraph> element not supported on OpenDocument import (#i52127#) TOKEN( "numbered-paragraph", XML_NUMBERED_PARAGRAPH), - // <-- TOKEN( "master-detail-fields", XML_MASTER_DETAIL_FIELDS), TOKEN( "master-detail-field", XML_MASTER_DETAIL_FIELD), TOKEN( "sub-document", XML_SUB_DOCUMENT), @@ -3023,11 +3033,9 @@ namespace xmloff { namespace token { TOKEN( "table-include-filter", XML_TABLE_INCLUDE_FILTER ), TOKEN( "default-row-style-name", XML_DEFAULT_ROW_STYLE_NAME), TOKEN( "angle-offset", XML_ANGLE_OFFSET ), - // --> OD 2007-09-14 #i81002# + // Core implementation for direct cross-references (#i81002#) TOKEN( "number-no-superior", XML_NUMBER_NO_SUPERIOR ), TOKEN( "number-all-superior", XML_NUMBER_ALL_SUPERIOR ), - // <-- - // --> OD 2008-01-15 #newlistlevelattrs# TOKEN( "list-level-position-and-space-mode", XML_LIST_LEVEL_POSITION_AND_SPACE_MODE ), TOKEN( "label-width-and-position", XML_LABEL_WIDTH_AND_POSITION ), TOKEN( "label-alignment", XML_LABEL_ALIGNMENT ), @@ -3037,7 +3045,6 @@ namespace xmloff { namespace token { TOKEN( "space", XML_SPACE ), TOKEN( "nothing", XML_NOTHING ), TOKEN( "list-tab-stop-position", XML_LIST_TAB_STOP_POSITION ), - // <-- // bm: chart error bar extensions (ODF 1.2) TOKEN( "standard-error", XML_STANDARD_ERROR ), @@ -3045,12 +3052,10 @@ namespace xmloff { namespace token { TOKEN( "error-lower-range", XML_ERROR_LOWER_RANGE ), TOKEN( "error-upper-range", XML_ERROR_UPPER_RANGE ), - // --> OD 2008-04-22 #refactorlists# TOKEN( "continue-list", XML_CONTINUE_LIST ), TOKEN( "style-override", XML_STYLE_OVERRIDE ), - // <-- - // - // fs: #i90243# + + // XForms: Changes to model should optionally set document's modified state. (#i90243#) TOKEN( "xforms-settings", XML_XFORM_MODEL_SETTINGS ), // ODF 1.2 metadata @@ -3160,7 +3165,7 @@ namespace xmloff { namespace token { #endif DBG_ASSERT( eToken > XML_TOKEN_INVALID, "token value too low!" ); DBG_ASSERT( eToken < XML_TOKEN_END, "token value too high!" ); - DBG_ASSERT(sal_uInt16(eToken) < sizeof(aTokenList)/sizeof(aTokenList[0]),"Illegal position!"); + DBG_ASSERT(sal_uInt16(eToken) < SAL_N_ELEMENTS(aTokenList),"Illegal position!"); XMLTokenEntry* pToken = &aTokenList[(sal_uInt16)eToken]; if (!pToken->pOUString) @@ -3206,10 +3211,11 @@ namespace xmloff { namespace token { if (nRescheduleCount > 0) --nRescheduleCount; else { - DBG_ERROR("RescheduleCount not increased"); + OSL_FAIL("RescheduleCount not increased"); } } } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/core/xmluconv.cxx b/xmloff/source/core/xmluconv.cxx index c9b5d0d3e9a3..89a94aeeb146 100644 --- a/xmloff/source/core/xmluconv.cxx +++ b/xmloff/source/core/xmluconv.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,18 +42,12 @@ #ifndef _TOOLS_DATE_HXX #include <tools/date.hxx> - #include <tools/string.hxx> - #endif #include <tools/time.hxx> #include <tools/fldunit.hxx> -// #110680# -//#ifndef _COMPHELPER_PROCESSFACTORY_HXX_ -//#include <comphelper/processfactory.hxx> -//#endif #include <com/sun/star/util/XNumberFormatsSupplier.hpp> #include <com/sun/star/style/NumberingType.hpp> #include <com/sun/star/text/XNumberingTypeInfo.hpp> @@ -61,7 +56,6 @@ #include <com/sun/star/i18n/UnicodeType.hpp> #include <basegfx/vector/b3dvector.hxx> -using namespace rtl; using namespace com::sun::star; using namespace com::sun::star::uno; using namespace com::sun::star::lang; @@ -70,6 +64,9 @@ using namespace com::sun::star::style; using namespace ::com::sun::star::i18n; using namespace ::xmloff::token; +using ::rtl::OUString; +using ::rtl::OUStringBuffer; + const sal_Int8 XML_MAXDIGITSCOUNT_TIME = 11; const sal_Int8 XML_MAXDIGITSCOUNT_DATETIME = 6; #define XML_NULLDATE "NullDate" @@ -88,12 +85,6 @@ void SvXMLUnitConverter::initXMLStrings() void SvXMLUnitConverter::createNumTypeInfo() const { - // #110680# - //Reference< lang::XMultiServiceFactory > xServiceFactory = - // comphelper::getProcessServiceFactory(); - //OSL_ENSURE( xServiceFactory.is(), - // "XMLUnitConverter: got no service factory" ); - if( mxServiceFactory.is() ) { ((SvXMLUnitConverter *)this)->xNumTypeInfo = @@ -108,9 +99,6 @@ void SvXMLUnitConverter::createNumTypeInfo() const the default unit for textual measures */ -// #110680# -//SvXMLUnitConverter::SvXMLUnitConverter( MapUnit eCoreMeasureUnit, -// MapUnit eXMLMeasureUnit ) : SvXMLUnitConverter::SvXMLUnitConverter( MapUnit eCoreMeasureUnit, MapUnit eXMLMeasureUnit, @@ -148,11 +136,6 @@ MapUnit SvXMLUnitConverter::GetMapUnit(sal_Int16 nFieldUnit) case FUNIT_PICA: eUnit = MAP_POINT; break; -// case FUNIT_INCH: -// case FUNIT_FOOT: -// case FUNIT_MILE: -// eUnit = MAP_INCH; -// break; case FUNIT_100TH_MM: eUnit = MAP_100TH_MM; break; @@ -280,11 +263,6 @@ sal_Bool SvXMLUnitConverter::convertMeasure( sal_Int32& rValue, break; case sal_Unicode('e'): case sal_Unicode('E'): - // pCmp1 = sXML_unit_em; - // nToken1 = CSS1_EMS; - - // pCmp2 = sXML_unit_ex; - // nToken2 = CSS1_EMX; break; case sal_Unicode('i'): case sal_Unicode('I'): @@ -307,9 +285,6 @@ sal_Bool SvXMLUnitConverter::convertMeasure( sal_Int32& rValue, aCmpsL[1] = "pc"; aCmpsU[1] = "PC"; aScales[1] = 12.*20.; // twip - - // pCmp3 = sXML_unit_px; - // nToken3 = CSS1_PIXLENGTH; break; } } @@ -326,11 +301,6 @@ sal_Bool SvXMLUnitConverter::convertMeasure( sal_Int32& rValue, break; case sal_Unicode('e'): case sal_Unicode('E'): - // pCmp1 = sXML_unit_em; - // nToken1 = CSS1_EMS; - - // pCmp2 = sXML_unit_ex; - // nToken2 = CSS1_EMX; break; case sal_Unicode('i'): case sal_Unicode('I'): @@ -353,9 +323,6 @@ sal_Bool SvXMLUnitConverter::convertMeasure( sal_Int32& rValue, aCmpsL[1] = "pc"; aCmpsU[1] = "PC"; aScales[1] = (10.0 * nScaleFactor*2.54)/12.; // mm/100 - - // pCmp3 = sXML_unit_px; - // nToken3 = CSS1_PIXLENGTH; break; } } @@ -441,7 +408,7 @@ void SvXMLUnitConverter::convertMeasure( OUStringBuffer& rBuffer, } /** convert string to boolean */ -sal_Bool SvXMLUnitConverter::convertBool( sal_Bool& rBool, +sal_Bool SvXMLUnitConverter::convertBool( bool& rBool, const OUString& rString ) { rBool = IsXMLToken(rString, XML_TRUE); @@ -710,7 +677,7 @@ sal_Bool SvXMLUnitConverter::convertNumber64( sal_Int64& rValue, } /** convert double number to string (using ::rtl::math) */ -void SvXMLUnitConverter::convertDouble(::rtl::OUStringBuffer& rBuffer, +void SvXMLUnitConverter::convertDouble(OUStringBuffer& rBuffer, double fNumber, sal_Bool bWriteUnits) const { SvXMLUnitConverter::convertDouble(rBuffer, fNumber, @@ -718,7 +685,7 @@ void SvXMLUnitConverter::convertDouble(::rtl::OUStringBuffer& rBuffer, } /** convert double number to string (using ::rtl::math) */ -void SvXMLUnitConverter::convertDouble( ::rtl::OUStringBuffer& rBuffer, +void SvXMLUnitConverter::convertDouble( OUStringBuffer& rBuffer, double fNumber, sal_Bool bWriteUnits, MapUnit eCoreUnit, MapUnit eDstUnit) { if(MAP_RELATIVE == eCoreUnit) @@ -741,7 +708,7 @@ void SvXMLUnitConverter::convertDouble( ::rtl::OUStringBuffer& rBuffer, } /** convert double number to string (using ::rtl::math) */ -void SvXMLUnitConverter::convertDouble( ::rtl::OUStringBuffer& rBuffer, double fNumber) +void SvXMLUnitConverter::convertDouble( OUStringBuffer& rBuffer, double fNumber) { ::rtl::math::doubleToUStringBuffer( rBuffer, fNumber, rtl_math_StringFormat_Automatic, rtl_math_DecimalPlaces_Max, '.', sal_True); } @@ -765,7 +732,7 @@ sal_Bool SvXMLUnitConverter::convertDouble(double& rValue, /** convert string to double number (using ::rtl::math) */ sal_Bool SvXMLUnitConverter::convertDouble(double& rValue, - const ::rtl::OUString& rString, MapUnit eSrcUnit, MapUnit eCoreUnit) + const OUString& rString, MapUnit eSrcUnit, MapUnit eCoreUnit) { rtl_math_ConversionStatus eStatus; rValue = ::rtl::math::stringToDouble( rString, (sal_Unicode)('.'), (sal_Unicode)(','), &eStatus, NULL ); @@ -782,7 +749,7 @@ sal_Bool SvXMLUnitConverter::convertDouble(double& rValue, } /** convert string to double number (using ::rtl::math) */ -sal_Bool SvXMLUnitConverter::convertDouble(double& rValue, const ::rtl::OUString& rString) +sal_Bool SvXMLUnitConverter::convertDouble(double& rValue, const OUString& rString) { rtl_math_ConversionStatus eStatus; rValue = ::rtl::math::stringToDouble( rString, (sal_Unicode)('.'), (sal_Unicode)(','), &eStatus, NULL ); @@ -796,13 +763,13 @@ sal_Bool SvXMLUnitConverter::setNullDate(const com::sun::star::uno::Reference <c if (xNumberFormatsSupplier.is()) { const com::sun::star::uno::Reference <com::sun::star::beans::XPropertySet> xPropertySet = xNumberFormatsSupplier->getNumberFormatSettings(); - return xPropertySet.is() && (xPropertySet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(XML_NULLDATE))) >>= aNullDate); + return xPropertySet.is() && (xPropertySet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM(XML_NULLDATE))) >>= aNullDate); } return sal_False; } /** convert double to ISO Time String; negative durations allowed */ -void SvXMLUnitConverter::convertTime( ::rtl::OUStringBuffer& rBuffer, +void SvXMLUnitConverter::convertTime( OUStringBuffer& rBuffer, const double& fTime) { @@ -861,7 +828,7 @@ void SvXMLUnitConverter::convertTime( ::rtl::OUStringBuffer& rBuffer, rBuffer.append( sal_Int32( fSecsValue)); if (f100SecsValue > 0.0) { - ::rtl::OUString a100th( ::rtl::math::doubleToUString( fValue, + OUString a100th( ::rtl::math::doubleToUString( fValue, rtl_math_StringFormat_F, XML_MAXDIGITSCOUNT_TIME - 5, '.', sal_True)); if ( a100th.getLength() > 2 ) @@ -877,7 +844,7 @@ void SvXMLUnitConverter::convertTime( ::rtl::OUStringBuffer& rBuffer, static bool lcl_convertTime( const ::rtl::OUString& rString, sal_Int32& o_rDays, sal_Int32& o_rHours, sal_Int32& o_rMins, sal_Int32& o_rSecs, sal_Bool& o_rIsNegativeTime, double& o_rFractionalSecs ) { - rtl::OUString aTrimmed = rString.trim().toAsciiUpperCase(); + OUString aTrimmed = rString.trim().toAsciiUpperCase(); const sal_Unicode* pStr = aTrimmed.getStr(); // negative time duration? @@ -963,7 +930,7 @@ static bool lcl_convertTime( const ::rtl::OUString& rString, sal_Int32& o_rDays, { //! how many days is a year or month? - DBG_ERROR("years or months in duration: not implemented"); + OSL_FAIL("years or months in duration: not implemented"); bSuccess = false; } else @@ -1013,7 +980,7 @@ sal_Bool SvXMLUnitConverter::convertTime( double& fTime, } /** convert util::DateTime to ISO Time String */ -void SvXMLUnitConverter::convertTime( ::rtl::OUStringBuffer& rBuffer, +void SvXMLUnitConverter::convertTime( OUStringBuffer& rBuffer, const ::com::sun::star::util::DateTime& rDateTime ) { double fHour = rDateTime.Hours; @@ -1029,7 +996,7 @@ void SvXMLUnitConverter::convertTime( ::rtl::OUStringBuffer& rBuffer, /** convert ISO Time String to util::DateTime */ sal_Bool SvXMLUnitConverter::convertTime( ::com::sun::star::util::DateTime& rDateTime, - const ::rtl::OUString& rString ) + const OUString& rString ) { sal_Int32 nDays = 0, nHours = 0, nMins = 0, nSecs = 0; sal_Bool bIsNegativeDuration = sal_False; @@ -1050,7 +1017,7 @@ sal_Bool SvXMLUnitConverter::convertTime( ::com::sun::star::util::DateTime& rDat } /** convert double to ISO Date Time String */ -void SvXMLUnitConverter::convertDateTime( ::rtl::OUStringBuffer& rBuffer, +void SvXMLUnitConverter::convertDateTime( OUStringBuffer& rBuffer, const double& fDateTime, const com::sun::star::util::Date& aTempNullDate, sal_Bool bAddTimeIf0AM ) @@ -1138,7 +1105,7 @@ void SvXMLUnitConverter::convertDateTime( ::rtl::OUStringBuffer& rBuffer, rBuffer.append( sal_Int32( fSecsValue)); if (f100SecsValue > 0.0) { - ::rtl::OUString a100th( ::rtl::math::doubleToUString( fValue, + OUString a100th( ::rtl::math::doubleToUString( fValue, rtl_math_StringFormat_F, XML_MAXDIGITSCOUNT_TIME - nCount, '.', sal_True)); if ( a100th.getLength() > 2 ) @@ -1152,7 +1119,7 @@ void SvXMLUnitConverter::convertDateTime( ::rtl::OUStringBuffer& rBuffer, /** convert ISO Date Time String to double */ sal_Bool SvXMLUnitConverter::convertDateTime( double& fDateTime, - const ::rtl::OUString& rString, const com::sun::star::util::Date& aTempNullDate) + const OUString& rString, const com::sun::star::util::Date& aTempNullDate) { com::sun::star::util::DateTime aDateTime; sal_Bool bSuccess = convertDateTime(aDateTime,rString); @@ -1179,7 +1146,7 @@ sal_Bool SvXMLUnitConverter::convertDateTime( double& fDateTime, /** convert util::DateTime to ISO Date String */ void SvXMLUnitConverter::convertDateTime( - ::rtl::OUStringBuffer& rBuffer, + OUStringBuffer& rBuffer, const com::sun::star::util::DateTime& rDateTime, sal_Bool bAddTimeIf0AM ) { @@ -1224,11 +1191,11 @@ void SvXMLUnitConverter::convertDateTime( /** convert ISO Date String to util::DateTime */ sal_Bool SvXMLUnitConverter::convertDateTime( com::sun::star::util::DateTime& rDateTime, - const ::rtl::OUString& rString ) + const OUString& rString ) { sal_Bool bSuccess = sal_True; - rtl::OUString aDateStr, aTimeStr, sDoubleStr; + OUString aDateStr, aTimeStr, sDoubleStr; sal_Int32 nPos = rString.indexOf( (sal_Unicode) 'T' ); sal_Int32 nPos2 = rString.indexOf( (sal_Unicode) ',' ); if (nPos2 < 0) @@ -1356,8 +1323,6 @@ sal_Int32 SvXMLUnitConverter::indexOfComma( const OUString& rStr, return -1; } -// --- - SvXMLTokenEnumerator::SvXMLTokenEnumerator( const OUString& rString, sal_Unicode cSeperator /* = sal_Unicode(' ') */ ) : maTokenString( rString ), mnNextTokenPos(0), mcSeperator( cSeperator ) { @@ -1389,7 +1354,6 @@ sal_Bool SvXMLTokenEnumerator::getNextToken( OUString& rToken ) return sal_True; } -// --- bool lcl_getPositions(const OUString& _sValue,OUString& _rContentX,OUString& _rContentY,OUString& _rContentZ) { if(!_sValue.getLength() || _sValue[0] != '(') @@ -1519,7 +1483,7 @@ const -void ThreeByteToFourByte (const sal_Int8* pBuffer, const sal_Int32 nStart, const sal_Int32 nFullLen, rtl::OUStringBuffer& sBuffer) +void ThreeByteToFourByte (const sal_Int8* pBuffer, const sal_Int32 nStart, const sal_Int32 nFullLen, OUStringBuffer& sBuffer) { sal_Int32 nLen(nFullLen - nStart); if (nLen > 3) @@ -1572,21 +1536,21 @@ void ThreeByteToFourByte (const sal_Int8* pBuffer, const sal_Int32 nStart, const sBuffer.setCharAt(3, aBase64EncodeTable [nIndex]); } -void SvXMLUnitConverter::encodeBase64(rtl::OUStringBuffer& aStrBuffer, const uno::Sequence<sal_Int8>& aPass) +void SvXMLUnitConverter::encodeBase64(OUStringBuffer& aStrBuffer, const uno::Sequence<sal_Int8>& aPass) { sal_Int32 i(0); sal_Int32 nBufferLength(aPass.getLength()); const sal_Int8* pBuffer = aPass.getConstArray(); while (i < nBufferLength) { - rtl::OUStringBuffer sBuffer; + OUStringBuffer sBuffer; ThreeByteToFourByte (pBuffer, i, nBufferLength, sBuffer); aStrBuffer.append(sBuffer); i += 3; } } -void SvXMLUnitConverter::decodeBase64(uno::Sequence<sal_Int8>& aBuffer, const rtl::OUString& sBuffer) +void SvXMLUnitConverter::decodeBase64(uno::Sequence<sal_Int8>& aBuffer, const OUString& sBuffer) { sal_Int32 nCharsDecoded = decodeBase64SomeChars( aBuffer, sBuffer ); OSL_ENSURE( nCharsDecoded == sBuffer.getLength(), @@ -1596,7 +1560,7 @@ void SvXMLUnitConverter::decodeBase64(uno::Sequence<sal_Int8>& aBuffer, const rt sal_Int32 SvXMLUnitConverter::decodeBase64SomeChars( uno::Sequence<sal_Int8>& rOutBuffer, - const rtl::OUString& rInBuffer) + const OUString& rInBuffer) { sal_Int32 nInBufferLen = rInBuffer.getLength(); sal_Int32 nMinOutBufferLen = (nInBufferLen / 4) * 3; @@ -1729,7 +1693,6 @@ void SvXMLUnitConverter::convertNumFormat( OUStringBuffer& rBuffer, sal_Int16 nType ) const { enum XMLTokenEnum eFormat = XML_TOKEN_INVALID; - sal_Bool bExt = sal_False; switch( nType ) { case NumberingType::CHARS_UPPER_LETTER: eFormat = XML_A_UPCASE; break; @@ -1747,7 +1710,6 @@ void SvXMLUnitConverter::convertNumFormat( OUStringBuffer& rBuffer, DBG_ASSERT( eFormat != XML_TOKEN_INVALID, "invalid number format" ); break; default: - bExt = sal_True; break; } @@ -1775,8 +1737,6 @@ void SvXMLUnitConverter::convertNumLetterSync( OUStringBuffer& rBuffer, case NumberingType::ROMAN_LOWER: case NumberingType::ARABIC: case NumberingType::NUMBER_NONE: - // default - // eSync = XML_FALSE; break; case NumberingType::CHARS_UPPER_LETTER_N: @@ -1833,10 +1793,10 @@ void SvXMLUnitConverter::convertPropertySet(uno::Reference<beans::XPropertySet>& } } -void SvXMLUnitConverter::clearUndefinedChars(rtl::OUString& rTarget, const rtl::OUString& rSource) +void SvXMLUnitConverter::clearUndefinedChars(OUString& rTarget, const OUString& rSource) { sal_uInt32 nLength(rSource.getLength()); - rtl::OUStringBuffer sBuffer(nLength); + OUStringBuffer sBuffer(nLength); for (sal_uInt32 i = 0; i < nLength; i++) { sal_Unicode cChar = rSource[i]; @@ -1902,8 +1862,8 @@ OUString SvXMLUnitConverter::encodeStyleName( ->xCharClass = Reference < XCharacterClassification >( mxServiceFactory->createInstance( - OUString::createFromAscii( - "com.sun.star.i18n.CharacterClassification_Unicode") ), + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.i18n.CharacterClassification_Unicode")) ), UNO_QUERY ); OSL_ENSURE( xCharClass.is(), @@ -1975,10 +1935,10 @@ OUString SvXMLUnitConverter::encodeStyleName( } // static -rtl::OUString SvXMLUnitConverter::convertTimeDuration( const Time& rTime, sal_Int32 nSecondsFraction ) +OUString SvXMLUnitConverter::convertTimeDuration( const Time& rTime, sal_Int32 nSecondsFraction ) { // return ISO time period string - rtl::OUStringBuffer sTmp; + OUStringBuffer sTmp; sTmp.append( sal_Unicode('P') ); // "period" sal_uInt16 nHours = rTime.GetHour(); @@ -2011,7 +1971,7 @@ rtl::OUString SvXMLUnitConverter::convertTimeDuration( const Time& rTime, sal_In if ( nSecondsFraction ) { sTmp.append( sal_Unicode( '.' ) ); - ::rtl::OUStringBuffer aFractional; + OUStringBuffer aFractional; convertNumber( aFractional, nSecondsFraction ); sTmp.append( aFractional.getStr() ); } @@ -2021,9 +1981,9 @@ rtl::OUString SvXMLUnitConverter::convertTimeDuration( const Time& rTime, sal_In } // static -bool SvXMLUnitConverter::convertTimeDuration( const rtl::OUString& rString, Time& rTime, sal_Int32* pSecondsFraction ) +bool SvXMLUnitConverter::convertTimeDuration( const OUString& rString, Time& rTime, sal_Int32* pSecondsFraction ) { - rtl::OUString aTrimmed = rString.trim().toAsciiUpperCase(); + OUString aTrimmed = rString.trim().toAsciiUpperCase(); const sal_Unicode* pStr = aTrimmed.getStr(); if ( *(pStr++) != sal_Unicode('P') ) // duration must start with "P" @@ -2105,7 +2065,7 @@ bool SvXMLUnitConverter::convertTimeDuration( const rtl::OUString& rString, Time { //! how many days is a year or month? - DBG_ERROR("years or months in duration: not implemented"); + OSL_FAIL("years or months in duration: not implemented"); bSuccess = false; } else @@ -2124,8 +2084,8 @@ bool SvXMLUnitConverter::convertTimeDuration( const rtl::OUString& rString, Time return bSuccess; } -sal_Bool SvXMLUnitConverter::convertAny( ::rtl::OUStringBuffer& sValue, - ::rtl::OUStringBuffer& sType , +sal_Bool SvXMLUnitConverter::convertAny( OUStringBuffer& sValue, + OUStringBuffer& sType , const com::sun::star::uno::Any& aValue) { sal_Bool bConverted = sal_False; @@ -2178,7 +2138,7 @@ sal_Bool SvXMLUnitConverter::convertAny( ::rtl::OUStringBuffer& sValue, case com::sun::star::uno::TypeClass_STRING : { - ::rtl::OUString sTempValue; + OUString sTempValue; if (aValue >>= sTempValue) { sType.appendAscii("string"); @@ -2240,20 +2200,20 @@ sal_Bool SvXMLUnitConverter::convertAny( ::rtl::OUStringBuffer& sValue, } sal_Bool SvXMLUnitConverter::convertAny( com::sun::star::uno::Any& aValue, - const ::rtl::OUString& sType , - const ::rtl::OUString& sValue) + const OUString& sType , + const OUString& sValue) { sal_Bool bConverted = sal_False; - if (sType.equalsAscii("boolean")) + if (sType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("boolean"))) { - sal_Bool bTempValue = sal_False; + bool bTempValue = false; SvXMLUnitConverter::convertBool(bTempValue, sValue); aValue <<= bTempValue; bConverted = sal_True; } else - if (sType.equalsAscii("integer")) + if (sType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("integer"))) { sal_Int32 nTempValue = 0; SvXMLUnitConverter::convertNumber(nTempValue, sValue); @@ -2261,7 +2221,7 @@ sal_Bool SvXMLUnitConverter::convertAny( com::sun::star::uno::Any& aValue, bConverted = sal_True; } else - if (sType.equalsAscii("float")) + if (sType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("float"))) { double fTempValue = 0.0; SvXMLUnitConverter::convertDouble(fTempValue, sValue); @@ -2269,13 +2229,13 @@ sal_Bool SvXMLUnitConverter::convertAny( com::sun::star::uno::Any& aValue, bConverted = sal_True; } else - if (sType.equalsAscii("string")) + if (sType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("string"))) { aValue <<= sValue; bConverted = sal_True; } else - if (sType.equalsAscii("date")) + if (sType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("date"))) { com::sun::star::util::DateTime aTempValue; SvXMLUnitConverter::convertDateTime(aTempValue, sValue); @@ -2283,7 +2243,7 @@ sal_Bool SvXMLUnitConverter::convertAny( com::sun::star::uno::Any& aValue, bConverted = sal_True; } else - if (sType.equalsAscii("time")) + if (sType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("time"))) { com::sun::star::util::DateTime aTempValue; com::sun::star::util::Time aConvValue; @@ -2298,3 +2258,5 @@ sal_Bool SvXMLUnitConverter::convertAny( com::sun::star::uno::Any& aValue, return bConverted; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/EnhancedCustomShapeToken.cxx b/xmloff/source/draw/EnhancedCustomShapeToken.cxx index 1a4ddcc67cfe..169872ba6c86 100644 --- a/xmloff/source/draw/EnhancedCustomShapeToken.cxx +++ b/xmloff/source/draw/EnhancedCustomShapeToken.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. @@ -29,11 +30,18 @@ #include "precompiled_xmloff.hxx" #include "EnhancedCustomShapeToken.hxx" #include <osl/mutex.hxx> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <string.h> namespace xmloff { namespace EnhancedCustomShapeToken { +struct THash +{ + size_t operator()( const char* s ) const + { + return rtl_str_hashCode(s); + } +}; struct TCheck { bool operator()( const char* s1, const char* s2 ) const @@ -41,7 +49,7 @@ struct TCheck return strcmp( s1, s2 ) == 0; } }; -typedef std::hash_map< const char*, EnhancedCustomShapeTokenEnum, std::hash<const char*>, TCheck> TypeNameHashMap; +typedef boost::unordered_map< const char*, EnhancedCustomShapeTokenEnum, THash, TCheck> TypeNameHashMap; static TypeNameHashMap* pHashMap = NULL; static ::osl::Mutex& getHashMapMutex() { @@ -219,3 +227,5 @@ rtl::OUString EASGet( const EnhancedCustomShapeTokenEnum eToken ) } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx index 13ab9f4fd62f..11f46ef4c230 100644 --- a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx +++ b/xmloff/source/draw/XMLGraphicsDefaultStyle.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,9 +35,7 @@ #include "xmloff/xmlnmspe.hxx" #include <xmloff/xmltoken.hxx> -#ifndef _XMLOFF_FAMILIES_HXX #include <xmloff/families.hxx> -#endif #include "XMLShapePropertySetContext.hxx" #include <xmloff/XMLGraphicsDefaultStyle.hxx> @@ -127,3 +126,4 @@ void XMLGraphicsDefaultStyle::SetDefaults() } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/XMLImageMapContext.cxx b/xmloff/source/draw/XMLImageMapContext.cxx index b36c7776d905..92d1b9a8e408 100644 --- a/xmloff/source/draw/XMLImageMapContext.cxx +++ b/xmloff/source/draw/XMLImageMapContext.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,17 +32,13 @@ #include <rtl/ustrbuf.hxx> #include <com/sun/star/uno/Reference.h> #include <com/sun/star/beans/XPropertySet.hpp> -#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSETINFO_HPP #include <com/sun/star/beans/XPropertySetInfo.hpp> -#endif #include <com/sun/star/xml/sax/XAttributeList.hpp> #include <com/sun/star/container/XIndexContainer.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/drawing/PointSequenceSequence.hpp> -#ifndef _COM_SUN_STAR_DOCUMENT_XEVENTSSUPPLIER_HPP #include <com/sun/star/document/XEventsSupplier.hpp> -#endif #include <com/sun/star/awt/Rectangle.hpp> #include <xmloff/xmltoken.hxx> #include <xmloff/xmlimp.hxx> @@ -91,7 +88,7 @@ enum XMLImageMapToken XML_TOK_IMAP_TARGET }; -static __FAR_DATA SvXMLTokenMapEntry aImageMapObjectTokenMap[] = +static SvXMLTokenMapEntry aImageMapObjectTokenMap[] = { { XML_NAMESPACE_XLINK, XML_HREF, XML_TOK_IMAP_URL }, { XML_NAMESPACE_OFFICE, XML_NAME, XML_TOK_IMAP_NAME }, @@ -721,3 +718,4 @@ void XMLImageMapContext::EndElement() xPropertySet->setPropertyValue(sImageMap, uno::makeAny( xImageMap ) ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/XMLImageMapExport.cxx b/xmloff/source/draw/XMLImageMapExport.cxx index 6114f51acfdc..40ae2660d066 100644 --- a/xmloff/source/draw/XMLImageMapExport.cxx +++ b/xmloff/source/draw/XMLImageMapExport.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 <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/container/XIndexContainer.hpp> -#ifndef _COM_SUN_STAR_DOCUMENT_XEVENTSSUPPLIER_HPP #include <com/sun/star/document/XEventsSupplier.hpp> -#endif #include <com/sun/star/awt/Rectangle.hpp> #include <com/sun/star/awt/Point.hpp> #include <com/sun/star/awt/Size.hpp> @@ -384,3 +383,5 @@ void XMLImageMapExport::ExportPolygon( mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_POINTS, aPoints.GetExportString()); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/XMLNumberStyles.cxx b/xmloff/source/draw/XMLNumberStyles.cxx index a387ace22a95..70db6e776a39 100644 --- a/xmloff/source/draw/XMLNumberStyles.cxx +++ b/xmloff/source/draw/XMLNumberStyles.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,9 +39,10 @@ #include "sdxmlexp_impl.hxx" #include "sdxmlimp_impl.hxx" -using namespace rtl; using namespace ::xmloff::token; +using ::rtl::OUString; + struct SdXMLDataStyleNumber { enum XMLTokenEnum meNumberStyle; @@ -326,8 +328,6 @@ const SdXMLFixedDataStyle* aSdXMLFixedTimeFormats[SdXMLTimeFormatCount] = /////////////////////////////////////////////////////////////////////// // export -#ifndef SVX_LIGHT - static void SdXMLExportDataStyleNumber( SdXMLExport& rExport, SdXMLDataStyleNumber& rElement ) { if( rElement.mbDecimal02 ) @@ -490,8 +490,6 @@ OUString SdXMLNumberStylesExporter::getDateStyleName(const sal_Int32 nDateFormat } } -#endif // #ifndef SVX_LIGHT - /////////////////////////////////////////////////////////////////////// // import @@ -741,3 +739,5 @@ SvXMLImportContext * SdXMLNumberFormatImportContext::CreateChildContext( sal_uIn { return new SdXMLNumberFormatMemberImportContext( GetImport(), nPrefix, rLocalName, xAttrList, this, SvXMLNumFormatContext::CreateChildContext( nPrefix, rLocalName, xAttrList ) ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/XMLNumberStylesExport.hxx b/xmloff/source/draw/XMLNumberStylesExport.hxx index 08f425aa566a..f905770f814e 100644 --- a/xmloff/source/draw/XMLNumberStylesExport.hxx +++ b/xmloff/source/draw/XMLNumberStylesExport.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,4 @@ public: #endif // _XMLOFF_NUMBERSTYLESEXPORT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/XMLReplacementImageContext.cxx b/xmloff/source/draw/XMLReplacementImageContext.cxx index d1591a10448e..fae186ca94d9 100644 --- a/xmloff/source/draw/XMLReplacementImageContext.cxx +++ b/xmloff/source/draw/XMLReplacementImageContext.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. @@ -134,3 +135,4 @@ SvXMLImportContext *XMLReplacementImageContext::CreateChildContext( } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/XMLShapePropertySetContext.cxx b/xmloff/source/draw/XMLShapePropertySetContext.cxx index e1c94dcf5cc7..9783cc916292 100644 --- a/xmloff/source/draw/XMLShapePropertySetContext.cxx +++ b/xmloff/source/draw/XMLShapePropertySetContext.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_XMLSHAPEPROPERTYSETCONTEXT_HXX_ #include "XMLShapePropertySetContext.hxx" -#endif #include <xmloff/xmlimp.hxx> #include <xmloff/xmlnumi.hxx> #include "xmltabi.hxx" @@ -114,3 +113,5 @@ SvXMLImportContext *XMLShapePropertySetContext::CreateChildContext( return pContext; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/XMLShapeStyleContext.cxx b/xmloff/source/draw/XMLShapeStyleContext.cxx index c9862d1b29ae..313691dd31f6 100644 --- a/xmloff/source/draw/XMLShapeStyleContext.cxx +++ b/xmloff/source/draw/XMLShapeStyleContext.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. @@ -324,3 +325,4 @@ void XMLShapeStyleContext::Finish( sal_Bool /*bOverwrite*/ ) { } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx index 8aa853ce22af..eeeead7374af 100644 --- a/xmloff/source/draw/animationexport.cxx +++ b/xmloff/source/draw/animationexport.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. @@ -475,7 +476,7 @@ SvXMLEnumMapEntry* getAnimationsEnumMap( sal_uInt16 nMap ) } } - DBG_ERROR( "xmloff::getAnimationsEnumMap(), invalid map!" ); + OSL_FAIL( "xmloff::getAnimationsEnumMap(), invalid map!" ); return NULL; } @@ -525,11 +526,11 @@ public: Reference< XInterface > getParagraphTarget( const ParagraphTarget* pTarget ) const; - void convertPath( OUStringBuffer& sTmp, const Any& rPath ); - void convertValue( XMLTokenEnum eAttributeName, OUStringBuffer& sTmp, const Any& rValue ); - void convertTiming( OUStringBuffer& sTmp, const Any& rTiming ); - void convertSource( OUStringBuffer& sTmp, const Any& rSource ); - void convertTarget( OUStringBuffer& sTmp, const Any& rTarget ); + void convertPath( OUStringBuffer& sTmp, const Any& rPath ) const; + void convertValue( XMLTokenEnum eAttributeName, OUStringBuffer& sTmp, const Any& rValue ) const; + void convertTiming( OUStringBuffer& sTmp, const Any& rTiming ) const; + void convertSource( OUStringBuffer& sTmp, const Any& rSource ) const; + void convertTarget( OUStringBuffer& sTmp, const Any& rTarget ) const; void prepareValue( const Any& rValue ); @@ -554,7 +555,7 @@ AnimationsExporterImpl::AnimationsExporterImpl( SvXMLExport& rExport, const Refe } catch( RuntimeException& ) { - DBG_ERROR( "xmloff::AnimationsExporterImpl::AnimationsExporterImpl(), RuntimeException catched!" ); + OSL_FAIL( "xmloff::AnimationsExporterImpl::AnimationsExporterImpl(), RuntimeException catched!" ); } } @@ -670,7 +671,7 @@ void AnimationsExporterImpl::prepareTransitionNode() } catch( Exception& ) { - DBG_ERROR( "xmloff::AnimationsExporterImpl::prepareNode(), Exception caught!" ); + OSL_FAIL( "xmloff::AnimationsExporterImpl::prepareNode(), Exception caught!" ); } } @@ -751,7 +752,7 @@ void AnimationsExporterImpl::prepareNode( const Reference< XAnimationNode >& xNo } catch( Exception& ) { - DBG_ERROR( "xmloff::AnimationsExporterImpl::prepareNode(), RuntimeException catched!" ); + OSL_FAIL( "xmloff::AnimationsExporterImpl::prepareNode(), RuntimeException catched!" ); } } @@ -993,12 +994,12 @@ void AnimationsExporterImpl::exportNode( const Reference< XAnimationNode >& xNod } break; default: - DBG_ERROR( "xmloff::AnimationsExporterImpl::exportNode(), invalid AnimationNodeType!" ); + OSL_FAIL( "xmloff::AnimationsExporterImpl::exportNode(), invalid AnimationNodeType!" ); } } catch( RuntimeException& ) { - DBG_ERROR( "xmloff::AnimationsExporterImpl::exportNode(), RuntimeException catched!" ); + OSL_FAIL( "xmloff::AnimationsExporterImpl::exportNode(), RuntimeException catched!" ); } // if something goes wrong, its always a good idea to clear the attribute list @@ -1063,7 +1064,7 @@ void AnimationsExporterImpl::exportContainer( const Reference< XTimeContainer >& case AnimationNodeType::SEQ: eElementToken = XML_SEQ; break; case AnimationNodeType::ITERATE:eElementToken = XML_ITERATE; break; default: - DBG_ERROR( "xmloff::AnimationsExporterImpl::exportContainer(), invalid TimeContainerType!" ); + OSL_FAIL( "xmloff::AnimationsExporterImpl::exportContainer(), invalid TimeContainerType!" ); return; } SvXMLElementExport aElement( mrExport, XML_NAMESPACE_ANIMATION, eElementToken, sal_True, sal_True ); @@ -1081,7 +1082,7 @@ void AnimationsExporterImpl::exportContainer( const Reference< XTimeContainer >& } catch( RuntimeException& ) { - DBG_ERROR( "xmloff::AnimationsExporterImpl::exportContainer(), RuntimeException catched!" ); + OSL_FAIL( "xmloff::AnimationsExporterImpl::exportContainer(), RuntimeException catched!" ); } } @@ -1346,7 +1347,7 @@ void AnimationsExporterImpl::exportAnimate( const Reference< XAnimate >& xAnimat catch( Exception& e ) { (void)e; - DBG_ERROR( "xmloff::AnimationsExporterImpl::exportAnimate(), Exception cought!" ); + OSL_FAIL( "xmloff::AnimationsExporterImpl::exportAnimate(), Exception cought!" ); } } @@ -1379,7 +1380,7 @@ void AnimationsExporterImpl::exportAudio( const Reference< XAudio >& xAudio ) catch( Exception& e ) { (void)e; - DBG_ERROR( "xmloff::AnimationsExporterImpl::exportAudio(), exception caught!" ); + OSL_FAIL( "xmloff::AnimationsExporterImpl::exportAudio(), exception caught!" ); } } @@ -1407,7 +1408,7 @@ void AnimationsExporterImpl::exportCommand( const Reference< XCommand >& xComman catch( Exception& e ) { (void)e; - DBG_ERROR( "xmloff::AnimationsExporterImpl::exportCommand(), exception caught!" ); + OSL_FAIL( "xmloff::AnimationsExporterImpl::exportCommand(), exception caught!" ); } } @@ -1429,14 +1430,14 @@ Reference< XInterface > AnimationsExporterImpl::getParagraphTarget( const Paragr } catch( RuntimeException& ) { - DBG_ERROR( "xmloff::AnimationsExporterImpl::getParagraphTarget(), RuntimeException catched!" ); + OSL_FAIL( "xmloff::AnimationsExporterImpl::getParagraphTarget(), RuntimeException catched!" ); } Reference< XInterface > xRef; return xRef; } -void AnimationsExporterImpl::convertPath( OUStringBuffer& sTmp, const Any& rPath ) +void AnimationsExporterImpl::convertPath( OUStringBuffer& sTmp, const Any& rPath ) const { OUString aStr; rPath >>= aStr; @@ -1444,7 +1445,7 @@ void AnimationsExporterImpl::convertPath( OUStringBuffer& sTmp, const Any& rPath sTmp = aStr; } -void AnimationsExporterImpl::convertValue( XMLTokenEnum eAttributeName, OUStringBuffer& sTmp, const Any& rValue ) +void AnimationsExporterImpl::convertValue( XMLTokenEnum eAttributeName, OUStringBuffer& sTmp, const Any& rValue ) const { if( !rValue.hasValue() ) return; @@ -1491,37 +1492,6 @@ void AnimationsExporterImpl::convertValue( XMLTokenEnum eAttributeName, OUString { if( rValue >>= aString ) { - /* - const sal_Char* pSource[] = { "$X", "$Y", "$Width", "$Height", NULL }; - const sal_Char* pDest[] = { "$x", "$y", "$width", "$height", NULL }; - const sal_Int32 nLength[] = { 2, 2, 6, 7, 0 }; - - sal_Int32 nIndex = 0; - while( (nIndex = aString.indexOf( (sal_Unicode)'$', nIndex )) != -1 ) - { - const sal_Char** ps = pSource; - const sal_Char** pd = pDest; - const sal_Int32* pl = nLength; - - while( *ps ) - { - if( aString.matchAsciiL( *ps, *pl, nIndex ) ) - { - const OUString aNew( OUString::createFromAscii( *pd ) ); - aString = aString.replaceAt( nIndex, *pl, aNew ); - nIndex += aNew.getLength(); - break; - } - - ps++; - pd++; - pl++; - } - - if( *ps == 0 ) - nIndex++; - } - */ sTmp.append( aString ); } else if( rValue.getValueType() == ::getCppuType((const double*)0) ) @@ -1530,7 +1500,7 @@ void AnimationsExporterImpl::convertValue( XMLTokenEnum eAttributeName, OUString } else { - DBG_ERROR( "xmloff::AnimationsExporterImpl::convertValue(), invalid value type!" ); + OSL_FAIL( "xmloff::AnimationsExporterImpl::convertValue(), invalid value type!" ); } return; } @@ -1552,7 +1522,7 @@ void AnimationsExporterImpl::convertValue( XMLTokenEnum eAttributeName, OUString case XML_OPACITY: case XML_TRANSITIONFILTER: nType = XML_TYPE_DOUBLE; break; default: - DBG_ERROR( "xmloff::AnimationsExporterImpl::convertValue(), invalid AttributeName!" ); + OSL_FAIL( "xmloff::AnimationsExporterImpl::convertValue(), invalid AttributeName!" ); nType = XML_TYPE_STRING; } @@ -1563,24 +1533,9 @@ void AnimationsExporterImpl::convertValue( XMLTokenEnum eAttributeName, OUString sTmp.append( aString ); } } - -/* - if( rValue.getValueType() == ::getCppuType((const double*)0) ) - { - sTmp.append( *(static_cast< const double* >( rValue.getValue() )) ); - } - else if( rValue.getValueType() == ::getCppuType((const OUString*)0) ) - { - sTmp.append( *(static_cast< const OUString* >( rValue.getValue() )) ); - } - else - { - DBG_ERROR( "xmloff::AnimationsExporterImpl::convertValue(), invalid value type!" ); - } -*/ } -void AnimationsExporterImpl::convertTiming( OUStringBuffer& sTmp, const Any& rValue ) +void AnimationsExporterImpl::convertTiming( OUStringBuffer& sTmp, const Any& rValue ) const { if( !rValue.hasValue() ) return; @@ -1643,16 +1598,16 @@ void AnimationsExporterImpl::convertTiming( OUStringBuffer& sTmp, const Any& rVa } else { - DBG_ERROR( "xmloff::AnimationsExporterImpl::convertTiming(), invalid value type!" ); + OSL_FAIL( "xmloff::AnimationsExporterImpl::convertTiming(), invalid value type!" ); } } -void AnimationsExporterImpl::convertSource( OUStringBuffer& sTmp, const Any& rSource ) +void AnimationsExporterImpl::convertSource( OUStringBuffer& sTmp, const Any& rSource ) const { convertTarget( sTmp, rSource ); } -void AnimationsExporterImpl::convertTarget( OUStringBuffer& sTmp, const Any& rTarget ) +void AnimationsExporterImpl::convertTarget( OUStringBuffer& sTmp, const Any& rTarget ) const { if( !rTarget.hasValue() ) return; @@ -1739,7 +1694,7 @@ void AnimationsExporter::prepare( Reference< XAnimationNode > xRootNode ) } catch( RuntimeException& ) { - DBG_ERROR( "xmloff::AnimationsExporter::prepare(), exception catched" ); + OSL_FAIL( "xmloff::AnimationsExporter::prepare(), exception catched" ); } } @@ -1775,8 +1730,10 @@ void AnimationsExporter::exportAnimations( Reference< XAnimationNode > xRootNode } catch( RuntimeException& ) { - DBG_ERROR( "xmloff::AnimationsExporter::exportAnimations(), exception catched" ); + OSL_FAIL( "xmloff::AnimationsExporter::exportAnimations(), exception catched" ); } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx index 1b425786f5c0..0b4ec5178206 100644 --- a/xmloff/source/draw/animationimport.cxx +++ b/xmloff/source/draw/animationimport.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,7 +166,7 @@ const SvXMLTokenMap& AnimationsImportHelperImpl::getAnimationNodeTokenMap() { if( mpAnimationNodeTokenMap == NULL ) { - static __FAR_DATA SvXMLTokenMapEntry aAnimationNodeTokenMap[] = + static SvXMLTokenMapEntry aAnimationNodeTokenMap[] = { { XML_NAMESPACE_ANIMATION, XML_PAR, (sal_uInt16)AnimationNodeType::PAR }, { XML_NAMESPACE_ANIMATION, XML_SEQ, (sal_uInt16)AnimationNodeType::SEQ }, @@ -244,7 +245,7 @@ const SvXMLTokenMap& AnimationsImportHelperImpl::getAnimationNodeAttributeTokenM { if( mpAnimationNodeAttributeTokenMap == NULL ) { - static __FAR_DATA SvXMLTokenMapEntry aAnimationNodeAttributeTokenMap[] = + static SvXMLTokenMapEntry aAnimationNodeAttributeTokenMap[] = { { XML_NAMESPACE_SMIL, XML_BEGIN, (sal_uInt16)ANA_Begin }, { XML_NAMESPACE_SMIL, XML_DUR, (sal_uInt16)ANA_Dur }, @@ -396,7 +397,7 @@ Any AnimationsImportHelperImpl::convertTarget( const OUString& rValue ) } catch( RuntimeException& ) { - DBG_ERROR( "xmloff::AnimationsImportImpl::convertTarget(), RuntimeException catched!" ); + OSL_FAIL( "xmloff::AnimationsImportImpl::convertTarget(), RuntimeException catched!" ); } Any aAny; @@ -480,38 +481,6 @@ Any AnimationsImportHelperImpl::convertValue( XMLTokenEnum eAttributeName, const pHandler->importXML( rValue, aAny, mrImport.GetMM100UnitConverter() ); return aAny; - -/* - if( rValue.getLength() == 0 ) - { - Any aAny; - return aAny; - } - else if( rValue.indexOf( '#' ) == 0 ) - { - // color - Color aColor; - SvXMLUnitConverter::convertColor( aColor, rValue ); - - return makeAny( static_cast< sal_Int32 >( aColor.GetRGBColor() ) ); - } - else if( rValue.indexOf( '$' ) != -1 ) - { - // formula - return makeAny( rValue ); - } - else - { - if( isDouble( rValue ) ) - { - return makeAny( rValue.toDouble() ); - } - else - { - return makeAny( rValue ); - } - } -*/ } } @@ -529,8 +498,8 @@ Sequence< Any > AnimationsImportHelperImpl::convertValueSequence( XMLTokenEnum e // fill the sequence Any* pValues = aValues.getArray(); - sal_Int32 nIndex, nElement; - for( nIndex = 0, nElement = 0; nElements && (nIndex >= 0); nElements-- ) + sal_Int32 nIndex; + for( nIndex = 0; nElements && (nIndex >= 0); nElements-- ) { *pValues++ = convertValue( eAttributeName, rValue.getToken( 0, ';', nIndex ) ); } @@ -598,7 +567,7 @@ Any AnimationsImportHelperImpl::convertTiming( const OUString& rValue ) } else { - DBG_ERROR("AnimationsImportHelperImpl::convertTiming(), unknown event trigger!"); + OSL_FAIL("AnimationsImportHelperImpl::convertTiming(), unknown event trigger!"); } aAny <<= aEvent; @@ -772,7 +741,7 @@ AnimationNodeContext::AnimationNodeContext( } catch( RuntimeException& ) { - DBG_ERROR( "xmloff::AnimationsImportImpl::AnimationsImportImpl(), RuntimeException catched!" ); + OSL_FAIL( "xmloff::AnimationsImportImpl::AnimationsImportImpl(), RuntimeException catched!" ); } } @@ -873,7 +842,7 @@ void AnimationNodeContext::init_node( const ::com::sun::star::uno::Reference< : break; case ANA_AutoReverse: { - sal_Bool bTemp; + bool bTemp; if( SvXMLUnitConverter::convertBool( bTemp, rValue ) ) mxNode->setAutoReverse( bTemp ); } @@ -918,7 +887,7 @@ void AnimationNodeContext::init_node( const ::com::sun::star::uno::Reference< : break; case ANA_After_Effect: { - sal_Bool bTemp; + bool bTemp; if( SvXMLUnitConverter::convertBool( bTemp, rValue ) ) aUserData.push_back( NamedValue( GetXMLToken( XML_AFTER_EFFECT ), makeAny( bTemp ) ) ); } @@ -1290,7 +1259,7 @@ void AnimationNodeContext::init_node( const ::com::sun::star::uno::Reference< : } catch( RuntimeException& ) { - DBG_ERROR( "xmloff::AnimationNodeContext::StartElement(), RuntimeException catched!" ); + OSL_FAIL( "xmloff::AnimationNodeContext::StartElement(), RuntimeException catched!" ); } } @@ -1477,7 +1446,7 @@ void AnimationNodeContext::postProcessRootNode( SvXMLImport& /*rImport*/, const } catch( Exception& ) { - DBG_ERROR("xmloff::AnimationsImport::postProcessRootNode(), exception caught!"); + OSL_FAIL("xmloff::AnimationsImport::postProcessRootNode(), exception caught!"); } } @@ -1511,7 +1480,7 @@ OUString SAL_CALL AnimationsImport::getImplementationName() throw(RuntimeExcepti sal_Bool SAL_CALL AnimationsImport::supportsService( const OUString& ServiceName ) throw(RuntimeException) { - return ServiceName.equalsAscii( "com.sun.star.comp.Xmloff.AnimationsImport" ); + return ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.comp.Xmloff.AnimationsImport" ) ); } Sequence< OUString > SAL_CALL AnimationsImport::getSupportedServiceNames() throw(RuntimeException) @@ -1521,3 +1490,4 @@ Sequence< OUString > SAL_CALL AnimationsImport::getSupportedServiceNames() throw } // namespace xmloff +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/animexp.cxx b/xmloff/source/draw/animexp.cxx index b2611dbc1e8f..312b7d7ab5fc 100644 --- a/xmloff/source/draw/animexp.cxx +++ b/xmloff/source/draw/animexp.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. @@ -186,7 +187,7 @@ void SdXMLImplSetEffect( AnimationEffect eEffect, XMLEffect& eKind, XMLEffectDir { if( eEffect < AnimationEffect_NONE || eEffect > AnimationEffect_ZOOM_OUT_FROM_CENTER ) { - DBG_ERROR( "unknown animation effect!" ); + OSL_FAIL( "unknown animation effect!" ); eEffect = AnimationEffect_NONE; } @@ -307,7 +308,7 @@ void XMLAnimationsExporter::prepare( Reference< XShape > xShape, SvXMLExport& ) } catch( Exception e ) { - DBG_ERROR("exception catched while collection animation information!"); + OSL_FAIL("exception catched while collection animation information!"); } } @@ -438,7 +439,7 @@ void XMLAnimationsExporter::collect( Reference< XShape > xShape, SvXMLExport& rE } catch( Exception e ) { - DBG_ERROR("exception catched while collection animation information!"); + OSL_FAIL("exception catched while collection animation information!"); } } @@ -544,10 +545,12 @@ void XMLAnimationsExporter::exportAnimations( SvXMLExport& rExport ) } } - aIter++; + ++aIter; } while( aIter != aEnd ); } mpImpl->maEffects.clear(); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/animimp.cxx b/xmloff/source/draw/animimp.cxx index 07f93545a352..d785725203fa 100644 --- a/xmloff/source/draw/animimp.cxx +++ b/xmloff/source/draw/animimp.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. @@ -660,14 +661,14 @@ void XMLAnimationsEffectContext::EndElement() } else { - DBG_ERROR("XMLAnimationsEffectContext::EndElement - Sound URL without a XPropertySet!"); + OSL_FAIL("XMLAnimationsEffectContext::EndElement - Sound URL without a XPropertySet!"); } } } } catch( Exception e ) { - DBG_ERROR( "exception catched while importing animation information!" ); + OSL_FAIL( "exception catched while importing animation information!" ); } } @@ -692,3 +693,5 @@ SvXMLImportContext * XMLAnimationsContext::CreateChildContext( sal_uInt16 nPrefi { return new XMLAnimationsEffectContext( GetImport(), nPrefix, rLocalName, xAttrList, mpImpl ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/descriptionimp.cxx b/xmloff/source/draw/descriptionimp.cxx index 1abc297e6b33..6d1799957802 100644 --- a/xmloff/source/draw/descriptionimp.cxx +++ b/xmloff/source/draw/descriptionimp.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. @@ -91,3 +92,4 @@ void SdXMLDescriptionContext::Characters( const ::rtl::OUString& rChars ) msText += rChars; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/descriptionimp.hxx b/xmloff/source/draw/descriptionimp.hxx index 61441b9dba69..f73f00cb28de 100644 --- a/xmloff/source/draw/descriptionimp.hxx +++ b/xmloff/source/draw/descriptionimp.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. @@ -58,3 +59,4 @@ public: #endif // _XMLOFF_EVENTIMP_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/eventimp.cxx b/xmloff/source/draw/eventimp.cxx index f8f127f4e0c9..6d82798bd283 100644 --- a/xmloff/source/draw/eventimp.cxx +++ b/xmloff/source/draw/eventimp.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,7 +65,7 @@ using namespace ::xmloff::token; /////////////////////////////////////////////////////////////////////// -SvXMLEnumMapEntry __READONLY_DATA aXML_EventActions_EnumMap[] = +SvXMLEnumMapEntry const aXML_EventActions_EnumMap[] = { { XML_NONE, ClickAction_NONE }, { XML_PREVIOUS_PAGE, ClickAction_PREVPAGE }, @@ -101,9 +102,6 @@ public: sal_Bool mbValid; sal_Bool mbScript; -#ifdef ISSUE66550_HLINK_FOR_SHAPES - sal_Bool mbActionEvent; -#endif ClickAction meClickAction; XMLEffect meEffect; XMLEffectDirection meDirection; @@ -115,9 +113,6 @@ public: OUString msMacroName; OUString msBookmark; OUString msLanguage; -#ifdef ISSUE66550_HLINK_FOR_SHAPES - OUString msHyperURL; -#endif }; /////////////////////////////////////////////////////////////////////// @@ -176,18 +171,11 @@ TYPEINIT1( SdXMLEventContext, SvXMLImportContext ); SdXMLEventContext::SdXMLEventContext( SvXMLImport& rImp, sal_uInt16 nPrfx, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList, const Reference< XShape >& rxShape ) : SvXMLImportContext(rImp, nPrfx, rLocalName), -#ifdef ISSUE66550_HLINK_FOR_SHAPES - mxShape( rxShape ), mbScript( sal_False ), mbActionEvent( sal_False ), meClickAction( ClickAction_NONE ), -#else mxShape( rxShape ), mbScript( sal_False ), meClickAction( ClickAction_NONE ), -#endif meEffect( EK_none ), meDirection( ED_none ), mnStartScale( 100 ), meSpeed( AnimationSpeed_MEDIUM ), mnVerb(0), mbPlayFull( sal_False ) { static const OUString sXMLClickName( RTL_CONSTASCII_USTRINGPARAM( "click" ) ); -#ifdef ISSUE66550_HLINK_FOR_SHAPES - static const OUString sXMLActionName( RTL_CONSTASCII_USTRINGPARAM( "action" ) ); -#endif if( nPrfx == XML_NAMESPACE_PRESENTATION && IsXMLToken( rLocalName, XML_EVENT_LISTENER ) ) { @@ -258,12 +246,7 @@ SdXMLEventContext::SdXMLEventContext( SvXMLImport& rImp, sal_uInt16 nPrfx, cons sEventName = sValue; sal_uInt16 nScriptPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sValue, &sEventName ); -#ifdef ISSUE66550_HLINK_FOR_SHAPES - mbValid = XML_NAMESPACE_DOM == nScriptPrefix && ( sEventName == sXMLClickName || sEventName == sXMLActionName ); - mbActionEvent = mbValid && (sEventName == sXMLActionName); -#else mbValid = XML_NAMESPACE_DOM == nScriptPrefix && sEventName == sXMLClickName; -#endif } else if( IsXMLToken( aAttrLocalName, XML_LANGUAGE ) ) { @@ -279,10 +262,6 @@ SdXMLEventContext::SdXMLEventContext( SvXMLImport& rImp, sal_uInt16 nPrfx, cons { msMacroName = sValue; } -// else if( IsXMLToken( aLocalName, XML_LIBRARY ) ) -// { -// msLibrary = sValue; -// } break; case XML_NAMESPACE_XLINK: @@ -292,12 +271,6 @@ SdXMLEventContext::SdXMLEventContext( SvXMLImport& rImp, sal_uInt16 nPrfx, cons { msMacroName = sValue; } -#ifdef ISSUE66550_HLINK_FOR_SHAPES - else if ( mbActionEvent ) - { - msHyperURL = sValue; - } -#endif else { const rtl::OUString &rTmp = @@ -343,26 +316,6 @@ void SdXMLEventContext::EndElement() OUString sAPIEventName; uno::Sequence< beans::PropertyValue > aProperties; -#ifdef ISSUE66550_HLINK_FOR_SHAPES - if( mbActionEvent ) - { - sAPIEventName = OUString( RTL_CONSTASCII_USTRINGPARAM( "OnAction" ) ); - aProperties.realloc( 2 ); - beans::PropertyValue* pProperty = aProperties.getArray(); - - pProperty->Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "EventType" ) ); - pProperty->Handle = -1; - pProperty->Value <<= OUString( RTL_CONSTASCII_USTRINGPARAM( "Action" ) ); - pProperty->State = beans::PropertyState_DIRECT_VALUE; - ++pProperty; - pProperty->Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" ) ); - pProperty->Handle = -1; - pProperty->Value <<= msHyperURL; - pProperty->State = beans::PropertyState_DIRECT_VALUE; - } - else -#endif - { sAPIEventName = OUString( RTL_CONSTASCII_USTRINGPARAM( "OnClick" ) ); if( mbScript ) @@ -541,14 +494,12 @@ void SdXMLEventContext::EndElement() pProperties->State = beans::PropertyState_DIRECT_VALUE; break; case ClickAction_MACRO: - DBG_ERROR("xmloff::SdXMLEventContext::EndElement(), ClickAction_MACRO must be handled in different if case"); + OSL_FAIL("xmloff::SdXMLEventContext::EndElement(), ClickAction_MACRO must be handled in different if case"); break; default: break; } } - } - xEvents->replaceByName( sAPIEventName, uno::Any( aProperties ) ); } while(0); @@ -573,3 +524,5 @@ SvXMLImportContext * SdXMLEventsContext::CreateChildContext( sal_uInt16 nPrfx, c { return new SdXMLEventContext( GetImport(), nPrfx, rLocalName, xAttrList, mxShape ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/eventimp.hxx b/xmloff/source/draw/eventimp.hxx index bac04f2bea01..6d22bd836a6c 100644 --- a/xmloff/source/draw/eventimp.hxx +++ b/xmloff/source/draw/eventimp.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,4 @@ public: #endif // _XMLOFF_EVENTIMP_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/layerexp.cxx b/xmloff/source/draw/layerexp.cxx index b7d58258e204..9d2667a7c0e7 100644 --- a/xmloff/source/draw/layerexp.cxx +++ b/xmloff/source/draw/layerexp.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,7 +104,9 @@ void SdXMLayerExporter::exportLayer( SvXMLExport& rExport ) } catch( Exception& ) { - DBG_ERROR("SdXMLayerExporter::exportLayer(), exception caught during export of one layer!"); + OSL_FAIL("SdXMLayerExporter::exportLayer(), exception caught during export of one layer!"); } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/layerexp.hxx b/xmloff/source/draw/layerexp.hxx index 35da3e1daafe..1a4f9afbd0c2 100644 --- a/xmloff/source/draw/layerexp.hxx +++ b/xmloff/source/draw/layerexp.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. @@ -38,3 +39,4 @@ public: #endif // _XMLOFF_ANIMEXP_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/layerimp.cxx b/xmloff/source/draw/layerimp.cxx index 6770a11958d8..c5c98a6dfed8 100644 --- a/xmloff/source/draw/layerimp.cxx +++ b/xmloff/source/draw/layerimp.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. @@ -152,7 +153,7 @@ void SdXMLLayerContext::EndElement() } catch( Exception& ) { - DBG_ERROR("SdXMLLayerContext::EndElement(), exception caught!"); + OSL_FAIL("SdXMLLayerContext::EndElement(), exception caught!"); } } @@ -178,3 +179,5 @@ SvXMLImportContext * SdXMLLayerSetContext::CreateChildContext( sal_uInt16 nPrefi { return new SdXMLLayerContext( GetImport(), nPrefix, rLocalName, xAttrList, mxLayerManager ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/layerimp.hxx b/xmloff/source/draw/layerimp.hxx index 9e5eaea5199c..456d57ca8ade 100644 --- a/xmloff/source/draw/layerimp.hxx +++ b/xmloff/source/draw/layerimp.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. @@ -56,3 +57,4 @@ public: #endif // _XMLOFF_ANIMIMP_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/numithdl.cxx b/xmloff/source/draw/numithdl.cxx index 8488efedb88c..83b9609c5400 100644 --- a/xmloff/source/draw/numithdl.cxx +++ b/xmloff/source/draw/numithdl.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,3 +62,4 @@ sal_Bool XMLNumRulePropHdl::exportXML( ::rtl::OUString& /*rStrExpValue*/, const return sal_False; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/numithdl.hxx b/xmloff/source/draw/numithdl.hxx index efba122ca6e1..bda9850f3b60 100644 --- a/xmloff/source/draw/numithdl.hxx +++ b/xmloff/source/draw/numithdl.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. @@ -50,3 +51,5 @@ public: }; #endif // _XMLOFF_PROPERTYHANDLER_NUMRULE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/propimp0.cxx b/xmloff/source/draw/propimp0.cxx index 711ac3329bb1..c1e97269427e 100644 --- a/xmloff/source/draw/propimp0.cxx +++ b/xmloff/source/draw/propimp0.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. @@ -270,3 +271,5 @@ sal_Bool XMLDateTimeFormatHdl::exportXML( rtl::OUString& rStrExpValue, const ::c return sal_False; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/propimp0.hxx b/xmloff/source/draw/propimp0.hxx index e866db28a9a9..81794228e584 100644 --- a/xmloff/source/draw/propimp0.hxx +++ b/xmloff/source/draw/propimp0.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. @@ -76,3 +77,5 @@ public: #endif // _PROPIMP0_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx index 22a6ef13c72f..d70b6cf9221e 100644 --- a/xmloff/source/draw/sdpropls.cxx +++ b/xmloff/source/draw/sdpropls.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 <com/sun/star/drawing/RectanglePoint.hpp> #include <com/sun/star/drawing/CircleKind.hpp> -#ifndef _COM_SUN_STAR_DRAWING_BitmapMode_HPP_ #include <com/sun/star/drawing/BitmapMode.hpp> -#endif #include <com/sun/star/text/WritingMode.hpp> #include <xmloff/EnumPropertyHdl.hxx> #include <xmloff/NamedBoolPropertyHdl.hxx> @@ -531,7 +530,6 @@ SvXMLEnumMapEntry aXML_TexGenerationY_EnumMap[] = SvXMLEnumMapEntry aXML_TexKind_EnumMap[] = { { XML_LUMINANCE, drawing::TextureKind_LUMINANCE }, -// { XML_INTENSITY, drawing::TextureKind_INTENSITY }, { XML_COLOR, drawing::TextureKind_COLOR }, { XML_TOKEN_INVALID, 0 } }; @@ -574,7 +572,7 @@ SvXMLEnumMapEntry aXML_WritingMode_EnumMap[] = { XML_TOKEN_INVALID, 0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_TextAnimation_Enum[] = +SvXMLEnumMapEntry const pXML_TextAnimation_Enum[] = { { XML_NONE, drawing::TextAnimationKind_NONE }, { XML_BLINKING, drawing::TextAnimationKind_BLINK }, // will be filtered @@ -584,7 +582,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_TextAnimation_Enum[] = { XML_TOKEN_INVALID, 0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_TextAnimation_Blinking_Enum[] = +SvXMLEnumMapEntry const pXML_TextAnimation_Blinking_Enum[] = { { XML_FALSE, drawing::TextAnimationKind_NONE }, { XML_TRUE, drawing::TextAnimationKind_BLINK }, @@ -594,7 +592,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_TextAnimation_Blinking_Enum[] = { XML_TOKEN_INVALID, 0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_TextAnimationDirection_Enum[] = +SvXMLEnumMapEntry const pXML_TextAnimationDirection_Enum[] = { { XML_LEFT, drawing::TextAnimationDirection_LEFT }, { XML_RIGHT, drawing::TextAnimationDirection_RIGHT }, // will be filtered @@ -603,7 +601,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_TextAnimationDirection_Enum[] = { XML_TOKEN_INVALID, 0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_TextAlign_Enum[] = +SvXMLEnumMapEntry const pXML_TextAlign_Enum[] = { { XML_LEFT, drawing::TextHorizontalAdjust_LEFT }, { XML_CENTER, drawing::TextHorizontalAdjust_CENTER }, @@ -612,7 +610,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_TextAlign_Enum[] = { XML_TOKEN_INVALID, 0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_VerticalAlign_Enum[] = +SvXMLEnumMapEntry const pXML_VerticalAlign_Enum[] = { { XML_TOP, drawing::TextVerticalAdjust_TOP }, { XML_MIDDLE, drawing::TextVerticalAdjust_CENTER }, @@ -621,16 +619,16 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_VerticalAlign_Enum[] = { XML_TOKEN_INVALID, 0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_FitToSize_Enum[] = +SvXMLEnumMapEntry const pXML_FitToSize_Enum[] = { { XML_FALSE, drawing::TextFitToSizeType_NONE }, { XML_TRUE, drawing::TextFitToSizeType_PROPORTIONAL }, - { XML_TRUE, drawing::TextFitToSizeType_ALLLINES }, - { XML_TRUE, drawing::TextFitToSizeType_RESIZEATTR }, + { XML_ALL, drawing::TextFitToSizeType_ALLLINES }, + { XML_SHRINK_TO_FIT,drawing::TextFitToSizeType_AUTOFIT }, { XML_TOKEN_INVALID, 0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_MeasureUnit_Enum[] = +SvXMLEnumMapEntry const pXML_MeasureUnit_Enum[] = { { XML_AUTOMATIC, 0 }, { XML_UNIT_MM, 1 }, @@ -645,7 +643,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_MeasureUnit_Enum[] = { XML_TOKEN_INVALID,0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_Measure_HAlign_Enum[] = +SvXMLEnumMapEntry const pXML_Measure_HAlign_Enum[] = { { XML_AUTOMATIC, drawing::MeasureTextHorzPos_AUTO }, { XML_LEFT_OUTSIDE, drawing::MeasureTextHorzPos_LEFTOUTSIDE }, @@ -654,7 +652,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_Measure_HAlign_Enum[] = { XML_TOKEN_INVALID,0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_Measure_VAlign_Enum[] = +SvXMLEnumMapEntry const pXML_Measure_VAlign_Enum[] = { { XML_AUTOMATIC, drawing::MeasureTextVertPos_AUTO }, { XML_ABOVE, drawing::MeasureTextVertPos_EAST }, @@ -664,7 +662,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_Measure_VAlign_Enum[] = }; // #FontWork# -SvXMLEnumMapEntry __READONLY_DATA pXML_Fontwork_Style_Enum[] = +SvXMLEnumMapEntry const pXML_Fontwork_Style_Enum[] = { { XML_ROTATE, 0 }, //XFT_ROTATE, { XML_UPRIGHT, 1 }, //XFT_UPRIGHT, @@ -674,7 +672,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_Fontwork_Style_Enum[] = { XML_TOKEN_INVALID,0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_Fontwork_Adjust_Enum[] = +SvXMLEnumMapEntry const pXML_Fontwork_Adjust_Enum[] = { { XML_LEFT, 0 }, //XFT_LEFT, { XML_RIGHT, 1 }, //XFT_RIGHT, @@ -683,7 +681,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_Fontwork_Adjust_Enum[] = { XML_TOKEN_INVALID,0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_Fontwork_Shadow_Enum[] = +SvXMLEnumMapEntry const pXML_Fontwork_Shadow_Enum[] = { { XML_NORMAL, 0 }, //XFTSHADOW_NORMAL, { XML_SLANT, 1 }, //XFTSHADOW_SLANT, @@ -691,7 +689,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_Fontwork_Shadow_Enum[] = { XML_TOKEN_INVALID,0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_Fontwork_Form_Enum[] = +SvXMLEnumMapEntry const pXML_Fontwork_Form_Enum[] = { { XML_NONE, 0 }, //XFTFORM_NONE, { XML_TOPCIRCLE, 1 }, //XFTFORM_TOPCIRC, @@ -709,7 +707,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_Fontwork_Form_Enum[] = { XML_TOKEN_INVALID,0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_Caption_Esc_Dir_Enum[] = +SvXMLEnumMapEntry const pXML_Caption_Esc_Dir_Enum[] = { { XML_HORIZONTAL, 0 }, //SDRCAPT_ESCHORIZONTAL, { XML_VERTICAL, 1 }, //SDRCAPT_ESCVERTICAL, @@ -717,7 +715,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_Caption_Esc_Dir_Enum[] = { XML_TOKEN_INVALID,0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_Caption_Type_Enum[] = +SvXMLEnumMapEntry const pXML_Caption_Type_Enum[] = { { XML_STRAIGHT_LINE, 0 }, //SDRCAPT_TYPE1, { XML_ANGLED_LINE, 1 }, //SDRCAPT_TYPE2, @@ -1662,10 +1660,6 @@ void XMLPageExportPropertyMapper::ContextFilter( } break; case CTF_PAGE_VISIBLE: -// case CTF_HEADER_VISIBLE: -// case CTF_FOOTER_VISIBLE: -// case CTF_PAGE_NUMBER_VISIBLE: -// case CTF_DATE_TIME_VISIBLE: { sal_Bool bVisible = false; (*property).maValue >>= bVisible; @@ -1762,3 +1756,4 @@ void XMLPageExportPropertyMapper::handleElementItem( } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/sdpropls.hxx b/xmloff/source/draw/sdpropls.hxx index 6beb7a6fcc14..80b6e17d507a 100644 --- a/xmloff/source/draw/sdpropls.hxx +++ b/xmloff/source/draw/sdpropls.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. @@ -332,3 +333,5 @@ public: }; #endif // _SDPROPLS_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index 5accd0d2ba64..29db93ca8226 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.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. @@ -68,9 +69,7 @@ #include <com/sun/star/beans/XPropertyState.hpp> #include "xexptran.hxx" -#ifndef _CPPUHELPER_IMPLBASE1_HXX #include <cppuhelper/implbase1.hxx> -#endif #include <comphelper/extract.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> #include "PropertySetMerger.hxx" @@ -79,7 +78,6 @@ #include "xmloff/VisAreaExport.hxx" #include "XMLNumberStylesExport.hxx" -#include <tools/list.hxx> #include <tools/string.hxx> #include "animationexport.hxx" @@ -205,8 +203,6 @@ void ImpXMLEXPPageMasterInfo::SetName(const OUString& rStr) msName = rStr; } -DECLARE_LIST(ImpXMLEXPPageMasterList, ImpXMLEXPPageMasterInfo*) - ////////////////////////////////////////////////////////////////////////////// #define IMP_AUTOLAYOUT_INFO_MAX (35L) @@ -406,8 +402,6 @@ ImpXMLAutoLayoutInfo::ImpXMLAutoLayoutInfo(sal_uInt16 nTyp, ImpXMLEXPPageMasterI maPresRect.SetSize(aLayoutSize); } -DECLARE_LIST(ImpXMLAutoLayoutInfoList, ImpXMLAutoLayoutInfo*) - ////////////////////////////////////////////////////////////////////////////// // #110680# @@ -419,11 +413,11 @@ SdXMLExport::SdXMLExport( mnDocDrawPageCount(0L), mnShapeStyleInfoIndex(0L), mnObjectCount(0L), - mpPageMasterInfoList(new ImpXMLEXPPageMasterList(1, 4, 4)), - mpPageMasterUsageList(new ImpXMLEXPPageMasterList(1, 4, 4)), - mpNotesPageMasterUsageList(new ImpXMLEXPPageMasterList(1, 4, 4)), + mpPageMasterInfoList(new ImpXMLEXPPageMasterList()), + mpPageMasterUsageList(new ImpXMLEXPPageMasterList()), + mpNotesPageMasterUsageList(new ImpXMLEXPPageMasterList()), mpHandoutPageMaster(NULL), - mpAutoLayoutInfoList(new ImpXMLAutoLayoutInfoList(1, 4, 4)), + mpAutoLayoutInfoList(new ImpXMLAutoLayoutInfoList()), mpSdPropHdlFactory(0L), mpPropertySetMapper(0L), mpPresPagePropsMapper(0L), @@ -692,7 +686,7 @@ sal_uInt32 SdXMLExport::ImpRecursiveObjectCount(Reference< drawing::XShapes > xS ////////////////////////////////////////////////////////////////////////////// -__EXPORT SdXMLExport::~SdXMLExport() +SdXMLExport::~SdXMLExport() { // cleanup factory, decrease refcount. Should lead to destruction. if(mpSdPropHdlFactory) @@ -716,29 +710,35 @@ __EXPORT SdXMLExport::~SdXMLExport() } // clear evtl. temporary page master infos - if(mpPageMasterInfoList) - { - while(mpPageMasterInfoList->Count()) - delete mpPageMasterInfoList->Remove(mpPageMasterInfoList->Count() - 1L); - delete mpPageMasterInfoList; - mpPageMasterInfoList = 0L; - } if(mpPageMasterUsageList) { + // note: all items in this list are also in mpPageMasterInfoList delete mpPageMasterUsageList; mpPageMasterUsageList = 0L; } + if(mpNotesPageMasterUsageList) { + // note: all items in this list are also in mpPageMasterInfoList delete mpNotesPageMasterUsageList; mpNotesPageMasterUsageList = 0L; } + if(mpPageMasterInfoList) + { + for ( size_t i = 0, n = mpPageMasterInfoList->size(); i < n; ++i ) + delete mpPageMasterInfoList->at( i ); + mpPageMasterInfoList->clear(); + delete mpPageMasterInfoList; + mpPageMasterInfoList = 0L; + } + // clear auto-layout infos if(mpAutoLayoutInfoList) { - while(mpAutoLayoutInfoList->Count()) - delete mpAutoLayoutInfoList->Remove(mpAutoLayoutInfoList->Count() - 1L); + for ( size_t i = 0, n = mpAutoLayoutInfoList->size(); i < n; ++i ) + delete mpAutoLayoutInfoList->at( i ); + mpAutoLayoutInfoList->clear(); delete mpAutoLayoutInfoList; mpAutoLayoutInfoList = 0L; } @@ -806,35 +806,6 @@ void SAL_CALL ImpDefaultMapper::removeVetoableChangeListener( const OUString&, c ////////////////////////////////////////////////////////////////////////////// -/* moved to shapeexport.cxx -void SdXMLExport::ImpWriteObjGraphicStyleInfos() -{ - XMLStyleExport aStEx(*this, OUString(), GetAutoStylePool().get()); - const UniReference< SvXMLExportPropertyMapper > aMapperRef( GetPropertySetMapper() ); - - // write graphic family default style - Reference< lang::XMultiServiceFactory > xFact( GetModel(), UNO_QUERY ); - if( xFact.is() ) - { - try - { - Reference< beans::XPropertySet > xDefaults( xFact->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.Defaults") ) ), UNO_QUERY ); - if( xDefaults.is() ) - { - aStEx.exportDefaultStyle( xDefaults, OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_GRAPHICS_NAME)), aMapperRef ); - - // write graphic family styles - aStEx.exportStyleFamily(XML_STYLE_FAMILY_SD_GRAPHICS_NAME, OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_GRAPHICS_NAME)), aMapperRef, sal_False, XML_STYLE_FAMILY_SD_GRAPHICS_ID); - } - } - catch( lang::ServiceNotRegisteredException& ) - { - } - } -} -*/ -////////////////////////////////////////////////////////////////////////////// - void SdXMLExport::ImpPrepAutoLayoutInfos() { if(IsImpress()) @@ -905,21 +876,21 @@ sal_Bool SdXMLExport::ImpPrepAutoLayoutInfo(const Reference<XDrawPage>& xPage, O ImpXMLAutoLayoutInfo* pNew = new ImpXMLAutoLayoutInfo(nType, pInfo); sal_Bool bDidExist(sal_False); - for(sal_uInt32 nCnt = 0L; !bDidExist && nCnt < mpAutoLayoutInfoList->Count(); nCnt++) + for( size_t nCnt = 0; !bDidExist && nCnt < mpAutoLayoutInfoList->size(); nCnt++) { - if(*mpAutoLayoutInfoList->GetObject(nCnt) == *pNew) + if( *mpAutoLayoutInfoList->at( nCnt ) == *pNew) { delete pNew; - pNew = mpAutoLayoutInfoList->GetObject(nCnt); + pNew = mpAutoLayoutInfoList->at( nCnt ); bDidExist = sal_True; } } if(!bDidExist) { - mpAutoLayoutInfoList->Insert(pNew, LIST_APPEND); + mpAutoLayoutInfoList->push_back( pNew ); OUString sNewName = OUString(RTL_CONSTASCII_USTRINGPARAM("AL")); - sNewName += OUString::valueOf(sal_Int32(mpAutoLayoutInfoList->Count() - 1)); + sNewName += OUString::valueOf(sal_Int32( mpAutoLayoutInfoList->size() - 1 )); sNewName += OUString(RTL_CONSTASCII_USTRINGPARAM("T")); sNewName += OUString::valueOf(sal_Int32(nType)); pNew->SetLayoutName(sNewName); @@ -938,11 +909,11 @@ sal_Bool SdXMLExport::ImpPrepAutoLayoutInfo(const Reference<XDrawPage>& xPage, O void SdXMLExport::ImpWriteAutoLayoutInfos() { - if(mpAutoLayoutInfoList->Count()) + if( !mpAutoLayoutInfoList->empty() ) { - for(sal_uInt32 nCnt = 0L; nCnt < mpAutoLayoutInfoList->Count(); nCnt++) + for(size_t nCnt = 0; nCnt < mpAutoLayoutInfoList->size(); nCnt++) { - ImpXMLAutoLayoutInfo* pInfo = mpAutoLayoutInfoList->GetObject(nCnt); + ImpXMLAutoLayoutInfo* pInfo = mpAutoLayoutInfoList->at( nCnt ); if(pInfo) { // prepare presentation-page layout attributes, style-name @@ -1313,7 +1284,7 @@ void SdXMLExport::ImpWriteAutoLayoutInfos() } default: { - DBG_ERROR("XMLEXP: unknown autolayout export"); + OSL_FAIL("XMLEXP: unknown autolayout export"); break; } } @@ -1380,19 +1351,20 @@ ImpXMLEXPPageMasterInfo* SdXMLExport::ImpGetOrCreatePageMasterInfo( Reference< X ImpXMLEXPPageMasterInfo* pNewInfo = new ImpXMLEXPPageMasterInfo(*this, xMasterPage); // compare with prev page-master infos - for(sal_uInt32 a = 0; !bDoesExist && a < mpPageMasterInfoList->Count(); a++) + for( size_t a = 0; !bDoesExist && a < mpPageMasterInfoList->size(); a++) { - if(mpPageMasterInfoList->GetObject(a) - && *mpPageMasterInfoList->GetObject(a) == *pNewInfo) + if ( mpPageMasterInfoList->at(a) + && *mpPageMasterInfoList->at(a) == *pNewInfo + ) { delete pNewInfo; - pNewInfo = mpPageMasterInfoList->GetObject(a); + pNewInfo = mpPageMasterInfoList->at(a); bDoesExist = true; } } // add entry when not found same page-master infos if(!bDoesExist) - mpPageMasterInfoList->Insert(pNewInfo, LIST_APPEND); + mpPageMasterInfoList->push_back( pNewInfo ); return pNewInfo; } @@ -1424,7 +1396,7 @@ void SdXMLExport::ImpPrepPageMasterInfos() if(xMasterPage.is()) pNewInfo = ImpGetOrCreatePageMasterInfo(xMasterPage); - mpPageMasterUsageList->Insert(pNewInfo, LIST_APPEND); + mpPageMasterUsageList->push_back( pNewInfo ); // look for page master of handout page if(IsImpress()) @@ -1439,7 +1411,7 @@ void SdXMLExport::ImpPrepPageMasterInfos() pNewInfo = ImpGetOrCreatePageMasterInfo(xNotesPage); } } - mpNotesPageMasterUsageList->Insert( pNewInfo, LIST_APPEND ); + mpNotesPageMasterUsageList->push_back( pNewInfo ); } } } @@ -1450,9 +1422,9 @@ void SdXMLExport::ImpPrepPageMasterInfos() void SdXMLExport::ImpWritePageMasterInfos() { // write created page-masters, create names for these - for(sal_uInt32 nCnt = 0L; nCnt < mpPageMasterInfoList->Count(); nCnt++) + for( size_t nCnt = 0; nCnt < mpPageMasterInfoList->size(); nCnt++) { - ImpXMLEXPPageMasterInfo* pInfo = mpPageMasterInfoList->GetObject(nCnt); + ImpXMLEXPPageMasterInfo* pInfo = mpPageMasterInfoList->at(nCnt); if(pInfo) { // create name @@ -1511,11 +1483,11 @@ void SdXMLExport::ImpWritePageMasterInfos() ImpXMLEXPPageMasterInfo* SdXMLExport::ImpGetPageMasterInfoByName(const OUString& rName) { - if(rName.getLength() && mpPageMasterInfoList->Count()) + if(rName.getLength() && !mpPageMasterInfoList->empty()) { - for(sal_uInt32 nCnt = 0L; nCnt < mpPageMasterInfoList->Count(); nCnt++) + for( size_t nCnt = 0; nCnt < mpPageMasterInfoList->size(); nCnt++) { - ImpXMLEXPPageMasterInfo* pInfo = mpPageMasterInfoList->GetObject(nCnt); + ImpXMLEXPPageMasterInfo* pInfo = mpPageMasterInfoList->at(nCnt); if(pInfo) { if(pInfo->GetMasterPageName().getLength() && rName.equals(pInfo->GetMasterPageName())) @@ -1561,7 +1533,7 @@ static OUString findOrAppendImpl( std::vector< OUString >& rVector, const OUStri // search rVector if there is already a string that equals rText std::vector< OUString >::iterator aIter; sal_Int32 nIndex; - for( nIndex = 1, aIter = rVector.begin(); aIter != rVector.end(); aIter++, nIndex++ ) + for( nIndex = 1, aIter = rVector.begin(); aIter != rVector.end(); ++aIter, ++nIndex ) { if( (*aIter) == rText ) break; @@ -1583,7 +1555,7 @@ static OUString findOrAppendImpl( std::vector< DateTimeDeclImpl >& rVector, cons // search rVector if there is already a DateTimeDeclImpl with rText,bFixed and nFormat std::vector< DateTimeDeclImpl >::iterator aIter; sal_Int32 nIndex; - for( nIndex = 1, aIter = rVector.begin(); aIter != rVector.end(); aIter++, nIndex++ ) + for( nIndex = 1, aIter = rVector.begin(); aIter != rVector.end(); ++aIter, ++nIndex ) { const DateTimeDeclImpl& rDecl = (*aIter); if( (rDecl.mbFixed == bFixed ) && @@ -1661,7 +1633,7 @@ HeaderFooterPageSettingsImpl SdXMLExport::ImpPrepDrawPageHeaderFooterDecls( cons catch( Exception& e ) { (void)e; - DBG_ERROR( "SdXMLExport::ImpPrepDrawPageHeaderFooterDecls(), unexpected exception cought!" ); + OSL_FAIL( "SdXMLExport::ImpPrepDrawPageHeaderFooterDecls(), unexpected exception cought!" ); } return aSettings; @@ -1679,7 +1651,7 @@ void SdXMLExport::ImpWriteHeaderFooterDecls() const OUString aPrefix( OUString::createFromAscii( gpStrHeaderTextPrefix ) ); std::vector< OUString >::iterator aIter; sal_Int32 nIndex; - for( nIndex = 1, aIter = maHeaderDeclsVector.begin(); aIter != maHeaderDeclsVector.end(); aIter++, nIndex++ ) + for( nIndex = 1, aIter = maHeaderDeclsVector.begin(); aIter != maHeaderDeclsVector.end(); ++aIter, ++nIndex ) { sBuffer.append( aPrefix ); sBuffer.append( nIndex ); @@ -1696,7 +1668,7 @@ void SdXMLExport::ImpWriteHeaderFooterDecls() const OUString aPrefix( OUString::createFromAscii( gpStrFooterTextPrefix ) ); std::vector< OUString >::iterator aIter; sal_Int32 nIndex; - for( nIndex = 1, aIter = maFooterDeclsVector.begin(); aIter != maFooterDeclsVector.end(); aIter++, nIndex++ ) + for( nIndex = 1, aIter = maFooterDeclsVector.begin(); aIter != maFooterDeclsVector.end(); ++aIter, ++nIndex ) { sBuffer.append( aPrefix ); sBuffer.append( nIndex ); @@ -1713,7 +1685,7 @@ void SdXMLExport::ImpWriteHeaderFooterDecls() const OUString aPrefix( OUString::createFromAscii( gpStrDateTimeTextPrefix ) ); std::vector< DateTimeDeclImpl >::iterator aIter; sal_Int32 nIndex; - for( nIndex = 1, aIter = maDateTimeDeclsVector.begin(); aIter != maDateTimeDeclsVector.end(); aIter++, nIndex++ ) + for( nIndex = 1, aIter = maDateTimeDeclsVector.begin(); aIter != maDateTimeDeclsVector.end(); ++aIter, ++nIndex ) { const DateTimeDeclImpl& rDecl = (*aIter); @@ -1882,7 +1854,7 @@ void SdXMLExport::SetProgress(sal_Int32 nProg) void SdXMLExport::_ExportMeta() { uno::Sequence<beans::NamedValue> stats(1); - stats[0] = beans::NamedValue(::rtl::OUString::createFromAscii("ObjectCount"), + stats[0] = beans::NamedValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ObjectCount" )), uno::makeAny(mnObjectCount)); // update document statistics at the model @@ -1975,7 +1947,7 @@ void SdXMLExport::_ExportContent() } catch( Exception& ) { - DBG_ERROR(" no \"BookmarkURL\" property at page?" ); + OSL_FAIL(" no \"BookmarkURL\" property at page?" ); } } @@ -2266,7 +2238,7 @@ void SdXMLExport::exportPresentationSettings() } catch( uno::Exception ) { - DBG_ERROR( "uno::Exception while exporting <presentation:settings>" ); + OSL_FAIL( "uno::Exception while exporting <presentation:settings>" ); } } @@ -2574,7 +2546,7 @@ void SdXMLExport::_ExportMasterStyles() sMasterPageName ); } - ImpXMLEXPPageMasterInfo* pInfo = mpPageMasterUsageList->GetObject(nMPageId); + ImpXMLEXPPageMasterInfo* pInfo = mpPageMasterUsageList->at( nMPageId ); if(pInfo) { OUString sString = pInfo->GetName(); @@ -2609,7 +2581,7 @@ void SdXMLExport::_ExportMasterStyles() Reference< drawing::XShapes > xShapes(xNotesPage, UNO_QUERY); if(xShapes.is()) { - ImpXMLEXPPageMasterInfo* pMasterInfo = mpNotesPageMasterUsageList->GetObject(nMPageId); + ImpXMLEXPPageMasterInfo* pMasterInfo = mpNotesPageMasterUsageList->at( nMPageId ); if(pMasterInfo) { OUString sString = pMasterInfo->GetName(); @@ -2647,7 +2619,7 @@ void SdXMLExport::exportFormsElement( Reference< XDrawPage > xDrawPage ) if(! GetFormExport()->seekPage( xDrawPage ) ) { - DBG_ERROR( "OFormLayerXMLExport::seekPage failed!" ); + OSL_FAIL( "OFormLayerXMLExport::seekPage failed!" ); } } } @@ -2658,18 +2630,12 @@ void SdXMLExport::GetViewSettings(uno::Sequence<beans::PropertyValue>& rProps) beans::PropertyValue* pProps = rProps.getArray(); if(pProps) { -// SvXMLElementExport aViewSettingsElem(*this, XML_NAMESPACE_DRAW, XML_VIEW_SETTINGS, sal_True, sal_True); - Reference< beans::XPropertySet > xPropSet( GetModel(), UNO_QUERY ); if( !xPropSet.is() ) return; awt::Rectangle aVisArea; xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "VisibleArea" ) ) ) >>= aVisArea; -/* - sal_Int16 nMapUnit; - xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "MapUnit" ) ) ) >>= nMapUnit; -*/ sal_uInt16 i = 0; pProps[i].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VisibleAreaTop")); @@ -2808,7 +2774,7 @@ void SdXMLExport::collectAnnotationAutoStyles( const Reference<XDrawPage>& xDraw } catch( Exception& ) { - DBG_ERROR("SdXMLExport::collectAnnotationAutoStyles(), exception caught during export of annotation auto styles"); + OSL_FAIL("SdXMLExport::collectAnnotationAutoStyles(), exception caught during export of annotation auto styles"); } } @@ -2875,7 +2841,7 @@ void SdXMLExport::exportAnnotations( const Reference<XDrawPage>& xDrawPage ) } catch( Exception& ) { - DBG_ERROR("SdXMLExport::exportAnnotations(), exception caught during export of annotations"); + OSL_FAIL("SdXMLExport::exportAnnotations(), exception caught during export of annotations"); } } @@ -2991,3 +2957,5 @@ OUString SAL_CALL SdXMLExport::getImplementationName() throw( uno::RuntimeExcept } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/sdxmlexp_impl.hxx b/xmloff/source/draw/sdxmlexp_impl.hxx index 0e6bfc5bcd20..252c3b267270 100644 --- a/xmloff/source/draw/sdxmlexp_impl.hxx +++ b/xmloff/source/draw/sdxmlexp_impl.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. @@ -30,13 +31,14 @@ #include <xmloff/xmlexp.hxx> - #include <com/sun/star/frame/XModel.hpp> #include <com/sun/star/task/XStatusIndicator.hpp> #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/drawing/XDrawPage.hpp> #include <comphelper/stl_types.hxx> +#include <vector> + ////////////////////////////////////////////////////////////////////////////// class SvXMLUnitConverter; @@ -48,16 +50,18 @@ class OUStringsSort_Impl; class Rectangle; class ImpPresPageDrawStylePropMapper; -class ImpXMLEXPPageMasterList; class ImpXMLEXPPageMasterInfo; class ImpXMLDrawPageInfoList; -class ImpXMLAutoLayoutInfoList; +class ImpXMLAutoLayoutInfo; class SvXMLAutoStylePoolP; class XMLSdPropHdlFactory; class ImpXMLShapeStyleInfo; class XMLShapeExportPropertyMapper; class XMLPageExportPropertyMapper; +typedef ::std::vector< ImpXMLEXPPageMasterInfo* > ImpXMLEXPPageMasterList; +typedef ::std::vector< ImpXMLAutoLayoutInfo* > ImpXMLAutoLayoutInfoList; + ////////////////////////////////////////////////////////////////////////////// enum XmlPlaceholder @@ -226,3 +230,4 @@ public: #endif // _SDXMLEXP_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx index 7b69609fafe9..2d6f09187b6a 100644 --- a/xmloff/source/draw/sdxmlimp.cxx +++ b/xmloff/source/draw/sdxmlimp.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. @@ -461,15 +462,6 @@ void SAL_CALL SdXMLImport::initialize( const uno::Sequence< uno::Any >& aArgumen SdXMLImport::~SdXMLImport() throw () { -// #80365# removed ending of progress bar here, this was an old implementation -// and maybe removed on demand -// // stop progress view -// if(mxStatusIndicator.is()) -// { -// mxStatusIndicator->end(); -// mxStatusIndicator->reset(); -// } - // Styles or AutoStyles context? if(mpMasterStylesContext) mpMasterStylesContext->ReleaseRef(); @@ -512,7 +504,7 @@ const SvXMLTokenMap& SdXMLImport::GetDocElemTokenMap() { if(!mpDocElemTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry aDocElemTokenMap[] = + static SvXMLTokenMapEntry aDocElemTokenMap[] = { { XML_NAMESPACE_OFFICE, XML_FONT_FACE_DECLS, XML_TOK_DOC_FONTDECLS }, { XML_NAMESPACE_OFFICE, XML_STYLES, XML_TOK_DOC_STYLES }, @@ -537,7 +529,7 @@ const SvXMLTokenMap& SdXMLImport::GetBodyElemTokenMap() { if(!mpBodyElemTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry aBodyElemTokenMap[] = + static SvXMLTokenMapEntry aBodyElemTokenMap[] = { { XML_NAMESPACE_DRAW, XML_PAGE, XML_TOK_BODY_PAGE }, { XML_NAMESPACE_PRESENTATION, XML_SETTINGS, XML_TOK_BODY_SETTINGS }, @@ -560,7 +552,7 @@ const SvXMLTokenMap& SdXMLImport::GetStylesElemTokenMap() { if(!mpStylesElemTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry aStylesElemTokenMap[] = + static SvXMLTokenMapEntry aStylesElemTokenMap[] = { { XML_NAMESPACE_STYLE, XML_PAGE_LAYOUT, XML_TOK_STYLES_PAGE_MASTER }, { XML_NAMESPACE_STYLE, XML_PRESENTATION_PAGE_LAYOUT, XML_TOK_STYLES_PRESENTATION_PAGE_LAYOUT }, @@ -580,7 +572,7 @@ const SvXMLTokenMap& SdXMLImport::GetMasterPageElemTokenMap() { if(!mpMasterPageElemTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry aMasterPageElemTokenMap[] = + static SvXMLTokenMapEntry aMasterPageElemTokenMap[] = { { XML_NAMESPACE_STYLE, XML_STYLE, XML_TOK_MASTERPAGE_STYLE }, { XML_NAMESPACE_PRESENTATION, XML_NOTES, XML_TOK_MASTERPAGE_NOTES }, @@ -599,7 +591,7 @@ const SvXMLTokenMap& SdXMLImport::GetMasterPageAttrTokenMap() { if(!mpMasterPageAttrTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry aMasterPageAttrTokenMap[] = + static SvXMLTokenMapEntry aMasterPageAttrTokenMap[] = { { XML_NAMESPACE_STYLE, XML_NAME, XML_TOK_MASTERPAGE_NAME }, { XML_NAMESPACE_STYLE, XML_DISPLAY_NAME, XML_TOK_MASTERPAGE_DISPLAY_NAME }, @@ -624,7 +616,7 @@ const SvXMLTokenMap& SdXMLImport::GetPageMasterAttrTokenMap() { if(!mpPageMasterAttrTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry aPageMasterAttrTokenMap[] = + static SvXMLTokenMapEntry aPageMasterAttrTokenMap[] = { { XML_NAMESPACE_STYLE, XML_NAME, XML_TOK_PAGEMASTER_NAME }, XML_TOKEN_MAP_END @@ -642,7 +634,7 @@ const SvXMLTokenMap& SdXMLImport::GetPageMasterStyleAttrTokenMap() { if(!mpPageMasterStyleAttrTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry aPageMasterStyleAttrTokenMap[] = + static SvXMLTokenMapEntry aPageMasterStyleAttrTokenMap[] = { { XML_NAMESPACE_FO, XML_MARGIN_TOP, XML_TOK_PAGEMASTERSTYLE_MARGIN_TOP }, { XML_NAMESPACE_FO, XML_MARGIN_BOTTOM, XML_TOK_PAGEMASTERSTYLE_MARGIN_BOTTOM }, @@ -666,7 +658,7 @@ const SvXMLTokenMap& SdXMLImport::GetDrawPageAttrTokenMap() { if(!mpDrawPageAttrTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry aDrawPageAttrTokenMap[] = + static SvXMLTokenMapEntry aDrawPageAttrTokenMap[] = { { XML_NAMESPACE_DRAW, XML_NAME, XML_TOK_DRAWPAGE_NAME }, { XML_NAMESPACE_DRAW, XML_STYLE_NAME, XML_TOK_DRAWPAGE_STYLE_NAME }, @@ -694,7 +686,7 @@ const SvXMLTokenMap& SdXMLImport::GetDrawPageElemTokenMap() { if(!mpDrawPageElemTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry aDrawPageElemTokenMap[] = + static SvXMLTokenMapEntry aDrawPageElemTokenMap[] = { { XML_NAMESPACE_PRESENTATION, XML_NOTES, XML_TOK_DRAWPAGE_NOTES }, { XML_NAMESPACE_ANIMATION, XML_PAR, XML_TOK_DRAWPAGE_PAR }, @@ -714,7 +706,7 @@ const SvXMLTokenMap& SdXMLImport::GetPresentationPlaceholderAttrTokenMap() { if(!mpPresentationPlaceholderAttrTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry aPresentationPlaceholderAttrTokenMap[] = + static SvXMLTokenMapEntry aPresentationPlaceholderAttrTokenMap[] = { { XML_NAMESPACE_PRESENTATION, XML_OBJECT, XML_TOK_PRESENTATIONPLACEHOLDER_OBJECTNAME }, { XML_NAMESPACE_SVG, XML_X, XML_TOK_PRESENTATIONPLACEHOLDER_X }, @@ -750,8 +742,8 @@ SvXMLImportContext *SdXMLImport::CreateContext(sal_uInt16 nPrefix, } else if ( (XML_NAMESPACE_OFFICE == nPrefix) && ( IsXMLToken(rLocalName, XML_DOCUMENT)) ) { uno::Reference<xml::sax::XDocumentHandler> xDocBuilder( - mxServiceFactory->createInstance(::rtl::OUString::createFromAscii( - "com.sun.star.xml.dom.SAXDocumentBuilder")), + mxServiceFactory->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.xml.dom.SAXDocumentBuilder"))), uno::UNO_QUERY_THROW); uno::Reference<document::XDocumentPropertiesSupplier> xDPS( GetModel(), uno::UNO_QUERY_THROW); @@ -775,8 +767,8 @@ SvXMLImportContext *SdXMLImport::CreateMetaContext(const OUString& rLocalName, if (getImportFlags() & IMPORT_META) { uno::Reference<xml::sax::XDocumentHandler> xDocBuilder( - mxServiceFactory->createInstance(::rtl::OUString::createFromAscii( - "com.sun.star.xml.dom.SAXDocumentBuilder")), + mxServiceFactory->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.xml.dom.SAXDocumentBuilder"))), uno::UNO_QUERY_THROW); uno::Reference<document::XDocumentPropertiesSupplier> xDPS( GetModel(), uno::UNO_QUERY_THROW); @@ -987,7 +979,7 @@ void SdXMLImport::SetStatistics( if (i_rStats[i].Value >>= val) { nCount = val; } else { - DBG_ERROR("SdXMLImport::SetStatistics: invalid entry"); + OSL_FAIL("SdXMLImport::SetStatistics: invalid entry"); } } } @@ -1108,3 +1100,5 @@ void SdXMLImport::AddDateTimeDecl( const ::rtl::OUString& rName, const ::rtl::OU } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/sdxmlimp_impl.hxx b/xmloff/source/draw/sdxmlimp_impl.hxx index d1cd0df80563..17cabd288616 100644 --- a/xmloff/source/draw/sdxmlimp_impl.hxx +++ b/xmloff/source/draw/sdxmlimp_impl.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. @@ -34,9 +35,7 @@ #include <xmloff/xmltkmap.hxx> #include <com/sun/star/container/XNameAccess.hpp> -#ifndef __SGI_STL_VECTOR #include <vector> -#endif #include <xmloff/xmlimp.hxx> ////////////////////////////////////////////////////////////////////////////// @@ -337,3 +336,5 @@ public: }; #endif // _SDXMLIMP_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index a8f09f2d99bd..c3f66197a403 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.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,11 +91,6 @@ XMLShapeExport::XMLShapeExport(SvXMLExport& rExp, msStartShape( RTL_CONSTASCII_USTRINGPARAM("StartShape") ), msEndShape( RTL_CONSTASCII_USTRINGPARAM("EndShape") ), msOnClick( RTL_CONSTASCII_USTRINGPARAM("OnClick") ), -#ifdef ISSUE66550_HLINK_FOR_SHAPES - msOnAction( RTL_CONSTASCII_USTRINGPARAM("OnAction") ), - msAction( RTL_CONSTASCII_USTRINGPARAM("Action") ), - msURL( RTL_CONSTASCII_USTRINGPARAM("URL") ), -#endif msEventType( RTL_CONSTASCII_USTRINGPARAM("EventType") ), msPresentation( RTL_CONSTASCII_USTRINGPARAM("Presentation") ), msMacroName( RTL_CONSTASCII_USTRINGPARAM("MacroName") ), @@ -168,19 +164,15 @@ uno::Reference< drawing::XShape > XMLShapeExport::checkForCustomShapeReplacement aEngine = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.EnhancedCustomShapeEngine" ) ); uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() ); - /* - uno::Reference< drawing::XShape > aXShape = GetXShapeForSdrObject( (SdrObjCustomShape*)pCustomShape ); - if ( !aXShape.is() ) - aXShape = new SvxCustomShape( (SdrObjCustomShape*)pCustomShape ); - */ + if ( aEngine.getLength() && xFactory.is() ) { uno::Sequence< uno::Any > aArgument( 1 ); uno::Sequence< beans::PropertyValue > aPropValues( 2 ); - aPropValues[ 0 ].Name = rtl::OUString::createFromAscii( "CustomShape" ); + aPropValues[ 0 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "CustomShape" )); aPropValues[ 0 ].Value <<= xShape; sal_Bool bForceGroupWithText = sal_True; - aPropValues[ 1 ].Name = rtl::OUString::createFromAscii( "ForceGroupWithText" ); + aPropValues[ 1 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ForceGroupWithText" )); aPropValues[ 1 ].Value <<= bForceGroupWithText; aArgument[ 0 ] <<= aPropValues; uno::Reference< uno::XInterface > xInterface( xFactory->createInstanceWithArguments( aEngine, aArgument ) ); @@ -203,7 +195,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap { if( maCurrentShapesIter == maShapesInfos.end() ) { - DBG_ERROR( "XMLShapeExport::collectShapeAutoStyles(): no call to seekShapes()!" ); + OSL_FAIL( "XMLShapeExport::collectShapeAutoStyles(): no call to seekShapes()!" ); return; } sal_Int32 nZIndex = 0; @@ -215,7 +207,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap if( (sal_Int32)aShapeInfoVector.size() <= nZIndex ) { - DBG_ERROR( "XMLShapeExport::collectShapeAutoStyles(): no shape info allocated for a given shape" ); + OSL_FAIL( "XMLShapeExport::collectShapeAutoStyles(): no shape info allocated for a given shape" ); return; } @@ -231,7 +223,6 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap ImpCalcShapeType(xShape, aShapeInfo.meShapeType); const bool bObjSupportsText = -// aShapeInfo.meShapeType != XmlShapeTypeDrawControlShape && aShapeInfo.meShapeType != XmlShapeTypeDrawChartShape && aShapeInfo.meShapeType != XmlShapeTypePresChartShape && aShapeInfo.meShapeType != XmlShapeTypeDrawOLE2Shape && @@ -364,7 +355,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap { if( aIter->mnIndex != -1 ) nCount++; - aIter++; + ++aIter; } } @@ -406,7 +397,6 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap // * defaults for style properties are not written, but we need to write the "left", // because we need to distiguish this "left" from the case where not align attribute // is present which means "void" - // 102407 - 2002-11-01 - fs@openoffice.org static const ::rtl::OUString s_sParaAdjustPropertyName( RTL_CONSTASCII_USTRINGPARAM( "ParaAdjust" ) ); if ( xPropSetInfo->hasPropertyByName( s_sParaAdjustPropertyName ) && ( beans::PropertyState_DEFAULT_VALUE == xPropState->getPropertyState( s_sParaAdjustPropertyName ) ) @@ -433,7 +423,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap { if( aIter->mnIndex != -1 ) nCount++; - aIter++; + ++aIter; } if( nCount ) @@ -483,7 +473,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap } catch( uno::Exception& ) { - DBG_ERROR( "XMLShapeExport::collectShapeAutoStyles(): exception caught while collection auto styles for a table!" ); + OSL_FAIL( "XMLShapeExport::collectShapeAutoStyles(): exception caught while collection auto styles for a table!" ); } break; } @@ -511,7 +501,6 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap /////////////////////////////////////////////////////////////////////// -// --> OD 2008-05-08 #refactorlists# namespace { class NewTextListsHelper @@ -540,7 +529,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape { if( maCurrentShapesIter == maShapesInfos.end() ) { - DBG_ERROR( "XMLShapeExport::exportShape(): no auto styles where collected before export" ); + OSL_FAIL( "XMLShapeExport::exportShape(): no auto styles where collected before export" ); return; } sal_Int32 nZIndex = 0; @@ -573,7 +562,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape } catch( uno::Exception& ) { - DBG_ERROR("XMLShapeExport::exportShape(): exception during hyperlink export"); + OSL_FAIL("XMLShapeExport::exportShape(): exception during hyperlink export"); } @@ -584,13 +573,11 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape if( (sal_Int32)aShapeInfoVector.size() <= nZIndex ) { - DBG_ERROR( "XMLShapeExport::exportShape(): no shape info collected for a given shape" ); + OSL_FAIL( "XMLShapeExport::exportShape(): no shape info collected for a given shape" ); return; } - // --> OD 2008-05-08 #refactorlists# NewTextListsHelper aNewTextListsHelper( mrExport ); - // <-- const ImplXMLShapeExportInfo& aShapeInfo = aShapeInfoVector[nZIndex]; @@ -623,16 +610,13 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape if( mxAnimationsExporter.is() ) mxAnimationsExporter->collect( xShape, mrExport ); - // ------------------------------- - // export shapes name if he has one - // --> OD 2006-03-13 #i51726# - // Export of the shape name for text documents only if the OpenDocument - // file format is written - exceptions are group shapes. - // Note: Writer documents in OpenOffice.org file format doesn't contain - // any names for shapes, except for group shapes. - // ------------------------------- + /* Export shapes name if he has one (#i51726#) + Export of the shape name for text documents only if the OpenDocument + file format is written - exceptions are group shapes. + Note: Writer documents in OpenOffice.org file format doesn't contain + any names for shapes, except for group shapes. + */ { - // --> OD 2006-03-10 #i51726# if ( ( GetExport().GetModelType() != SvtModuleOptions::E_WRITER && GetExport().GetModelType() != SvtModuleOptions::E_WRITERWEB && GetExport().GetModelType() != SvtModuleOptions::E_WRITERGLOBAL ) || @@ -649,7 +633,6 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_NAME, aName ); } } - // <-- } // ------------------ @@ -696,13 +679,13 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape { uno::Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY ); OUString aLayerName; - xProps->getPropertyValue( OUString::createFromAscii( "LayerName" ) ) >>= aLayerName; + xProps->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( "LayerName" )) ) >>= aLayerName; mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_LAYER, aLayerName ); } catch( uno::Exception e ) { - DBG_ERROR( "could not export layer name for shape!" ); + OSL_FAIL( "could not export layer name for shape!" ); } } } @@ -736,7 +719,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape } catch( uno::Exception& ) { - DBG_ERROR( "XMLShapeExport::exportShape(), exception caught!" ); + OSL_FAIL( "XMLShapeExport::exportShape(), exception caught!" ); } } @@ -916,7 +899,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape default: { // this should never happen and is an error - DBG_ERROR("XMLEXP: WriteShape: unknown or unexpected type of shape in export!"); + OSL_FAIL("XMLEXP: WriteShape: unknown or unexpected type of shape in export!"); break; } } @@ -1013,7 +996,6 @@ void XMLShapeExport::exportAutoStyles() // export all autostyle infos // ...for graphic -// if(IsFamilyGraphicUsed()) { GetExport().GetAutoStylePool()->exportXML( XML_STYLE_FAMILY_SD_GRAPHICS_ID @@ -1024,7 +1006,6 @@ void XMLShapeExport::exportAutoStyles() } // ...for presentation -// if(IsFamilyPresentationUsed()) { GetExport().GetAutoStylePool()->exportXML( XML_STYLE_FAMILY_SD_PRESENTATION_ID @@ -1177,7 +1158,7 @@ void XMLShapeExport::ImpCalcShapeType(const uno::Reference< drawing::XShape >& x } catch( uno::Exception& ) { - DBG_ERROR( "XMLShapeExport::ImpCalcShapeType(), expected ole shape to have the CLSID property?" ); + OSL_FAIL( "XMLShapeExport::ImpCalcShapeType(), expected ole shape to have the CLSID property?" ); } } else if(aType.EqualsAscii("Chart", 26, 5)) { eShapeType = XmlShapeTypePresChartShape; } @@ -1301,3 +1282,5 @@ const rtl::Reference< XMLTableExport >& XMLShapeExport::GetShapeTableExport() return mxShapeTableExport; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/shapeexport2.cxx b/xmloff/source/draw/shapeexport2.cxx index 7c6268571a9c..b50c03db813a 100644 --- a/xmloff/source/draw/shapeexport2.cxx +++ b/xmloff/source/draw/shapeexport2.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,7 @@ #include <com/sun/star/media/ZoomLevel.hpp> #include "anim.hxx" -#ifndef _XMLOFF_SHAPEEXPORT_HXX #include <xmloff/shapeexport.hxx> -#endif #include "sdpropls.hxx" #include <tools/debug.hxx> #include <tools/urlobj.hxx> @@ -89,16 +88,17 @@ void XMLShapeExport::ImpExportNewTrans(const uno::Reference< beans::XPropertySet void XMLShapeExport::ImpExportNewTrans_GetB2DHomMatrix(::basegfx::B2DHomMatrix& rMatrix, const uno::Reference< beans::XPropertySet >& xPropSet) { - // --> OD 2004-08-09 #i28749# - Get <TransformationInHoriL2R>, if it exist - // and if the document is exported into the OpenOffice.org file format. - // This property only exists at service com::sun::star::text::Shape - the - // Writer UNO service for shapes. - // This code is needed, because the positioning attributes in the - // OpenOffice.org file format are given in horizontal left-to-right layout - // regardless the layout direction the shape is in. In the OASIS Open Office - // file format the positioning attributes are correctly given in the layout - // direction the shape is in. Thus, this code provides the conversion from - // the OASIS Open Office file format to the OpenOffice.org file format. + /* Get <TransformationInHoriL2R>, if it exist + and if the document is exported into the OpenOffice.org file format. + This property only exists at service com::sun::star::text::Shape - the + Writer UNO service for shapes. + This code is needed, because the positioning attributes in the + OpenOffice.org file format are given in horizontal left-to-right layout + regardless the layout direction the shape is in. In the OASIS Open Office + file format the positioning attributes are correctly given in the layout + direction the shape is in. Thus, this code provides the conversion from + the OASIS Open Office file format to the OpenOffice.org file format. (#i28749#) + */ uno::Any aAny; if ( ( GetExport().getExportFlags() & EXPORT_OASIS ) == 0 && xPropSet->getPropertySetInfo()->hasPropertyByName( @@ -110,7 +110,6 @@ void XMLShapeExport::ImpExportNewTrans_GetB2DHomMatrix(::basegfx::B2DHomMatrix& { aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Transformation"))); } - // <-- drawing::HomogenMatrix3 aMatrix; aAny >>= aMatrix; @@ -293,9 +292,6 @@ const sal_Int32 FOUND_CLICKEVENTTYPE = 0x00000080; const sal_Int32 FOUND_MACRO = 0x00000100; const sal_Int32 FOUND_LIBRARY = 0x00000200; const sal_Int32 FOUND_ACTIONEVENTTYPE = 0x00000400; -#ifdef ISSUE66550_HLINK_FOR_SHAPES -const sal_Int32 FOUND_URL = 0x00000800; -#endif } // namespace @@ -385,33 +381,6 @@ void XMLShapeExport::ImpExportEvents( const uno::Reference< drawing::XShape >& x } } -#ifdef ISSUE66550_HLINK_FOR_SHAPES - // extract properties from "OnAction" event ------------------------------- - - OUString aActionEventType; - OUString aHyperURL; - - uno::Sequence< beans::PropertyValue > aActionProperties; - if( xEvents->hasByName( msOnAction ) && (xEvents->getByName( msOnAction ) >>= aActionProperties) ) - { - const beans::PropertyValue* pProperty = aActionProperties.getConstArray(); - const beans::PropertyValue* pPropertyEnd = pProperty + aActionProperties.getLength(); - for( ; pProperty != pPropertyEnd; ++pProperty ) - { - if( ( ( nFound & FOUND_ACTIONEVENTTYPE ) == 0 ) && pProperty->Name == msEventType ) - { - if( pProperty->Value >>= aActionEventType ) - nFound |= FOUND_ACTIONEVENTTYPE; - } - else if( ( ( nFound & FOUND_URL ) == 0 ) && ( pProperty->Name == msURL ) ) - { - if( pProperty->Value >>= aHyperURL ) - nFound |= FOUND_URL; - } - } - } -#endif - // create the XML elements if( aClickEventType == msPresentation ) @@ -439,7 +408,7 @@ void XMLShapeExport::ImpExportEvents( const uno::Reference< drawing::XShape >& x case presentation::ClickAction_VANISH: eStrAction = XML_FADE_OUT; break; case presentation::ClickAction_SOUND: eStrAction = XML_SOUND; break; default: - DBG_ERROR( "unknown presentation::ClickAction found!" ); + OSL_FAIL( "unknown presentation::ClickAction found!" ); eStrAction = XML_UNKNOWN; } @@ -563,15 +532,9 @@ void XMLShapeExport::ImpExportEvents( const uno::Reference< drawing::XShape >& x SvXMLElementExport aEventElemt(mrExport, XML_NAMESPACE_SCRIPT, XML_EVENT_LISTENER, sal_True, sal_True); } } -#ifdef ISSUE66550_HLINK_FOR_SHAPES - else if( aClickEventType == msScript || aActionEventType == msAction ) - { - if( nFound & ( FOUND_MACRO | FOUND_URL ) ) -#else else if( aClickEventType == msScript ) { if( nFound & FOUND_MACRO ) -#endif { SvXMLElementExport aEventsElemt(mrExport, XML_NAMESPACE_OFFICE, XML_EVENT_LISTENERS, sal_True, sal_True); if ( nFound & FOUND_MACRO ) @@ -586,18 +549,6 @@ void XMLShapeExport::ImpExportEvents( const uno::Reference< drawing::XShape >& x SvXMLElementExport aEventElemt(mrExport, XML_NAMESPACE_SCRIPT, XML_EVENT_LISTENER, sal_True, sal_True); } -#ifdef ISSUE66550_HLINK_FOR_SHAPES - if ( nFound & FOUND_URL ) - { - OUString aEventQName( - mrExport.GetNamespaceMap().GetQNameByKey( - XML_NAMESPACE_DOM, OUString( RTL_CONSTASCII_USTRINGPARAM( "action" ) ) ) ); - mrExport.AddAttribute( XML_NAMESPACE_SCRIPT, XML_EVENT_NAME, aEventQName ); - mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, aHyperURL ); - - SvXMLElementExport aEventElemt(mrExport, XML_NAMESPACE_PRESENTATION, XML_EVENT_LISTENER, sal_True, sal_True); - } -#endif } } } @@ -613,8 +564,8 @@ void XMLShapeExport::ImpExportDescription( const uno::Reference< drawing::XShape OUString aDescription; uno::Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY_THROW ); - xProps->getPropertyValue( OUString::createFromAscii( "Title" ) ) >>= aTitle; - xProps->getPropertyValue( OUString::createFromAscii( "Description" ) ) >>= aDescription; + xProps->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( "Title" )) ) >>= aTitle; + xProps->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( "Description" )) ) >>= aDescription; if(aTitle.getLength()) { @@ -630,7 +581,7 @@ void XMLShapeExport::ImpExportDescription( const uno::Reference< drawing::XShape } catch( uno::Exception& ) { - DBG_ERROR( "could not export Title and/or Description for shape!" ); + OSL_FAIL( "could not export Title and/or Description for shape!" ); } } @@ -1193,7 +1144,7 @@ void XMLShapeExport::ImpExportGraphicObjectShape( { if( aStr[ 0 ] == '#' ) { - aStreamURL = OUString::createFromAscii( "vnd.sun.star.Package:" ); + aStreamURL = OUString(RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.Package:" )); aStreamURL = aStreamURL.concat( aStr.copy( 1, aStr.getLength() - 1 ) ); } @@ -1335,17 +1286,18 @@ void XMLShapeExport::ImpExportConnectorShape( awt::Point aStart(0,0); awt::Point aEnd(1,1); - // --> OD 2004-08-09 #i36248# - Get <StartPositionInHoriL2R> and - // <EndPositionInHoriL2R>, if they exist and if the document is exported - // into the OpenOffice.org file format. - // These properties only exist at service com::sun::star::text::Shape - the - // Writer UNO service for shapes. - // This code is needed, because the positioning attributes in the - // OpenOffice.org file format are given in horizontal left-to-right layout - // regardless the layout direction the shape is in. In the OASIS Open Office - // file format the positioning attributes are correctly given in the layout - // direction the shape is in. Thus, this code provides the conversion from - // the OASIS Open Office file format to the OpenOffice.org file format. + /* Get <StartPositionInHoriL2R> and + <EndPositionInHoriL2R>, if they exist and if the document is exported + into the OpenOffice.org file format. + These properties only exist at service com::sun::star::text::Shape - the + Writer UNO service for shapes. + This code is needed, because the positioning attributes in the + OpenOffice.org file format are given in horizontal left-to-right layout + regardless the layout direction the shape is in. In the OASIS Open Office + file format the positioning attributes are correctly given in the layout + direction the shape is in. Thus, this code provides the conversion from + the OASIS Open Office file format to the OpenOffice.org file format. (#i36248#) + */ if ( ( GetExport().getExportFlags() & EXPORT_OASIS ) == 0 && xProps->getPropertySetInfo()->hasPropertyByName( OUString(RTL_CONSTASCII_USTRINGPARAM("StartPositionInHoriL2R"))) && @@ -1360,7 +1312,6 @@ void XMLShapeExport::ImpExportConnectorShape( xProps->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("StartPosition"))) >>= aStart; xProps->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("EndPosition"))) >>= aEnd; } - // <-- if( pRefPoint ) { @@ -1507,17 +1458,18 @@ void XMLShapeExport::ImpExportMeasureShape( awt::Point aStart(0,0); awt::Point aEnd(1,1); - // --> OD 2004-08-09 #i36248# - Get <StartPositionInHoriL2R> and - // <EndPositionInHoriL2R>, if they exist and if the document is exported - // into the OpenOffice.org file format. - // These properties only exist at service com::sun::star::text::Shape - the - // Writer UNO service for shapes. - // This code is needed, because the positioning attributes in the - // OpenOffice.org file format are given in horizontal left-to-right layout - // regardless the layout direction the shape is in. In the OASIS Open Office - // file format the positioning attributes are correctly given in the layout - // direction the shape is in. Thus, this code provides the conversion from - // the OASIS Open Office file format to the OpenOffice.org file format. + /* Get <StartPositionInHoriL2R> and + <EndPositionInHoriL2R>, if they exist and if the document is exported + into the OpenOffice.org file format. + These properties only exist at service com::sun::star::text::Shape - the + Writer UNO service for shapes. + This code is needed, because the positioning attributes in the + OpenOffice.org file format are given in horizontal left-to-right layout + regardless the layout direction the shape is in. In the OASIS Open Office + file format the positioning attributes are correctly given in the layout + direction the shape is in. Thus, this code provides the conversion from + the OASIS Open Office file format to the OpenOffice.org file format. (#i36248#) + */ if ( ( GetExport().getExportFlags() & EXPORT_OASIS ) == 0 && xProps->getPropertySetInfo()->hasPropertyByName( OUString(RTL_CONSTASCII_USTRINGPARAM("StartPositionInHoriL2R"))) && @@ -1532,7 +1484,6 @@ void XMLShapeExport::ImpExportMeasureShape( xProps->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("StartPosition"))) >>= aStart; xProps->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("EndPosition"))) >>= aEnd; } - // <-- if( pRefPoint ) { @@ -1642,7 +1593,7 @@ void XMLShapeExport::ImpExportOLE2Shape( { // OOo internal links have no storage persistance, URL is stored in the XML file // the result LinkURL is empty in case the object is not a link - xPropSet->getPropertyValue( OUString::createFromAscii( "LinkURL" ) ) >>= sURL; + xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( "LinkURL" )) ) >>= sURL; } xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( "PersistName" ) ) ) >>= sPersistName; @@ -2054,3 +2005,5 @@ void XMLShapeExport::ImpExportMediaShape( } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/shapeexport3.cxx b/xmloff/source/draw/shapeexport3.cxx index 36ab9c499fe5..759509f112d8 100644 --- a/xmloff/source/draw/shapeexport3.cxx +++ b/xmloff/source/draw/shapeexport3.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 <com/sun/star/drawing/DoubleSequence.hpp> #include <tools/gen.hxx> -#ifndef _XMLOFF_SHAPEEXPORT_HXX #include <xmloff/shapeexport.hxx> -#endif #include "sdpropls.hxx" #include <tools/debug.hxx> #include <rtl/ustrbuf.hxx> @@ -496,3 +495,5 @@ void XMLShapeExport::export3DLamps( const com::sun::star::uno::Reference< com::s } ////////////////////////////////////////////////////////////////////////////// + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/shapeexport4.cxx b/xmloff/source/draw/shapeexport4.cxx index a57823cd8867..13d6730a028a 100644 --- a/xmloff/source/draw/shapeexport4.cxx +++ b/xmloff/source/draw/shapeexport4.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,9 +45,7 @@ #include <com/sun/star/table/XColumnRowRange.hpp> -#ifndef _XMLOFF_SHAPEEXPORT_HXX #include <xmloff/shapeexport.hxx> -#endif #include "sdpropls.hxx" #include <tools/debug.hxx> #include <rtl/ustrbuf.hxx> @@ -58,9 +57,7 @@ #include <com/sun/star/container/XIdentifierContainer.hpp> #include <com/sun/star/drawing/ShadeMode.hpp> #include <com/sun/star/drawing/EnhancedCustomShapeParameterType.hpp> -#ifndef _COM_SUN_STAR_DRAWING_ENHANCEDCUSTOMSHAPEPARAMETERPARI_HPP_ #include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp> -#endif #include <com/sun/star/drawing/EnhancedCustomShapeGluePointType.hpp> #include <com/sun/star/drawing/EnhancedCustomShapeTextFrame.hpp> #include <com/sun/star/drawing/EnhancedCustomShapeSegment.hpp> @@ -1143,7 +1140,7 @@ void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape } catch( uno::Exception& ) { - DBG_ERROR("XMLShapeExport::ImpExportTableShape(), exception caught!"); + OSL_FAIL("XMLShapeExport::ImpExportTableShape(), exception caught!"); } } } @@ -1229,7 +1226,7 @@ void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape } catch( uno::Exception& ) { - DBG_ERROR("xmloff::XMLShapeExport::ImpExportTableShape(), exception caught!"); + OSL_FAIL("xmloff::XMLShapeExport::ImpExportTableShape(), exception caught!"); } } @@ -1239,6 +1236,8 @@ void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape } catch( uno::Exception& ) { - DBG_ERROR( "xmloff::XMLShapeExport::ImpExportTableShape(), exception caught!" ); + OSL_FAIL( "xmloff::XMLShapeExport::ImpExportTableShape(), exception caught!" ); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx index 2c4018075f6b..833e76966a13 100644 --- a/xmloff/source/draw/shapeimport.cxx +++ b/xmloff/source/draw/shapeimport.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 <list> -#ifndef _XMLOFF_SHAPEIMPORT_HXX #include <xmloff/shapeimport.hxx> -#endif #include <xmloff/xmltkmap.hxx> #include "xmloff/xmlnmspe.hxx" #include <xmloff/xmltoken.hxx> @@ -226,16 +225,7 @@ XMLShapeImportHelper::~XMLShapeImportHelper() if(mpGroupShapeElemTokenMap) delete mpGroupShapeElemTokenMap; if(mpFrameShapeElemTokenMap) delete mpFrameShapeElemTokenMap; -/* - if(mpShapeAttrTokenMap) delete mpShapeAttrTokenMap; - if(mpRectShapeAttrTokenMap) delete mpRectShapeAttrTokenMap; - if(mpLineShapeAttrTokenMap) delete mpLineShapeAttrTokenMap; - if(mpEllipseShapeAttrTokenMap) delete mpEllipseShapeAttrTokenMap; - if(mpTextBoxShapeAttrTokenMap) delete mpTextBoxShapeAttrTokenMap; - if(mpControlShapeAttrTokenMap) delete mpControlShapeAttrTokenMap; - if(mpPageShapeAttrTokenMap) delete mpPageShapeAttrTokenMap; - if(mpGraphicObjectShapeAttrTokenMap) delete mpGraphicObjectShapeAttrTokenMap; -*/ + if(mpPolygonShapeAttrTokenMap) delete mpPolygonShapeAttrTokenMap; if(mpPathShapeAttrTokenMap) delete mpPathShapeAttrTokenMap; if(mp3DSceneShapeElemTokenMap) delete mp3DSceneShapeElemTokenMap; @@ -270,7 +260,7 @@ const SvXMLTokenMap& XMLShapeImportHelper::GetGroupShapeElemTokenMap() { if(!mpGroupShapeElemTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry aGroupShapeElemTokenMap[] = + static SvXMLTokenMapEntry aGroupShapeElemTokenMap[] = { { XML_NAMESPACE_DRAW, XML_G, XML_TOK_GROUP_GROUP }, { XML_NAMESPACE_DRAW, XML_RECT, XML_TOK_GROUP_RECT }, @@ -310,7 +300,7 @@ const SvXMLTokenMap& XMLShapeImportHelper::GetFrameShapeElemTokenMap() { if(!mpFrameShapeElemTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry aFrameShapeElemTokenMap[] = + static SvXMLTokenMapEntry aFrameShapeElemTokenMap[] = { { XML_NAMESPACE_DRAW, XML_TEXT_BOX, XML_TOK_FRAME_TEXT_BOX }, { XML_NAMESPACE_DRAW, XML_IMAGE, XML_TOK_FRAME_IMAGE }, @@ -336,7 +326,7 @@ const SvXMLTokenMap& XMLShapeImportHelper::Get3DSceneShapeElemTokenMap() { if(!mp3DSceneShapeElemTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry a3DSceneShapeElemTokenMap[] = + static SvXMLTokenMapEntry a3DSceneShapeElemTokenMap[] = { { XML_NAMESPACE_DR3D, XML_SCENE, XML_TOK_3DSCENE_3DSCENE }, { XML_NAMESPACE_DR3D, XML_CUBE, XML_TOK_3DSCENE_3DCUBE }, @@ -353,38 +343,13 @@ const SvXMLTokenMap& XMLShapeImportHelper::Get3DSceneShapeElemTokenMap() } ////////////////////////////////////////////////////////////////////////////// -/* - -const SvXMLTokenMap& XMLShapeImportHelper::GetShapeAttrTokenMap() -{ - if(!mpShapeAttrTokenMap) - { - static __FAR_DATA SvXMLTokenMapEntry aShapeAttrTokenMap[] = -{ - { XML_NAMESPACE_DRAW, XML_NAME, XML_TOK_SHAPE_NAME }, - { XML_NAMESPACE_DRAW, XML_STYLE_NAME, XML_TOK_SHAPE_DRAWSTYLE_NAME_GRAPHICS }, - { XML_NAMESPACE_PRESENTATION, XML_CLASS, XML_TOK_SHAPE_PRESENTATION_CLASS }, - { XML_NAMESPACE_PRESENTATION, XML_STYLE_NAME, XML_TOK_SHAPE_DRAWSTYLE_NAME_PRESENTATION }, - { XML_NAMESPACE_SVG, XML_TRANSFORM, XML_TOK_SHAPE_TRANSFORM }, - { XML_NAMESPACE_PRESENTATION, XML_PLACEHOLDER, XML_TOK_SHAPE_IS_PLACEHOLDER }, - { XML_NAMESPACE_PRESENTATION, XML_USER_TRANSFORMED, XML_TOK_SHAPE_IS_USER_TRANSFORMED }, - XML_TOKEN_MAP_END -}; - - mpShapeAttrTokenMap = new SvXMLTokenMap(aShapeAttrTokenMap); - } - - return *mpShapeAttrTokenMap; -} -*/ -////////////////////////////////////////////////////////////////////////////// const SvXMLTokenMap& XMLShapeImportHelper::Get3DObjectAttrTokenMap() { if(!mp3DObjectAttrTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry a3DObjectAttrTokenMap[] = + static SvXMLTokenMapEntry a3DObjectAttrTokenMap[] = { { XML_NAMESPACE_DRAW, XML_STYLE_NAME, XML_TOK_3DOBJECT_DRAWSTYLE_NAME }, { XML_NAMESPACE_DR3D, XML_TRANSFORM, XML_TOK_3DOBJECT_TRANSFORM }, @@ -404,7 +369,7 @@ const SvXMLTokenMap& XMLShapeImportHelper::Get3DPolygonBasedAttrTokenMap() { if(!mp3DPolygonBasedAttrTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry a3DPolygonBasedAttrTokenMap[] = + static SvXMLTokenMapEntry a3DPolygonBasedAttrTokenMap[] = { { XML_NAMESPACE_SVG, XML_VIEWBOX, XML_TOK_3DPOLYGONBASED_VIEWBOX }, { XML_NAMESPACE_SVG, XML_D, XML_TOK_3DPOLYGONBASED_D }, @@ -424,7 +389,7 @@ const SvXMLTokenMap& XMLShapeImportHelper::Get3DCubeObjectAttrTokenMap() { if(!mp3DCubeObjectAttrTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry a3DCubeObjectAttrTokenMap[] = + static SvXMLTokenMapEntry a3DCubeObjectAttrTokenMap[] = { { XML_NAMESPACE_DR3D, XML_MIN_EDGE, XML_TOK_3DCUBEOBJ_MINEDGE }, { XML_NAMESPACE_DR3D, XML_MAX_EDGE, XML_TOK_3DCUBEOBJ_MAXEDGE }, @@ -444,7 +409,7 @@ const SvXMLTokenMap& XMLShapeImportHelper::Get3DSphereObjectAttrTokenMap() { if(!mp3DSphereObjectAttrTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry a3DSphereObjectAttrTokenMap[] = + static SvXMLTokenMapEntry a3DSphereObjectAttrTokenMap[] = { { XML_NAMESPACE_DR3D, XML_CENTER, XML_TOK_3DSPHEREOBJ_CENTER }, { XML_NAMESPACE_DR3D, XML_SIZE, XML_TOK_3DSPHEREOBJ_SIZE }, @@ -458,81 +423,13 @@ const SvXMLTokenMap& XMLShapeImportHelper::Get3DSphereObjectAttrTokenMap() } ////////////////////////////////////////////////////////////////////////////// -/* - -const SvXMLTokenMap& XMLShapeImportHelper::GetRectShapeAttrTokenMap() -{ - if(!mpRectShapeAttrTokenMap) - { - static __FAR_DATA SvXMLTokenMapEntry aRectShapeAttrTokenMap[] = -{ - { XML_NAMESPACE_SVG, XML_X, XML_TOK_RECTSHAPE_X }, - { XML_NAMESPACE_SVG, XML_Y, XML_TOK_RECTSHAPE_Y }, - { XML_NAMESPACE_SVG, XML_WIDTH, XML_TOK_RECTSHAPE_WIDTH }, - { XML_NAMESPACE_SVG, XML_HEIGHT, XML_TOK_RECTSHAPE_HEIGHT }, - { XML_NAMESPACE_DRAW, XML_CORNER_RADIUS, XML_TOK_RECTSHAPE_CORNER_RADIUS }, - XML_TOKEN_MAP_END -}; - - mpRectShapeAttrTokenMap = new SvXMLTokenMap(aRectShapeAttrTokenMap); - } - - return *mpRectShapeAttrTokenMap; -} - -////////////////////////////////////////////////////////////////////////////// - - -const SvXMLTokenMap& XMLShapeImportHelper::GetLineShapeAttrTokenMap() -{ - if(!mpLineShapeAttrTokenMap) - { - static __FAR_DATA SvXMLTokenMapEntry aLineShapeAttrTokenMap[] = -{ - { XML_NAMESPACE_SVG, XML_X1, XML_TOK_LINESHAPE_X1 }, - { XML_NAMESPACE_SVG, XML_Y1, XML_TOK_LINESHAPE_Y1 }, - { XML_NAMESPACE_SVG, XML_X2, XML_TOK_LINESHAPE_X2 }, - { XML_NAMESPACE_SVG, XML_Y2, XML_TOK_LINESHAPE_Y2 }, - XML_TOKEN_MAP_END -}; - - mpLineShapeAttrTokenMap = new SvXMLTokenMap(aLineShapeAttrTokenMap); - } - - return *mpLineShapeAttrTokenMap; -} - -////////////////////////////////////////////////////////////////////////////// - -const SvXMLTokenMap& XMLShapeImportHelper::GetEllipseShapeAttrTokenMap() -{ - if(!mpEllipseShapeAttrTokenMap) - { - static __FAR_DATA SvXMLTokenMapEntry aEllipseShapeAttrTokenMap[] = -{ - { XML_NAMESPACE_SVG, XML_RX, XML_TOK_ELLIPSESHAPE_RX }, - { XML_NAMESPACE_SVG, XML_RY, XML_TOK_ELLIPSESHAPE_RY }, - { XML_NAMESPACE_SVG, XML_CX, XML_TOK_ELLIPSESHAPE_CX }, - { XML_NAMESPACE_SVG, XML_CY, XML_TOK_ELLIPSESHAPE_CY }, - { XML_NAMESPACE_SVG, XML_R, XML_TOK_ELLIPSESHAPE_R }, - XML_TOKEN_MAP_END -}; - - mpEllipseShapeAttrTokenMap = new SvXMLTokenMap(aEllipseShapeAttrTokenMap); - } - - return *mpEllipseShapeAttrTokenMap; -} - -////////////////////////////////////////////////////////////////////////////// -*/ const SvXMLTokenMap& XMLShapeImportHelper::GetPolygonShapeAttrTokenMap() { if(!mpPolygonShapeAttrTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry aPolygonShapeAttrTokenMap[] = + static SvXMLTokenMapEntry aPolygonShapeAttrTokenMap[] = { { XML_NAMESPACE_SVG, XML_VIEWBOX, XML_TOK_POLYGONSHAPE_VIEWBOX }, { XML_NAMESPACE_DRAW, XML_POINTS, XML_TOK_POLYGONSHAPE_POINTS }, @@ -552,7 +449,7 @@ const SvXMLTokenMap& XMLShapeImportHelper::GetPathShapeAttrTokenMap() { if(!mpPathShapeAttrTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry aPathShapeAttrTokenMap[] = + static SvXMLTokenMapEntry aPathShapeAttrTokenMap[] = { { XML_NAMESPACE_SVG, XML_VIEWBOX, XML_TOK_PATHSHAPE_VIEWBOX }, { XML_NAMESPACE_SVG, XML_D, XML_TOK_PATHSHAPE_D }, @@ -564,59 +461,15 @@ const SvXMLTokenMap& XMLShapeImportHelper::GetPathShapeAttrTokenMap() return *mpPathShapeAttrTokenMap; } -/* -////////////////////////////////////////////////////////////////////////////// - - -const SvXMLTokenMap& XMLShapeImportHelper::GetTextBoxShapeAttrTokenMap() -{ - if(!mpTextBoxShapeAttrTokenMap) - { - static __FAR_DATA SvXMLTokenMapEntry aTextBoxShapeAttrTokenMap[] = -{ - { XML_NAMESPACE_SVG, XML_X, XML_TOK_TEXTBOXSHAPE_X }, - { XML_NAMESPACE_SVG, XML_Y, XML_TOK_TEXTBOXSHAPE_Y }, - { XML_NAMESPACE_SVG, XML_WIDTH, XML_TOK_TEXTBOXSHAPE_WIDTH }, - { XML_NAMESPACE_SVG, XML_HEIGHT, XML_TOK_TEXTBOXSHAPE_HEIGHT }, - XML_TOKEN_MAP_END -}; - - mpTextBoxShapeAttrTokenMap = new SvXMLTokenMap(aTextBoxShapeAttrTokenMap); - } - - return *mpTextBoxShapeAttrTokenMap; -} ////////////////////////////////////////////////////////////////////////////// -const SvXMLTokenMap& XMLShapeImportHelper::GetControlShapeAttrTokenMap() -{ - if(!mpControlShapeAttrTokenMap) - { - static __FAR_DATA SvXMLTokenMapEntry aControlShapeAttrTokenMap[] = -{ - { XML_NAMESPACE_SVG, XML_X, XML_TOK_CONTROLSHAPE_X }, - { XML_NAMESPACE_SVG, XML_Y, XML_TOK_CONTROLSHAPE_Y }, - { XML_NAMESPACE_SVG, XML_WIDTH, XML_TOK_CONTROLSHAPE_WIDTH }, - { XML_NAMESPACE_SVG, XML_HEIGHT, XML_TOK_CONTROLSHAPE_HEIGHT }, - XML_TOKEN_MAP_END -}; - - mpControlShapeAttrTokenMap = new SvXMLTokenMap(aControlShapeAttrTokenMap); - } - - return *mpControlShapeAttrTokenMap; -} -*/ -////////////////////////////////////////////////////////////////////////////// - - const SvXMLTokenMap& XMLShapeImportHelper::Get3DSceneShapeAttrTokenMap() { if(!mp3DSceneShapeAttrTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry a3DSceneShapeAttrTokenMap[] = + static SvXMLTokenMapEntry a3DSceneShapeAttrTokenMap[] = { { XML_NAMESPACE_DR3D, XML_TRANSFORM, XML_TOK_3DSCENESHAPE_TRANSFORM }, { XML_NAMESPACE_DR3D, XML_VRP, XML_TOK_3DSCENESHAPE_VRP }, @@ -645,7 +498,7 @@ const SvXMLTokenMap& XMLShapeImportHelper::Get3DLightAttrTokenMap() { if(!mp3DLightAttrTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry a3DLightAttrTokenMap[] = + static SvXMLTokenMapEntry a3DLightAttrTokenMap[] = { { XML_NAMESPACE_DR3D, XML_DIFFUSE_COLOR, XML_TOK_3DLIGHT_DIFFUSE_COLOR }, { XML_NAMESPACE_DR3D, XML_DIRECTION, XML_TOK_3DLIGHT_DIRECTION }, @@ -661,51 +514,7 @@ const SvXMLTokenMap& XMLShapeImportHelper::Get3DLightAttrTokenMap() } ////////////////////////////////////////////////////////////////////////////// -/* -const SvXMLTokenMap& XMLShapeImportHelper::GetPageShapeAttrTokenMap() -{ - if(!mpPageShapeAttrTokenMap) - { - static __FAR_DATA SvXMLTokenMapEntry aPageShapeAttrTokenMap[] = -{ - { XML_NAMESPACE_SVG, XML_X, XML_TOK_PAGESHAPE_X }, - { XML_NAMESPACE_SVG, XML_Y, XML_TOK_PAGESHAPE_Y }, - { XML_NAMESPACE_SVG, XML_WIDTH, XML_TOK_PAGESHAPE_WIDTH }, - { XML_NAMESPACE_SVG, XML_HEIGHT, XML_TOK_PAGESHAPE_HEIGHT }, - XML_TOKEN_MAP_END -}; - - mpPageShapeAttrTokenMap = new SvXMLTokenMap(aPageShapeAttrTokenMap); - } - - return *mpPageShapeAttrTokenMap; -} - -////////////////////////////////////////////////////////////////////////////// - - -const SvXMLTokenMap& XMLShapeImportHelper::GetGraphicObjectShapeAttrTokenMap() -{ - if(!mpGraphicObjectShapeAttrTokenMap) - { - static __FAR_DATA SvXMLTokenMapEntry aGraphicObjectShapeAttrTokenMap[] = -{ - { XML_NAMESPACE_SVG, XML_X, XML_TOK_GOSHAPE_X }, - { XML_NAMESPACE_SVG, XML_Y, XML_TOK_GOSHAPE_Y }, - { XML_NAMESPACE_SVG, XML_WIDTH, XML_TOK_GOSHAPE_WIDTH }, - { XML_NAMESPACE_SVG, XML_HEIGHT, XML_TOK_GOSHAPE_HEIGHT }, - { XML_NAMESPACE_XLINK, XML_HREF, XML_TOK_GOSHAPE_URL }, - XML_TOKEN_MAP_END -}; - - mpGraphicObjectShapeAttrTokenMap = new SvXMLTokenMap(aGraphicObjectShapeAttrTokenMap); - } - - return *mpGraphicObjectShapeAttrTokenMap; -} -*/ -////////////////////////////////////////////////////////////////////////////// SvXMLShapeContext* XMLShapeImportHelper::Create3DSceneChildContext( SvXMLImport& rImport, @@ -1047,18 +856,19 @@ void XMLShapeImportHelper::finishShape( const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >&, com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >&) { - // --> OD 2004-08-10 #i28749#, #i36248# - set property <PositionLayoutDir> - // to <PositionInHoriL2R>, if it exists and the import states that - // the shape positioning attributes are in horizontal left-to-right - // layout. This is the case for the OpenOffice.org file format. - // This setting is done for Writer documents, because the property - // only exists at service com::sun::star::text::Shape - the Writer - // UNO service for shapes. - // The value indicates that the positioning attributes are given - // in horizontal left-to-right layout. The property is evaluated - // during the first positioning of the shape in order to convert - // the shape position given in the OpenOffice.org file format to - // the one for the OASIS Open Office file format. + /* Set property <PositionLayoutDir> + to <PositionInHoriL2R>, if it exists and the import states that + the shape positioning attributes are in horizontal left-to-right + layout. This is the case for the OpenOffice.org file format. + This setting is done for Writer documents, because the property + only exists at service com::sun::star::text::Shape - the Writer + UNO service for shapes. + The value indicates that the positioning attributes are given + in horizontal left-to-right layout. The property is evaluated + during the first positioning of the shape in order to convert + the shape position given in the OpenOffice.org file format to + the one for the OASIS Open Office file format. (#i28749#, #i36248#) + */ uno::Reference< beans::XPropertySet > xPropSet(rShape, uno::UNO_QUERY); if ( xPropSet.is() ) { @@ -1073,7 +883,6 @@ void XMLShapeImportHelper::finishShape( aPosLayoutDir ); } } - // <-- } // helper functions for z-order sorting @@ -1128,7 +937,7 @@ void ShapeSortContext::moveShape( sal_Int32 nSourcePos, sal_Int32 nDestPos ) DBG_ASSERT( (*aIter).nIs >= nDestPos, "Shape sorting failed" ); (*aIter).nIs++; } - aIter++; + ++aIter; } aIter = maUnsortedList.begin(); @@ -1141,7 +950,7 @@ void ShapeSortContext::moveShape( sal_Int32 nSourcePos, sal_Int32 nDestPos ) DBG_ASSERT( (*aIter).nIs >= nDestPos, "shape sorting failed" ); (*aIter).nIs++; } - aIter++; + ++aIter; } } } @@ -1233,7 +1042,7 @@ void XMLShapeImportHelper::popGroupAndSort() } catch( uno::Exception& ) { - DBG_ERROR("exception while sorting shapes, sorting failed!"); + OSL_FAIL("exception while sorting shapes, sorting failed!"); } // put parent on top and delete current context, were done @@ -1373,7 +1182,7 @@ void XMLShapeImportHelper::moveGluePointMapping( const com::sun::star::uno::Refe { if ( (*aShapeIdIter).second != -1 ) (*aShapeIdIter).second += n; - aShapeIdIter++; + ++aShapeIdIter; } } } @@ -1458,3 +1267,5 @@ void SvXMLShapeContext::setHyperlink( const OUString& rHyperlink ) { msHyperlink = rHyperlink; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/viewcontext.cxx b/xmloff/source/draw/viewcontext.cxx index 764b03e7a132..0670e971afad 100644 --- a/xmloff/source/draw/viewcontext.cxx +++ b/xmloff/source/draw/viewcontext.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,11 +36,12 @@ #include "xmloff/VisAreaContext.hxx" using namespace com::sun::star; -using namespace rtl; using ::xmloff::token::IsXMLToken; using ::xmloff::token::XML_EMBEDDED_VISIBLE_AREA; +using ::rtl::OUString; + //------------------------------------------------------------------ SdXMLViewSettingsContext::SdXMLViewSettingsContext( SdXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference<xml::sax::XAttributeList>& ) : @@ -89,3 +91,5 @@ void SdXMLViewSettingsContext::EndElement() xProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "VisibleArea" ) ), aAny ); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/viewcontext.hxx b/xmloff/source/draw/viewcontext.hxx index 3506f969fa7c..fbc88b5d2115 100644 --- a/xmloff/source/draw/viewcontext.hxx +++ b/xmloff/source/draw/viewcontext.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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/xexptran.cxx b/xmloff/source/draw/xexptran.cxx index 969e3a0d5f8f..0834ea1218ec 100644 --- a/xmloff/source/draw/xexptran.cxx +++ b/xmloff/source/draw/xexptran.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. @@ -360,7 +361,7 @@ void SdXMLImExTransform2D::EmptyList() } default : { - DBG_ERROR("SdXMLImExTransform2D: impossible entry!"); + OSL_FAIL("SdXMLImExTransform2D: impossible entry!"); break; } } @@ -424,14 +425,14 @@ const OUString& SdXMLImExTransform2D::GetExportString(const SvXMLUnitConverter& { case IMP_SDXMLEXP_TRANSOBJ2D_ROTATE : { - aNewString += OUString::createFromAscii("rotate ("); + aNewString += OUString(RTL_CONSTASCII_USTRINGPARAM( "rotate (" )); Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj2DRotate*)pObj)->mfRotate); aNewString += aClosingBrace; break; } case IMP_SDXMLEXP_TRANSOBJ2D_SCALE : { - aNewString += OUString::createFromAscii("scale ("); + aNewString += OUString(RTL_CONSTASCII_USTRINGPARAM( "scale (" )); Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj2DScale*)pObj)->maScale.getX()); aNewString += aEmptySpace; Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj2DScale*)pObj)->maScale.getY()); @@ -440,7 +441,7 @@ const OUString& SdXMLImExTransform2D::GetExportString(const SvXMLUnitConverter& } case IMP_SDXMLEXP_TRANSOBJ2D_TRANSLATE : { - aNewString += OUString::createFromAscii("translate ("); + aNewString += OUString(RTL_CONSTASCII_USTRINGPARAM( "translate (" )); Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj2DTranslate*)pObj)->maTranslate.getX(), true); aNewString += aEmptySpace; Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj2DTranslate*)pObj)->maTranslate.getY(), true); @@ -449,21 +450,21 @@ const OUString& SdXMLImExTransform2D::GetExportString(const SvXMLUnitConverter& } case IMP_SDXMLEXP_TRANSOBJ2D_SKEWX : { - aNewString += OUString::createFromAscii("skewX ("); + aNewString += OUString(RTL_CONSTASCII_USTRINGPARAM( "skewX (" )); Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj2DSkewX*)pObj)->mfSkewX); aNewString += aClosingBrace; break; } case IMP_SDXMLEXP_TRANSOBJ2D_SKEWY : { - aNewString += OUString::createFromAscii("skewY ("); + aNewString += OUString(RTL_CONSTASCII_USTRINGPARAM( "skewY (" )); Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj2DSkewY*)pObj)->mfSkewY); aNewString += aClosingBrace; break; } case IMP_SDXMLEXP_TRANSOBJ2D_MATRIX : { - aNewString += OUString::createFromAscii("matrix ("); + aNewString += OUString(RTL_CONSTASCII_USTRINGPARAM( "matrix (" )); // a Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj2DMatrix*)pObj)->maMatrix.get(0, 0)); @@ -493,7 +494,7 @@ const OUString& SdXMLImExTransform2D::GetExportString(const SvXMLUnitConverter& } default : { - DBG_ERROR("SdXMLImExTransform2D: impossible entry!"); + OSL_FAIL("SdXMLImExTransform2D: impossible entry!"); break; } } @@ -530,12 +531,12 @@ void SdXMLImExTransform2D::SetString(const OUString& rNew, const SvXMLUnitConver const OUString aStr(msString.getStr(), (sal_uInt16)msString.getLength()); const sal_Int32 nLen(aStr.getLength()); - const OUString aString_rotate(OUString::createFromAscii("rotate")); - const OUString aString_scale(OUString::createFromAscii("scale")); - const OUString aString_translate(OUString::createFromAscii("translate")); - const OUString aString_skewX(OUString::createFromAscii("skewX")); - const OUString aString_skewY(OUString::createFromAscii("skewY")); - const OUString aString_matrix(OUString::createFromAscii("matrix")); + const OUString aString_rotate(RTL_CONSTASCII_USTRINGPARAM( "rotate" )); + const OUString aString_scale(RTL_CONSTASCII_USTRINGPARAM( "scale" )); + const OUString aString_translate(RTL_CONSTASCII_USTRINGPARAM( "translate" )); + const OUString aString_skewX(RTL_CONSTASCII_USTRINGPARAM( "skewX" )); + const OUString aString_skewY(RTL_CONSTASCII_USTRINGPARAM( "skewY" )); + const OUString aString_matrix(RTL_CONSTASCII_USTRINGPARAM( "matrix" )); sal_Int32 nPos(0); @@ -703,7 +704,7 @@ void SdXMLImExTransform2D::GetFullTransform(::basegfx::B2DHomMatrix& rFullTrans) } default : { - DBG_ERROR("SdXMLImExTransform2D: impossible entry!"); + OSL_FAIL("SdXMLImExTransform2D: impossible entry!"); break; } } @@ -816,7 +817,7 @@ void SdXMLImExTransform3D::EmptyList() } default : { - DBG_ERROR("SdXMLImExTransform3D: impossible entry!"); + OSL_FAIL("SdXMLImExTransform3D: impossible entry!"); break; } } @@ -900,28 +901,28 @@ const OUString& SdXMLImExTransform3D::GetExportString(const SvXMLUnitConverter& { case IMP_SDXMLEXP_TRANSOBJ3D_ROTATE_X : { - aNewString += OUString::createFromAscii("rotatex ("); + aNewString += OUString(RTL_CONSTASCII_USTRINGPARAM( "rotatex (" )); Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DRotateX*)pObj)->mfRotateX); aNewString += aClosingBrace; break; } case IMP_SDXMLEXP_TRANSOBJ3D_ROTATE_Y : { - aNewString += OUString::createFromAscii("rotatey ("); + aNewString += OUString(RTL_CONSTASCII_USTRINGPARAM( "rotatey (" )); Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DRotateY*)pObj)->mfRotateY); aNewString += aClosingBrace; break; } case IMP_SDXMLEXP_TRANSOBJ3D_ROTATE_Z : { - aNewString += OUString::createFromAscii("rotatez ("); + aNewString += OUString(RTL_CONSTASCII_USTRINGPARAM( "rotatez (" )); Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DRotateZ*)pObj)->mfRotateZ); aNewString += aClosingBrace; break; } case IMP_SDXMLEXP_TRANSOBJ3D_SCALE : { - aNewString += OUString::createFromAscii("scale ("); + aNewString += OUString(RTL_CONSTASCII_USTRINGPARAM( "scale (" )); Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DScale*)pObj)->maScale.getX()); aNewString += aEmptySpace; Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DScale*)pObj)->maScale.getY()); @@ -932,7 +933,7 @@ const OUString& SdXMLImExTransform3D::GetExportString(const SvXMLUnitConverter& } case IMP_SDXMLEXP_TRANSOBJ3D_TRANSLATE : { - aNewString += OUString::createFromAscii("translate ("); + aNewString += OUString(RTL_CONSTASCII_USTRINGPARAM( "translate (" )); Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DTranslate*)pObj)->maTranslate.getX(), true); aNewString += aEmptySpace; Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DTranslate*)pObj)->maTranslate.getY(), true); @@ -943,7 +944,7 @@ const OUString& SdXMLImExTransform3D::GetExportString(const SvXMLUnitConverter& } case IMP_SDXMLEXP_TRANSOBJ3D_MATRIX : { - aNewString += OUString::createFromAscii("matrix ("); + aNewString += OUString(RTL_CONSTASCII_USTRINGPARAM( "matrix (" )); // a Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DMatrix*)pObj)->maMatrix.get(0, 0)); @@ -997,7 +998,7 @@ const OUString& SdXMLImExTransform3D::GetExportString(const SvXMLUnitConverter& } default : { - DBG_ERROR("SdXMLImExTransform3D: impossible entry!"); + OSL_FAIL("SdXMLImExTransform3D: impossible entry!"); break; } } @@ -1034,12 +1035,12 @@ void SdXMLImExTransform3D::SetString(const OUString& rNew, const SvXMLUnitConver const OUString aStr(msString.getStr(), (sal_uInt16)msString.getLength()); const sal_Int32 nLen(aStr.getLength()); - const OUString aString_rotatex(OUString::createFromAscii("rotatex")); - const OUString aString_rotatey(OUString::createFromAscii("rotatey")); - const OUString aString_rotatez(OUString::createFromAscii("rotatez")); - const OUString aString_scale(OUString::createFromAscii("scale")); - const OUString aString_translate(OUString::createFromAscii("translate")); - const OUString aString_matrix(OUString::createFromAscii("matrix")); + const OUString aString_rotatex(RTL_CONSTASCII_USTRINGPARAM( "rotatex" )); + const OUString aString_rotatey(RTL_CONSTASCII_USTRINGPARAM( "rotatey" )); + const OUString aString_rotatez(RTL_CONSTASCII_USTRINGPARAM( "rotatez" )); + const OUString aString_scale(RTL_CONSTASCII_USTRINGPARAM( "scale" )); + const OUString aString_translate(RTL_CONSTASCII_USTRINGPARAM( "translate" )); + const OUString aString_matrix(RTL_CONSTASCII_USTRINGPARAM( "matrix" )); sal_Int32 nPos(0); @@ -1267,7 +1268,7 @@ void SdXMLImExTransform3D::GetFullTransform(::basegfx::B3DHomMatrix& rFullTrans) } default : { - DBG_ERROR("SdXMLImExTransform3D: impossible entry!"); + OSL_FAIL("SdXMLImExTransform3D: impossible entry!"); break; } } @@ -2358,6 +2359,7 @@ SdXMLImExSvgDElement::SdXMLImExSvgDElement(const OUString& rNew, } DBG_ASSERT(!bEllipticalArc, "XMLIMP: non-interpreted tags in svg:d element!"); + (void)bEllipticalArc; if(nNumPolys) { @@ -2530,7 +2532,7 @@ SdXMLImExSvgDElement::SdXMLImExSvgDElement(const OUString& rNew, case 'A' : case 'a' : { - DBG_ERROR("XMLIMP: non-interpreted tags in svg:d element (elliptical arc)!"); + OSL_FAIL("XMLIMP: non-interpreted tags in svg:d element (elliptical arc)!"); nPos++; Imp_SkipSpaces(aStr, nPos, nLen); @@ -2550,7 +2552,7 @@ SdXMLImExSvgDElement::SdXMLImExSvgDElement(const OUString& rNew, default: { nPos++; - DBG_ERROR("XMLIMP: non-interpreted tags in svg:d element (unknown)!"); + OSL_FAIL("XMLIMP: non-interpreted tags in svg:d element (unknown)!"); break; } } @@ -2605,11 +2607,6 @@ SdXMLImExSvgDElement::SdXMLImExSvgDElement(const OUString& rNew, // #104076# remember closed state of current polygon mbIsClosed = true; - // closed: add first point again - // sal_Int32 nX(pInnerSequence[0].X); - // sal_Int32 nY(pInnerSequence[0].Y); - // Imp_AddExportPoints(nX, nY, pInnerSequence, pInnerFlags, nInnerIndex++, drawing::PolygonFlags_NORMAL); - break; } @@ -2991,7 +2988,7 @@ SdXMLImExSvgDElement::SdXMLImExSvgDElement(const OUString& rNew, case 'A' : case 'a' : { - DBG_ERROR("XMLIMP: non-interpreted tags in svg:d element (elliptical arc)!"); + OSL_FAIL("XMLIMP: non-interpreted tags in svg:d element (elliptical arc)!"); nPos++; Imp_SkipSpaces(aStr, nPos, nLen); @@ -3011,7 +3008,7 @@ SdXMLImExSvgDElement::SdXMLImExSvgDElement(const OUString& rNew, default: { nPos++; - DBG_ERROR("XMLIMP: non-interpreted tags in svg:d element (unknown)!"); + OSL_FAIL("XMLIMP: non-interpreted tags in svg:d element (unknown)!"); break; } } @@ -3115,3 +3112,5 @@ SdXMLImExSvgDElement::SdXMLImExSvgDElement(const OUString& rNew, } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximp3dobject.cxx b/xmloff/source/draw/ximp3dobject.cxx index 041220be536f..3a0a65d27f8a 100644 --- a/xmloff/source/draw/ximp3dobject.cxx +++ b/xmloff/source/draw/ximp3dobject.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. @@ -123,66 +124,6 @@ void SdXML3DObjectContext::EndElement() SdXMLShapeContext::EndElement(); } -////////////////////////////////////////////////////////////////////////////// -/* -void SdXML3DObjectContext::AddShape(uno::Reference< drawing::XShape >& xShape) -{ - if(xShape.is() && mxShapes.is()) - { - // set shape local - mxShape = xShape; - - // add new shape to parent - mxShapes->add( xShape ); - } -} -*/ -////////////////////////////////////////////////////////////////////////////// -/* -void SdXML3DObjectContext::SetStyle() -{ - // set style on shape - if(maDrawStyleName.getLength() && mxShape.is()) - { - const SvXMLStyleContext* pStyle = 0L; - sal_Bool bAutoStyle(sal_False); - - if(GetImport().GetShapeImport()->GetAutoStylesContext()) - pStyle = GetImport().GetShapeImport()->GetAutoStylesContext()->FindStyleChildContext( - XML_STYLE_FAMILY_SD_GRAPHICS_ID, maDrawStyleName); - - if(pStyle) - bAutoStyle = sal_True; - - if(!pStyle && GetImport().GetShapeImport()->GetStylesContext()) - pStyle = GetImport().GetShapeImport()->GetStylesContext()-> - FindStyleChildContext(XML_STYLE_FAMILY_SD_GRAPHICS_ID, maDrawStyleName); - - if(pStyle && pStyle->ISA(XMLShapeStyleContext)) - { - uno::Reference< beans::XPropertySet > xPropSet(mxShape, uno::UNO_QUERY); - if(xPropSet.is()) - { - XMLShapeStyleContext* pDocStyle = (XMLShapeStyleContext*)pStyle; - - if(pDocStyle->GetStyle().is()) - { - // set style on object - uno::Any aAny; - aAny <<= pDocStyle->GetStyle(); - xPropSet->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Style")), aAny); - } - - if(bAutoStyle) - { - // set PropertySet on object - pDocStyle->FillPropertySet(xPropSet); - } - } - } - } -} -*/ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -611,3 +552,5 @@ void SdXML3DExtrudeObjectShapeContext::EndElement() } // EOF + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximp3dobject.hxx b/xmloff/source/draw/ximp3dobject.hxx index ee453d42b0df..05273a16cc6e 100644 --- a/xmloff/source/draw/ximp3dobject.hxx +++ b/xmloff/source/draw/ximp3dobject.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. @@ -49,10 +50,6 @@ protected: com::sun::star::drawing::HomogenMatrix mxHomMat; sal_Bool mbSetTransform; -/* - void SetStyle(); - void AddShape(com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape); -*/ public: TYPEINFO(); @@ -177,3 +174,5 @@ public: }; #endif // _XIMP3DOBJECT_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximp3dscene.cxx b/xmloff/source/draw/ximp3dscene.cxx index 37d60c761deb..e82c5635c784 100644 --- a/xmloff/source/draw/ximp3dscene.cxx +++ b/xmloff/source/draw/ximp3dscene.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. @@ -54,8 +55,8 @@ SdXML3DLightContext::SdXML3DLightContext( : SvXMLImportContext( rImport, nPrfx, rLName), maDiffuseColor(0x00000000), maDirection(0.0, 0.0, 1.0), - mbEnabled(sal_False), - mbSpecular(sal_False) + mbEnabled(false), + mbSpecular(false) { // read attributes for the 3DScene sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; @@ -231,7 +232,7 @@ SdXML3DSceneAttributesHelper::SdXML3DSceneAttributesHelper( SvXMLImport& rImport mnShadowSlant(0), mxShadeMode(drawing::ShadeMode_SMOOTH), maAmbientColor(0x00666666), - mbLightingMode(sal_False), + mbLightingMode(false), maVRP(0.0, 0.0, 1.0), maVPN(0.0, 0.0, 1.0), maVUP(0.0, 1.0, 0.0), @@ -244,8 +245,9 @@ SdXML3DSceneAttributesHelper::SdXML3DSceneAttributesHelper( SvXMLImport& rImport SdXML3DSceneAttributesHelper::~SdXML3DSceneAttributesHelper() { // release remembered light contexts, they are no longer needed - while(maList.Count()) - maList.Remove(maList.Count() - 1)->ReleaseRef(); + for ( size_t i = maList.size(); i > 0; ) + maList[ --i ]->ReleaseRef(); + maList.clear(); } /** creates a 3d ligth context and adds it to the internal list for later processing */ @@ -257,7 +259,7 @@ SvXMLImportContext * SdXML3DSceneAttributesHelper::create3DLightContext( sal_uIn if(pContext) { pContext->AddRef(); - maList.Insert((SdXML3DLightContext*)pContext, LIST_APPEND); + maList.push_back( (SdXML3DLightContext*)pContext ); } return pContext; @@ -395,15 +397,15 @@ void SdXML3DSceneAttributesHelper::setSceneAttributes( const com::sun::star::uno aAny <<= mbLightingMode; xPropSet->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("D3DSceneTwoSidedLighting")), aAny); - if(maList.Count()) + if( !maList.empty() ) { uno::Any aAny2; uno::Any aAny3; // set lights - for(sal_uInt32 a(0L); a < maList.Count(); a++) + for( size_t a = 0; a < maList.size(); a++) { - SdXML3DLightContext* pCtx = (SdXML3DLightContext*)maList.GetObject(a); + SdXML3DLightContext* pCtx = (SdXML3DLightContext*)maList[ a ]; // set anys aAny <<= pCtx->GetDiffuseColor().GetColor(); @@ -495,3 +497,5 @@ void SdXML3DSceneAttributesHelper::setSceneAttributes( const com::sun::star::uno aAny <<= mxPrjMode; xPropSet->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("D3DScenePerspective")), aAny); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximp3dscene.hxx b/xmloff/source/draw/ximp3dscene.hxx index de5703102f81..7ed5d9363476 100644 --- a/xmloff/source/draw/ximp3dscene.hxx +++ b/xmloff/source/draw/ximp3dscene.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. @@ -79,3 +80,5 @@ public: #endif // _XIMPGROUP_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximpbody.cxx b/xmloff/source/draw/ximpbody.cxx index dbd0eeaac601..38c82700e8e4 100644 --- a/xmloff/source/draw/ximpbody.cxx +++ b/xmloff/source/draw/ximpbody.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. @@ -386,3 +387,5 @@ SvXMLImportContext *SdXMLBodyContext::CreateChildContext( return pContext; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximpbody.hxx b/xmloff/source/draw/ximpbody.hxx index ac5ea1a53fa1..28fa1a985e0a 100644 --- a/xmloff/source/draw/ximpbody.hxx +++ b/xmloff/source/draw/ximpbody.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,5 @@ public: #endif // _XIMPBODY_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximpcustomshape.cxx b/xmloff/source/draw/ximpcustomshape.cxx index c0808153cc47..c593cab5cafa 100644 --- a/xmloff/source/draw/ximpcustomshape.cxx +++ b/xmloff/source/draw/ximpcustomshape.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,7 @@ #include <com/sun/star/drawing/EnhancedCustomShapeSegmentCommand.hpp> #include <com/sun/star/drawing/EnhancedCustomShapeTextPathMode.hpp> #include <com/sun/star/drawing/ProjectionMode.hpp> -#include <hash_map> +#include <boost/unordered_map.hpp> using namespace ::com::sun::star; using namespace ::xmloff::token; @@ -86,7 +87,7 @@ const SvXMLEnumMapEntry aXML_GluePointEnumMap[] = void GetBool( std::vector< com::sun::star::beans::PropertyValue >& rDest, const rtl::OUString& rValue, const EnhancedCustomShapeTokenEnum eDestProp ) { - sal_Bool bAttrBool; + bool bAttrBool; if ( SvXMLUnitConverter::convertBool( bAttrBool, rValue ) ) { beans::PropertyValue aProp; @@ -316,10 +317,10 @@ sal_Bool GetNextParameter( com::sun::star::drawing::EnhancedCustomShapeParameter if ( bNumberRequired ) { sal_Int32 nStartIndex = nIndex; + sal_Int32 nEIndex = 0; // index of "E" in double - sal_Bool bM = sal_False; // set if the value is negative sal_Bool bE = sal_False; // set if a double is including a "E" statement - sal_Bool bEM = sal_False; // set if a double is including a "E-"statement + sal_Bool bENum = sal_False; // there is at least one number after "E" sal_Bool bDot = sal_False; // set if there is a dot included sal_Bool bEnd = sal_False; // set for each value that can not be part of a double/integer @@ -347,11 +348,16 @@ sal_Bool GetNextParameter( com::sun::star::drawing::EnhancedCustomShapeParameter else { if ( nStartIndex == nIndex ) - bM = sal_True; + bValid = sal_True; else if ( bE ) - bEM = sal_True; - else - bValid = sal_False; + { + if ( nEIndex + 1 == nIndex ) + bValid = sal_True; + else if ( bENum ) + bEnd = sal_True; + else + bValid = sal_False; + } } } break; @@ -364,7 +370,10 @@ sal_Bool GetNextParameter( com::sun::star::drawing::EnhancedCustomShapeParameter else { if ( !bE ) + { bE = sal_True; + nEIndex = nIndex; + } else bEnd = sal_True; } @@ -380,6 +389,10 @@ sal_Bool GetNextParameter( com::sun::star::drawing::EnhancedCustomShapeParameter case '7' : case '8' : case '9' : + { + if ( bE && ! bENum ) + bENum = sal_True; + } break; default: bEnd = sal_True; @@ -882,7 +895,7 @@ void XMLEnhancedCustomShapeContext::StartElement( const uno::Reference< xml::sax double fFactor = SvXMLExportHelper::GetConversionFactor( aUnitStr, MAP_100TH_MM, eSrcUnit ); if ( ( fFactor != 1.0 ) && ( fFactor != 0.0 ) ) { - double fDepth; + double fDepth(0.0); if ( rDepth.Value >>= fDepth ) { fDepth /= fFactor; @@ -1132,7 +1145,7 @@ void SdXMLCustomShapePropertyMerge( std::vector< com::sun::star::beans::Property } } -typedef std::hash_map< rtl::OUString, sal_Int32, rtl::OUStringHash, OUStringEqFunc> EquationHashMap; +typedef boost::unordered_map< rtl::OUString, sal_Int32, rtl::OUStringHash, OUStringEqFunc> EquationHashMap; /* if rPara.Type is from type EnhancedCustomShapeParameterType::EQUATION, the name of the equation will be converted from rtl::OUString to index */ @@ -1164,7 +1177,7 @@ void XMLEnhancedCustomShapeContext::EndElement() while( aEquationNameIter != aEquationNameEnd ) { (*pH)[ *aEquationNameIter ] = (sal_Int32)( aEquationNameIter - maEquationNames.begin() ); - aEquationNameIter++; + ++aEquationNameIter; } // resolve equation @@ -1195,7 +1208,7 @@ void XMLEnhancedCustomShapeContext::EndElement() } } while( nIndexOf != -1 ); - aEquationIter++; + ++aEquationIter; } // Path @@ -1236,7 +1249,7 @@ void XMLEnhancedCustomShapeContext::EndElement() default: break; } - aPathIter++; + ++aPathIter; } std::vector< beans::PropertyValues >::iterator aHandleIter = maHandles.begin(); std::vector< beans::PropertyValues >::iterator aHandleEnd = maHandles.end(); @@ -1273,7 +1286,7 @@ void XMLEnhancedCustomShapeContext::EndElement() } pValues++; } - aHandleIter++; + ++aHandleIter; } delete pH; } @@ -1382,3 +1395,5 @@ SvXMLImportContext* XMLEnhancedCustomShapeContext::CreateChildContext( sal_uInt1 } return SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximpcustomshape.hxx b/xmloff/source/draw/ximpcustomshape.hxx index 76ed03c19f3b..dd12d2f39d6b 100644 --- a/xmloff/source/draw/ximpcustomshape.hxx +++ b/xmloff/source/draw/ximpcustomshape.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/draw/ximpgrp.cxx b/xmloff/source/draw/ximpgrp.cxx index 18a75f3bfe83..c582e03d9a28 100644 --- a/xmloff/source/draw/ximpgrp.cxx +++ b/xmloff/source/draw/ximpgrp.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. @@ -128,3 +129,4 @@ void SdXMLGroupShapeContext::EndElement() } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximpgrp.hxx b/xmloff/source/draw/ximpgrp.hxx index 901b0c432d11..9295a75fe1f9 100644 --- a/xmloff/source/draw/ximpgrp.hxx +++ b/xmloff/source/draw/ximpgrp.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 // _XIMPGROUP_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximplink.cxx b/xmloff/source/draw/ximplink.cxx index 89d5349bab64..4228a0ec6153 100644 --- a/xmloff/source/draw/ximplink.cxx +++ b/xmloff/source/draw/ximplink.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 @@ void SdXMLShapeLinkContext::EndElement() } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximplink.hxx b/xmloff/source/draw/ximplink.hxx index edcb6cbf811c..10a33bfdc3fd 100644 --- a/xmloff/source/draw/ximplink.hxx +++ b/xmloff/source/draw/ximplink.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 // _XIMPLINK_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximpnote.cxx b/xmloff/source/draw/ximpnote.cxx index 7330ab85a0e4..af85ef818978 100644 --- a/xmloff/source/draw/ximpnote.cxx +++ b/xmloff/source/draw/ximpnote.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. @@ -140,3 +141,5 @@ void SdXMLNotesContext::EndElement() { SdXMLGenericPageContext::EndElement(); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximpnote.hxx b/xmloff/source/draw/ximpnote.hxx index 5217b9a7dc34..ad9b654ac3db 100644 --- a/xmloff/source/draw/ximpnote.hxx +++ b/xmloff/source/draw/ximpnote.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. @@ -56,3 +57,5 @@ public: #endif // _XIMPNOTES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx index 663ad84165e8..04d750776971 100644 --- a/xmloff/source/draw/ximppage.cxx +++ b/xmloff/source/draw/ximppage.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. @@ -360,7 +361,7 @@ void SdXMLGenericPageContext::EndElement() catch( uno::Exception& e ) { (void)e; - DBG_ERROR("xmloff::SdXMLGenericPageContext::EndElement(), unexpected exception cought!"); + OSL_FAIL("xmloff::SdXMLGenericPageContext::EndElement(), unexpected exception cought!"); } } @@ -427,7 +428,7 @@ void SdXMLGenericPageContext::SetStyle( rtl::OUString& rStyleName ) } catch( uno::Exception ) { - DBG_ERROR( "SdXMLGenericPageContext::SetStyle(): uno::Exception catched!" ); + OSL_FAIL( "SdXMLGenericPageContext::SetStyle(): uno::Exception catched!" ); } } } @@ -631,7 +632,7 @@ void SdXMLGenericPageContext::SetNavigationOrder() { if( !aShapes[nIndex].is() ) { - DBG_ERROR("xmloff::SdXMLGenericPageContext::SetNavigationOrder(), draw:nav-order attribute incomplete!"); + OSL_FAIL("xmloff::SdXMLGenericPageContext::SetNavigationOrder(), draw:nav-order attribute incomplete!"); // todo: warning? return; } @@ -642,6 +643,8 @@ void SdXMLGenericPageContext::SetNavigationOrder() } catch( uno::Exception& ) { - DBG_ERROR("xmloff::SdXMLGenericPageContext::SetNavigationOrder(), unexpected exception cought while importing shape navigation order!"); + OSL_FAIL("xmloff::SdXMLGenericPageContext::SetNavigationOrder(), unexpected exception cought while importing shape navigation order!"); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximppage.hxx b/xmloff/source/draw/ximppage.hxx index 29495748b6be..697db6aa1a96 100644 --- a/xmloff/source/draw/ximppage.hxx +++ b/xmloff/source/draw/ximppage.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. @@ -94,3 +95,5 @@ public: #endif // _XIMPGROUP_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index 552c731230af..2179fdc2922e 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.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. @@ -86,10 +87,7 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <tools/string.hxx> #include <com/sun/star/drawing/XEnhancedCustomShapeDefaulter.hpp> - -// --> OD 2006-02-22 #b6382898# #include <com/sun/star/text/XTextDocument.hpp> -// <-- using ::rtl::OUString; using ::rtl::OUStringBuffer; @@ -339,7 +337,7 @@ void SdXMLShapeContext::addGluePoint( const uno::Reference< xml::sax::XAttribute } catch( uno::Exception& ) { - DBG_ERROR( "exception during setting of glue points!"); + OSL_FAIL( "exception during setting of glue points!"); } } } @@ -374,9 +372,14 @@ void SdXMLShapeContext::EndElement() if( msHyperlink.getLength() != 0 ) try { + uno::Reference< beans::XPropertySet > xProp( mxShape, uno::UNO_QUERY ); + + rtl::OUString sLink( RTL_CONSTASCII_USTRINGPARAM( "Hyperlink" ) ); + if ( xProp.is() && xProp->getPropertySetInfo()->hasPropertyByName( sLink ) ) + xProp->setPropertyValue( sLink, uno::Any( msHyperlink ) ); + Reference< XEventsSupplier > xEventsSupplier( mxShape, UNO_QUERY_THROW ); const OUString sBookmark( RTL_CONSTASCII_USTRINGPARAM( "Bookmark" ) ); - Reference< XEventsSupplier > xEventsSupplier( mxShape, UNO_QUERY ); if( xEventsSupplier.is() ) { const OUString sEventType( RTL_CONSTASCII_USTRINGPARAM( "EventType" ) ); @@ -413,7 +416,7 @@ void SdXMLShapeContext::EndElement() } catch( Exception& ) { - DBG_ERROR("xmloff::SdXMLShapeContext::EndElement(), exception caught while setting hyperlink!"); + OSL_FAIL("xmloff::SdXMLShapeContext::EndElement(), exception caught while setting hyperlink!"); } if( mxLockable.is() ) @@ -457,7 +460,7 @@ void SdXMLShapeContext::AddShape(uno::Reference< drawing::XShape >& xShape) } catch( Exception& ) { - DBG_ERROR( "SdXMLShapeContext::AddShape(), exception caught!" ); + OSL_FAIL( "SdXMLShapeContext::AddShape(), exception caught!" ); } // #107848# @@ -497,23 +500,22 @@ void SdXMLShapeContext::AddShape(const char* pServiceName ) { try { - // --> OD 2006-02-22 #b6382898# - // Since fix for issue i33294 the Writer model doesn't support - // com.sun.star.drawing.OLE2Shape anymore. - // To handle Draw OLE objects it's decided to import these - // objects as com.sun.star.drawing.OLE2Shape and convert these - // objects after the import into com.sun.star.drawing.GraphicObjectShape. + /* Since fix for issue i33294 the Writer model doesn't support + com.sun.star.drawing.OLE2Shape anymore. + To handle Draw OLE objects it's decided to import these + objects as com.sun.star.drawing.OLE2Shape and convert these + objects after the import into com.sun.star.drawing.GraphicObjectShape. + */ uno::Reference< drawing::XShape > xShape; if ( OUString::createFromAscii(pServiceName).compareToAscii( "com.sun.star.drawing.OLE2Shape" ) == 0 && uno::Reference< text::XTextDocument >(GetImport().GetModel(), uno::UNO_QUERY).is() ) { - xShape = uno::Reference< drawing::XShape >(xServiceFact->createInstance(OUString::createFromAscii("com.sun.star.drawing.temporaryForXMLImportOLE2Shape")), uno::UNO_QUERY); + xShape = uno::Reference< drawing::XShape >(xServiceFact->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.temporaryForXMLImportOLE2Shape"))), uno::UNO_QUERY); } else { xShape = uno::Reference< drawing::XShape >(xServiceFact->createInstance(OUString::createFromAscii(pServiceName)), uno::UNO_QUERY); } - // <-- if( xShape.is() ) AddShape( xShape ); } @@ -686,7 +688,7 @@ void SdXMLShapeContext::SetStyle( bool bSupportsStyle /* = true */) } catch( uno::Exception& ) { - DBG_ERROR( "could not find style for shape!" ); + OSL_FAIL( "could not find style for shape!" ); } } @@ -701,7 +703,7 @@ void SdXMLShapeContext::SetStyle( bool bSupportsStyle /* = true */) } catch( uno::Exception& ) { - DBG_ERROR( "could not find style for shape!" ); + OSL_FAIL( "could not find style for shape!" ); } } @@ -989,7 +991,7 @@ void SdXMLRectShapeContext::StartElement(const uno::Reference< xml::sax::XAttrib } catch( uno::Exception& ) { - DBG_ERROR( "exception during setting of corner radius!"); + OSL_FAIL( "exception during setting of corner radius!"); } } } @@ -1642,7 +1644,7 @@ void SdXMLTextBoxShapeContext::StartElement(const uno::Reference< xml::sax::XAtt } catch( uno::Exception& ) { - DBG_ERROR( "exception during setting of corner radius!"); + OSL_FAIL( "exception during setting of corner radius!"); } } } @@ -1700,7 +1702,6 @@ void SdXMLControlShapeContext::StartElement(const uno::Reference< xml::sax::XAtt DBG_ASSERT( maFormId.getLength(), "draw:control without a form:id attribute!" ); if( maFormId.getLength() ) { -#ifndef SVX_LIGHT if( GetImport().IsFormsSupported() ) { uno::Reference< awt::XControlModel > xControlModel( GetImport().GetFormImport()->lookupControl( maFormId ), uno::UNO_QUERY ); @@ -1712,7 +1713,6 @@ void SdXMLControlShapeContext::StartElement(const uno::Reference< xml::sax::XAtt } } -#endif // #ifndef SVX_LIGHT } SetStyle(); @@ -1927,7 +1927,7 @@ void SdXMLConnectorShapeContext::StartElement(const uno::Reference< xml::sax::XA if ( maPath.hasValue() ) { - // --> OD #i115492# + // #i115492# // Ignore svg:d attribute for text documents created by OpenOffice.org // versions before OOo 3.3, because these OOo versions are storing // svg:d values not using the correct unit. @@ -1953,7 +1953,6 @@ void SdXMLConnectorShapeContext::StartElement(const uno::Reference< xml::sax::XA { xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("PolyPolygonBezier") ), maPath ); } - // <-- } SdXMLShapeContext::StartElement(xAttrList); @@ -2245,7 +2244,7 @@ void SdXMLCaptionShapeContext::StartElement(const uno::Reference< xml::sax::XAtt } catch( uno::Exception& ) { - DBG_ERROR( "exception during setting of corner radius!"); + OSL_FAIL( "exception during setting of corner radius!"); } } } @@ -2510,14 +2509,12 @@ void SdXMLChartShapeContext::StartElement(const uno::Reference< xml::sax::XAttri aAny <<= aCLSID; xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("CLSID") ), aAny ); -#ifndef SVX_LIGHT aAny = xProps->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Model") ) ); uno::Reference< frame::XModel > xChartModel; if( aAny >>= xChartModel ) { mpChartContext = GetImport().GetChartImport()->CreateChartContext( GetImport(), XML_NAMESPACE_SVG, GetXMLToken(XML_CHART), xChartModel, xAttrList ); } -#endif } } @@ -3334,9 +3331,16 @@ SvXMLImportContext *SdXMLFrameShapeContext::CreateChildContext( sal_uInt16 nPref if( !mxImplContext.Is() ) { - pContext = GetImport().GetShapeImport()->CreateFrameChildContext( + + SvXMLShapeContext* pShapeContext= GetImport().GetShapeImport()->CreateFrameChildContext( GetImport(), nPrefix, rLocalName, xAttrList, mxShapes, mxAttrList ); + pContext = pShapeContext; + + // propagate the hyperlink to child context + if ( msHyperlink.getLength() > 0 ) + pShapeContext->setHyperlink( msHyperlink ); + mxImplContext = pContext; mbSupportsReplacement = IsXMLToken( rLocalName, XML_OBJECT ) || IsXMLToken( rLocalName, XML_OBJECT_OLE ); @@ -3540,7 +3544,7 @@ void SdXMLCustomShapeContext::StartElement( const uno::Reference< xml::sax::XAtt } catch( uno::Exception& ) { - DBG_ERROR( "could not set enhanced customshape geometry" ); + OSL_FAIL( "could not set enhanced customshape geometry" ); } SdXMLShapeContext::StartElement(xAttrList); } @@ -3572,7 +3576,7 @@ void SdXMLCustomShapeContext::EndElement() } catch( uno::Exception& ) { - DBG_ERROR( "could not set enhanced customshape geometry" ); + OSL_FAIL( "could not set enhanced customshape geometry" ); } sal_Int32 nUPD( 0 ); @@ -3683,7 +3687,7 @@ void SdXMLTableShapeContext::StartElement( const ::com::sun::star::uno::Referenc } catch( Exception& ) { - DBG_ERROR("SdXMLTableShapeContext::StartElement(), exception caught!"); + OSL_FAIL("SdXMLTableShapeContext::StartElement(), exception caught!"); } const XMLPropertyMapEntry* pEntry = &aXMLTableShapeAttributes[0]; @@ -3696,7 +3700,7 @@ void SdXMLTableShapeContext::StartElement( const ::com::sun::star::uno::Referenc } catch( Exception& ) { - DBG_ERROR("SdXMLTableShapeContext::StartElement(), exception caught!"); + OSL_FAIL("SdXMLTableShapeContext::StartElement(), exception caught!"); } } } @@ -3769,3 +3773,4 @@ SvXMLImportContext* SdXMLTableShapeContext::CreateChildContext( sal_uInt16 nPref return SdXMLShapeContext::CreateChildContext(nPrefix, rLocalName, xAttrList); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximpshap.hxx b/xmloff/source/draw/ximpshap.hxx index 2284beb6ce0e..c86ed7915950 100644 --- a/xmloff/source/draw/ximpshap.hxx +++ b/xmloff/source/draw/ximpshap.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. @@ -662,3 +663,5 @@ private: }; #endif // _XIMPSHAPE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximpshow.cxx b/xmloff/source/draw/ximpshow.cxx index b18ff7d5c837..02717ace72d5 100644 --- a/xmloff/source/draw/ximpshow.cxx +++ b/xmloff/source/draw/ximpshow.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. @@ -280,3 +281,4 @@ SvXMLImportContext * SdXMLShowsContext::CreateChildContext( sal_uInt16 p_nPrefix return new SvXMLImportContext( GetImport(), p_nPrefix, rLocalName ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximpshow.hxx b/xmloff/source/draw/ximpshow.hxx index 121deff67cfd..79109ce260b6 100644 --- a/xmloff/source/draw/ximpshow.hxx +++ b/xmloff/source/draw/ximpshow.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,4 @@ public: #endif // _XMLOFF_XIMPSHOW_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx index 2de7fc88c838..dad2aa296dee 100644 --- a/xmloff/source/draw/ximpstyl.cxx +++ b/xmloff/source/draw/ximpstyl.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. @@ -525,7 +526,7 @@ SvXMLImportContext *SdXMLPresentationPageLayoutContext::CreateChildContext( if(pContext) { pContext->AddRef(); - maList.Insert((SdXMLPresentationPlaceholderContext*)pContext, LIST_APPEND); + maList.push_back( (SdXMLPresentationPlaceholderContext*)pContext ); } } @@ -541,12 +542,12 @@ void SdXMLPresentationPageLayoutContext::EndElement() // build presentation page layout type here // calc mnTpeId due to content of maList // at the moment only use number of types used there - if(maList.Count()) + if( !maList.empty() ) { - SdXMLPresentationPlaceholderContext* pObj0 = maList.GetObject(0); + SdXMLPresentationPlaceholderContext* pObj0 = maList[ 0 ]; if(pObj0->GetName().equals(OUString(RTL_CONSTASCII_USTRINGPARAM("handout")))) { - switch( maList.Count() ) + switch( maList.size() ) { case 1: mnTypeId = 22; // AUTOLAYOUT_HANDOUT1 @@ -569,7 +570,7 @@ void SdXMLPresentationPageLayoutContext::EndElement() } else { - switch(maList.Count()) + switch( maList.size() ) { case 1: { @@ -585,7 +586,7 @@ void SdXMLPresentationPageLayoutContext::EndElement() } case 2: { - SdXMLPresentationPlaceholderContext* pObj1 = maList.GetObject(1); + SdXMLPresentationPlaceholderContext* pObj1 = maList[ 1 ]; if(pObj1->GetName().equals( OUString(RTL_CONSTASCII_USTRINGPARAM("subtitle")))) @@ -634,8 +635,8 @@ void SdXMLPresentationPageLayoutContext::EndElement() } case 3: { - SdXMLPresentationPlaceholderContext* pObj1 = maList.GetObject(1); - SdXMLPresentationPlaceholderContext* pObj2 = maList.GetObject(2); + SdXMLPresentationPlaceholderContext* pObj1 = maList[ 1 ]; + SdXMLPresentationPlaceholderContext* pObj2 = maList[ 2 ]; if(pObj1->GetName().equals( OUString(RTL_CONSTASCII_USTRINGPARAM("outline")))) @@ -706,8 +707,8 @@ void SdXMLPresentationPageLayoutContext::EndElement() } case 4: { - SdXMLPresentationPlaceholderContext* pObj1 = maList.GetObject(1); - SdXMLPresentationPlaceholderContext* pObj2 = maList.GetObject(2); + SdXMLPresentationPlaceholderContext* pObj1 = maList[ 1 ]; + SdXMLPresentationPlaceholderContext* pObj2 = maList[ 2 ]; if(pObj1->GetName().equals( OUString(RTL_CONSTASCII_USTRINGPARAM("object")))) @@ -729,7 +730,7 @@ void SdXMLPresentationPageLayoutContext::EndElement() } case 5: { - SdXMLPresentationPlaceholderContext* pObj1 = maList.GetObject(1); + SdXMLPresentationPlaceholderContext* pObj1 = maList[ 1 ]; if(pObj1->GetName().equals( OUString(RTL_CONSTASCII_USTRINGPARAM("object")))) @@ -757,8 +758,9 @@ void SdXMLPresentationPageLayoutContext::EndElement() } // release remembered contexts, they are no longer needed - while(maList.Count()) - maList.Remove(maList.Count() - 1)->ReleaseRef(); + for ( size_t i = maList.size(); i > 0; ) + maList[ --i ]->ReleaseRef(); + maList.clear(); } } @@ -1017,14 +1019,8 @@ SdXMLStylesContext::SdXMLStylesContext( : SvXMLStylesContext(rImport, nPrfx, rLName, xAttrList), mbIsAutoStyle(bIsAutoStyle) { - // #110680# - // Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); Reference< lang::XMultiServiceFactory > xMSF = rImport.getServiceFactory(); - mpNumFormatter = new SvNumberFormatter( xMSF, LANGUAGE_SYSTEM ); - - // #110680# - // mpNumFmtHelper = new SvXMLNumFmtHelper( mpNumFormatter ); mpNumFmtHelper = new SvXMLNumFmtHelper( mpNumFormatter, xMSF ); } @@ -1164,21 +1160,6 @@ SvXMLStyleContext* SdXMLStylesContext::CreateDefaultStyleStyleChildContext( sal_uInt16 SdXMLStylesContext::GetFamily( const OUString& rFamily ) const { -// if(rFamily.getLength()) -// { -// if(rFamily.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_GRAPHICS_NAME)))) -// return XML_STYLE_FAMILY_SD_GRAPHICS_ID; -// -// if(rFamily.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_PRESENTATION_NAME)))) -// return XML_STYLE_FAMILY_SD_PRESENTATION_ID; -// -// if(rFamily.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_POOL_NAME)))) -// return XML_STYLE_FAMILY_SD_POOL_ID; -// -// if(rFamily.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_DRAWINGPAGE_NAME)))) -// return XML_STYLE_FAMILY_SD_DRAWINGPAGE_ID; -// } - // call base class return SvXMLStylesContext::GetFamily(rFamily); } @@ -1190,20 +1171,6 @@ UniReference< SvXMLImportPropertyMapper > SdXMLStylesContext::GetImportPropertyM { UniReference < SvXMLImportPropertyMapper > xMapper; -// if(XML_STYLE_FAMILY_SD_GRAPHICS_ID == nFamily -// || XML_STYLE_FAMILY_SD_PRESENTATION_ID == nFamily -// || XML_STYLE_FAMILY_SD_POOL_ID == nFamily) -// { -// if(!xPropImpPropMapper.is()) -// { -// UniReference< XMLShapeImportHelper > aImpHelper = ((SvXMLImport&)GetImport()).GetShapeImport(); -// ((SdXMLStylesContext*)this)->xPropImpPropMapper = -// new SvXMLImportPropertyMapper(aImpHelper->GetPropertySetMapper()); -// } -// xMapper = xPropImpPropMapper; -// return xMapper; -// } - switch( nFamily ) { case XML_STYLE_FAMILY_SD_DRAWINGPAGE_ID: @@ -1263,7 +1230,6 @@ void SdXMLStylesContext::EndElement() if(pStyle && pStyle->ISA(XMLShapeStyleContext)) { XMLShapeStyleContext* pDocStyle = (XMLShapeStyleContext*)pStyle; -// pDocStyle->Filter(); SvXMLStylesContext* pStylesContext = GetSdImport().GetShapeImport()->GetStylesContext(); if( pStylesContext ) @@ -1310,7 +1276,7 @@ void SdXMLStylesContext::EndElement() // void SdXMLStylesContext::SetMasterPageStyles(SdXMLMasterPageContext& rMaster) const { - UniString sPrefix(rMaster.GetDisplayName(), (sal_uInt16)rMaster.GetDisplayName().getLength()); + UniString sPrefix(rMaster.GetDisplayName()); sPrefix += sal_Unicode('-'); if(GetSdImport().GetLocalDocStyleFamilies().is() && GetSdImport().GetLocalDocStyleFamilies()->hasByName(rMaster.GetDisplayName())) try @@ -1320,7 +1286,7 @@ void SdXMLStylesContext::SetMasterPageStyles(SdXMLMasterPageContext& rMaster) co } catch( uno::Exception& ) { - DBG_ERROR( "xmloff::SdXMLStylesContext::SetMasterPageStyles(), exception caught!" ); + OSL_FAIL( "xmloff::SdXMLStylesContext::SetMasterPageStyles(), exception caught!" ); } } @@ -1340,7 +1306,7 @@ void SdXMLStylesContext::ImpSetGraphicStyles() const } catch( uno::Exception& ) { - DBG_ERROR( "xmloff::SdXMLStylesContext::ImpSetGraphicStyles(), exception caught!" ); + OSL_FAIL( "xmloff::SdXMLStylesContext::ImpSetGraphicStyles(), exception caught!" ); } } @@ -1356,7 +1322,7 @@ void SdXMLStylesContext::ImpSetCellStyles() const } catch( uno::Exception& ) { - DBG_ERROR( "xmloff::SdXMLStylesContext::ImpSetCellStyles(), exception caught!" ); + OSL_FAIL( "xmloff::SdXMLStylesContext::ImpSetCellStyles(), exception caught!" ); } } @@ -1551,8 +1517,9 @@ SdXMLMasterStylesContext::SdXMLMasterStylesContext( SdXMLMasterStylesContext::~SdXMLMasterStylesContext() { - while(maMasterPageList.Count()) - maMasterPageList.Remove(maMasterPageList.Count() - 1)->ReleaseRef(); + for ( size_t i = maMasterPageList.size(); i > 0; ) + maMasterPageList[ --i ]->ReleaseRef(); + maMasterPageList.clear(); } SvXMLImportContext* SdXMLMasterStylesContext::CreateChildContext( @@ -1596,7 +1563,7 @@ SvXMLImportContext* SdXMLMasterStylesContext::CreateChildContext( if(pContext) { pContext->AddRef(); - maMasterPageList.Insert((SdXMLMasterPageContext*)pContext, LIST_APPEND); + maMasterPageList.push_back( (SdXMLMasterPageContext*)pContext ); } } } @@ -1690,3 +1657,4 @@ void SdXMLHeaderFooterDeclContext::Characters( const ::rtl::OUString& rChars ) maStrText += rChars; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximpstyl.hxx b/xmloff/source/draw/ximpstyl.hxx index f3311e3b4708..fc8cfcf25142 100644 --- a/xmloff/source/draw/ximpstyl.hxx +++ b/xmloff/source/draw/ximpstyl.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. @@ -33,6 +34,7 @@ #include "ximppage.hxx" #include <xmloff/xmlstyle.hxx> #include <com/sun/star/view/PaperOrientation.hpp> +#include <vector> class SvNumberFormatter; class SvXMLNumFmtHelper; @@ -133,7 +135,7 @@ public: const rtl::OUString& GetDisplayName() const { return msDisplayName; } }; -DECLARE_LIST(ImpMasterPageList, SdXMLMasterPageContext*) +typedef ::std::vector< SdXMLMasterPageContext* > ImpMasterPageList; ////////////////////////////////////////////////////////////////////////////// // presentation:placeholder context @@ -163,7 +165,7 @@ public: sal_Int32 GetWidth() const { return mnWidth; } sal_Int32 GetHeight() const { return mnHeight; } }; -DECLARE_LIST(ImpPlaceholderList, SdXMLPresentationPlaceholderContext*) +typedef ::std::vector< SdXMLPresentationPlaceholderContext* > ImpPlaceholderList; ////////////////////////////////////////////////////////////////////////////// // style:presentation-page-layout context @@ -300,3 +302,5 @@ private: #endif // _XIMPSTYLE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/attriblistmerge.cxx b/xmloff/source/forms/attriblistmerge.cxx index 0a057377e91f..776e74d9aed3 100644 --- a/xmloff/source/forms/attriblistmerge.cxx +++ b/xmloff/source/forms/attriblistmerge.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 @@ namespace xmloff if (aLookupSublist == m_aLists.end()) { - OSL_ENSURE(sal_False, "OAttribListMerger::seekToIndex: invalid index!"); + OSL_FAIL("OAttribListMerger::seekToIndex: invalid index!"); return sal_False; } _rSubList = *aLookupSublist; @@ -84,7 +85,7 @@ namespace xmloff return sal_True; } - OSL_ENSURE(sal_False, "OAttribListMerger::seekToName: did not find the name!"); + OSL_FAIL("OAttribListMerger::seekToName: did not find the name!"); return sal_False; } @@ -168,3 +169,4 @@ namespace xmloff } // namespace xmloff //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/attriblistmerge.hxx b/xmloff/source/forms/attriblistmerge.hxx index 7d88060a5eed..d91917365309 100644 --- a/xmloff/source/forms/attriblistmerge.hxx +++ b/xmloff/source/forms/attriblistmerge.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. @@ -83,3 +84,4 @@ namespace xmloff #endif // _XMLOFF_FORMS_ATTRIBLISTMERGE_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/callbacks.hxx b/xmloff/source/forms/callbacks.hxx index d0013220bddb..4bf0f7de2690 100644 --- a/xmloff/source/forms/callbacks.hxx +++ b/xmloff/source/forms/callbacks.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. @@ -32,7 +33,7 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/script/ScriptEventDescriptor.hpp> -#include <vos/ref.hxx> +#include <rtl/ref.hxx> class SvXMLImport; class SvXMLExport; @@ -53,7 +54,7 @@ namespace xmloff { public: virtual SvXMLExport& getGlobalContext() = 0; - virtual ::vos::ORef< SvXMLExportPropertyMapper > getStylePropertyMapper() = 0; + virtual ::rtl::Reference< SvXMLExportPropertyMapper > getStylePropertyMapper() = 0; /** steps through a collection and exports all children of this collection */ @@ -93,3 +94,4 @@ namespace xmloff #endif // _XMLOFF_FORMS_CALLBACKS_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/controlelement.cxx b/xmloff/source/forms/controlelement.cxx index 748cf68c23ed..7c7e82b9b9a8 100644 --- a/xmloff/source/forms/controlelement.cxx +++ b/xmloff/source/forms/controlelement.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,3 +71,4 @@ namespace xmloff } // namespace xmloff //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/controlelement.hxx b/xmloff/source/forms/controlelement.hxx index d226f218f426..3da3d6874ccc 100644 --- a/xmloff/source/forms/controlelement.hxx +++ b/xmloff/source/forms/controlelement.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. @@ -93,3 +94,4 @@ namespace xmloff #endif // _XMLOFF_FORMS_CONTROLELEMENT_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/controlpropertyhdl.cxx b/xmloff/source/forms/controlpropertyhdl.cxx index 1cc5e5442764..8823e7623765 100644 --- a/xmloff/source/forms/controlpropertyhdl.cxx +++ b/xmloff/source/forms/controlpropertyhdl.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. @@ -388,3 +389,4 @@ namespace xmloff } // namespace xmloff //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/controlpropertymap.cxx b/xmloff/source/forms/controlpropertymap.cxx index aed0b8c4e190..abc9f60a14e4 100644 --- a/xmloff/source/forms/controlpropertymap.cxx +++ b/xmloff/source/forms/controlpropertymap.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 <xmloff/xmltoken.hxx> #include <xmloff/maptype.hxx> #include <xmloff/xmltypes.hxx> -#ifndef __SGI_STL_ALGORITHM #include <algorithm> -#endif #include "strings.hxx" #include <xmloff/contextid.hxx> #include "controlpropertymap.hxx" @@ -154,3 +153,4 @@ namespace xmloff //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/controlpropertymap.hxx b/xmloff/source/forms/controlpropertymap.hxx index 35201a76d190..16975e2560bd 100644 --- a/xmloff/source/forms/controlpropertymap.hxx +++ b/xmloff/source/forms/controlpropertymap.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. @@ -66,3 +67,4 @@ namespace xmloff #endif // _XMLOFF_FORMS_CONTROLPROPERTYMAP_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx index 1126583f9a45..ca97ad0d6d47 100644 --- a/xmloff/source/forms/elementexport.cxx +++ b/xmloff/source/forms/elementexport.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,7 @@ #include <tools/time.hxx> #include <tools/diagnose_ex.h> #include <comphelper/extract.hxx> +#include <sal/macros.h> #include <stdio.h> #include <algorithm> @@ -179,7 +181,7 @@ namespace xmloff Reference< XPersistObject > xPersistence(m_xProps, UNO_QUERY); if (!xPersistence.is()) { - OSL_ENSURE(sal_False, "OElementExport::exportServiceNameAttribute: no XPersistObject!"); + OSL_FAIL("OElementExport::exportServiceNameAttribute: no XPersistObject!"); return; } @@ -387,7 +389,7 @@ namespace xmloff // (the strikeout type), the latter hasn't. But, when the CharCrossedOut is exported and // later on imported, it overwrites anything which has previously been imported for // CharStrikeout. - // 2004-04-14 - #i27729# - fs@openoffice.org + // #i27729# exportedProperty( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharCrossedOut" ) ) ); } @@ -416,7 +418,7 @@ namespace xmloff case LISTBOX: // don't export the list entries if the are not provided by the user, but obtained implicitly // from other sources - // #i26944# - 2004-05-17 - fs@openoffice.org + // #i26944# if ( controlHasUserSuppliedListEntries() ) exportListSourceAsElements(); break; @@ -434,7 +436,7 @@ namespace xmloff // don't export the list entries if the are not provided by the user, but obtained implicitly // from other sources - // #i26944# - 2004-05-17 - fs@openoffice.org + // #i26944# if ( controlHasUserSuppliedListEntries() ) { // get the item list @@ -581,11 +583,10 @@ namespace xmloff { PROPERTY_LABEL, PROPERTY_TITLE }; - OSL_ENSURE( sizeof(aStringPropertyNames)/sizeof(aStringPropertyNames[0]) == - sizeof(nStringPropertyAttributeIds)/sizeof(nStringPropertyAttributeIds[0]), + OSL_ENSURE( SAL_N_ELEMENTS(aStringPropertyNames) == SAL_N_ELEMENTS(nStringPropertyAttributeIds), "OControlExport::exportCommonControlAttributes: somebody tampered with the maps (1)!"); - for (i=0; i<sizeof(nStringPropertyAttributeIds)/sizeof(nStringPropertyAttributeIds[0]); ++i) + for (i=0; i < SAL_N_ELEMENTS(nStringPropertyAttributeIds); ++i) if (nStringPropertyAttributeIds[i] & m_nIncludeCommon) { exportStringPropertyAttribute( @@ -616,13 +617,13 @@ namespace xmloff BOOLATTR_DEFAULT_FALSE, BOOLATTR_DEFAULT_FALSE | BOOLATTR_INVERSE_SEMANTICS, BOOLATTR_DEFAULT_FALSE, BOOLATTR_DEFAULT_TRUE, BOOLATTR_DEFAULT_FALSE, BOOLATTR_DEFAULT_FALSE, BOOLATTR_DEFAULT_VOID, BOOLATTR_DEFAULT_FALSE }; #if OSL_DEBUG_LEVEL > 0 - sal_Int32 nIdCount = sizeof(nBooleanPropertyAttributeIds) / sizeof(nBooleanPropertyAttributeIds[0]); - sal_Int32 nNameCount = sizeof(pBooleanPropertyNames) / sizeof(pBooleanPropertyNames[0]); - sal_Int32 nFlagsCount = sizeof(nBooleanPropertyAttrFlags) / sizeof(nBooleanPropertyAttrFlags[0]); + sal_Int32 nIdCount = SAL_N_ELEMENTS(nBooleanPropertyAttributeIds); + sal_Int32 nNameCount = SAL_N_ELEMENTS(pBooleanPropertyNames); + sal_Int32 nFlagsCount = SAL_N_ELEMENTS(nBooleanPropertyAttrFlags); OSL_ENSURE((nIdCount == nNameCount) && (nNameCount == nFlagsCount), "OControlExport::exportCommonControlAttributes: somebody tampered with the maps (2)!"); #endif - for (i=0; i<sizeof(nBooleanPropertyAttributeIds)/sizeof(nBooleanPropertyAttributeIds[0]); ++i) + for (i=0; i < SAL_N_ELEMENTS(nBooleanPropertyAttributeIds); ++i) if (nBooleanPropertyAttributeIds[i] & m_nIncludeCommon) { exportBooleanPropertyAttribute( @@ -659,13 +660,13 @@ namespace xmloff exportedProperty(PROPERTY_MAXTEXTLENGTH); #if OSL_DEBUG_LEVEL > 0 - sal_Int32 nIdCount = sizeof(nIntegerPropertyAttributeIds) / sizeof(nIntegerPropertyAttributeIds[0]); - sal_Int32 nNameCount = sizeof(pIntegerPropertyNames) / sizeof(pIntegerPropertyNames[0]); - sal_Int32 nDefaultCount = sizeof(nIntegerPropertyAttrDefaults) / sizeof(nIntegerPropertyAttrDefaults[0]); + sal_Int32 nIdCount = SAL_N_ELEMENTS(nIntegerPropertyAttributeIds); + sal_Int32 nNameCount = SAL_N_ELEMENTS(pIntegerPropertyNames); + sal_Int32 nDefaultCount = SAL_N_ELEMENTS(nIntegerPropertyAttrDefaults); OSL_ENSURE((nIdCount == nNameCount) && (nNameCount == nDefaultCount), "OControlExport::exportCommonControlAttributes: somebody tampered with the maps (3)!"); #endif - for (i=0; i<sizeof(nIntegerPropertyAttributeIds)/sizeof(nIntegerPropertyAttributeIds[0]); ++i) + for (i=0; i < SAL_N_ELEMENTS(nIntegerPropertyAttributeIds); ++i) if (nIntegerPropertyAttributeIds[i] & m_nIncludeCommon) { exportInt16PropertyAttribute( @@ -824,7 +825,7 @@ namespace xmloff if (pCurrentValuePropertyName && (CCA_CURRENT_VALUE & m_nIncludeCommon)) { // don't export the current-value if this value originates from a data binding - // #i26944# - 2004-05-17 - fs@openoffice.org + // #i26944# if ( controlHasActiveDataBinding() ) exportedProperty( ::rtl::OUString::createFromAscii( pCurrentValuePropertyName ) ); else @@ -1014,9 +1015,9 @@ namespace xmloff &PROPERTY_STRICTFORMAT, &PROPERTY_MULTILINE, &PROPERTY_AUTOCOMPLETE, &PROPERTY_MULTISELECTION, &PROPERTY_DEFAULTBUTTON, &PROPERTY_TRISTATE, &PROPERTY_TOGGLE, &PROPERTY_FOCUS_ON_CLICK }; - sal_Int32 nIdCount = sizeof(nBooleanPropertyAttributeIds) / sizeof(nBooleanPropertyAttributeIds[0]); + sal_Int32 nIdCount = SAL_N_ELEMENTS(nBooleanPropertyAttributeIds); #if OSL_DEBUG_LEVEL > 0 - sal_Int32 nNameCount = sizeof(pBooleanPropertyNames) / sizeof(pBooleanPropertyNames[0]); + sal_Int32 nNameCount = SAL_N_ELEMENTS(pBooleanPropertyNames); OSL_ENSURE((nIdCount == nNameCount), "OControlExport::exportSpecialAttributes: somebody tampered with the maps (1)!"); #endif @@ -1056,12 +1057,12 @@ namespace xmloff 10 }; - sal_Int32 nIdCount = sizeof( nIntegerPropertyAttributeIds ) / sizeof( nIntegerPropertyAttributeIds[0] ); + sal_Int32 nIdCount = SAL_N_ELEMENTS( nIntegerPropertyAttributeIds ); #if OSL_DEBUG_LEVEL > 0 - sal_Int32 nNameCount = sizeof( pIntegerPropertyNames ) / sizeof( pIntegerPropertyNames[0] ); + sal_Int32 nNameCount = SAL_N_ELEMENTS( pIntegerPropertyNames ); OSL_ENSURE( ( nIdCount == nNameCount ), "OControlExport::exportSpecialAttributes: somebody tampered with the maps (2)!" ); - sal_Int32 nDefaultCount = sizeof( nIntegerPropertyAttrDefaults ) / sizeof( nIntegerPropertyAttrDefaults[0] ); + sal_Int32 nDefaultCount = SAL_N_ELEMENTS( nIntegerPropertyAttrDefaults ); OSL_ENSURE( ( nIdCount == nDefaultCount ), "OControlExport::exportSpecialAttributes: somebody tampered with the maps (3)!" ); #endif @@ -1088,7 +1089,7 @@ namespace xmloff else if ( m_xPropertyInfo->hasPropertyByName( PROPERTY_SPIN_INCREMENT ) ) sPropertyName = PROPERTY_SPIN_INCREMENT; else - OSL_ENSURE( sal_False, "OControlExport::exportSpecialAttributes: not property which can be mapped to step-size attribute!" ); + OSL_FAIL( "OControlExport::exportSpecialAttributes: not property which can be mapped to step-size attribute!" ); if ( sPropertyName.getLength() ) exportInt32PropertyAttribute( @@ -1189,6 +1190,39 @@ namespace xmloff } // ---------------------------------- + // the string properties + { + static sal_Int32 nStringPropertyAttributeIds[] = + { // attribute flags + SCA_GROUP_NAME + }; + static const ::rtl::OUString* pStringPropertyNames[] = + { // property names + &PROPERTY_GROUP_NAME + }; + + sal_Int32 nIdCount = SAL_N_ELEMENTS( nStringPropertyAttributeIds ); + #if OSL_DEBUG_LEVEL > 0 + sal_Int32 nNameCount = SAL_N_ELEMENTS( pStringPropertyNames ); + OSL_ENSURE( ( nIdCount == nNameCount ), + "OControlExport::exportSpecialAttributes: somebody tampered with the maps (2)!" ); + #endif + for ( i = 0; i < nIdCount; ++i ) + if ( nStringPropertyAttributeIds[i] & m_nIncludeSpecial ) + { + exportStringPropertyAttribute( + OAttributeMetaData::getSpecialAttributeNamespace( nStringPropertyAttributeIds[i] ), + OAttributeMetaData::getSpecialAttributeName( nStringPropertyAttributeIds[i] ), + *( pStringPropertyNames[i] ) + ); + #if OSL_DEBUG_LEVEL > 0 + // reset the bit for later checking + m_nIncludeSpecial = m_nIncludeSpecial & ~nStringPropertyAttributeIds[i]; + #endif + } + } + + // ---------------------------------- if ((SCA_MIN_VALUE | SCA_MAX_VALUE) & m_nIncludeSpecial) { // need to export the min value and the max value as attributes @@ -1671,6 +1705,8 @@ namespace xmloff } if ( m_xPropertyInfo->hasPropertyByName( PROPERTY_IMAGE_POSITION ) ) m_nIncludeSpecial |= SCA_IMAGE_POSITION; + if ( m_xPropertyInfo->hasPropertyByName( PROPERTY_GROUP_NAME ) ) + m_nIncludeSpecial |= SCA_GROUP_NAME; m_nIncludeDatabase = DA_DATA_FIELD | DA_INPUT_REQUIRED; m_nIncludeEvents = EA_CONTROL_EVENTS | EA_ON_CHANGE; break; @@ -1721,7 +1757,7 @@ namespace xmloff break; default: - OSL_ENSURE(sal_False, "OControlExport::examineControl: unknown control type (class id)!"); + OSL_FAIL("OControlExport::examineControl: unknown control type (class id)!"); // NO break! case FormComponentType::NAVIGATIONBAR: @@ -1822,7 +1858,7 @@ namespace xmloff } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OControlExport::exportCellBindingAttributes: caught an exception!" ); + OSL_FAIL( "OControlExport::exportCellBindingAttributes: caught an exception!" ); } } @@ -1867,7 +1903,7 @@ namespace xmloff } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OControlExport::exportCellListSourceRange: caught an exception!" ); + OSL_FAIL( "OControlExport::exportCellListSourceRange: caught an exception!" ); } } @@ -1941,7 +1977,7 @@ namespace xmloff } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OColumnExport::controlHasActiveDataBinding: caught an exception!" ); + OSL_FAIL( "OColumnExport::controlHasActiveDataBinding: caught an exception!" ); } return false; @@ -1972,10 +2008,10 @@ namespace xmloff } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OControlExport::controlHasUserSuppliedListEntries: caught an exception!" ); + OSL_FAIL( "OControlExport::controlHasUserSuppliedListEntries: caught an exception!" ); } - OSL_ENSURE( sal_False, "OControlExport::controlHasUserSuppliedListEntries: unreachable code!" ); + OSL_FAIL( "OControlExport::controlHasUserSuppliedListEntries: unreachable code!" ); // this method should be called for list and combo boxes only return true; } @@ -2129,9 +2165,9 @@ namespace xmloff { PROPERTY_NAME, /*PROPERTY_TARGETURL,*/ PROPERTY_COMMAND, PROPERTY_FILTER, PROPERTY_ORDER }; - sal_Int32 nIdCount = sizeof(eStringPropertyIds) / sizeof(eStringPropertyIds[0]); + sal_Int32 nIdCount = SAL_N_ELEMENTS(eStringPropertyIds); #if OSL_DEBUG_LEVEL > 0 - sal_Int32 nNameCount = sizeof(aStringPropertyNames) / sizeof(aStringPropertyNames[0]); + sal_Int32 nNameCount = SAL_N_ELEMENTS(aStringPropertyNames); OSL_ENSURE((nIdCount == nNameCount), "OFormExport::exportAttributes: somebody tampered with the maps (1)!"); #endif @@ -2178,10 +2214,10 @@ namespace xmloff { BOOLATTR_DEFAULT_TRUE, BOOLATTR_DEFAULT_TRUE, BOOLATTR_DEFAULT_TRUE, BOOLATTR_DEFAULT_FALSE, BOOLATTR_DEFAULT_TRUE, BOOLATTR_DEFAULT_FALSE }; - sal_Int32 nIdCount = sizeof(eBooleanPropertyIds) / sizeof(eBooleanPropertyIds[0]); + sal_Int32 nIdCount = SAL_N_ELEMENTS(eBooleanPropertyIds); #if OSL_DEBUG_LEVEL > 0 - sal_Int32 nNameCount = sizeof(pBooleanPropertyNames) / sizeof(pBooleanPropertyNames[0]); - sal_Int32 nFlagsCount = sizeof(nBooleanPropertyAttrFlags) / sizeof(nBooleanPropertyAttrFlags[0]); + sal_Int32 nNameCount = SAL_N_ELEMENTS(pBooleanPropertyNames); + sal_Int32 nFlagsCount = SAL_N_ELEMENTS(nBooleanPropertyAttrFlags); OSL_ENSURE((nIdCount == nNameCount) && (nNameCount == nFlagsCount), "OFormExport::exportAttributes: somebody tampered with the maps (2)!"); #endif @@ -2217,12 +2253,12 @@ namespace xmloff { sal_False, sal_False, sal_False, sal_False, sal_True }; - sal_Int32 nIdCount = sizeof(eEnumPropertyIds) / sizeof(eEnumPropertyIds[0]); + sal_Int32 nIdCount = SAL_N_ELEMENTS(eEnumPropertyIds); #if OSL_DEBUG_LEVEL > 0 - sal_Int32 nNameCount = sizeof(pEnumPropertyNames) / sizeof(pEnumPropertyNames[0]); - sal_Int32 nDefaultCount = sizeof(nEnumPropertyAttrDefaults) / sizeof(nEnumPropertyAttrDefaults[0]); - sal_Int32 nDefaultFlagCount = sizeof(nEnumPropertyAttrDefaultFlags) / sizeof(nEnumPropertyAttrDefaultFlags[0]); - sal_Int32 nMapCount = sizeof(eEnumPropertyMaps) / sizeof(eEnumPropertyMaps[0]); + sal_Int32 nNameCount = SAL_N_ELEMENTS(pEnumPropertyNames); + sal_Int32 nDefaultCount = SAL_N_ELEMENTS(nEnumPropertyAttrDefaults); + sal_Int32 nDefaultFlagCount = SAL_N_ELEMENTS(nEnumPropertyAttrDefaultFlags); + sal_Int32 nMapCount = SAL_N_ELEMENTS(eEnumPropertyMaps); OSL_ENSURE((nIdCount == nNameCount) && (nNameCount == nDefaultCount) && (nDefaultCount == nDefaultFlagCount) && (nDefaultFlagCount == nMapCount), "OFormExport::exportAttributes: somebody tampered with the maps (3)!"); #endif @@ -2258,3 +2294,5 @@ namespace xmloff //......................................................................... } // namespace xmloff //......................................................................... + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/elementexport.hxx b/xmloff/source/forms/elementexport.hxx index a8981f0a1fea..979812b0c3ad 100644 --- a/xmloff/source/forms/elementexport.hxx +++ b/xmloff/source/forms/elementexport.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. @@ -327,3 +328,4 @@ namespace xmloff #endif // _XMLOFF_ELEMENTEXPORT_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index 0172a185acd4..0c58235c8e1d 100644 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.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,11 +248,13 @@ namespace xmloff // insert the element into the parent container if (!m_sName.getLength()) { - OSL_ENSURE(sal_False, "OElementImport::EndElement: did not find a name attribute!"); + OSL_FAIL("OElementImport::EndElement: did not find a name attribute!"); m_sName = implGetDefaultName(); } - m_xParentContainer->insertByName(m_sName, makeAny(m_xElement)); + if (m_xParentContainer.is()) + m_xParentContainer->insertByName(m_sName, makeAny(m_xElement)); + LEAVE_LOG_CONTEXT( ); } @@ -316,7 +319,7 @@ namespace xmloff } catch(Exception&) { - OSL_ENSURE(sal_False, "OElementImport::implApplySpecificProperties: could not set the properties (using the XMultiPropertySet)!"); + OSL_FAIL("OElementImport::implApplySpecificProperties: could not set the properties (using the XMultiPropertySet)!"); } } @@ -336,8 +339,7 @@ namespace xmloff } catch(Exception&) { - OSL_ENSURE(sal_False, - ::rtl::OString("OElementImport::implApplySpecificProperties: could not set the property \"") + OSL_FAIL(::rtl::OString("OElementImport::implApplySpecificProperties: could not set the property \"") += ::rtl::OString(aPropValues->Name.getStr(), aPropValues->Name.getLength(), RTL_TEXTENCODING_ASCII_US) += ::rtl::OString("\"!")); } @@ -374,7 +376,7 @@ namespace xmloff ::rtl::OString aMessage( "OElementImport::implApplyGenericProperties: encountered an unknown property (" ); aMessage += ::rtl::OUStringToOString( aPropValues->Name, RTL_TEXTENCODING_ASCII_US ); aMessage += "), but component is no PropertyBag!"; - OSL_ENSURE( false, aMessage.getStr() ); + OSL_FAIL( aMessage.getStr() ); #endif continue; } @@ -410,7 +412,7 @@ namespace xmloff if ( bPropIsSequence != bValueIsSequence ) { - OSL_ENSURE( false, "OElementImport::implApplyGenericProperties: either both value and property should be a sequence, or none of them!" ); + OSL_FAIL( "OElementImport::implImportGenericProperties: either both value and property should be a sequence, or none of them!" ); continue; } @@ -464,13 +466,13 @@ namespace xmloff aPropValues->Value <<= static_cast< sal_Int64 >( nVal ); break; default: - OSL_ENSURE( false, "OElementImport::implApplyGenericProperties: unsupported value type!" ); + OSL_FAIL( "OElementImport::implImportGenericProperties: unsupported value type!" ); break; } } break; default: - OSL_ENSURE( false, "OElementImport::implApplyGenericProperties: non-double values not supported!" ); + OSL_FAIL( "OElementImport::implImportGenericProperties: non-double values not supported!" ); break; } } @@ -479,8 +481,7 @@ namespace xmloff } catch(Exception&) { - OSL_ENSURE(sal_False, - ::rtl::OString("OElementImport::EndElement: could not set the property \"") + OSL_FAIL(::rtl::OString("OElementImport::EndElement: could not set the property \"") += ::rtl::OString(aPropValues->Name.getStr(), aPropValues->Name.getLength(), RTL_TEXTENCODING_ASCII_US) += ::rtl::OString("\"!")); } @@ -493,7 +494,7 @@ namespace xmloff // no optimization here. If this method gets called, the XML stream did not contain a name for the // element, which is a heavy error. So in this case we don't care for performance Sequence< ::rtl::OUString > aNames = m_xParentContainer->getElementNames(); - static const ::rtl::OUString sUnnamedName = ::rtl::OUString::createFromAscii("unnamed"); + static const ::rtl::OUString sUnnamedName(RTL_CONSTASCII_USTRINGPARAM("unnamed")); ::rtl::OUString sReturn; const ::rtl::OUString* pNames = NULL; @@ -516,7 +517,7 @@ namespace xmloff continue; return sReturn; } - OSL_ENSURE(sal_False, "OElementImport::implGetDefaultName: did not find a free name!"); + OSL_FAIL("OElementImport::implGetDefaultName: did not find a free name!"); return sUnnamedName; } @@ -648,7 +649,7 @@ namespace xmloff xReturn = Reference< XPropertySet >(xPure, UNO_QUERY); } else - OSL_ENSURE(sal_False, "OElementImport::createElement: no service name to create an element!"); + OSL_FAIL("OElementImport::createElement: no service name to create an element!"); return xReturn; } @@ -857,7 +858,7 @@ namespace xmloff // get the property set info if (!m_xInfo.is()) { - OSL_ENSURE(sal_False, "OControlImport::StartElement: no PropertySetInfo!"); + OSL_FAIL("OControlImport::StartElement: no PropertySetInfo!"); return; } @@ -890,7 +891,7 @@ namespace xmloff if (!bRetrievedValues) { getValuePropertyNames(m_eElementType, nClassId, pCurrentValueProperty, pValueProperty); - ENSURE_OR_BREAK( pValueProperty, "OControlImport::StartElement: illegal value property names!" ); + ENSURE_OR_BREAK( pCurrentValueProperty || pValueProperty, "OControlImport::StartElement: illegal value property names!" ); bRetrievedValues = sal_True; } ENSURE_OR_BREAK((PROPID_VALUE != aValueProps->Handle) || pValueProperty, @@ -998,7 +999,6 @@ namespace xmloff // In case the Text is not part of the property sequence (or occurs _before_ // the DefaultText, which can happen for other value/default-value property names), // this means that the Text (the value property) is incorrectly imported. - // #102475# - 04.09.2002 - fs@openoffice.org sal_Bool bRestoreValuePropertyValue = sal_False; Any aValuePropertyValue; @@ -1011,7 +1011,7 @@ namespace xmloff } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OControlImport::EndElement: caught an exception while retrieving the class id!" ); + OSL_FAIL( "OControlImport::EndElement: caught an exception while retrieving the class id!" ); } const sal_Char* pValueProperty = NULL; @@ -1048,7 +1048,7 @@ namespace xmloff } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OControlImport::EndElement: caught an exception while retrieving the current value property!" ); + OSL_FAIL( "OControlImport::EndElement: caught an exception while retrieving the current value property!" ); } } } @@ -1065,7 +1065,7 @@ namespace xmloff } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OControlImport::EndElement: caught an exception while restoring the value property!" ); + OSL_FAIL( "OControlImport::EndElement: caught an exception while restoring the value property!" ); } } @@ -1124,7 +1124,7 @@ namespace xmloff } //--------------------------------------------------------------------- - //added by BerryJia for fixing bug102407 2002-11-5 + Reference< XPropertySet > OControlImport::createElement() { const Reference<XPropertySet> xPropSet = OElementImport::createElement(); @@ -1558,7 +1558,7 @@ namespace xmloff { ::rtl::OUString sDefaultControl; OSL_VERIFY( aDefaultControlPropertyPos->Value >>= sDefaultControl ); - if ( sDefaultControl.equalsAscii( "stardiv.one.form.control.Edit" ) ) + if ( sDefaultControl.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "stardiv.one.form.control.Edit" ) ) ) { // complete remove this property value from the array. Today's "default value" of the "DefaultControl" // property is sufficient @@ -1622,12 +1622,12 @@ namespace xmloff const Reference< sax::XAttributeList >& _rxAttrList) { // is it the "option" sub tag of a listbox ? - static const ::rtl::OUString s_sOptionElementName = ::rtl::OUString::createFromAscii("option"); + static const ::rtl::OUString s_sOptionElementName(RTL_CONSTASCII_USTRINGPARAM("option")); if (s_sOptionElementName == _rLocalName) return new OListOptionImport(GetImport(), _nPrefix, _rLocalName, this); // is it the "item" sub tag of a combobox ? - static const ::rtl::OUString s_sItemElementName = ::rtl::OUString::createFromAscii("item"); + static const ::rtl::OUString s_sItemElementName(RTL_CONSTASCII_USTRINGPARAM("item")); if (s_sItemElementName == _rLocalName) return new OComboItemImport(GetImport(), _nPrefix, _rLocalName, this); @@ -1839,9 +1839,9 @@ namespace xmloff // the label and the value const SvXMLNamespaceMap& rMap = GetImport().GetNamespaceMap(); const ::rtl::OUString sLabelAttribute = rMap.GetQNameByKey( - GetPrefix(), ::rtl::OUString::createFromAscii("label")); + GetPrefix(), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("label"))); const ::rtl::OUString sValueAttribute = rMap.GetQNameByKey( - GetPrefix(), ::rtl::OUString::createFromAscii("value")); + GetPrefix(), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value"))); // ------------------- // the label attribute @@ -1878,13 +1878,13 @@ namespace xmloff GetPrefix(), ::rtl::OUString::createFromAscii(OAttributeMetaData::getCommonControlAttributeName(CCA_SELECTED))); // propagate the selected flag - sal_Bool bSelected; + bool bSelected; GetImport().GetMM100UnitConverter().convertBool(bSelected, _rxAttrList->getValueByName(sSelectedAttribute)); if (bSelected) m_xListBoxImport->implSelectCurrentItem(); // same for the default selected - sal_Bool bDefaultSelected; + bool bDefaultSelected; GetImport().GetMM100UnitConverter().convertBool(bDefaultSelected, _rxAttrList->getValueByName(sDefaultSelectedAttribute)); if (bDefaultSelected) m_xListBoxImport->implDefaultSelectCurrentItem(); @@ -2136,7 +2136,7 @@ namespace xmloff } else { - OSL_ENSURE(sal_False, "OFormImport::implTranslateStringListProperty: invalid value (empty)!"); + OSL_FAIL("OFormImport::implTranslateStringListProperty: invalid value (empty)!"); } aProp.Value <<= aList; @@ -2229,3 +2229,4 @@ namespace xmloff } // namespace xmloff //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/elementimport.hxx b/xmloff/source/forms/elementimport.hxx index 3b604c752595..f5c7cd7740c9 100644 --- a/xmloff/source/forms/elementimport.hxx +++ b/xmloff/source/forms/elementimport.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. @@ -283,7 +284,7 @@ namespace xmloff virtual void doRegisterXFormsSubmission( const ::rtl::OUString& ); protected: - //added by BerryJia for fixing bug102407 2002-11-5 + // OElementImport overridables virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createElement(); @@ -771,3 +772,4 @@ namespace xmloff #endif // _XMLOFF_FORMS_ELEMENTIMPORT_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/elementimport_impl.hxx b/xmloff/source/forms/elementimport_impl.hxx index d110d7df8b33..1e34727903f8 100644 --- a/xmloff/source/forms/elementimport_impl.hxx +++ b/xmloff/source/forms/elementimport_impl.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. @@ -50,7 +51,7 @@ inline SvXMLImportContext* OContainerImport< BASE >::CreateChildContext( return implCreateControlWrapper(_nPrefix, _rLocalName); else { - OSL_ENSURE(sal_False, "OContainerImport::CreateChildContext: don't have an element!"); + OSL_FAIL("OContainerImport::CreateChildContext: don't have an element!"); return NULL; } } @@ -72,7 +73,7 @@ inline ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xMeAsContainer = ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >(xReturn, ::com::sun::star::uno::UNO_QUERY); if (!m_xMeAsContainer.is()) { - OSL_ENSURE(sal_False, "OContainerImport::createElement: invalid element (no XNameContainer) created!"); + OSL_FAIL("OContainerImport::createElement: invalid element (no XNameContainer) created!"); xReturn.clear(); } @@ -121,3 +122,4 @@ template <class BASE> return xReturn; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/eventexport.cxx b/xmloff/source/forms/eventexport.cxx index 10ac91cd5c1f..5a6d84f16fea 100644 --- a/xmloff/source/forms/eventexport.cxx +++ b/xmloff/source/forms/eventexport.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 @@ namespace xmloff void SAL_CALL OEventDescriptorMapper::replaceByName( const ::rtl::OUString&, const Any& ) throw(IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException) { throw IllegalArgumentException( - ::rtl::OUString::createFromAscii("replacing is not implemented for this wrapper class."), static_cast< ::cppu::OWeakObject* >(this), 1); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("replacing is not implemented for this wrapper class.")), static_cast< ::cppu::OWeakObject* >(this), 1); } //--------------------------------------------------------------------- @@ -115,7 +116,7 @@ namespace xmloff ConstMapString2PropertyValueSequenceIterator aPos = m_aMappedEvents.find(_rName); if (m_aMappedEvents.end() == aPos) throw NoSuchElementException( - ::rtl::OUString::createFromAscii("There is no element named ") += _rName, + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("There is no element named ")) += _rName, static_cast< ::cppu::OWeakObject* >(this)); return makeAny(aPos->second); @@ -158,3 +159,4 @@ namespace xmloff } // namespace xmloff //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/eventexport.hxx b/xmloff/source/forms/eventexport.hxx index c20677e36f1a..fdddab0df44f 100644 --- a/xmloff/source/forms/eventexport.hxx +++ b/xmloff/source/forms/eventexport.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. @@ -84,3 +85,4 @@ namespace xmloff #endif // _XMLOFF_FORMS_EVENTEXPORT_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/eventimport.cxx b/xmloff/source/forms/eventimport.cxx index a16c7dd3e2c0..9edc1242ea0f 100644 --- a/xmloff/source/forms/eventimport.cxx +++ b/xmloff/source/forms/eventimport.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,7 +137,7 @@ namespace xmloff Reference< XEventAttacherManager > xEventManager(_rxContainer, UNO_QUERY); if (!xEventManager.is()) { - OSL_ENSURE(sal_False, "ODefaultEventAttacherManager::setEvents: invalid argument!"); + OSL_FAIL("ODefaultEventAttacherManager::setEvents: invalid argument!"); return; } @@ -161,3 +162,4 @@ namespace xmloff //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/eventimport.hxx b/xmloff/source/forms/eventimport.hxx index 9ea2d6fefc1d..b8e21782860c 100644 --- a/xmloff/source/forms/eventimport.hxx +++ b/xmloff/source/forms/eventimport.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. @@ -93,3 +94,4 @@ namespace xmloff #endif // _XMLOFF_FORMS_EVENTIMPORT_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/formattributes.cxx b/xmloff/source/forms/formattributes.cxx index e27f03f01de9..e65f3c0bf488 100644 --- a/xmloff/source/forms/formattributes.cxx +++ b/xmloff/source/forms/formattributes.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. @@ -76,7 +77,7 @@ namespace xmloff case CCA_ORIENTATION: return "orientation"; case CCA_VISUAL_EFFECT: return "visual-effect"; default: - OSL_ENSURE(sal_False, "OAttributeMetaData::getCommonControlAttributeName: invalid id (maybe you or-ed two flags?)!"); + OSL_FAIL("OAttributeMetaData::getCommonControlAttributeName: invalid id (maybe you or-ed two flags?)!"); } return ""; } @@ -121,7 +122,7 @@ namespace xmloff case faOrder: return "order"; case faTabbingCycle: return "tab-cycle"; default: - OSL_ENSURE(sal_False, "OAttributeMetaData::getFormAttributeName: invalid id!"); + OSL_FAIL("OAttributeMetaData::getFormAttributeName: invalid id!"); } return ""; } @@ -150,7 +151,7 @@ namespace xmloff case DA_LIST_SOURCE_TYPE: return "list-source-type"; case DA_INPUT_REQUIRED: return "input-required"; default: - OSL_ENSURE(sal_False, "OAttributeMetaData::getDatabaseAttributeName: invalid id (maybe you or-ed two flags?)!"); + OSL_FAIL("OAttributeMetaData::getDatabaseAttributeName: invalid id (maybe you or-ed two flags?)!"); } return ""; } @@ -171,7 +172,7 @@ namespace xmloff case BA_LIST_LINKING_TYPE: return "list-linkage-type"; case BA_LIST_CELL_RANGE: return "source-cell-range"; default: - OSL_ENSURE(sal_False, "OAttributeMetaData::getBindingAttributeName: invalid id (maybe you or-ed two flags?)!"); + OSL_FAIL("OAttributeMetaData::getBindingAttributeName: invalid id (maybe you or-ed two flags?)!"); } return ""; } @@ -192,6 +193,7 @@ namespace xmloff case SCA_MAX_VALUE: return "max-value"; case SCA_MIN_VALUE: return "min-value"; case SCA_VALIDATION: return "validation"; + case SCA_GROUP_NAME: return "group-name"; case SCA_MULTI_LINE: return "multi-line"; case SCA_AUTOMATIC_COMPLETION: return "auto-complete"; case SCA_MULTIPLE: return "multiple"; @@ -206,15 +208,18 @@ namespace xmloff case SCA_TOGGLE: return "toggle"; case SCA_FOCUS_ON_CLICK: return "focus-on-click"; default: - OSL_ENSURE(sal_False, "OAttributeMetaData::getSpecialAttributeName: invalid id (maybe you or-ed two flags?)!"); + OSL_FAIL("OAttributeMetaData::getSpecialAttributeName: invalid id (maybe you or-ed two flags?)!"); } return ""; } //--------------------------------------------------------------------- - sal_uInt16 OAttributeMetaData::getSpecialAttributeNamespace(sal_Int32 /*_nId*/) + sal_uInt16 OAttributeMetaData::getSpecialAttributeNamespace(sal_Int32 _nId) { - // nothing special here + switch( _nId ) + { + case SCA_GROUP_NAME: return XML_NAMESPACE_FORMX; + } return XML_NAMESPACE_FORM; } @@ -226,7 +231,7 @@ namespace xmloff case ofaAutomaticFocus: return "automatic-focus"; case ofaApplyDesignMode: return "apply-design-mode"; default: - OSL_ENSURE(sal_False, "OAttributeMetaData::getOfficeFormsAttributeName: invalid id!"); + OSL_FAIL("OAttributeMetaData::getOfficeFormsAttributeName: invalid id!"); } return ""; } @@ -339,3 +344,4 @@ namespace xmloff } // namespace xmloff //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/formattributes.hxx b/xmloff/source/forms/formattributes.hxx index 121476a9b21c..28cfb8655ab8 100644 --- a/xmloff/source/forms/formattributes.hxx +++ b/xmloff/source/forms/formattributes.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. @@ -30,7 +31,7 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include <sal/types.h> -#include <vos/refernce.hxx> +#include <salhelper/simplereferenceobject.hxx> #include <comphelper/stl_types.hxx> class SvXMLExport; @@ -123,6 +124,7 @@ namespace xmloff #define SCA_MAX_VALUE 0x00000002 #define SCA_MIN_VALUE 0x00000004 #define SCA_VALIDATION 0x00000008 + #define SCA_GROUP_NAME 0x00000010 #define SCA_MULTI_LINE 0x00000020 #define SCA_AUTOMATIC_COMPLETION 0x00000080 #define SCA_MULTIPLE 0x00000100 @@ -361,3 +363,4 @@ namespace xmloff #endif // _XMLOFF_FORMATTRIBUTES_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/formcellbinding.cxx b/xmloff/source/forms/formcellbinding.cxx index 95284d61f630..3e980611abcd 100644 --- a/xmloff/source/forms/formcellbinding.cxx +++ b/xmloff/source/forms/formcellbinding.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. @@ -227,7 +228,7 @@ Reference< XListEntrySource > FormCellBindingHelper::createCellListSourceFromStr } catch( const Exception& ) { - OSL_ENSURE( sal_False, "FormCellBindingHelper::getStringAddressFromCellBinding: caught an exception!" ); + OSL_FAIL( "FormCellBindingHelper::getStringAddressFromCellBinding: caught an exception!" ); } return sAddress; @@ -256,7 +257,7 @@ Reference< XListEntrySource > FormCellBindingHelper::createCellListSourceFromStr } catch( const Exception& ) { - OSL_ENSURE( sal_False, "FormCellBindingHelper::getStringAddressFromCellListSource: caught an exception!" ); + OSL_FAIL( "FormCellBindingHelper::getStringAddressFromCellListSource: caught an exception!" ); } return sAddress; @@ -292,7 +293,7 @@ bool FormCellBindingHelper::isSpreadsheetDocumentWhichSupplies( const Reference< } catch( const Exception& ) { - OSL_ENSURE( sal_False, "FormCellBindingHelper::isSpreadsheetDocumentWhichSupplies: caught an exception!" ); + OSL_FAIL( "FormCellBindingHelper::isSpreadsheetDocumentWhichSupplies: caught an exception!" ); } return bYesItIs; @@ -447,7 +448,7 @@ Reference< XInterface > FormCellBindingHelper::createDocumentDependentInstance( } catch ( const Exception& ) { - OSL_ENSURE( sal_False, "FormCellBindingHelper::createDocumentDependentInstance: could not create the binding at the document!" ); + OSL_FAIL( "FormCellBindingHelper::createDocumentDependentInstance: could not create the binding at the document!" ); } } return xReturn; @@ -478,7 +479,7 @@ bool FormCellBindingHelper::doConvertAddressRepresentations( const ::rtl::OUStri } catch( const Exception& ) { - OSL_ENSURE( sal_False, "FormCellBindingHelper::doConvertAddressRepresentations: caught an exception!" ); + OSL_FAIL( "FormCellBindingHelper::doConvertAddressRepresentations: caught an exception!" ); } } @@ -488,3 +489,5 @@ bool FormCellBindingHelper::doConvertAddressRepresentations( const ::rtl::OUStri //............................................................................ } // namespace xmloff //............................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/formcellbinding.hxx b/xmloff/source/forms/formcellbinding.hxx index 18df52ed2a4d..85fe2fb272ec 100644 --- a/xmloff/source/forms/formcellbinding.hxx +++ b/xmloff/source/forms/formcellbinding.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. @@ -277,3 +278,5 @@ namespace xmloff //............................................................................ #endif // XMLOFF_FORMS_FORMCELLBINDING + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/formenums.cxx b/xmloff/source/forms/formenums.cxx index aac623c79482..e90d4901b093 100644 --- a/xmloff/source/forms/formenums.cxx +++ b/xmloff/source/forms/formenums.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. @@ -346,3 +347,4 @@ namespace xmloff } // namespace xmloff //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/formenums.hxx b/xmloff/source/forms/formenums.hxx index 215a69b61231..88313e28f109 100644 --- a/xmloff/source/forms/formenums.hxx +++ b/xmloff/source/forms/formenums.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. @@ -78,3 +79,4 @@ namespace xmloff #endif // _XMLOFF_FORMENUMS_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/formevents.cxx b/xmloff/source/forms/formevents.cxx index 5e46fbaab8d8..9353d540f8fd 100644 --- a/xmloff/source/forms/formevents.cxx +++ b/xmloff/source/forms/formevents.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. @@ -83,3 +84,4 @@ namespace xmloff } // namespace xmloff //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/formevents.hxx b/xmloff/source/forms/formevents.hxx index e63d70b0b280..5f2fea968144 100644 --- a/xmloff/source/forms/formevents.hxx +++ b/xmloff/source/forms/formevents.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 @@ namespace xmloff #endif // _XMLOFF_FORMS_FORMEVENTS_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/formlayerexport.cxx b/xmloff/source/forms/formlayerexport.cxx index 517c499595ca..ea5ebc93a1b6 100644 --- a/xmloff/source/forms/formlayerexport.cxx +++ b/xmloff/source/forms/formlayerexport.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. @@ -107,7 +108,7 @@ namespace xmloff } catch(Exception&) { - OSL_ENSURE(sal_False, "OFormLayerXMLExport::examine: could not examine the draw page!"); + OSL_FAIL("OFormLayerXMLExport::examine: could not examine the draw page!"); } } @@ -179,3 +180,4 @@ namespace xmloff } // namespace xmloff //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/formlayerimport.cxx b/xmloff/source/forms/formlayerimport.cxx index 17a0a3bc9bb3..718c3120c481 100644 --- a/xmloff/source/forms/formlayerimport.cxx +++ b/xmloff/source/forms/formlayerimport.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. @@ -121,3 +122,4 @@ namespace xmloff } // namespace xmloff //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/formsimp.cxx b/xmloff/source/forms/formsimp.cxx index 3028cd507890..cc9b588aed62 100644 --- a/xmloff/source/forms/formsimp.cxx +++ b/xmloff/source/forms/formsimp.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,9 +33,7 @@ #include "xmloff/xmlnmspe.hxx" #include <xmloff/nmspmap.hxx> -#ifndef _XMLOFF_ANIMIMP_HXX #include <xmloff/formsimp.hxx> -#endif using ::rtl::OUString; using ::rtl::OUStringBuffer; @@ -56,3 +55,5 @@ SvXMLImportContext * XMLFormsContext::CreateChildContext( sal_uInt16 nPrefix, co { return GetImport().GetFormImport()->createContext( nPrefix, rLocalName, xAttrList ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/formstyles.cxx b/xmloff/source/forms/formstyles.cxx index 571d113d321f..bd00be5fbf43 100644 --- a/xmloff/source/forms/formstyles.cxx +++ b/xmloff/source/forms/formstyles.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 @@ namespace xmloff //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/formstyles.hxx b/xmloff/source/forms/formstyles.hxx index 6510c1e41a92..fc055df24a1a 100644 --- a/xmloff/source/forms/formstyles.hxx +++ b/xmloff/source/forms/formstyles.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,4 @@ namespace xmloff #endif // XMLOFF_FORMSTYLES_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/gridcolumnproptranslator.cxx b/xmloff/source/forms/gridcolumnproptranslator.cxx index b828d258cdd3..32dbbf01c727 100644 --- a/xmloff/source/forms/gridcolumnproptranslator.cxx +++ b/xmloff/source/forms/gridcolumnproptranslator.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. @@ -110,7 +111,7 @@ namespace xmloff } ++pTranslation; } - OSL_ENSURE( sal_False, "valueAlignToParaAdjust: unreachable!" ); + OSL_FAIL( "valueAlignToParaAdjust: unreachable!" ); } //---------------------------------------------------------------- @@ -128,7 +129,7 @@ namespace xmloff } ++pTranslation; } - OSL_ENSURE( sal_False, "valueParaAdjustToAlign: unreachable!" ); + OSL_FAIL( "valueParaAdjustToAlign: unreachable!" ); } //==================================================================== @@ -259,25 +260,25 @@ namespace xmloff //-------------------------------------------------------------------- void SAL_CALL OGridColumnPropertyTranslator::addPropertyChangeListener( const ::rtl::OUString&, const Reference< XPropertyChangeListener >& ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException) { - OSL_ENSURE( sal_False, "OGridColumnPropertyTranslator::addPropertyChangeListener: not implemented - this should not be needed!" ); + OSL_FAIL( "OGridColumnPropertyTranslator::addPropertyChangeListener: not implemented - this should not be needed!" ); } //-------------------------------------------------------------------- void SAL_CALL OGridColumnPropertyTranslator::removePropertyChangeListener( const ::rtl::OUString&, const Reference< XPropertyChangeListener >& ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException) { - OSL_ENSURE( sal_False, "OGridColumnPropertyTranslator::removePropertyChangeListener: not implemented - this should not be needed!" ); + OSL_FAIL( "OGridColumnPropertyTranslator::removePropertyChangeListener: not implemented - this should not be needed!" ); } //-------------------------------------------------------------------- void SAL_CALL OGridColumnPropertyTranslator::addVetoableChangeListener( const ::rtl::OUString&, const Reference< XVetoableChangeListener >& ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException) { - OSL_ENSURE( sal_False, "OGridColumnPropertyTranslator::addVetoableChangeListener: not implemented - this should not be needed!" ); + OSL_FAIL( "OGridColumnPropertyTranslator::addVetoableChangeListener: not implemented - this should not be needed!" ); } //-------------------------------------------------------------------- void SAL_CALL OGridColumnPropertyTranslator::removeVetoableChangeListener( const ::rtl::OUString&, const Reference< XVetoableChangeListener >& ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException) { - OSL_ENSURE( sal_False, "OGridColumnPropertyTranslator::removeVetoableChangeListener: not implemented - this should not be needed!" ); + OSL_FAIL( "OGridColumnPropertyTranslator::removeVetoableChangeListener: not implemented - this should not be needed!" ); } //-------------------------------------------------------------------- @@ -324,22 +325,23 @@ namespace xmloff //-------------------------------------------------------------------- void SAL_CALL OGridColumnPropertyTranslator::addPropertiesChangeListener( const Sequence< ::rtl::OUString >&, const Reference< XPropertiesChangeListener >& ) throw (RuntimeException) { - OSL_ENSURE( sal_False, "OGridColumnPropertyTranslator::addPropertiesChangeListener: not implemented - this should not be needed!" ); + OSL_FAIL( "OGridColumnPropertyTranslator::addPropertiesChangeListener: not implemented - this should not be needed!" ); } //-------------------------------------------------------------------- void SAL_CALL OGridColumnPropertyTranslator::removePropertiesChangeListener( const Reference< XPropertiesChangeListener >& ) throw (RuntimeException) { - OSL_ENSURE( sal_False, "OGridColumnPropertyTranslator::removePropertiesChangeListener: not implemented - this should not be needed!" ); + OSL_FAIL( "OGridColumnPropertyTranslator::removePropertiesChangeListener: not implemented - this should not be needed!" ); } //-------------------------------------------------------------------- void SAL_CALL OGridColumnPropertyTranslator::firePropertiesChangeEvent( const Sequence< ::rtl::OUString >&, const Reference< XPropertiesChangeListener >& ) throw (RuntimeException) { - OSL_ENSURE( sal_False, "OGridColumnPropertyTranslator::firePropertiesChangeEvent: not implemented - this should not be needed!" ); + OSL_FAIL( "OGridColumnPropertyTranslator::firePropertiesChangeEvent: not implemented - this should not be needed!" ); } //........................................................................ } // namespace xmloff //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/gridcolumnproptranslator.hxx b/xmloff/source/forms/gridcolumnproptranslator.hxx index eb619769ea31..b45cd08988a8 100644 --- a/xmloff/source/forms/gridcolumnproptranslator.hxx +++ b/xmloff/source/forms/gridcolumnproptranslator.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. @@ -82,3 +83,4 @@ namespace xmloff #endif // XMLOFF_SOURCE_FORMS_GRIDCOLUMNPROPTRANSLATOR_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/handler/property_handler_base.cxx b/xmloff/source/forms/handler/property_handler_base.cxx index d599e0e259fe..d599e0e259fe 100755..100644 --- a/xmloff/source/forms/handler/property_handler_base.cxx +++ b/xmloff/source/forms/handler/property_handler_base.cxx diff --git a/xmloff/source/forms/handler/vcl_date_handler.cxx b/xmloff/source/forms/handler/vcl_date_handler.cxx index a8404ed04e05..a8404ed04e05 100755..100644 --- a/xmloff/source/forms/handler/vcl_date_handler.cxx +++ b/xmloff/source/forms/handler/vcl_date_handler.cxx diff --git a/xmloff/source/forms/handler/vcl_date_handler.hxx b/xmloff/source/forms/handler/vcl_date_handler.hxx index 44a7f7395ceb..44a7f7395ceb 100755..100644 --- a/xmloff/source/forms/handler/vcl_date_handler.hxx +++ b/xmloff/source/forms/handler/vcl_date_handler.hxx diff --git a/xmloff/source/forms/handler/vcl_time_handler.cxx b/xmloff/source/forms/handler/vcl_time_handler.cxx index 98ea739d04a4..98ea739d04a4 100755..100644 --- a/xmloff/source/forms/handler/vcl_time_handler.cxx +++ b/xmloff/source/forms/handler/vcl_time_handler.cxx diff --git a/xmloff/source/forms/handler/vcl_time_handler.hxx b/xmloff/source/forms/handler/vcl_time_handler.hxx index 7ed6f0aa5730..0d84be983b01 100755..100644 --- a/xmloff/source/forms/handler/vcl_time_handler.hxx +++ b/xmloff/source/forms/handler/vcl_time_handler.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,5 @@ namespace xmloff //...................................................................................................................... #endif // XMLOFF_VCL_TIME_HANDLER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/ifacecompare.hxx b/xmloff/source/forms/ifacecompare.hxx index c20c4cf9624e..e84cd27eaa8d 100644 --- a/xmloff/source/forms/ifacecompare.hxx +++ b/xmloff/source/forms/ifacecompare.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. @@ -68,3 +69,4 @@ namespace xmloff #endif // _XMLOFF_FORMS_IFACECOMPARE_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/layerexport.cxx b/xmloff/source/forms/layerexport.cxx index d4f0e86534ab..21950c9c3517 100644 --- a/xmloff/source/forms/layerexport.cxx +++ b/xmloff/source/forms/layerexport.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. @@ -86,7 +87,7 @@ namespace xmloff //--------------------------------------------------------------------- const ::rtl::OUString& OFormLayerXMLExport_Impl::getControlNumberStyleNamePrefix() { - static const ::rtl::OUString s_sControlNumberStyleNamePrefix = ::rtl::OUString::createFromAscii("C"); + static const ::rtl::OUString s_sControlNumberStyleNamePrefix(RTL_CONSTASCII_USTRINGPARAM("C")); return s_sControlNumberStyleNamePrefix; } @@ -99,13 +100,13 @@ namespace xmloff // add our style family to the export context's style pool m_xPropertyHandlerFactory = new OControlPropertyHandlerFactory(); - ::vos::ORef< XMLPropertySetMapper > xStylePropertiesMapper = new XMLPropertySetMapper( getControlStylePropertyMap(), m_xPropertyHandlerFactory.getBodyPtr() ); - m_xStyleExportMapper = new OFormComponentStyleExportMapper( xStylePropertiesMapper.getBodyPtr() ); + ::rtl::Reference< XMLPropertySetMapper > xStylePropertiesMapper = new XMLPropertySetMapper( getControlStylePropertyMap(), m_xPropertyHandlerFactory.get() ); + m_xStyleExportMapper = new OFormComponentStyleExportMapper( xStylePropertiesMapper.get() ); // our style family m_rContext.GetAutoStylePool()->AddFamily( XML_STYLE_FAMILY_CONTROL_ID, token::GetXMLToken(token::XML_PARAGRAPH), - m_xStyleExportMapper.getBodyPtr(), + m_xStyleExportMapper.get(), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( XML_STYLE_FAMILY_CONTROL_PREFIX) ) ); @@ -139,7 +140,7 @@ namespace xmloff if (!xSI->supportsService(SERVICE_FORMSCOLLECTION)) { - OSL_ENSURE(sal_False, "OFormLayerXMLExport_Impl::impl_isFormPageContainingForms: invalid collection (is no com.sun.star.form.Forms)!"); + OSL_FAIL("OFormLayerXMLExport_Impl::impl_isFormPageContainingForms: invalid collection (is no com.sun.star.form.Forms)!"); // nothing to do return sal_False; } @@ -183,7 +184,7 @@ namespace xmloff } //--------------------------------------------------------------------- - ::vos::ORef< SvXMLExportPropertyMapper > OFormLayerXMLExport_Impl::getStylePropertyMapper() + ::rtl::Reference< SvXMLExportPropertyMapper > OFormLayerXMLExport_Impl::getStylePropertyMapper() { return m_xStyleExportMapper; } @@ -244,7 +245,7 @@ namespace xmloff } catch(Exception&) { - OSL_ENSURE(sal_False, "OFormLayerXMLExport_Impl::exportCollectionElements: caught an exception ... skipping the current element!"); + OSL_FAIL("OFormLayerXMLExport_Impl::exportCollectionElements: caught an exception ... skipping the current element!"); continue; } } @@ -346,6 +347,9 @@ namespace xmloff //--------------------------------------------------------------------- sal_Bool OFormLayerXMLExport_Impl::implMoveIterators(const Reference< XDrawPage >& _rxDrawPage, sal_Bool _bClear) { + if (!_rxDrawPage.is()) + return false; + sal_Bool bKnownPage = sal_False; // the one for the ids @@ -405,7 +409,9 @@ namespace xmloff //--------------------------------------------------------------------- ::rtl::OUString OFormLayerXMLExport_Impl::getControlId(const Reference< XPropertySet >& _rxControl) { - OSL_ENSURE(m_aCurrentPageIds != m_aControlIds.end(), "OFormLayerXMLExport_Impl::getControlId: invalid current page!"); + if (m_aCurrentPageIds == m_aControlIds.end()) + return ::rtl::OUString(); + OSL_ENSURE(m_aCurrentPageIds->second.end() != m_aCurrentPageIds->second.find(_rxControl), "OFormLayerXMLExport_Impl::getControlId: can not find the control!"); return m_aCurrentPageIds->second[_rxControl]; @@ -775,16 +781,11 @@ namespace xmloff // create it for en-US (does not really matter, as we will specify a locale for every // concrete language to use) Sequence< Any > aSupplierArgs(1); - aSupplierArgs[0] <<= Locale ( ::rtl::OUString::createFromAscii("en"), - ::rtl::OUString::createFromAscii("US"), + aSupplierArgs[0] <<= Locale ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("US")), ::rtl::OUString() ); - // #110680# - //Reference< XInterface > xFormatsSupplierUntyped = - // ::comphelper::getProcessServiceFactory()->createInstanceWithArguments( - // SERVICE_NUMBERFORMATSSUPPLIER, - // aSupplierArgs - // ); + Reference< XInterface > xFormatsSupplierUntyped = m_rContext.getServiceFactory()->createInstanceWithArguments( SERVICE_NUMBERFORMATSSUPPLIER, @@ -831,3 +832,4 @@ namespace xmloff //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/layerexport.hxx b/xmloff/source/forms/layerexport.hxx index 3335645c2abf..30d89ced4343 100644 --- a/xmloff/source/forms/layerexport.hxx +++ b/xmloff/source/forms/layerexport.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. @@ -34,7 +35,7 @@ #include <com/sun/star/awt/XControlModel.hpp> #include "callbacks.hxx" #include "ifacecompare.hxx" -#include <vos/ref.hxx> +#include <rtl/ref.hxx> class SvXMLExport; class SvXMLNumFmtExport; @@ -80,8 +81,8 @@ namespace xmloff PropertySetBag m_aIgnoreList; // style handling - ::vos::ORef< XMLPropertyHandlerFactory > m_xPropertyHandlerFactory; - ::vos::ORef< SvXMLExportPropertyMapper > m_xStyleExportMapper; + ::rtl::Reference< XMLPropertyHandlerFactory > m_xPropertyHandlerFactory; + ::rtl::Reference< SvXMLExportPropertyMapper > m_xStyleExportMapper; // we need our own number formats supplier: // Controls which have a number formats do not work with the formats supplier of the document they reside @@ -181,7 +182,7 @@ namespace xmloff virtual SvXMLExport& getGlobalContext(); virtual ::rtl::OUString getObjectStyleName( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObject ); - virtual ::vos::ORef< SvXMLExportPropertyMapper > getStylePropertyMapper(); + virtual ::rtl::Reference< SvXMLExportPropertyMapper > getStylePropertyMapper(); /** clear any structures which have been build in the recent <method>examine</method> calls. */ @@ -318,3 +319,4 @@ namespace xmloff #endif // _XMLOFF_FORMS_LAYEREXPORT_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/layerimport.cxx b/xmloff/source/forms/layerimport.cxx index 4a4bc4e7f942..c277969c51ab 100644 --- a/xmloff/source/forms/layerimport.cxx +++ b/xmloff/source/forms/layerimport.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. @@ -95,6 +96,8 @@ OFormLayerXMLImport_Impl::OFormLayerXMLImport_Impl(SvXMLImport& _rImporter) m_aAttributeMetaData.addStringProperty( OAttributeMetaData::getCommonControlAttributeName(CCA_NAME), PROPERTY_NAME); m_aAttributeMetaData.addStringProperty( + OAttributeMetaData::getSpecialAttributeName(SCA_GROUP_NAME), PROPERTY_GROUP_NAME); + m_aAttributeMetaData.addStringProperty( OAttributeMetaData::getCommonControlAttributeName(CCA_IMAGE_DATA), PROPERTY_IMAGEURL); m_aAttributeMetaData.addStringProperty( OAttributeMetaData::getCommonControlAttributeName(CCA_LABEL), PROPERTY_LABEL); @@ -303,11 +306,11 @@ void OFormLayerXMLImport_Impl::applyControlNumberStyle(const Reference< XPropert } catch(const Exception&) { - OSL_ENSURE(sal_False, "OFormLayerXMLImport_Impl::applyControlNumberStyle: couldn't set the format!"); + OSL_FAIL("OFormLayerXMLImport_Impl::applyControlNumberStyle: couldn't set the format!"); } } else - OSL_ENSURE(sal_False, "OFormLayerXMLImport_Impl::applyControlNumberStyle: did not find the style with the given name!"); + OSL_FAIL("OFormLayerXMLImport_Impl::applyControlNumberStyle: did not find the style with the given name!"); } } @@ -471,7 +474,7 @@ void OFormLayerXMLImport_Impl::endPage() } catch(Exception&) { - OSL_ENSURE(sal_False, "OFormLayerXMLImport_Impl::endPage: unable to knit the control references (caught an exception)!"); + OSL_FAIL("OFormLayerXMLImport_Impl::endPage: unable to knit the control references (caught an exception)!"); } // now that we have all children of the forms collection, attach the events @@ -499,7 +502,7 @@ Reference< XPropertySet > OFormLayerXMLImport_Impl::lookupControlId(const ::rtl: if (m_aCurrentPageIds->second.end() != aPos) xReturn = aPos->second; else - OSL_ENSURE(sal_False, "OFormLayerXMLImport_Impl::lookupControlId: invalid control id (did not find it)!"); + OSL_FAIL("OFormLayerXMLImport_Impl::lookupControlId: invalid control id (did not find it)!"); } return xReturn; } @@ -532,7 +535,7 @@ SvXMLImportContext* OFormLayerXMLImport_Impl::createContext(const sal_uInt16 _nP if ( !pContext ) { - OSL_ENSURE( false, "unknown element" ); + OSL_FAIL( "unknown element" ); pContext = new SvXMLImportContext(m_rImporter, _nPrefix, _rLocalName); } @@ -590,7 +593,7 @@ void OFormLayerXMLImport_Impl::documentDone( ) } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OFormLayerXMLImport_Impl::documentDone: caught an exception while binding to a cell!" ); + OSL_FAIL( "OFormLayerXMLImport_Impl::documentDone: caught an exception while binding to a cell!" ); } } m_aCellValueBindings.clear(); @@ -617,7 +620,7 @@ void OFormLayerXMLImport_Impl::documentDone( ) } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OFormLayerXMLImport_Impl::documentDone: caught an exception while binding to a cell range!" ); + OSL_FAIL( "OFormLayerXMLImport_Impl::documentDone: caught an exception while binding to a cell range!" ); } } m_aCellRangeListSources.clear(); @@ -644,3 +647,4 @@ void OFormLayerXMLImport_Impl::documentDone( ) } // namespace xmloff //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/layerimport.hxx b/xmloff/source/forms/layerimport.hxx index 9bbc4c53d9df..34cbbe6d1b6c 100644 --- a/xmloff/source/forms/layerimport.hxx +++ b/xmloff/source/forms/layerimport.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. @@ -30,7 +31,7 @@ #include <com/sun/star/xml/sax/XAttributeList.hpp> #include <com/sun/star/form/XFormsSupplier2.hpp> -#include <vos/ref.hxx> +#include <rtl/ref.hxx> #include "formattributes.hxx" #include "callbacks.hxx" #include "eventimport.hxx" @@ -54,27 +55,6 @@ namespace xmloff class OAttribute2Property; //===================================================================== - //= ControlReference - //===================================================================== - /// a structure containing a property set (the referred control) and a string (the list of referring controls) -/* struct ControlReference - { - ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > - xReferredControl; - ::rtl::OUString - sReferringControls; - - ControlReference( - const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxReferredControl, - const ::rtl::OUString& _rReferringControls) - :xReferredControl(_rxReferredControl) - ,sReferringControls(_rReferringControls) - { - } - }; -*/ - - //===================================================================== //= OFormLayerXMLImport_Impl //===================================================================== class OFormLayerXMLImport_Impl @@ -217,3 +197,4 @@ namespace xmloff #endif // _XMLOFF_FORMS_LAYERIMPORT_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/logging.cxx b/xmloff/source/forms/logging.cxx index 25514ca20c5e..00ae8fe18f0e 100644 --- a/xmloff/source/forms/logging.cxx +++ b/xmloff/source/forms/logging.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 @@ namespace xmloff //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/logging.hxx b/xmloff/source/forms/logging.hxx index 332e00c3135e..9f355358fc91 100644 --- a/xmloff/source/forms/logging.hxx +++ b/xmloff/source/forms/logging.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. @@ -73,3 +74,4 @@ namespace xmloff #endif // XMLOFF_FORMS_LOGGING_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/officeforms.cxx b/xmloff/source/forms/officeforms.cxx index fcb6a79de597..614ca54796bd 100644 --- a/xmloff/source/forms/officeforms.cxx +++ b/xmloff/source/forms/officeforms.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. @@ -83,7 +84,7 @@ namespace xmloff // get and convert the value ::rtl::OUString sAttributeValue = _rxAttributes->getValueByName(sCompleteAttributeName); - sal_Bool bValue = _bDefault; + bool bValue = _bDefault; GetImport().GetMM100UnitConverter().convertBool(bValue, sAttributeValue); // set the property @@ -113,7 +114,7 @@ namespace xmloff } catch(Exception&) { - OSL_ENSURE(sal_False, "OFormsRootImport::StartElement: caught an exception while setting the document properties!"); + OSL_FAIL("OFormsRootImport::StartElement: caught an exception while setting the document properties!"); } } @@ -182,7 +183,7 @@ namespace xmloff } catch(Exception&) { - OSL_ENSURE(sal_False, "OFormsRootExport::addModelAttributes: caught an exception while retrieving the document properties!"); + OSL_FAIL("OFormsRootExport::addModelAttributes: caught an exception while retrieving the document properties!"); } } @@ -191,3 +192,4 @@ namespace xmloff //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/officeforms.hxx b/xmloff/source/forms/officeforms.hxx index f58e33d73080..59473641f964 100644 --- a/xmloff/source/forms/officeforms.hxx +++ b/xmloff/source/forms/officeforms.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. @@ -102,3 +103,4 @@ namespace xmloff #endif // _XMLOFF_FORMS_OFFICEFORMS_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/property_group.hxx b/xmloff/source/forms/property_group.hxx index bca354f14e92..bca354f14e92 100755..100644 --- a/xmloff/source/forms/property_group.hxx +++ b/xmloff/source/forms/property_group.hxx diff --git a/xmloff/source/forms/property_meta_data.cxx b/xmloff/source/forms/property_meta_data.cxx index 5930d123578c..442ad50b00bb 100644 --- a/xmloff/source/forms/property_meta_data.cxx +++ b/xmloff/source/forms/property_meta_data.cxx @@ -35,7 +35,7 @@ #include <tools/diagnose_ex.h> #include <tools/debug.hxx> -#include <hash_map> +#include <boost/unordered_map.hpp> //...................................................................................................................... namespace xmloff { namespace metadata @@ -83,7 +83,7 @@ namespace xmloff { namespace metadata // for some attribute or property, and otherwise delegate to the next instance. //.............................................................................................................. - typedef ::std::hash_map< ::rtl::OUString, const PropertyDescription*, ::rtl::OUStringHash > DescriptionsByName; + typedef ::boost::unordered_map< ::rtl::OUString, const PropertyDescription*, ::rtl::OUStringHash > DescriptionsByName; //.............................................................................................................. const DescriptionsByName& lcl_getPropertyDescriptions() @@ -124,7 +124,7 @@ namespace xmloff { namespace metadata } //.............................................................................................................. - typedef ::std::hash_map< ::rtl::OUString, XMLTokenEnum, ::rtl::OUStringHash > ReverseTokenLookup; + typedef ::boost::unordered_map< ::rtl::OUString, XMLTokenEnum, ::rtl::OUStringHash > ReverseTokenLookup; //.............................................................................................................. const ReverseTokenLookup& getReverseTokenLookup() @@ -153,7 +153,7 @@ namespace xmloff { namespace metadata }; //.............................................................................................................. - typedef ::std::hash_multimap< AttributeDescription, PropertyGroup, AttributeHash > AttributeGroups; + typedef ::boost::unordered_multimap< AttributeDescription, PropertyGroup, AttributeHash > AttributeGroups; //.............................................................................................................. const AttributeGroups& lcl_getAttributeGroups() @@ -174,7 +174,7 @@ namespace xmloff { namespace metadata } //.............................................................................................................. - typedef ::std::hash_map< AttributeDescription, PropertyGroups, AttributeHash > AttributesWithoutGroup; + typedef ::boost::unordered_map< AttributeDescription, PropertyGroups, AttributeHash > AttributesWithoutGroup; //.............................................................................................................. const AttributesWithoutGroup& lcl_getAttributesWithoutGroups() diff --git a/xmloff/source/forms/property_meta_data.hxx b/xmloff/source/forms/property_meta_data.hxx index f246a7bfd745..a0f2aa6a1046 100755..100644 --- a/xmloff/source/forms/property_meta_data.hxx +++ b/xmloff/source/forms/property_meta_data.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. * @@ -63,3 +64,5 @@ namespace xmloff { namespace metadata //...................................................................................................................... #endif // XMLOFF_PROPERTY_META_DATA_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/propertyexport.cxx b/xmloff/source/forms/propertyexport.cxx index bab88b47a82f..28e53e133562 100644 --- a/xmloff/source/forms/propertyexport.cxx +++ b/xmloff/source/forms/propertyexport.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. @@ -146,7 +147,7 @@ namespace xmloff aExportType = aValue.getValueType(); // the type attribute - // modified by BerryJia for Bug102407 + bool bIsEmptyValue = TypeClass_VOID == aValue.getValueType().getTypeClass(); if ( bIsEmptyValue ) { @@ -171,7 +172,7 @@ namespace xmloff if( !bIsSequence && !bIsEmptyValue ) { // the simple case - //add by BerryJia for Bug102407 + sValue = implConvertAny(aValue); AddAttribute(XML_NAMESPACE_OFFICE, eValueAttName, sValue ); } @@ -213,7 +214,7 @@ namespace xmloff pSequenceIterator = new OSequenceIterator< sal_Int64 >(aValue); break; default: - OSL_ENSURE(sal_False, "OPropertyExport::exportRemainingProperties: unsupported sequence tyoe !"); + OSL_FAIL("OPropertyExport::exportRemainingProperties: unsupported sequence tyoe !"); break; } if (pSequenceIterator) @@ -572,7 +573,7 @@ namespace xmloff break; case TypeClass_HYPER: // TODO - OSL_ENSURE(sal_False, "OPropertyExport::implConvertAny: missing implementation for sal_Int64!"); + OSL_FAIL("OPropertyExport::implConvertAny: missing implementation for sal_Int64!"); break; case TypeClass_ENUM: { @@ -614,7 +615,7 @@ namespace xmloff // if any other types are added here, please remember to adjust implGetPropertyXMLType accordingly // no more options ... - OSL_ENSURE(sal_False, "OPropertyExport::implConvertAny: unsupported value type!"); + OSL_FAIL("OPropertyExport::implConvertAny: unsupported value type!"); break; } // let the unit converter format is as string @@ -704,8 +705,7 @@ namespace xmloff // the property must exist if (!m_xPropertyInfo->hasPropertyByName(_rPropertyName)) { - OSL_ENSURE(sal_False, - ::rtl::OString("OPropertyExport::dbg_implCheckProperty: no property with the name ") += + OSL_FAIL(::rtl::OString("OPropertyExport::dbg_implCheckProperty: no property with the name ") += ::rtl::OString(_rPropertyName.getStr(), _rPropertyName.getLength(), RTL_TEXTENCODING_ASCII_US) += ::rtl::OString("!")); return; @@ -720,7 +720,7 @@ namespace xmloff } catch(Exception&) { - OSL_ENSURE(sal_False, "OPropertyExport::dbg_implCheckProperty: caught an exception, could not check the property!"); + OSL_FAIL("OPropertyExport::dbg_implCheckProperty: caught an exception, could not check the property!"); } } #endif // DBG_UTIL - dbg_implCheckProperty @@ -730,3 +730,4 @@ namespace xmloff //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/propertyexport.hxx b/xmloff/source/forms/propertyexport.hxx index 3ddfd8d4cabd..e31704c40530 100644 --- a/xmloff/source/forms/propertyexport.hxx +++ b/xmloff/source/forms/propertyexport.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. @@ -419,3 +420,4 @@ namespace xmloff #endif // _XMLOFF_FORMS_PROPERTYEXPORT_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/propertyimport.cxx b/xmloff/source/forms/propertyimport.cxx index 1fdb85067f3d..daea3d95fcfd 100644 --- a/xmloff/source/forms/propertyimport.cxx +++ b/xmloff/source/forms/propertyimport.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. @@ -109,7 +110,7 @@ Any PropertyConversion::convertString( SvXMLImport& _rImporter, const ::com::sun { case TypeClass_BOOLEAN: // sal_Bool { - sal_Bool bValue; + bool bValue; #if OSL_DEBUG_LEVEL > 0 sal_Bool bSuccess = #endif @@ -161,7 +162,7 @@ Any PropertyConversion::convertString( SvXMLImport& _rImporter, const ::com::sun break; case TypeClass_HYPER: { - OSL_ENSURE(sal_False, "PropertyConversion::convertString: 64-bit integers not implemented yet!"); + OSL_FAIL("PropertyConversion::convertString: 64-bit integers not implemented yet!"); } break; case TypeClass_DOUBLE: @@ -240,11 +241,11 @@ Any PropertyConversion::convertString( SvXMLImport& _rImporter, const ::com::sun } } else - OSL_ENSURE(sal_False, "PropertyConversion::convertString: unsupported property type!"); + OSL_FAIL("PropertyConversion::convertString: unsupported property type!"); } break; default: - OSL_ENSURE(sal_False, "PropertyConversion::convertString: invalid type class!"); + OSL_FAIL("PropertyConversion::convertString: invalid type class!"); } return aReturn; @@ -295,8 +296,7 @@ SvXMLImportContext* OPropertyImport::CreateChildContext(sal_uInt16 _nPrefix, con } else { - OSL_ENSURE(sal_False, - ::rtl::OString("OPropertyImport::CreateChildContext: unknown sub element (only \"properties\" is recognized, but it is ") + OSL_FAIL(::rtl::OString("OPropertyImport::CreateChildContext: unknown sub element (only \"properties\" is recognized, but it is ") += ::rtl::OString(_rLocalName.getStr(), _rLocalName.getLength(), RTL_TEXTENCODING_ASCII_US) += ::rtl::OString(")!")); return SvXMLImportContext::CreateChildContext(_nPrefix, _rLocalName, _rxAttrList); @@ -371,7 +371,7 @@ bool OPropertyImport::handleAttribute(sal_uInt16 /*_nNamespaceKey*/, const ::rtl sMessage += ::rtl::OString( _rLocalName.getStr(), _rLocalName.getLength(), osl_getThreadTextEncoding() ); sMessage += ::rtl::OString( "\n value: " ); sMessage += ::rtl::OString( _rValue.getStr(), _rValue.getLength(), osl_getThreadTextEncoding() ); - OSL_ENSURE( sal_False, sMessage.getStr() ); + OSL_FAIL( sMessage.getStr() ); #endif return false; } @@ -403,8 +403,7 @@ SvXMLImportContext* OPropertyElementsContext::CreateChildContext(sal_uInt16 _nPr } else { - OSL_ENSURE(sal_False, - ::rtl::OString("OPropertyElementsContext::CreateChildContext: unknown child element (\"") + OSL_FAIL(::rtl::OString("OPropertyElementsContext::CreateChildContext: unknown child element (\"") += ::rtl::OString(_rLocalName.getStr(), _rLocalName.getLength(), RTL_TEXTENCODING_ASCII_US) += ::rtl::OString("\")!")); return new SvXMLImportContext(GetImport(), _nPrefix, _rLocalName); @@ -443,8 +442,7 @@ OSinglePropertyContext::OSinglePropertyContext(SvXMLImport& _rImport, sal_uInt16 SvXMLImportContext* OSinglePropertyContext::CreateChildContext(sal_uInt16 _nPrefix, const ::rtl::OUString& _rLocalName, const Reference< sax::XAttributeList >&) { - OSL_ENSURE(sal_False, - ::rtl::OString("OSinglePropertyContext::CreateChildContext: unknown child element (\"") + OSL_FAIL(::rtl::OString("OSinglePropertyContext::CreateChildContext: unknown child element (\"") += ::rtl::OString(_rLocalName.getStr(), _rLocalName.getLength(), RTL_TEXTENCODING_ASCII_US) += ::rtl::OString("\")!")); return new SvXMLImportContext(GetImport(), _nPrefix, _rLocalName); @@ -462,7 +460,6 @@ void OSinglePropertyContext::StartElement(const Reference< sax::XAttributeList > for( sal_Int16 i=0; i < nAttrCount; i++ ) { const ::rtl::OUString& rAttrName = _rxAttrList->getNameByIndex( i ); - //const ::rtl::OUString& rValue = _rxAttrList->getValueByIndex( i ); ::rtl::OUString aLocalName; sal_uInt16 nPrefix = @@ -545,8 +542,7 @@ void OListPropertyContext::StartElement( const Reference< sax::XAttributeList >& } else { - OSL_ENSURE( false, - ::rtl::OString( "OListPropertyContext::StartElement: unknown child element (\"") + OSL_FAIL( ::rtl::OString( "OListPropertyContext::StartElement: unknown child element (\"") += ::rtl::OString( sAttributeName.getStr(), sAttributeName.getLength(), RTL_TEXTENCODING_ASCII_US ) += ::rtl::OString( "\")!" ) ); } @@ -590,8 +586,7 @@ SvXMLImportContext* OListPropertyContext::CreateChildContext( sal_uInt16 _nPrefi } else { - OSL_ENSURE( sal_False, - ::rtl::OString("OListPropertyContext::CreateChildContext: unknown child element (\"") + OSL_FAIL( ::rtl::OString("OListPropertyContext::CreateChildContext: unknown child element (\"") += ::rtl::OString(_rLocalName.getStr(), _rLocalName.getLength(), RTL_TEXTENCODING_ASCII_US) += ::rtl::OString("\")!")); return new SvXMLImportContext( GetImport(), _nPrefix, _rLocalName ); @@ -631,8 +626,7 @@ void OListValueContext::StartElement( const Reference< sax::XAttributeList >& _r } } - OSL_ENSURE( false, - ::rtl::OString( "OListValueContext::StartElement: unknown child element (\"") + OSL_FAIL( ::rtl::OString( "OListValueContext::StartElement: unknown child element (\"") += ::rtl::OString( sAttributeName.getStr(), sAttributeName.getLength(), RTL_TEXTENCODING_ASCII_US ) += ::rtl::OString( "\")!" ) ); } @@ -642,3 +636,4 @@ void OListValueContext::StartElement( const Reference< sax::XAttributeList >& _r } // namespace xmloff //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/propertyimport.hxx b/xmloff/source/forms/propertyimport.hxx index d46c0068f090..922edbdacbbd 100644 --- a/xmloff/source/forms/propertyimport.hxx +++ b/xmloff/source/forms/propertyimport.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. @@ -30,7 +31,7 @@ #include <xmloff/xmlictxt.hxx> #include "formattributes.hxx" -#include <vos/ref.hxx> +#include <rtl/ref.hxx> #include <comphelper/stl_types.hxx> #include <com/sun/star/beans/PropertyValue.hpp> #include "layerimport.hxx" @@ -251,3 +252,4 @@ namespace xmloff #endif // _XMLOFF_FORMS_PROPERTYIMPORT_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/strings.cxx b/xmloff/source/forms/strings.cxx index 33986212255e..222740b7b2ff 100644 --- a/xmloff/source/forms/strings.cxx +++ b/xmloff/source/forms/strings.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,3 +36,4 @@ #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/strings.hxx b/xmloff/source/forms/strings.hxx index 66a5f76786fe..b98cd42f43c7 100644 --- a/xmloff/source/forms/strings.hxx +++ b/xmloff/source/forms/strings.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. @@ -205,6 +206,7 @@ namespace xmloff XMLFORM_CONSTASCII_STRING( PROPERTY_IMAGE_POSITION, "ImagePosition"); XMLFORM_CONSTASCII_STRING( PROPERTY_IMAGE_ALIGN, "ImageAlign"); XMLFORM_CONSTASCII_STRING( PROPERTY_SCALE_IMAGE, "ScaleImage"); + XMLFORM_CONSTASCII_STRING( PROPERTY_GROUP_NAME, "GroupName"); XMLFORM_CONSTASCII_STRING( PROPERTY_BOUND_CELL, "BoundCell"); XMLFORM_CONSTASCII_STRING( PROPERTY_LIST_CELL_RANGE, "CellRange"); @@ -281,3 +283,5 @@ namespace xmloff //......................................................................... #endif // _XMLOFF_FORMS_STRINGS_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/valueproperties.cxx b/xmloff/source/forms/valueproperties.cxx index 8bf9ae7bcd57..59d1b25de22d 100644 --- a/xmloff/source/forms/valueproperties.cxx +++ b/xmloff/source/forms/valueproperties.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. @@ -197,3 +198,4 @@ namespace xmloff //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/valueproperties.hxx b/xmloff/source/forms/valueproperties.hxx index 95f2b13d1880..f29153653bf4 100644 --- a/xmloff/source/forms/valueproperties.hxx +++ b/xmloff/source/forms/valueproperties.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. @@ -82,3 +83,4 @@ namespace xmloff #endif // _XMLOFF_FORMS_VALUEPROPERTIES_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/meta/MetaExportComponent.cxx b/xmloff/source/meta/MetaExportComponent.cxx index 66717ae3aaf8..37af37bb498e 100644 --- a/xmloff/source/meta/MetaExportComponent.cxx +++ b/xmloff/source/meta/MetaExportComponent.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,16 +34,8 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/uno/Sequence.hxx> #include <com/sun/star/uno/Reference.hxx> - -#ifndef _COM_SUN_STAR_UNO_EXCEPTION_HPP #include <com/sun/star/uno/Exception.hpp> -#endif #include <com/sun/star/beans/PropertyAttribute.hpp> - -// #110680# -//#ifndef _COMPHELPER_PROCESSFACTORY_HXX_ -//#include <comphelper/processfactory.hxx> -//#endif #include <comphelper/genericpropertyset.hxx> #include <rtl/ustrbuf.hxx> #include "xmloff/xmlnmspe.hxx" @@ -58,7 +51,6 @@ using namespace ::com::sun::star; using namespace ::xmloff::token; -// #110680# XMLMetaExportComponent::XMLMetaExportComponent( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, sal_uInt16 nFlags ) @@ -128,7 +120,7 @@ sal_uInt32 XMLMetaExportComponent::exportDoc( enum XMLTokenEnum ) // get filter component xDocHandler = uno::Reference< xml::sax::XDocumentHandler >( xFactory->createInstanceWithArguments( - ::rtl::OUString::createFromAscii("com.sun.star.comp.Oasis2OOoTransformer"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Oasis2OOoTransformer")), aArgs), uno::UNO_QUERY_THROW ); @@ -136,7 +128,7 @@ sal_uInt32 XMLMetaExportComponent::exportDoc( enum XMLTokenEnum ) } catch( com::sun::star::uno::Exception& ) { - OSL_ENSURE( sal_False, "Cannot instantiate com.sun.star.comp.Oasis2OOoTransformer!\n"); + OSL_FAIL( "Cannot instantiate com.sun.star.comp.Oasis2OOoTransformer!\n"); } } } @@ -144,17 +136,7 @@ sal_uInt32 XMLMetaExportComponent::exportDoc( enum XMLTokenEnum ) xDocHandler->startDocument(); { -#if 0 - GetAttrList().AddAttribute( - GetNamespaceMap().GetAttrNameByKey( XML_NAMESPACE_DC ), - GetNamespaceMap().GetNameByKey( XML_NAMESPACE_DC ) ); - GetAttrList().AddAttribute( - GetNamespaceMap().GetAttrNameByKey( XML_NAMESPACE_META ), - GetNamespaceMap().GetNameByKey( XML_NAMESPACE_META ) ); - GetAttrList().AddAttribute( - GetNamespaceMap().GetAttrNameByKey( XML_NAMESPACE_OFFICE ), - GetNamespaceMap().GetNameByKey( XML_NAMESPACE_OFFICE ) ); -#else + const SvXMLNamespaceMap& rMap = GetNamespaceMap(); sal_uInt16 nPos = rMap.GetFirstKey(); while( USHRT_MAX != nPos ) @@ -162,7 +144,6 @@ sal_uInt32 XMLMetaExportComponent::exportDoc( enum XMLTokenEnum ) GetAttrList().AddAttribute( rMap.GetAttrNameByKey( nPos ), rMap.GetNameByKey( nPos ) ); nPos = GetNamespaceMap().GetNextKey( nPos ); } -#endif const sal_Char* pVersion = 0; switch( getDefaultVersion() ) @@ -173,7 +154,7 @@ sal_uInt32 XMLMetaExportComponent::exportDoc( enum XMLTokenEnum ) case SvtSaveOptions::ODFVER_010: break; default: - DBG_ERROR("xmloff::XMLMetaExportComponent::exportDoc(), unexpected odf default version!"); + OSL_FAIL("xmloff::XMLMetaExportComponent::exportDoc(), unexpected odf default version!"); } if( pVersion ) @@ -228,8 +209,6 @@ uno::Reference< uno::XInterface > SAL_CALL XMLMetaExportComponent_createInstance const uno::Reference< lang::XMultiServiceFactory > & rSMgr) throw( uno::Exception ) { - // #110680# - // return (cppu::OWeakObject*)new XMLMetaExportComponent; return (cppu::OWeakObject*)new XMLMetaExportComponent(rSMgr, EXPORT_META|EXPORT_OASIS); } @@ -251,8 +230,7 @@ uno::Reference< uno::XInterface > SAL_CALL XMLMetaExportOOO_createInstance( const uno::Reference< lang::XMultiServiceFactory > & rSMgr) throw( uno::Exception ) { - // #110680# - // return (cppu::OWeakObject*)new XMLMetaExportComponent; return (cppu::OWeakObject*)new XMLMetaExportComponent(rSMgr, EXPORT_META); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/meta/MetaImportComponent.cxx b/xmloff/source/meta/MetaImportComponent.cxx index d27d2c33b239..a58cecb1f707 100644 --- a/xmloff/source/meta/MetaImportComponent.cxx +++ b/xmloff/source/meta/MetaImportComponent.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,13 +65,13 @@ SvXMLImportContext* XMLMetaImportComponent::CreateContext( IsXMLToken(rLocalName, XML_DOCUMENT_META) ) { if (!mxDocProps.is()) { - throw uno::RuntimeException(::rtl::OUString::createFromAscii( + throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "XMLMetaImportComponent::CreateContext: setTargetDocument " - "has not been called"), *this); + "has not been called")), *this); } uno::Reference<xml::sax::XDocumentHandler> xDocBuilder( - mxServiceFactory->createInstance(::rtl::OUString::createFromAscii( - "com.sun.star.xml.dom.SAXDocumentBuilder")), + mxServiceFactory->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.xml.dom.SAXDocumentBuilder"))), uno::UNO_QUERY_THROW); return new SvXMLMetaDocumentContext( *this, nPrefix, rLocalName, mxDocProps, xDocBuilder); @@ -87,9 +88,9 @@ void SAL_CALL XMLMetaImportComponent::setTargetDocument( { mxDocProps = uno::Reference< document::XDocumentProperties >::query( xDoc ); if( !mxDocProps.is() ) - throw lang::IllegalArgumentException(::rtl::OUString::createFromAscii( + throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "XMLMetaImportComponent::setTargetDocument: argument is no " - "XDocumentProperties"), uno::Reference<uno::XInterface>(*this), 0); + "XDocumentProperties")), uno::Reference<uno::XInterface>(*this), 0); } uno::Sequence< rtl::OUString > SAL_CALL @@ -112,7 +113,7 @@ uno::Reference< uno::XInterface > SAL_CALL XMLMetaImportComponent_createInstance throw( uno::Exception ) { // #110680# - // return (cppu::OWeakObject*)new XMLMetaImportComponent; return (cppu::OWeakObject*)new XMLMetaImportComponent(rSMgr); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/meta/xmlmetae.cxx b/xmloff/source/meta/xmlmetae.cxx index 55e7cd97f810..e50be583d072 100644 --- a/xmloff/source/meta/xmlmetae.cxx +++ b/xmloff/source/meta/xmlmetae.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. @@ -350,7 +351,6 @@ SvXMLMetaExport::~SvXMLMetaExport() void SvXMLMetaExport::Export() { -// exportDom(xDOM, mrExport); // this would not work (root node, namespaces) uno::Reference< xml::sax::XSAXSerializable> xSAXable(mxDocProps, uno::UNO_QUERY); if (xSAXable.is()) { @@ -365,7 +365,7 @@ void SvXMLMetaExport::Export() } else if (attrname.equalsAsciiL(s_xmlns, strlen(s_xmlns))) { // default initialized empty string } else { - DBG_ERROR("namespace attribute not starting with xmlns unexpected"); + OSL_FAIL("namespace attribute not starting with xmlns unexpected"); } ns.Second = rNsMap.GetNameByKey(key); namespaces.push_back(ns); @@ -526,3 +526,4 @@ SvXMLMetaExport::setDocumentLocator(const uno::Reference<xml::sax::XLocator>&) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/meta/xmlmetai.cxx b/xmloff/source/meta/xmlmetai.cxx index 9f5aebece935..4e2024c3cf5e 100644 --- a/xmloff/source/meta/xmlmetai.cxx +++ b/xmloff/source/meta/xmlmetai.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. @@ -150,9 +151,9 @@ lcl_initDocumentProperties(SvXMLImport & rImport, throw; } catch (uno::Exception & e) { throw lang::WrappedTargetRuntimeException( - ::rtl::OUString::createFromAscii( + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "SvXMLMetaDocumentContext::initDocumentProperties: " - "properties init exception"), + "properties init exception")), rImport, makeAny(e)); } } @@ -184,8 +185,8 @@ lcl_initGenerator(SvXMLImport & rImport, throw; } catch (uno::Exception & e) { throw lang::WrappedTargetRuntimeException( - ::rtl::OUString::createFromAscii( - "SvXMLMetaDocumentContext::initGenerator: exception"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "SvXMLMetaDocumentContext::initGenerator: exception")), rImport, makeAny(e)); } } @@ -292,11 +293,11 @@ void SvXMLMetaDocumentContext::setBuildId(::rtl::OUString const& i_rBuildId, con (i_rBuildId.compareToAscii( RTL_CONSTASCII_STRINGPARAM("OpenOffice.org 1") ) == 0)) { - sBuildId = OUString::createFromAscii( "645$8687" ); + sBuildId = OUString(RTL_CONSTASCII_USTRINGPARAM("645$8687")); } if ((i_rBuildId.compareToAscii( RTL_CONSTASCII_STRINGPARAM("NeoOffice/2") ) == 0) ) { - sBuildId = OUString::createFromAscii( "680$9134" ); // fake NeoOffice as OpenOffice.org 2.2 release + sBuildId = OUString(RTL_CONSTASCII_USTRINGPARAM("680$9134")); // fake NeoOffice as OpenOffice.org 2.2 release } } @@ -316,3 +317,4 @@ void SvXMLMetaDocumentContext::setBuildId(::rtl::OUString const& i_rBuildId, con } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/meta/xmlversion.cxx b/xmloff/source/meta/xmlversion.cxx index 819fa13500e1..8163dd5adbb1 100644 --- a/xmloff/source/meta/xmlversion.cxx +++ b/xmloff/source/meta/xmlversion.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. @@ -51,10 +52,9 @@ using ::rtl::OUString; // ------------------------------------------------------------------------ -sal_Char __FAR_DATA XMLN_VERSIONSLIST[] = "VersionList.xml"; +sal_Char XMLN_VERSIONSLIST[] = "VersionList.xml"; // ------------------------------------------------------------------------ - // #110897# XMLVersionListExport::XMLVersionListExport( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory, @@ -115,8 +115,6 @@ sal_uInt32 XMLVersionListExport::exportDoc( enum ::xmloff::token::XMLTokenEnum ) } // ------------------------------------------------------------------------ -// ------------------------------------------------------------------------ - // #110897# XMLVersionListImport::XMLVersionListImport( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory, @@ -155,8 +153,6 @@ SvXMLImportContext *XMLVersionListImport::CreateContext( // ------------------------------------------------------------------------ -// ------------------------------------------------------------------------ - XMLVersionListContext::XMLVersionListContext( XMLVersionListImport& rImport, sal_uInt16 nPrefix, const OUString& rLocalName, @@ -191,8 +187,6 @@ SvXMLImportContext *XMLVersionListContext::CreateChildContext( sal_uInt16 nPrefi } // ------------------------------------------------------------------------ -// ------------------------------------------------------------------------ - XMLVersionContext::XMLVersionContext( XMLVersionListImport& rImport, sal_uInt16 nPref, const OUString& rLocalName, @@ -252,7 +246,6 @@ XMLVersionContext::~XMLVersionContext( void ) {} // ------------------------------------------------------------------------ -// static sal_Bool XMLVersionContext::ParseISODateTimeString( const rtl::OUString& rString, util::DateTime& rDateTime ) @@ -354,8 +347,6 @@ sal_Bool XMLVersionContext::ParseISODateTimeString( // ------------------------------------------------------------------------ -// ------------------------------------------------------------------------ - void SAL_CALL XMLVersionListPersistence::store( const uno::Reference< embed::XStorage >& xRoot, const uno::Sequence< util::RevisionTag >& rVersions ) throw (::com::sun::star::io::IOException, ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException) { @@ -375,14 +366,6 @@ void SAL_CALL XMLVersionListPersistence::store( const uno::Reference< embed::XSt // and delete it OUString sVerName( RTL_CONSTASCII_USTRINGPARAM( XMLN_VERSIONSLIST ) ); - // is this really needed, we set the size to zero before doing - // anything with this stream? -/* if ( xRoot->IsContained( sVerName ) ) - { - xRoot->Remove( sVerName ); - xRoot->Commit(); - } -*/ try { // open (create) the sub storage with the version info uno::Reference< io::XStream > xVerStream = xRoot->openStreamElement( @@ -391,11 +374,6 @@ void SAL_CALL XMLVersionListPersistence::store( const uno::Reference< embed::XSt if ( !xVerStream.is() ) throw uno::RuntimeException(); -//REMOVE // SetSize should not be neccessary because OpenStream( WRITE|TRUNC ) should already -//REMOVE // have set the size to zero -//REMOVE // xVerStream->SetSize ( 0L ); -//REMOVE xVerStream->SetBufferSize( 16*1024 ); - Reference< io::XOutputStream > xOut = xVerStream->getOutputStream(); if ( !xOut.is() ) throw uno::RuntimeException(); // the stream was successfuly opened for writing already @@ -405,14 +383,11 @@ void SAL_CALL XMLVersionListPersistence::store( const uno::Reference< embed::XSt Reference< XDocumentHandler > xHandler( xWriter, uno::UNO_QUERY ); - // XMLVersionListExport aExp( pList, sVerName, xHandler ); XMLVersionListExport aExp( xServiceFactory, rVersions, sVerName, xHandler ); aExp.exportDoc( ::xmloff::token::XML_VERSION ); -//REMOVE xVerStream->Commit(); xVerStream = uno::Reference< io::XStream >(); // use refcounting for now to dispose - // xRoot->Commit(); } catch( uno::Exception& ) { @@ -444,7 +419,7 @@ uno::Sequence< util::RevisionTag > SAL_CALL XMLVersionListPersistence::load( con if ( xProps.is() ) { try { - xProps->getPropertyValue( ::rtl::OUString::createFromAscii( "URL" ) ) >>= aParserInput.sSystemId; + xProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL")) ) >>= aParserInput.sSystemId; } catch( uno::Exception& ) {} @@ -456,9 +431,6 @@ uno::Sequence< util::RevisionTag > SAL_CALL XMLVersionListPersistence::load( con if ( !xDocStream.is() ) throw uno::RuntimeException(); -//REMOVE xDocStream->Seek( 0L ); -//REMOVE xDocStream->SetBufferSize( 16*1024 ); - aParserInput.aInputStream = xDocStream->getInputStream(); OSL_ENSURE( aParserInput.aInputStream.is(), "The stream was successfuly opened for reading, the input part must be accessible!\n" ); @@ -467,12 +439,11 @@ uno::Sequence< util::RevisionTag > SAL_CALL XMLVersionListPersistence::load( con // get parser Reference< XInterface > xXMLParser = xServiceFactory->createInstance( - OUString::createFromAscii("com.sun.star.xml.sax.Parser") ); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser")) ); DBG_ASSERT( xXMLParser.is(), "XMLReader::Read: com.sun.star.xml.sax.Parser service missing" ); // get filter - // Reference< XDocumentHandler > xFilter = new XMLVersionListImport( pList ); Reference< XDocumentHandler > xFilter = new XMLVersionListImport( xServiceFactory, aVersions ); // connect parser and filter @@ -539,3 +510,4 @@ uno::Reference< uno::XInterface > SAL_CALL XMLVersionImExportOOO_createInstance( return (cppu::OWeakObject*)new XMLVersionListPersistence; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/script/XMLEventExport.cxx b/xmloff/source/script/XMLEventExport.cxx index 2675ecb4b98f..ebb339348097 100644 --- a/xmloff/source/script/XMLEventExport.cxx +++ b/xmloff/source/script/XMLEventExport.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. @@ -29,17 +30,11 @@ #include "precompiled_xmloff.hxx" #include <xmloff/XMLEventExport.hxx> -#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP #include <com/sun/star/beans/PropertyValue.hpp> -#endif -#ifndef _COM_SUN_STAR_DOCUMENT_XEVENTSSUPPLIER_HPP #include <com/sun/star/document/XEventsSupplier.hpp> -#endif -#ifndef _COM_SUN_STAR_CONTAINER_XNAMEREPLACE_HPP #include <com/sun/star/container/XNameReplace.hpp> -#endif #include <tools/debug.hxx> #include <xmloff/xmlexp.hxx> #include <xmloff/xmltoken.hxx> @@ -75,7 +70,7 @@ XMLEventExport::~XMLEventExport() for( HandlerMap::iterator aIter = aHandlerMap.begin(); aIter != aEnd; - aIter++ ) + ++aIter ) { delete aIter->second; } @@ -164,7 +159,7 @@ void XMLEventExport::Export( Reference<XNameAccess> & rAccess, // don't proceed further ::rtl::OString aStr("Unknown event name:" ); aStr += ::rtl::OUStringToOString( aNames[i], RTL_TEXTENCODING_UTF8 ); - DBG_ERROR( aStr.getStr() ); + OSL_FAIL( aStr.getStr() ); } #endif } @@ -214,7 +209,7 @@ void XMLEventExport::ExportSingleEvent( // don't proceed further ::rtl::OString aStr("Unknown event name:" ); aStr += ::rtl::OUStringToOString( rApiEventName, RTL_TEXTENCODING_UTF8 ); - DBG_ERROR( aStr.getStr() ); + OSL_FAIL( aStr.getStr() ); } #endif } @@ -261,7 +256,7 @@ void XMLEventExport::ExportEvent( { if (! sType.equalsAsciiL("None", sizeof("None")-1)) { - DBG_ERROR("unknown event type returned by API"); + OSL_FAIL("unknown event type returned by API"); // unknown type -> error (ignore) } // else: we ignore None fields @@ -365,3 +360,5 @@ const XMLEventNameTranslation aStandardEventTable[] = { NULL, 0, 0 } }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/script/XMLEventImportHelper.cxx b/xmloff/source/script/XMLEventImportHelper.cxx index 3dfbab60952f..991d3159516a 100644 --- a/xmloff/source/script/XMLEventImportHelper.cxx +++ b/xmloff/source/script/XMLEventImportHelper.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_XMLEVENTIMPORTHELPER_HXX #include "XMLEventImportHelper.hxx" -#endif #include <tools/debug.hxx> #include <xmloff/xmlimp.hxx> #include <xmloff/nmspmap.hxx> @@ -56,7 +55,7 @@ XMLEventImportHelper::~XMLEventImportHelper() FactoryMap::iterator aEnd = aFactoryMap.end(); for(FactoryMap::iterator aIter = aFactoryMap.begin(); aIter != aEnd; - aIter++ ) + ++aIter) { delete aIter->second; } @@ -177,3 +176,5 @@ SvXMLImportContext* XMLEventImportHelper::CreateContext( return pContext; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/script/XMLEventsImportContext.cxx b/xmloff/source/script/XMLEventsImportContext.cxx index 301bef53856d..3ce8cec3eec9 100644 --- a/xmloff/source/script/XMLEventsImportContext.cxx +++ b/xmloff/source/script/XMLEventsImportContext.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. @@ -29,13 +30,9 @@ #include "precompiled_xmloff.hxx" #include <xmloff/XMLEventsImportContext.hxx> -#ifndef _XMLOFF_XMLEVENTIMPORTHELPER_HXX #include "XMLEventImportHelper.hxx" -#endif -#ifndef _COM_SUN_STAR_DOCUMENT_XEVENTSSUPPLIER_HPP #include <com/sun/star/document/XEventsSupplier.hpp> -#endif #include <tools/debug.hxx> #include <xmloff/xmlimp.hxx> #include <xmloff/nmspmap.hxx> @@ -90,15 +87,6 @@ XMLEventsImportContext::~XMLEventsImportContext() { // // if, for whatever reason, the object gets destroyed prematurely, // // we need to delete the collected events -// EventsVector::iterator aEnd = aCollectEvents.end(); -// for(EventsVector::iterator aIter = aCollectEvents.begin(); -// aIter != aEnd; -// aIter++) -// { -// EventNameValuesPair* pPair = &(*aIter); -// delete pPair; -// } -// aCollectEvents.clear(); } @@ -175,11 +163,9 @@ void XMLEventsImportContext::SetEvents( EventsVector::iterator aEnd = aCollectEvents.end(); for(EventsVector::iterator aIter = aCollectEvents.begin(); aIter != aEnd; - aIter++) + ++aIter) { AddEventValues(aIter->first, aIter->second); -// EventNameValuesPair* pPair = &(*aIter); -// delete pPair; } aCollectEvents.clear(); } @@ -197,7 +183,7 @@ sal_Bool XMLEventsImportContext::GetEventSequence( EventsVector::iterator aIter = aCollectEvents.begin(); while( (aIter != aCollectEvents.end()) && (aIter->first != rName) ) { - aIter++; + ++aIter; } // if we're not at the end, set the sequence @@ -238,10 +224,9 @@ void XMLEventsImportContext::AddEventValues( } else { -// EventNameValuesPair* aPair = new EventNameValuesPair(rEventName, -// rValues); -// aCollectEvents.push_back(*aPair); EventNameValuesPair aPair(rEventName, rValues); aCollectEvents.push_back(aPair); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/script/XMLScriptContextFactory.cxx b/xmloff/source/script/XMLScriptContextFactory.cxx index 60e08a208f72..4de998a5207b 100644 --- a/xmloff/source/script/XMLScriptContextFactory.cxx +++ b/xmloff/source/script/XMLScriptContextFactory.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,5 @@ SvXMLImportContext * XMLScriptContextFactory::CreateContext return new SvXMLImportContext(rImport, p_nPrefix, rLocalName); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/script/XMLScriptExportHandler.cxx b/xmloff/source/script/XMLScriptExportHandler.cxx index 9cfc7211f3b9..9310accee364 100644 --- a/xmloff/source/script/XMLScriptExportHandler.cxx +++ b/xmloff/source/script/XMLScriptExportHandler.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. @@ -29,9 +30,7 @@ #include "precompiled_xmloff.hxx" #include "XMLScriptExportHandler.hxx" -#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP #include <com/sun/star/beans/PropertyValue.hpp> -#endif #include <tools/debug.hxx> #include <xmloff/xmlexp.hxx> #include <xmloff/xmltoken.hxx> @@ -86,3 +85,5 @@ void XMLScriptExportHandler::Export( XML_EVENT_LISTENER, bUseWhitespace, sal_False); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/script/XMLStarBasicContextFactory.cxx b/xmloff/source/script/XMLStarBasicContextFactory.cxx index a957b4bd060f..51c2050be4bc 100644 --- a/xmloff/source/script/XMLStarBasicContextFactory.cxx +++ b/xmloff/source/script/XMLStarBasicContextFactory.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,18 +80,6 @@ SvXMLImportContext* XMLStarBasicContextFactory::CreateContext( if (XML_NAMESPACE_SCRIPT == nPrefix) { -// if (IsXMLToken(sLocalName, XML_LIBRARY)) -// { -// sLibraryVal = xAttrList->getValueByIndex(nAttr); -// } -// if (IsXMLToken(sLocalName, XML_LOCATION)) -// { -// sLibraryVal = xAttrList->getValueByIndex(nAttr); -// if ( IsXMLToken( sLibraryVal, XML_APPLICATION ) ) -// sLibraryVal = -// OUString(RTL_CONSTASCII_USTRINGPARAM("StarOffice")); -// } -// else if (IsXMLToken(sLocalName, XML_MACRO_NAME)) { sMacroNameVal = xAttrList->getValueByIndex(nAttr); @@ -137,3 +126,5 @@ SvXMLImportContext* XMLStarBasicContextFactory::CreateContext( // return dummy context return new SvXMLImportContext(rImport, p_nPrefix, rLocalName); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/script/XMLStarBasicExportHandler.cxx b/xmloff/source/script/XMLStarBasicExportHandler.cxx index 13d6948ba98e..023dc7efcf1e 100644 --- a/xmloff/source/script/XMLStarBasicExportHandler.cxx +++ b/xmloff/source/script/XMLStarBasicExportHandler.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. @@ -29,9 +30,7 @@ #include "precompiled_xmloff.hxx" #include "XMLStarBasicExportHandler.hxx" -#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP #include <com/sun/star/beans/PropertyValue.hpp> -#endif #include <tools/debug.hxx> #include <xmloff/xmlexp.hxx> #include <xmloff/xmltoken.hxx> @@ -109,3 +108,5 @@ void XMLStarBasicExportHandler::Export( XML_EVENT_LISTENER, bUseWhitespace, sal_False); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/script/xmlbasici.cxx b/xmloff/source/script/xmlbasici.cxx index 8897dd7134b5..c6738eb51c83 100644 --- a/xmloff/source/script/xmlbasici.cxx +++ b/xmloff/source/script/xmlbasici.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. @@ -195,3 +196,5 @@ void XMLBasicImportChildContext::Characters( const ::rtl::OUString& rChars ) } // ----------------------------------------------------------------------------- + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/script/xmlbasici.hxx b/xmloff/source/script/xmlbasici.hxx index 11bfef201b08..b9e5099b1780 100644 --- a/xmloff/source/script/xmlbasici.hxx +++ b/xmloff/source/script/xmlbasici.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. @@ -86,3 +87,5 @@ public: }; #endif // _XMLOFF_XMLBASICI_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/script/xmlscripti.cxx b/xmloff/source/script/xmlscripti.cxx index d498922afa15..16d4f2c5c6ce 100644 --- a/xmloff/source/script/xmlscripti.cxx +++ b/xmloff/source/script/xmlscripti.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. @@ -48,6 +49,7 @@ using namespace com::sun::star::document; using namespace com::sun::star::xml::sax; using namespace ::xmloff::token; +using rtl::OUString; // ============================================================================= // XMLScriptChildContext: context for <office:script> element @@ -186,3 +188,5 @@ void XMLScriptContext::EndElement() } // ----------------------------------------------------------------------------- + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/AttributeContainerHandler.cxx b/xmloff/source/style/AttributeContainerHandler.cxx index cc542b25675a..94c0f2e25ef2 100644 --- 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..97f187b5178e 100644 --- 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 }, @@ -220,8 +221,6 @@ sal_Bool XMLDashStyleImport::importXML( // Export //------------------------------------------------------------- -#ifndef SVX_LIGHT - XMLDashStyleExport::XMLDashStyleExport( SvXMLExport& rExp ) : rExport(rExp) { @@ -329,4 +328,4 @@ sal_Bool XMLDashStyleExport::exportXML( return bRet; } -#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 --- 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 --- 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 --- 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..305b4932a2db 100644 --- 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. @@ -56,8 +57,6 @@ XMLGradientStyleContext::XMLGradientStyleContext( SvXMLImport& rImport, sal_uInt const uno::Reference< xml::sax::XAttributeList >& xAttrList) : SvXMLStyleContext(rImport, nPrfx, rLName, xAttrList) { - // set Family -// SetFamily( XML_STYLE_FAMILY_FILLSTYLE_GRADIENT_ID ); // start import XMLGradientStyleImport aGradientStyle( GetImport() ); @@ -359,3 +358,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 --- 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..c468f2907d1e 100644 --- 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 }, @@ -234,8 +235,6 @@ sal_Bool XMLGradientStyleImport::importXML( // Export //------------------------------------------------------------- -#ifndef SVX_LIGHT - XMLGradientStyleExport::XMLGradientStyleExport( SvXMLExport& rExp ) : rExport(rExp) @@ -341,4 +340,4 @@ sal_Bool XMLGradientStyleExport::exportXML( return bRet; } -#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..ded1ad105cb7 100644 --- 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 }, @@ -188,8 +189,6 @@ sal_Bool XMLHatchStyleImport::importXML( // Export //------------------------------------------------------------- -#ifndef SVX_LIGHT - XMLHatchStyleExport::XMLHatchStyleExport( SvXMLExport& rExp ) : rExport(rExp) { @@ -260,4 +259,4 @@ sal_Bool XMLHatchStyleExport::exportXML( return bRet; } -#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..f306ede9eaa3 100644 --- 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. @@ -55,8 +56,6 @@ enum SvXMLTokenMapAttrs XML_TOK_IMAGE_TYPE, XML_TOK_IMAGE_SHOW, XML_TOK_IMAGE_ACTUATE, - /* XML_TOK_IMAGE_SIZEW, - XML_TOK_IMAGE_SIZEH,*/ XML_TOK_TABSTOP_END=XML_TOK_UNKNOWN }; @@ -69,8 +68,6 @@ XMLImageStyle::~XMLImageStyle() { } -#ifndef SVX_LIGHT - sal_Bool XMLImageStyle::exportXML( const OUString& rStrName, const ::com::sun::star::uno::Any& rValue, SvXMLExport& rExport ) { return ImpExportXML( rStrName, rValue, rExport ); @@ -107,18 +104,7 @@ sal_Bool XMLImageStyle::ImpExportXML( const OUString& rStrName, const uno::Any& rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED ); rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD ); } -/* - // size - awt::Size aSize = xBitmap->getSize(); - - rUnitConverter.convertNumber( aOut, aSize.Width ); - aStrValue = aOut.makeStringAndClear(); - AddAttribute( XML_NAMESPACE_SVG, XML_WIDTH, aStrValue ); - - rUnitConverter.convertNumber( aOut, aSize.Height ); - aStrValue = aOut.makeStringAndClear(); - AddAttribute( XML_NAMESPACE_SVG, XML_HEIGHT, aStrValue ); -*/ + // Do Write SvXMLElementExport aElem( rExport, XML_NAMESPACE_DRAW, XML_FILL_IMAGE, sal_True, sal_True ); @@ -133,8 +119,6 @@ sal_Bool XMLImageStyle::ImpExportXML( const OUString& rStrName, const uno::Any& return bRet; } -#endif // #ifndef SVX_LIGHT - sal_Bool XMLImageStyle::importXML( const uno::Reference< xml::sax::XAttributeList >& xAttrList, uno::Any& rValue, OUString& rStrName, SvXMLImport& rImport ) { return ImpImportXML( xAttrList, rValue, rStrName, rImport ); @@ -151,7 +135,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 }, @@ -159,8 +143,6 @@ sal_Bool XMLImageStyle::ImpImportXML( const uno::Reference< xml::sax::XAttribute { XML_NAMESPACE_XLINK, XML_TYPE, XML_TOK_IMAGE_TYPE }, { XML_NAMESPACE_XLINK, XML_SHOW, XML_TOK_IMAGE_SHOW }, { XML_NAMESPACE_XLINK, XML_ACTUATE, XML_TOK_IMAGE_ACTUATE }, - /*{ XML_NAMESPACE_XLINK, XML_HREF, XML_TOK_IMAGE_URL }, - { XML_NAMESPACE_XLINK, XML_HREF, XML_TOK_IMAGE_URL },*/ XML_TOKEN_MAP_END }; @@ -223,3 +205,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..5cacaf44b08b 100644 --- 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. @@ -164,8 +165,6 @@ sal_Bool XMLMarkerStyleImport::importXML( // Export //------------------------------------------------------------- -#ifndef SVX_LIGHT - XMLMarkerStyleExport::XMLMarkerStyleExport( SvXMLExport& rExp ) : rExport( rExp ) { @@ -283,4 +282,4 @@ sal_Bool XMLMarkerStyleExport::exportXML( return bRet; } -#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 --- 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 --- 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 --- 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 --- 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 d803b79b50a1..ff6c46cc466f 100644 --- 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,7 +31,7 @@ #include "PageMasterExportPropMapper.hxx" #include <xmloff/xmltoken.hxx> #include <comphelper/types.hxx> -#include <com/sun/star/table/BorderLine.hpp> +#include <com/sun/star/table/BorderLine2.hpp> #include <xmloff/PageMasterStyleMap.hxx> #include <tools/debug.hxx> #include <rtl/ustrbuf.hxx> @@ -45,17 +46,19 @@ using namespace ::xmloff::token; //______________________________________________________________________________ -inline sal_Bool lcl_HasSameLineWidth( const table::BorderLine& rLine1, const table::BorderLine& rLine2 ) +inline sal_Bool lcl_HasSameLineWidth( const table::BorderLine2& rLine1, const table::BorderLine2& rLine2 ) { return (rLine1.InnerLineWidth == rLine2.InnerLineWidth) && (rLine1.OuterLineWidth == rLine2.OuterLineWidth) && - (rLine1.LineDistance == rLine2.LineDistance); + (rLine1.LineDistance == rLine2.LineDistance) && + (rLine1.LineWidth == rLine2.LineWidth); } -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 ) @@ -168,7 +171,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; @@ -193,7 +196,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; @@ -482,3 +485,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 --- 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 --- 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 4af6e1ce16e1..f920425e0d8e 100644 --- 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. @@ -32,7 +33,7 @@ #include "PageMasterPropMapper.hxx" #include <xmloff/PageMasterStyleMap.hxx> #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> @@ -57,7 +58,7 @@ PageMasterImportPropertyMapper::~PageMasterImportPropertyMapper() { } -sal_Bool PageMasterImportPropertyMapper::handleSpecialItem( +bool PageMasterImportPropertyMapper::handleSpecialItem( XMLPropertyState& rProperty, ::std::vector< XMLPropertyState >& rProperties, const ::rtl::OUString& rValue, @@ -259,15 +260,16 @@ 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; aBorderLine.LineDistance = aBorderLineWidth.LineDistance; + aBorderLine.LineWidth = aBorderLineWidth.LineWidth; pBorders[i]->maValue <<= aBorderLine; } } @@ -281,15 +283,16 @@ 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; aBorderLine.LineDistance = aBorderLineWidth.LineDistance; + aBorderLine.LineWidth = aBorderLineWidth.LineWidth; pHeaderBorders[i]->maValue <<= aBorderLine; } } @@ -303,15 +306,16 @@ 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; aBorderLine.LineDistance = aBorderLineWidth.LineDistance; + aBorderLine.LineWidth = aBorderLineWidth.LineWidth; pFooterBorders[i]->maValue <<= aBorderLine; } } @@ -402,3 +406,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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 41d2172ab4fa..f207f7d7f43a 100644 --- 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. @@ -29,7 +30,6 @@ #include "precompiled_xmloff.hxx" #include <xmloff/PageMasterStyleMap.hxx> - #include <xmloff/xmlnmspe.hxx> #include <xmloff/xmltoken.hxx> @@ -111,6 +111,7 @@ const XMLPropertyMapEntry aXMLPageMasterStyleMap[] = //text grid enhancement for better CJK support PLMAP( "GridBaseWidth", XML_NAMESPACE_STYLE, XML_LAYOUT_GRID_BASE_WIDTH, XML_TYPE_MEASURE, CTP_PM_GRID_BASE_WIDTH ), + PLMAP( "GridSnapToChars", XML_NAMESPACE_STYLE, XML_LAYOUT_GRID_SNAP_TO, XML_TYPE_BOOL, CTP_PM_GRID_SNAP_TO_CHARS ), PLMAP( "GridSnapToChars", XML_NAMESPACE_STYLE, XML_LAYOUT_GRID_SNAP_TO_CHARS, XML_TYPE_BOOL, CTP_PM_GRID_SNAP_TO_CHARS ), //export as a default attribute PLMAP( "StandardPageMode", XML_NAMESPACE_STYLE, XML_LAYOUT_GRID_STANDARD_MODE, XML_TYPE_BOOL|MID_FLAG_DEFAULT_ITEM_EXPORT, CTF_PM_STANDARD_MODE ), @@ -125,6 +126,7 @@ const XMLPropertyMapEntry aXMLPageMasterStyleMap[] = PLMAP( "FootnoteLineRelativeWidth", XML_NAMESPACE_STYLE, XML__EMPTY, XML_TYPE_PERCENT8|MID_FLAG_SPECIAL_ITEM, CTF_PM_FTN_LINE_WIDTH ), PLMAP( "FootnoteLineTextDistance", XML_NAMESPACE_STYLE, XML__EMPTY, XML_TYPE_MEASURE|MID_FLAG_SPECIAL_ITEM, CTF_PM_FTN_LINE_DISTANCE ), PLMAP( "FootnoteLineWeight", XML_NAMESPACE_STYLE, XML_FOOTNOTE_SEP, XML_TYPE_MEASURE16|MID_FLAG_ELEMENT_ITEM, CTF_PM_FTN_LINE_WEIGTH ), + PLMAP( "FootnoteLineStyle", XML_NAMESPACE_STYLE, XML_EMPTY, XML_TYPE_STRING|MID_FLAG_ELEMENT_ITEM, CTF_PM_FTN_LINE_STYLE ), // header HFMAP( "HeaderHeight", XML_NAMESPACE_SVG, XML_HEIGHT, XML_TYPE_MEASURE, CTF_PM_HEADERHEIGHT ), @@ -191,3 +193,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..21c2c09ec31a 100644 --- 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, @@ -111,25 +112,15 @@ SvXMLImportContext *PagePropertySetContext::CreateChildContext( break; case CTF_PM_TEXTCOLUMNS: -#ifndef SVX_LIGHT pContext = new XMLTextColumnsContext( GetImport(), nPrefix, rLocalName, xAttrList, rProp, rProperties ); -#else - // create default context to skip content - pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName ); -#endif // #ifndef SVX_LIGHT break; case CTF_PM_FTN_LINE_WEIGTH: -#ifndef SVX_LIGHT pContext = new XMLFootnoteSeparatorImport( GetImport(), nPrefix, rLocalName, rProperties, mxMapper->getPropertySetMapper(), rProp.mnIndex); -#else - // create default context to skip content - pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName); -#endif // #ifndef SVX_LIGHT break; } @@ -142,3 +133,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 --- 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 --- 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..1fc3863ee551 100644 --- 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. @@ -28,8 +29,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" #include <osl/mutex.hxx> -#include <rtl/uuid.h> #include <rtl/memory.h> +#include <comphelper/servicehelper.hxx> #include "StyleMap.hxx" @@ -48,23 +49,15 @@ StyleMap::~StyleMap() { } +namespace +{ + class theStyleMapUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theStyleMapUnoTunnelId> {}; +} // XUnoTunnel & co const Sequence< sal_Int8 > & StyleMap::getUnoTunnelId() throw() { - static Sequence< sal_Int8 > * pSeq = 0; - if( !pSeq ) - { - Guard< Mutex > aGuard( Mutex::getGlobalMutex() ); - if( !pSeq ) - { - static Sequence< sal_Int8 > aSeq( 16 ); - rtl_createUuid( reinterpret_cast<sal_uInt8*>( aSeq.getArray() ), - 0, sal_True ); - pSeq = &aSeq; - } - } - return *pSeq; + return theStyleMapUnoTunnelId::get().getSeq(); } StyleMap* StyleMap::getImplementation( Reference< XInterface > xInt ) throw() @@ -92,3 +85,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..cf0ab56d0225 100644 --- 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 }, @@ -227,8 +228,6 @@ sal_Bool XMLTransGradientStyleImport::importXML( // Export //------------------------------------------------------------- -#ifndef SVX_LIGHT - XMLTransGradientStyleExport::XMLTransGradientStyleExport( SvXMLExport& rExp ) : rExport(rExp) { @@ -326,4 +325,4 @@ sal_Bool XMLTransGradientStyleExport::exportXML( return bRet; } -#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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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..a7f5e0c1bf3a 100644 --- 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> @@ -75,6 +74,7 @@ void XMLFootnoteSeparatorExport::exportXML( sal_Int8 nLineRelWidth = 0; sal_Int32 nLineTextDistance = 0; sal_Int16 nLineWeight = 0; + sal_Int8 nLineStyle = 0; // find indices into property map and get values sal_uInt32 nCount = pProperties->size(); @@ -107,6 +107,9 @@ void XMLFootnoteSeparatorExport::exportXML( "received wrong property state index" ); rState.maValue >>= nLineWeight; break; + case CTF_PM_FTN_LINE_STYLE: + rState.maValue >>= nLineStyle; + break; } } @@ -136,6 +139,22 @@ void XMLFootnoteSeparatorExport::exportXML( sBuf.makeStringAndClear()); } + // line style + static const SvXMLEnumMapEntry aXML_LineStyle_Enum[] = + { + { XML_NONE, 0 }, + { XML_SOLID, 1 }, + { XML_DOTTED, 2 }, + { XML_DASH, 3 }, + { XML_TOKEN_INVALID, 0 } + }; + if (rExport.GetMM100UnitConverter().convertEnum( + sBuf, nLineStyle, aXML_LineStyle_Enum ) ) + { + rExport.AddAttribute(XML_NAMESPACE_STYLE, XML_LINE_STYLE, + sBuf.makeStringAndClear()); + } + // adjustment static const SvXMLEnumMapEntry aXML_HorizontalAdjust_Enum[] = { @@ -162,6 +181,10 @@ void XMLFootnoteSeparatorExport::exportXML( rExport.AddAttribute(XML_NAMESPACE_STYLE, XML_COLOR, sBuf.makeStringAndClear()); + // line-style + 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 --- 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..4c579c78bed5 100644 --- 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> @@ -93,6 +92,7 @@ void XMLFootnoteSeparatorImport::StartElement( sal_Int16 eLineAdjust = text::HorizontalAdjust_LEFT; // enum text::HorizontalAdjust sal_Int32 nLineTextDistance = 0; sal_Int32 nLineDistance = 0; + sal_Int8 nLineStyle = 0; // iterate over xattribute list and fill values sal_Int16 nLength = xAttrList->getLength(); @@ -153,6 +153,23 @@ void XMLFootnoteSeparatorImport::StartElement( if (SvXMLUnitConverter::convertColor(aColor, sAttrValue)) nLineColor = (sal_Int32)aColor.GetColor(); } + else if (IsXMLToken( sLocalName, XML_LINE_STYLE )) + { + sal_uInt16 nTmpU; + static const SvXMLEnumMapEntry aXML_LineStyle_Enum[] = + { + { XML_NONE, 0 }, + { XML_SOLID, 1 }, + { XML_DOTTED, 2 }, + { XML_DASH, 3 }, + { XML_TOKEN_INVALID, 0 } + }; + + if (SvXMLUnitConverter::convertEnum( + nTmpU, sAttrValue, aXML_LineStyle_Enum)) + nLineStyle = (sal_Int8)nTmpU; + + } } } @@ -170,6 +187,11 @@ void XMLFootnoteSeparatorImport::StartElement( XMLPropertyState aLineColor( nIndex, aAny ); rProperties.push_back(aLineColor); + aAny <<= nLineStyle; + nIndex = rMapper->FindEntryIndex(CTF_PM_FTN_LINE_STYLE); + XMLPropertyState aLineStyle( nIndex, aAny ); + rProperties.push_back(aLineStyle); + aAny <<= nLineDistance; nIndex = rMapper->FindEntryIndex(CTF_PM_FTN_DISTANCE); XMLPropertyState aLineDistance( nIndex, aAny ); @@ -191,3 +213,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 --- 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 --- 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..7def49621b27 100644 --- 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" @@ -152,13 +149,6 @@ sal_Bool XMLPageExport::exportStyle( GetExport().EncodeStyleName( sNextName ) ); } } -// OUString sPageMaster = GetExport().GetAutoStylePool()->Find( -// XML_STYLE_FAMILY_PAGE_MASTER, -// xPropSet ); -// if( sPageMaster.getLength() ) -// GetExport().AddAttribute( XML_NAMESPACE_STYLE, -// XML_PAGE_MASTER_NAME, -// sPageMaster ); SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE, XML_MASTER_PAGE, sal_True, sal_True ); @@ -265,8 +255,6 @@ void XMLPageExport::exportDefaultStyle() } } - // if ( xPropStates.size() != 0 && - // ( xPropStates.size() != 1 || xPropStates[0].mnIndex != -1 ) ) if( bExport ) { //<style:default-page-layout> @@ -280,3 +268,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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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..230f1082fe2e 100644 --- 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,11 @@ #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> + +#if DEBUG +#include <cstdio> +#endif using ::rtl::OUString; using ::rtl::OUStringBuffer; @@ -42,65 +47,25 @@ using ::rtl::OUStringBuffer; using namespace ::com::sun::star; using namespace ::xmloff::token; -// copied from svx/boxitem.hxx +const sal_uInt16 API_LINE_SOLID = 0; +const sal_uInt16 API_LINE_DOTTED = 1; +const sal_uInt16 API_LINE_DASHED = 2; +const sal_uInt16 API_LINE_DOUBLE = 3; +const sal_uInt16 API_LINE_THINTHICK_SMALLGAP = 4; +const sal_uInt16 API_LINE_THINTHICK_MEDIUMGAP = 5; +const sal_uInt16 API_LINE_THINTHICK_LARGEGAP = 6; +const sal_uInt16 API_LINE_THICKTHIN_SMALLGAP = 7; +const sal_uInt16 API_LINE_THICKTHIN_MEDIUMGAP = 8; +const sal_uInt16 API_LINE_THICKTHIN_LARGEGAP = 9; +const sal_uInt16 API_LINE_EMBOSSED = 10; +const sal_uInt16 API_LINE_ENGRAVED = 11; +const sal_uInt16 API_LINE_OUTSET = 12; +const sal_uInt16 API_LINE_INSET = 13; +const sal_uInt16 API_LINE_NONE = USHRT_MAX; + #define DEF_LINE_WIDTH_0 1 #define DEF_LINE_WIDTH_1 35 #define DEF_LINE_WIDTH_2 88 -#define DEF_LINE_WIDTH_3 141 -#define DEF_LINE_WIDTH_4 176 - -#define DEF_MAX_LINE_WIDHT DEF_LINE_WIDTH_4 -#define DEF_MAX_LINE_DIST DEF_LINE_WIDTH_2 - -#define DEF_DOUBLE_LINE0_OUT DEF_LINE_WIDTH_0 -#define DEF_DOUBLE_LINE0_IN DEF_LINE_WIDTH_0 -#define DEF_DOUBLE_LINE0_DIST DEF_LINE_WIDTH_1 - -#define DEF_DOUBLE_LINE1_OUT DEF_LINE_WIDTH_1 -#define DEF_DOUBLE_LINE1_IN DEF_LINE_WIDTH_1 -#define DEF_DOUBLE_LINE1_DIST DEF_LINE_WIDTH_1 - -#define DEF_DOUBLE_LINE2_OUT DEF_LINE_WIDTH_2 -#define DEF_DOUBLE_LINE2_IN DEF_LINE_WIDTH_2 -#define DEF_DOUBLE_LINE2_DIST DEF_LINE_WIDTH_2 - -#define DEF_DOUBLE_LINE3_OUT DEF_LINE_WIDTH_2 -#define DEF_DOUBLE_LINE3_IN DEF_LINE_WIDTH_1 -#define DEF_DOUBLE_LINE3_DIST DEF_LINE_WIDTH_2 - -#define DEF_DOUBLE_LINE4_OUT DEF_LINE_WIDTH_1 -#define DEF_DOUBLE_LINE4_IN DEF_LINE_WIDTH_2 -#define DEF_DOUBLE_LINE4_DIST DEF_LINE_WIDTH_1 - -#define DEF_DOUBLE_LINE5_OUT DEF_LINE_WIDTH_3 -#define DEF_DOUBLE_LINE5_IN DEF_LINE_WIDTH_2 -#define DEF_DOUBLE_LINE5_DIST DEF_LINE_WIDTH_2 - -#define DEF_DOUBLE_LINE6_OUT DEF_LINE_WIDTH_2 -#define DEF_DOUBLE_LINE6_IN DEF_LINE_WIDTH_3 -#define DEF_DOUBLE_LINE6_DIST DEF_LINE_WIDTH_2 - -#define DEF_DOUBLE_LINE7_OUT DEF_LINE_WIDTH_0 -#define DEF_DOUBLE_LINE7_IN DEF_LINE_WIDTH_0 -#define DEF_DOUBLE_LINE7_DIST DEF_LINE_WIDTH_2 - -#define DEF_DOUBLE_LINE8_OUT DEF_LINE_WIDTH_1 -#define DEF_DOUBLE_LINE8_IN DEF_LINE_WIDTH_0 -#define DEF_DOUBLE_LINE8_DIST DEF_LINE_WIDTH_2 - -#define DEF_DOUBLE_LINE9_OUT DEF_LINE_WIDTH_2 -#define DEF_DOUBLE_LINE9_IN DEF_LINE_WIDTH_0 -#define DEF_DOUBLE_LINE9_DIST DEF_LINE_WIDTH_2 - -#define DEF_DOUBLE_LINE10_OUT DEF_LINE_WIDTH_3 -#define DEF_DOUBLE_LINE10_IN DEF_LINE_WIDTH_0 -#define DEF_DOUBLE_LINE10_DIST DEF_LINE_WIDTH_2 - -// finished copy - -#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_WIDTH_THIN 0 #define SVX_XML_BORDER_WIDTH_MIDDLE 1 @@ -108,16 +73,16 @@ using namespace ::xmloff::token; SvXMLEnumMapEntry pXML_BorderStyles[] = { - { XML_NONE, SVX_XML_BORDER_STYLE_NONE }, - { 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_GROOVE, SVX_XML_BORDER_STYLE_SOLID }, - { XML_RIDGE, SVX_XML_BORDER_STYLE_SOLID }, - { XML_INSET, SVX_XML_BORDER_STYLE_SOLID }, - { XML_OUTSET, SVX_XML_BORDER_STYLE_SOLID }, + { XML_NONE, API_LINE_NONE }, + { XML_HIDDEN, API_LINE_NONE }, + { XML_SOLID, API_LINE_SOLID }, + { XML_DOUBLE, API_LINE_DOUBLE }, + { XML_DOTTED, API_LINE_DOTTED }, + { XML_DASHED, API_LINE_DASHED }, + { XML_GROOVE, API_LINE_ENGRAVED }, + { XML_RIDGE, API_LINE_EMBOSSED }, + { XML_INSET, API_LINE_INSET }, + { XML_OUTSET, API_LINE_OUTSET }, { XML_TOKEN_INVALID, 0 } }; @@ -130,98 +95,21 @@ SvXMLEnumMapEntry pXML_NamedBorderWidths[] = }; // mapping tables to map external xml input to intarnal box line widths -// Ein Eintrag besteht aus vier USHORTs. Der erste ist die Gesamtbreite, -// die anderen sind die 3 Einzelbreiten - -#define SBORDER_ENTRY( n ) \ - DEF_LINE_WIDTH_##n, DEF_LINE_WIDTH_##n, 0, 0 - -#define DBORDER_ENTRY( n ) \ - DEF_DOUBLE_LINE##n##_OUT + DEF_DOUBLE_LINE##n##_IN + \ - DEF_DOUBLE_LINE##n##_DIST, \ - DEF_DOUBLE_LINE##n##_OUT, \ - DEF_DOUBLE_LINE##n##_IN, \ - DEF_DOUBLE_LINE##n##_DIST - -#define TDBORDER_ENTRY( n ) \ - DEF_DOUBLE_LINE##n##_OUT, \ - DEF_DOUBLE_LINE##n##_OUT, \ - DEF_DOUBLE_LINE##n##_IN, \ - DEF_DOUBLE_LINE##n##_DIST - - -static sal_uInt16 __READONLY_DATA 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 aBorderWidths[] = { - DBORDER_ENTRY( 0 ), - DBORDER_ENTRY( 7 ), - DBORDER_ENTRY( 1 ), - DBORDER_ENTRY( 8 ), - DBORDER_ENTRY( 4 ), - DBORDER_ENTRY( 9 ), - DBORDER_ENTRY( 3 ), - DBORDER_ENTRY( 10 ), - DBORDER_ENTRY( 2 ), - DBORDER_ENTRY( 6 ), - DBORDER_ENTRY( 5 ) + DEF_LINE_WIDTH_0, + DEF_LINE_WIDTH_1, + DEF_LINE_WIDTH_2 }; -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 - { - aWidths = aDBorderWidths; - nSize = sizeof( aDBorderWidths ); - } + sal_Int16 eStyle = -1; // None + if ( nStyle != API_LINE_NONE ) + eStyle = sal_Int16( nStyle ); - sal_uInt16 i = (nSize / sizeof(sal_uInt16)) - 4; - while( i>0 && - nWidth <= ((aWidths[i] + aWidths[i-4]) / 2) ) - { - i -= 4; - } - - rBorderLine.OuterLineWidth = aWidths[i+1]; - rBorderLine.InnerLineWidth = aWidths[i+2]; - rBorderLine.LineDistance = aWidths[i+3]; -#else - if( bDouble ) - { - const sal_uInt16 *aWidths = aDBorderWidths; - sal_uInt16 nSize = sizeof( aDBorderWidths ); - sal_uInt16 i = (nSize / sizeof(sal_uInt16)) - 4; - while( i>0 && - nWidth <= ((aWidths[i] + aWidths[i-4]) / 2) ) - { - i -= 4; - } - - rBorderLine.OuterLineWidth = aWidths[i+1]; - rBorderLine.InnerLineWidth = aWidths[i+2]; - rBorderLine.LineDistance = aWidths[i+3]; - } - else - { - rBorderLine.OuterLineWidth = 0 == nWidth ? DEF_LINE_WIDTH_0 : nWidth; - rBorderLine.InnerLineWidth = 0; - rBorderLine.LineDistance = 0; - - } -#endif + rBorderLine.LineStyle = eStyle; } @@ -260,20 +148,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,11 +164,27 @@ sal_Bool XMLBorderWidthHdl::exportXML( OUString& rStrExpValue, const uno::Any& r { OUStringBuffer aOut; - table::BorderLine aBorderLine; + table::BorderLine2 aBorderLine; if(!(rValue >>= aBorderLine)) return sal_False; - if( aBorderLine.LineDistance == 0 && aBorderLine.InnerLineWidth == 0) + bool bDouble = false; + switch ( aBorderLine.LineStyle ) + { + case API_LINE_DOUBLE: + case API_LINE_THINTHICK_SMALLGAP: + case API_LINE_THINTHICK_MEDIUMGAP: + case API_LINE_THINTHICK_LARGEGAP: + case API_LINE_THICKTHIN_SMALLGAP: + case API_LINE_THICKTHIN_MEDIUMGAP: + case API_LINE_THICKTHIN_LARGEGAP: + bDouble = true; + break; + default: + break; + } + + if( ( aBorderLine.LineDistance == 0 && aBorderLine.InnerLineWidth == 0 ) || !bDouble ) return sal_False; rUnitConverter.convertMeasure( aOut, aBorderLine.InnerLineWidth ); @@ -365,46 +256,44 @@ sal_Bool XMLBorderHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue // if there is no style or a different style than none but no width, // then the declaration is not valid. - if( !bHasStyle || (SVX_XML_BORDER_STYLE_NONE != nStyle && !bHasWidth) ) + if( !bHasStyle || (API_LINE_NONE != nStyle && !bHasWidth) ) return sal_False; - table::BorderLine aBorderLine; + table::BorderLine2 aBorderLine; if(!(rValue >>= aBorderLine)) { aBorderLine.Color = 0; aBorderLine.InnerLineWidth = 0; aBorderLine.OuterLineWidth = 0; aBorderLine.LineDistance = 0; + aBorderLine.LineWidth = 0; } // first of all, delete an empty line - sal_Bool bDouble = SVX_XML_BORDER_STYLE_DOUBLE == nStyle; - if( (bHasStyle && SVX_XML_BORDER_STYLE_NONE == nStyle) || + if( (bHasStyle && API_LINE_NONE == nStyle) || (bHasWidth && USHRT_MAX == nNamedWidth && 0 == nWidth) ) { aBorderLine.InnerLineWidth = 0; aBorderLine.OuterLineWidth = 0; aBorderLine.LineDistance = 0; + aBorderLine.LineWidth = 0; } else if( bHasWidth ) { if( USHRT_MAX != nNamedWidth ) { - const sal_uInt16 *aWidths = bDouble ? aDBorderWidths - : aSBorderWidths; - sal_uInt16 nNWidth = nNamedWidth * 4; - aBorderLine.OuterLineWidth = aWidths[nNWidth+1]; - aBorderLine.InnerLineWidth = aWidths[nNWidth+2]; - aBorderLine.LineDistance = aWidths[nNWidth+3]; + aBorderLine.LineWidth = aBorderWidths[nNamedWidth]; } else { - lcl_frmitems_setXMLBorderWidth( aBorderLine, nWidth, bDouble ); + aBorderLine.LineWidth = nWidth; + lcl_frmitems_setXMLBorderStyle( aBorderLine, nStyle ); } } else { - lcl_frmitems_setXMLBorderWidth( aBorderLine, 0, bDouble ); + aBorderLine.LineWidth = 0; + lcl_frmitems_setXMLBorderStyle( aBorderLine, nStyle ); } // set color @@ -419,17 +308,11 @@ sal_Bool XMLBorderHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue { OUStringBuffer aOut; - table::BorderLine aBorderLine; + table::BorderLine2 aBorderLine; if(!(rValue >>= aBorderLine)) return sal_False; - sal_Int32 nWidth = aBorderLine.OuterLineWidth; - const sal_uInt16 nDistance = aBorderLine.LineDistance; - if( 0 != nDistance ) - { - nWidth += nDistance; - nWidth += aBorderLine.InnerLineWidth; - } + sal_Int32 nWidth = aBorderLine.LineWidth; if( nWidth == 0 ) { @@ -437,11 +320,46 @@ sal_Bool XMLBorderHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue } else { - rUnitConverter.convertMeasure( aOut, nWidth ); + rUnitConverter.convertMeasure( aOut, nWidth, + MAP_100TH_MM, MAP_POINT ); 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_DOUBLE: + case API_LINE_THINTHICK_SMALLGAP: + case API_LINE_THINTHICK_MEDIUMGAP: + case API_LINE_THINTHICK_LARGEGAP: + case API_LINE_THICKTHIN_SMALLGAP: + case API_LINE_THICKTHIN_MEDIUMGAP: + case API_LINE_THICKTHIN_LARGEGAP: + eStyleToken = XML_DOUBLE; + break; + case API_LINE_EMBOSSED: + eStyleToken = XML_RIDGE; + break; + case API_LINE_ENGRAVED: + eStyleToken = XML_GROOVE; + break; + case API_LINE_OUTSET: + eStyleToken = XML_OUTSET; + break; + case API_LINE_INSET: + eStyleToken = XML_INSET; + break; + case API_LINE_SOLID: + default: + break; + } + aOut.append( GetXMLToken( eStyleToken ) ); aOut.append( sal_Unicode( ' ' ) ); @@ -452,3 +370,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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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..d6032f54b4ce 100644 --- 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; @@ -176,10 +175,6 @@ void SvXMLAutoStylePoolP_Impl::GetRegisteredNames( // if not added, yet. // -/*OUString SvXMLAutoStylePoolP_Impl::Add( sal_Int32 nFamily, - const OUString& rParent, - const vector< XMLPropertyState >& rProperties, - sal_Bool bCache )*/ sal_Bool SvXMLAutoStylePoolP_Impl::Add(OUString& rName, sal_Int32 nFamily, const OUString& rParent, const ::std::vector< XMLPropertyState >& rProperties, @@ -222,10 +217,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 +283,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 +344,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 +406,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 +519,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..77597257803a 100644 --- 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; /////////////////////////////////////////////////////////////////////////////// // @@ -190,9 +191,6 @@ public: com::sun::star::uno::Sequence<sal_Int32>& aFamilies, com::sun::star::uno::Sequence<rtl::OUString>& aNames ); -// ::rtl::OUString Add( sal_Int32 nFamily, const ::rtl::OUString& rParent, -// const ::std::vector< XMLPropertyState >& rProperties, -// sal_Bool bCache = sal_False ); sal_Bool Add( ::rtl::OUString& rName, sal_Int32 nFamily, const ::rtl::OUString& rParent, const ::std::vector< XMLPropertyState >& rProperties, @@ -225,3 +223,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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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..81b8dd3409e4 100644 --- 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 ); @@ -379,43 +367,14 @@ sal_Bool XMLStyleExport::exportDefaultStyle( XML_DEFAULT_STYLE, sal_True, sal_True ); // <style:properties> - //::std::vector< XMLPropertyState > xPropStates = - // rPropMapper->FilterDefaults( xPropSet ); ::std::vector< XMLPropertyState > xPropStates = rPropMapper->FilterDefaults( xPropSet ); rPropMapper->exportXML( GetExport(), xPropStates, XML_EXPORT_FLAG_IGN_WS ); -// exportStyleContent( rStyle ); } 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 +523,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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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..48f383a9a376 100644 --- 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; } } } @@ -701,7 +702,7 @@ vector< XMLPropertyState > SvXMLExportPropertyMapper::_Filter( } else { - OSL_ENSURE(sal_False, "here is no TypeProvider or the ImplId is wrong"); + OSL_FAIL("here is no TypeProvider or the ImplId is wrong"); bDelInfo = sal_True; } } @@ -726,14 +727,6 @@ vector< XMLPropertyState > SvXMLExportPropertyMapper::_Filter( ContextFilter( aPropStateArray, xPropSet ); // Have to do if we change from a vector to a list or something like that - /*vector< XMLPropertyState >::iterator aItr = aPropStateArray.begin(); - while (aItr != aPropStateArray.end()) - { - if (aItr->mnIndex == -1) - aItr = aPropStateArray.erase(aItr); - else - aItr++; - }*/ if( bDelInfo ) delete pFilterInfo; @@ -1105,7 +1098,7 @@ void SvXMLExportPropertyMapper::_exportXML( MID_FLAG_MERGE_ATTRIBUTE ) != 0 ) { aValue = rAttrList.getValueByName( sName ); - bRemove = sal_True; //aValue.getLength() != 0; + bRemove = sal_True; } if( maPropMapper->exportXML( aValue, rProperty, rUnitConverter ) ) @@ -1144,3 +1137,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..cf09b6cdc53c 100644 --- 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, @@ -341,20 +344,10 @@ void SvXMLImportPropertyMapper::importXML( } finished( rProperties, nStartIdx, nEndIdx ); - - // Have to do if we change from a vector to a list or something like that - /*std::vector <XMLPropertyState>::iterator aItr = rProperties.begin(); - while (aItr != rProperties.end()) - { - if (aItr->mnIndex == -1) - aItr = rProperties.erase(aItr); - else - aItr++; - }*/ } /** 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 +585,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 +775,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 59849df1a20e..6ff60f002d39 100644 --- 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 || @@ -397,19 +390,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 ) @@ -431,18 +414,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; @@ -518,18 +499,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 ) @@ -573,7 +551,6 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel, sal_True, sal_True ); } } - // <-- if( NumberingType::CHAR_SPECIAL == eType ) { @@ -684,9 +661,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() ) { @@ -707,57 +683,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 ) @@ -842,9 +767,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( @@ -978,3 +903,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..6124414ffe5b 100644 --- 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; @@ -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 --- 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 1417f239082a..1d6d5a518249 100644 --- 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 ) @@ -523,50 +513,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 ); @@ -574,7 +562,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 ) @@ -588,7 +576,6 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties( aFDesc.Pitch = eBulletFontPitch; aFDesc.CharSet = eBulletFontEncoding; aFDesc.Weight = WEIGHT_DONTKNOW; - //aFDesc.Transparant = sal_True; sal_Bool bStarSymbol = sal_False; if( aFDesc.Name.equalsIgnoreAsciiCase( sStarBats ) ) { @@ -610,12 +597,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; } @@ -631,47 +618,46 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties( else if( xBase64Stream.is() ) { sStr = GetImport().ResolveGraphicObjectURLFromBase64( xBase64Stream ); -// xBase64Stream = 0; } 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(); } @@ -702,15 +688,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 }, @@ -746,11 +729,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; @@ -855,7 +835,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; @@ -864,7 +843,6 @@ SvxXMLListLevelStyleAttrContext_Impl::SvxXMLListLevelStyleAttrContext_Impl( rListLevel.SetPosAndSpaceMode( ePosAndSpaceMode ); } break; - // <-- } } @@ -1002,7 +980,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 ) @@ -1024,11 +1001,9 @@ SvXMLImportContext* SvxXMLListLevelStyleAttrContext_Impl::CreateChildContext( return pContext; } -// <-- // --------------------------------------------------------------------- -// --> OD 2008-01-16 #newlistlevelattrs# enum SvxXMLStyleAttributesLabelAlignmentAttrTokens { XML_TOK_STYLE_ATTRIBUTES_ATTR_LABEL_FOLLOWED_BY, @@ -1040,7 +1015,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 }, @@ -1108,7 +1083,6 @@ SvxXMLListLevelStyleLabelAlignmentAttrContext_Impl::SvxXMLListLevelStyleLabelAli SvxXMLListLevelStyleLabelAlignmentAttrContext_Impl::~SvxXMLListLevelStyleLabelAlignmentAttrContext_Impl() { } -// <-- // --------------------------------------------------------------------- @@ -1240,7 +1214,7 @@ void SvxXMLListStyleContext::FillUnoNumRule( } catch( Exception& ) { - DBG_ERROR( "SvxXMLListStyleContext::FillUnoNumRule - Exception catched" ); + OSL_FAIL( "SvxXMLListStyleContext::FillUnoNumRule - Exception catched" ); } } @@ -1382,13 +1356,12 @@ 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 ) { // TODO: Bullet-Font - //aNumFmt.SetBulletFont( &SwNumRule::GetDefBulletFont() ); awt::FontDescriptor aFDesc; aFDesc.Name = OUString( #if defined UNX @@ -1401,18 +1374,17 @@ void SvxXMLListStyleContext::SetDefaultStyle( aFDesc.Pitch = PITCH_DONTKNOW ; aFDesc.CharSet = RTL_TEXTENCODING_SYMBOL ; 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" ) ); } @@ -1422,3 +1394,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 --- 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 --- 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 --- 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..b3343c307193 100644 --- 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; @@ -490,35 +484,20 @@ SvXMLStyleContext *SvXMLStylesContext::CreateStyleChildContext( rLocalName, xAttrList, sal_True ); break; case XML_TOK_TEXT_NOTE_CONFIG: -#ifndef SVX_LIGHT pStyle = new XMLFootnoteConfigurationImportContext(GetImport(), p_nPrefix, rLocalName, xAttrList); -#else - // create default context to skip content - pStyle = new SvXMLStyleContext( GetImport(), nPrefix, rLocalName, xAttrList ); -#endif // #ifndef SVX_LIGHT break; case XML_TOK_TEXT_BIBLIOGRAPHY_CONFIG: -#ifndef SVX_LIGHT pStyle = new XMLIndexBibliographyConfigurationContext( GetImport(), p_nPrefix, rLocalName, xAttrList); -#else - // create default context to skip content - pStyle = new SvXMLStyleContext( GetImport(), p_nPrefix, rLocalName, xAttrList ); -#endif // #ifndef SVX_LIGHT break; case XML_TOK_TEXT_LINENUMBERING_CONFIG: -#ifndef SVX_LIGHT pStyle = new XMLLineNumberingImportContext( GetImport(), p_nPrefix, rLocalName, xAttrList); -#else - // create default context to skip content - pStyle = new SvXMLStyleContext( GetImport(), p_nPrefix, rLocalName, xAttrList ); -#endif // #ifndef SVX_LIGHT break; // @@ -720,7 +699,6 @@ UniReference < SvXMLImportPropertyMapper > SvXMLStylesContext::GetImportProperty } xMapper = mxShapeImpPropMapper; break; -#ifndef SVX_LIGHT case XML_STYLE_FAMILY_SCH_CHART_ID: if( ! mxChartImpPropMapper.is() ) { @@ -729,7 +707,6 @@ UniReference < SvXMLImportPropertyMapper > SvXMLStylesContext::GetImportProperty } xMapper = mxChartImpPropMapper; break; -#endif case XML_STYLE_FAMILY_PAGE_MASTER: if( ! mxPageImpPropMapper.is() ) { @@ -872,7 +849,6 @@ SvXMLImportContext *SvXMLStylesContext::CreateChildContext( sal_uInt16 nPrefix, SvXMLStyleContext *pStyle = CreateStyleChildContext( nPrefix, rLocalName, xAttrList ); -// DBG_ASSERT( pStyle->GetFamily(), "Style without a family" ); if( pStyle ) { if( !pStyle->IsTransient() ) @@ -974,3 +950,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..d967e3d30618 100644 --- 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,17 +118,13 @@ 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 { const ::com::sun::star::style::TabStop* pTabs = aSeq.getConstArray(); const sal_Int32 nTabs = aSeq.getLength(); - // ignore default tab stop here - //if( 1 == nTabs && style::TabAlign_DEFAULT == pTabs[0].Alignment ) - // return; - SvXMLElementExport rElem( rExport, XML_NAMESPACE_STYLE, XML_TAB_STOPS, sal_True, sal_True ); @@ -140,3 +137,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 --- 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: */ diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx index d0550814d8dc..e53e321257af 100644 --- a/xmloff/source/table/XMLTableExport.cxx +++ b/xmloff/source/table/XMLTableExport.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. @@ -185,10 +186,6 @@ XMLTableExport::XMLTableExport(SvXMLExport& rExp, const rtl::Reference< SvXMLExp OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME)), mxRowExportPropertySetMapper.get(), OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_TABLE_ROW_STYLES_PREFIX))); -// mrExport.GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_TABLE -// OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME)), -// xTableStylesExportPropertySetMapper, -// OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_TABLE_TABLE_STYLES_PREFIX))); mrExport.GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_CELL, OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME)), mxCellExportPropertySetMapper.get(), @@ -213,7 +210,7 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates ) { if( aIter->mnIndex != -1 ) return true; - aIter++; + ++aIter; } } return false; @@ -247,7 +244,7 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates ) } catch( Exception& ) { - DBG_ERROR("xmloff::XMLTableExport::collectTableAutoStyles(), exception during column style collection!"); + OSL_FAIL("xmloff::XMLTableExport::collectTableAutoStyles(), exception during column style collection!"); } Reference< XIndexAccess > xIndexAccessRows( xColumnRowRange->getRows(), UNO_QUERY_THROW ); @@ -315,12 +312,12 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates ) } catch( Exception& ) { - DBG_ERROR("xmloff::XMLTableExport::collectTableAutoStyles(), exception during column style collection!"); + OSL_FAIL("xmloff::XMLTableExport::collectTableAutoStyles(), exception during column style collection!"); } } catch( Exception& ) { - DBG_ERROR("xmloff::XMLTableExport::collectTableAutoStyles(), exception caught!"); + OSL_FAIL("xmloff::XMLTableExport::collectTableAutoStyles(), exception caught!"); } } @@ -386,7 +383,7 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates ) } catch( Exception ) { - DBG_ERROR( "XMLTableExport::exportTable(), exception cought!" ); + OSL_FAIL( "XMLTableExport::exportTable(), exception cought!" ); } } @@ -451,7 +448,7 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates ) } catch ( Exception ) { - DBG_ERROR( "exception while exporting a table cell" ); + OSL_FAIL( "exception while exporting a table cell" ); } // table:number-columns-repeated @@ -574,7 +571,7 @@ void XMLTableExport::exportTableTemplates() } catch( Exception& ) { - DBG_ERROR("xmloff::XMLTableExport::exportTableTemplates(), exception caught!"); + OSL_FAIL("xmloff::XMLTableExport::exportTableTemplates(), exception caught!"); } pElements++; @@ -582,14 +579,15 @@ void XMLTableExport::exportTableTemplates() } catch( Exception& ) { - DBG_ERROR("xmloff::XMLTableExport::exportTableDesigns(), exception caught while exporting a table design!"); + OSL_FAIL("xmloff::XMLTableExport::exportTableDesigns(), exception caught while exporting a table design!"); } } catch( Exception& ) { - DBG_ERROR("xmloff::XMLTableExport::exportTableDesigns(), exception caught!"); + OSL_FAIL("xmloff::XMLTableExport::exportTableDesigns(), exception caught!"); } } // -------------------------------------------------------------------- +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/table/XMLTableImport.cxx b/xmloff/source/table/XMLTableImport.cxx index da24e582389f..26cd8621dbec 100644 --- a/xmloff/source/table/XMLTableImport.cxx +++ b/xmloff/source/table/XMLTableImport.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. @@ -286,7 +287,7 @@ void XMLTableImport::finishStyles() } catch( Exception& ) { - DBG_ERROR("xmloff::XMLTableImport::finishStyles(), exception caught!"); + OSL_FAIL("xmloff::XMLTableImport::finishStyles(), exception caught!"); } if( xTemplate.is() ) @@ -300,12 +301,12 @@ void XMLTableImport::finishStyles() } catch( Exception& ) { - DBG_ERROR("xmloff::XMLTableImport::finishStyles(), exception caught!"); + OSL_FAIL("xmloff::XMLTableImport::finishStyles(), exception caught!"); } } catch( Exception& ) { - DBG_ERROR("xmloff::XMLTableImport::finishStyles(), exception caught!"); + OSL_FAIL("xmloff::XMLTableImport::finishStyles(), exception caught!"); } } @@ -388,7 +389,7 @@ SvXMLImportContext * XMLTableImportContext::ImportColumn( sal_uInt16 nPrefix, co } catch( Exception& ) { - DBG_ERROR("xmloff::XMLTableImportContext::ImportTableColumn(), exception caught!"); + OSL_FAIL("xmloff::XMLTableImportContext::ImportTableColumn(), exception caught!"); } return SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList); @@ -428,7 +429,7 @@ void XMLTableImportContext::InitColumns() } catch( Exception& ) { - DBG_ERROR("xmloff::XMLTableImportContext::ImportTableColumn(), exception caught!"); + OSL_FAIL("xmloff::XMLTableImportContext::ImportTableColumn(), exception caught!"); } } @@ -453,9 +454,7 @@ SvXMLImportContext * XMLTableImportContext::ImportRow( sal_uInt16 nPrefix, const Reference< XPropertySet > xRowSet( mxRows->getByIndex(mnCurrentRow), UNO_QUERY ); - sal_Int32 nRepeated = 1; OUString sStyleName; - sal_Bool bVisibility = sal_True; // read attributes for the table-row sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; @@ -468,11 +467,7 @@ SvXMLImportContext * XMLTableImportContext::ImportRow( sal_uInt16 nPrefix, const sal_uInt16 nPrefix2 = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); if( nPrefix2 == XML_NAMESPACE_TABLE ) { - if( IsXMLToken( aLocalName, XML_NUMBER_ROWS_REPEATED ) ) - { - nRepeated = sValue.toInt32(); - } - else if( IsXMLToken( aLocalName, XML_STYLE_NAME ) ) + if( IsXMLToken( aLocalName, XML_STYLE_NAME ) ) { sStyleName = sValue; } @@ -480,10 +475,16 @@ SvXMLImportContext * XMLTableImportContext::ImportRow( sal_uInt16 nPrefix, const { msDefaultCellStyleName = sValue; } +#if 0 else if( IsXMLToken( aLocalName, XML_VISIBILITY ) ) { bVisibility = IsXMLToken( sValue, XML_VISIBLE ); } + else if( IsXMLToken( aLocalName, XML_NUMBER_ROWS_REPEATED ) ) + { + nRepeated = sValue.toInt32(); + } +#endif } else if ( (XML_NAMESPACE_XML == nPrefix2) && IsXMLToken(aLocalName, XML_ID) ) @@ -535,7 +536,7 @@ SvXMLImportContext * XMLTableImportContext::ImportCell( sal_uInt16 nPrefix, cons const sal_Int32 nRepeated = pCellContext->getRepeated(); if( nRepeated > 1 ) { - DBG_ERROR("xmloff::XMLTableImportContext::ImportCell(), import of repeated Cells not implemented (TODO)"); + OSL_FAIL("xmloff::XMLTableImportContext::ImportCell(), import of repeated Cells not implemented (TODO)"); mnCurrentColumn += nRepeated - 1; } @@ -543,7 +544,7 @@ SvXMLImportContext * XMLTableImportContext::ImportCell( sal_uInt16 nPrefix, cons } catch( Exception& ) { - DBG_ERROR("xmloff::XMLTableImportContext::ImportCell(), exception caught!"); + OSL_FAIL("xmloff::XMLTableImportContext::ImportCell(), exception caught!"); } return SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList); @@ -596,7 +597,7 @@ void XMLTableImportContext::EndElement() } catch( Exception& ) { - DBG_ERROR("XMLTableImportContext::EndElement(), exception caught while merging cells!"); + OSL_FAIL("XMLTableImportContext::EndElement(), exception caught while merging cells!"); } } } @@ -824,3 +825,5 @@ SvXMLImportContext * XMLTableTemplateContext::CreateChildContext( sal_uInt16 nPr } // -------------------------------------------------------------------- + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/table/table.hxx b/xmloff/source/table/table.hxx index cee34e1ee9b5..595e71d72582 100644 --- a/xmloff/source/table/table.hxx +++ b/xmloff/source/table/table.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 @@ extern const XMLPropertyMapEntry* getColumnPropertiesMap(); extern const XMLPropertyMapEntry* getRowPropertiesMap(); #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLAnchorTypePropHdl.hxx b/xmloff/source/text/XMLAnchorTypePropHdl.hxx index 8ea4f3a40d0d..4d45710387ae 100644 --- a/xmloff/source/text/XMLAnchorTypePropHdl.hxx +++ b/xmloff/source/text/XMLAnchorTypePropHdl.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. @@ -28,9 +29,7 @@ #ifndef _XMLOFF_XMLANCHORTYPEPROPHDL_HXX #define _XMLOFF_XMLANCHORTYPEPROPHDL_HXX -#ifndef _COM_SUN_STAR_TEXT_TEXTCONTENTANCHORTYPE_HPP #include <com/sun/star/text/TextContentAnchorType.hpp> -#endif #include <xmloff/xmlprhdl.hxx> @@ -52,3 +51,5 @@ public: }; #endif // _XMLOFF_XMLANCHORTYPEPROPHDL_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLAutoMarkFileContext.cxx b/xmloff/source/text/XMLAutoMarkFileContext.cxx index 505a7e6b0281..da893a4958db 100644 --- a/xmloff/source/text/XMLAutoMarkFileContext.cxx +++ b/xmloff/source/text/XMLAutoMarkFileContext.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. @@ -93,3 +94,5 @@ void XMLAutoMarkFileContext::StartElement( } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLAutoMarkFileContext.hxx b/xmloff/source/text/XMLAutoMarkFileContext.hxx index 78f4d85d7a05..78360212a388 100644 --- a/xmloff/source/text/XMLAutoMarkFileContext.hxx +++ b/xmloff/source/text/XMLAutoMarkFileContext.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,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLAutoTextContainerEventImport.cxx b/xmloff/source/text/XMLAutoTextContainerEventImport.cxx index ed8e414bcb44..75bdfe9b1e59 100644 --- a/xmloff/source/text/XMLAutoTextContainerEventImport.cxx +++ b/xmloff/source/text/XMLAutoTextContainerEventImport.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 @@ SvXMLImportContext* XMLAutoTextContainerEventImport::CreateChildContext( else return new SvXMLImportContext(GetImport(), nPrefix, rLocalName); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLAutoTextContainerEventImport.hxx b/xmloff/source/text/XMLAutoTextContainerEventImport.hxx index 6dc762ffc960..f0e9c8dbfe64 100644 --- a/xmloff/source/text/XMLAutoTextContainerEventImport.hxx +++ b/xmloff/source/text/XMLAutoTextContainerEventImport.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. @@ -73,3 +74,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLAutoTextEventExport.cxx b/xmloff/source/text/XMLAutoTextEventExport.cxx index eab3c77efc7f..1b14c1fb9665 100644 --- a/xmloff/source/text/XMLAutoTextEventExport.cxx +++ b/xmloff/source/text/XMLAutoTextEventExport.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. @@ -36,15 +37,7 @@ #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/uno/Sequence.hxx> - -#ifndef _COM_SUN_STAR_UNO_EXCEPTION_HPP #include <com/sun/star/uno/Exception.hpp> -#endif - -// #110680# -//#ifndef _COMPHELPER_PROCESSFACTORY_HXX_ -//#include <comphelper/processfactory.hxx> -//#endif #include <rtl/ustrbuf.hxx> #include "xmloff/xmlnmspe.hxx" #include <xmloff/nmspmap.hxx> @@ -56,8 +49,6 @@ using namespace ::com::sun::star; using namespace ::xmloff::token; -// #110680# -// using ::comphelper::getProcessServiceFactory; using ::rtl::OUString; using ::rtl::OUStringBuffer; using ::std::set; @@ -80,7 +71,6 @@ using ::com::sun::star::xml::sax::XDocumentHandler; const sal_Char sAPI_AutoText[] = "com.sun.star.text.AutoTextContainer"; -// #110680# XMLAutoTextEventExport::XMLAutoTextEventExport( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, sal_uInt16 nFlags @@ -91,7 +81,6 @@ XMLAutoTextEventExport::XMLAutoTextEventExport( { } -// #110680# XMLAutoTextEventExport::XMLAutoTextEventExport( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, const OUString& rFileName, @@ -161,7 +150,7 @@ sal_uInt32 XMLAutoTextEventExport::exportDoc( enum XMLTokenEnum ) // get filter component Reference< xml::sax::XDocumentHandler > xTmpDocHandler( xFactory->createInstanceWithArguments( - OUString::createFromAscii("com.sun.star.comp.Oasis2OOoTransformer"), + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Oasis2OOoTransformer")), aArgs), UNO_QUERY); OSL_ENSURE( xTmpDocHandler.is(), "can't instantiate OASIS transformer component" ); @@ -268,8 +257,6 @@ Reference< XInterface > SAL_CALL XMLAutoTextEventExport_createInstance( const Reference< XMultiServiceFactory > & rSMgr) throw( Exception ) { - // #110680# - // return (cppu::OWeakObject*)new XMLAutoTextEventExport; return (cppu::OWeakObject*)new XMLAutoTextEventExport(rSMgr, EXPORT_ALL|EXPORT_OASIS); } @@ -293,8 +280,7 @@ Reference< XInterface > SAL_CALL XMLAutoTextEventExportOOO_createInstance( const Reference< XMultiServiceFactory > & rSMgr) throw( Exception ) { - // #110680# - // return (cppu::OWeakObject*)new XMLAutoTextEventExport; return (cppu::OWeakObject*)new XMLAutoTextEventExport(rSMgr,EXPORT_ALL); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLAutoTextEventExport.hxx b/xmloff/source/text/XMLAutoTextEventExport.hxx index b32787e9980b..28cb956dee7e 100644 --- a/xmloff/source/text/XMLAutoTextEventExport.hxx +++ b/xmloff/source/text/XMLAutoTextEventExport.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. @@ -157,3 +158,4 @@ protected: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLAutoTextEventImport.cxx b/xmloff/source/text/XMLAutoTextEventImport.cxx index ffd7f2985070..51b6f81054bf 100644 --- a/xmloff/source/text/XMLAutoTextEventImport.cxx +++ b/xmloff/source/text/XMLAutoTextEventImport.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,4 @@ Reference< XInterface > SAL_CALL XMLAutoTextEventImport_createInstance( return (cppu::OWeakObject*)new XMLAutoTextEventImport(rSMgr); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLAutoTextEventImport.hxx b/xmloff/source/text/XMLAutoTextEventImport.hxx index c9ecb29e138e..86324c22cf74 100644 --- a/xmloff/source/text/XMLAutoTextEventImport.hxx +++ b/xmloff/source/text/XMLAutoTextEventImport.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. @@ -97,3 +98,4 @@ protected: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLCalculationSettingsContext.cxx b/xmloff/source/text/XMLCalculationSettingsContext.cxx index af1b2b0cf7c4..f1aae0bfafee 100644 --- a/xmloff/source/text/XMLCalculationSettingsContext.cxx +++ b/xmloff/source/text/XMLCalculationSettingsContext.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,5 @@ void XMLCalculationSettingsContext::EndElement() } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLCalculationSettingsContext.hxx b/xmloff/source/text/XMLCalculationSettingsContext.hxx index 632fbaeaab8e..027f2361b2b5 100644 --- a/xmloff/source/text/XMLCalculationSettingsContext.hxx +++ b/xmloff/source/text/XMLCalculationSettingsContext.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. @@ -47,3 +48,5 @@ public: #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLChangeElementImportContext.cxx b/xmloff/source/text/XMLChangeElementImportContext.cxx index 061a9a1f9172..648484717532 100644 --- a/xmloff/source/text/XMLChangeElementImportContext.cxx +++ b/xmloff/source/text/XMLChangeElementImportContext.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. @@ -111,3 +112,5 @@ void XMLChangeElementImportContext::EndElement() GetImport().GetTextImport()->SetInsideDeleteContext(sal_False); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLChangeElementImportContext.hxx b/xmloff/source/text/XMLChangeElementImportContext.hxx index 12d43904bc27..cc89f1febcd9 100644 --- a/xmloff/source/text/XMLChangeElementImportContext.hxx +++ b/xmloff/source/text/XMLChangeElementImportContext.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. @@ -83,3 +84,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLChangeImportContext.cxx b/xmloff/source/text/XMLChangeImportContext.cxx index 9aee1c843369..67b30469fe84 100644 --- a/xmloff/source/text/XMLChangeImportContext.cxx +++ b/xmloff/source/text/XMLChangeImportContext.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. @@ -98,3 +99,5 @@ void XMLChangeImportContext::StartElement( // else: ignore } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLChangeImportContext.hxx b/xmloff/source/text/XMLChangeImportContext.hxx index 9f8c43c64d87..a38fe2e2d607 100644 --- a/xmloff/source/text/XMLChangeImportContext.hxx +++ b/xmloff/source/text/XMLChangeImportContext.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. @@ -83,3 +84,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLChangeInfoContext.cxx b/xmloff/source/text/XMLChangeInfoContext.cxx index 39fcb9cdc2d0..a868a1c1717b 100644 --- a/xmloff/source/text/XMLChangeInfoContext.cxx +++ b/xmloff/source/text/XMLChangeInfoContext.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. @@ -107,3 +108,5 @@ void XMLChangeInfoContext::EndElement() sCommentBuffer.makeStringAndClear(), sDateTimeBuffer.makeStringAndClear()); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLChangeInfoContext.hxx b/xmloff/source/text/XMLChangeInfoContext.hxx index 6bb4ff3dec8d..c347d4a4221a 100644 --- a/xmloff/source/text/XMLChangeInfoContext.hxx +++ b/xmloff/source/text/XMLChangeInfoContext.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. @@ -85,3 +86,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLChangedRegionImportContext.cxx b/xmloff/source/text/XMLChangedRegionImportContext.cxx index 9560a8159a0e..ef7341bf81f4 100644 --- a/xmloff/source/text/XMLChangedRegionImportContext.cxx +++ b/xmloff/source/text/XMLChangedRegionImportContext.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. @@ -94,7 +95,7 @@ void XMLChangedRegionImportContext::StartElement( } else if( IsXMLToken( sLocalName, XML_MERGE_LAST_PARAGRAPH ) ) { - sal_Bool bTmp; + bool bTmp; if( SvXMLUnitConverter::convertBool(bTmp, sValue) ) { bMergeLastPara = bTmp; @@ -194,3 +195,5 @@ void XMLChangedRegionImportContext::UseRedlineText() // else: leave as is } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLChangedRegionImportContext.hxx b/xmloff/source/text/XMLChangedRegionImportContext.hxx index ec87abcecdeb..ea26d577eabd 100644 --- a/xmloff/source/text/XMLChangedRegionImportContext.hxx +++ b/xmloff/source/text/XMLChangedRegionImportContext.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. @@ -96,3 +97,5 @@ public: #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLFootnoteBodyImportContext.cxx b/xmloff/source/text/XMLFootnoteBodyImportContext.cxx index 5f48619c3946..667afb1e34f0 100644 --- a/xmloff/source/text/XMLFootnoteBodyImportContext.cxx +++ b/xmloff/source/text/XMLFootnoteBodyImportContext.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. @@ -72,3 +73,5 @@ SvXMLImportContext* XMLFootnoteBodyImportContext::CreateChildContext( return pContext; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLFootnoteBodyImportContext.hxx b/xmloff/source/text/XMLFootnoteBodyImportContext.hxx index 5484853cedb9..29186035526a 100644 --- a/xmloff/source/text/XMLFootnoteBodyImportContext.hxx +++ b/xmloff/source/text/XMLFootnoteBodyImportContext.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. @@ -66,3 +67,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx index 9fa2cc660e03..ae3bd1aa8290 100644 --- a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx +++ b/xmloff/source/text/XMLFootnoteConfigurationImportContext.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,9 +39,7 @@ #include "xmloff/xmlnmspe.hxx" #include <xmloff/xmltoken.hxx> -#ifndef _XMLOFF_FAMILIES_HXX #include <xmloff/families.hxx> -#endif #include <xmloff/xmluconv.hxx> #include <xmloff/xmlimp.hxx> #include <xmloff/xmlnumi.hxx> @@ -197,7 +196,7 @@ enum XMLFtnConfigToken XML_TOK_FTNCONFIG_POSITION }; -static __FAR_DATA SvXMLTokenMapEntry aTextFieldAttrTokenMap[] = +static SvXMLTokenMapEntry aTextFieldAttrTokenMap[] = { { XML_NAMESPACE_TEXT, XML_CITATION_STYLE_NAME, XML_TOK_FTNCONFIG_CITATION_STYLENAME }, { XML_NAMESPACE_TEXT, XML_CITATION_BODY_STYLE_NAME, XML_TOK_FTNCONFIG_ANCHOR_STYLENAME }, @@ -229,7 +228,7 @@ const SvXMLTokenMap& return *pAttrTokenMap; } -static SvXMLEnumMapEntry __READONLY_DATA aFootnoteNumberingMap[] = +static SvXMLEnumMapEntry const aFootnoteNumberingMap[] = { { XML_PAGE, FootnoteNumbering::PER_PAGE }, { XML_CHAPTER, FootnoteNumbering::PER_CHAPTER }, @@ -344,11 +343,8 @@ SvXMLImportContext *XMLFootnoteConfigurationImportContext::CreateChildContext( return pContext; } - -// --> OD 2005-01-31 #i40597# - rename method <CreateAndInsertLate(..)> to -// <Finish(..)> +// Rename method <CreateAndInsertLate(..)> to <Finish(..)> (#i40597#) void XMLFootnoteConfigurationImportContext::Finish( sal_Bool bOverwrite ) -// <-- { if (bOverwrite) @@ -455,3 +451,5 @@ void XMLFootnoteConfigurationImportContext::SetEndNotice( { sEndNotice = sText; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLFootnoteImportContext.cxx b/xmloff/source/text/XMLFootnoteImportContext.cxx index 5f7389a7b799..3c32971c39cb 100644 --- a/xmloff/source/text/XMLFootnoteImportContext.cxx +++ b/xmloff/source/text/XMLFootnoteImportContext.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 XMLFootnoteChildToken { XML_TOK_FTN_NOTE_BODY }; -static __FAR_DATA SvXMLTokenMapEntry aFootnoteChildTokenMap[] = +static SvXMLTokenMapEntry aFootnoteChildTokenMap[] = { { XML_NAMESPACE_TEXT, XML_NOTE_CITATION, XML_TOK_FTN_NOTE_CITATION }, @@ -241,3 +242,5 @@ SvXMLImportContext *XMLFootnoteImportContext::CreateChildContext( return pContext; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLFootnoteImportContext.hxx b/xmloff/source/text/XMLFootnoteImportContext.hxx index d48f7afa4057..89fc26468d07 100644 --- a/xmloff/source/text/XMLFootnoteImportContext.hxx +++ b/xmloff/source/text/XMLFootnoteImportContext.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. @@ -95,3 +96,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx b/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx index 52147bc8caf2..ec18fdc9e2eb 100644 --- a/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx +++ b/xmloff/source/text/XMLIndexAlphabeticalSourceContext.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. @@ -108,7 +109,7 @@ void XMLIndexAlphabeticalSourceContext::ProcessAttribute( enum IndexSourceParamEnum eParam, const OUString& rValue) { - sal_Bool bTmp; + bool bTmp; switch (eParam) { @@ -269,3 +270,5 @@ SvXMLImportContext* XMLIndexAlphabeticalSourceContext::CreateChildContext( xAttrList); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexAlphabeticalSourceContext.hxx b/xmloff/source/text/XMLIndexAlphabeticalSourceContext.hxx index caf04f5fbef3..11bcbfe2ba99 100644 --- a/xmloff/source/text/XMLIndexAlphabeticalSourceContext.hxx +++ b/xmloff/source/text/XMLIndexAlphabeticalSourceContext.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. @@ -101,3 +102,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx b/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx index 23e11530d73f..0f9f5edad3d0 100644 --- a/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx +++ b/xmloff/source/text/XMLIndexBibliographyConfigurationContext.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. @@ -123,7 +124,7 @@ void XMLIndexBibliographyConfigurationContext::ProcessAttribute( } else if( IsXMLToken(sLocalName, XML_NUMBERED_ENTRIES) ) { - sal_Bool bTmp; + bool bTmp; if( SvXMLUnitConverter::convertBool(bTmp, sValue) ) { bNumberedEntries = bTmp; @@ -131,7 +132,7 @@ void XMLIndexBibliographyConfigurationContext::ProcessAttribute( } else if( IsXMLToken(sLocalName, XML_SORT_BY_POSITION) ) { - sal_Bool bTmp; + bool bTmp; if (SvXMLUnitConverter::convertBool(bTmp, sValue)) { bSortByPosition = bTmp; @@ -184,7 +185,7 @@ SvXMLImportContext *XMLIndexBibliographyConfigurationContext::CreateChildContext } else if ( IsXMLToken( sLocalName, XML_SORT_ASCENDING ) ) { - sal_Bool bTmp; + bool bTmp; if (SvXMLUnitConverter::convertBool( bTmp, xAttrList->getValueByIndex(nAttr))) { @@ -241,7 +242,7 @@ void XMLIndexBibliographyConfigurationContext::CreateAndInsert(sal_Bool) while (i < nServiceCount && !bFound) { if (aServices[i].equals(sFieldMaster_Bibliography)) - // here we should use a methode which compares in reverse order if available + // here we should use a method which compares in reverse order if available // #85282# bFound = sal_True; else @@ -295,3 +296,5 @@ void XMLIndexBibliographyConfigurationContext::CreateAndInsert(sal_Bool) } // else: can't even get Factory -> ignore } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx b/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx index 2fafdf44c10f..2e827c3137da 100644 --- a/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx +++ b/xmloff/source/text/XMLIndexBibliographyEntryContext.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. @@ -179,3 +180,5 @@ void XMLIndexBibliographyEntryContext::FillPropertyValues( aAny <<= nBibliographyInfo; rValues[nIndex].Value = aAny; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexBibliographyEntryContext.hxx b/xmloff/source/text/XMLIndexBibliographyEntryContext.hxx index cc7036f1185b..ccec6a46cf0c 100644 --- a/xmloff/source/text/XMLIndexBibliographyEntryContext.hxx +++ b/xmloff/source/text/XMLIndexBibliographyEntryContext.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. @@ -82,3 +83,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexBibliographySourceContext.cxx b/xmloff/source/text/XMLIndexBibliographySourceContext.cxx index a617c150fd4e..71a02d3cceed 100644 --- a/xmloff/source/text/XMLIndexBibliographySourceContext.cxx +++ b/xmloff/source/text/XMLIndexBibliographySourceContext.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. @@ -109,3 +110,5 @@ SvXMLImportContext* XMLIndexBibliographySourceContext::CreateChildContext( } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexBibliographySourceContext.hxx b/xmloff/source/text/XMLIndexBibliographySourceContext.hxx index fb5fd492dc69..aff6534d9a3f 100644 --- a/xmloff/source/text/XMLIndexBibliographySourceContext.hxx +++ b/xmloff/source/text/XMLIndexBibliographySourceContext.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. @@ -74,3 +75,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexBodyContext.cxx b/xmloff/source/text/XMLIndexBodyContext.cxx index 0776760c1de1..0606a279d228 100644 --- a/xmloff/source/text/XMLIndexBodyContext.cxx +++ b/xmloff/source/text/XMLIndexBodyContext.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,3 +76,5 @@ SvXMLImportContext* XMLIndexBodyContext::CreateChildContext( return pContext; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexBodyContext.hxx b/xmloff/source/text/XMLIndexBodyContext.hxx index 948a10eb3881..7bceae7cca6e 100644 --- a/xmloff/source/text/XMLIndexBodyContext.hxx +++ b/xmloff/source/text/XMLIndexBodyContext.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,5 @@ inline sal_Bool XMLIndexBodyContext::HasContent() } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx b/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx index bc5cb36ecb81..2462ca195a04 100644 --- a/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx +++ b/xmloff/source/text/XMLIndexChapterInfoEntryContext.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. @@ -86,7 +87,6 @@ static const SvXMLEnumMapEntry aChapterDisplayMap[] = //---> i89791 // enabled for ODF 1.2, full index support in 3.0 { XML_PLAIN_NUMBER_AND_NAME, ChapterFormat::NO_PREFIX_SUFFIX }, - //<--- { XML_PLAIN_NUMBER, ChapterFormat::DIGIT }, { XML_TOKEN_INVALID, 0 } }; @@ -144,7 +144,9 @@ void XMLIndexChapterInfoEntryContext::StartElement( if (bChapterInfoOK) { nValues++; - // --> OD 2008-06-26 #i89791# + /* Some of the index chapter information attributes written to ODF 1.1 + and 1.2 don't reflect the displaying (#i89791#) + */ if ( !bTOC ) { bool bConvert( false ); @@ -171,7 +173,6 @@ void XMLIndexChapterInfoEntryContext::StartElement( } } } - // <-- } if (bOutlineLevelOK) nValues++; @@ -203,3 +204,5 @@ void XMLIndexChapterInfoEntryContext::FillPropertyValues( rValues[nIndex].Value = aAny; } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexChapterInfoEntryContext.hxx b/xmloff/source/text/XMLIndexChapterInfoEntryContext.hxx index 247b4f73cea5..7af50acad403 100644 --- a/xmloff/source/text/XMLIndexChapterInfoEntryContext.hxx +++ b/xmloff/source/text/XMLIndexChapterInfoEntryContext.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. @@ -79,3 +80,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexIllustrationSourceContext.cxx b/xmloff/source/text/XMLIndexIllustrationSourceContext.cxx index 40c32701d50a..5c45121448c1 100644 --- a/xmloff/source/text/XMLIndexIllustrationSourceContext.cxx +++ b/xmloff/source/text/XMLIndexIllustrationSourceContext.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,5 @@ SvXMLImportContext* XMLIndexIllustrationSourceContext::CreateChildContext( } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexIllustrationSourceContext.hxx b/xmloff/source/text/XMLIndexIllustrationSourceContext.hxx index 0a56bc15a744..3055a616179c 100644 --- a/xmloff/source/text/XMLIndexIllustrationSourceContext.hxx +++ b/xmloff/source/text/XMLIndexIllustrationSourceContext.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 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexMarkExport.cxx b/xmloff/source/text/XMLIndexMarkExport.cxx index 325e7a66f83f..e84282b83589 100644 --- a/xmloff/source/text/XMLIndexMarkExport.cxx +++ b/xmloff/source/text/XMLIndexMarkExport.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. @@ -265,3 +266,5 @@ void XMLIndexMarkExport::GetID( sBuf.appendAscii(sPrefix, sizeof(sPrefix)-1); sBuf.append(nId); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexMarkExport.hxx b/xmloff/source/text/XMLIndexMarkExport.hxx index 3595c58a5f53..461d6780d965 100644 --- a/xmloff/source/text/XMLIndexMarkExport.hxx +++ b/xmloff/source/text/XMLIndexMarkExport.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. @@ -115,3 +116,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexObjectSourceContext.cxx b/xmloff/source/text/XMLIndexObjectSourceContext.cxx index 15301ffb2fe6..1bf18ec7cb0a 100644 --- a/xmloff/source/text/XMLIndexObjectSourceContext.cxx +++ b/xmloff/source/text/XMLIndexObjectSourceContext.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,7 +101,7 @@ void XMLIndexObjectSourceContext::ProcessAttribute( { switch (eParam) { - sal_Bool bTmp; + bool bTmp; case XML_TOK_INDEXSOURCE_USE_OTHER_OBJECTS: if (SvXMLUnitConverter::convertBool(bTmp, rValue)) @@ -188,3 +189,5 @@ SvXMLImportContext* XMLIndexObjectSourceContext::CreateChildContext( } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexObjectSourceContext.hxx b/xmloff/source/text/XMLIndexObjectSourceContext.hxx index 62e0bd06c1b5..74c37bc28283 100644 --- a/xmloff/source/text/XMLIndexObjectSourceContext.hxx +++ b/xmloff/source/text/XMLIndexObjectSourceContext.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. @@ -85,3 +86,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexSimpleEntryContext.cxx b/xmloff/source/text/XMLIndexSimpleEntryContext.cxx index 4284eabe3571..0f3ca31b2385 100644 --- a/xmloff/source/text/XMLIndexSimpleEntryContext.cxx +++ b/xmloff/source/text/XMLIndexSimpleEntryContext.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,6 @@ #include <xmloff/xmltoken.hxx> #include <xmloff/xmluconv.hxx> - -//using namespace ::com::sun::star::text; - using ::rtl::OUString; using ::com::sun::star::beans::PropertyValue; using ::com::sun::star::beans::PropertyValues; @@ -144,3 +142,5 @@ void XMLIndexSimpleEntryContext::FillPropertyValues( } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexSimpleEntryContext.hxx b/xmloff/source/text/XMLIndexSimpleEntryContext.hxx index 3088c2b81139..556b936027db 100644 --- a/xmloff/source/text/XMLIndexSimpleEntryContext.hxx +++ b/xmloff/source/text/XMLIndexSimpleEntryContext.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. @@ -91,3 +92,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexSourceBaseContext.cxx b/xmloff/source/text/XMLIndexSourceBaseContext.cxx index f9e04bd0a488..849ffa0b2b0e 100644 --- a/xmloff/source/text/XMLIndexSourceBaseContext.cxx +++ b/xmloff/source/text/XMLIndexSourceBaseContext.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 @@ using ::com::sun::star::xml::sax::XAttributeList; const sal_Char sAPI_CreateFromChapter[] = "CreateFromChapter"; const sal_Char sAPI_IsRelativeTabstops[] = "IsRelativeTabstops"; -static __FAR_DATA SvXMLTokenMapEntry aIndexSourceTokenMap[] = +static SvXMLTokenMapEntry aIndexSourceTokenMap[] = { { XML_NAMESPACE_TEXT, XML_OUTLINE_LEVEL, @@ -215,7 +216,7 @@ void XMLIndexSourceBaseContext::ProcessAttribute( case XML_TOK_INDEXSOURCE_RELATIVE_TABS: { - sal_Bool bTmp; + bool bTmp; if (SvXMLUnitConverter::convertBool(bTmp, rValue)) { bRelativeTabs = bTmp; @@ -275,3 +276,5 @@ SvXMLImportContext* XMLIndexSourceBaseContext::CreateChildContext( return pContext; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexSourceBaseContext.hxx b/xmloff/source/text/XMLIndexSourceBaseContext.hxx index 8d84504df317..7d7d10672d1e 100644 --- a/xmloff/source/text/XMLIndexSourceBaseContext.hxx +++ b/xmloff/source/text/XMLIndexSourceBaseContext.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. @@ -129,3 +130,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexSpanEntryContext.cxx b/xmloff/source/text/XMLIndexSpanEntryContext.cxx index d760a3e15be8..21a37dd56e7a 100644 --- a/xmloff/source/text/XMLIndexSpanEntryContext.cxx +++ b/xmloff/source/text/XMLIndexSpanEntryContext.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. @@ -74,3 +75,4 @@ void XMLIndexSpanEntryContext::FillPropertyValues( rValues[nValues-1].Value = aAny; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexSpanEntryContext.hxx b/xmloff/source/text/XMLIndexSpanEntryContext.hxx index 8880a7665f6e..de7f26840508 100644 --- a/xmloff/source/text/XMLIndexSpanEntryContext.hxx +++ b/xmloff/source/text/XMLIndexSpanEntryContext.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 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx b/xmloff/source/text/XMLIndexTOCContext.cxx index 2699111ab47a..c1285af4e751 100644 --- a/xmloff/source/text/XMLIndexTOCContext.cxx +++ b/xmloff/source/text/XMLIndexTOCContext.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. @@ -93,7 +94,7 @@ static const XMLTokenEnum aIndexSourceElementMap[] = XML_ILLUSTRATION_INDEX_SOURCE }; -SvXMLEnumMapEntry __READONLY_DATA aIndexTypeMap[] = +SvXMLEnumMapEntry const aIndexTypeMap[] = { { XML_TABLE_OF_CONTENT, TEXT_INDEX_TOC }, { XML_ALPHABETICAL_INDEX, TEXT_INDEX_ALPHABETICAL }, @@ -122,9 +123,9 @@ XMLIndexTOCContext::XMLIndexTOCContext( if (SvXMLUnitConverter::convertEnum(nTmp, rLocalName, aIndexTypeMap)) { // check for array index: - OSL_ENSURE(nTmp < (sizeof(aIndexServiceMap)/sizeof(sal_Char*)), "index out of range"); - OSL_ENSURE(sizeof(aIndexServiceMap) == - sizeof(aIndexSourceElementMap), + OSL_ENSURE(nTmp < (SAL_N_ELEMENTS(aIndexServiceMap)), "index out of range"); + OSL_ENSURE(SAL_N_ELEMENTS(aIndexServiceMap) == + SAL_N_ELEMENTS(aIndexSourceElementMap), "service and source element maps must be same size"); eIndexType = static_cast<IndexTypeEnum>(nTmp); @@ -165,7 +166,7 @@ void XMLIndexTOCContext::StartElement( } else if ( IsXMLToken( sLocalName, XML_PROTECTED ) ) { - sal_Bool bTmp; + bool bTmp; if ( SvXMLUnitConverter::convertBool( bTmp, xAttrList->getValueByIndex(nAttr) ) ) { @@ -361,7 +362,7 @@ SvXMLImportContext* XMLIndexTOCContext::CreateChildContext( break; default: - OSL_ENSURE(false, "index type not implemented"); + OSL_FAIL("index type not implemented"); break; } } @@ -380,3 +381,5 @@ SvXMLImportContext* XMLIndexTOCContext::CreateChildContext( return pContext; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexTOCContext.hxx b/xmloff/source/text/XMLIndexTOCContext.hxx index 66f045a5467d..f4c99e99bf36 100644 --- a/xmloff/source/text/XMLIndexTOCContext.hxx +++ b/xmloff/source/text/XMLIndexTOCContext.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. @@ -104,3 +105,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexTOCSourceContext.cxx b/xmloff/source/text/XMLIndexTOCSourceContext.cxx index 84296ff24241..46404a9cd6ca 100644 --- a/xmloff/source/text/XMLIndexTOCSourceContext.cxx +++ b/xmloff/source/text/XMLIndexTOCSourceContext.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. @@ -115,7 +116,7 @@ void XMLIndexTOCSourceContext::ProcessAttribute( case XML_TOK_INDEXSOURCE_USE_OUTLINE_LEVEL: { - sal_Bool bTmp; + bool bTmp; if (SvXMLUnitConverter::convertBool(bTmp, rValue)) { bUseOutline = bTmp; @@ -126,7 +127,7 @@ void XMLIndexTOCSourceContext::ProcessAttribute( case XML_TOK_INDEXSOURCE_USE_INDEX_MARKS: { - sal_Bool bTmp; + bool bTmp; if (SvXMLUnitConverter::convertBool(bTmp, rValue)) { bUseMarks = bTmp; @@ -136,7 +137,7 @@ void XMLIndexTOCSourceContext::ProcessAttribute( case XML_TOK_INDEXSOURCE_USE_INDEX_SOURCE_STYLES: { - sal_Bool bTmp; + bool bTmp; if (SvXMLUnitConverter::convertBool(bTmp, rValue)) { bUseParagraphStyles = bTmp; @@ -194,3 +195,5 @@ SvXMLImportContext* XMLIndexTOCSourceContext::CreateChildContext( xAttrList); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexTOCSourceContext.hxx b/xmloff/source/text/XMLIndexTOCSourceContext.hxx index c26139fd9280..e05d0d7b8774 100644 --- a/xmloff/source/text/XMLIndexTOCSourceContext.hxx +++ b/xmloff/source/text/XMLIndexTOCSourceContext.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. @@ -84,3 +85,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexTOCStylesContext.cxx b/xmloff/source/text/XMLIndexTOCStylesContext.cxx index 755bd280a539..4dec88afc16a 100644 --- a/xmloff/source/text/XMLIndexTOCStylesContext.cxx +++ b/xmloff/source/text/XMLIndexTOCStylesContext.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. @@ -157,3 +158,5 @@ SvXMLImportContext *XMLIndexTOCStylesContext::CreateChildContext( return SvXMLImportContext::CreateChildContext(p_nPrefix, rLocalName, xAttrList); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexTOCStylesContext.hxx b/xmloff/source/text/XMLIndexTOCStylesContext.hxx index 835b8c3a341b..d027b30ec5aa 100644 --- a/xmloff/source/text/XMLIndexTOCStylesContext.hxx +++ b/xmloff/source/text/XMLIndexTOCStylesContext.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. @@ -31,10 +32,7 @@ #include <xmloff/xmlictxt.hxx> #include <com/sun/star/uno/Reference.h> -#ifndef __SGI_STL_VECTOR #include <vector> -#endif - namespace com { namespace sun { namespace star { namespace xml { namespace sax { class XAttributeList; } } @@ -95,3 +93,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexTabStopEntryContext.cxx b/xmloff/source/text/XMLIndexTabStopEntryContext.cxx index 301e7af3f96d..ff70425d0711 100644 --- a/xmloff/source/text/XMLIndexTabStopEntryContext.cxx +++ b/xmloff/source/text/XMLIndexTabStopEntryContext.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. @@ -113,7 +114,7 @@ void XMLIndexTabStopEntryContext::StartElement( // #i21237# else if ( IsXMLToken( sLocalName, XML_WITH_TAB ) ) { - sal_Bool bTmp; + bool bTmp; if (SvXMLUnitConverter::convertBool(bTmp, sAttr)) bWithTab = bTmp; } @@ -172,3 +173,5 @@ void XMLIndexTabStopEntryContext::FillPropertyValues( DBG_ASSERT( nNextEntry == rValues.getLength(), "length incorrectly precumputed!" ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexTabStopEntryContext.hxx b/xmloff/source/text/XMLIndexTabStopEntryContext.hxx index dbacb2708344..87713e8b46e5 100644 --- a/xmloff/source/text/XMLIndexTabStopEntryContext.hxx +++ b/xmloff/source/text/XMLIndexTabStopEntryContext.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,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexTableSourceContext.cxx b/xmloff/source/text/XMLIndexTableSourceContext.cxx index b87514c79eda..783c18e5590f 100644 --- a/xmloff/source/text/XMLIndexTableSourceContext.cxx +++ b/xmloff/source/text/XMLIndexTableSourceContext.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 <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/container/XIndexReplace.hpp> -#ifndef _COM_SUN_STAR_TEXT_REFERENCEFIELD_PART_HPP #include <com/sun/star/text/ReferenceFieldPart.hpp> -#endif #include "XMLIndexTemplateContext.hxx" #include "XMLIndexTitleTemplateContext.hxx" #include "XMLIndexTOCStylesContext.hxx" @@ -87,7 +86,7 @@ XMLIndexTableSourceContext::~XMLIndexTableSourceContext() { } -static SvXMLEnumMapEntry __READONLY_DATA lcl_aReferenceTypeTokenMap[] = +static SvXMLEnumMapEntry const lcl_aReferenceTypeTokenMap[] = { { XML_TEXT, ReferenceFieldPart::TEXT }, @@ -105,7 +104,7 @@ void XMLIndexTableSourceContext::ProcessAttribute( enum IndexSourceParamEnum eParam, const OUString& rValue) { - sal_Bool bTmp; + bool bTmp; switch (eParam) { @@ -186,3 +185,5 @@ SvXMLImportContext* XMLIndexTableSourceContext::CreateChildContext( } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexTableSourceContext.hxx b/xmloff/source/text/XMLIndexTableSourceContext.hxx index e18b38bce9f3..afeb866b2a0b 100644 --- a/xmloff/source/text/XMLIndexTableSourceContext.hxx +++ b/xmloff/source/text/XMLIndexTableSourceContext.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. @@ -84,3 +85,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexTemplateContext.cxx b/xmloff/source/text/XMLIndexTemplateContext.cxx index 05bf7f5495da..15031b67baba 100644 --- a/xmloff/source/text/XMLIndexTemplateContext.cxx +++ b/xmloff/source/text/XMLIndexTemplateContext.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. @@ -49,7 +50,6 @@ using namespace ::std; -//using namespace ::com::sun::star::text; using namespace ::xmloff::token; using ::rtl::OUString; @@ -502,3 +502,4 @@ const sal_Bool aAllowedTokenTypesTable[] = sal_False // XML_TOK_INDEX_TYPE_BIBLIOGRAPHY }; +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexTemplateContext.hxx b/xmloff/source/text/XMLIndexTemplateContext.hxx index d63cb485826b..7f496838f9a1 100644 --- a/xmloff/source/text/XMLIndexTemplateContext.hxx +++ b/xmloff/source/text/XMLIndexTemplateContext.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. @@ -157,3 +158,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexTitleTemplateContext.cxx b/xmloff/source/text/XMLIndexTitleTemplateContext.cxx index 333c141f8843..e713da8a97a3 100644 --- a/xmloff/source/text/XMLIndexTitleTemplateContext.cxx +++ b/xmloff/source/text/XMLIndexTitleTemplateContext.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. @@ -114,3 +115,5 @@ void XMLIndexTitleTemplateContext::Characters( { sContent.append(sString); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexTitleTemplateContext.hxx b/xmloff/source/text/XMLIndexTitleTemplateContext.hxx index fb9e1190ec3e..a8a1713520b9 100644 --- a/xmloff/source/text/XMLIndexTitleTemplateContext.hxx +++ b/xmloff/source/text/XMLIndexTitleTemplateContext.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. @@ -88,3 +89,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexUserSourceContext.cxx b/xmloff/source/text/XMLIndexUserSourceContext.cxx index b87551307d73..fd5be90bb89f 100644 --- a/xmloff/source/text/XMLIndexUserSourceContext.cxx +++ b/xmloff/source/text/XMLIndexUserSourceContext.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. @@ -107,7 +108,7 @@ void XMLIndexUserSourceContext::ProcessAttribute( enum IndexSourceParamEnum eParam, const OUString& rValue) { - sal_Bool bTmp; + bool bTmp; switch (eParam) { @@ -229,3 +230,5 @@ SvXMLImportContext* XMLIndexUserSourceContext::CreateChildContext( } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexUserSourceContext.hxx b/xmloff/source/text/XMLIndexUserSourceContext.hxx index 0b7684ec7dae..003a4103654d 100644 --- a/xmloff/source/text/XMLIndexUserSourceContext.hxx +++ b/xmloff/source/text/XMLIndexUserSourceContext.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. @@ -91,3 +92,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLLineNumberingExport.cxx b/xmloff/source/text/XMLLineNumberingExport.cxx index dd0386d48aab..021314e36599 100644 --- a/xmloff/source/text/XMLLineNumberingExport.cxx +++ b/xmloff/source/text/XMLLineNumberingExport.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,7 +65,7 @@ XMLLineNumberingExport::XMLLineNumberingExport(SvXMLExport& rExp) { } -SvXMLEnumMapEntry __READONLY_DATA aLineNumberPositionMap[] = +SvXMLEnumMapEntry const aLineNumberPositionMap[] = { { XML_LEFT, style::LineNumberPosition::LEFT }, { XML_RIGHT, style::LineNumberPosition::RIGHT }, @@ -210,3 +211,5 @@ void XMLLineNumberingExport::Export() } // can't even get supplier: don't save -> default } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLLineNumberingExport.hxx b/xmloff/source/text/XMLLineNumberingExport.hxx index aaa1995a4e06..25725ab67072 100644 --- a/xmloff/source/text/XMLLineNumberingExport.hxx +++ b/xmloff/source/text/XMLLineNumberingExport.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. @@ -58,3 +59,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLLineNumberingImportContext.cxx b/xmloff/source/text/XMLLineNumberingImportContext.cxx index cc1e11389750..c48cb8f58409 100644 --- a/xmloff/source/text/XMLLineNumberingImportContext.cxx +++ b/xmloff/source/text/XMLLineNumberingImportContext.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. @@ -138,7 +139,7 @@ void XMLLineNumberingImportContext::ProcessAttribute( enum LineNumberingToken eToken, OUString sValue) { - sal_Bool bTmp; + bool bTmp; sal_Int32 nTmp; switch (eToken) @@ -320,3 +321,4 @@ void XMLLineNumberingImportContext::SetSeparatorIncrement( nSeparatorIncrement = nIncr; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLLineNumberingSeparatorImportContext.cxx b/xmloff/source/text/XMLLineNumberingSeparatorImportContext.cxx index 4c2b62c5ec35..adc7a3230d4c 100644 --- a/xmloff/source/text/XMLLineNumberingSeparatorImportContext.cxx +++ b/xmloff/source/text/XMLLineNumberingSeparatorImportContext.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. @@ -95,3 +96,5 @@ void XMLLineNumberingSeparatorImportContext::EndElement() { rLineNumberingContext.SetSeparatorText(sSeparatorBuf.makeStringAndClear()); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLLineNumberingSeparatorImportContext.hxx b/xmloff/source/text/XMLLineNumberingSeparatorImportContext.hxx index 84661343adba..224e54e13936 100644 --- a/xmloff/source/text/XMLLineNumberingSeparatorImportContext.hxx +++ b/xmloff/source/text/XMLLineNumberingSeparatorImportContext.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 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLPropertyBackpatcher.cxx b/xmloff/source/text/XMLPropertyBackpatcher.cxx index 364096ad8185..292a77f42465 100644 --- a/xmloff/source/text/XMLPropertyBackpatcher.cxx +++ b/xmloff/source/text/XMLPropertyBackpatcher.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. @@ -310,3 +311,4 @@ void XMLTextImportHelper::ProcessSequenceReference( GetSequenceNameBP().SetProperty(xPropSet, sXMLId); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLPropertyBackpatcher.hxx b/xmloff/source/text/XMLPropertyBackpatcher.hxx index 73b4efd0bdee..42f2009f25e0 100644 --- a/xmloff/source/text/XMLPropertyBackpatcher.hxx +++ b/xmloff/source/text/XMLPropertyBackpatcher.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,13 +30,8 @@ #ifndef _XMLOFF_XMLPROPERTYBACKPATCHER_HXX #define _XMLOFF_XMLPROPERTYBACKPATCHER_HXX -#ifndef __SGI_STL_MAP #include <map> -#endif - -#ifndef __SGI_STL_VECTOR #include <vector> -#endif #include <comphelper/stl_types.hxx> namespace rtl { class OUString; } @@ -154,3 +150,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLRedlineExport.cxx b/xmloff/source/text/XMLRedlineExport.cxx index 7dee1ba94069..a0f2947434e8 100644 --- a/xmloff/source/text/XMLRedlineExport.cxx +++ b/xmloff/source/text/XMLRedlineExport.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. @@ -451,7 +452,7 @@ const OUString XMLRedlineExport::ConvertTypeName( } else { - DBG_ERROR("unknown redline type"); + OSL_FAIL("unknown redline type"); return sUnknownChange; } } @@ -635,7 +636,7 @@ void XMLRedlineExport::ExportStartOrEndRedline( } else { - DBG_ERROR("XPropertySet expected"); + OSL_FAIL("XPropertySet expected"); } } @@ -650,7 +651,7 @@ void XMLRedlineExport::ExportStartOrEndRedline( } else { - DBG_ERROR("XPropertySet expected"); + OSL_FAIL("XPropertySet expected"); } } @@ -670,3 +671,5 @@ void XMLRedlineExport::WriteComment(const OUString& rComment) } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLRedlineExport.hxx b/xmloff/source/text/XMLRedlineExport.hxx index a89683e785b3..46125b5fd42d 100644 --- a/xmloff/source/text/XMLRedlineExport.hxx +++ b/xmloff/source/text/XMLRedlineExport.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. @@ -210,3 +211,5 @@ private: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLSectionExport.cxx b/xmloff/source/text/XMLSectionExport.cxx index aee5f991b48e..dba56113123c 100644 --- a/xmloff/source/text/XMLSectionExport.cxx +++ b/xmloff/source/text/XMLSectionExport.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. @@ -304,7 +305,7 @@ void XMLSectionExport::ExportSectionEnd( break; default: - OSL_ENSURE(false, "unknown index type"); + OSL_FAIL("unknown index type"); // default: skip index! break; } @@ -330,7 +331,7 @@ void XMLSectionExport::ExportSectionEnd( } else { - OSL_ENSURE(false, "Need element name!"); + OSL_FAIL("Need element name!"); } } // else: autostyles -> ignore @@ -374,7 +375,7 @@ void XMLSectionExport::ExportIndexStart( default: // skip index - OSL_ENSURE(false, "unknown index type"); + OSL_FAIL("unknown index type"); break; } } @@ -392,7 +393,7 @@ void XMLSectionExport::ExportIndexHeaderStart( } -SvXMLEnumStringMapEntry __READONLY_DATA aIndexTypeMap[] = +SvXMLEnumStringMapEntry const aIndexTypeMap[] = { ENUM_STRING_MAP_ENTRY( "com.sun.star.text.ContentIndex", TEXT_SECTION_TYPE_TOC ), ENUM_STRING_MAP_ENTRY( "com.sun.star.text.DocumentIndex", TEXT_SECTION_TYPE_ALPHABETICAL ), @@ -895,7 +896,7 @@ void XMLSectionExport::ExportBaseIndexSource( aAny = xLevelTemplates->getByIndex(i); aAny >>= aTemplateSequence; - // export the sequence (abort export if an error occured; #91214#) + // export the sequence (abort export if an error occurred; #91214#) sal_Bool bResult = ExportIndexTemplate(eType, i, rPropertySet, aTemplateSequence); if ( !bResult ) @@ -1158,7 +1159,7 @@ enum TemplateParamEnum TOK_TPARAM_BIBLIOGRAPHY_DATA }; -SvXMLEnumStringMapEntry __READONLY_DATA aTemplateTypeMap[] = +SvXMLEnumStringMapEntry const aTemplateTypeMap[] = { ENUM_STRING_MAP_ENTRY( "TokenEntryNumber", TOK_TTYPE_ENTRY_NUMBER ), ENUM_STRING_MAP_ENTRY( "TokenEntryText", TOK_TTYPE_ENTRY_TEXT ), @@ -1172,7 +1173,7 @@ SvXMLEnumStringMapEntry __READONLY_DATA aTemplateTypeMap[] = ENUM_STRING_MAP_END() }; -SvXMLEnumStringMapEntry __READONLY_DATA aTemplateParamMap[] = +SvXMLEnumStringMapEntry const aTemplateParamMap[] = { ENUM_STRING_MAP_ENTRY( "TokenType", TOK_TPARAM_TOKEN_TYPE ), ENUM_STRING_MAP_ENTRY( "CharacterStyleName", TOK_TPARAM_CHAR_STYLE ), @@ -1188,7 +1189,7 @@ SvXMLEnumStringMapEntry __READONLY_DATA aTemplateParamMap[] = ENUM_STRING_MAP_END() }; -SvXMLEnumMapEntry __READONLY_DATA aBibliographyDataFieldMap[] = +SvXMLEnumMapEntry const aBibliographyDataFieldMap[] = { { XML_ADDRESS, BibliographyDataField::ADDRESS }, { XML_ANNOTE, BibliographyDataField::ANNOTE }, @@ -1240,7 +1241,6 @@ void XMLSectionExport::ExportIndexTemplateElement( // tab position sal_Bool bRightAligned = sal_False; - sal_Bool bRightAlignedOK = sal_False; // tab position sal_Int32 nTabPosition = 0; @@ -1314,7 +1314,6 @@ void XMLSectionExport::ExportIndexTemplateElement( case TOK_TPARAM_TAB_RIGHT_ALIGNED: bRightAligned = *(sal_Bool *)rValues[i].Value.getValue(); - bRightAlignedOK = sal_True; break; case TOK_TPARAM_TAB_POSITION: @@ -1342,7 +1341,6 @@ void XMLSectionExport::ExportIndexTemplateElement( rValues[i].Value >>= nLevel; bLevelOK = sal_True; break; -//<--- case TOK_TPARAM_BIBLIOGRAPHY_DATA: rValues[i].Value >>= nBibliographyData; bBibliographyDataOK = sal_True; @@ -1450,7 +1448,6 @@ void XMLSectionExport::ExportIndexTemplateElement( bChapterFormatOK = sal_False; } } -//<--- // ... and write Element if (eElement != XML_TOKEN_INVALID) @@ -1538,7 +1535,6 @@ void XMLSectionExport::ExportIndexTemplateElement( if (bLevelOK) GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_OUTLINE_LEVEL, OUString::valueOf((sal_Int32)nLevel)); -//<--- } //--->i53420 @@ -1553,7 +1549,6 @@ void XMLSectionExport::ExportIndexTemplateElement( GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_OUTLINE_LEVEL, OUString::valueOf((sal_Int32)nLevel)); } -//<--- // export template SvXMLElementExport aTemplateElement(GetExport(), XML_NAMESPACE_TEXT, GetXMLToken(eElement), @@ -1928,3 +1923,5 @@ void XMLSectionExport::ExportMasterDocHeadingDummies() bHeadingDummiesExported = sal_True; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLSectionExport.hxx b/xmloff/source/text/XMLSectionExport.hxx index 0187f023e9ea..fb331c0e8b64 100644 --- a/xmloff/source/text/XMLSectionExport.hxx +++ b/xmloff/source/text/XMLSectionExport.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. @@ -364,3 +365,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLSectionFootnoteConfigExport.cxx b/xmloff/source/text/XMLSectionFootnoteConfigExport.cxx index ce702d714857..a420ebb13f8f 100644 --- a/xmloff/source/text/XMLSectionFootnoteConfigExport.cxx +++ b/xmloff/source/text/XMLSectionFootnoteConfigExport.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 <com/sun/star/style/NumberingType.hpp> #include <xmloff/maptype.hxx> -#ifndef _XMLOFF_TXTPRMAP_HXX #include <xmloff/txtprmap.hxx> -#endif #include <xmloff/nmspmap.hxx> #include "xmloff/xmlnmspe.hxx" #include <xmloff/xmluconv.hxx> @@ -200,3 +199,5 @@ void XMLSectionFootnoteConfigExport::exportXML( sal_True, sal_True); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLSectionFootnoteConfigExport.hxx b/xmloff/source/text/XMLSectionFootnoteConfigExport.hxx index bd0a1fcf6ea8..722f9f64f68f 100644 --- a/xmloff/source/text/XMLSectionFootnoteConfigExport.hxx +++ b/xmloff/source/text/XMLSectionFootnoteConfigExport.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,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx b/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx index 24e87dfde17a..6e699017c374 100644 --- a/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx +++ b/xmloff/source/text/XMLSectionFootnoteConfigImport.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 @@ void XMLSectionFootnoteConfigImport::StartElement( XMLPropertyState aEndState( nIndex, aAny ); rProperties.push_back( aEndState ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLSectionFootnoteConfigImport.hxx b/xmloff/source/text/XMLSectionFootnoteConfigImport.hxx index 984414ccb845..3862d824fe4d 100644 --- a/xmloff/source/text/XMLSectionFootnoteConfigImport.hxx +++ b/xmloff/source/text/XMLSectionFootnoteConfigImport.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. @@ -74,3 +75,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLSectionImportContext.cxx b/xmloff/source/text/XMLSectionImportContext.cxx index 890c55140ee4..0058026d0dba 100644 --- a/xmloff/source/text/XMLSectionImportContext.cxx +++ b/xmloff/source/text/XMLSectionImportContext.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,7 +81,7 @@ enum XMLSectionToken XML_TOK_SECTION_IS_HIDDEN }; -static __FAR_DATA SvXMLTokenMapEntry aSectionTokenMap[] = +static SvXMLTokenMapEntry aSectionTokenMap[] = { { XML_NAMESPACE_XML , XML_ID, XML_TOK_SECTION_XMLID }, { XML_NAMESPACE_TEXT, XML_STYLE_NAME, XML_TOK_SECTION_STYLE_NAME }, @@ -312,7 +313,7 @@ void XMLSectionImportContext::ProcessAttributes( break; case XML_TOK_SECTION_IS_HIDDEN: { - sal_Bool bTmp; + bool bTmp; if (SvXMLUnitConverter::convertBool(bTmp, sAttr)) { bIsCurrentlyVisible = !bTmp; @@ -326,7 +327,7 @@ void XMLSectionImportContext::ProcessAttributes( break; case XML_TOK_SECTION_PROTECT: { - sal_Bool bTmp; + bool bTmp; if (SvXMLUnitConverter::convertBool(bTmp, sAttr)) { bProtect = bTmp; @@ -404,3 +405,4 @@ SvXMLImportContext* XMLSectionImportContext::CreateChildContext( return pContext; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLSectionImportContext.hxx b/xmloff/source/text/XMLSectionImportContext.hxx index 313cf60b9ef1..38c4f2d99569 100644 --- a/xmloff/source/text/XMLSectionImportContext.hxx +++ b/xmloff/source/text/XMLSectionImportContext.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. @@ -116,3 +117,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLSectionSourceDDEImportContext.cxx b/xmloff/source/text/XMLSectionSourceDDEImportContext.cxx index 25f456a5d584..39a7d0095dd9 100644 --- a/xmloff/source/text/XMLSectionSourceDDEImportContext.cxx +++ b/xmloff/source/text/XMLSectionSourceDDEImportContext.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. @@ -86,7 +87,7 @@ enum XMLSectionSourceDDEToken XML_TOK_SECTION_IS_AUTOMATIC_UPDATE }; -static __FAR_DATA SvXMLTokenMapEntry aSectionSourceDDETokenMap[] = +static SvXMLTokenMapEntry aSectionSourceDDETokenMap[] = { { XML_NAMESPACE_OFFICE, XML_DDE_APPLICATION, XML_TOK_SECTION_DDE_APPLICATION }, @@ -128,7 +129,7 @@ void XMLSectionSourceDDEImportContext::StartElement( break; case XML_TOK_SECTION_IS_AUTOMATIC_UPDATE: { - sal_Bool bTmp; + bool bTmp; if (SvXMLUnitConverter::convertBool( bTmp, xAttrList->getValueByIndex(nAttr))) { @@ -184,3 +185,5 @@ SvXMLImportContext* XMLSectionSourceDDEImportContext::CreateChildContext( // ignore -> default context return new SvXMLImportContext(GetImport(), nPrefix, rLocalName); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLSectionSourceDDEImportContext.hxx b/xmloff/source/text/XMLSectionSourceDDEImportContext.hxx index 89fd0e47248a..bca2e342f45b 100644 --- a/xmloff/source/text/XMLSectionSourceDDEImportContext.hxx +++ b/xmloff/source/text/XMLSectionSourceDDEImportContext.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. @@ -76,3 +77,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLSectionSourceImportContext.cxx b/xmloff/source/text/XMLSectionSourceImportContext.cxx index 7c2023228c2b..d5b5b6805712 100644 --- a/xmloff/source/text/XMLSectionSourceImportContext.cxx +++ b/xmloff/source/text/XMLSectionSourceImportContext.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. @@ -73,7 +74,7 @@ enum XMLSectionSourceToken XML_TOK_SECTION_TEXT_SECTION_NAME }; -static __FAR_DATA SvXMLTokenMapEntry aSectionSourceTokenMap[] = +static SvXMLTokenMapEntry aSectionSourceTokenMap[] = { { XML_NAMESPACE_XLINK, XML_HREF, XML_TOK_SECTION_XLINK_HREF }, { XML_NAMESPACE_TEXT, XML_FILTER_NAME, XML_TOK_SECTION_TEXT_FILTER_NAME }, @@ -154,3 +155,5 @@ SvXMLImportContext* XMLSectionSourceImportContext::CreateChildContext( // ignore -> default context return new SvXMLImportContext(GetImport(), nPrefix, rLocalName); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLSectionSourceImportContext.hxx b/xmloff/source/text/XMLSectionSourceImportContext.hxx index dc4ebc934c15..3dd61d03bb89 100644 --- a/xmloff/source/text/XMLSectionSourceImportContext.hxx +++ b/xmloff/source/text/XMLSectionSourceImportContext.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. @@ -71,3 +72,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLStringBufferImportContext.cxx b/xmloff/source/text/XMLStringBufferImportContext.cxx index cd63a9b48a82..077b041167bf 100644 --- a/xmloff/source/text/XMLStringBufferImportContext.cxx +++ b/xmloff/source/text/XMLStringBufferImportContext.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. @@ -81,3 +82,4 @@ void XMLStringBufferImportContext::EndElement() } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTextCharStyleNamesElementExport.cxx b/xmloff/source/text/XMLTextCharStyleNamesElementExport.cxx index e4ed313d70de..197f8c79203b 100644 --- a/xmloff/source/text/XMLTextCharStyleNamesElementExport.cxx +++ b/xmloff/source/text/XMLTextCharStyleNamesElementExport.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,4 @@ XMLTextCharStyleNamesElementExport::~XMLTextCharStyleNamesElementExport() } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTextCharStyleNamesElementExport.hxx b/xmloff/source/text/XMLTextCharStyleNamesElementExport.hxx index 41e6d61a4ed1..5af87c094bf3 100644 --- a/xmloff/source/text/XMLTextCharStyleNamesElementExport.hxx +++ b/xmloff/source/text/XMLTextCharStyleNamesElementExport.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. @@ -54,3 +55,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTextColumnsContext.cxx b/xmloff/source/text/XMLTextColumnsContext.cxx index 48175ae33e4f..a1bfa163711a 100644 --- a/xmloff/source/text/XMLTextColumnsContext.cxx +++ b/xmloff/source/text/XMLTextColumnsContext.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. @@ -67,10 +68,11 @@ enum SvXMLSepTokenMapAttrs XML_TOK_COLUMN_SEP_HEIGHT, XML_TOK_COLUMN_SEP_COLOR, XML_TOK_COLUMN_SEP_ALIGN, + XML_TOK_COLUMN_SEP_STYLE, XML_TOK_COLUMN_SEP_END=XML_TOK_UNKNOWN }; -static __FAR_DATA SvXMLTokenMapEntry aColAttrTokenMap[] = +static SvXMLTokenMapEntry aColAttrTokenMap[] = { { XML_NAMESPACE_STYLE, XML_REL_WIDTH, XML_TOK_COLUMN_WIDTH }, { XML_NAMESPACE_FO, XML_START_INDENT, XML_TOK_COLUMN_MARGIN_LEFT }, @@ -78,16 +80,26 @@ static __FAR_DATA SvXMLTokenMapEntry aColAttrTokenMap[] = XML_TOKEN_MAP_END }; -static __FAR_DATA SvXMLTokenMapEntry aColSepAttrTokenMap[] = +static SvXMLTokenMapEntry aColSepAttrTokenMap[] = { { XML_NAMESPACE_STYLE, XML_WIDTH, XML_TOK_COLUMN_SEP_WIDTH }, { XML_NAMESPACE_STYLE, XML_COLOR, XML_TOK_COLUMN_SEP_COLOR }, { XML_NAMESPACE_STYLE, XML_HEIGHT, XML_TOK_COLUMN_SEP_HEIGHT }, { XML_NAMESPACE_STYLE, XML_VERTICAL_ALIGN, XML_TOK_COLUMN_SEP_ALIGN }, + { XML_NAMESPACE_STYLE, XML_STYLE, XML_TOK_COLUMN_SEP_STYLE }, XML_TOKEN_MAP_END }; -SvXMLEnumMapEntry __READONLY_DATA pXML_Sep_Align_Enum[] = +SvXMLEnumMapEntry const pXML_Sep_Style_Enum[] = +{ + { XML_NONE, 0 }, + { XML_SOLID, 1 }, + { XML_DOTTED, 2 }, + { XML_DASHED, 3 }, + { XML_TOKEN_INVALID, 0 } +}; + +SvXMLEnumMapEntry const pXML_Sep_Align_Enum[] = { { XML_TOP, VerticalAlignment_TOP }, { XML_MIDDLE, VerticalAlignment_MIDDLE }, @@ -180,6 +192,7 @@ class XMLTextColumnSepContext_Impl: public SvXMLImportContext sal_Int32 nWidth; sal_Int32 nColor; sal_Int8 nHeight; + sal_Int8 nStyle; VerticalAlignment eVertAlign; @@ -197,6 +210,7 @@ public: sal_Int32 GetWidth() const { return nWidth; } sal_Int32 GetColor() const { return nColor; } sal_Int8 GetHeight() const { return nHeight; } + sal_Int8 GetStyle() const { return nStyle; } VerticalAlignment GetVertAlign() const { return eVertAlign; } }; @@ -213,6 +227,7 @@ XMLTextColumnSepContext_Impl::XMLTextColumnSepContext_Impl( nWidth( 2 ), nColor( 0 ), nHeight( 100 ), + nStyle( 1 ), eVertAlign( VerticalAlignment_TOP ) { sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; @@ -256,6 +271,15 @@ XMLTextColumnSepContext_Impl::XMLTextColumnSepContext_Impl( eVertAlign = (VerticalAlignment)nAlign; } break; + case XML_TOK_COLUMN_SEP_STYLE: + { + sal_uInt16 nStyleVal; + if( GetImport().GetMM100UnitConverter(). + convertEnum( nStyleVal, rValue, + pXML_Sep_Style_Enum ) ) + nStyle = (sal_Int8)nStyleVal; + } + break; } } } @@ -286,6 +310,7 @@ XMLTextColumnsContext::XMLTextColumnsContext( , sSeparatorLineVerticalAlignment(RTL_CONSTASCII_USTRINGPARAM("SeparatorLineVerticalAlignment")) , sIsAutomatic(RTL_CONSTASCII_USTRINGPARAM("IsAutomatic")) , sAutomaticDistance(RTL_CONSTASCII_USTRINGPARAM("AutomaticDistance")) +, sSeparatorLineStyle(RTL_CONSTASCII_USTRINGPARAM("SeparatorLineStyle")) , pColumns( 0 ) , pColumnSep( 0 ) , pColumnAttrTokenMap( new SvXMLTokenMap(aColAttrTokenMap) ) @@ -477,6 +502,11 @@ void XMLTextColumnsContext::EndElement( ) xPropSet->setPropertyValue( sSeparatorLineRelativeHeight, aAny ); } + if ( pColumnSep->GetStyle() ) + { + aAny <<= pColumnSep->GetStyle(); + xPropSet->setPropertyValue( sSeparatorLineStyle, aAny ); + } aAny <<= pColumnSep->GetColor(); @@ -501,3 +531,5 @@ void XMLTextColumnsContext::EndElement( ) XMLElementPropertyContext::EndElement(); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTextColumnsExport.cxx b/xmloff/source/text/XMLTextColumnsExport.cxx index 695bdf47578f..a4c58f4651d9 100644 --- a/xmloff/source/text/XMLTextColumnsExport.cxx +++ b/xmloff/source/text/XMLTextColumnsExport.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. @@ -60,7 +61,8 @@ XMLTextColumnsExport::XMLTextColumnsExport( SvXMLExport& rExp ) : sSeparatorLineRelativeHeight(RTL_CONSTASCII_USTRINGPARAM("SeparatorLineRelativeHeight")), sSeparatorLineVerticalAlignment(RTL_CONSTASCII_USTRINGPARAM("SeparatorLineVerticalAlignment")), sIsAutomatic(RTL_CONSTASCII_USTRINGPARAM("IsAutomatic")), - sAutomaticDistance(RTL_CONSTASCII_USTRINGPARAM("AutomaticDistance")) + sAutomaticDistance(RTL_CONSTASCII_USTRINGPARAM("AutomaticDistance")), + sSeparatorLineStyle(RTL_CONSTASCII_USTRINGPARAM("SeparatorLineStyle")) { } @@ -132,12 +134,30 @@ void XMLTextColumnsExport::exportXML( const Any& rAny ) GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_HEIGHT, sValue.makeStringAndClear() ); + // style::style + aAny = xPropSet->getPropertyValue( sSeparatorLineStyle ); + sal_Int8 nStyle = 0; + aAny >>= nStyle; + + enum XMLTokenEnum eStr = XML_TOKEN_INVALID; + switch ( nStyle ) + { + case 0: eStr = XML_NONE; break; + case 1: eStr = XML_SOLID; break; + case 2: eStr = XML_DOTTED; break; + case 3: eStr = XML_DASHED; break; + default: + break; + } + if ( eStr != XML_TOKEN_INVALID ) + GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_STYLE, eStr ); + // style:vertical-align aAny = xPropSet->getPropertyValue( sSeparatorLineVerticalAlignment ); VerticalAlignment eVertAlign; aAny >>= eVertAlign; - enum XMLTokenEnum eStr = XML_TOKEN_INVALID; + eStr = XML_TOKEN_INVALID; switch( eVertAlign ) { // case VerticalAlignment_TOP: eStr = XML_TOP; @@ -187,3 +207,4 @@ void XMLTextColumnsExport::exportXML( const Any& rAny ) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx index 3216c6f05618..58023ef5849e 100644 --- a/xmloff/source/text/XMLTextFrameContext.cxx +++ b/xmloff/source/text/XMLTextFrameContext.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. @@ -120,7 +121,7 @@ inline XMLTextFrameContextHyperlink_Impl::XMLTextFrameContextHyperlink_Impl( { } -// --> OD 2009-07-22 #i73249# +// Implement Title/Description Elements UI (#i73249#) class XMLTextFrameTitleOrDescContext_Impl : public SvXMLImportContext { OUString& mrTitleOrDesc; @@ -158,7 +159,6 @@ void XMLTextFrameTitleOrDescContext_Impl::Characters( const OUString& rText ) { mrTitleOrDesc += rText; } -// <-- // ------------------------------------------------------------------------ @@ -382,11 +382,8 @@ class XMLTextFrameContext_Impl : public SvXMLImportContext const ::rtl::OUString sAnchorPageNo; const ::rtl::OUString sGraphicURL; const ::rtl::OUString sGraphicFilter; - // --> OD 2009-07-22 #i73249# -// const ::rtl::OUString sAlternativeText; const ::rtl::OUString sTitle; const ::rtl::OUString sDescription; - // <-- const ::rtl::OUString sFrameStyleName; const ::rtl::OUString sGraphicRotation; const ::rtl::OUString sTextBoxServiceName; @@ -462,9 +459,10 @@ public: const ::rtl::OUString& rName, const ::rtl::OUString& rTargetFrameName, sal_Bool bMap ); - // --> OD 2009-07-22 #i73249# + + // Implement Title/Description Elements UI (#i73249#) void SetTitle( const ::rtl::OUString& rTitle ); - // <-- + void SetDesc( const ::rtl::OUString& rDesc ); ::com::sun::star::text::TextContentAnchorType GetAnchorType() const { return eAnchorType; } @@ -833,11 +831,8 @@ XMLTextFrameContext_Impl::XMLTextFrameContext_Impl( , sAnchorPageNo(RTL_CONSTASCII_USTRINGPARAM("AnchorPageNo")) , sGraphicURL(RTL_CONSTASCII_USTRINGPARAM("GraphicURL")) , sGraphicFilter(RTL_CONSTASCII_USTRINGPARAM("GraphicFilter")) -// --> OD 2009-07-22 #i73249# -//, sAlternativeText(RTL_CONSTASCII_USTRINGPARAM("AlternativeText")) , sTitle(RTL_CONSTASCII_USTRINGPARAM("Title")) , sDescription(RTL_CONSTASCII_USTRINGPARAM("Description")) -// <-- , sFrameStyleName(RTL_CONSTASCII_USTRINGPARAM("FrameStyleName")) , sGraphicRotation(RTL_CONSTASCII_USTRINGPARAM("GraphicRotation")) , sTextBoxServiceName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextFrame")) @@ -1144,15 +1139,13 @@ SvXMLImportContext *XMLTextFrameContext_Impl::CreateChildContext( } } } - // --> OD 2009-08-17 #i100480# - // correction of condition which also avoids warnings. + // Correction of condition which also avoids warnings. (#i100480#) if( !pContext && ( XML_TEXT_FRAME_OBJECT == nType && ( ( XML_NAMESPACE_OFFICE == nPrefix && IsXMLToken( rLocalName, XML_DOCUMENT ) ) || ( XML_NAMESPACE_MATH == nPrefix && IsXMLToken( rLocalName, XML_MATH ) ) ) ) ) - // <-- { if( !xPropSet.is() && !bCreateFailed ) { @@ -1214,7 +1207,7 @@ void XMLTextFrameContext_Impl::Characters( const OUString& rChars ) if( bOwnBase64Stream && xBase64Stream.is() ) { OUString sChars; - if( sBase64CharsLeft ) + if( sBase64CharsLeft.getLength() ) { sChars = sBase64CharsLeft; sChars += sTrimmedChars; @@ -1282,7 +1275,7 @@ void XMLTextFrameContext_Impl::SetHyperlink( const OUString& rHRef, } } -// --> OD 2009-07-22 #i73249# +// Implement Title/Description Elements UI (#i73249#) void XMLTextFrameContext_Impl::SetTitle( const OUString& rTitle ) { if ( xPropSet.is() ) @@ -1306,7 +1299,6 @@ void XMLTextFrameContext_Impl::SetDesc( const OUString& rDesc ) } } } -// <-- //----------------------------------------------------------------------------------------------------- @@ -1345,14 +1337,12 @@ XMLTextFrameContext::XMLTextFrameContext( : SvXMLImportContext( rImport, nPrfx, rLName ) , m_xAttrList( new SvXMLAttributeList( xAttrList ) ) , m_pHyperlink( 0 ) -// --> OD 2009-07-22 #i73249# + // Implement Title/Description Elements UI (#i73249#) , m_sTitle() , m_sDesc() -// <-- , m_eDefaultAnchorType( eATyp ) - // --> OD 2006-03-10 #i51726# + // Shapes in Writer cannot be named via context menu (#i51726#) , m_HasAutomaticStyleWithoutParentStyle( sal_False ) - // <-- , m_bSupportsReplacement( sal_False ) { sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; @@ -1363,9 +1353,8 @@ XMLTextFrameContext::XMLTextFrameContext( OUString aLocalName; sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( rAttrName, &aLocalName ); - // --> OD 2006-03-10 #i51726# // New distinguish attribute between Writer objects and Draw objects is: - // Draw objects have an automatic style without a parent style + // Draw objects have an automatic style without a parent style (#i51726#) if ( XML_NAMESPACE_DRAW == nPrefix && IsXMLToken( aLocalName, XML_STYLE_NAME ) ) { @@ -1382,7 +1371,6 @@ XMLTextFrameContext::XMLTextFrameContext( } } } - // <-- else if ( XML_NAMESPACE_TEXT == nPrefix && IsXMLToken( aLocalName, XML_ANCHOR_TYPE ) ) { @@ -1411,11 +1399,6 @@ void XMLTextFrameContext::EndElement() { pImpl->CreateIfNotThere(); - // --> OD 2009-07-22 #i73249# -// // alternative text -// if( m_sDesc.getLength() ) -// pImpl->SetDesc( m_sDesc ); - // svg:title if( m_sTitle.getLength() ) { pImpl->SetTitle( m_sTitle ); @@ -1424,7 +1407,6 @@ void XMLTextFrameContext::EndElement() { pImpl->SetDesc( m_sDesc ); } - // <-- if( m_pHyperlink ) { @@ -1467,11 +1449,10 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext( if( USHRT_MAX != nFrameType ) { - // --> OD 2006-03-10 #i51726# + // Shapes in Writer cannot be named via context menu (#i51726#) if ( ( XML_TEXT_FRAME_TEXTBOX == nFrameType || XML_TEXT_FRAME_GRAPHIC == nFrameType ) && m_HasAutomaticStyleWithoutParentStyle ) - // <-- { Reference < XShapes > xShapes; pContext = GetImport().GetShapeImport()->CreateFrameChildContext( @@ -1542,11 +1523,7 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext( // the child is a writer frame if( XML_NAMESPACE_SVG == p_nPrefix ) { - // --> OD 2009-07-22 #i73249# -// bool bOld = SvXMLImport::OOo_2x >= GetImport().getGeneratorVersion(); -// if( IsXMLToken( rLocalName, bOld ? XML_DESC : XML_TITLE ) ) -// pContext = new XMLTextFrameDescContext_Impl( GetImport(), p_nPrefix, rLocalName, -// xAttrList, m_sDesc ); + // Implement Title/Description Elements UI (#i73249#) const bool bOld = SvXMLImport::OOo_2x >= GetImport().getGeneratorVersion(); if ( bOld ) { @@ -1575,7 +1552,6 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext( m_sDesc ); } } - // <-- } else if( XML_NAMESPACE_DRAW == p_nPrefix ) { @@ -1665,7 +1641,6 @@ Reference < XTextContent > XMLTextFrameContext::GetTextContent() const return xTxtCntnt; } -// --> OD 2004-08-24 #33242# Reference < XShape > XMLTextFrameContext::GetShape() const { Reference < XShape > xShape; @@ -1678,4 +1653,5 @@ Reference < XShape > XMLTextFrameContext::GetShape() const return xShape; } -// <-- + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTextFrameContext.hxx b/xmloff/source/text/XMLTextFrameContext.hxx index 5b9b59c42671..1168bf3ffc1d 100644 --- a/xmloff/source/text/XMLTextFrameContext.hxx +++ b/xmloff/source/text/XMLTextFrameContext.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. @@ -28,9 +29,7 @@ #ifndef _XMLTEXTFRAMECONTEXT_HXX #define _XMLTEXTFRAMECONTEXT_HXX -#ifndef _COM_SUN_STAR_TEXT_TEXTCONTENTANCHORTYPE_HPP #include <com/sun/star/text/TextContentAnchorType.hpp> -#endif #include <xmloff/xmlictxt.hxx> namespace com { namespace sun { namespace star { @@ -50,20 +49,19 @@ class XMLTextFrameContext : public SvXMLImportContext SvXMLAttributeList *m_pAttrList; XMLTextFrameContextHyperlink_Impl *m_pHyperlink; - // --> OD 2009-07-22 #i73249# + // Implement Title/Description Elements UI (#i73249#) ::rtl::OUString m_sTitle; - // <-- ::rtl::OUString m_sDesc; ::com::sun::star::text::TextContentAnchorType m_eDefaultAnchorType; - // --> OD 2006-03-10 #i51726# - // The <draw:name> can longer be used to distinguish Writer graphic/text box - // objects and Draw graphic/text box objects. - // The new distinguish attribute is the parent style of the automatic style - // of the object. All Draw objects have an automatic style without a parent style. + /* The <draw:name> can longer be used to distinguish Writer graphic/text box + objects and Draw graphic/text box objects. + The new distinguish attribute is the parent style of the automatic style + of the object. All Draw objects have an automatic style without a parent style. + (#i51726#) + */ sal_Bool m_HasAutomaticStyleWithoutParentStyle; - // <-- sal_Bool m_bSupportsReplacement; sal_Bool CreateIfNotThere(); @@ -98,11 +96,13 @@ public: ::com::sun::star::uno::Reference < ::com::sun::star::text::XTextContent > GetTextContent() const; - // --> OD 2004-08-24 #i33242# + + // Frame "to character": anchor moves from first to last char after saving (#i33242#) ::com::sun::star::uno::Reference < ::com::sun::star::drawing::XShape > GetShape() const; - // <-- }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx b/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx index 15cc68c9e675..b63aa46ef4d9 100644 --- a/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx +++ b/xmloff/source/text/XMLTextFrameHyperlinkContext.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. @@ -88,7 +89,7 @@ XMLTextFrameHyperlinkContext::XMLTextFrameHyperlinkContext( break; case XML_TOK_TEXT_HYPERLINK_SERVER_MAP: { - sal_Bool bTmp; + bool bTmp; if( rImport.GetMM100UnitConverter().convertBool( bTmp, rValue ) ) { @@ -171,7 +172,7 @@ Reference < XTextContent > XMLTextFrameHyperlinkContext::GetTextContent() const return xTxt; } -// --> OD 2004-08-24 #33242# +// Frame "to character": anchor moves from first to last char after saving (#i33242#) Reference < drawing::XShape > XMLTextFrameHyperlinkContext::GetShape() const { Reference < drawing::XShape > xShape; @@ -183,6 +184,5 @@ Reference < drawing::XShape > XMLTextFrameHyperlinkContext::GetShape() const return xShape; } -// <-- - +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTextFrameHyperlinkContext.hxx b/xmloff/source/text/XMLTextFrameHyperlinkContext.hxx index 312f8268945c..0ba1ca1c9523 100644 --- a/xmloff/source/text/XMLTextFrameHyperlinkContext.hxx +++ b/xmloff/source/text/XMLTextFrameHyperlinkContext.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. @@ -28,12 +29,8 @@ #ifndef _XMLTEXTFRAMEHYPERLINKCONTEXT_HXX #define _XMLTEXTFRAMEHYPERLINKCONTEXT_HXX -#ifndef _COM_SUN_STAR_TEXT_TEXTCONTENTANCHORTYPE_HPP #include <com/sun/star/text/TextContentAnchorType.hpp> -#endif -#ifndef _COM_SUN_STAR_TEXT_XTEXTFRAME_HPP #include <com/sun/star/text/XTextFrame.hpp> -#endif #include <xmloff/xmlictxt.hxx> namespace com { namespace sun { namespace star { @@ -73,13 +70,16 @@ public: ::com::sun::star::xml::sax::XAttributeList > & xAttrList ); ::com::sun::star::text::TextContentAnchorType GetAnchorType() const; + ::com::sun::star::uno::Reference < ::com::sun::star::text::XTextContent > GetTextContent() const; - // --> OD 2004-08-24 #i33242# + + // Frame "to character": anchor moves from first to last char after saving (#i33242#) ::com::sun::star::uno::Reference < ::com::sun::star::drawing::XShape > GetShape() const; - // <-- }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTextHeaderFooterContext.cxx b/xmloff/source/text/XMLTextHeaderFooterContext.cxx index de74248f787b..640fcca8e4af 100644 --- a/xmloff/source/text/XMLTextHeaderFooterContext.cxx +++ b/xmloff/source/text/XMLTextHeaderFooterContext.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,9 +33,7 @@ #include <xmloff/nmspmap.hxx> #include "xmloff/xmlnmspe.hxx" #include "XMLTextHeaderFooterContext.hxx" -#ifndef _XMLOFF_TEXTTABLECONTEXT_HXX_ #include <xmloff/XMLTextTableContext.hxx> -#endif #include <xmloff/xmlimp.hxx> @@ -44,12 +43,8 @@ using ::rtl::OUStringBuffer; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::xml::sax; -//using namespace ::com::sun::star::style; using namespace ::com::sun::star::text; using namespace ::com::sun::star::beans; -//using namespace ::com::sun::star::container; -//using namespace ::com::sun::star::lang; -//using namespace ::com::sun::star::text; TYPEINIT1( XMLTextHeaderFooterContext, SvXMLImportContext ); @@ -62,12 +57,12 @@ XMLTextHeaderFooterContext::XMLTextHeaderFooterContext( SvXMLImport& rImport, sa sal_Bool bFooter, sal_Bool bLft ) : SvXMLImportContext( rImport, nPrfx, rLName ), xPropSet( rPageStylePropSet ), - sOn( OUString::createFromAscii( bFooter ? "FooterIsOn" : "HeaderIsOn" ) ), - sShareContent( OUString::createFromAscii( bFooter ? "FooterIsShared" - : "HeaderIsShared" ) ), - sText( OUString::createFromAscii( bFooter ? "FooterText" : "HeaderText" ) ), - sTextLeft( OUString::createFromAscii( bFooter ? "FooterTextLeft" - : "HeaderTextLeft" ) ), + sOn( bFooter ? OUString(RTL_CONSTASCII_USTRINGPARAM( "FooterIsOn" )) : OUString(RTL_CONSTASCII_USTRINGPARAM( "HeaderIsOn" )) ), + sShareContent( bFooter ? OUString(RTL_CONSTASCII_USTRINGPARAM( "FooterIsShared" )) + : OUString(RTL_CONSTASCII_USTRINGPARAM( "HeaderIsShared" )) ), + sText( bFooter ? OUString(RTL_CONSTASCII_USTRINGPARAM( "FooterText" )) : OUString(RTL_CONSTASCII_USTRINGPARAM( "HeaderText" )) ), + sTextLeft( bFooter ? OUString(RTL_CONSTASCII_USTRINGPARAM( "FooterTextLeft" )) + : OUString(RTL_CONSTASCII_USTRINGPARAM( "HeaderTextLeft" )) ), bInsertContent( sal_True ), bLeft( bLft ) { @@ -196,3 +191,4 @@ void XMLTextHeaderFooterContext::EndElement() } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTextListAutoStylePool.cxx b/xmloff/source/text/XMLTextListAutoStylePool.cxx index 6bf7ba3ecdba..69d886dd1f99 100644 --- a/xmloff/source/text/XMLTextListAutoStylePool.cxx +++ b/xmloff/source/text/XMLTextListAutoStylePool.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. @@ -317,3 +318,4 @@ void XMLTextListAutoStylePool::exportXML() const } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTextListBlockContext.cxx b/xmloff/source/text/XMLTextListBlockContext.cxx index 25b0ba3078ea..1991670ee3cf 100644 --- a/xmloff/source/text/XMLTextListBlockContext.cxx +++ b/xmloff/source/text/XMLTextListBlockContext.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,20 +65,13 @@ XMLTextListBlockContext::XMLTextListBlockContext( const sal_Bool bRestartNumberingAtSubList ) : SvXMLImportContext( rImport, nPrfx, rLName ) , mrTxtImport( rTxtImp ) -// --> OD 2008-04-22 #refactorlists# , msListStyleName() -// <-- , mxParentListBlock( ) , mnLevel( 0 ) -// --> OD 2008-05-07 #refactorlists# -//, mbRestartNumbering( sal_True ) , mbRestartNumbering( sal_False ) -// <-- , mbSetDefaults( sal_False ) -// --> OD 2008-04-22 #refactorlists# , msListId() , msContinueListId() -// <-- { static ::rtl::OUString s_PropNameDefaultListId( RTL_CONSTASCII_USTRINGPARAM("DefaultListId")); @@ -92,9 +86,6 @@ XMLTextListBlockContext::XMLTextListBlockContext( // Inherit style name from parent list, as well as the flags whether // numbering must be restarted and formats have to be created. OUString sParentListStyleName; - // --> OD 2008-11-27 #158694# - sal_Bool bParentRestartNumbering( sal_False ); - // <-- if( mxParentListBlock.Is() ) { XMLTextListBlockContext *pParent = @@ -103,26 +94,16 @@ XMLTextListBlockContext::XMLTextListBlockContext( sParentListStyleName = msListStyleName; mxNumRules = pParent->GetNumRules(); mnLevel = pParent->GetLevel() + 1; - // --> OD 2008-05-07 #refactorlists# -// mbRestartNumbering = pParent->IsRestartNumbering(); mbRestartNumbering = pParent->IsRestartNumbering() || bRestartNumberingAtSubList; - // <-- - // --> OD 2008-11-27 #158694# - bParentRestartNumbering = pParent->IsRestartNumbering(); - // <-- mbSetDefaults = pParent->mbSetDefaults; - // --> OD 2008-04-22 #refactorlists# msListId = pParent->GetListId(); msContinueListId = pParent->GetContinueListId(); - // <-- } const SvXMLTokenMap& rTokenMap = mrTxtImport.GetTextListBlockAttrTokenMap(); - // --> OD 2008-05-07 #refactorlists# bool bIsContinueNumberingAttributePresent( false ); - // <-- sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) { @@ -138,23 +119,19 @@ XMLTextListBlockContext::XMLTextListBlockContext( case XML_TOK_TEXT_LIST_BLOCK_XMLID: sXmlId = rValue; //FIXME: there is no UNO API for lists - // --> OD 2008-07-31 #i92221# - xml:id is also the list ID + // xml:id is also the list ID (#i92221#) if ( mnLevel == 0 ) // root <list> element { msListId = rValue; } - // <-- break; case XML_TOK_TEXT_LIST_BLOCK_CONTINUE_NUMBERING: mbRestartNumbering = !IsXMLToken(rValue, XML_TRUE); - // --> OD 2008-05-07 #refactorlists# bIsContinueNumberingAttributePresent = true; - // <-- break; case XML_TOK_TEXT_LIST_BLOCK_STYLE_NAME: msListStyleName = rValue; break; - // --> OD 2008-04-22 #refactorlists# case XML_TOK_TEXT_LIST_BLOCK_CONTINUE_LIST: if ( mnLevel == 0 ) // root <list> element { @@ -170,11 +147,10 @@ XMLTextListBlockContext::XMLTextListBlockContext( if( !mxNumRules.is() ) return; - // --> OD 2008-04-23 #refactorlists# if ( mnLevel == 0 ) // root <list> element { XMLTextListsHelper& rTextListsHelper( mrTxtImport.GetTextListHelper() ); - // --> OD 2008-08-15 #i92811# + // Inconsistent behavior regarding lists (#i92811#) ::rtl::OUString sListStyleDefaultListId; { uno::Reference< beans::XPropertySet > xNumRuleProps( mxNumRules, UNO_QUERY ); @@ -193,7 +169,6 @@ XMLTextListBlockContext::XMLTextListBlockContext( } } } - // <-- if ( msListId.getLength() == 0 ) // no text:id property found { sal_Int32 nUPD( 0 ); @@ -202,9 +177,10 @@ XMLTextListBlockContext::XMLTextListBlockContext( if ( rImport.IsTextDocInOOoFileFormat() || ( bBuildIdFound && nUPD == 680 ) ) { - // handling former documents written by OpenOffice.org: - // use default list id of numbering rules instance, if existing - // --> OD 2008-08-15 #i92811# + /* handling former documents written by OpenOffice.org: + use default list id of numbering rules instance, if existing + (#i92811#) + */ if ( sListStyleDefaultListId.getLength() != 0 ) { msListId = sListStyleDefaultListId; @@ -215,7 +191,6 @@ XMLTextListBlockContext::XMLTextListBlockContext( mbRestartNumbering = sal_True; } } - // <-- } if ( msListId.getLength() == 0 ) { @@ -259,14 +234,12 @@ XMLTextListBlockContext::XMLTextListBlockContext( if ( !rTextListsHelper.IsListProcessed( msListId ) ) { - // --> OD 2008-08-15 #i92811# + // Inconsistent behavior regarding lists (#i92811#) rTextListsHelper.KeepListAsProcessed( msListId, msListStyleName, msContinueListId, sListStyleDefaultListId ); - // <-- } } - // <-- // Remember this list block. mrTxtImport.GetTextListHelper().PushListContext( this ); @@ -322,7 +295,6 @@ SvXMLImportContext *XMLTextListBlockContext::CreateChildContext( return pContext; } -// --> OD 2008-04-22 #refactorlists# const ::rtl::OUString& XMLTextListBlockContext::GetListId() const { return msListId; @@ -332,5 +304,5 @@ const ::rtl::OUString& XMLTextListBlockContext::GetContinueListId() const { return msContinueListId; } -// <-- +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTextListBlockContext.hxx b/xmloff/source/text/XMLTextListBlockContext.hxx index bd8011b631f7..ba47769abc94 100644 --- a/xmloff/source/text/XMLTextListBlockContext.hxx +++ b/xmloff/source/text/XMLTextListBlockContext.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. @@ -50,18 +51,15 @@ class XMLTextListBlockContext : public SvXMLImportContext sal_Bool mbRestartNumbering; sal_Bool mbSetDefaults; - // --> OD 2008-04-22 #refactorlists# // text:id property of <list> element, only valid for root <list> element ::rtl::OUString msListId; // text:continue-list property of <list> element, only valid for root <list> element ::rtl::OUString msContinueListId; - // <-- public: TYPEINFO(); - // --> OD 2008-05-07 #refactorlists# // add optional parameter <bRestartNumberingAtSubList> XMLTextListBlockContext( SvXMLImport& rImport, @@ -71,7 +69,6 @@ public: const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList, const sal_Bool bRestartNumberingAtSubList = sal_False ); - // <-- virtual ~XMLTextListBlockContext(); virtual void EndElement(); @@ -90,12 +87,11 @@ public: ::com::sun::star::container::XIndexReplace >& GetNumRules() const { return mxNumRules; } - // --> OD 2008-04-22 #refactorlists# const ::rtl::OUString& GetListId() const; const ::rtl::OUString& GetContinueListId() const; - // <-- - }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTextListItemContext.cxx b/xmloff/source/text/XMLTextListItemContext.cxx index d8effc0180de..47a5fa025df6 100644 --- a/xmloff/source/text/XMLTextListItemContext.cxx +++ b/xmloff/source/text/XMLTextListItemContext.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. @@ -36,15 +37,11 @@ #include "txtlists.hxx" #include "XMLTextListBlockContext.hxx" #include <xmloff/txtimp.hxx> -// --> OD 2008-05-08 #refactorlists# #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/style/XStyle.hpp> #include <xmloff/xmlnumi.hxx> -// <-- - #include "XMLTextListItemContext.hxx" - using ::rtl::OUString; using ::rtl::OUStringBuffer; @@ -64,10 +61,8 @@ XMLTextListItemContext::XMLTextListItemContext( : SvXMLImportContext( rImport, nPrfx, rLName ), rTxtImport( rTxtImp ), nStartValue( -1 ), - // --> OD 2008-05-07 #refactorlists# mnSubListCount( 0 ), mxNumRulesOverride() - // <-- { static ::rtl::OUString s_NumberingRules( RTL_CONSTASCII_USTRINGPARAM("NumberingRules")); @@ -88,7 +83,6 @@ XMLTextListItemContext::XMLTextListItemContext( if( nTmp >= 0 && nTmp <= SHRT_MAX ) nStartValue = (sal_Int16)nTmp; } - // --> OD 2008-05-08 #refactorlists# else if ( nPrefix == XML_NAMESPACE_TEXT && IsXMLToken( aLocalName, XML_STYLE_OVERRIDE ) ) { @@ -126,7 +120,6 @@ XMLTextListItemContext::XMLTextListItemContext( } } } - // <-- else if ( (XML_NAMESPACE_XML == nPrefix) && IsXMLToken(aLocalName, XML_ID) ) { @@ -175,16 +168,11 @@ SvXMLImportContext *XMLTextListItemContext::CreateChildContext( break; case XML_TOK_TEXT_LIST: - // --> OD 2008-05-07 #refactorlists# -// pContext = new XMLTextListBlockContext( GetImport(), rTxtImport, -// nPrefix, rLocalName, -// xAttrList ); ++mnSubListCount; pContext = new XMLTextListBlockContext( GetImport(), rTxtImport, nPrefix, rLocalName, xAttrList, (mnSubListCount > 1) ); - // <-- break; } @@ -194,4 +182,4 @@ SvXMLImportContext *XMLTextListItemContext::CreateChildContext( return pContext; } - +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTextListItemContext.hxx b/xmloff/source/text/XMLTextListItemContext.hxx index 81441a95880b..2644a38513a9 100644 --- a/xmloff/source/text/XMLTextListItemContext.hxx +++ b/xmloff/source/text/XMLTextListItemContext.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. @@ -38,13 +39,11 @@ class XMLTextListItemContext : public SvXMLImportContext sal_Int16 nStartValue; - // --> OD 2008-05-07 #refactorlists# // quantity of <text:list> child elements sal_Int16 mnSubListCount; // list style instance for text::style-override property ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexReplace > mxNumRulesOverride; - // <-- public: @@ -70,7 +69,6 @@ public: sal_Bool HasStartValue() const { return -1 != nStartValue; } sal_Int16 GetStartValue() const { return nStartValue; } - // --> OD 2008-05-08 #refactorlists# inline sal_Bool HasNumRulesOverride() const { return mxNumRulesOverride.is(); @@ -84,3 +82,5 @@ public: #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTextMarkImportContext.cxx b/xmloff/source/text/XMLTextMarkImportContext.cxx index e9db515955c1..ace0f99bc900 100644 --- a/xmloff/source/text/XMLTextMarkImportContext.cxx +++ b/xmloff/source/text/XMLTextMarkImportContext.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,6 +65,8 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::xml::sax; using namespace ::xmloff::token; +using rtl::OUString; + XMLFieldParamImportContext::XMLFieldParamImportContext( SvXMLImport& rImport, @@ -125,7 +128,7 @@ enum lcl_MarkType { TypeReference, TypeReferenceStart, TypeReferenceEnd, TypeFieldmark, TypeFieldmarkStart, TypeFieldmarkEnd }; -static SvXMLEnumMapEntry __READONLY_DATA lcl_aMarkTypeMap[] = +static SvXMLEnumMapEntry const lcl_aMarkTypeMap[] = { { XML_REFERENCE_MARK, TypeReference }, { XML_REFERENCE_MARK_START, TypeReferenceStart }, @@ -144,11 +147,13 @@ static const char *lcl_getFormFieldmarkName(rtl::OUString &name) { static const char sCheckbox[]=ODF_FORMCHECKBOX; static const char sFormDropDown[]=ODF_FORMDROPDOWN; - if (name.compareToAscii("msoffice.field.FORMCHECKBOX")==0) + if (name.compareToAscii("msoffice.field.FORMCHECKBOX")==0 || + name.compareToAscii("ecma.office-open-xml.field.FORMCHECKBOX")==0) return sCheckbox; else if (name.compareToAscii(ODF_FORMCHECKBOX)==0) return sCheckbox; - if (name.compareToAscii(ODF_FORMDROPDOWN)==0) + if (name.compareToAscii(ODF_FORMDROPDOWN)==0 || + name.compareToAscii("ecma.office-open-xml.field.FORMDROPDOWN")==0) return sFormDropDown; else return NULL; @@ -157,7 +162,8 @@ static const char *lcl_getFormFieldmarkName(rtl::OUString &name) static rtl::OUString lcl_getFieldmarkName(rtl::OUString &name) { static const char sFormtext[]=ODF_FORMTEXT; - if (name.compareToAscii("msoffice.field.FORMTEXT")==0) + if (name.compareToAscii("msoffice.field.FORMTEXT")==0 || + name.compareToAscii("ecma.office-open-xml.field.FORMTEXT")==0) return rtl::OUString::createFromAscii(sFormtext); else if (name.compareToAscii(ODF_FORMTEXT)==0) return rtl::OUString::createFromAscii(sFormtext); @@ -183,7 +189,7 @@ void XMLTextMarkImportContext::StartElement( { if (m_sBookmarkName.getLength() == 0) { - m_sBookmarkName = ::rtl::OUString::createFromAscii("Unknown"); + m_sBookmarkName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown")); } m_rHelper.pushFieldCtx( m_sBookmarkName, m_sFieldName ); } @@ -343,11 +349,11 @@ void XMLTextMarkImportContext::EndElement() case TypeReferenceStart: case TypeReferenceEnd: - DBG_ERROR("reference start/end are handled in txtparai !"); + OSL_FAIL("reference start/end are handled in txtparai !"); break; default: - DBG_ERROR("unknown mark type"); + OSL_FAIL("unknown mark type"); break; } } @@ -381,7 +387,7 @@ Reference<XTextContent> XMLTextMarkImportContext::CreateAndInsertMark( if (!xIfc.is()) { - OSL_ENSURE(false, "CreateAndInsertMark: cannot create service?"); + OSL_FAIL("CreateAndInsertMark: cannot create service?"); return 0; } @@ -395,7 +401,7 @@ Reference<XTextContent> XMLTextMarkImportContext::CreateAndInsertMark( { if (sMarkName.getLength()) { - OSL_ENSURE(false, "name given, but XNamed not supported?"); + OSL_FAIL("name given, but XNamed not supported?"); return 0; } } @@ -418,7 +424,7 @@ Reference<XTextContent> XMLTextMarkImportContext::CreateAndInsertMark( } catch (com::sun::star::lang::IllegalArgumentException &) { - OSL_ENSURE(false, "CreateAndInsertMark: cannot insert?"); + OSL_FAIL("CreateAndInsertMark: cannot insert?"); return 0; } } @@ -483,3 +489,4 @@ sal_Bool XMLTextMarkImportContext::FindName( return bNameOK; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTextMarkImportContext.hxx b/xmloff/source/text/XMLTextMarkImportContext.hxx index cfd7a43284bf..5742fae877a6 100644 --- a/xmloff/source/text/XMLTextMarkImportContext.hxx +++ b/xmloff/source/text/XMLTextMarkImportContext.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. @@ -122,3 +123,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTextMasterPageContext.cxx b/xmloff/source/text/XMLTextMasterPageContext.cxx index ba097f542098..313a140b70ba 100644 --- a/xmloff/source/text/XMLTextMasterPageContext.cxx +++ b/xmloff/source/text/XMLTextMasterPageContext.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. @@ -51,7 +52,6 @@ using namespace ::com::sun::star::text; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -//using namespace ::com::sun::star::text; using namespace ::xmloff::token; Reference < XStyle > XMLTextMasterPageContext::Create() @@ -291,3 +291,5 @@ void XMLTextMasterPageContext::Finish( sal_Bool bOverwrite ) } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTextMasterPageExport.cxx b/xmloff/source/text/XMLTextMasterPageExport.cxx index dbffabc3d920..d02d26a556cc 100644 --- a/xmloff/source/text/XMLTextMasterPageExport.cxx +++ b/xmloff/source/text/XMLTextMasterPageExport.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. @@ -183,3 +184,4 @@ void XMLTextMasterPageExport::exportMasterPageContent( } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTextMasterStylesContext.cxx b/xmloff/source/text/XMLTextMasterStylesContext.cxx index 38428dabb8d1..f6d211a358e1 100644 --- a/xmloff/source/text/XMLTextMasterStylesContext.cxx +++ b/xmloff/source/text/XMLTextMasterStylesContext.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,12 +36,8 @@ #include <xmloff/xmltoken.hxx> #include <xmloff/nmspmap.hxx> -#ifndef _XMLTEXTMASTERPAGECONTEXT_HXX #include <xmloff/XMLTextMasterPageContext.hxx> -#endif -#ifndef _XMLTEXTMASTERSTYLESCONTEXT_HXX #include <xmloff/XMLTextMasterStylesContext.hxx> -#endif using ::rtl::OUString; using ::rtl::OUStringBuffer; @@ -100,3 +97,5 @@ SvXMLStyleContext *XMLTextMasterStylesContext::CreateStyleStyleChildContext( { return 0; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTextNumRuleInfo.cxx b/xmloff/source/text/XMLTextNumRuleInfo.cxx index cbb0d976a836..f9e0912b9b79 100644 --- a/xmloff/source/text/XMLTextNumRuleInfo.cxx +++ b/xmloff/source/text/XMLTextNumRuleInfo.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 <com/sun/star/style/NumberingType.hpp> #include <com/sun/star/container/XNamed.hpp> #include "XMLTextNumRuleInfo.hxx" -// --> OD 2008-04-25 #refactorlists# #include "xmloff/XMLTextListAutoStylePool.hxx" -// <-- using ::rtl::OUString; @@ -46,7 +45,6 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; using namespace ::com::sun::star::style; -// --> OD 2008-05-08 #refactorlists# // Complete refactoring of the class and enhancement of the class for lists. XMLTextNumRuleInfo::XMLTextNumRuleInfo() : msNumberingRules(RTL_CONSTASCII_USTRINGPARAM("NumberingRules")) @@ -57,10 +55,8 @@ XMLTextNumRuleInfo::XMLTextNumRuleInfo() , msNumberingIsOutline(RTL_CONSTASCII_USTRINGPARAM("NumberingIsOutline")) , msPropNameListId(RTL_CONSTASCII_USTRINGPARAM("ListId")) , msPropNameStartWith(RTL_CONSTASCII_USTRINGPARAM("StartWith")) - // --> OD 2008-11-26 #158694# , msContinueingPreviousSubTree(RTL_CONSTASCII_USTRINGPARAM("ContinueingPreviousSubTree")) , msListLabelStringProp(RTL_CONSTASCII_USTRINGPARAM("ListLabelString")) - // <-- , mxNumRules() , msNumRulesName() , msListId() @@ -74,20 +70,17 @@ XMLTextNumRuleInfo::XMLTextNumRuleInfo() Reset(); } -// --> OD 2006-09-27 #i69627# +// Written OpenDocument file format doesn't fit to the created text document (#i69627#) void XMLTextNumRuleInfo::Set( const ::com::sun::star::uno::Reference < ::com::sun::star::text::XTextContent > & xTextContent, const sal_Bool bOutlineStyleAsNormalListStyle, const XMLTextListAutoStylePool& rListAutoPool, - // --> OD 2008-11-26 #158694# const sal_Bool bExportTextNumberElement ) - // <-- { Reset(); - // --> OD 2006-09-27 #i69627# + // Written OpenDocument file format doesn't fit to the created text document (#i69627#) mbOutlineStyleAsNormalListStyle = bOutlineStyleAsNormalListStyle; - // <-- Reference< XPropertySet > xPropSet( xTextContent, UNO_QUERY ); Reference< XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo(); @@ -110,7 +103,7 @@ void XMLTextNumRuleInfo::Set( mnListLevel = 0; } - // --> OD 2008-12-17 #i97312# + // Assertion saving writer document (#i97312#) if ( mxNumRules.is() && mxNumRules->getCount() < 1 ) { DBG_ASSERT( false, @@ -118,9 +111,7 @@ void XMLTextNumRuleInfo::Set( Reset(); return; } - // <-- - // --> OD 2010-01-13 #b6912256# if ( mnListLevel < 0 ) { DBG_ASSERT( false, @@ -129,7 +120,7 @@ void XMLTextNumRuleInfo::Set( return; } - // --> OD 2006-09-27 #i69627# + // Written OpenDocument file format doesn't fit to the created text document (#i69627#) bool bSuppressListStyle( false ); if ( mxNumRules.is() ) { @@ -148,7 +139,6 @@ void XMLTextNumRuleInfo::Set( } if( mxNumRules.is() && !bSuppressListStyle ) - // <-- { // First try to find the numbering rules in the list auto style pool. // If not found, the numbering rules instance has to be named. @@ -171,20 +161,18 @@ void XMLTextNumRuleInfo::Set( xPropSet->getPropertyValue( msPropNameListId ) >>= msListId; } - // --> OD 2008-11-26 #158694# mbContinueingPreviousSubTree = sal_False; if( xPropSetInfo->hasPropertyByName( msContinueingPreviousSubTree ) ) { xPropSet->getPropertyValue( msContinueingPreviousSubTree ) >>= mbContinueingPreviousSubTree; } - // <-- mbIsNumbered = sal_True; if( xPropSetInfo->hasPropertyByName( msNumberingIsNumber ) ) { if( !(xPropSet->getPropertyValue( msNumberingIsNumber ) >>= mbIsNumbered ) ) { - OSL_ENSURE( false, "numbered paragraph without number info" ); + OSL_FAIL( "numbered paragraph without number info" ); mbIsNumbered = sal_False; } } @@ -224,14 +212,12 @@ void XMLTextNumRuleInfo::Set( } } - // --> OD 2008-11-26 #158694# msListLabelString = ::rtl::OUString(); if ( bExportTextNumberElement && xPropSetInfo->hasPropertyByName( msListLabelStringProp ) ) { xPropSet->getPropertyValue( msListLabelStringProp ) >>= msListLabelString; } - // <-- // paragraph's list level range is [0..9] representing list levels [1..10] ++mnListLevel; @@ -258,4 +244,5 @@ sal_Bool XMLTextNumRuleInfo::BelongsToSameList( const XMLTextNumRuleInfo& rCmp ) return bRet; } -// <-- + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTextNumRuleInfo.hxx b/xmloff/source/text/XMLTextNumRuleInfo.hxx index 52879b7d8a60..d03370eb6feb 100644 --- a/xmloff/source/text/XMLTextNumRuleInfo.hxx +++ b/xmloff/source/text/XMLTextNumRuleInfo.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. @@ -54,10 +55,8 @@ class XMLTextNumRuleInfo const ::rtl::OUString msNumberingIsOutline; const ::rtl::OUString msPropNameListId; const ::rtl::OUString msPropNameStartWith; - // --> OD 2008-11-26 #158694# const ::rtl::OUString msContinueingPreviousSubTree; const ::rtl::OUString msListLabelStringProp; - // <-- // numbering rules instance and its name ::com::sun::star::uno::Reference < @@ -72,31 +71,25 @@ class XMLTextNumRuleInfo sal_Bool mbIsRestart; // numbering rules' attributes - // --> OD 2008-05-07 #refactorlists# sal_Int16 mnListLevelStartValue; - // <-- - // --> OD 2006-09-27 #i69627# + // Written OpenDocument file format doesn't fit to the created text document (#i69627#) sal_Bool mbOutlineStyleAsNormalListStyle; - // <-- - // --> OD 2008-11-26 #158694# sal_Bool mbContinueingPreviousSubTree; ::rtl::OUString msListLabelString; - // <-- + public: XMLTextNumRuleInfo(); inline XMLTextNumRuleInfo& operator=( const XMLTextNumRuleInfo& rInfo ); - // --> OD 2008-11-26 #158694# void Set( const ::com::sun::star::uno::Reference < ::com::sun::star::text::XTextContent > & rTextContnt, const sal_Bool bOutlineStyleAsNormalListStyle, const XMLTextListAutoStylePool& rListAutoPool, const sal_Bool bExportTextNumberElement ); - // <-- inline void Reset(); inline const ::rtl::OUString& GetNumRulesName() const @@ -148,7 +141,6 @@ public: return rCmp.msNumRulesName == msNumRulesName; } - // --> OD 2008-11-26 #158694# inline sal_Bool IsContinueingPreviousSubTree() const { return mbContinueingPreviousSubTree; @@ -157,7 +149,6 @@ public: { return msListLabelString; } - // <-- }; inline XMLTextNumRuleInfo& XMLTextNumRuleInfo::operator=( @@ -170,13 +161,10 @@ inline XMLTextNumRuleInfo& XMLTextNumRuleInfo::operator=( mnListLevel = rInfo.mnListLevel; mbIsNumbered = rInfo.mbIsNumbered; mbIsRestart = rInfo.mbIsRestart; - // --> OD 2006-09-27 #i69627# + // Written OpenDocument file format doesn't fit to the created text document (#i69627#) mbOutlineStyleAsNormalListStyle = rInfo.mbOutlineStyleAsNormalListStyle; - // <-- - // --> OD 2008-11-26 #158694# mbContinueingPreviousSubTree = rInfo.mbContinueingPreviousSubTree; msListLabelString = rInfo.msListLabelString; - // <-- return *this; } @@ -188,13 +176,12 @@ inline void XMLTextNumRuleInfo::Reset() msListId = ::rtl::OUString(); mnListStartValue = -1; mnListLevel = 0; - // --> OD 2006-09-27 #i69627# + // Written OpenDocument file format doesn't fit to the created text document (#i69627#) mbIsNumbered = mbIsRestart = mbOutlineStyleAsNormalListStyle = sal_False; - // <-- - // --> OD 2008-11-26 #158694# mbContinueingPreviousSubTree = sal_False; msListLabelString = ::rtl::OUString(); - // <-- } #endif // _XMLOFF_XMLTEXTNUMRULEINFO_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTextPropertySetContext.cxx b/xmloff/source/text/XMLTextPropertySetContext.cxx index 31c5777f4d57..555d7b688745 100644 --- a/xmloff/source/text/XMLTextPropertySetContext.cxx +++ b/xmloff/source/text/XMLTextPropertySetContext.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,13 +34,9 @@ #include "XMLBackgroundImageContext.hxx" #include "XMLSectionFootnoteConfigImport.hxx" -#ifndef _XMLOFF_TXTPRMAP_HXX #include <xmloff/txtprmap.hxx> -#endif #include "xmltabi.hxx" -#ifndef _XMLOFF_TXTDROPI_HXX #include "txtdropi.hxx" -#endif using ::rtl::OUString; @@ -82,14 +79,9 @@ SvXMLImportContext *XMLTextPropertySetContext::CreateChildContext( rProperties ); break; case CTF_TEXTCOLUMNS: -#ifndef SVX_LIGHT pContext = new XMLTextColumnsContext( GetImport(), nPrefix, rLocalName, xAttrList, rProp, rProperties ); -#else - // create default context to skip content - pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName ); -#endif // #ifndef SVX_LIGHT break; case CTF_DROPCAPFORMAT: @@ -137,14 +129,12 @@ SvXMLImportContext *XMLTextPropertySetContext::CreateChildContext( rProperties ); } break; -#ifndef SVX_LIGHT case CTF_SECTION_FOOTNOTE_END: case CTF_SECTION_ENDNOTE_END: pContext = new XMLSectionFootnoteConfigImport( GetImport(), nPrefix, rLocalName, rProperties, mxMapper->getPropertySetMapper()); break; -#endif // #ifndef SVX_LIGHT } if( !pContext ) @@ -156,3 +146,4 @@ SvXMLImportContext *XMLTextPropertySetContext::CreateChildContext( } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTextPropertySetContext.hxx b/xmloff/source/text/XMLTextPropertySetContext.hxx index bbbf79dc46d4..dd945491be68 100644 --- a/xmloff/source/text/XMLTextPropertySetContext.hxx +++ b/xmloff/source/text/XMLTextPropertySetContext.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 // _XMLOFF_XMLTEXTPROPERTYSETCONTEXT_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTextShapeImportHelper.cxx b/xmloff/source/text/XMLTextShapeImportHelper.cxx index 3c5df81cb597..21689e5fc8c2 100644 --- a/xmloff/source/text/XMLTextShapeImportHelper.cxx +++ b/xmloff/source/text/XMLTextShapeImportHelper.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,13 +29,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" #include <com/sun/star/text/XTextContent.hpp> -#ifndef _COM_SUN_STAR_TEXT_TEXTCONTENTANCHORTYPE_HPP #include <com/sun/star/text/TextContentAnchorType.hpp> -#endif -#ifndef _XMLOFF_XMLTIMP_HXX_ #include <xmloff/xmlimp.hxx> -#endif #include <xmloff/txtimp.hxx> #include <xmloff/xmluconv.hxx> #include <xmloff/nmspmap.hxx> @@ -164,3 +161,5 @@ void XMLTextShapeImportHelper::addShape( break; } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTextShapeStyleContext.cxx b/xmloff/source/text/XMLTextShapeStyleContext.cxx index 85d342ba5693..b7dd2d132c00 100644 --- a/xmloff/source/text/XMLTextShapeStyleContext.cxx +++ b/xmloff/source/text/XMLTextShapeStyleContext.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" #include <tools/debug.hxx> -#ifndef _COM_SUN_STAR_DOCUMENT_XEVENTSSUPPLIER_HPP #include <com/sun/star/document/XEventsSupplier.hpp> -#endif #include "xmloff/xmlnmspe.hxx" #include <xmloff/xmltoken.hxx> #include "XMLTextPropertySetContext.hxx" @@ -39,13 +38,9 @@ #include "XMLShapePropertySetContext.hxx" #include "XMLTextColumnsContext.hxx" #include "XMLBackgroundImageContext.hxx" -#ifndef _XMLOFF_TXTPRMAP_HXX #include <xmloff/txtprmap.hxx> -#endif -#ifndef _XMLOFF_XMLTEXTSHAPESTYLECONTEXT_HXX #include <xmloff/XMLTextShapeStyleContext.hxx> -#endif using ::rtl::OUString; using ::rtl::OUStringBuffer; @@ -253,3 +248,5 @@ void XMLTextShapeStyleContext::Finish( sal_Bool bOverwrite ) { XMLPropStyleContext::Finish( bOverwrite ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTextTableContext.cxx b/xmloff/source/text/XMLTextTableContext.cxx index 0859aaa220e4..0b8628217dde 100644 --- a/xmloff/source/text/XMLTextTableContext.cxx +++ b/xmloff/source/text/XMLTextTableContext.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. @@ -47,3 +48,5 @@ XMLTextTableContext::XMLTextTableContext( XMLTextTableContext::~XMLTextTableContext() { } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTrackedChangesImportContext.cxx b/xmloff/source/text/XMLTrackedChangesImportContext.cxx index 9fc143bf4330..8af54c293ed2 100644 --- a/xmloff/source/text/XMLTrackedChangesImportContext.cxx +++ b/xmloff/source/text/XMLTrackedChangesImportContext.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. @@ -77,7 +78,7 @@ void XMLTrackedChangesImportContext::StartElement( { if ( IsXMLToken( sLocalName, XML_TRACK_CHANGES ) ) { - sal_Bool bTmp; + bool bTmp; if( SvXMLUnitConverter::convertBool( bTmp, xAttrList->getValueByIndex(i)) ) { @@ -114,3 +115,5 @@ SvXMLImportContext* XMLTrackedChangesImportContext::CreateChildContext( return pContext; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTrackedChangesImportContext.hxx b/xmloff/source/text/XMLTrackedChangesImportContext.hxx index a9906351e1cd..448d51197878 100644 --- a/xmloff/source/text/XMLTrackedChangesImportContext.hxx +++ b/xmloff/source/text/XMLTrackedChangesImportContext.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. @@ -73,3 +74,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/txtdrope.cxx b/xmloff/source/text/txtdrope.cxx index 1c31ad94dd1d..3e469a9dc501 100644 --- a/xmloff/source/text/txtdrope.cxx +++ b/xmloff/source/text/txtdrope.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. @@ -104,3 +105,4 @@ void XMLTextDropCapExport::exportXML( const Any& rAny, +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/txtdrope.hxx b/xmloff/source/text/txtdrope.hxx index 1102e37c5989..2526c447ddbc 100644 --- a/xmloff/source/text/txtdrope.hxx +++ b/xmloff/source/text/txtdrope.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. @@ -49,3 +50,5 @@ public: #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/txtdropi.cxx b/xmloff/source/text/txtdropi.cxx index 1968a7e7b1a0..47cd1ec379d9 100644 --- a/xmloff/source/text/txtdropi.cxx +++ b/xmloff/source/text/txtdropi.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. @@ -54,7 +55,7 @@ enum SvXMLTokenMapDropAttrs XML_TOK_DROP_END=XML_TOK_UNKNOWN }; -static __FAR_DATA SvXMLTokenMapEntry aDropAttrTokenMap[] = +static SvXMLTokenMapEntry aDropAttrTokenMap[] = { { XML_NAMESPACE_STYLE, XML_LINES, XML_TOK_DROP_LINES }, { XML_NAMESPACE_STYLE, XML_LENGTH, XML_TOK_DROP_LENGTH }, @@ -152,3 +153,4 @@ void XMLTextDropCapImportContext::EndElement() } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/txtdropi.hxx b/xmloff/source/text/txtdropi.hxx index 459540904c2b..7fbe75ec4f55 100644 --- a/xmloff/source/text/txtdropi.hxx +++ b/xmloff/source/text/txtdropi.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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/txtexppr.cxx b/xmloff/source/text/txtexppr.cxx index 6bca8e8f4e20..22aba3a67289 100644 --- a/xmloff/source/text/txtexppr.cxx +++ b/xmloff/source/text/txtexppr.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. @@ -27,10 +28,12 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" +#include <tools/debug.hxx> +#include <xmloff/txtprmap.hxx> +#include <com/sun/star/table/BorderLine2.hpp> #include "txtexppr.hxx" -#include <com/sun/star/table/BorderLine.hpp> #include <com/sun/star/text/SizeType.hpp> #include <com/sun/star/text/WrapTextMode.hpp> #include <com/sun/star/text/TextContentAnchorType.hpp> @@ -432,13 +435,12 @@ void XMLTextExportPropertySetMapper::ContextFilter( XMLPropertyState* pHoriOrientRelState = NULL; XMLPropertyState* pHoriOrientRelFrameState = NULL; XMLPropertyState* pHoriOrientMirrorState = NULL; - // --> OD 2004-08-09 #i28749# - horizontal position and relation for shapes + // Horizontal position and relation for shapes (#i28749#) XMLPropertyState* pShapeHoriOrientState = NULL; XMLPropertyState* pShapeHoriOrientMirroredState = NULL; XMLPropertyState* pShapeHoriOrientRelState = NULL; XMLPropertyState* pShapeHoriOrientRelFrameState = NULL; XMLPropertyState* pShapeHoriOrientMirrorState = NULL; - // <-- // vertical position and relation XMLPropertyState* pVertOrientState = NULL; @@ -448,13 +450,12 @@ void XMLTextExportPropertySetMapper::ContextFilter( XMLPropertyState* pVertOrientRelFrameState = NULL; XMLPropertyState* pVertOrientRelAsCharState = NULL; - // --> OD 2004-08-09 #i28749# - vertical position and relation for shapes + // Vertical position and relation for shapes (#i28749#) XMLPropertyState* pShapeVertOrientState = NULL; XMLPropertyState* pShapeVertOrientAtCharState = NULL; XMLPropertyState* pShapeVertOrientRelState = NULL; XMLPropertyState* pShapeVertOrientRelPageState = NULL; XMLPropertyState* pShapeVertOrientRelFrameState = NULL; - // <-- // filter underline color XMLPropertyState* pUnderlineState = NULL; @@ -548,7 +549,7 @@ void XMLTextExportPropertySetMapper::ContextFilter( case CTF_VERTICALREL_FRAME: pVertOrientRelFrameState = propertie; bNeedsAnchor = sal_True; break; case CTF_VERTICALREL_ASCHAR: pVertOrientRelAsCharState = propertie; bNeedsAnchor = sal_True; break; - // --> OD 2004-08-09 #i28749# - handle new CTFs for shape positioning properties + // Handle new CTFs for shape positioning properties (#i28749#) case CTF_SHAPE_HORIZONTALPOS: pShapeHoriOrientState = propertie; bNeedsAnchor = sal_True; break; case CTF_SHAPE_HORIZONTALPOS_MIRRORED: pShapeHoriOrientMirroredState = propertie; bNeedsAnchor = sal_True; break; case CTF_SHAPE_HORIZONTALREL: pShapeHoriOrientRelState = propertie; bNeedsAnchor = sal_True; break; @@ -559,8 +560,6 @@ void XMLTextExportPropertySetMapper::ContextFilter( case CTF_SHAPE_VERTICALREL: pShapeVertOrientRelState = propertie; bNeedsAnchor = sal_True; break; case CTF_SHAPE_VERTICALREL_PAGE: pShapeVertOrientRelPageState = propertie; bNeedsAnchor = sal_True; break; case CTF_SHAPE_VERTICALREL_FRAME: pShapeVertOrientRelFrameState = propertie; bNeedsAnchor = sal_True; break; - // <-- - case CTF_FONTNAME: pFontNameState = propertie; break; case CTF_FONTFAMILYNAME: pFontFamilyNameState = propertie; break; case CTF_FONTSTYLENAME: pFontStyleNameState = propertie; break; @@ -655,7 +654,7 @@ void XMLTextExportPropertySetMapper::ContextFilter( { if( pLeftBorderWidthState && pRightBorderWidthState && pTopBorderWidthState && pBottomBorderWidthState ) { - table::BorderLine aLeft, aRight, aTop, aBottom; + table::BorderLine2 aLeft, aRight, aTop, aBottom; pLeftBorderWidthState->maValue >>= aLeft; pRightBorderWidthState->maValue >>= aRight; @@ -663,10 +662,16 @@ void XMLTextExportPropertySetMapper::ContextFilter( pBottomBorderWidthState->maValue >>= aBottom; if( aLeft.Color == aRight.Color && aLeft.InnerLineWidth == aRight.InnerLineWidth && aLeft.OuterLineWidth == aRight.OuterLineWidth && aLeft.LineDistance == aRight.LineDistance && + aLeft.LineStyle == aRight.LineStyle && + aLeft.LineWidth == aRight.LineWidth && aLeft.Color == aTop.Color && aLeft.InnerLineWidth == aTop.InnerLineWidth && aLeft.OuterLineWidth == aTop.OuterLineWidth && aLeft.LineDistance == aTop.LineDistance && + aLeft.LineStyle == aTop.LineStyle && + aLeft.LineWidth == aTop.LineWidth && aLeft.Color == aBottom.Color && aLeft.InnerLineWidth == aBottom.InnerLineWidth && - aLeft.OuterLineWidth == aBottom.OuterLineWidth && aLeft.LineDistance == aBottom.LineDistance ) + aLeft.OuterLineWidth == aBottom.OuterLineWidth && aLeft.LineDistance == aBottom.LineDistance && + aLeft.LineStyle == aBottom.LineStyle && + aLeft.LineWidth == aBottom.LineWidth ) { pLeftBorderWidthState->mnIndex = -1; pLeftBorderWidthState->maValue.clear(); @@ -728,7 +733,7 @@ void XMLTextExportPropertySetMapper::ContextFilter( { if( pLeftBorderState && pRightBorderState && pTopBorderState && pBottomBorderState ) { - table::BorderLine aLeft, aRight, aTop, aBottom; + table::BorderLine2 aLeft, aRight, aTop, aBottom; pLeftBorderState->maValue >>= aLeft; pRightBorderState->maValue >>= aRight; @@ -736,10 +741,16 @@ void XMLTextExportPropertySetMapper::ContextFilter( pBottomBorderState->maValue >>= aBottom; if( aLeft.Color == aRight.Color && aLeft.InnerLineWidth == aRight.InnerLineWidth && aLeft.OuterLineWidth == aRight.OuterLineWidth && aLeft.LineDistance == aRight.LineDistance && + aLeft.LineStyle == aRight.LineStyle && + aLeft.LineWidth == aRight.LineWidth && aLeft.Color == aTop.Color && aLeft.InnerLineWidth == aTop.InnerLineWidth && aLeft.OuterLineWidth == aTop.OuterLineWidth && aLeft.LineDistance == aTop.LineDistance && + aLeft.LineStyle == aTop.LineStyle && + aLeft.LineWidth == aTop.LineWidth && aLeft.Color == aBottom.Color && aLeft.InnerLineWidth == aBottom.InnerLineWidth && - aLeft.OuterLineWidth == aBottom.OuterLineWidth && aLeft.LineDistance == aBottom.LineDistance ) + aLeft.OuterLineWidth == aBottom.OuterLineWidth && aLeft.LineDistance == aBottom.LineDistance && + aLeft.LineWidth == aBottom.LineWidth && + aLeft.LineStyle == aBottom.LineStyle ) { pLeftBorderState->mnIndex = -1; pLeftBorderState->maValue.clear(); @@ -889,7 +900,7 @@ void XMLTextExportPropertySetMapper::ContextFilter( pVertOrientRelAsCharState->mnIndex = -1; } - // --> OD 2004-08-09 #i28749# - states for shape positioning properties + // States for shape positioning properties (#i28749#) if ( eAnchor != TextContentAnchorType_AS_CHARACTER && ( GetExport().getExportFlags() & EXPORT_OASIS ) == 0 ) { @@ -948,7 +959,6 @@ void XMLTextExportPropertySetMapper::ContextFilter( if( pShapeVertOrientRelFrameState && TextContentAnchorType_AT_FRAME != eAnchor ) pShapeVertOrientRelFrameState->mnIndex = -1; } - // <-- // list style name: remove list style if it is the default outline style if( pListStyleName != NULL ) @@ -987,3 +997,5 @@ bool lcl_IsOutlineStyle(const SvXMLExport &rExport, const OUString & rName) return rName == sOutlineName; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/txtexppr.hxx b/xmloff/source/text/txtexppr.hxx index 583727713fbf..98c6d6e0514c 100644 --- a/xmloff/source/text/txtexppr.hxx +++ b/xmloff/source/text/txtexppr.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. @@ -32,9 +33,7 @@ #include "txtdrope.hxx" #include "xmloff/xmltabe.hxx" #include "XMLTextColumnsExport.hxx" -#ifndef _XMLOFF_XMLBACKGROUNDIMAGEEXPORT_HXX #include "XMLBackgroundImageExport.hxx" -#endif class SvXMLExport; class XMLTextExportPropertySetMapper: public SvXMLExportPropertyMapper @@ -96,3 +95,5 @@ public: #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx index 173c2f780162..0e4f6b54cb3a 100644 --- a/xmloff/source/text/txtflde.cxx +++ b/xmloff/source/text/txtflde.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. @@ -93,77 +94,77 @@ using namespace ::com::sun::star::container; using namespace ::xmloff::token; -static sal_Char __READONLY_DATA FIELD_SERVICE_SENDER[] = "ExtendedUser"; -static sal_Char __READONLY_DATA FIELD_SERVICE_AUTHOR[] = "Author"; -static sal_Char __READONLY_DATA FIELD_SERVICE_JUMPEDIT[] = "JumpEdit"; -static sal_Char __READONLY_DATA FIELD_SERVICE_GETEXP[] = "GetExpression"; -static sal_Char __READONLY_DATA FIELD_SERVICE_SETEXP[] = "SetExpression"; -static sal_Char __READONLY_DATA FIELD_SERVICE_USER[] = "User"; -static sal_Char __READONLY_DATA FIELD_SERVICE_INPUT[] = "Input"; -static sal_Char __READONLY_DATA FIELD_SERVICE_USERINPUT[] = "InputUser"; -static sal_Char __READONLY_DATA FIELD_SERVICE_DATETIME[] = "DateTime"; -static sal_Char __READONLY_DATA FIELD_SERVICE_PAGENUMBER[] = "PageNumber"; -static sal_Char __READONLY_DATA FIELD_SERVICE_DB_NEXT[] = "DatabaseNextSet"; -static sal_Char __READONLY_DATA FIELD_SERVICE_DB_SELECT[] = "DatabaseNumberOfSet"; -static sal_Char __READONLY_DATA FIELD_SERVICE_DB_NUMBER[] = "DatabaseSetNumber"; -static sal_Char __READONLY_DATA FIELD_SERVICE_DB_DISPLAY[] = "Database"; -static sal_Char __READONLY_DATA FIELD_SERVICE_DB_NAME[] = "DatabaseName"; -static sal_Char __READONLY_DATA FIELD_SERVICE_CONDITIONAL_TEXT[] = "ConditionalText"; -static sal_Char __READONLY_DATA FIELD_SERVICE_HIDDEN_TEXT[] = "HiddenText"; -static sal_Char __READONLY_DATA FIELD_SERVICE_HIDDEN_PARAGRAPH[] = "HiddenParagraph"; -static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_CHANGE_AUTHOR[] = "DocInfo.ChangeAuthor"; -static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_CHANGE_AUTHOR2[] = "docinfo.ChangeAuthor"; -static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_CHANGE_DATE_TIME[] = "DocInfo.ChangeDateTime"; -static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_CHANGE_DATE_TIME2[] = "docinfo.ChangeDateTime"; -static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_EDIT_TIME[] = "DocInfo.EditTime"; -static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_EDIT_TIME2[] = "docinfo.EditTime"; -static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_DESCRIPTION[] = "DocInfo.Description"; -static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_DESCRIPTION2[] = "docinfo.Description"; -static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_CREATE_AUTHOR[] = "DocInfo.CreateAuthor"; -static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_CREATE_AUTHOR2[] = "docinfo.CreateAuthor"; -static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_CREATE_DATE_TIME[] = "DocInfo.CreateDateTime"; -static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_CREATE_DATE_TIME2[] = "docinfo.CreateDateTime"; -static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_CUSTOM[] = "DocInfo.Custom"; -static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_CUSTOM2[] = "docinfo.Custom"; -static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_PRINT_AUTHOR[] = "DocInfo.PrintAuthor"; -static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_PRINT_AUTHOR2[] = "docinfo.PrintAuthor"; -static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_PRINT_DATE_TIME[] = "DocInfo.PrintDateTime"; -static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_PRINT_DATE_TIME2[] = "docinfo.PrintDateTime"; -static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_KEY_WORDS[] = "DocInfo.KeyWords"; -static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_KEY_WORDS2[] = "docinfo.KeyWords"; -static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_SUBJECT[] = "DocInfo.Subject"; -static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_SUBJECT2[] = "docinfo.Subject"; -static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_TITLE[] = "DocInfo.Title"; -static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_TITLE2[] = "docinfo.Title"; -static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_REVISION[] = "DocInfo.Revision"; -static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_REVISION2[] = "docinfo.Revision"; -static sal_Char __READONLY_DATA FIELD_SERVICE_FILE_NAME[] = "FileName"; -static sal_Char __READONLY_DATA FIELD_SERVICE_CHAPTER[] = "Chapter"; -static sal_Char __READONLY_DATA FIELD_SERVICE_TEMPLATE_NAME[] = "TemplateName"; -static sal_Char __READONLY_DATA FIELD_SERVICE_PAGE_COUNT[] = "PageCount"; -static sal_Char __READONLY_DATA FIELD_SERVICE_PARAGRAPH_COUNT[] = "ParagraphCount"; -static sal_Char __READONLY_DATA FIELD_SERVICE_WORD_COUNT[] = "WordCount"; -static sal_Char __READONLY_DATA FIELD_SERVICE_CHARACTER_COUNT[] = "CharacterCount"; -static sal_Char __READONLY_DATA FIELD_SERVICE_TABLE_COUNT[] = "TableCount"; -static sal_Char __READONLY_DATA FIELD_SERVICE_GRAPHIC_COUNT[] = "GraphicObjectCount"; -static sal_Char __READONLY_DATA FIELD_SERVICE_OBJECT_COUNT[] = "EmbeddedObjectCount"; -static sal_Char __READONLY_DATA FIELD_SERVICE_REFERENCE_PAGE_SET[] = "ReferencePageSet"; -static sal_Char __READONLY_DATA FIELD_SERVICE_REFERENCE_PAGE_GET[] = "ReferencePageGet"; -static sal_Char __READONLY_DATA FIELD_SERVICE_SHEET_NAME[] = "SheetName"; -static sal_Char __READONLY_DATA FIELD_SERVICE_MACRO[] = "Macro"; -static sal_Char __READONLY_DATA FIELD_SERVICE_GET_REFERENCE[] = "GetReference"; -static sal_Char __READONLY_DATA FIELD_SERVICE_DDE[] = "DDE"; -static sal_Char __READONLY_DATA FIELD_SERVICE_URL[] = "URL"; -static sal_Char __READONLY_DATA FIELD_SERVICE_BIBLIOGRAPHY[] = "Bibliography"; -static sal_Char __READONLY_DATA FIELD_SERVICE_SCRIPT[] = "Script"; -static sal_Char __READONLY_DATA FIELD_SERVICE_ANNOTATION[] = "Annotation"; -static sal_Char __READONLY_DATA FIELD_SERVICE_COMBINED_CHARACTERS[] = "CombinedCharacters"; -static sal_Char __READONLY_DATA FIELD_SERVICE_META[] = "MetadataField"; -static sal_Char __READONLY_DATA FIELD_SERVICE_MEASURE[] = "Measure"; -static sal_Char __READONLY_DATA FIELD_SERVICE_TABLE_FORMULA[] = "TableFormula"; -static sal_Char __READONLY_DATA FIELD_SERVICE_DROP_DOWN[] = "DropDown"; - -SvXMLEnumStringMapEntry __READONLY_DATA aFieldServiceNameMapping[] = +static sal_Char const FIELD_SERVICE_SENDER[] = "ExtendedUser"; +static sal_Char const FIELD_SERVICE_AUTHOR[] = "Author"; +static sal_Char const FIELD_SERVICE_JUMPEDIT[] = "JumpEdit"; +static sal_Char const FIELD_SERVICE_GETEXP[] = "GetExpression"; +static sal_Char const FIELD_SERVICE_SETEXP[] = "SetExpression"; +static sal_Char const FIELD_SERVICE_USER[] = "User"; +static sal_Char const FIELD_SERVICE_INPUT[] = "Input"; +static sal_Char const FIELD_SERVICE_USERINPUT[] = "InputUser"; +static sal_Char const FIELD_SERVICE_DATETIME[] = "DateTime"; +static sal_Char const FIELD_SERVICE_PAGENUMBER[] = "PageNumber"; +static sal_Char const FIELD_SERVICE_DB_NEXT[] = "DatabaseNextSet"; +static sal_Char const FIELD_SERVICE_DB_SELECT[] = "DatabaseNumberOfSet"; +static sal_Char const FIELD_SERVICE_DB_NUMBER[] = "DatabaseSetNumber"; +static sal_Char const FIELD_SERVICE_DB_DISPLAY[] = "Database"; +static sal_Char const FIELD_SERVICE_DB_NAME[] = "DatabaseName"; +static sal_Char const FIELD_SERVICE_CONDITIONAL_TEXT[] = "ConditionalText"; +static sal_Char const FIELD_SERVICE_HIDDEN_TEXT[] = "HiddenText"; +static sal_Char const FIELD_SERVICE_HIDDEN_PARAGRAPH[] = "HiddenParagraph"; +static sal_Char const FIELD_SERVICE_DOC_INFO_CHANGE_AUTHOR[] = "DocInfo.ChangeAuthor"; +static sal_Char const FIELD_SERVICE_DOC_INFO_CHANGE_AUTHOR2[] = "docinfo.ChangeAuthor"; +static sal_Char const FIELD_SERVICE_DOC_INFO_CHANGE_DATE_TIME[] = "DocInfo.ChangeDateTime"; +static sal_Char const FIELD_SERVICE_DOC_INFO_CHANGE_DATE_TIME2[] = "docinfo.ChangeDateTime"; +static sal_Char const FIELD_SERVICE_DOC_INFO_EDIT_TIME[] = "DocInfo.EditTime"; +static sal_Char const FIELD_SERVICE_DOC_INFO_EDIT_TIME2[] = "docinfo.EditTime"; +static sal_Char const FIELD_SERVICE_DOC_INFO_DESCRIPTION[] = "DocInfo.Description"; +static sal_Char const FIELD_SERVICE_DOC_INFO_DESCRIPTION2[] = "docinfo.Description"; +static sal_Char const FIELD_SERVICE_DOC_INFO_CREATE_AUTHOR[] = "DocInfo.CreateAuthor"; +static sal_Char const FIELD_SERVICE_DOC_INFO_CREATE_AUTHOR2[] = "docinfo.CreateAuthor"; +static sal_Char const FIELD_SERVICE_DOC_INFO_CREATE_DATE_TIME[] = "DocInfo.CreateDateTime"; +static sal_Char const FIELD_SERVICE_DOC_INFO_CREATE_DATE_TIME2[] = "docinfo.CreateDateTime"; +static sal_Char const FIELD_SERVICE_DOC_INFO_CUSTOM[] = "DocInfo.Custom"; +static sal_Char const FIELD_SERVICE_DOC_INFO_CUSTOM2[] = "docinfo.Custom"; +static sal_Char const FIELD_SERVICE_DOC_INFO_PRINT_AUTHOR[] = "DocInfo.PrintAuthor"; +static sal_Char const FIELD_SERVICE_DOC_INFO_PRINT_AUTHOR2[] = "docinfo.PrintAuthor"; +static sal_Char const FIELD_SERVICE_DOC_INFO_PRINT_DATE_TIME[] = "DocInfo.PrintDateTime"; +static sal_Char const FIELD_SERVICE_DOC_INFO_PRINT_DATE_TIME2[] = "docinfo.PrintDateTime"; +static sal_Char const FIELD_SERVICE_DOC_INFO_KEY_WORDS[] = "DocInfo.KeyWords"; +static sal_Char const FIELD_SERVICE_DOC_INFO_KEY_WORDS2[] = "docinfo.KeyWords"; +static sal_Char const FIELD_SERVICE_DOC_INFO_SUBJECT[] = "DocInfo.Subject"; +static sal_Char const FIELD_SERVICE_DOC_INFO_SUBJECT2[] = "docinfo.Subject"; +static sal_Char const FIELD_SERVICE_DOC_INFO_TITLE[] = "DocInfo.Title"; +static sal_Char const FIELD_SERVICE_DOC_INFO_TITLE2[] = "docinfo.Title"; +static sal_Char const FIELD_SERVICE_DOC_INFO_REVISION[] = "DocInfo.Revision"; +static sal_Char const FIELD_SERVICE_DOC_INFO_REVISION2[] = "docinfo.Revision"; +static sal_Char const FIELD_SERVICE_FILE_NAME[] = "FileName"; +static sal_Char const FIELD_SERVICE_CHAPTER[] = "Chapter"; +static sal_Char const FIELD_SERVICE_TEMPLATE_NAME[] = "TemplateName"; +static sal_Char const FIELD_SERVICE_PAGE_COUNT[] = "PageCount"; +static sal_Char const FIELD_SERVICE_PARAGRAPH_COUNT[] = "ParagraphCount"; +static sal_Char const FIELD_SERVICE_WORD_COUNT[] = "WordCount"; +static sal_Char const FIELD_SERVICE_CHARACTER_COUNT[] = "CharacterCount"; +static sal_Char const FIELD_SERVICE_TABLE_COUNT[] = "TableCount"; +static sal_Char const FIELD_SERVICE_GRAPHIC_COUNT[] = "GraphicObjectCount"; +static sal_Char const FIELD_SERVICE_OBJECT_COUNT[] = "EmbeddedObjectCount"; +static sal_Char const FIELD_SERVICE_REFERENCE_PAGE_SET[] = "ReferencePageSet"; +static sal_Char const FIELD_SERVICE_REFERENCE_PAGE_GET[] = "ReferencePageGet"; +static sal_Char const FIELD_SERVICE_SHEET_NAME[] = "SheetName"; +static sal_Char const FIELD_SERVICE_MACRO[] = "Macro"; +static sal_Char const FIELD_SERVICE_GET_REFERENCE[] = "GetReference"; +static sal_Char const FIELD_SERVICE_DDE[] = "DDE"; +static sal_Char const FIELD_SERVICE_URL[] = "URL"; +static sal_Char const FIELD_SERVICE_BIBLIOGRAPHY[] = "Bibliography"; +static sal_Char const FIELD_SERVICE_SCRIPT[] = "Script"; +static sal_Char const FIELD_SERVICE_ANNOTATION[] = "Annotation"; +static sal_Char const FIELD_SERVICE_COMBINED_CHARACTERS[] = "CombinedCharacters"; +static sal_Char const FIELD_SERVICE_META[] = "MetadataField"; +static sal_Char const FIELD_SERVICE_MEASURE[] = "Measure"; +static sal_Char const FIELD_SERVICE_TABLE_FORMULA[] = "TableFormula"; +static sal_Char const FIELD_SERVICE_DROP_DOWN[] = "DropDown"; + +SvXMLEnumStringMapEntry const aFieldServiceNameMapping[] = { ENUM_STRING_MAP_ENTRY( FIELD_SERVICE_SENDER, FIELD_ID_SENDER ), ENUM_STRING_MAP_ENTRY( FIELD_SERVICE_AUTHOR, FIELD_ID_AUTHOR ), @@ -755,7 +756,7 @@ sal_Bool XMLTextFieldExport::IsStringField( case FIELD_ID_DRAW_FOOTER: case FIELD_ID_DRAW_DATE_TIME: default: - DBG_ERROR("unkown field type/field has no content"); + OSL_FAIL("unkown field type/field has no content"); return sal_True; // invalid info; string in case of doubt } } @@ -974,7 +975,7 @@ void XMLTextFieldExport::ExportFieldAutoStyle( case FIELD_ID_UNKNOWN: default: - DBG_ERROR("unkown field type!"); + OSL_FAIL("unkown field type!"); // ignore -> no format for unkowns break; } @@ -1851,7 +1852,7 @@ void XMLTextFieldExport::ExportFieldHelper( case FIELD_ID_UNKNOWN: default: - DBG_ERROR("unkown field type encountered!"); + OSL_FAIL("unkown field type encountered!"); // always export content GetExport().Characters(sPresentation); } @@ -1908,7 +1909,7 @@ void XMLTextFieldExport::ExportFieldDeclarations( sal_Int32 i = 0; for( set<OUString>::iterator aSetIter = rOurMasters.begin(); aSetIter != rOurMasters.end(); - aSetIter++, i++ ) + ++aSetIter, ++i ) { aFieldMasters[i] = *aSetIter; } @@ -1989,7 +1990,7 @@ void XMLTextFieldExport::ExportFieldDeclarations( for (vector<OUString>::iterator aVarIter = aVarName.begin(); aVarIter != aVarName.end(); - aVarIter++) { + ++aVarIter) { OUString sName = *aVarIter; @@ -2048,7 +2049,7 @@ void XMLTextFieldExport::ExportFieldDeclarations( for (vector<OUString>::iterator aSeqIter = aSeqName.begin(); aSeqIter != aSeqName.end(); - aSeqIter++) { + ++aSeqIter) { OUString sName = *aSeqIter; @@ -2090,7 +2091,7 @@ void XMLTextFieldExport::ExportFieldDeclarations( for (vector<OUString>::iterator aUserIter = aUserName.begin(); aUserIter != aUserName.end(); - aUserIter++) { + ++aUserIter) { OUString sName = *aUserIter; @@ -2141,7 +2142,7 @@ void XMLTextFieldExport::ExportFieldDeclarations( for (vector<OUString>::iterator aDdeIter = aDdeName.begin(); aDdeIter != aDdeName.end(); - aDdeIter++) + ++aDdeIter) { OUString sName = *aDdeIter; @@ -2689,7 +2690,7 @@ void XMLTextFieldExport::ProcessDateTime(enum XMLTokenEnum eName, } -SvXMLEnumMapEntry __READONLY_DATA aBibliographyDataTypeMap[] = +SvXMLEnumMapEntry const aBibliographyDataTypeMap[] = { { XML_ARTICLE, BibliographyDataType::ARTICLE }, { XML_BOOK, BibliographyDataType::BOOK }, @@ -2956,7 +2957,7 @@ enum XMLTokenEnum XMLTextFieldExport::MapPlaceholderType(sal_uInt16 nType) default: // unkown placeholder: XML_TEXT - DBG_ERROR("unkown placeholder type"); + OSL_FAIL("unkown placeholder type"); } return eType; @@ -2995,7 +2996,7 @@ enum XMLTokenEnum XMLTextFieldExport::MapPageNumberName( nOffset -= 1; break; default: - DBG_ERROR("unknown page number type"); + OSL_FAIL("unknown page number type"); eName = XML_TOKEN_INVALID; break; } @@ -3029,7 +3030,7 @@ enum XMLTokenEnum XMLTextFieldExport::MapTemplateDisplayFormat(sal_Int16 nFormat eName = XML_TITLE; break; default: - DBG_ERROR("unknown template display format"); + OSL_FAIL("unknown template display format"); eName = XML_TOKEN_INVALID; break; } @@ -3066,7 +3067,7 @@ enum XMLTokenEnum XMLTextFieldExport::MapCountFieldName(FieldIdEnum nToken) eElement = XML_OBJECT_COUNT; break; default: - DBG_ERROR("no count field token"); + OSL_FAIL("no count field token"); eElement = XML_TOKEN_INVALID; break; } @@ -3097,7 +3098,7 @@ enum XMLTokenEnum XMLTextFieldExport::MapChapterDisplayFormat(sal_Int16 nFormat) eName = XML_PLAIN_NUMBER; break; default: - DBG_ERROR("unkown chapter display format"); + OSL_FAIL("unkown chapter display format"); eName = XML_TOKEN_INVALID; break; } @@ -3126,7 +3127,7 @@ enum XMLTokenEnum XMLTextFieldExport::MapFilenameDisplayFormat(sal_Int16 nFormat eName = XML_NAME_AND_EXTENSION; break; default: - DBG_ERROR("unknown filename display format"); + OSL_FAIL("unknown filename display format"); } return eName; @@ -3166,7 +3167,7 @@ enum XMLTokenEnum XMLTextFieldExport::MapReferenceType(sal_Int16 nType) // XML_TEMPLATE is default eElement = XML_TEMPLATE; break; - // --> OD 2007-09-14 #i81002# + // Core implementation for direct cross-references (#i81002#) case ReferenceFieldPart::NUMBER: eElement = XML_NUMBER; break; @@ -3176,9 +3177,8 @@ enum XMLTokenEnum XMLTextFieldExport::MapReferenceType(sal_Int16 nType) case ReferenceFieldPart::NUMBER_FULL_CONTEXT: eElement = XML_NUMBER_ALL_SUPERIOR; break; - // <-- default: - DBG_ERROR("unknown reference type"); + OSL_FAIL("unknown reference type"); eElement = XML_TEMPLATE; break; } @@ -3207,7 +3207,7 @@ enum XMLTokenEnum XMLTextFieldExport::MapReferenceSource(sal_Int16 nType) eElement = XML_NOTE_REF; break; default: - DBG_ERROR("unkown reference source"); + OSL_FAIL("unkown reference source"); break; } @@ -3470,7 +3470,7 @@ enum XMLTokenEnum XMLTextFieldExport::MapBibliographyFieldName(OUString sName) } else { - DBG_ERROR("Unknown bibliography info data"); + OSL_FAIL("Unknown bibliography info data"); eName = XML_TOKEN_INVALID; } @@ -3617,3 +3617,5 @@ inline Sequence<OUString> const GetStringSequenceProperty( aAny >>= aSequence; return aSequence; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx index c269ad97455f..af7677a2cdc6 100644 --- a/xmloff/source/text/txtfldi.cxx +++ b/xmloff/source/text/txtfldi.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. @@ -209,7 +210,7 @@ const sal_Char sAPI_is_fixed_language[] = "IsFixedLanguage"; const sal_Char sAPI_is_visible[] = "IsVisible"; const sal_Char sAPI_TextRange[] = "TextRange"; -const sal_Char sAPI_true[] = "sal_True"; +const sal_Char sAPI_true[] = "TRUE"; TYPEINIT1( XMLTextFieldImportContext, SvXMLImportContext); @@ -622,7 +623,7 @@ void XMLTextFieldImportContext::ForceUpdate( } else { - DBG_ERROR("Expected XUpdatable support!"); + OSL_FAIL("Expected XUpdatable support!"); } } @@ -713,8 +714,8 @@ void XMLSenderFieldImportContext::ProcessAttribute( if (XML_TOK_TEXTFIELD_FIXED == nAttrToken) { // set bVal - sal_Bool bVal; - sal_Bool bRet = GetImport().GetMM100UnitConverter(). + bool bVal; + bool bRet = GetImport().GetMM100UnitConverter(). convertBool(bVal, sAttrValue); // set bFixed if successfull @@ -821,7 +822,7 @@ void XMLAuthorFieldImportContext::PrepareField( TYPEINIT1( XMLPageContinuationImportContext, XMLTextFieldImportContext ); -static SvXMLEnumMapEntry __READONLY_DATA lcl_aSelectPageAttrMap[] = +static SvXMLEnumMapEntry const lcl_aSelectPageAttrMap[] = { { XML_PREVIOUS, PageNumberType_PREV }, { XML_CURRENT, PageNumberType_CURRENT }, @@ -1132,7 +1133,7 @@ void XMLTimeFieldImportContext::ProcessAttribute( } case XML_TOK_TEXTFIELD_FIXED: { - sal_Bool bTmp; + bool bTmp; if (SvXMLUnitConverter::convertBool(bTmp, sAttrValue)) { bFixed = bTmp; @@ -1683,7 +1684,7 @@ void XMLSimpleDocInfoImportContext::ProcessAttribute( { if (XML_TOK_TEXTFIELD_FIXED == nAttrToken) { - sal_Bool bTmp; + bool bTmp; if (SvXMLUnitConverter::convertBool(bTmp, sAttrValue)) { bFixed = bTmp; @@ -1790,7 +1791,7 @@ const sal_Char* XMLSimpleDocInfoImportContext::MapTokenToServiceName( break; default: - DBG_ERROR("no docinfo field token"); + OSL_FAIL("no docinfo field token"); pServiceName = NULL; break; } @@ -1885,7 +1886,7 @@ XMLDateTimeDocInfoImportContext::XMLDateTimeDocInfoImportContext( bHasDateTime = sal_False; break; default: - DBG_ERROR( + OSL_FAIL( "XMLDateTimeDocInfoImportContext needs date/time doc. fields"); bValid = sal_False; break; @@ -1994,7 +1995,7 @@ void XMLUserDocInfoImportContext::ProcessAttribute( { if (!bValid) { - SetServiceName(OUString::createFromAscii( sAPI_docinfo_custom ) ); + SetServiceName(OUString(RTL_CONSTASCII_USTRINGPARAM( sAPI_docinfo_custom )) ); aName = sAttrValue; bValid = sal_True; } @@ -2076,7 +2077,7 @@ void XMLHiddenParagraphImportContext::ProcessAttribute( } else if (XML_TOK_TEXTFIELD_IS_HIDDEN == nAttrToken) { - sal_Bool bTmp; + bool bTmp; if (SvXMLUnitConverter::convertBool(bTmp, sAttrValue)) { bIsHidden = bTmp; @@ -2150,7 +2151,7 @@ void XMLConditionalTextImportContext::ProcessAttribute( break; case XML_TOK_TEXTFIELD_CURRENT_VALUE: { - sal_Bool bTmp; + bool bTmp; if (SvXMLUnitConverter::convertBool(bTmp, sAttrValue)) { bCurrentValue = bTmp; @@ -2231,7 +2232,7 @@ void XMLHiddenTextImportContext::ProcessAttribute( break; case XML_TOK_TEXTFIELD_IS_HIDDEN: { - sal_Bool bTmp; + bool bTmp; if (SvXMLUnitConverter::convertBool(bTmp, sAttrValue)) { bIsHidden = bTmp; @@ -2298,7 +2299,7 @@ void XMLFileNameImportContext::ProcessAttribute( { case XML_TOK_TEXTFIELD_FIXED: { - sal_Bool bTmp; + bool bTmp; if (SvXMLUnitConverter::convertBool(bTmp, sAttrValue)) { bFixed = bTmp; @@ -2581,7 +2582,7 @@ const sal_Char* XMLCountFieldImportContext::MapTokenToServiceName( break; default: pServiceName = NULL; - DBG_ERROR("unknown count field!"); + OSL_FAIL("unknown count field!"); break; } @@ -2680,7 +2681,7 @@ void XMLPageVarSetFieldImportContext::ProcessAttribute( { case XML_TOK_TEXTFIELD_ACTIVE: { - sal_Bool bTmp; + bool bTmp; if (SvXMLUnitConverter::convertBool(bTmp, sAttrValue)) { bActive = bTmp; @@ -2799,23 +2800,19 @@ void XMLMacroFieldImportContext::PrepareField( sal_Int32 nLength = aValues.getLength(); for( sal_Int32 i = 0; i < nLength; i++ ) { - if ( aValues[i].Name.equalsAsciiL( "ScriptType", - sizeof("ScriptType")-1 ) ) + if ( aValues[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ScriptType")) ) { // ignore ScriptType } - else if ( aValues[i].Name.equalsAsciiL( "Library", - sizeof("Library")-1 ) ) + else if ( aValues[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Library")) ) { aValues[i].Value >>= sLibraryName; } - else if ( aValues[i].Name.equalsAsciiL( "MacroName", - sizeof("MacroName")-1 ) ) + else if ( aValues[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MacroName")) ) { aValues[i].Value >>= sMacroName; } - if ( aValues[i].Name.equalsAsciiL( "Script", - sizeof("Script")-1 ) ) + if ( aValues[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Script")) ) { aValues[i].Value >>= sScriptURL; } @@ -2877,7 +2874,7 @@ XMLReferenceFieldImportContext::XMLReferenceFieldImportContext( { } -static SvXMLEnumMapEntry __READONLY_DATA lcl_aReferenceTypeTokenMap[] = +static SvXMLEnumMapEntry const lcl_aReferenceTypeTokenMap[] = { { XML_PAGE, ReferenceFieldPart::PAGE}, { XML_CHAPTER, ReferenceFieldPart::CHAPTER }, @@ -2886,11 +2883,10 @@ static SvXMLEnumMapEntry __READONLY_DATA lcl_aReferenceTypeTokenMap[] = { XML_CATEGORY_AND_VALUE, ReferenceFieldPart::CATEGORY_AND_NUMBER }, { XML_CAPTION, ReferenceFieldPart::ONLY_CAPTION }, { XML_VALUE, ReferenceFieldPart::ONLY_SEQUENCE_NUMBER }, - // --> OD 2007-09-14 #i81002# + // Core implementation for direct cross-references (#i81002#) { XML_NUMBER, ReferenceFieldPart::NUMBER }, { XML_NUMBER_NO_SUPERIOR, ReferenceFieldPart::NUMBER_NO_CONTEXT }, { XML_NUMBER_ALL_SUPERIOR, ReferenceFieldPart::NUMBER_FULL_CONTEXT }, - // <-- { XML_TOKEN_INVALID, 0 } }; @@ -2914,7 +2910,7 @@ void XMLReferenceFieldImportContext::StartElement( break; default: bTypeOK = sal_False; - DBG_ERROR("unknown reference field"); + OSL_FAIL("unknown reference field"); break; } @@ -3009,7 +3005,7 @@ enum DdeFieldDeclAttrs XML_TOK_DDEFIELD_UPDATE }; -static __FAR_DATA SvXMLTokenMapEntry aDdeDeclAttrTokenMap[] = +static SvXMLTokenMapEntry aDdeDeclAttrTokenMap[] = { { XML_NAMESPACE_OFFICE, XML_NAME, XML_TOK_DDEFIELD_NAME }, { XML_NAMESPACE_OFFICE, XML_DDE_APPLICATION, XML_TOK_DDEFIELD_APPLICATION }, @@ -3113,7 +3109,7 @@ void XMLDdeFieldDeclImportContext::StartElement( break; case XML_TOK_DDEFIELD_UPDATE: { - sal_Bool bTmp; + bool bTmp; if ( SvXMLUnitConverter::convertBool( bTmp, xAttrList->getValueByIndex(i)) ) { @@ -3137,7 +3133,7 @@ void XMLDdeFieldDeclImportContext::StartElement( UNO_QUERY); if( xFactory.is() ) { - /* #i6432# There might be multiple occurances of one DDE + /* #i6432# There might be multiple occurrences of one DDE declaration if it is used in more than one of header/footer/body. createInstance will throw an exception if we try to create the second, third, etc. instance of such a @@ -3382,7 +3378,7 @@ XMLBibliographyFieldImportContext::XMLBibliographyFieldImportContext( } // TODO: this is the same map as is used in the text field export -SvXMLEnumMapEntry __READONLY_DATA aBibliographyDataTypeMap[] = +SvXMLEnumMapEntry const aBibliographyDataTypeMap[] = { { XML_ARTICLE, BibliographyDataType::ARTICLE }, { XML_BOOK, BibliographyDataType::BOOK }, @@ -3464,7 +3460,7 @@ void XMLBibliographyFieldImportContext::ProcessAttribute( const OUString& ) { // attributes are handled in StartElement - DBG_ERROR("This should not have happened."); + OSL_FAIL("This should not have happened."); } @@ -3618,7 +3614,7 @@ const sal_Char* XMLBibliographyFieldImportContext::MapBibliographyFieldName( } else { - DBG_ERROR("Unknown bibliography info data"); + OSL_FAIL("Unknown bibliography info data"); pName = NULL; } @@ -3902,7 +3898,7 @@ void XMLMeasureFieldImportContext::PrepareField( { Any aAny; aAny <<= mnKind; - xPropertySet->setPropertyValue(OUString::createFromAscii("Kind"), aAny); + xPropertySet->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Kind")), aAny); } @@ -3959,7 +3955,7 @@ bool lcl_ProcessLabel( const SvXMLImport& rImport, } else if( IsXMLToken( sLocalName, XML_CURRENT_SELECTED ) ) { - sal_Bool bTmp; + bool bTmp; if( SvXMLUnitConverter::convertBool( bTmp, sValue ) ) rIsSelected = bTmp; } @@ -4062,7 +4058,7 @@ XMLHeaderFieldImportContext::XMLHeaderFieldImportContext( const ::rtl::OUString& sLocalName) /// element name w/o prefix : XMLTextFieldImportContext(rImport, rHlp, sAPI_header, nPrfx, sLocalName ) { - sServicePrefix = OUString::createFromAscii( sAPI_presentation_prefix ); + sServicePrefix = OUString(RTL_CONSTASCII_USTRINGPARAM( sAPI_presentation_prefix )); bValid = sal_True; } @@ -4086,7 +4082,7 @@ XMLFooterFieldImportContext::XMLFooterFieldImportContext( const ::rtl::OUString& sLocalName) /// element name w/o prefix : XMLTextFieldImportContext(rImport, rHlp, sAPI_footer, nPrfx, sLocalName ) { - sServicePrefix = OUString::createFromAscii( sAPI_presentation_prefix ); + sServicePrefix = OUString(RTL_CONSTASCII_USTRINGPARAM( sAPI_presentation_prefix )); bValid = sal_True; } @@ -4111,7 +4107,7 @@ XMLDateTimeFieldImportContext::XMLDateTimeFieldImportContext( const ::rtl::OUString& sLocalName) /// element name w/o prefix : XMLTextFieldImportContext(rImport, rHlp, sAPI_datetime, nPrfx, sLocalName ) { - sServicePrefix = OUString::createFromAscii( sAPI_presentation_prefix ); + sServicePrefix = OUString(RTL_CONSTASCII_USTRINGPARAM( sAPI_presentation_prefix )); bValid = sal_True; } @@ -4127,3 +4123,5 @@ void XMLDateTimeFieldImportContext::PrepareField( ::com::sun::star::beans::XPropertySet> &) { } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/txtftne.cxx b/xmloff/source/text/txtftne.cxx index df9a03f25fdd..23ee992339a5 100644 --- a/xmloff/source/text/txtftne.cxx +++ b/xmloff/source/text/txtftne.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. @@ -60,9 +61,7 @@ #include <xmloff/xmlnume.hxx> #include "XMLTextCharStyleNamesElementExport.hxx" #include <xmloff/XMLEventExport.hxx> -#ifndef _XMLOFF_TXTPARAE_HXX #include <xmloff/txtparae.hxx> -#endif using ::rtl::OUString; using ::rtl::OUStringBuffer; @@ -391,3 +390,5 @@ void XMLTextParagraphExport::exportTextFootnoteConfigurationHelper( } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index d3591ece238c..e81610773293 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.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. @@ -91,13 +92,9 @@ #include "XMLCalculationSettingsContext.hxx" #include <xmloff/formsimp.hxx> #include "XMLNumberStylesImport.hxx" -// --> OD 2006-10-12 #i69629# +// XML import: reconstrution of assignment of paragraph style to outline levels (#i69629#) #include <com/sun/star/beans/XPropertyState.hpp> -// <-- - -// --> OD 2008-04-25 #refactorlists# #include <txtlists.hxx> -// <-- #include <xmloff/odffields.hxx> #include <comphelper/stlunosequence.hxx> @@ -124,7 +121,7 @@ using ::comphelper::UStringLess; -static __FAR_DATA SvXMLTokenMapEntry aTextElemTokenMap[] = +static SvXMLTokenMapEntry aTextElemTokenMap[] = { { XML_NAMESPACE_TEXT, XML_P, XML_TOK_TEXT_P }, { XML_NAMESPACE_TEXT, XML_H, XML_TOK_TEXT_H }, @@ -132,7 +129,6 @@ static __FAR_DATA SvXMLTokenMapEntry aTextElemTokenMap[] = { XML_NAMESPACE_DRAW, XML_FRAME, XML_TOK_TEXT_FRAME_PAGE }, { XML_NAMESPACE_DRAW, XML_A, XML_TOK_DRAW_A_PAGE }, { XML_NAMESPACE_TABLE,XML_TABLE, XML_TOK_TABLE_TABLE }, -// { XML_NAMESPACE_TABLE,XML_SUB_TABLE, XML_TOK_TABLE_SUBTABLE }, { XML_NAMESPACE_TEXT, XML_VARIABLE_DECLS, XML_TOK_TEXT_VARFIELD_DECLS }, { XML_NAMESPACE_TEXT, XML_USER_FIELD_DECLS, XML_TOK_TEXT_USERFIELD_DECLS }, { XML_NAMESPACE_TEXT, XML_SEQUENCE_DECLS, XML_TOK_TEXT_SEQUENCE_DECLS }, @@ -153,14 +149,13 @@ static __FAR_DATA SvXMLTokenMapEntry aTextElemTokenMap[] = { XML_NAMESPACE_OFFICE, XML_FORMS, XML_TOK_TEXT_FORMS }, { XML_NAMESPACE_TABLE, XML_CALCULATION_SETTINGS, XML_TOK_TEXT_CALCULATION_SETTINGS }, { XML_NAMESPACE_TEXT, XML_ALPHABETICAL_INDEX_AUTO_MARK_FILE, XML_TOK_TEXT_AUTOMARK }, - // --> FLR #i52127# + // #i52127# { XML_NAMESPACE_TEXT, XML_NUMBERED_PARAGRAPH, XML_TOK_TEXT_NUMBERED_PARAGRAPH }, - // <-- XML_TOKEN_MAP_END }; -static __FAR_DATA SvXMLTokenMapEntry aTextPElemTokenMap[] = +static SvXMLTokenMapEntry aTextPElemTokenMap[] = { { XML_NAMESPACE_TEXT, XML_SPAN, XML_TOK_TEXT_SPAN }, { XML_NAMESPACE_TEXT, XML_TAB, XML_TOK_TEXT_TAB_STOP }, @@ -336,7 +331,7 @@ static __FAR_DATA SvXMLTokenMapEntry aTextPElemTokenMap[] = XML_TOKEN_MAP_END }; -static __FAR_DATA SvXMLTokenMapEntry aTextPAttrTokenMap[] = +static SvXMLTokenMapEntry aTextPAttrTokenMap[] = { { XML_NAMESPACE_XML , XML_ID, XML_TOK_TEXT_P_XMLID }, { XML_NAMESPACE_XHTML, XML_ABOUT, XML_TOK_TEXT_P_ABOUT }, @@ -354,7 +349,7 @@ static __FAR_DATA SvXMLTokenMapEntry aTextPAttrTokenMap[] = XML_TOKEN_MAP_END }; -static __FAR_DATA SvXMLTokenMapEntry aTextNumberedParagraphAttrTokenMap[] = +static SvXMLTokenMapEntry aTextNumberedParagraphAttrTokenMap[] = { { XML_NAMESPACE_XML , XML_ID, XML_TOK_TEXT_NUMBERED_PARAGRAPH_XMLID }, { XML_NAMESPACE_TEXT, XML_LIST_ID, @@ -369,27 +364,26 @@ static __FAR_DATA SvXMLTokenMapEntry aTextNumberedParagraphAttrTokenMap[] = XML_TOKEN_MAP_END }; -static __FAR_DATA SvXMLTokenMapEntry aTextListBlockAttrTokenMap[] = +static SvXMLTokenMapEntry aTextListBlockAttrTokenMap[] = { { XML_NAMESPACE_XML , XML_ID, XML_TOK_TEXT_LIST_BLOCK_XMLID }, { XML_NAMESPACE_TEXT, XML_STYLE_NAME, XML_TOK_TEXT_LIST_BLOCK_STYLE_NAME }, { XML_NAMESPACE_TEXT, XML_CONTINUE_NUMBERING, XML_TOK_TEXT_LIST_BLOCK_CONTINUE_NUMBERING }, - // --> OD 2008-04-22 #refactorlists# { XML_NAMESPACE_TEXT, XML_CONTINUE_LIST, XML_TOK_TEXT_LIST_BLOCK_CONTINUE_LIST }, XML_TOKEN_MAP_END }; -static __FAR_DATA SvXMLTokenMapEntry aTextListBlockElemTokenMap[] = +static SvXMLTokenMapEntry aTextListBlockElemTokenMap[] = { { XML_NAMESPACE_TEXT, XML_LIST_HEADER, XML_TOK_TEXT_LIST_HEADER }, { XML_NAMESPACE_TEXT, XML_LIST_ITEM, XML_TOK_TEXT_LIST_ITEM }, XML_TOKEN_MAP_END }; -static __FAR_DATA SvXMLTokenMapEntry aTextFrameAttrTokenMap[] = +static SvXMLTokenMapEntry aTextFrameAttrTokenMap[] = { { XML_NAMESPACE_DRAW, XML_STYLE_NAME, XML_TOK_TEXT_FRAME_STYLE_NAME }, { XML_NAMESPACE_DRAW, XML_NAME, XML_TOK_TEXT_FRAME_NAME }, @@ -421,7 +415,7 @@ static __FAR_DATA SvXMLTokenMapEntry aTextFrameAttrTokenMap[] = XML_TOKEN_MAP_END }; -static __FAR_DATA SvXMLTokenMapEntry aTextContourAttrTokenMap[] = +static SvXMLTokenMapEntry aTextContourAttrTokenMap[] = { { XML_NAMESPACE_SVG, XML_WIDTH, XML_TOK_TEXT_CONTOUR_WIDTH }, { XML_NAMESPACE_SVG, XML_HEIGHT, XML_TOK_TEXT_CONTOUR_HEIGHT }, @@ -432,7 +426,7 @@ static __FAR_DATA SvXMLTokenMapEntry aTextContourAttrTokenMap[] = XML_TOKEN_MAP_END }; -static __FAR_DATA SvXMLTokenMapEntry aTextHyperlinkAttrTokenMap[] = +static SvXMLTokenMapEntry aTextHyperlinkAttrTokenMap[] = { { XML_NAMESPACE_XLINK, XML_HREF, XML_TOK_TEXT_HYPERLINK_HREF }, { XML_NAMESPACE_OFFICE, XML_NAME, XML_TOK_TEXT_HYPERLINK_NAME }, @@ -444,7 +438,7 @@ static __FAR_DATA SvXMLTokenMapEntry aTextHyperlinkAttrTokenMap[] = XML_TOKEN_MAP_END }; -static __FAR_DATA SvXMLTokenMapEntry aTextMasterPageElemTokenMap[] = +static SvXMLTokenMapEntry aTextMasterPageElemTokenMap[] = { { XML_NAMESPACE_STYLE, XML_HEADER, XML_TOK_TEXT_MP_HEADER }, { XML_NAMESPACE_STYLE, XML_FOOTER, XML_TOK_TEXT_MP_FOOTER }, @@ -454,7 +448,7 @@ static __FAR_DATA SvXMLTokenMapEntry aTextMasterPageElemTokenMap[] = XML_TOKEN_MAP_END }; -static __FAR_DATA SvXMLTokenMapEntry aTextFieldAttrTokenMap[] = +static SvXMLTokenMapEntry aTextFieldAttrTokenMap[] = { { XML_NAMESPACE_TEXT, XML_FIXED, XML_TOK_TEXTFIELD_FIXED }, { XML_NAMESPACE_TEXT, XML_DESCRIPTION, XML_TOK_TEXTFIELD_DESCRIPTION }, @@ -544,16 +538,11 @@ struct SAL_DLLPRIVATE XMLTextImportHelper::Impl ::std::auto_ptr<SvXMLTokenMap> m_pTextMasterPageElemTokenMap; ::std::auto_ptr<SvStringsDtor> m_pPrevFrmNames; ::std::auto_ptr<SvStringsDtor> m_pNextFrmNames; - - // --> OD 2008-04-25 #refactorlists# ::std::auto_ptr<XMLTextListsHelper> m_pTextListsHelper; - // <-- SvXMLImportContextRef m_xAutoStyles; SvXMLImportContextRef m_xFontDecls; - XMLSectionList_Impl m_SectionList; - UniReference< SvXMLImportPropertyMapper > m_xParaImpPrMap; UniReference< SvXMLImportPropertyMapper > m_xTextImpPrMap; UniReference< SvXMLImportPropertyMapper > m_xFrameImpPrMap; @@ -561,14 +550,14 @@ struct SAL_DLLPRIVATE XMLTextImportHelper::Impl UniReference< SvXMLImportPropertyMapper > m_xRubyImpPrMap; ::std::auto_ptr<SvI18NMap> m_pRenameMap; - // --> OD 2006-10-12 #i69629# - change and extend data structure: - // - data structure contains candidates of paragraph styles, which - // will be assigned to the outline style - // - data structure contains more than one candidate for each list level - // of the outline style + /* Change and extend data structure: + - data structure contains candidates of paragraph styles, which + will be assigned to the outline style + - data structure contains more than one candidate for each list level + of the outline style (#i69629#) + */ ::boost::scoped_array< ::std::vector< ::rtl::OUString > > m_pOutlineStylesCandidates; - // <-- // start range, xml:id, RDFa stuff typedef ::boost::tuple< @@ -640,13 +629,10 @@ struct SAL_DLLPRIVATE XMLTextImportHelper::Impl , m_pTextMasterPageElemTokenMap( 0 ) , m_pPrevFrmNames( 0 ) , m_pNextFrmNames( 0 ) - // --> OD 2008-04-25 #refactorlists# , m_pTextListsHelper( new XMLTextListsHelper() ) - // <-- , m_pRenameMap( 0 ) - // --> OD 2006-10-12 #i69629# + // XML import: reconstrution of assignment of paragraph style to outline levels (#i69629#) , m_pOutlineStylesCandidates( 0 ) - // <-- , m_xServiceFactory( rModel, UNO_QUERY ) , m_rSvXMLImport( rImport ) , m_bInsertMode( bInsertMode ) @@ -713,11 +699,6 @@ bool XMLTextImportHelper::IsProgress() const return m_pImpl->m_bProgress; } -XMLSectionList_Impl & XMLTextImportHelper::GetSectionList() -{ - return m_pImpl->m_SectionList; -} - uno::Reference<container::XNameContainer> const& XMLTextImportHelper::GetParaStyles() const { @@ -933,7 +914,7 @@ namespace { Sequence<OUString> vListEntriesSeq(vListEntries.size()); copy(vListEntries.begin(), vListEntries.end(), ::comphelper::stl_begin(vListEntriesSeq)); - vOutParams[OUString::createFromAscii(ODF_FORMDROPDOWN_LISTENTRY)] = makeAny(vListEntriesSeq); + vOutParams[OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_FORMDROPDOWN_LISTENTRY))] = makeAny(vListEntriesSeq); } for(::std::map<OUString, Any>::const_iterator pCurrent = vOutParams.begin(); pCurrent != vOutParams.end(); @@ -967,7 +948,6 @@ XMLTextImportHelper::XMLTextImportHelper( if( xCNSupplier.is() ) { m_pImpl->m_xChapterNumbering = xCNSupplier->getChapterNumberingRules(); - // --> OD 2008-05-15 #refactorlists# if (m_pImpl->m_xChapterNumbering.is()) { Reference< XPropertySet > const xNumRuleProps( @@ -1000,7 +980,6 @@ XMLTextImportHelper::XMLTextImportHelper( } } } - // <-- } Reference< XStyleFamiliesSupplier > xFamiliesSupp( rModel, UNO_QUERY ); @@ -1361,12 +1340,12 @@ OUString XMLTextImportHelper::ConvertStarFonts( const OUString& rChars, return bConverted ? sChars.makeStringAndClear() : rChars; } -// --> OD 2006-10-12 #i69629# -// helper method to determine, if a paragraph style has a list style (inclusive -// an empty one) inherits a list style (inclusive an empty one) from one of its parents -// --> OD 2007-01-29 #i73973# -// apply special case, that found list style equals the chapter numbering, also -// to the found list styles of the parent styles. +/* Helper method to determine, if a paragraph style has a list style (inclusive + an empty one) inherits a list style (inclusive an empty one) from one of its parents (#i69629#) +*/ +/* Apply special case, that found list style equals the chapter numbering, also + to the found list styles of the parent styles. (#i73973#) +*/ sal_Bool lcl_HasListStyle( OUString sStyleName, const Reference < XNameContainer >& xParaStyles, SvXMLImport& rImport, @@ -1408,14 +1387,11 @@ sal_Bool lcl_HasListStyle( OUString sStyleName, } else { - // --> OD 2007-12-07 #i77708# + // Tools.Outline settings lost on Save (#i77708#) sal_Int32 nUPD( 0 ); sal_Int32 nBuild( 0 ); - // --> OD 2008-03-19 #i86058# -// rImport.getBuildIds( nUPD, nBuild ); + // Don't use UPD for versioning: xmloff/source/text/txtstyli.cxx and txtimp.cxx (#i86058#) const bool bBuildIdFound = rImport.getBuildIds( nUPD, nBuild ); - // <-- - // <-- // search list style at parent Reference<XStyle> xStyle( xPropState, UNO_QUERY ); while ( xStyle.is() ) @@ -1447,8 +1423,7 @@ sal_Bool lcl_HasListStyle( OUString sStyleName, { // list style found bRet = sal_True; - // --> OD 2007-01-29 #i73973# - // special case: the found list style equals the chapter numbering + // Special case: the found list style equals the chapter numbering (#i73973#) Reference< XPropertySet > xPropSet( xPropState, UNO_QUERY ); if ( xPropSet.is() ) { @@ -1459,11 +1434,10 @@ sal_Bool lcl_HasListStyle( OUString sStyleName, { bRet = sal_False; } - // --> OD 2007-12-07 #i77708# - // special handling for text documents from OOo version prior OOo 2.4 - // --> OD 2008-03-19 #i86058# - // check explicitly on certain versions and on import of - // text documents in OpenOffice.org file format + // Special handling for text documents from OOo version prior OOo 2.4 (#i77708#) + /* Check explicitly on certain versions and on import of + text documents in OpenOffice.org file format (#i86058#) + */ else if ( sListStyle.getLength() == 0 && ( rImport.IsTextDocInOOoFileFormat() || ( bBuildIdFound && @@ -1472,9 +1446,7 @@ sal_Bool lcl_HasListStyle( OUString sStyleName, { bRet = sal_False; } - // <-- } - // <-- break; } else @@ -1488,7 +1460,6 @@ sal_Bool lcl_HasListStyle( OUString sStyleName, return bRet; } -// <-- OUString XMLTextImportHelper::SetStyleAndAttrs( SvXMLImport& rImport, const Reference < XTextCursor >& rCursor, @@ -1496,9 +1467,8 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( sal_Bool bPara, sal_Bool bOutlineLevelAttrFound, sal_Int8 nOutlineLevel, - // --> OD 2007-08-17 #i80724# + // Numberings/Bullets in table not visible aftzer save/reload (#i80724#) sal_Bool bSetListAttrs ) - // <-- { static ::rtl::OUString s_ParaStyleName( RTL_CONSTASCII_USTRINGPARAM("ParaStyleName")); @@ -1563,14 +1533,13 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( sStyleName = OUString(); } - // --> OD 2008-09-10 #i70748# - // The outline level needs to be only applied as list level, if the heading - // is not inside a list and if it by default applies the outline style. + /* The outline level needs to be only applied as list level, if the heading + is not inside a list and if it by default applies the outline style. (#i70748#) + */ bool bApplyOutlineLevelAsListLevel( false ); - // --> OD 2007-08-17 #i80724# + // Numberings/Bullets in table not visible aftzer save/reload (#i80724#) if (bSetListAttrs && bPara && xPropSetInfo->hasPropertyByName( s_NumberingRules)) - // <-- { // Set numbering rules Reference< XIndexReplace > const xNumRules( @@ -1596,23 +1565,20 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( if (!pListItem) { bNumberingIsNumber = false; // list-header } - // --> OD 2008-05-08 #refactorlists# // consider text:style-override property of <text:list-item> xNewNumRules.set( (pListItem != 0 && pListItem->HasNumRulesOverride()) ? pListItem->GetNumRulesOverride() : pListBlock->GetNumRules() ); - // <-- nLevel = static_cast<sal_Int8>(pListBlock->GetLevel()); if ( pListItem && pListItem->HasStartValue() ) { nStartValue = pListItem->GetStartValue(); } - // --> OD 2008-08-15 #i92811# + // Inconsistent behavior regarding lists (#i92811#) sListId = m_pImpl->m_pTextListsHelper->GetListIdForListBlock( *pListBlock); - // <-- } else if (pNumberedParagraph) { @@ -1625,8 +1591,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( if (pListBlock || pNumberedParagraph) { - // --> OD 2009-08-24 #i101349# - // Assure that list style of automatic paragraph style is applied at paragraph. + // Assure that list style of automatic paragraph style is applied at paragraph. (#i101349#) sal_Bool bApplyNumRules = pStyle && pStyle->IsListStyleSet(); if ( !bApplyNumRules ) { @@ -1656,7 +1621,6 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( } if ( bApplyNumRules ) - // <-- { // #102607# This may except when xNewNumRules contains // a Writer-NumRule-Implementation bug gets applied to @@ -1703,7 +1667,6 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( makeAny(nStartValue)); } - // --> OD 2008-04-23 #refactorlists# if (xPropSetInfo->hasPropertyByName(s_PropNameListId)) { if (sListId.getLength()) { @@ -1711,20 +1674,19 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( makeAny(sListId) ); } } - // <-- GetTextListHelper().SetListItem( (XMLTextListItemContext *)0 ); } else { - // If the paragraph is not in a list but its style, remove it from - // the list. - // --> OD 2005-10-25 #126347# - do not remove it, if the list - // of the style is the chapter numbering rule. + /* If the paragraph is not in a list but its style, remove it from + the list. Do not remove it, if the list of the style is + the chapter numbering rule. + */ if( xNumRules.is() ) { bool bRemove( true ); - // --> OD 2008-12-17 #i70748# - special handling for document from OOo 2.x + // Special handling for document from OOo 2.x (#i70748#) sal_Int32 nUPD( 0 ); sal_Int32 nBuild( 0 ); const bool bBuildIdFound = rImport.getBuildIds( nUPD, nBuild ); @@ -1745,19 +1707,16 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( xNumNamed->getName() == xChapterNumNamed->getName() ) { bRemove = false; - // --> OD 2008-09-10 #i70748# + // RFE: inserting headings into text documents (#i70748#) bApplyOutlineLevelAsListLevel = true; - // <-- } } } - // <-- if ( bRemove ) { xPropSet->setPropertyValue( s_NumberingRules, Any() ); } } - // <-- } } @@ -1852,8 +1811,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( } // outline level; set after list style has been set - // --> OD 2005-08-25 #i53198# - // Complete re-worked and corrected: + // Complete re-worked and corrected: (#i53198#) // - set outline level at paragraph // - set numbering level at paragraph, if none is already set // - assure that style is marked as an outline style for the corresponding @@ -1861,11 +1819,10 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( // - DO NOT set type of numbering rule to outline. // - DO NOT set numbering rule directly at the paragraph. - // --> OD 2008-12-09 #i70748# - // Some minor rework and adjust access to paragraph styles + // Some minor rework and adjust access to paragraph styles (#i70748#) if ( bPara ) { - // --> OD 2009-08-18 #i103817# + // Headings not numbered anymore in 3.1 (#i103817#) sal_Int16 nCurrentOutlineLevelInheritedFromParagraphStyle = 0; const bool bHasOutlineLevelProp( xPropSetInfo->hasPropertyByName(s_OutlineLevel)); @@ -1874,11 +1831,8 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( xPropSet->getPropertyValue(s_OutlineLevel) >>= nCurrentOutlineLevelInheritedFromParagraphStyle; } - // <-- - //if ( bPara && nOutlineLevel != -1 ) //#outline level,removed by zhaojianwei - if ( nOutlineLevel > 0 ) //add by zhaojianwei + if ( nOutlineLevel > 0 ) { - //#outline level,removed by zhaojianwei if ( bHasOutlineLevelProp ) { // In case that the value equals the value of its paragraph style @@ -1888,9 +1842,9 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( xPropSet->setPropertyValue( s_OutlineLevel, makeAny( static_cast<sal_Int16>(nOutlineLevel) ) ); } - }//<-end,zhaojianwei + } - // --> OD 2008-09-10 #i70748# + // RFE: inserting headings into text documents (#i70748#) if ( bApplyOutlineLevelAsListLevel ) { sal_Int16 nNumLevel = -1; @@ -1902,25 +1856,24 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( makeAny( static_cast<sal_Int8>(nOutlineLevel - 1) ) ); } } - // <-- - // --> OD 2006-10-13 #i69629# - correction: - // - for text document from version OOo 2.0.4/SO 8 PU4 and earlier - // the paragraph style of a heading should be assigned to the - // corresponding list level of the outline style. - // - for other text documents the paragraph style of a heading is only - // a candidate for an assignment to the list level of the outline - // style, if it has no direct list style property and (if exists) the - // automatic paragraph style has also no direct list style set. + /* Correction: (#i69629#) + - for text document from version OOo 2.0.4/SO 8 PU4 and earlier + the paragraph style of a heading should be assigned to the + corresponding list level of the outline style. + - for other text documents the paragraph style of a heading is only + a candidate for an assignment to the list level of the outline + style, if it has no direct list style property and (if exists) the + automatic paragraph style has also no direct list style set. + */ if (m_pImpl->m_xParaStyles->hasByName(sStyleName)) { bool bOutlineStyleCandidate( false ); sal_Int32 nUPD( 0 ); sal_Int32 nBuild( 0 ); - // --> OD 2007-12-19 #152540# const bool bBuildIdFound = rImport.getBuildIds( nUPD, nBuild ); - // --> OD 2007-07-25 #i73509# - // --> OD 2008-03-19 #i86058# - check explicitly on certain versions + // Lost outline numbering in master document (#i73509#) + // Check explicitly on certain versions (#i86058#) if ( rImport.IsTextDocInOOoFileFormat() || ( bBuildIdFound && ( nUPD == 645 || nUPD == 641 ) ) ) @@ -1931,36 +1884,11 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( { bOutlineStyleCandidate = bOutlineLevelAttrFound; } - // <-- -// else -// { -// Reference< XPropertyState > xStylePropState( -// xParaStyles->getByName( sStyleName ), UNO_QUERY ); -// if ( xStylePropState.is() && -// xStylePropState->getPropertyState( sNumberingStyleName ) == PropertyState_DIRECT_VALUE ) -// { -// bOutlineStyleCandidate = false; -// } -// // --> OD 2007-01-11 #i73361# -// // The automatic paragraph style doesn't have to be considered. -// // else if ( pStyle && /* automatic paragraph style */ -// // pStyle->IsListStyleSet() ) -// // { -// // bOutlineStyleCandidate = false; -// // } -// // <-- -// else -// { -// bOutlineStyleCandidate = true; -// } -// } - if ( bOutlineStyleCandidate ) { AddOutlineStyleCandidate( nOutlineLevel, sStyleName ); } - // --> OD 2009-08-18 #i103817# - // Assure that heading applies the outline style + // Assure that heading applies the outline style (#i103817#) if ( ( !pStyle || !pStyle->IsListStyleSet() ) && !bOutlineStyleCandidate && m_pImpl->m_xChapterNumbering.is()) @@ -1978,11 +1906,8 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( makeAny(static_cast<sal_Int8>(nOutlineLevel - 1))); } } - // <-- } - // <-- } - //-> #outlinelevel added by zhaojianwei //handle for text:p,if the paragraphstyle outlinelevel is set to[1~10] else if( bHasOutlineLevelProp ) { @@ -1992,9 +1917,8 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( xPropSet->setPropertyValue(s_OutlineLevel, makeAny( static_cast<sal_Int16>(nZero) )); } - }//<-end,zhaojianwei + } } - // <-- return sStyleName; } @@ -2042,10 +1966,9 @@ void XMLTextImportHelper::FindOutlineStyleName( ::rtl::OUString& rStyleName, // finally, we'll use the previously used style name for this // format (or the default we've just put into that style) - // --> OD 2006-11-06 #i71249# - take last added one + // take last added one (#i71249#) rStyleName = m_pImpl->m_pOutlineStylesCandidates[nOutlineLevel].back(); - // <-- } // else: nothing we can do, so we'll leave it empty } @@ -2105,14 +2028,13 @@ void XMLTextImportHelper::SetOutlineStyles( sal_Bool bSetEmptyLevels ) } const sal_Int32 nCount = m_pImpl->m_xChapterNumbering->getCount(); - // --> OD 2009-11-13 #i106218# - // First collect all paragraph styles choosen for assignment to each - // list level of the outline style, then perform the intrinsic assignment. - // Reason: The assignment of a certain paragraph style to a list level - // of the outline style causes side effects on the children - // paragraph styles in Writer. + /* First collect all paragraph styles choosen for assignment to each + list level of the outline style, then perform the intrinsic assignment. + Reason: The assignment of a certain paragraph style to a list level + of the outline style causes side effects on the children + paragraph styles in Writer. (#i106218#) + */ ::std::vector<OUString> sChosenStyles(nCount); - // <-- for( sal_Int32 i=0; i < nCount; ++i ) { if ( bSetEmptyLevels || @@ -2150,23 +2072,21 @@ void XMLTextImportHelper::SetOutlineStyles( sal_Bool bSetEmptyLevels ) } } } - // --> OD 2009-11-13 #i106218# + // Trashed outline numbering in ODF 1.1 text document created by OOo 3.x (#i106218#) Sequence < PropertyValue > aProps( 1 ); PropertyValue *pProps = aProps.getArray(); pProps->Name = s_HeadingStyleName; for ( sal_Int32 i = 0; i < nCount; ++i ) { - // --> OD 2009-12-11 #i107610# + // Paragraph style assignments in Outline of template lost from second level on (#i107610#) if ( bSetEmptyLevels || sChosenStyles[i].getLength() > 0 ) - // <-- { pProps->Value <<= sChosenStyles[i]; m_pImpl->m_xChapterNumbering->replaceByIndex(i, makeAny( aProps )); } } - // <-- } } @@ -2297,7 +2217,6 @@ void XMLTextImportHelper::SetRuby( rImport.GetStyleDisplayName( XML_STYLE_FAMILY_TEXT_TEXT, rTextStyleName ) ); if( (sDisplayName.getLength() > 0) && -// xPropSetInfo->hasPropertyByName( sRubyCharStyleName ) && m_pImpl->m_xTextStyles->hasByName( sDisplayName )) { xPropSet->setPropertyValue(sRubyCharStyleName, makeAny(sDisplayName)); @@ -2463,12 +2382,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( case XML_TOK_TEXT_INDEX_TITLE: case XML_TOK_TEXT_SECTION: -#ifndef SVX_LIGHT pContext = new XMLSectionImportContext( rImport, nPrefix, rLocalName ); -#else - // create default context to skip content - pContext = new SvXMLImportContext( rImport, nPrefix, rLocalName ); -#endif // #ifndef SVX_LIGHT break; case XML_TOK_TEXT_TOC: @@ -2478,23 +2392,13 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( case XML_TOK_TEXT_USER_INDEX: case XML_TOK_TEXT_ALPHABETICAL_INDEX: case XML_TOK_TEXT_BIBLIOGRAPHY_INDEX: -#ifndef SVX_LIGHT if( XML_TEXT_TYPE_SHAPE != eType ) pContext = new XMLIndexTOCContext( rImport, nPrefix, rLocalName ); -#else - // create default context to skip content - pContext = new SvXMLImportContext( rImport, nPrefix, rLocalName ); -#endif // #ifndef SVX_LIGHT break; case XML_TOK_TEXT_TRACKED_CHANGES: -#ifndef SVX_LIGHT pContext = new XMLTrackedChangesImportContext( rImport, nPrefix, rLocalName); -#else - // create default context to skip content - pContext = new SvXMLImportContext( rImport, nPrefix, rLocalName ); -#endif // #ifndef SVX_LIGHT bContent = sal_False; break; @@ -2509,12 +2413,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( break; case XML_TOK_TEXT_FORMS: -#ifndef SVX_LIGHT pContext = rImport.GetFormImport()->createOfficeFormsContext(rImport, nPrefix, rLocalName); -#else - // create default context to skip content - pContext = new SvXMLImportContext( rImport, nPrefix, rLocalName ); -#endif // #ifndef SVX_LIGHT bContent = sal_False; break; @@ -2527,12 +2426,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( break; case XML_TOK_TEXT_CALCULATION_SETTINGS: -#ifndef SVX_LIGHT pContext = new XMLCalculationSettingsContext ( rImport, nPrefix, rLocalName, xAttrList); -#else - // create default context to skip content - pContext = new SvXMLImportContext( rImport, nPrefix, rLocalName ); -#endif // #ifndef SVX_LIGHT bContent = sal_False; break; @@ -2548,9 +2442,6 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( } } -// if( !pContext ) -// pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName ); - // handle open redlines if ( (XML_TOK_TEXT_CHANGE != nToken) && (XML_TOK_TEXT_CHANGE_END != nToken) && @@ -2787,7 +2678,8 @@ void XMLTextImportHelper::pushFieldCtx( ::rtl::OUString name, ::rtl::OUString ty void XMLTextImportHelper::popFieldCtx() { - m_pImpl->m_FieldStack.pop(); + if ( !m_pImpl->m_FieldStack.empty() ) + m_pImpl->m_FieldStack.pop(); } void XMLTextImportHelper::addFieldParam( ::rtl::OUString name, ::rtl::OUString value ) @@ -3060,3 +2952,4 @@ XMLTextImportHelper::SetCellParaStyleDefault(::rtl::OUString const& rNewValue) return m_pImpl->m_sCellParaStyleDefault; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/txtimppr.cxx b/xmloff/source/text/txtimppr.cxx index 93e8750b8fb2..dcd8c9f559e1 100644 --- a/xmloff/source/text/txtimppr.cxx +++ b/xmloff/source/text/txtimppr.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 <com/sun/star/awt/FontFamily.hpp> #include <com/sun/star/awt/FontPitch.hpp> -#include <com/sun/star/table/BorderLine.hpp> +#include <com/sun/star/table/BorderLine2.hpp> #include <com/sun/star/text/VertOrientation.hpp> #include <com/sun/star/text/SizeType.hpp> #include <tools/string.hxx> @@ -52,7 +53,7 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::table; using namespace ::com::sun::star::text; -sal_Bool XMLTextImportPropertyMapper::handleSpecialItem( +bool XMLTextImportPropertyMapper::handleSpecialItem( XMLPropertyState& rProperty, ::std::vector< XMLPropertyState >& rProperties, const ::rtl::OUString& rValue, @@ -311,7 +312,6 @@ void XMLTextImportPropertyMapper::finished( XMLPropertyState* pNewBorders[4] = { 0, 0, 0, 0 }; XMLPropertyState* pAllBorderWidth = 0; XMLPropertyState* pBorderWidths[4] = { 0, 0, 0, 0 }; - XMLPropertyState* pAnchorType = 0; XMLPropertyState* pVertOrient = 0; XMLPropertyState* pVertOrientRelAsChar = 0; XMLPropertyState* pBackTransparency = NULL; // transparency in % @@ -367,7 +367,7 @@ void XMLTextImportPropertyMapper::finished( case CTF_RIGHTBORDERWIDTH: pBorderWidths[XML_LINE_RIGHT] = property; break; case CTF_TOPBORDERWIDTH: pBorderWidths[XML_LINE_TOP] = property; break; case CTF_BOTTOMBORDERWIDTH: pBorderWidths[XML_LINE_BOTTOM] = property; break; - case CTF_ANCHORTYPE: pAnchorType = property; break; + case CTF_ANCHORTYPE: break; case CTF_VERTICALPOS: pVertOrient = property; break; case CTF_VERTICALREL_ASCHAR: pVertOrientRelAsChar = property; break; @@ -434,7 +434,7 @@ void XMLTextImportPropertyMapper::finished( { if (pAllParaMargin && !pParaMargins[i]) { -#ifdef DBG_UTIL +#if OSL_DEBUG_LEVEL > 0 sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId( pAllParaMargin->mnIndex + (2*i) + 2 ); OSL_ENSURE( nTmp >= CTF_PARALEFTMARGIN && @@ -446,7 +446,7 @@ void XMLTextImportPropertyMapper::finished( } if (pAllMargin && !pMargins[i]) { -#ifdef DBG_UTIL +#if OSL_DEBUG_LEVEL > 0 sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId( pAllMargin->mnIndex + i + 1 ); OSL_ENSURE( nTmp >= CTF_MARGINLEFT && nTmp <= CTF_MARGINBOTTOM, @@ -486,77 +486,21 @@ void XMLTextImportPropertyMapper::finished( else pBorderWidths[i]->mnIndex = -1; -#ifdef XML_CHECK_UI_CONSTRAINS - sal_Bool bHasBorder = sal_False; - if( pBorders[i] ) - { - table::BorderLine aBorderLine; - pBorders[i]->maValue >>= aBorderLine; - - if( pBorderWidths[i] ) - { - table::BorderLine aBorderLineWidth; - pBorderWidths[i]->maValue >>= aBorderLineWidth; - aBorderLine.OuterLineWidth = aBorderLineWidth.OuterLineWidth; - aBorderLine.InnerLineWidth = aBorderLineWidth.InnerLineWidth; - aBorderLine.LineDistance = aBorderLineWidth.LineDistance; - - pBorders[i]->maValue <<= aBorderLine; - } - bHasBorder = (aBorderLine.OuterLineWidth + - aBorderLine.InnerLineWidth) > 0; - } - if( bHasBorder ) - { - if( !pBorderDistances[i] ) - { -#ifdef DBG_UTIL - sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId( - pBorders[i]->mnIndex + 5 ); - DBG_ASSERT( nTmp >= CTF_LEFTBORDERDISTANCE && - nTmp <= CTF_BOTTOMBORDERDISTANCE, - "wrong property context id" ); -#endif - - pNewBorderDistances[i] = - new XMLPropertyState( pBorders[i]->mnIndex + 5 ); - pNewBorderDistances[i]->maValue <<= (sal_Int32)MIN_BORDER_DIST; - pBorderDistances[i] = pNewBorderDistances[i]; - } - else - { - sal_Int32 nDist; - pBorderDistances[i]->maValue >>= nDist; - if( nDist < MIN_BORDER_DIST ) - pBorderDistances[i]->maValue <<= (sal_Int32)MIN_BORDER_DIST; - } - } - else - { - if( pBorderDistances[i] ) - { - sal_Int32 nDist; - pBorderDistances[i]->maValue >>= nDist; - if( nDist > 0 ) - pBorderDistances[i]->maValue <<= (sal_Int32)0; - } - } -#else if( pBorders[i] && pBorderWidths[i] ) { - table::BorderLine aBorderLine; + table::BorderLine2 aBorderLine; pBorders[i]->maValue >>= aBorderLine; - table::BorderLine aBorderLineWidth; + table::BorderLine2 aBorderLineWidth; pBorderWidths[i]->maValue >>= aBorderLineWidth; aBorderLine.OuterLineWidth = aBorderLineWidth.OuterLineWidth; aBorderLine.InnerLineWidth = aBorderLineWidth.InnerLineWidth; aBorderLine.LineDistance = aBorderLineWidth.LineDistance; + aBorderLine.LineWidth = aBorderLineWidth.LineWidth; pBorders[i]->maValue <<= aBorderLine; } -#endif } if (pAllParaMargin) @@ -796,3 +740,4 @@ void XMLTextImportPropertyMapper::finished( } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/txtlists.cxx b/xmloff/source/text/txtlists.cxx index ab90e2ae4000..58bedf74ee81 100644 --- a/xmloff/source/text/txtlists.cxx +++ b/xmloff/source/text/txtlists.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. @@ -51,9 +52,8 @@ XMLTextListsHelper::XMLTextListsHelper() : mpProcessedLists( 0 ), msLastProcessedListId(), msListStyleOfLastProcessedList(), - // --> OD 2008-08-15 #i92811# + // Inconsistent behavior regarding lists (#i92811#) mpMapListIdToListStyleDefaultListId( 0 ), - // <-- mpContinuingLists( 0 ), mpListStack( 0 ) { @@ -66,13 +66,12 @@ XMLTextListsHelper::~XMLTextListsHelper() mpProcessedLists->clear(); delete mpProcessedLists; } - // --> OD 2008-08-15 #i92811# + // Inconsistent behavior regarding lists (#i92811#)# if ( mpMapListIdToListStyleDefaultListId ) { mpMapListIdToListStyleDefaultListId->clear(); delete mpMapListIdToListStyleDefaultListId; } - // <-- if ( mpContinuingLists ) { mpContinuingLists->clear(); @@ -143,7 +142,7 @@ void XMLTextListsHelper::SetListItem( XMLTextListItemContext *i_pListItem ) } } -// --> OD 2008-08-15 #i92811# - handling for parameter <sListStyleDefaultListId> +// Handling for parameter <sListStyleDefaultListId> (#i92811#) void XMLTextListsHelper::KeepListAsProcessed( ::rtl::OUString sListId, ::rtl::OUString sListStyleName, ::rtl::OUString sContinueListId, @@ -168,7 +167,7 @@ void XMLTextListsHelper::KeepListAsProcessed( ::rtl::OUString sListId, msLastProcessedListId = sListId; msListStyleOfLastProcessedList = sListStyleName; - // --> OD 2008-08-15 #i92811# + // Inconsistent behavior regarding lists (#i92811#) if ( sListStyleDefaultListId.getLength() != 0 ) { if ( mpMapListIdToListStyleDefaultListId == 0 ) @@ -185,7 +184,6 @@ void XMLTextListsHelper::KeepListAsProcessed( ::rtl::OUString sListId, aListIdMapData; } } - // <-- } sal_Bool XMLTextListsHelper::IsListProcessed( const ::rtl::OUString sListId ) const @@ -240,15 +238,13 @@ const ::rtl::OUString& XMLTextListsHelper::GetListStyleOfLastProcessedList() con ::rtl::OUString XMLTextListsHelper::GenerateNewListId() const { - // --> OD 2008-08-06 #i92478# - ::rtl::OUString sTmpStr( ::rtl::OUString::createFromAscii( "list" ) ); - // <-- + // Value of xml:id in element <text:list> has to be a valid ID type (#i92478#) + ::rtl::OUString sTmpStr( RTL_CONSTASCII_USTRINGPARAM( "list" ) ); sal_Int64 n = Time().GetTime(); n += Date().GetDate(); n += rand(); - // --> OD 2008-08-06 #i92478# + // Value of xml:id in element <text:list> has to be a valid ID type (#i92478#) sTmpStr += ::rtl::OUString::valueOf( n ); - // <-- long nHitCount = 0; ::rtl::OUString sNewListId( sTmpStr ); @@ -265,8 +261,7 @@ const ::rtl::OUString& XMLTextListsHelper::GetListStyleOfLastProcessedList() con return sNewListId; } -// --> OD 2008-08-15 #i92811# -// provide list id for a certain list block for import +// Provide list id for a certain list block for import (#i92811#) ::rtl::OUString XMLTextListsHelper::GetListIdForListBlock( XMLTextListBlockContext& rListBlock ) { ::rtl::OUString sListBlockListId( rListBlock.GetContinueListId() ); @@ -296,7 +291,6 @@ const ::rtl::OUString& XMLTextListsHelper::GetListStyleOfLastProcessedList() con return sListBlockListId; } -// <-- void XMLTextListsHelper::StoreLastContinuingList( ::rtl::OUString sListId, ::rtl::OUString sContinuingListId ) @@ -358,7 +352,7 @@ XMLTextListsHelper::GetNumberedParagraphListId( const ::rtl::OUString i_StyleName) { if (!i_StyleName.getLength()) { - OSL_ENSURE(false, "invalid numbered-paragraph: no style-name"); + OSL_FAIL("invalid numbered-paragraph: no style-name"); } if (i_StyleName.getLength() && (i_Level < mLastNumberedParagraphs.size()) @@ -470,15 +464,6 @@ XMLTextListsHelper::MakeNumRule( uno::Any any = rNumStyles->getByName( sDisplayStyleName ); any >>= xStyle; - // --> OD 2008-05-07 #refactorlists# - no longer needed -// // If the style has not been used, the restart numbering has -// // to be set never. -// if ( mbRestartNumbering && !xStyle->isInUse() ) -// { -// mbRestartNumbering = sal_False; -// } - // <-- - uno::Reference< beans::XPropertySet > xPropSet( xStyle, uno::UNO_QUERY ); any = xPropSet->getPropertyValue(s_NumberingRules); @@ -491,18 +476,11 @@ XMLTextListsHelper::MakeNumRule( if( pListStyle ) { xNumRules = pListStyle->GetNumRules(); - // --> OD 2008-05-07 #refactorlists# - no longer needed -// sal_Bool bUsed = mxNumRules.is(); - // <-- if( !xNumRules.is() ) { pListStyle->CreateAndInsertAuto(); xNumRules = pListStyle->GetNumRules(); } - // --> OD 2008-05-07 #refactorlists# - no longer needed -// if( mbRestartNumbering && !bUsed ) -// mbRestartNumbering = sal_False; - // <-- } } } @@ -539,3 +517,4 @@ XMLTextListsHelper::MakeNumRule( return xNumRules; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 89b5c5c1ee48..7d402c935ee8 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.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. @@ -29,17 +30,14 @@ #include "precompiled_xmloff.hxx" #include "unointerfacetouniqueidentifiermapper.hxx" #include <tools/debug.hxx> -#ifndef _SVSTDARR_LONGS_DECL -#define _SVSTDARR_LONGS -#include <svl/svstdarr.hxx> -#endif #include <svl/svarray.hxx> #include <rtl/ustrbuf.hxx> #include <sal/types.h> #include <vector> #include <list> -#include <hash_map> +#include <boost/unordered_map.hpp> +#include <tools/string.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/container/XEnumerationAccess.hpp> @@ -52,7 +50,7 @@ #include <com/sun/star/text/XTextSectionsSupplier.hpp> #include <com/sun/star/text/XTextTablesSupplier.hpp> #include <com/sun/star/text/XNumberingRulesSupplier.hpp> -#include <com/sun/star/text/XChapterNumberingSupplier.hpp>//#outline level,add by zhaojianwei +#include <com/sun/star/text/XChapterNumberingSupplier.hpp> #include <com/sun/star/text/XTextTable.hpp> #include <com/sun/star/text/XText.hpp> #include <com/sun/star/text/XTextContent.hpp> @@ -117,9 +115,11 @@ #include "XMLTextCharStyleNamesElementExport.hxx" #include <comphelper/stlunosequence.hxx> -// --> OD 2008-04-25 #refactorlists# +#include <xmloff/odffields.hxx> +#include <com/sun/star/embed/ElementModes.hpp> +#include <com/sun/star/embed/XTransactedObject.hpp> +#include <com/sun/star/document/XStorageBasedDocument.hpp> #include <txtlists.hxx> -// <-- #include <com/sun/star/rdf/XMetadatable.hpp> using ::rtl::OUString; @@ -173,9 +173,9 @@ namespace static bool lcl_ShapeFilter(const Reference<XTextContent>& xTxtContent) { - static const OUString sTextFrameService = OUString::createFromAscii("com.sun.star.text.TextFrame"); - static const OUString sTextGraphicService = OUString::createFromAscii("com.sun.star.text.TextGraphicObject"); - static const OUString sTextEmbeddedService = OUString::createFromAscii("com.sun.star.text.TextEmbeddedObject"); + static const OUString sTextFrameService(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextFrame")); + static const OUString sTextGraphicService(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextGraphicObject")); + static const OUString sTextEmbeddedService(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextEmbeddedObject")); Reference<XShape> xShape(xTxtContent, UNO_QUERY); if(!xShape.is()) return false; @@ -217,7 +217,7 @@ namespace }; private: - typedef hash_map< + typedef boost::unordered_map< Reference<XTextFrame>, TextContentSet, FrameRefHash> framebound_map_t; @@ -228,8 +228,8 @@ namespace static const OUString our_sAnchorType; static const OUString our_sAnchorFrame; }; - const OUString BoundFrames::our_sAnchorType = OUString::createFromAscii("AnchorType"); - const OUString BoundFrames::our_sAnchorFrame = OUString::createFromAscii("AnchorFrame"); + const OUString BoundFrames::our_sAnchorType(RTL_CONSTASCII_USTRINGPARAM("AnchorType")); + const OUString BoundFrames::our_sAnchorFrame(RTL_CONSTASCII_USTRINGPARAM("AnchorFrame")); class FieldParamExporter { @@ -320,10 +320,8 @@ enum eParagraphPropertyNamesEnumAuto static const sal_Char* aParagraphPropertyNames[] = { "NumberingIsNumber", - "NumberingStyleName", //#outline level,add by zhaojianwei - - //"ParaChapterNumberingLevel", //#outline level,remove by zhaojianwei - "OutlineLevel", //<-end,add by zhaojianwei + "NumberingStyleName", + "OutlineLevel", "ParaConditionalStyleName", "ParaStyleName", "TextSection", @@ -333,9 +331,8 @@ static const sal_Char* aParagraphPropertyNames[] = enum eParagraphPropertyNamesEnum { NUMBERING_IS_NUMBER = 0, - PARA_NUMBERING_STYLENAME = 1, //#outline level,add by zhaojianwei - //PARA_CHAPTER_NUMERBING_LEVEL = 1, //#outline level,remove by zhaojianwei - PARA_OUTLINE_LEVEL=2, //<-end.add by zhaojianwei + PARA_NUMBERING_STYLENAME = 1, + PARA_OUTLINE_LEVEL=2, PARA_CONDITIONAL_STYLE_NAME = 3, PARA_STYLE_NAME = 4, TEXT_SECTION = 5 @@ -403,10 +400,10 @@ BoundFrameSets::BoundFrameSets(const Reference<XInterface> xModel) void FieldParamExporter::Export() { - static const Type aStringType = ::getCppuType((OUString*)0); - static const Type aBoolType = ::getCppuType((sal_Bool*)0); - static const Type aSeqType = ::getCppuType((Sequence<OUString>*)0); - static const Type aIntType = ::getCppuType((sal_Int32*)0); + const Type aStringType = ::getCppuType((OUString*)0); + const Type aBoolType = ::getCppuType((sal_Bool*)0); + const Type aSeqType = ::getCppuType((Sequence<OUString>*)0); + const Type aIntType = ::getCppuType((sal_Int32*)0); Sequence<OUString> vParameters(m_xFieldParams->getElementNames()); for(const OUString* pCurrent=::comphelper::stl_begin(vParameters); pCurrent!=::comphelper::stl_end(vParameters); ++pCurrent) { @@ -417,12 +414,33 @@ void FieldParamExporter::Export() OUString sValue; aValue >>= sValue; ExportParameter(*pCurrent,sValue); + + if ( pCurrent->equalsAscii( ODF_OLE_PARAM ) ) + { + // Save the OLE object + Reference< embed::XStorage > xTargetStg = m_pExport->GetTargetStorage(); + Reference< embed::XStorage > xDstStg = xTargetStg->openStorageElement( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OLELinks")), embed::ElementModes::WRITE ); + + if ( !xDstStg->hasByName( sValue ) ) { + Reference< XStorageBasedDocument > xStgDoc ( + m_pExport->GetModel( ), UNO_QUERY ); + Reference< embed::XStorage > xDocStg = xStgDoc->getDocumentStorage(); + Reference< embed::XStorage > xOleStg = xDocStg->openStorageElement( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OLELinks")), embed::ElementModes::READ ); + + xOleStg->copyElementTo( sValue, xDstStg, sValue ); + Reference< embed::XTransactedObject > xTransact( xDstStg, UNO_QUERY ); + if ( xTransact.is( ) ) + xTransact->commit( ); + } + } } else if(aValueType == aBoolType) { sal_Bool bValue = false; aValue >>= bValue; - ExportParameter(*pCurrent,OUString::createFromAscii(bValue ? "true" : "false")); + ExportParameter(*pCurrent, (bValue ? OUString(RTL_CONSTASCII_USTRINGPARAM( "true" )) : OUString(RTL_CONSTASCII_USTRINGPARAM("false"))) ); } else if(aValueType == aSeqType) { @@ -523,7 +541,7 @@ void XMLTextParagraphExport::Add( sal_uInt16 nFamily, ->hasPropertyByName( sIsAutomatic ) ) { bAdd = *(sal_Bool *)xNumPropSet->getPropertyValue( sIsAutomatic ).getValue(); - // --> OD 2007-01-12 #i73361# - check on outline style + // Check on outline style (#i73361#) const OUString sNumberingIsOutline( RTL_CONSTASCII_USTRINGPARAM( "NumberingIsOutline" ) ); if ( bAdd && xNumPropSet->getPropertySetInfo() @@ -531,7 +549,6 @@ void XMLTextParagraphExport::Add( sal_uInt16 nFamily, { bAdd = !(*(sal_Bool *)xNumPropSet->getPropertyValue( sNumberingIsOutline ).getValue()); } - // <-- } else { @@ -641,7 +658,7 @@ void XMLTextParagraphExport::Add( sal_uInt16 nFamily, ->hasPropertyByName( sIsAutomatic ) ) { bAdd = *(sal_Bool *)xNumPropSet->getPropertyValue( sIsAutomatic ).getValue(); - // --> OD 2007-01-12 #i73361# - check on outline style + // Check on outline style (#i73361#) const OUString sNumberingIsOutline( RTL_CONSTASCII_USTRINGPARAM( "NumberingIsOutline" ) ); if ( bAdd && xNumPropSet->getPropertySetInfo() @@ -649,7 +666,6 @@ void XMLTextParagraphExport::Add( sal_uInt16 nFamily, { bAdd = !(*(sal_Bool *)xNumPropSet->getPropertyValue( sNumberingIsOutline ).getValue()); } - // <-- } else { @@ -819,7 +835,6 @@ OUString XMLTextParagraphExport::FindTextStyle( } -// --> OD 2008-04-25 #refactorlists# // adjustments to support lists independent from list style void XMLTextParagraphExport::exportListChange( const XMLTextNumRuleInfo& rPrevInfo, @@ -828,13 +843,11 @@ void XMLTextParagraphExport::exportListChange( // end a list if ( rPrevInfo.GetLevel() > 0 ) { - bool bRootListToBeClosed = false; sal_Int16 nListLevelsToBeClosed = 0; if ( !rNextInfo.BelongsToSameList( rPrevInfo ) || rNextInfo.GetLevel() <= 0 ) { // close complete previous list - bRootListToBeClosed = true; nListLevelsToBeClosed = rPrevInfo.GetLevel(); } else if ( rPrevInfo.GetLevel() > rNextInfo.GetLevel() ) @@ -902,10 +915,8 @@ void XMLTextParagraphExport::exportListChange( bool bExportListStyle( true ); bool bRestartNumberingAtContinuedRootList( false ); sal_Int16 nRestartValueForContinuedRootList( -1 ); - // --> OD 2008-11-26 #158694# bool bContinueingPreviousSubList = !bRootListToBeStarted && rNextInfo.IsContinueingPreviousSubTree(); - // <-- do { GetExport().CheckAttrList(); @@ -917,11 +928,12 @@ void XMLTextParagraphExport::exportListChange( eODFDefaultVersion >= SvtSaveOptions::ODFVER_012 && sListId.getLength() > 0 ) { - // --> OD 2008-07-31 #i92221# + /* Property text:id at element <text:list> has to be + replaced by property xml:id (#i92221#) + */ GetExport().AddAttribute( XML_NAMESPACE_XML, XML_ID, sListId ); - // <-- } mpTextListsHelper->KeepListAsProcessed( sListId, sListStyleName, @@ -935,11 +947,12 @@ void XMLTextParagraphExport::exportListChange( eODFDefaultVersion >= SvtSaveOptions::ODFVER_012 && sListId.getLength() > 0 ) { - // --> OD 2008-07-31 #i92221# + /* Property text:id at element <text:list> has to be + replaced by property xml:id (#i92221#) + */ GetExport().AddAttribute( XML_NAMESPACE_XML, XML_ID, sNewListId ); - // <-- } const ::rtl::OUString sContinueListId = @@ -950,10 +963,9 @@ void XMLTextParagraphExport::exportListChange( sNewListId ); if ( sListStyleName == mpTextListsHelper->GetListStyleOfLastProcessedList() && - // --> OD 2008-08-15 #i92811# + // Inconsistent behavior regarding lists (#i92811#) sContinueListId == mpTextListsHelper->GetLastProcessedListId() && - // <-- !rNextInfo.IsRestart() ) { GetExport().AddAttribute( XML_NAMESPACE_TEXT, @@ -1000,14 +1012,12 @@ void XMLTextParagraphExport::exportListChange( bExportListStyle = false; } - // --> OD 2008-11-26 #158694# if ( bContinueingPreviousSubList ) { GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_CONTINUE_NUMBERING, XML_TRUE ); bContinueingPreviousSubList = false; } - // <-- enum XMLTokenEnum eLName = XML_LIST; @@ -1028,9 +1038,9 @@ void XMLTextParagraphExport::exportListChange( // <text:list-header> or <text:list-item> GetExport().CheckAttrList(); - // --> OD 2009-06-24 #i97309# - // export start value in case of <bRestartNumberingAtContinuedRootList> - // at correct list item + /* Export start value in case of <bRestartNumberingAtContinuedRootList> + at correct list item (#i97309#) + */ if ( nListLevelsToBeOpened == 1 ) { if ( rNextInfo.HasStartValue() ) @@ -1050,7 +1060,6 @@ void XMLTextParagraphExport::exportListChange( bRestartNumberingAtContinuedRootList = false; } } - // <-- eLName = ( rNextInfo.IsNumbered() || nListLevelsToBeOpened > 1 ) ? XML_LIST_ITEM @@ -1063,7 +1072,6 @@ void XMLTextParagraphExport::exportListChange( pListElements->Insert( pElem, pListElements->Count() ); - // --> OD 2008-11-26 #158694# // export of <text:number> element for last opened <text:list-item>, if requested if ( GetExport().exportTextNumberElement() && eLName == XML_LIST_ITEM && nListLevelsToBeOpened == 1 && // last iteration --> last opened <text:list-item> @@ -1078,8 +1086,6 @@ void XMLTextParagraphExport::exportListChange( GetExport().Characters( rNextInfo.ListLabelString() ); GetExport().EndElement( aTextNumberElem, sal_True ); } - // <-- - --nListLevelsToBeOpened; } while ( nListLevelsToBeOpened > 0 ); } @@ -1100,10 +1106,9 @@ void XMLTextParagraphExport::exportListChange( pListElements->Remove( pListElements->Count()-1 ); delete pElem; - // --> OD 2009-11-12 #i103745# - only for sub lists + // Only for sub lists (#i103745#) if ( rNextInfo.IsRestart() && !rNextInfo.HasStartValue() && rNextInfo.GetLevel() != 1 ) - // <-- { // start new sub list respectively list on same list level pElem = (*pListElements)[pListElements->Count()-1]; @@ -1121,7 +1126,7 @@ void XMLTextParagraphExport::exportListChange( GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_START_VALUE, aBuffer.makeStringAndClear() ); } - // --> OD 2009-11-12 #i103745# - handle restart without start value on list level 1 + // Handle restart without start value on list level 1 (#i103745#) else if ( rNextInfo.IsRestart() && /*!rNextInfo.HasStartValue() &&*/ rNextInfo.GetLevel() == 1 ) { @@ -1130,7 +1135,6 @@ void XMLTextParagraphExport::exportListChange( GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_START_VALUE, aBuffer.makeStringAndClear() ); } - // <-- if ( ( GetExport().getExportFlags() & EXPORT_OASIS ) != 0 && GetExport().getDefaultVersion() >= SvtSaveOptions::ODFVER_012 ) { @@ -1150,7 +1154,6 @@ void XMLTextParagraphExport::exportListChange( pListElements->Insert( pElem, pListElements->Count() ); - // --> OD 2008-11-26 #158694# // export of <text:number> element for <text:list-item>, if requested if ( GetExport().exportTextNumberElement() && rNextInfo.ListLabelString().getLength() > 0 ) @@ -1164,10 +1167,8 @@ void XMLTextParagraphExport::exportListChange( GetExport().Characters( rNextInfo.ListLabelString() ); GetExport().EndElement( aTextNumberElem, sal_True ); } - // <-- } } -// <-- XMLTextParagraphExport::XMLTextParagraphExport( SvXMLExport& rExp, @@ -1178,31 +1179,20 @@ XMLTextParagraphExport::XMLTextParagraphExport( pBoundFrameSets(new BoundFrameSets(GetExport().GetModel())), pFieldExport( 0 ), pListElements( 0 ), - // --> OD 2008-05-07 #refactorlists# - no longer needed -// pExportedLists( 0 ), - // <-- pListAutoPool( new XMLTextListAutoStylePool( this->GetExport() ) ), pSectionExport( NULL ), pIndexMarkExport( NULL ), - pRedlineExport( NULL ), pHeadingStyles( NULL ), - bProgress( sal_False ), bBlock( sal_False ), - bOpenRuby( sal_False ), - // --> OD 2008-04-25 #refactorlists# mpTextListsHelper( 0 ), maTextListsHelperStack(), - // <-- - sActualSize(RTL_CONSTASCII_USTRINGPARAM("ActualSize")), - // --> OD 2009-07-22 #i73249# -// sAlternativeText(RTL_CONSTASCII_USTRINGPARAM("AlternativeText")), + // Implement Title/Description Elements UI (#i73249#) sTitle(RTL_CONSTASCII_USTRINGPARAM("Title")), sDescription(RTL_CONSTASCII_USTRINGPARAM("Description")), - // <-- sAnchorCharStyleName(RTL_CONSTASCII_USTRINGPARAM("AnchorCharStyleName")), sAnchorPageNo(RTL_CONSTASCII_USTRINGPARAM("AnchorPageNo")), sAnchorType(RTL_CONSTASCII_USTRINGPARAM("AnchorType")), @@ -1346,10 +1336,7 @@ XMLTextParagraphExport::XMLTextParagraphExport( "", XML_NAMESPACE_STYLE, GetXMLToken(XML_TEXT_COMBINE)); pFieldExport = new XMLTextFieldExport( rExp, new XMLPropertyState( nIndex, uno::makeAny(sal_True) ) ); - - // --> OD 2008-05-08 #refactorlists# PushNewTextListsHelper(); - // <-- } XMLTextParagraphExport::~XMLTextParagraphExport() @@ -1360,19 +1347,13 @@ XMLTextParagraphExport::~XMLTextParagraphExport() delete pSectionExport; delete pFieldExport; delete pListElements; - // --> OD 2008-05-07 #refactorlists# - no longer needed -// delete pExportedLists; - // <-- delete pListAutoPool; #ifdef DBG_UTIL txtparae_bContainsIllegalCharacters = sal_False; #endif - // --> OD 2008-04-25 #refactorlists# - // also deletes <mpTextListsHelper> PopTextListsHelper(); DBG_ASSERT( maTextListsHelperStack.size() == 0, "misusage of text lists helper stack - it is not empty. Serious defect - please inform OD" ); - // <-- } SvXMLExportPropertyMapper *XMLTextParagraphExport::CreateShapeExtPropMapper( @@ -1537,7 +1518,7 @@ bool XMLTextParagraphExport::collectTextAutoStylesOptimized( sal_Bool bIsProgres { Reference < XPropertySet > xSet( xTextField, UNO_QUERY ); Reference < XText > xText; - Any a = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("TextRange") ); + Any a = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TextRange")) ); a >>= xText; if ( xText.is() ) { @@ -1638,9 +1619,8 @@ bool XMLTextParagraphExport::collectTextAutoStylesOptimized( sal_Bool bIsProgres { Reference< XIndexAccess > xNumberingRules = xNumberingRulesSupp->getNumberingRules(); nCount = xNumberingRules->getCount(); - // --> OD 2007-01-12 #i73361# + // Custom outline assignment lost after re-importing sxw (#i73361#) const OUString sNumberingIsOutline( RTL_CONSTASCII_USTRINGPARAM( "NumberingIsOutline" ) ); - // <-- for( sal_Int32 i = 0; i < nCount; ++i ) { Reference< XIndexReplace > xNumRule( xNumberingRules->getByIndex( i ), UNO_QUERY ); @@ -1661,14 +1641,13 @@ bool XMLTextParagraphExport::collectTextAutoStylesOptimized( sal_Bool bIsProgres ->hasPropertyByName( sIsAutomatic ) ) { bAdd = *(sal_Bool *)xNumPropSet->getPropertyValue( sIsAutomatic ).getValue(); - // --> OD 2007-01-12 #i73361# - check on outline style + // Check on outline style (#i73361#) if ( bAdd && xNumPropSet->getPropertySetInfo() ->hasPropertyByName( sNumberingIsOutline ) ) { bAdd = !(*(sal_Bool *)xNumPropSet->getPropertyValue( sNumberingIsOutline ).getValue()); } - // <-- } else { @@ -1828,17 +1807,14 @@ sal_Bool XMLTextParagraphExport::exportTextContentEnumeration( } else { - // --> OD 2006-09-27 #i69627# - // --> OD 2008-04-24 #refactorlists# - // pass list auto style pool to <XMLTextNumRuleInfo> instance - // --> OD 2008-11-26 #158694# - // pass info about request to export <text:number> element - // to <XMLTextNumRuleInfo> instance + /* Pass list auto style pool to <XMLTextNumRuleInfo> instance + Pass info about request to export <text:number> element + to <XMLTextNumRuleInfo> instance (#i69627#) + */ aNextNumInfo.Set( xTxtCntnt, GetExport().writeOutlineStyleAsNormalListStyle(), GetListAutoStylePool(), GetExport().exportTextNumberElement() ); - // <-- exportListAndSectionChange( xCurrentTextSection, aPropSetHelper, TEXT_SECTION, xTxtCntnt, @@ -2038,24 +2014,19 @@ void XMLTextParagraphExport::exportParagraph( } } - //if( rPropSetHelper.hasProperty( PARA_CHAPTER_NUMERBING_LEVEL ) ) //#outline level,zhaojianwei - if( rPropSetHelper.hasProperty( PARA_OUTLINE_LEVEL ) ) //<-end + if( rPropSetHelper.hasProperty( PARA_OUTLINE_LEVEL ) ) { if( xMultiPropSet.is() ) - //rPropSetHelper.getValue( PARA_CHAPTER_NUMERBING_LEVEL, //#outline level,zhaojianwei - rPropSetHelper.getValue( PARA_OUTLINE_LEVEL, //<-end + rPropSetHelper.getValue( PARA_OUTLINE_LEVEL, xMultiPropSet ) >>= nOutlineLevel; else - //rPropSetHelper.getValue( PARA_CHAPTER_NUMERBING_LEVEL, //#outline level,zhaojianwei - rPropSetHelper.getValue( PARA_OUTLINE_LEVEL, //<-end + rPropSetHelper.getValue( PARA_OUTLINE_LEVEL, xPropSet ) >>= nOutlineLevel; - //if( -1 != nOutlineLevel ) //#outline level,zhaojianwei - if( 0 < nOutlineLevel ) //<-end,zhaojianwei + if( 0 < nOutlineLevel ) { OUStringBuffer sTmp; - //sTmp.append( sal_Int32( nOutlineLevel + 1 ) ); //#outline level,zhaojianwei - sTmp.append( sal_Int32( nOutlineLevel) ); //<-end,zhaojianwei + sTmp.append( sal_Int32( nOutlineLevel) ); GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_OUTLINE_LEVEL, sTmp.makeStringAndClear() ); @@ -2080,7 +2051,7 @@ void XMLTextParagraphExport::exportParagraph( - bool bAssignedtoOutlineStyle = false;//#outline level,add by zhaojianwei + bool bAssignedtoOutlineStyle = false; { Reference< XChapterNumberingSupplier > xCNSupplier( GetExport().GetModel(), UNO_QUERY ); @@ -2098,11 +2069,9 @@ void XMLTextParagraphExport::exportParagraph( bAssignedtoOutlineStyle = ( sListStyleName == sOutlineName ); } } + } - } //<end,zhaojianwei - - //if( ! bIsNumber ) //#outline level,removed by zhaojianwei - if( ! bIsNumber && bAssignedtoOutlineStyle ) //#outline level,add by zhaojianwei + if( ! bIsNumber && bAssignedtoOutlineStyle ) GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_IS_LIST_HEADER, XML_TRUE ); @@ -2137,11 +2106,11 @@ void XMLTextParagraphExport::exportParagraph( ("NumberingStartValue")); - sal_Int32 nStartValue = 0; - if (xPropSetInfo-> hasPropertyByName(sNumberingStartValue)) { + sal_Int32 nStartValue = 0; + xPropSet->getPropertyValue(sNumberingStartValue) >>= nStartValue; @@ -2199,9 +2168,8 @@ void XMLTextParagraphExport::exportParagraph( if( bAutoStyles ) { - sal_Bool bPrevCharIsSpace = sal_True; if( bHasContentEnum ) - bPrevCharIsSpace = !exportTextContentEnumeration( + exportTextContentEnumeration( xContentEnum, bAutoStyles, xSection, bIsProgress, sal_True, 0, sal_True ); if ( bHasPortions ) @@ -2211,8 +2179,7 @@ void XMLTextParagraphExport::exportParagraph( { sal_Bool bPrevCharIsSpace = sal_True; enum XMLTokenEnum eElem = - //-1 == nOutlineLevel ? XML_P : XML_H; //#outline level,zhaojianwei - 0 < nOutlineLevel ? XML_H : XML_P; //<-end,zhaojianwei + 0 < nOutlineLevel ? XML_H : XML_P; SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT, eElem, sal_True, sal_False ); if( bHasContentEnum ) @@ -2311,53 +2278,62 @@ void XMLTextParagraphExport::exportTextRangeEnumeration( } else if (sType.equals(sTextFieldStart)) { - Reference<XNamed> xBookmark(xPropSet->getPropertyValue(sBookmark), UNO_QUERY); - if (xBookmark.is()) - { - GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_NAME, xBookmark->getName()); - } - Reference< ::com::sun::star::text::XFormField > xFormField(xPropSet->getPropertyValue(sBookmark), UNO_QUERY); - if (xFormField.is()) - { - GetExport().AddAttribute(XML_NAMESPACE_FIELD, XML_TYPE, xFormField->getFieldType()); - } - GetExport().StartElement(XML_NAMESPACE_FIELD, XML_FIELDMARK_START, sal_False); - if (xFormField.is()) + if ( GetExport().getDefaultVersion() == SvtSaveOptions::ODFVER_LATEST ) { - FieldParamExporter(&GetExport(), xFormField->getParameters()).Export(); + Reference<XNamed> xBookmark(xPropSet->getPropertyValue(sBookmark), UNO_QUERY); + if (xBookmark.is()) + { + GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_NAME, xBookmark->getName()); + } + Reference< ::com::sun::star::text::XFormField > xFormField(xPropSet->getPropertyValue(sBookmark), UNO_QUERY); + if (xFormField.is()) + { + GetExport().AddAttribute(XML_NAMESPACE_FIELD, XML_TYPE, xFormField->getFieldType()); + } + GetExport().StartElement(XML_NAMESPACE_FIELD, XML_FIELDMARK_START, sal_False); + if (xFormField.is()) + { + FieldParamExporter(&GetExport(), xFormField->getParameters()).Export(); + } + GetExport().EndElement(XML_NAMESPACE_FIELD, XML_FIELDMARK_START, sal_False); } - GetExport().EndElement(XML_NAMESPACE_FIELD, XML_FIELDMARK_START, sal_False); } else if (sType.equals(sTextFieldEnd)) { - GetExport().StartElement(XML_NAMESPACE_FIELD, XML_FIELDMARK_END, sal_False); - GetExport().EndElement(XML_NAMESPACE_FIELD, XML_FIELDMARK_END, sal_False); + if ( GetExport().getDefaultVersion() == SvtSaveOptions::ODFVER_LATEST ) + { + GetExport().StartElement(XML_NAMESPACE_FIELD, XML_FIELDMARK_END, sal_False); + GetExport().EndElement(XML_NAMESPACE_FIELD, XML_FIELDMARK_END, sal_False); + } } else if (sType.equals(sTextFieldStartEnd)) { - Reference<XNamed> xBookmark(xPropSet->getPropertyValue(sBookmark), UNO_QUERY); - if (xBookmark.is()) + if ( GetExport().getDefaultVersion() == SvtSaveOptions::ODFVER_LATEST ) { - GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_NAME, xBookmark->getName()); - } - Reference< ::com::sun::star::text::XFormField > xFormField(xPropSet->getPropertyValue(sBookmark), UNO_QUERY); - if (xFormField.is()) - { - GetExport().AddAttribute(XML_NAMESPACE_FIELD, XML_TYPE, xFormField->getFieldType()); - } - GetExport().StartElement(XML_NAMESPACE_FIELD, XML_FIELDMARK, sal_False); - if (xFormField.is()) - { - FieldParamExporter(&GetExport(), xFormField->getParameters()).Export(); + Reference<XNamed> xBookmark(xPropSet->getPropertyValue(sBookmark), UNO_QUERY); + if (xBookmark.is()) + { + GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_NAME, xBookmark->getName()); + } + Reference< ::com::sun::star::text::XFormField > xFormField(xPropSet->getPropertyValue(sBookmark), UNO_QUERY); + if (xFormField.is()) + { + GetExport().AddAttribute(XML_NAMESPACE_FIELD, XML_TYPE, xFormField->getFieldType()); + } + GetExport().StartElement(XML_NAMESPACE_FIELD, XML_FIELDMARK, sal_False); + if (xFormField.is()) + { + FieldParamExporter(&GetExport(), xFormField->getParameters()).Export(); + } + GetExport().EndElement(XML_NAMESPACE_FIELD, XML_FIELDMARK, sal_False); } - GetExport().EndElement(XML_NAMESPACE_FIELD, XML_FIELDMARK, sal_False); } else if (sType.equals(sSoftPageBreak)) { exportSoftPageBreak(xPropSet, bAutoStyles); } else { - DBG_ERROR("unknown text portion type"); + OSL_FAIL("unknown text portion type"); } } else @@ -2435,7 +2411,7 @@ void XMLTextParagraphExport::exportSoftPageBreak( void XMLTextParagraphExport::exportTextMark( const Reference<XPropertySet> & rPropSet, - const OUString sProperty, + const OUString& rProperty, const enum XMLTokenEnum pElements[], sal_Bool bAutoStyles) { @@ -2450,7 +2426,7 @@ void XMLTextParagraphExport::exportTextMark( if (!bAutoStyles) { // name element - Reference<XNamed> xName(rPropSet->getPropertyValue(sProperty), UNO_QUERY); + Reference<XNamed> xName(rPropSet->getPropertyValue(rProperty), UNO_QUERY); GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_NAME, xName->getName()); @@ -2716,10 +2692,9 @@ void XMLTextParagraphExport::exportAnyTextFrame( { if( FT_EMBEDDED == eType ) _collectTextEmbeddedAutoStyles( xPropSet ); - // --> OD 2004-08-09 #i28745# - no text frame style for shapes + // No text frame style for shapes (#i28745#) else if ( FT_SHAPE != eType ) Add( XML_STYLE_FAMILY_TEXT_FRAME, xPropSet ); - // <-- if( pRangePropSet && lcl_txtpara_isBoundAsChar( xPropSet, xPropSet->getPropertySetInfo() ) ) @@ -2869,10 +2844,8 @@ void XMLTextParagraphExport::_exportTextFrame( // image map GetExport().GetImageMapExport().Export( rPropSet ); - // --> OD 2009-07-22 #i73249# - // svg:title and svg:desc + // svg:title and svg:desc (#i73249#) exportTitleAndDescription( rPropSet, rPropSetInfo ); - // <-- } void XMLTextParagraphExport::exportContour( @@ -3064,10 +3037,8 @@ void XMLTextParagraphExport::_exportTextGraphic( // image map GetExport().GetImageMapExport().Export( rPropSet ); - // --> OD 2009-07-22 #i73249# - // svg:title and svg:desc + // svg:title and svg:desc (#i73249#) exportTitleAndDescription( rPropSet, rPropSetInfo ); - // <-- // draw:contour exportContour( rPropSet, rPropSetInfo ); @@ -3097,7 +3068,7 @@ void XMLTextParagraphExport::exportEvents( const Reference < XPropertySet > & rP GetExport().GetImageMapExport().Export( rPropSet ); } -// --> OD 2009-07-22 #i73249# +// Implement Title/Description Elements UI (#i73249#) void XMLTextParagraphExport::exportTitleAndDescription( const Reference < XPropertySet > & rPropSet, const Reference < XPropertySetInfo > & rPropSetInfo ) @@ -3128,7 +3099,6 @@ void XMLTextParagraphExport::exportTitleAndDescription( } } } -// <-- void XMLTextParagraphExport::setTextEmbeddedGraphicURL( const Reference < XPropertySet >&, @@ -3145,130 +3115,6 @@ sal_Bool XMLTextParagraphExport::addHyperlinkAttributes( OUString sHRef, sName, sTargetFrame, sUStyleName, sVStyleName; sal_Bool bServerMap = sal_False; -/* bool bHyperLinkURL = false; - bool bHyperLinkName = false; - bool bHyperLinkTarget = false; - bool bServer = false; - bool bUnvisitedCharStyleName = false; - bool bVisitedCharStyleName = false; - - const Reference< XMultiPropertySet > xMultiPropertySet( rPropSet, UNO_QUERY ); - if ( xMultiPropertySet.is() ) - { - sal_uInt32 nCount = 0; - Sequence< OUString > aPropertyNames( 6 ); - OUString* pArray = aPropertyNames.getArray(); - - if ( rPropSetInfo->hasPropertyByName( sServerMap ) ) - { - bServer = true; - pArray[ nCount++ ] = sServerMap; - } - if ( rPropSetInfo->hasPropertyByName( sHyperLinkName ) ) - { - bHyperLinkName = true; - pArray[ nCount++ ] = sHyperLinkName; - } - if ( rPropSetInfo->hasPropertyByName( sHyperLinkTarget ) ) - { - bHyperLinkTarget = true; - pArray[ nCount++ ] = sHyperLinkTarget; - } - if ( rPropSetInfo->hasPropertyByName( sHyperLinkURL ) ) - { - bHyperLinkURL = true; - pArray[ nCount++ ] = sHyperLinkURL; - } - if ( rPropSetInfo->hasPropertyByName( sUnvisitedCharStyleName ) ) - { - bUnvisitedCharStyleName = true; - pArray[ nCount++ ] = sUnvisitedCharStyleName; - } - if ( rPropSetInfo->hasPropertyByName( sVisitedCharStyleName ) ) - { - bVisitedCharStyleName = true; - pArray[ nCount++ ] = sVisitedCharStyleName; - } - - aPropertyNames.realloc( nCount ); - - if ( nCount ) - { - Sequence< PropertyState > aPropertyStates( nCount ); - PropertyState* pStateArray = aPropertyStates.getArray(); - - if ( rPropState.is() ) - aPropertyStates = rPropState->getPropertyStates( aPropertyNames ); - - Sequence< Any > aPropertyValues ( xMultiPropertySet->getPropertyValues( aPropertyNames ) ); - Any* pValueArray = aPropertyValues.getArray(); - - sal_uInt32 nIdx = 0; - - if ( bServer ) - { - if ( !rPropState.is() || PropertyState_DIRECT_VALUE == pStateArray[ nIdx ] ) - { - bServerMap = *(sal_Bool *)pValueArray[ nIdx ].getValue(); - if( bServerMap ) - bExport = sal_True; - } - ++nIdx; - } - if ( bHyperLinkName ) - { - if ( !rPropState.is() || PropertyState_DIRECT_VALUE == pStateArray[ nIdx ] ) - { - pValueArray[ nIdx ] >>= sName; - if( sName.getLength() > 0 ) - bExport = sal_True; - } - ++nIdx; - } - if ( bHyperLinkTarget ) - { - if ( !rPropState.is() || PropertyState_DIRECT_VALUE == pStateArray[ nIdx ] ) - { - pValueArray[ nIdx ] >>= sTargetFrame; - if( sTargetFrame.getLength() ) - bExport = sal_True; - } - ++nIdx; - } - if ( bHyperLinkURL ) - { - if ( !rPropState.is() || PropertyState_DIRECT_VALUE == pStateArray[ nIdx ] ) - { - pValueArray[ nIdx ] >>= sHRef; - if( sHRef.getLength() > 0 ) - bExport = sal_True; - } - ++nIdx; - } - if ( bUnvisitedCharStyleName ) - { - if ( !rPropState.is() || PropertyState_DIRECT_VALUE == pStateArray[ nIdx ] ) - { - pValueArray[ nIdx ] >>= sUStyleName; - if( sUStyleName.getLength() ) - bExport = sal_True; - } - ++nIdx; - } - if ( bVisitedCharStyleName ) - { - if ( !rPropState.is() || PropertyState_DIRECT_VALUE == pStateArray[ nIdx ] ) - { - pValueArray[ nIdx ] >>= sVStyleName; - if( sVStyleName.getLength() ) - bExport = sal_True; - } - ++nIdx; - } - } - } - else - {*/ if( rPropSetInfo->hasPropertyByName( sHyperLinkURL ) && ( !rPropState.is() || PropertyState_DIRECT_VALUE == rPropState->getPropertyState( sHyperLinkURL ) ) ) @@ -3853,7 +3699,6 @@ sal_Int32 XMLTextParagraphExport::GetHeadingLevel( const OUString& rStyleName ) return -1; } -// --> OD 2008-05-08 #refactorlists# void XMLTextParagraphExport::PushNewTextListsHelper() { mpTextListsHelper = new XMLTextListsHelper(); @@ -3870,4 +3715,5 @@ void XMLTextParagraphExport::PopTextListsHelper() mpTextListsHelper = maTextListsHelperStack.back(); } } -// <-- + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx index 697d3e6cd069..bc5149ca707a 100644 --- a/xmloff/source/text/txtparai.cxx +++ b/xmloff/source/text/txtparai.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. @@ -918,8 +919,8 @@ void XMLMetaImportContext::InsertMeta( const uno::Reference<rdf::XMetadatable> xMeta( XMLTextMarkImportContext::CreateAndInsertMark( GetImport(), - OUString::createFromAscii( - "com.sun.star.text.InContentMetadata"), + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.text.InContentMetadata")), OUString(), i_xInsertionRange, m_XmlId), uno::UNO_QUERY); @@ -997,8 +998,8 @@ void XMLMetaFieldImportContext::InsertMeta( const Reference<XPropertySet> xPropertySet( XMLTextMarkImportContext::CreateAndInsertMark( GetImport(), - OUString::createFromAscii( - "com.sun.star.text.textfield.MetadataField"), + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.text.textfield.MetadataField")), OUString(), i_xInsertionRange, m_XmlId), UNO_QUERY); @@ -1015,11 +1016,11 @@ void XMLMetaFieldImportContext::InsertMeta( if (-1 != nKey) { static ::rtl::OUString sPropertyIsFixedLanguage( - ::rtl::OUString::createFromAscii("IsFixedLanguage") ); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFixedLanguage")) ); Any any; any <<= nKey; xPropertySet->setPropertyValue( - OUString::createFromAscii("NumberFormat"), any); + OUString(RTL_CONSTASCII_USTRINGPARAM("NumberFormat")), any); if ( xPropertySet->getPropertySetInfo()-> hasPropertyByName( sPropertyIsFixedLanguage ) ) { @@ -1189,7 +1190,7 @@ void XMLIndexMarkImportContext_Impl::StartElement( } default: - DBG_ERROR("unknown index mark type!"); + OSL_FAIL("unknown index mark type!"); break; } } @@ -1249,7 +1250,7 @@ void XMLIndexMarkImportContext_Impl::ProcessAttribute( break; default: - DBG_ERROR("unknown index mark type!"); + OSL_FAIL("unknown index mark type!"); break; } } @@ -1300,7 +1301,7 @@ void XMLIndexMarkImportContext_Impl::GetServiceName( default: { - DBG_ERROR("unknown index mark type!"); + OSL_FAIL("unknown index mark type!"); OUString sTmp; sServiceName = sTmp; break; @@ -1540,7 +1541,8 @@ void XMLAlphaIndexMarkImportContext_Impl::ProcessAttribute( } else if ( IsXMLToken( sLocalName, XML_MAIN_ENTRY ) ) { - sal_Bool bMainEntry = sal_False, bTmp; + sal_Bool bMainEntry = sal_False; + bool bTmp; if (SvXMLUnitConverter::convertBool(bTmp, sValue)) bMainEntry = bTmp; @@ -1694,7 +1696,6 @@ SvXMLImportContext *XMLImpSpanContext_Impl::CreateChildContext( break; case XML_TOK_TEXT_NOTE: -#ifndef SVX_LIGHT if (rImport.GetTextImport()->IsInFrame()) { // we must not insert footnotes into text frames @@ -1707,10 +1708,6 @@ SvXMLImportContext *XMLImpSpanContext_Impl::CreateChildContext( *rImport.GetTextImport().get(), nPrefix, rLocalName ); } -#else - // create default context to skip content - pContext = new SvXMLImportContext( rImport, nPrefix, rLocalName ); -#endif // #ifndef SVX_LIGHT rIgnoreLeadingSpace = sal_False; break; @@ -1751,11 +1748,10 @@ SvXMLImportContext *XMLImpSpanContext_Impl::CreateChildContext( new XMLTextFrameContext( rImport, nPrefix, rLocalName, xAttrList, TextContentAnchorType_AS_CHARACTER ); - // --> OD 2004-08-24 #i33242# - remove check for text content. + // Remove check for text content. (#i33242#) // Check for text content is done on the processing of the hint if( TextContentAnchorType_AT_CHARACTER == pTextFrameContext->GetAnchorType() ) - // <-- { rHints.Insert( new XMLTextFrameHint_Impl( pTextFrameContext, xAnchorPos ), @@ -1904,15 +1900,14 @@ XMLParaContext::XMLParaContext( m_bHaveAbout(false), nOutlineLevel( IsXMLToken( rLName, XML_H ) ? 1 : -1 ), pHints( 0 ), - // --> OD 2007-07-25 #i73509# + // Lost outline numbering in master document (#i73509#) mbOutlineLevelAttrFound( sal_False ), - // <-- bIgnoreLeadingSpace( sal_True ), bHeading( bHead ), bIsListHeader( false ), bIsRestart (false), - nStartValue(0) - ,nStarFontsConvFlags( 0 ) + nStartValue(0), + nStarFontsConvFlags( 0 ) { const SvXMLTokenMap& rTokenMap = GetImport().GetTextImport()->GetTextPAttrTokenMap(); @@ -1970,14 +1965,13 @@ XMLParaContext::XMLParaContext( nTmp = 127; nOutlineLevel = (sal_Int8)nTmp; } - // --> OD 2007-07-25 #i73509# + // Lost outline numbering in master document (#i73509#) mbOutlineLevelAttrFound = sal_True; - // <-- } break; case XML_TOK_TEXT_P_IS_LIST_HEADER: { - sal_Bool bBool; + bool bBool; if( SvXMLUnitConverter::convertBool( bBool, rValue ) ) { bIsListHeader = bBool; @@ -1986,7 +1980,7 @@ XMLParaContext::XMLParaContext( break; case XML_TOK_TEXT_P_RESTART_NUMBERING: { - sal_Bool bBool; + bool bBool; if (SvXMLUnitConverter::convertBool(bBool, rValue)) { bIsRestart = bBool; @@ -2075,15 +2069,14 @@ XMLParaContext::~XMLParaContext() OUString const sCellParaStyleName(xTxtImport->GetCellParaStyleDefault()); if( sCellParaStyleName.getLength() > 0 ) { - // --> OD 2007-08-16 #i80724# - // suppress handling of outline and list attributes, - // because of side effects of method <SetStyleAndAttrs(..)> + /* Suppress handling of outline and list attributes, + because of side effects of method <SetStyleAndAttrs(..)> (#i80724#) + */ xTxtImport->SetStyleAndAttrs( GetImport(), xAttrCursor, sCellParaStyleName, sal_True, sal_False, -1, // suppress outline handling sal_False ); // suppress list attributes handling - // <-- } // #103445# for headings without style name, find the proper style @@ -2091,13 +2084,12 @@ XMLParaContext::~XMLParaContext() xTxtImport->FindOutlineStyleName( sStyleName, nOutlineLevel ); // set style and hard attributes at the previous paragraph - // --> OD 2007-07-25 #i73509# - add paramter <mbOutlineLevelAttrFound> + // Add paramter <mbOutlineLevelAttrFound> (#i73509#) sStyleName = xTxtImport->SetStyleAndAttrs( GetImport(), xAttrCursor, sStyleName, sal_True, mbOutlineLevelAttrFound, bHeading ? nOutlineLevel : -1 ); - // <-- // handle list style header if (bHeading && (bIsListHeader || bIsRestart)) @@ -2212,21 +2204,23 @@ XMLParaContext::~XMLParaContext() { const XMLTextFrameHint_Impl *pFHint = (const XMLTextFrameHint_Impl *)pHint; - // --> OD 2004-08-24 #i33242# - check for text content + // Check for text content (#i33242#) Reference < XTextContent > xTextContent = pFHint->GetTextContent(); if ( xTextContent.is() ) { - // OD 2004-04-20 #i26791# + /* Core impl. of the unification of drawing objects and + Writer fly frames (#i26791#) + */ Reference<XTextRange> xRange(xAttrCursor, UNO_QUERY); if ( pFHint->IsBoundAtChar() ) { xTextContent->attach( xRange ); } } - // <-- - // --> OD 2004-08-24 #i33242# - consider, that hint can - // also contain a shape - e.g. drawing object of type 'Text'. + /* Consider, that hint can also contain a shape - + e.g. drawing object of type 'Text'. (#i33242#) + */ else { Reference < XShape > xShape = pFHint->GetShape(); @@ -2252,16 +2246,16 @@ XMLParaContext::~XMLParaContext() } } } - // <-- } break; - // --> DVO, OD 2004-07-14 #i26791# + /* Core impl. of the unification of drawing objects and + Writer fly frames (#i26791#) + */ case XML_HINT_DRAW: { const XMLDrawHint_Impl *pDHint = static_cast<const XMLDrawHint_Impl*>(pHint); - // --> OD 2004-08-24 #i33242# - improvement: hint directly - // provides the shape. + // Improvement: hint directly provides the shape. (#i33242#) Reference < XShape > xShape = pDHint->GetShape(); if ( xShape.is() ) { @@ -2283,11 +2277,8 @@ XMLParaContext::~XMLParaContext() xPropSet->setPropertyValue(sTextRange, aPos); } } - // <-- } break; - // <-- - default: DBG_ASSERT( !this, "What's this" ); break; @@ -2444,3 +2435,5 @@ SvXMLImportContext *XMLNumberedParaContext::CreateChildContext( return pContext; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/txtparai.hxx b/xmloff/source/text/txtparai.hxx index ecd593ca3d4f..3aba676617d8 100644 --- a/xmloff/source/text/txtparai.hxx +++ b/xmloff/source/text/txtparai.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. @@ -54,9 +55,8 @@ class XMLParaContext : public SvXMLImportContext bool m_bHaveAbout; sal_Int8 nOutlineLevel; XMLHints_Impl *pHints; - // --> OD 2007-07-25 #i73509# + // Lost outline numbering in master document (#i73509#) sal_Bool mbOutlineLevelAttrFound; - // <-- sal_Bool bIgnoreLeadingSpace; sal_Bool bHeading; sal_Bool bIsListHeader; @@ -129,3 +129,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/txtparaimphint.hxx b/xmloff/source/text/txtparaimphint.hxx index 17c1a155692c..4c1ba62fd7fc 100644 --- a/xmloff/source/text/txtparaimphint.hxx +++ b/xmloff/source/text/txtparaimphint.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. @@ -48,9 +49,8 @@ using namespace ::xmloff::token; #define XML_HINT_HYPERLINK 3 #define XML_HINT_INDEX_MARK 5 #define XML_HINT_TEXT_FRAME 6 -// --> DVO, OD 2004-07-14 #i26791# +// Core impl. of the unification of drawing objects and Writer fly frames (#i26791#) #define XML_HINT_DRAW 7 -// <-- class XMLHint_Impl { @@ -237,7 +237,7 @@ public: return xTxt; } - // --> OD 2004-08-24 #i33242# + // Frame "to character": anchor moves from first to last char after saving (#i33242#) Reference < drawing::XShape > GetShape() const { Reference < drawing::XShape > xShape; @@ -249,7 +249,6 @@ public: return xShape; } - // <-- sal_Bool IsBoundAtChar() const { @@ -267,7 +266,7 @@ public: } }; -// --> DVO, OD 2004-07-14 #i26791# +// Core impl. of the unification of drawing objects and Writer fly frames (#i26791#) class XMLDrawHint_Impl : public XMLHint_Impl { SvXMLImportContextRef xContext; @@ -285,12 +284,12 @@ public: { } - // --> OD 2004-08-24 #i33242# + // Frame "to character": anchor moves from first to last char after saving (#i33242#) Reference < drawing::XShape > GetShape() const { return static_cast<SvXMLShapeContext*>(&xContext)->getShape(); } - // <-- }; -// <-- #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/txtprhdl.cxx b/xmloff/source/text/txtprhdl.cxx index 9c3d50d6f9ed..a430339fcadd 100644 --- a/xmloff/source/text/txtprhdl.cxx +++ b/xmloff/source/text/txtprhdl.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. @@ -48,13 +49,9 @@ #include "XMLAnchorTypePropHdl.hxx" #include <xmloff/XMLConstantsPropertyHandler.hxx> #include "XMLClipPropertyHandler.hxx" -#ifndef _XMLOFF_XMLTEXTCOLUMNSPPROPERTYHANDLER_HXX #include "XMLTextColumnsPropertyHandler.hxx" -#endif #include <xmloff/NamedBoolPropertyHdl.hxx> -#ifndef _XMLOFF_TXTPRHDL_HXX #include "txtprhdl.hxx" -#endif // OD 2004-05-05 #i28701# #include <com/sun/star/text/WrapInfluenceOnPosition.hpp> @@ -62,11 +59,8 @@ using ::rtl::OUString; using ::rtl::OUStringBuffer; -//using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::style; -//using namespace ::com::sun::star::container; -//using namespace ::com::sun::star::beans; using namespace ::com::sun::star::text; using namespace ::xmloff::token; @@ -75,7 +69,7 @@ using namespace ::xmloff::token; // --------------------------------------------------------------------------- -SvXMLEnumMapEntry __READONLY_DATA pXML_HoriPos_Enum[] = +SvXMLEnumMapEntry const pXML_HoriPos_Enum[] = { { XML_FROM_LEFT, HoriOrientation::NONE }, { XML_FROM_INSIDE, HoriOrientation::NONE }, // import only @@ -87,7 +81,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_HoriPos_Enum[] = { XML_TOKEN_INVALID, 0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_HoriPosMirrored_Enum[] = +SvXMLEnumMapEntry const pXML_HoriPosMirrored_Enum[] = { { XML_FROM_INSIDE, HoriOrientation::NONE }, { XML_INSIDE, HoriOrientation::LEFT }, @@ -96,7 +90,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_HoriPosMirrored_Enum[] = { XML_TOKEN_INVALID, 0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_HoriRel_Enum[] = +SvXMLEnumMapEntry const pXML_HoriRel_Enum[] = { { XML_PARAGRAPH, RelOrientation::FRAME }, { XML_PARAGRAPH_CONTENT, RelOrientation::PRINT_AREA }, @@ -114,7 +108,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_HoriRel_Enum[] = { XML_TOKEN_INVALID, 0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_HoriRelFrame_Enum[] = +SvXMLEnumMapEntry const pXML_HoriRelFrame_Enum[] = { { XML_FRAME, RelOrientation::FRAME }, { XML_FRAME_CONTENT, RelOrientation::PRINT_AREA }, @@ -128,7 +122,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_HoriRelFrame_Enum[] = { XML_TOKEN_INVALID, 0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_HoriMirror_Enum[] = +SvXMLEnumMapEntry const pXML_HoriMirror_Enum[] = { { XML_FROM_LEFT, sal_False }, { XML_FROM_INSIDE, sal_True }, @@ -140,7 +134,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_HoriMirror_Enum[] = { XML_TOKEN_INVALID, 0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_VertPos_Enum[] = +SvXMLEnumMapEntry const pXML_VertPos_Enum[] = { { XML_FROM_TOP, VertOrientation::NONE }, { XML_TOP, VertOrientation::TOP }, @@ -156,7 +150,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_VertPos_Enum[] = { XML_TOKEN_INVALID, 0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_VertPosAtChar_Enum[] = +SvXMLEnumMapEntry const pXML_VertPosAtChar_Enum[] = { { XML_FROM_TOP, VertOrientation::NONE }, { XML_TOP, VertOrientation::TOP }, @@ -171,7 +165,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_VertPosAtChar_Enum[] = { XML_TOKEN_INVALID, 0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_VertRel_Enum[] = +SvXMLEnumMapEntry const pXML_VertRel_Enum[] = { { XML_PARAGRAPH, RelOrientation::FRAME }, { XML_PARAGRAPH_CONTENT, RelOrientation::PRINT_AREA }, @@ -186,7 +180,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_VertRel_Enum[] = { XML_TOKEN_INVALID, 0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_VertRelPage_Enum[] = +SvXMLEnumMapEntry const pXML_VertRelPage_Enum[] = { { XML_PAGE, RelOrientation::FRAME }, { XML_PAGE_CONTENT, RelOrientation::PRINT_AREA }, @@ -195,14 +189,14 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_VertRelPage_Enum[] = { XML_TOKEN_INVALID, 0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_VertRelFrame_Enum[] = +SvXMLEnumMapEntry const pXML_VertRelFrame_Enum[] = { { XML_FRAME, RelOrientation::FRAME }, { XML_FRAME_CONTENT, RelOrientation::PRINT_AREA }, { XML_TOKEN_INVALID, 0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_VertRelAsChar_Enum[] = +SvXMLEnumMapEntry const pXML_VertRelAsChar_Enum[] = { { XML_BASELINE, VertOrientation::TOP }, { XML_BASELINE, VertOrientation::CENTER }, // export only @@ -216,7 +210,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_VertRelAsChar_Enum[] = { XML_TOKEN_INVALID, 0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_RubyAdjust_Enum[] = +SvXMLEnumMapEntry const pXML_RubyAdjust_Enum[] = { { XML_LEFT, RubyAdjust_LEFT }, { XML_CENTER, RubyAdjust_CENTER }, @@ -226,7 +220,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_RubyAdjust_Enum[] = { XML_TOKEN_INVALID, 0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_FontRelief_Enum[] = +SvXMLEnumMapEntry const pXML_FontRelief_Enum[] = { { XML_NONE, FontRelief::NONE }, { XML_ENGRAVED, FontRelief::ENGRAVED }, @@ -234,7 +228,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_FontRelief_Enum[] = { XML_TOKEN_INVALID, 0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_VerticalAlign_Enum[] = +SvXMLEnumMapEntry const pXML_VerticalAlign_Enum[] = { { XML_TOP, ParagraphVertAlign::TOP }, { XML_MIDDLE, ParagraphVertAlign::CENTER }, @@ -245,14 +239,12 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_VerticalAlign_Enum[] = }; // OD 2004-05-05 #i28701# -SvXMLEnumMapEntry __READONLY_DATA pXML_WrapInfluenceOnPosition_Enum[] = +SvXMLEnumMapEntry const pXML_WrapInfluenceOnPosition_Enum[] = { - // --> OD 2004-10-18 #i35017# - tokens have been renamed and - // <XML_ITERATIVE> has been added + // Tokens have been renamed and <XML_ITERATIVE> has been added (#i35017#) { XML_ONCE_SUCCESSIVE, WrapInfluenceOnPosition::ONCE_SUCCESSIVE }, { XML_ONCE_CONCURRENT, WrapInfluenceOnPosition::ONCE_CONCURRENT }, { XML_ITERATIVE, WrapInfluenceOnPosition::ITERATIVE }, - // <-- { XML_TOKEN_INVALID, 0 } }; @@ -475,7 +467,7 @@ XMLParagraphOnlyPropHdl_Impl::~XMLParagraphOnlyPropHdl_Impl() // --------------------------------------------------------------------------- -SvXMLEnumMapEntry __READONLY_DATA pXML_Wrap_Enum[] = +SvXMLEnumMapEntry const pXML_Wrap_Enum[] = { { XML_NONE, WrapTextMode_NONE }, { XML_RUN_THROUGH, WrapTextMode_THROUGHT }, @@ -622,7 +614,7 @@ XMLFrameProtectPropHdl_Impl::~XMLFrameProtectPropHdl_Impl() // --------------------------------------------------------------------------- -SvXMLEnumMapEntry __READONLY_DATA pXML_Anchor_Enum[] = +SvXMLEnumMapEntry const pXML_Anchor_Enum[] = { { XML_CHAR, TextContentAnchorType_AT_CHARACTER }, { XML_PAGE, TextContentAnchorType_AT_PAGE }, @@ -857,12 +849,12 @@ sal_Bool XMLGrfMirrorPropHdl_Impl::exportXML( rStrExpValue = sVal; } else if( bHori && - // --> OD 2005-05-12 #i49139# - // XML_HORIZONTAL_ON_LEFT_PAGES and XML_HORIZONTAL_ON_RIGHT_PAGES - // are replaced by XML_HORIZONTAL_ON_EVEN and XML_HORIZONTAL_ON_ODD. + /* XML_HORIZONTAL_ON_LEFT_PAGES and XML_HORIZONTAL_ON_RIGHT_PAGES + are replaced by XML_HORIZONTAL_ON_EVEN and XML_HORIZONTAL_ON_ODD. + (#i49139#) + */ ( IsXMLToken( rStrExpValue, XML_HORIZONTAL_ON_EVEN ) || IsXMLToken( rStrExpValue, XML_HORIZONTAL_ON_ODD ) )) - // <-- { rStrExpValue = GetXMLToken( XML_HORIZONTAL ); } @@ -890,7 +882,7 @@ XMLGrfMirrorPropHdl_Impl::~XMLGrfMirrorPropHdl_Impl() // --------------------------------------------------------------------------- -SvXMLEnumMapEntry __READONLY_DATA pXML_Emphasize_Enum[] = +SvXMLEnumMapEntry const pXML_Emphasize_Enum[] = { { XML_NONE, FontEmphasis::NONE }, { XML_DOT, FontEmphasis::DOT_ABOVE }, @@ -1346,16 +1338,12 @@ const XMLPropertyHandler *XMLTextPropertyHandlerFactory_Impl::GetPropertyHandler pHdl = new XMLGrfMirrorPropHdl_Impl( XML_VERTICAL, sal_False ); break; case XML_TYPE_TEXT_MIRROR_HORIZONTAL_LEFT: - // --> OD 2005-05-12 #i49139# - // XML_HORIZONTAL_ON_LEFT_PAGES is replaced by XML_HORIZONTAL_ON_EVEN. + // XML_HORIZONTAL_ON_LEFT_PAGES is replaced by XML_HORIZONTAL_ON_EVEN. (#i49139#) pHdl = new XMLGrfMirrorPropHdl_Impl( XML_HORIZONTAL_ON_EVEN, sal_True ); - // <-- break; case XML_TYPE_TEXT_MIRROR_HORIZONTAL_RIGHT: - // --> OD 2005-05-12 #i49139# - // XML_HORIZONTAL_ON_RIGHT_PAGES is replaced by XML_HORIZONTAL_ON_ODD. + // XML_HORIZONTAL_ON_RIGHT_PAGES is replaced by XML_HORIZONTAL_ON_ODD. (#i49139#) pHdl = new XMLGrfMirrorPropHdl_Impl( XML_HORIZONTAL_ON_ODD, sal_True ); - // <-- break; case XML_TYPE_TEXT_CLIP: pHdl = new XMLClipPropertyHandler( sal_False ); @@ -1491,3 +1479,4 @@ const XMLPropertyHandler *XMLTextPropertyHandlerFactory::GetPropertyHandler( } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/txtprhdl.hxx b/xmloff/source/text/txtprhdl.hxx index b643b76757d6..05241546c142 100644 --- a/xmloff/source/text/txtprhdl.hxx +++ b/xmloff/source/text/txtprhdl.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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/txtprmap.cxx b/xmloff/source/text/txtprmap.cxx index ff49ecd234f9..2409a6493d16 100644 --- a/xmloff/source/text/txtprmap.cxx +++ b/xmloff/source/text/txtprmap.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. @@ -743,10 +744,10 @@ XMLPropertyMapEntry aXMLShapePropMap[] = MG_E( "SurroundAnchorOnly", STYLE, NUMBER_WRAPPED_PARAGRAPHS, XML_TYPE_TEXT_PARAGRAPH_ONLY, CTF_WRAP_PARAGRAPH_ONLY ), MG_E( "SurroundContour", STYLE, WRAP_CONTOUR, XML_TYPE_BOOL, CTF_WRAP_CONTOUR ), MG_E( "ContourOutside", STYLE, WRAP_CONTOUR_MODE, XML_TYPE_TEXT_WRAP_OUTSIDE, CTF_WRAP_CONTOUR_MODE ), - // --> OD 2004-08-09 #i28749# - use own CTF ids for positioning attributes + // Use own CTF ids for positioning attributes (#i28749#) // RES_VERT_ORIENT MG_E( "VertOrient", STYLE, VERTICAL_POS, XML_TYPE_TEXT_VERTICAL_POS, CTF_SHAPE_VERTICALPOS ), - // OD 2004-04-16 #i26791# - add property for at-character anchored shapes + // Add property for at-character anchored shapes (#i26791#) MG_E( "VertOrient", STYLE, VERTICAL_POS, XML_TYPE_TEXT_VERTICAL_POS_AT_CHAR, CTF_SHAPE_VERTICALPOS_ATCHAR ), MG_E( "VertOrient", STYLE, VERTICAL_REL, XML_TYPE_TEXT_VERTICAL_REL_AS_CHAR|MID_FLAG_MULTI_PROPERTY, CTF_VERTICALREL_ASCHAR ), MG_E( "VertOrientRelation", STYLE, VERTICAL_REL, XML_TYPE_TEXT_VERTICAL_REL, CTF_SHAPE_VERTICALREL ), @@ -758,13 +759,12 @@ XMLPropertyMapEntry aXMLShapePropMap[] = MG_E( "HoriOrient", STYLE, HORIZONTAL_POS, XML_TYPE_TEXT_HORIZONTAL_POS_MIRRORED|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_SHAPE_HORIZONTALPOS_MIRRORED ), MG_E( "HoriOrientRelation", STYLE, HORIZONTAL_REL, XML_TYPE_TEXT_HORIZONTAL_REL, CTF_SHAPE_HORIZONTALREL ), MG_E( "HoriOrientRelation", STYLE, HORIZONTAL_REL, XML_TYPE_TEXT_HORIZONTAL_REL_FRAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_SHAPE_HORIZONTALREL_FRAME ), - // <-- - // OD 2004-05-05 #i28701# - RES_WRAP_INFLUENCE_ON_OBJPOS + // RES_WRAP_INFLUENCE_ON_OBJPOS (#i28701#) MG_ED( "WrapInfluenceOnPosition", DRAW, WRAP_INFLUENCE_ON_POSITION, XML_TYPE_WRAP_INFLUENCE_ON_POSITION, 0 ), // UserDefinedAttributes is already contained in the map this one is // chained to. - // RES_FOLLOW_TEXT_FLOW - OD 2004-04-21 #i26791# + // RES_FOLLOW_TEXT_FLOW (#i26791#) MG_ED( "IsFollowingTextFlow", STYLE, FLOW_WITH_TEXT, XML_TYPE_BOOL, 0 ), M_END() @@ -810,12 +810,8 @@ XMLPropertyMapEntry aXMLSectionPropMap[] = MS_E( "EndnoteNumberingSuffix", TEXT, _EMPTY, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_SECTION_ENDNOTE_NUM_SUFFIX ), MS_E( "EndnoteIsCollectAtTextEnd", TEXT, NOTES_CONFIGURATION, MID_FLAG_ELEMENT_ITEM|XML_TYPE_BOOL, CTF_SECTION_ENDNOTE_END ), MS_E( "UserDefinedAttributes", TEXT, XMLNS, XML_TYPE_ATTRIBUTE_CONTAINER | MID_FLAG_SPECIAL_ITEM, 0 ), - - // --> FME 2004-06-22 #114856# edit in readonly sections // RES_EDIT_IN_READONLY MS_E( "EditInReadonly", STYLE, EDITABLE, XML_TYPE_BOOL, 0 ), - // <-- - M_END() }; @@ -904,3 +900,5 @@ XMLTextPropertySetMapper::XMLTextPropertySetMapper( sal_uInt16 nType ) : XMLTextPropertySetMapper::~XMLTextPropertySetMapper() { } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/txtsecte.cxx b/xmloff/source/text/txtsecte.cxx index b18d3fab086d..201407e79371 100644 --- a/xmloff/source/text/txtsecte.cxx +++ b/xmloff/source/text/txtsecte.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_TXTPARAE_HXX #include <xmloff/txtparae.hxx> -#endif #include <tools/debug.hxx> #include <rtl/ustring.hxx> #include <rtl/ustrbuf.hxx> @@ -59,9 +58,7 @@ #include "XMLTextNumRuleInfo.hxx" #include "XMLSectionExport.hxx" #include "XMLRedlineExport.hxx" -#ifndef _XMLOFF_MULTIPROPERTYSETHELPER_HXX #include "MultiPropertySetHelper.hxx" -#endif using namespace ::com::sun::star; using namespace ::com::sun::star::text; @@ -256,3 +253,4 @@ void XMLTextParagraphExport::exportListAndSectionChange( rPrevSection.set(rNextSection); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/txtstyle.cxx b/xmloff/source/text/txtstyle.cxx index b771a3ea17a2..440a0f412b39 100644 --- a/xmloff/source/text/txtstyle.cxx +++ b/xmloff/source/text/txtstyle.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. @@ -108,17 +109,6 @@ void XMLTextParagraphExport::exportStyleAttributes( GetExport().EncodeStyleName( sName ) ); } } - //sal_Int32 nOutlineLevel = //#outline level, zhaojianwei, moved to styleexp.cxx - XMLStyleExport::exportStyle() - // GetExport().GetTextParagraphExport()->GetHeadingLevel( rStyle->getName() ); - //if( nOutlineLevel != -1 ) - //{ - // OUStringBuffer sTmp; - // sTmp.append( static_cast<sal_Int32>(nOutlineLevel+1L) ); - // GetExport().AddAttribute( XML_NAMESPACE_STYLE, - // XML_DEFAULT_OUTLINE_LEVEL, - // sTmp.makeStringAndClear() ); - //} - if( bProgress ) { ProgressBarHelper *pProgress = GetExport().GetProgressBarHelper(); @@ -182,3 +172,5 @@ void XMLTextParagraphExport::exportTextStyles( sal_Bool bUsed, sal_Bool bProg ) bProgress = bOldProg; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/txtstyli.cxx b/xmloff/source/text/txtstyli.cxx index 601bef9cdf63..f99e35d404b9 100644 --- a/xmloff/source/text/txtstyli.cxx +++ b/xmloff/source/text/txtstyli.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,10 +70,9 @@ using namespace ::com::sun::star::frame; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::container; -//using namespace ::com::sun::star::text; using namespace ::xmloff::token; -static __FAR_DATA SvXMLEnumMapEntry aCategoryMap[] = +static SvXMLEnumMapEntry aCategoryMap[] = { { XML_TEXT, ParagraphStyleCategory::TEXT }, { XML_CHAPTER, ParagraphStyleCategory::CHAPTER }, @@ -98,9 +98,8 @@ void XMLTextStyleContext::SetAttribute( sal_uInt16 nPrefixKey, else if( IsXMLToken( rLocalName, XML_LIST_STYLE_NAME ) ) { sListStyleName = rValue; - // --> OD 2006-09-21 #i69523# + // Inherited paragraph style lost information about unset numbering (#i69523#) mbListStyleSet = sal_True; - // <-- } else if( IsXMLToken( rLocalName, XML_MASTER_PAGE_NAME ) ) { @@ -119,8 +118,7 @@ void XMLTextStyleContext::SetAttribute( sal_uInt16 nPrefixKey, { sal_Int32 nTmp; if( SvXMLUnitConverter::convertNumber( nTmp, rValue ) && - // nTmp > 0 && nTmp < 256 ) //#outline level, removed by zhaojianwei - 0 <= nTmp && nTmp <= 10 ) //<-end,add by zhaojianwei + 0 <= nTmp && nTmp <= 10 ) nOutlineLevel = static_cast< sal_Int8 >( nTmp ); } else @@ -145,17 +143,15 @@ XMLTextStyleContext::XMLTextStyleContext( SvXMLImport& rImport, , sIsAutoUpdate( RTL_CONSTASCII_USTRINGPARAM( "IsAutoUpdate" ) ) , sCategory( RTL_CONSTASCII_USTRINGPARAM( "Category" ) ) , sNumberingStyleName( RTL_CONSTASCII_USTRINGPARAM( "NumberingStyleName" ) ) -, sOutlineLevel(RTL_CONSTASCII_USTRINGPARAM( "OutlineLevel" ) )//#outline level,add by zhaojianwei +, sOutlineLevel(RTL_CONSTASCII_USTRINGPARAM( "OutlineLevel" ) ) , sDropCapCharStyleName( RTL_CONSTASCII_USTRINGPARAM( "DropCapCharStyleName" ) ) , sPageDescName( RTL_CONSTASCII_USTRINGPARAM( "PageDescName" ) ) -//, nOutlineLevel( 0 ) // removed by zhaojianwei -, nOutlineLevel( -1 ) //<-end, add by zhaojianwei +, nOutlineLevel( -1 ) , bAutoUpdate( sal_False ) , bHasMasterPageName( sal_False ) , bHasCombinedCharactersLetter( sal_False ) -// --> OD 2006-09-21 #i69523# +// Inherited paragraph style lost information about unset numbering (#i69523#) , mbListStyleSet( sal_False ) -// <-- , pEventContext( NULL ) { } @@ -253,13 +249,12 @@ void XMLTextStyleContext::CreateAndInsert( sal_Bool bOverwrite ) pEventContext->ReleaseRef(); } - // --> OD 2006-10-12 #i69629# + // XML import: reconstrution of assignment of paragraph style to outline levels (#i69629#) if ( nOutlineLevel > 0 ) { GetImport().GetTextImport()->AddOutlineStyleCandidate( nOutlineLevel, GetDisplayName() ); } - // <-- } void XMLTextStyleContext::SetDefaults( ) @@ -285,23 +280,19 @@ void XMLTextStyleContext::Finish( sal_Bool bOverwrite ) XMLPropStyleContext::Finish( bOverwrite ); Reference < XStyle > xStyle = GetStyle(); - // --> OD 2006-09-21 #i69523# - // consider set empty list style -// if ( !( sListStyleName.getLength() || + // Consider set empty list style (#i69523#) if ( !( mbListStyleSet || - nOutlineLevel >= 0 || //#outline level,add by zhaojianwei + nOutlineLevel >= 0 || sDropCapTextStyleName.getLength() || bHasMasterPageName ) || !xStyle.is() || !( bOverwrite || IsNew() ) ) return; - // <-- Reference < XPropertySet > xPropSet( xStyle, UNO_QUERY ); Reference< XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo(); - //#outline level,add by zhaojianwei if( xPropSetInfo->hasPropertyByName( sOutlineLevel )) { Any aAny; @@ -311,24 +302,19 @@ void XMLTextStyleContext::Finish( sal_Bool bOverwrite ) xPropSet->setPropertyValue( sOutlineLevel, aAny ); } } - //<-end,zhaojianwei - - // --> OD 2006-09-21 #i69523# - // consider set empty list style -// if( sListStyleName.getLength() ) + // Consider set empty list style (#i69523#) if ( mbListStyleSet && xPropSetInfo->hasPropertyByName( sNumberingStyleName ) ) { - // --> OD 2006-10-12 #i70223# - // Only for text document from version prior OOo 2.1 resp. SO 8 PU5: - // - Do not apply list style, if paragraph style has a default outline - // level > 0 and thus, will be assigned to the corresponding list - // level of the outline style. + /* Only for text document from version prior OOo 2.1 resp. SO 8 PU5: + - Do not apply list style, if paragraph style has a default outline + level > 0 and thus, will be assigned to the corresponding list + level of the outline style. (#i70223#) + */ bool bApplyListStyle( true ); if ( nOutlineLevel > 0 ) { - // --> OD 2007-12-19 #152540# if ( GetImport().IsTextDocInOOoFileFormat() ) { bApplyListStyle = false; @@ -337,17 +323,14 @@ void XMLTextStyleContext::Finish( sal_Bool bOverwrite ) { sal_Int32 nUPD( 0 ); sal_Int32 nBuild( 0 ); - // --> OD 2008-03-19 #i86058# - // check explicitly on certain versions + // Check explicitly on certain versions (#i86058#) if ( GetImport().getBuildIds( nUPD, nBuild ) && ( ( nUPD == 641 ) || ( nUPD == 645 ) || // prior OOo 2.0 ( nUPD == 680 && nBuild <= 9073 ) ) ) // OOo 2.0 - OOo 2.0.4 { bApplyListStyle = false; } - // <-- } - // <-- } if ( bApplyListStyle ) @@ -378,9 +361,7 @@ void XMLTextStyleContext::Finish( sal_Bool bOverwrite ) } } } - // <-- } - // <-- if( sDropCapTextStyleName.getLength() ) { @@ -577,3 +558,5 @@ void XMLTextStyleContext::FillPropertySet( } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/txtvfldi.cxx b/xmloff/source/text/txtvfldi.cxx index a2cc3cbc4bfd..d3ade9a90d4f 100644 --- a/xmloff/source/text/txtvfldi.cxx +++ b/xmloff/source/text/txtvfldi.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. @@ -342,7 +343,7 @@ void XMLSetVarFieldImportContext::EndElement() { // create field/Service Reference<XPropertySet> xPropSet; - if (CreateField(xPropSet, OUString::createFromAscii(sAPI_textfield_prefix) + GetServiceName())) + if (CreateField(xPropSet, OUString(RTL_CONSTASCII_USTRINGPARAM(sAPI_textfield_prefix)) + GetServiceName())) { Reference<XDependentTextField> xDepTextField(xPropSet, UNO_QUERY); if (xDepTextField.is()) @@ -812,7 +813,7 @@ SvXMLImportContext* XMLVariableDeclsImportContext::CreateChildContext( eElementName = XML_USER_FIELD_DECL; break; default: - DBG_ERROR("unknown field type!"); + OSL_FAIL("unknown field type!"); eElementName = XML_SEQUENCE_DECL; break; } @@ -947,7 +948,7 @@ XMLVariableDeclImportContext::XMLVariableDeclImportContext( break; } default: - DBG_ERROR("unkown varfield type"); + OSL_FAIL("unkown varfield type"); } // switch } // else: no field master found/constructed } // else: no sequence-decl @@ -994,7 +995,7 @@ sal_Bool XMLVariableDeclImportContext::FindFieldMaster( aAny = xMaster->getPropertyValue( // sPropertySubType - OUString::createFromAscii(sAPI_sub_type) + OUString(RTL_CONSTASCII_USTRINGPARAM(sAPI_sub_type)) ); sal_Int16 nType = 0; aAny >>= nType; @@ -1071,7 +1072,7 @@ sal_Bool XMLVariableDeclImportContext::FindFieldMaster( aAny <<= sName; xMaster->setPropertyValue( // sPropertyName - OUString::createFromAscii(sAPI_name) + OUString(RTL_CONSTASCII_USTRINGPARAM(sAPI_name)) , aAny); if (eVarType != VarTypeUserField) { @@ -1082,7 +1083,7 @@ sal_Bool XMLVariableDeclImportContext::FindFieldMaster( SetVariableType::SEQUENCE); xMaster->setPropertyValue( // sPropertySubType - OUString::createFromAscii(sAPI_sub_type) + OUString(RTL_CONSTASCII_USTRINGPARAM(sAPI_sub_type)) , aAny); } // else : user field: no subtype @@ -1249,7 +1250,7 @@ enum ValueType XML_VALUE_TYPE_BOOLEAN }; -static SvXMLEnumMapEntry __READONLY_DATA aValueTypeMap[] = +static SvXMLEnumMapEntry const aValueTypeMap[] = { { XML_FLOAT, XML_VALUE_TYPE_FLOAT }, { XML_CURRENCY, XML_VALUE_TYPE_CURRENCY }, @@ -1330,7 +1331,7 @@ void XMLValueImportHelper::ProcessAttribute( break; default: - DBG_ERROR("unknown value type"); + OSL_FAIL("unknown value type"); bTypeOK = sal_False; } } @@ -1373,7 +1374,7 @@ void XMLValueImportHelper::ProcessAttribute( case XML_TOK_TEXTFIELD_BOOL_VALUE: { - sal_Bool bTmp; + bool bTmp; sal_Bool bRet = SvXMLUnitConverter::convertBool(bTmp,sAttrValue); if (bRet) { bFloatValueOK = sal_True; @@ -1472,3 +1473,4 @@ void XMLValueImportHelper::PrepareField( } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/ActionMapTypesOASIS.hxx b/xmloff/source/transform/ActionMapTypesOASIS.hxx index 2eeebf15c885..f9226a23b7ec 100644 --- a/xmloff/source/transform/ActionMapTypesOASIS.hxx +++ b/xmloff/source/transform/ActionMapTypesOASIS.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. @@ -94,3 +95,5 @@ enum ActionMapTypesOOo }; #endif // _XMLOFF_ACTIONMAPTYPESOASIS_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/ActionMapTypesOOo.hxx b/xmloff/source/transform/ActionMapTypesOOo.hxx index ff8081b025cf..18c92ebbc8a8 100644 --- a/xmloff/source/transform/ActionMapTypesOOo.hxx +++ b/xmloff/source/transform/ActionMapTypesOOo.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. @@ -90,3 +91,5 @@ enum ActionMapTypesOOo }; #endif // _XMLOFF_ACTIONMAPTYPESOOO_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/AttrTransformerAction.hxx b/xmloff/source/transform/AttrTransformerAction.hxx index ffcd8b43ada0..8dc28f2d8915 100644 --- a/xmloff/source/transform/AttrTransformerAction.hxx +++ b/xmloff/source/transform/AttrTransformerAction.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. @@ -127,9 +128,8 @@ enum XMLAttrTransformerAction XML_ATACTION_SVG_WIDTH_HEIGHT_OOO, // replace "inch" with "in" and subtracts 1/100th mm XML_ATACTION_SVG_WIDTH_HEIGHT_OASIS, // replace "in" with "inch" and adds 1/100th mm XML_ATACTION_DRAW_MIRROR_OOO, // renames draw:mirror to style:mirror and adapts values - // --> OD 2005-05-12 #i49139# + // OpenDocument file format: attribute value of <style:mirror> wrong (#i49139#) XML_ATACTION_STYLE_MIRROR_OOO, // adapts style:mirror values - // <-- XML_ATACTION_DRAW_MIRROR_OASIS, // renames style:mirror to draw:mirror and adapts values XML_ATACTION_GAMMA_OASIS, // converts percentage to double value XML_ATACTION_GAMMA_OOO, // converts double value to percentage @@ -140,3 +140,5 @@ enum XMLAttrTransformerAction }; #endif // _XMLOFF_ATTRTRANSFORMERACTION_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/ChartOASISTContext.cxx b/xmloff/source/transform/ChartOASISTContext.cxx index 26a07e1920d4..84b03da52ffe 100644 --- a/xmloff/source/transform/ChartOASISTContext.cxx +++ b/xmloff/source/transform/ChartOASISTContext.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 "ActionMapTypesOASIS.hxx" #include "AttrTransformerAction.hxx" #include "TransformerActions.hxx" -#ifndef _XMLOFF_TRANSFORMERBASE_HXX #include "TransformerBase.hxx" -#endif using ::rtl::OUString; @@ -143,3 +142,5 @@ void XMLChartOASISTransformerContext::StartElement( XMLTransformerContext::StartElement( xAttrList ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/ChartOASISTContext.hxx b/xmloff/source/transform/ChartOASISTContext.hxx index 5956b3d34dc2..ace9321daab1 100644 --- a/xmloff/source/transform/ChartOASISTContext.hxx +++ b/xmloff/source/transform/ChartOASISTContext.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,4 @@ public: #endif // _XMLOFF_CHARTOASISTCONTEXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/ChartOOoTContext.cxx b/xmloff/source/transform/ChartOOoTContext.cxx index 5e5420002d7d..0bd73f7b36ac 100644 --- a/xmloff/source/transform/ChartOOoTContext.cxx +++ b/xmloff/source/transform/ChartOOoTContext.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 "ChartOOoTContext.hxx" #include "MutableAttrList.hxx" #include "xmloff/xmlnmspe.hxx" -#ifndef _XMLOFF_ACTIONMAPTYPESOOo_HXX #include "ActionMapTypesOOo.hxx" -#endif #include "AttrTransformerAction.hxx" #include "TransformerActions.hxx" -#ifndef _XMLOFF_TRANSFORMERBASE_HXX #include "TransformerBase.hxx" -#endif using ::rtl::OUString; @@ -148,3 +145,5 @@ void XMLChartOOoTransformerContext::StartElement( XMLTransformerContext::StartElement( xAttrList ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/ChartOOoTContext.hxx b/xmloff/source/transform/ChartOOoTContext.hxx index 77a332d95606..414f369e3323 100644 --- a/xmloff/source/transform/ChartOOoTContext.hxx +++ b/xmloff/source/transform/ChartOOoTContext.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,4 @@ public: #endif // _XMLOFF_CHARTOOOTCONTEXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/ChartPlotAreaOASISTContext.cxx b/xmloff/source/transform/ChartPlotAreaOASISTContext.cxx index d1fea38db7f8..6e5cd42a3bf8 100644 --- a/xmloff/source/transform/ChartPlotAreaOASISTContext.cxx +++ b/xmloff/source/transform/ChartPlotAreaOASISTContext.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. @@ -149,7 +150,7 @@ void XMLAxisOASISContext::StartElement( } else { - OSL_ENSURE( false, "ChartAxis: Invalid attribute value" ); + OSL_FAIL( "ChartAxis: Invalid attribute value" ); } if( eToken != XML_TOKEN_INVALID ) @@ -254,3 +255,5 @@ void XMLChartPlotAreaOASISTContext::ExportCategories() m_rCategoriesContext.clear(); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/ChartPlotAreaOASISTContext.hxx b/xmloff/source/transform/ChartPlotAreaOASISTContext.hxx index b16eb0e2355e..2c3d6468652b 100644 --- a/xmloff/source/transform/ChartPlotAreaOASISTContext.hxx +++ b/xmloff/source/transform/ChartPlotAreaOASISTContext.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. @@ -54,3 +55,5 @@ private: // XMLOFF_XMLCHARTPLOTAREAOASISTCONTEXT_HXX #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/ChartPlotAreaOOoTContext.cxx b/xmloff/source/transform/ChartPlotAreaOOoTContext.cxx index 19c4fa580e3a..e1b76c9700b9 100644 --- a/xmloff/source/transform/ChartPlotAreaOOoTContext.cxx +++ b/xmloff/source/transform/ChartPlotAreaOOoTContext.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. @@ -113,7 +114,7 @@ void XMLAxisOOoContext::StartElement( } else { - OSL_ENSURE( false, "ChartAxis: Invalid attribute value" ); + OSL_FAIL( "ChartAxis: Invalid attribute value" ); } if( eToken != XML_TOKEN_INVALID ) @@ -238,3 +239,5 @@ void XMLChartPlotAreaOOoTContext::ExportContent() m_aChildContexts.clear(); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/ChartPlotAreaOOoTContext.hxx b/xmloff/source/transform/ChartPlotAreaOOoTContext.hxx index d6213bdad1c8..2155e76a0090 100644 --- a/xmloff/source/transform/ChartPlotAreaOOoTContext.hxx +++ b/xmloff/source/transform/ChartPlotAreaOOoTContext.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,5 @@ private: // XMLOFF_XMLCHARTPLOTAREAOOOTCONTEXT_HXX #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/ControlOASISTContext.cxx b/xmloff/source/transform/ControlOASISTContext.cxx index 4b87cb4fe80b..f264693661df 100644 --- a/xmloff/source/transform/ControlOASISTContext.cxx +++ b/xmloff/source/transform/ControlOASISTContext.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 "ActionMapTypesOASIS.hxx" #include "AttrTransformerAction.hxx" #include "TransformerActions.hxx" -#ifndef _XMLOFF_TRANSFORMERBASE_HXX #include "TransformerBase.hxx" -#endif #include "ControlOASISTContext.hxx" using ::rtl::OUString; @@ -163,3 +162,5 @@ void XMLControlOASISTransformerContext::EndElement() if( m_bCreateControl ) GetTransformer().GetDocHandler()->endElement( m_aElemQName ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/ControlOASISTContext.hxx b/xmloff/source/transform/ControlOASISTContext.hxx index b123134cf424..d9e9c4a6b073 100644 --- a/xmloff/source/transform/ControlOASISTContext.hxx +++ b/xmloff/source/transform/ControlOASISTContext.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,4 @@ public: #endif // _XMLOFF_CONTROLASISTCONTEXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/ControlOOoTContext.cxx b/xmloff/source/transform/ControlOOoTContext.cxx index 2317cf52cf50..ae005c99dbe0 100644 --- a/xmloff/source/transform/ControlOOoTContext.cxx +++ b/xmloff/source/transform/ControlOOoTContext.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,9 +35,7 @@ #include "ActionMapTypesOOo.hxx" #include "ElemTransformerAction.hxx" #include "TransformerActions.hxx" -#ifndef _XMLOFF_TRANSFORMERBASE_HXX #include "TransformerBase.hxx" -#endif using ::rtl::OUString; @@ -105,3 +104,5 @@ void XMLControlOOoTransformerContext::Characters( const OUString& rChars ) if( m_aElemQName.getLength() ) XMLTransformerContext::Characters( rChars ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/ControlOOoTContext.hxx b/xmloff/source/transform/ControlOOoTContext.hxx index 93e997a59cf8..47d25e8f48de 100644 --- a/xmloff/source/transform/ControlOOoTContext.hxx +++ b/xmloff/source/transform/ControlOOoTContext.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. @@ -59,3 +60,4 @@ public: #endif // _XMLOFF_CONTROLOOOTCONTEXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/CreateElemTContext.cxx b/xmloff/source/transform/CreateElemTContext.cxx index 732a14f6f7c9..5e81a7ff66f9 100644 --- a/xmloff/source/transform/CreateElemTContext.cxx +++ b/xmloff/source/transform/CreateElemTContext.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. @@ -29,9 +30,7 @@ #include "precompiled_xmloff.hxx" #include "CreateElemTContext.hxx" #include "MutableAttrList.hxx" -#ifndef _XMLOFF_TRANSFORMERBASE_HXX #include "TransformerBase.hxx" -#endif #include "TransformerActions.hxx" #include "TContextVector.hxx" #include "FlatTContext.hxx" @@ -129,3 +128,5 @@ void XMLCreateElemTransformerContext::StartElement( (*aIter)->Export(); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/CreateElemTContext.hxx b/xmloff/source/transform/CreateElemTContext.hxx index 17ff0785ab26..601c7afe4903 100644 --- a/xmloff/source/transform/CreateElemTContext.hxx +++ b/xmloff/source/transform/CreateElemTContext.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,4 @@ public: #endif // _XMLOFF_CREATEELEMCONTEXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/DeepTContext.cxx b/xmloff/source/transform/DeepTContext.cxx index b37776cb6790..b6dc3d52ce43 100644 --- a/xmloff/source/transform/DeepTContext.cxx +++ b/xmloff/source/transform/DeepTContext.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,16 +29,12 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" #include "DeepTContext.hxx" -#ifndef _XMLOFF_FLATTTCONTEXT_HXX #include "FlatTContext.hxx" -#endif #include "EventOOoTContext.hxx" #include "TransformerActions.hxx" #include "ElemTransformerAction.hxx" #include "PersMixedContentTContext.hxx" -#ifndef _XMLOFF_TRANSFORMERBASE_HXX #include "TransformerBase.hxx" -#endif using ::rtl::OUString; using namespace ::com::sun::star::uno; @@ -179,3 +176,4 @@ void XMLPersElemContentTContext::ExportContent() } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/DeepTContext.hxx b/xmloff/source/transform/DeepTContext.hxx index 5bc19d01cf7a..02a6d2b5c87f 100644 --- a/xmloff/source/transform/DeepTContext.hxx +++ b/xmloff/source/transform/DeepTContext.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. @@ -82,3 +83,4 @@ public: #endif // _XMLOFF_DEEPTCONTEXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/DlgOASISTContext.cxx b/xmloff/source/transform/DlgOASISTContext.cxx index bfe62162847a..3aa567526437 100644 --- a/xmloff/source/transform/DlgOASISTContext.cxx +++ b/xmloff/source/transform/DlgOASISTContext.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 "ActionMapTypesOASIS.hxx" #include "AttrTransformerAction.hxx" #include "TransformerActions.hxx" -#ifndef _XMLOFF_TRANSFORMERBASE_HXX #include "TransformerBase.hxx" -#endif using ::rtl::OUString; @@ -114,3 +113,5 @@ void XMLDlgOASISTransformerContext::StartElement( XMLTransformerContext::StartElement( xAttrList ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/DlgOASISTContext.hxx b/xmloff/source/transform/DlgOASISTContext.hxx index 72c73d2977ae..15f13a089cb4 100644 --- a/xmloff/source/transform/DlgOASISTContext.hxx +++ b/xmloff/source/transform/DlgOASISTContext.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,4 @@ public: #endif // _XMLOFF_DLGOASISTCONTEXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/DocumentTContext.cxx b/xmloff/source/transform/DocumentTContext.cxx index 5e4d749826ac..9e0e88c25c93 100644 --- a/xmloff/source/transform/DocumentTContext.cxx +++ b/xmloff/source/transform/DocumentTContext.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. @@ -36,14 +37,10 @@ #include <xmloff/xmltoken.hxx> #include "xmloff/xmlnmspe.hxx" -#ifndef _XMLOFF_TRANSFOERMERBASE_HXX #include "TransformerBase.hxx" -#endif #include "MutableAttrList.hxx" -#ifndef _XMLOFF_METATCONTEXT_HXX #include "DocumentTContext.hxx" -#endif using ::rtl::OUString; @@ -147,3 +144,5 @@ void XMLDocumentTransformerContext::StartElement( const Reference< XAttributeLis } XMLTransformerContext::StartElement( xAttrList ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/DocumentTContext.hxx b/xmloff/source/transform/DocumentTContext.hxx index b1e8800bd279..a601e6933675 100644 --- a/xmloff/source/transform/DocumentTContext.hxx +++ b/xmloff/source/transform/DocumentTContext.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. @@ -56,3 +57,4 @@ public: #endif // _XMLOFF_DOCUMENTTCONTEXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/ElemTransformerAction.hxx b/xmloff/source/transform/ElemTransformerAction.hxx index 647967d772d3..83fea0d81ce6 100644 --- a/xmloff/source/transform/ElemTransformerAction.hxx +++ b/xmloff/source/transform/ElemTransformerAction.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. @@ -94,3 +95,5 @@ enum XMLElemTransformerAction }; #endif // _XMLOFF_ELEMTRANSFORMERACTION_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/EventMap.cxx b/xmloff/source/transform/EventMap.cxx index 6c18e8e559ba..623e77a36ece 100644 --- a/xmloff/source/transform/EventMap.cxx +++ b/xmloff/source/transform/EventMap.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. @@ -109,3 +110,5 @@ XMLTransformerEventMapEntry aFormTransformerEventMap[] = { XML_NAMESPACE_DOM, "DOMFocusOut", "on-blur" }, { 0, 0, 0 } }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/EventMap.hxx b/xmloff/source/transform/EventMap.hxx index d394090b40f9..ce0a5dd82cac 100644 --- a/xmloff/source/transform/EventMap.hxx +++ b/xmloff/source/transform/EventMap.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. @@ -42,3 +43,4 @@ extern XMLTransformerEventMapEntry aFormTransformerEventMap[]; #endif // _XMLOFF_EVENTMAP_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/EventOASISTContext.cxx b/xmloff/source/transform/EventOASISTContext.cxx index 24488b7694be..3db3b376695c 100644 --- a/xmloff/source/transform/EventOASISTContext.cxx +++ b/xmloff/source/transform/EventOASISTContext.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,9 +35,7 @@ #include "ActionMapTypesOASIS.hxx" #include "AttrTransformerAction.hxx" #include "TransformerActions.hxx" -#ifndef _XMLOFF_TRANSFORMERBASE_HXX #include "TransformerBase.hxx" -#endif #ifndef OASIS_FILTER_OOO_1X // Used to parse Scripting Framework URLs @@ -45,7 +44,7 @@ #include <comphelper/processfactory.hxx> #endif -#include <hash_map> +#include <boost/unordered_map.hpp> using ::rtl::OUString; @@ -54,7 +53,7 @@ using namespace ::com::sun::star::xml::sax; using namespace ::xmloff::token; class XMLTransformerOASISEventMap_Impl: - public ::std::hash_map< NameKey_Impl, ::rtl::OUString, + public ::boost::unordered_map< NameKey_Impl, ::rtl::OUString, NameHash_Impl, NameHash_Impl > { public: @@ -67,7 +66,7 @@ XMLTransformerOASISEventMap_Impl::XMLTransformerOASISEventMap_Impl( XMLTransform if( pInit ) { XMLTransformerOASISEventMap_Impl::key_type aKey; - XMLTransformerOASISEventMap_Impl::data_type aData; + XMLTransformerOASISEventMap_Impl::mapped_type aData; while( pInit->m_pOASISName ) { aKey.m_nPrefix = pInit->m_nOASISPrefix; @@ -204,8 +203,8 @@ bool ParseURL( xSMgr = ::comphelper::getProcessServiceFactory(); Reference< com::sun::star::uri::XUriReferenceFactory > - xFactory( xSMgr->createInstance( OUString::createFromAscii( - "com.sun.star.uri.UriReferenceFactory" ) ), UNO_QUERY ); + xFactory( xSMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.uri.UriReferenceFactory" )) ), UNO_QUERY ); if ( xFactory.is() ) { @@ -307,7 +306,7 @@ void XMLEventOASISTransformerContext::StartElement( GetXMLToken( XML_LANGUAGE ) ) ); pMutableAttrList->SetValueByIndex( idx, - OUString::createFromAscii("StarBasic") ); + OUString(RTL_CONSTASCII_USTRINGPARAM("StarBasic")) ); OUString aLocQName( GetTransformer().GetNamespaceMap().GetQNameByKey( @@ -359,7 +358,7 @@ void XMLEventOASISTransformerContext::StartElement( GetXMLToken( XML_LANGUAGE ) ) ); pMutableAttrList->SetValueByIndex( idx, - OUString::createFromAscii("StarBasic") ); + OUString(RTL_CONSTASCII_USTRINGPARAM("StarBasic")) ); OUString aLocQName( GetTransformer().GetNamespaceMap().GetQNameByKey( @@ -418,3 +417,5 @@ void XMLEventOASISTransformerContext::StartElement( XMLRenameElemTransformerContext::StartElement( xAttrList ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/EventOASISTContext.hxx b/xmloff/source/transform/EventOASISTContext.hxx index 75212327e6b1..07b0c6c08c79 100644 --- a/xmloff/source/transform/EventOASISTContext.hxx +++ b/xmloff/source/transform/EventOASISTContext.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. @@ -54,3 +55,4 @@ public: #endif // _XMLOFF_EVENTOASISTCONTEXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/EventOOoTContext.cxx b/xmloff/source/transform/EventOOoTContext.cxx index 3b63935817c8..6c0a52386f1d 100644 --- a/xmloff/source/transform/EventOOoTContext.cxx +++ b/xmloff/source/transform/EventOOoTContext.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,18 +32,14 @@ #include "EventMap.hxx" #include "MutableAttrList.hxx" #include "xmloff/xmlnmspe.hxx" -#ifndef _XMLOFF_ACTIONMAPTYPESOOo_HXX #include "ActionMapTypesOOo.hxx" -#endif #include "AttrTransformerAction.hxx" #include "TransformerActions.hxx" -#ifndef _XMLOFF_TRANSFORMERBASE_HXX #include "TransformerBase.hxx" -#endif #include <comphelper/stl_types.hxx> #include <rtl/ustrbuf.hxx> -#include <hash_map> +#include <boost/unordered_map.hpp> using ::rtl::OUString; using ::rtl::OUStringBuffer; @@ -51,7 +48,7 @@ using namespace ::com::sun::star::xml::sax; using namespace ::xmloff::token; class XMLTransformerOOoEventMap_Impl: - public ::std::hash_map< ::rtl::OUString, NameKey_Impl, + public ::boost::unordered_map< ::rtl::OUString, NameKey_Impl, ::rtl::OUStringHash, ::comphelper::UStringEqual > { public: @@ -66,7 +63,7 @@ public: void XMLTransformerOOoEventMap_Impl::AddMap( XMLTransformerEventMapEntry *pInit ) { XMLTransformerOOoEventMap_Impl::key_type aKey; - XMLTransformerOOoEventMap_Impl::data_type aData; + XMLTransformerOOoEventMap_Impl::mapped_type aData; while( pInit->m_pOOoName ) { aKey = OUString::createFromAscii(pInit->m_pOOoName); @@ -80,7 +77,7 @@ void XMLTransformerOOoEventMap_Impl::AddMap( XMLTransformerEventMapEntry *pInit if( !insert( aVal ).second ) { - OSL_ENSURE( false, "duplicate OOo event name extry" ); + OSL_FAIL( "duplicate OOo event name extry" ); } ++pInit; @@ -264,3 +261,5 @@ sal_Bool XMLEventOOoTransformerContext::IsPersistent() const { return m_bPersistent; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/EventOOoTContext.hxx b/xmloff/source/transform/EventOOoTContext.hxx index 4d2e603f27e7..32519239c1b3 100644 --- a/xmloff/source/transform/EventOOoTContext.hxx +++ b/xmloff/source/transform/EventOOoTContext.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_EVENTOOOTCONTEXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/FamilyType.hxx b/xmloff/source/transform/FamilyType.hxx index b94b2d7ff437..656a17a679f2 100644 --- a/xmloff/source/transform/FamilyType.hxx +++ b/xmloff/source/transform/FamilyType.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. @@ -58,3 +59,4 @@ enum XMLFamilyType #endif // _XMLOFF_FAMILYTYPE_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/FlatTContext.cxx b/xmloff/source/transform/FlatTContext.cxx index 93e277670f08..bc43939593cf 100644 --- a/xmloff/source/transform/FlatTContext.cxx +++ b/xmloff/source/transform/FlatTContext.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" #include "FlatTContext.hxx" -#ifndef _XMLOFF_TRANSFORMERBASE_HXX #include "TransformerBase.hxx" -#endif using ::rtl::OUString; @@ -68,3 +67,5 @@ void XMLPersTextContentTContext::ExportContent() { GetTransformer().GetDocHandler()->characters( m_aCharacters ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/FlatTContext.hxx b/xmloff/source/transform/FlatTContext.hxx index 543c5bc48db6..d76d66f5080a 100644 --- a/xmloff/source/transform/FlatTContext.hxx +++ b/xmloff/source/transform/FlatTContext.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. @@ -68,3 +69,4 @@ public: #endif // _XMLOFF_FLATTCONTEXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/FormPropOASISTContext.cxx b/xmloff/source/transform/FormPropOASISTContext.cxx index 518618f4059d..61fc64be617b 100644 --- a/xmloff/source/transform/FormPropOASISTContext.cxx +++ b/xmloff/source/transform/FormPropOASISTContext.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 "ActionMapTypesOASIS.hxx" #include "AttrTransformerAction.hxx" #include "TransformerActions.hxx" -#ifndef _XMLOFF_TRANSFORMERBASE_HXX #include "TransformerBase.hxx" -#endif #include "FormPropOASISTContext.hxx" using ::rtl::OUString; @@ -223,3 +222,5 @@ void XMLFormPropOASISTransformerContext::EndElement() if( !m_bIsListValue ) XMLRenameElemTransformerContext::EndElement(); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/FormPropOASISTContext.hxx b/xmloff/source/transform/FormPropOASISTContext.hxx index b6f1423afb66..d98656557885 100644 --- a/xmloff/source/transform/FormPropOASISTContext.hxx +++ b/xmloff/source/transform/FormPropOASISTContext.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_FORMPROPOASISTCONTEXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/FormPropOOoTContext.cxx b/xmloff/source/transform/FormPropOOoTContext.cxx index 54682b3e0c03..f2378090a60e 100644 --- a/xmloff/source/transform/FormPropOOoTContext.cxx +++ b/xmloff/source/transform/FormPropOOoTContext.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,14 +32,10 @@ #include "xmloff/xmlnmspe.hxx" #include <xmloff/nmspmap.hxx> #include "IgnoreTContext.hxx" -#ifndef _XMLOFF_ACTIONMAPTYPESOOo_HXX #include "ActionMapTypesOOo.hxx" -#endif #include "AttrTransformerAction.hxx" #include "TransformerActions.hxx" -#ifndef _XMLOFF_TRANSFORMERBASE_HXX #include "TransformerBase.hxx" -#endif #include "FormPropOOoTContext.hxx" using ::rtl::OUString; @@ -312,3 +309,5 @@ void XMLFormPropOOoTransformerContext::EndElement() m_xAttrList ); GetTransformer().GetDocHandler()->endElement( m_aElemQName ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/FormPropOOoTContext.hxx b/xmloff/source/transform/FormPropOOoTContext.hxx index b1f678859c84..32b0e4796134 100644 --- a/xmloff/source/transform/FormPropOOoTContext.hxx +++ b/xmloff/source/transform/FormPropOOoTContext.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. @@ -68,3 +69,4 @@ public: #endif // _XMLOFF_FORMPROPOOOTCONTEXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/FrameOASISTContext.cxx b/xmloff/source/transform/FrameOASISTContext.cxx index 3c9439111aec..1fdabe0daf49 100644 --- a/xmloff/source/transform/FrameOASISTContext.cxx +++ b/xmloff/source/transform/FrameOASISTContext.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,9 +35,7 @@ #include "ActionMapTypesOASIS.hxx" #include "ElemTransformerAction.hxx" #include "TransformerActions.hxx" -#ifndef _XMLOFF_TRANSFORMERBASE_HXX #include "TransformerBase.hxx" -#endif using ::rtl::OUString; @@ -198,3 +197,5 @@ void XMLFrameOASISTransformerContext::Characters( const OUString& rChars ) if( m_aElemQName.getLength() && !m_bIgnoreElement ) XMLTransformerContext::Characters( rChars ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/FrameOASISTContext.hxx b/xmloff/source/transform/FrameOASISTContext.hxx index 9a7824da7026..2f43907ea834 100644 --- a/xmloff/source/transform/FrameOASISTContext.hxx +++ b/xmloff/source/transform/FrameOASISTContext.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. @@ -66,3 +67,4 @@ public: #endif // _XMLOFF_FRAMEOASISTCONTEXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/FrameOOoTContext.cxx b/xmloff/source/transform/FrameOOoTContext.cxx index b36d0c29f258..0ff6f95af3ea 100644 --- a/xmloff/source/transform/FrameOOoTContext.cxx +++ b/xmloff/source/transform/FrameOOoTContext.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. @@ -36,9 +37,7 @@ #include "AttrTransformerAction.hxx" #include "ElemTransformerAction.hxx" #include "TransformerActions.hxx" -#ifndef _XMLOFF_TRANSFORMERBASE_HXX #include "TransformerBase.hxx" -#endif using ::rtl::OUString; using namespace ::com::sun::star::uno; @@ -172,3 +171,5 @@ sal_Bool XMLFrameOOoTransformerContext::IsPersistent() const // itself. return sal_False; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/FrameOOoTContext.hxx b/xmloff/source/transform/FrameOOoTContext.hxx index 97ccdcd78812..4bef27cc0777 100644 --- a/xmloff/source/transform/FrameOOoTContext.hxx +++ b/xmloff/source/transform/FrameOOoTContext.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. @@ -58,3 +59,4 @@ public: #endif // _XMLOFF_FRAMEOOOTCONTEXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/IgnoreTContext.cxx b/xmloff/source/transform/IgnoreTContext.cxx index 7583338891f5..30433bd2cd17 100644 --- a/xmloff/source/transform/IgnoreTContext.cxx +++ b/xmloff/source/transform/IgnoreTContext.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" #include "IgnoreTContext.hxx" -#ifndef _XMLOFF_TRANSFORMERBASE_HXX #include "TransformerBase.hxx" -#endif using ::rtl::OUString; @@ -107,3 +106,4 @@ void XMLIgnoreTransformerContext::Characters( const OUString& rChars ) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/IgnoreTContext.hxx b/xmloff/source/transform/IgnoreTContext.hxx index 71651b8b8747..45a311c3b5d2 100644 --- a/xmloff/source/transform/IgnoreTContext.hxx +++ b/xmloff/source/transform/IgnoreTContext.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. @@ -87,3 +88,4 @@ public: #endif // _XMLOFF_IGNORETCONTEXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/MergeElemTContext.cxx b/xmloff/source/transform/MergeElemTContext.cxx index a88194952499..d168bf94e930 100644 --- a/xmloff/source/transform/MergeElemTContext.cxx +++ b/xmloff/source/transform/MergeElemTContext.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. @@ -29,9 +30,7 @@ #include "precompiled_xmloff.hxx" #include "MergeElemTContext.hxx" #include "MutableAttrList.hxx" -#ifndef _XMLOFF_TRANSFORMERBASE_HXX #include "TransformerBase.hxx" -#endif #include "TransformerActions.hxx" #include "AttrTransformerAction.hxx" #include "ElemTransformerAction.hxx" @@ -344,3 +343,5 @@ void XMLMergeElemTransformerContext::Characters( const OUString& ) { // ignore } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/MergeElemTContext.hxx b/xmloff/source/transform/MergeElemTContext.hxx index 6911591a5c90..200813a49dab 100644 --- a/xmloff/source/transform/MergeElemTContext.hxx +++ b/xmloff/source/transform/MergeElemTContext.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. @@ -68,3 +69,4 @@ public: #endif // _XMLOFF_MERGEELEMCONTEXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/MetaTContext.cxx b/xmloff/source/transform/MetaTContext.cxx index e05312cb3413..38b41ef2159c 100644 --- a/xmloff/source/transform/MetaTContext.cxx +++ b/xmloff/source/transform/MetaTContext.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/xmlnmspe.hxx" -#ifndef _XMLOFF_TRANSFOERMERBASE_HXX #include "TransformerBase.hxx" -#endif #include "MutableAttrList.hxx" #include "MetaTContext.hxx" @@ -144,3 +143,4 @@ void XMLMetaTransformerContext::Characters( const OUString& ) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/MetaTContext.hxx b/xmloff/source/transform/MetaTContext.hxx index 5af650cb50b7..0d48a4069d08 100644 --- a/xmloff/source/transform/MetaTContext.hxx +++ b/xmloff/source/transform/MetaTContext.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. @@ -33,9 +34,7 @@ #include <map> -#ifndef _XMLOFF_FLATTRCONTEXT_HXX #include "FlatTContext.hxx" -#endif typedef ::std::multimap< ::rtl::OUString, ::rtl::Reference< XMLPersTextContentTContext >, @@ -81,3 +80,4 @@ public: #endif // _XMLOFF_METATCONTEXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/MutableAttrList.cxx b/xmloff/source/transform/MutableAttrList.cxx index b9f607a7c443..202b9cf84304 100644 --- a/xmloff/source/transform/MutableAttrList.cxx +++ b/xmloff/source/transform/MutableAttrList.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. @@ -29,9 +30,9 @@ #include "precompiled_xmloff.hxx" #include <osl/mutex.hxx> #include <xmloff/xmltoken.hxx> -#include <rtl/uuid.h> #include <rtl/memory.h> #include <xmloff/attrlist.hxx> +#include <comphelper/servicehelper.hxx> #include "MutableAttrList.hxx" using ::rtl::OUString; @@ -73,22 +74,15 @@ XMLMutableAttributeList::~XMLMutableAttributeList() m_xAttrList = 0; } +namespace +{ + class theXMLMutableAttributeListUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theXMLMutableAttributeListUnoTunnelId> {}; +} // XUnoTunnel & co const Sequence< sal_Int8 > & XMLMutableAttributeList::getUnoTunnelId() throw() { - static Sequence< sal_Int8 > * pSeq = 0; - if( !pSeq ) - { - Guard< Mutex > aGuard( Mutex::getGlobalMutex() ); - if( !pSeq ) - { - static Sequence< sal_Int8 > aSeq( 16 ); - rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True ); - pSeq = &aSeq; - } - } - return *pSeq; + return theXMLMutableAttributeListUnoTunnelId::get().getSeq(); } // XUnoTunnel @@ -201,3 +195,5 @@ sal_Int16 XMLMutableAttributeList::GetIndexByName( const OUString& rName ) const } return nIndex; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/MutableAttrList.hxx b/xmloff/source/transform/MutableAttrList.hxx index 7dc734f18ef7..ae01037f6b75 100644 --- a/xmloff/source/transform/MutableAttrList.hxx +++ b/xmloff/source/transform/MutableAttrList.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. @@ -85,3 +86,5 @@ public: #endif // _XMLOFF_MUTABLEATTRLIST_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/NotesTContext.cxx b/xmloff/source/transform/NotesTContext.cxx index 31ccbdf48c5b..88355a151f28 100644 --- a/xmloff/source/transform/NotesTContext.cxx +++ b/xmloff/source/transform/NotesTContext.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/xmlnmspe.hxx" -#ifndef _XMLOFF_TRANSFOERMERBASE_HXX #include "TransformerBase.hxx" -#endif #include "TransformerActions.hxx" #include "AttrTransformerAction.hxx" #include "ActionMapTypesOASIS.hxx" @@ -45,9 +44,7 @@ #include "RenameElemTContext.hxx" #include "FlatTContext.hxx" -#ifndef _XMLOFF_NOTESCONTEXT_HXX #include "NotesTContext.hxx" -#endif using ::rtl::OUString; using namespace ::xmloff::token; @@ -230,3 +227,5 @@ sal_Bool XMLNotesTransformerContext::IsPersistent() const { return m_bPersistent; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/NotesTContext.hxx b/xmloff/source/transform/NotesTContext.hxx index 5e2832d8bb2f..86882afbaeef 100644 --- a/xmloff/source/transform/NotesTContext.hxx +++ b/xmloff/source/transform/NotesTContext.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. @@ -59,3 +60,4 @@ public: #endif // _XMLOFF_NOTESTCONTEXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/OOo2Oasis.cxx b/xmloff/source/transform/OOo2Oasis.cxx index 103202c48866..f94794ef4831 100644 --- a/xmloff/source/transform/OOo2Oasis.cxx +++ b/xmloff/source/transform/OOo2Oasis.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. @@ -27,9 +28,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#include <rtl/uuid.h> #include <rtl/ustrbuf.hxx> #include <comphelper/processfactory.hxx> +#include <comphelper/servicehelper.hxx> #include <xmloff/nmspmap.hxx> #include "xmloff/xmlnmspe.hxx" #include <xmloff/xmltoken.hxx> @@ -47,9 +48,7 @@ #include "PropertyActionsOOo.hxx" #include "TransformerActions.hxx" #include <xmloff/xmluconv.hxx> -#ifndef _XMLOFF_OOO2OOO_HXX #include "OOo2Oasis.hxx" -#endif using ::rtl::OUString; using namespace ::xmloff::token; @@ -360,15 +359,12 @@ static XMLTransformerActionInit aActionTable[] = OOO_STYLE_REF_ACTIONS ), /* generated entry */ ENTRY1( STYLE, PRESENTATION_PAGE_LAYOUT, XML_ETACTION_PROC_ATTRS, OOO_MASTER_PAGE_ACTIONS ), - // --> OD 2005-01-10 #i40011#, #i40015# - // - consider also attribute table:style-name for <table:table>, - // <table:table-row> and <table:table-column>. -// ENTRY1( TABLE, TABLE, XML_ETACTION_PROC_ATTRS, OOO_STYLE_REF_ACTIONS ), + /* Consider also attribute table:style-name for <table:table>, + <table:table-row> and <table:table-column>. (#i40011#, #i40015#) + */ ENTRY0( TABLE, TABLE, XML_ETACTION_TABLE ), - ENTRY1( TABLE, TABLE_ROW, XML_ETACTION_PROC_ATTRS, OOO_STYLE_REF_ACTIONS ), ENTRY1( TABLE, TABLE_COLUMN, XML_ETACTION_PROC_ATTRS, OOO_STYLE_REF_ACTIONS ), - // <-- // split frame elements ENTRY0( DRAW, TEXT_BOX, XML_ETACTION_FRAME ), @@ -916,17 +912,16 @@ static XMLTransformerActionInit aBackgroundImageActionTable[] = ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT ) }; -// --> OD 2005-06-10 #i50322# -// OOO_BACKGROUND_IMAGE_ACTIONS for OpenOffice.org text documents -// OpenOffice.org text documents, written by OpenOffice.org, contain -// wrong value for the transparency of the background graphic +/* OOO_BACKGROUND_IMAGE_ACTIONS for OpenOffice.org text documents + OpenOffice.org text documents, written by OpenOffice.org, contain + wrong value for the transparency of the background graphic (#i50322#) +*/ static XMLTransformerActionInit aWriterBackgroundImageActionTable[] = { ENTRY1Q( DRAW, TRANSPARENCY, XML_ATACTION_WRITER_BACK_GRAPHIC_TRANSPARENCY, XML_NAMESPACE_DRAW, XML_OPACITY ), ENTRY1( XLINK, HREF, XML_ATACTION_URI_OOO, sal_True ), ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT ) }; -// <-- // OOO_DDE_CONNECTION_DECL static XMLTransformerActionInit aDDEConnectionDeclActionTable[] = @@ -1514,11 +1509,10 @@ XMLTableOOoTransformerContext_Impl::~XMLTableOOoTransformerContext_Impl() void XMLTableOOoTransformerContext_Impl::StartElement( const Reference< XAttributeList >& rAttrList ) { - // --> OD 2005-07-05 #i50521# - perform OOO_STYLE_REF_ACTIONS for all applications + // Perform OOO_STYLE_REF_ACTIONS for all applications (#i50521#) Reference< XAttributeList > xAttrList( rAttrList ); XMLMutableAttributeList* pMutableAttrList = GetTransformer().ProcessAttrList( xAttrList, OOO_STYLE_REF_ACTIONS, sal_False ); - // <-- if( rAttrList->getLength() && IsXMLToken( GetTransformer().GetClass(), XML_SPREADSHEET ) ) { sal_Bool bPrintRanges(sal_False); @@ -1702,13 +1696,11 @@ XMLTransformerActions *OOo2OasisTransformer::GetUserDefinedActions( new XMLTransformerActions( aFrameAttrActionTable ); break; case OOO_BACKGROUND_IMAGE_ACTIONS: - // --> OD 2005-06-10 #i50322# - // use special actions for Writer documents. + // Use special actions for Writer documents. (#i50322#) m_aActions[OOO_BACKGROUND_IMAGE_ACTIONS] = isWriter() ? new XMLTransformerActions( aWriterBackgroundImageActionTable ) : new XMLTransformerActions( aBackgroundImageActionTable ); - // <-- break; case OOO_DDE_CONNECTION_DECL_ACTIONS: m_aActions[OOO_DDE_CONNECTION_DECL_ACTIONS] = @@ -2004,20 +1996,14 @@ void SAL_CALL OOo2OasisTransformer::Initialize( } } - -Sequence< sal_Int8 > static CreateUnoTunnelId() +namespace { - static osl::Mutex aCreateMutex; - ::osl::Guard<osl::Mutex> aGuard( aCreateMutex ); - Sequence< sal_Int8 > aSeq( 16 ); - rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True ); - return aSeq; + class theOOo2OasisTransformerUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theOOo2OasisTransformerUnoTunnelId> {}; } const Sequence< sal_Int8 > & OOo2OasisTransformer::getUnoTunnelId() throw() { - static Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId(); - return aSeq; + return theOOo2OasisTransformerUnoTunnelId::get().getSeq(); } // XUnoTunnel @@ -2204,3 +2190,5 @@ OOO_IMPORTER( XMLMetaImportOOO, OOO_IMPORTER( XMLAutoTextEventImportOOO, "com.sun.star.comp.Writer.XMLAutotextEventsImporter", "com.sun.star.comp.Writer.XMLOasisAutotextEventsImporter" ) + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/OOo2Oasis.hxx b/xmloff/source/transform/OOo2Oasis.hxx index 863f45ca48a5..693e75cf6251 100644 --- a/xmloff/source/transform/OOo2Oasis.hxx +++ b/xmloff/source/transform/OOo2Oasis.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. @@ -31,9 +32,7 @@ #include <com/sun/star/document/XImporter.hpp> #include <com/sun/star/document/XFilter.hpp> #include "ActionMapTypesOOo.hxx" -#ifndef _XMLOFF_TRANSFORMERBASE_HXX_ #include "TransformerBase.hxx" -#endif class XMLTransformerOOoEventMap_Impl; @@ -112,3 +111,5 @@ public: }; #endif // _XMLOFF_TRANSFORMER_BASE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/Oasis2OOo.cxx b/xmloff/source/transform/Oasis2OOo.cxx index 4f0bd1303afb..90765e472ca5 100644 --- a/xmloff/source/transform/Oasis2OOo.cxx +++ b/xmloff/source/transform/Oasis2OOo.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,7 +29,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" #include <com/sun/star/beans/XPropertySetInfo.hpp> -#include <rtl/uuid.h> #include <rtl/ustrbuf.hxx> #include <xmloff/nmspmap.hxx> #include "xmloff/xmlnmspe.hxx" @@ -36,16 +36,12 @@ #include "DeepTContext.hxx" #include "MetaTContext.hxx" #include "DocumentTContext.hxx" -#ifndef _XMLOFF_NOTESCONTEXT_HXX #include "NotesTContext.hxx" -#endif #include "StyleOASISTContext.hxx" #include "FrameOASISTContext.hxx" #include "EventOASISTContext.hxx" #include "DlgOASISTContext.hxx" -#ifndef _XMLOFF_CONTROLOASISTCONTEXT_HXX #include "ControlOASISTContext.hxx" -#endif #include "FormPropOASISTContext.hxx" #include "ChartOASISTContext.hxx" #include "ChartPlotAreaOASISTContext.hxx" @@ -55,6 +51,7 @@ #include "TransformerActions.hxx" #include "FamilyType.hxx" #include <xmloff/xmluconv.hxx> +#include <comphelper/servicehelper.hxx> #include "Oasis2OOo.hxx" using ::rtl::OUString; @@ -387,14 +384,13 @@ static XMLTransformerActionInit aActionTable[] = OASIS_TEXT_STYLE_REF_ACTIONS ), /* generated entry */ ENTRY1( DRAW, PAGE, XML_ETACTION_PROC_ATTRS, OASIS_MASTER_PAGE_REF_ACTIONS ), /* generated entry */ - // --> OD 2005-01-10 #i40011#, #i40015# - // - conversion of attribute <table:style-name> for <table:table-row> and - // <table:table-column> + /* Conversion of attribute <table:style-name> for <table:table-row> and + <table:table-column> (#i40011#, #i40015#) + */ ENTRY1( TABLE, TABLE_ROW, XML_ETACTION_PROC_ATTRS, OASIS_TABLE_STYLE_REF_ACTIONS ), ENTRY1( TABLE, TABLE_COLUMN, XML_ETACTION_PROC_ATTRS, OASIS_TABLE_STYLE_REF_ACTIONS ), - // <-- // rename office:value-* to *:value-* ENTRY1( TEXT, VARIABLE_DECL, XML_ETACTION_PROC_ATTRS, @@ -700,16 +696,13 @@ static XMLTransformerActionInit aMapStyleRefActionTable[] = ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT ) }; -// --> OD 2005-01-10 #i40011#, #i40015# -// action table for OASIS_TABLE_STYLE_REF_ACTIONS +// action table for OASIS_TABLE_STYLE_REF_ACTIONS (#i40011#, #i40015#) static XMLTransformerActionInit aTableStyleRefActionTable[] = { ENTRY1( TABLE, STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF, XML_FAMILY_TYPE_END ), ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT ) }; -// <-- - static XMLTransformerActionInit aFontFaceActionTable[] = { @@ -1205,7 +1198,6 @@ void XMLTableTransformerContext_Impl::StartElement( Reference< XAttributeList > xAttrList( rAttrList ); XMLMutableAttributeList *pMutableAttrList = 0; - // <-- sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) @@ -1235,8 +1227,7 @@ void XMLTableTransformerContext_Impl::StartElement( } // OD 2005-07-05 #i50521# - no break here for savety reason. } - // --> OD 2005-01-10 #i40011#, #i40015# - // - convert attribute table:style-name for <table:table> + // Convert attribute table:style-name for <table:table> (#i40011#, #i40015#) else if ( IsXMLToken( aLocalName, XML_STYLE_NAME ) ) { const OUString& rValue = xAttrList->getValueByIndex( i ); @@ -1252,7 +1243,6 @@ void XMLTableTransformerContext_Impl::StartElement( pMutableAttrList->SetValueByIndex( i, aAttrValue ); } } - // <-- else if( IsXMLToken( aLocalName, XML_PRINT ) ) { if ( !pMutableAttrList ) @@ -1915,12 +1905,11 @@ XMLTransformerActions *Oasis2OOoTransformer::GetUserDefinedActions( m_aActions[OASIS_DATETIME_ACTIONS] = new XMLTransformerActions( aDateTimeActionTable ); break; - // --> OD 2005-01-10 #i40011#, #i40015# + // Bugdoc with table won't load correctly (#i40011#, #i40015#) case OASIS_TABLE_STYLE_REF_ACTIONS: m_aActions[OASIS_TABLE_STYLE_REF_ACTIONS] = new XMLTransformerActions( aTableStyleRefActionTable ); break; - // <-- case OASIS_ANIMATION_ACTIONS: m_aActions[OASIS_ANIMATION_ACTIONS] = new XMLTransformerActions( aAnimationActionTable ); @@ -2016,19 +2005,14 @@ Oasis2OOoTransformer::~Oasis2OOoTransformer() throw() XMLEventOASISTransformerContext::FlushEventMap( m_pFormEventMap ); } -::com::sun::star::uno::Sequence< sal_Int8 > static CreateUnoTunnelId() +namespace { - static osl::Mutex aCreateMutex; - Guard<osl::Mutex> aGuard( aCreateMutex ); - Sequence< sal_Int8 > aSeq( 16 ); - rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True ); - return aSeq; + class theOasis2OOoTransformerUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theOasis2OOoTransformerUnoTunnelId> {}; } const Sequence< sal_Int8 > & Oasis2OOoTransformer::getUnoTunnelId() throw() { - static Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId(); - return aSeq; + return theOasis2OOoTransformerUnoTunnelId::get().getSeq(); } // XUnoTunnel @@ -2090,3 +2074,5 @@ Reference< XInterface > SAL_CALL Oasis2OOoTransformer_createInstance( OSL_TRACE("Creating Oasis2OOoTransformer"); return (cppu::OWeakObject*)new Oasis2OOoTransformer; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/Oasis2OOo.hxx b/xmloff/source/transform/Oasis2OOo.hxx index e6230b0bfcc1..6cc9f3f311e2 100644 --- a/xmloff/source/transform/Oasis2OOo.hxx +++ b/xmloff/source/transform/Oasis2OOo.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,9 +30,7 @@ #define _XMLOFF_OASIS2OOO_HXX #include "ActionMapTypesOASIS.hxx" -#ifndef _XMLOFF_TRANSFORMERBASE_HXX_ #include "TransformerBase.hxx" -#endif class XMLTransformerOASISEventMap_Impl; @@ -69,3 +68,5 @@ public: }; #endif // _XMLOFF_OASIS2OOO_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/PersAttrListTContext.cxx b/xmloff/source/transform/PersAttrListTContext.cxx index b9998d5465e5..8dc05110817d 100644 --- a/xmloff/source/transform/PersAttrListTContext.cxx +++ b/xmloff/source/transform/PersAttrListTContext.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. @@ -29,9 +30,7 @@ #include "precompiled_xmloff.hxx" #include <com/sun/star/util/XCloneable.hpp> #include "IgnoreTContext.hxx" -#ifndef _XMLOFF_TRANSFORMERBASE_HXX #include "TransformerBase.hxx" -#endif #include "MutableAttrList.hxx" #include <xmloff/nmspmap.hxx> #include "PersAttrListTContext.hxx" @@ -194,3 +193,5 @@ Reference< XAttributeList > XMLPersAttrListTContext::GetAttrList() const { return m_xAttrList; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/PersAttrListTContext.hxx b/xmloff/source/transform/PersAttrListTContext.hxx index b766fa1796f3..54aca4b14819 100644 --- a/xmloff/source/transform/PersAttrListTContext.hxx +++ b/xmloff/source/transform/PersAttrListTContext.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. @@ -120,3 +121,4 @@ public: #endif // _XMLOFF_PERSATTRLISTTCONTEXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/PersMixedContentTContext.cxx b/xmloff/source/transform/PersMixedContentTContext.cxx index 72fcb6c69248..a266c5ac3235 100644 --- a/xmloff/source/transform/PersMixedContentTContext.cxx +++ b/xmloff/source/transform/PersMixedContentTContext.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_TRANSFORMERBASE_HXX #include "TransformerBase.hxx" -#endif #include "PersMixedContentTContext.hxx" using ::rtl::OUString; @@ -158,3 +157,5 @@ void XMLPersMixedContentTContext::Characters( const OUString& rChars ) { AddContent( new XMLPersTextTContext_Impl( GetTransformer(), rChars ) ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/PersMixedContentTContext.hxx b/xmloff/source/transform/PersMixedContentTContext.hxx index a598a08aeaec..8a19dd53f470 100644 --- a/xmloff/source/transform/PersMixedContentTContext.hxx +++ b/xmloff/source/transform/PersMixedContentTContext.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. @@ -67,3 +68,4 @@ public: #endif // _XMLOFF_PERSMIXEDCONTENTTCONTEXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/ProcAddAttrTContext.cxx b/xmloff/source/transform/ProcAddAttrTContext.cxx index 02874fd9dc1f..e289b71270fb 100644 --- a/xmloff/source/transform/ProcAddAttrTContext.cxx +++ b/xmloff/source/transform/ProcAddAttrTContext.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. @@ -29,9 +30,7 @@ #include "precompiled_xmloff.hxx" #include "ProcAddAttrTContext.hxx" #include "MutableAttrList.hxx" -#ifndef _XMLOFF_TRANSFORMERBASE_HXX #include "TransformerBase.hxx" -#endif #include <xmloff/nmspmap.hxx> using ::rtl::OUString; @@ -78,3 +77,4 @@ void XMLProcAddAttrTransformerContext::StartElement( GetTransformer().GetDocHandler()->startElement( GetElemQName(), xAttrList ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/ProcAddAttrTContext.hxx b/xmloff/source/transform/ProcAddAttrTContext.hxx index 0068c9278ec8..bcdb4c1539ce 100644 --- a/xmloff/source/transform/ProcAddAttrTContext.hxx +++ b/xmloff/source/transform/ProcAddAttrTContext.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. @@ -56,3 +57,4 @@ public: #endif // _XMLOFF_PROCADDATTRCONTEXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/ProcAttrTContext.cxx b/xmloff/source/transform/ProcAttrTContext.cxx index b068ba03e558..83c2361ca579 100644 --- a/xmloff/source/transform/ProcAttrTContext.cxx +++ b/xmloff/source/transform/ProcAttrTContext.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. @@ -29,9 +30,7 @@ #include "precompiled_xmloff.hxx" #include "ProcAttrTContext.hxx" #include "MutableAttrList.hxx" -#ifndef _XMLOFF_TRANSFORMERBASE_HXX #include "TransformerBase.hxx" -#endif #include "TransformerActions.hxx" #include <xmloff/nmspmap.hxx> @@ -82,3 +81,5 @@ void XMLProcAttrTransformerContext::EndElement() { GetTransformer().GetDocHandler()->endElement( m_aElemQName ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/ProcAttrTContext.hxx b/xmloff/source/transform/ProcAttrTContext.hxx index 6c82058d529b..78a8b6dc1cf7 100644 --- a/xmloff/source/transform/ProcAttrTContext.hxx +++ b/xmloff/source/transform/ProcAttrTContext.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,4 @@ public: #endif // _XMLOFF_PROCATTRCONTEXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/PropType.hxx b/xmloff/source/transform/PropType.hxx index d62cb47e84ba..fcdebeb93c18 100644 --- a/xmloff/source/transform/PropType.hxx +++ b/xmloff/source/transform/PropType.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. @@ -48,3 +49,5 @@ enum XMLPropType }; #endif // _XMLOFF_PROPTYPE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/PropertyActionsOASIS.cxx b/xmloff/source/transform/PropertyActionsOASIS.cxx index 3abafaa5a13e..17463ca4ef80 100644 --- a/xmloff/source/transform/PropertyActionsOASIS.cxx +++ b/xmloff/source/transform/PropertyActionsOASIS.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. @@ -552,3 +553,5 @@ XMLTransformerActionInit aChartPropertyOASISAttrActionTable[] = { XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT, NO_PARAMS } }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/PropertyActionsOASIS.hxx b/xmloff/source/transform/PropertyActionsOASIS.hxx index 9d5e33c6194b..468d12157cbc 100644 --- a/xmloff/source/transform/PropertyActionsOASIS.hxx +++ b/xmloff/source/transform/PropertyActionsOASIS.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. @@ -73,3 +74,5 @@ extern XMLTransformerActionInit aListLevelPropertyOASISAttrActionTable[]; extern XMLTransformerActionInit aChartPropertyOASISAttrActionTable[]; #endif // _XMLOFF_PROPERTYACTIONSOASIS_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/PropertyActionsOOo.cxx b/xmloff/source/transform/PropertyActionsOOo.cxx index e0b9259787eb..ca369de2334c 100644 --- a/xmloff/source/transform/PropertyActionsOOo.cxx +++ b/xmloff/source/transform/PropertyActionsOOo.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. @@ -300,14 +301,12 @@ XMLTransformerActionInit aGraphicPropertyOOoAttrActionTable[] = NO_PARAMS }, /* generated entry */ // { XML_NAMESPACE_STYLE, XML_OVERFLOW_BEHAVIOR, XML_ATACTION_COPY, // NO_PARAMS }, /* new attribute */ - // --> OD 2005-05-12 #i49139# - rename attribute values of <style:mirror>: - // horizontal-on-left-pages --> horizontal-on-even - // horizontal-on-right-pages --> horizontal-on-odd -// { XML_NAMESPACE_STYLE, XML_MIRROR, XML_ATACTION_COPY, -// NO_PARAMS }, /* generated entry */ + /* Rename attribute values of <style:mirror>: (#i49139#) + horizontal-on-left-pages --> horizontal-on-even + horizontal-on-right-pages --> horizontal-on-odd + */ { XML_NAMESPACE_STYLE, XML_MIRROR, XML_ATACTION_STYLE_MIRROR_OOO, NO_PARAMS }, /* generated entry */ - // <-- { XML_NAMESPACE_FO, XML_CLIP, XML_ATACTION_INCHS2INS, NO_PARAMS }, /* generated entry */ { XML_NAMESPACE_DRAW, XML_FRAME_DISPLAY_SCROLLBAR, XML_ATACTION_COPY, @@ -1068,3 +1067,4 @@ XMLTransformerActionInit aChartPropertyOOoElemActionTable[] = { XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT, NO_PARAMS } }; +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/PropertyActionsOOo.hxx b/xmloff/source/transform/PropertyActionsOOo.hxx index 59e3314279ad..2344758baa41 100644 --- a/xmloff/source/transform/PropertyActionsOOo.hxx +++ b/xmloff/source/transform/PropertyActionsOOo.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,9 +52,8 @@ enum XMLPropOOOTransformerAction XML_ATACTION_MOVE_PROTECT, XML_ATACTION_SIZE_PROTECT, XML_ATACTION_PROTECT, - // --> OD 2005-06-10 #i50322# + // No image transparancy info in lable document (#i50322#) XML_ATACTION_WRITER_BACK_GRAPHIC_TRANSPARENCY, - // <-- XML_PTACTION_END=XML_TACTION_END }; @@ -77,3 +77,5 @@ extern XMLTransformerActionInit aChartPropertyOOoAttrActionTable[]; extern XMLTransformerActionInit aChartPropertyOOoElemActionTable[]; #endif // _XMLOFF_PROPERTYACTIONSOOO_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/RenameElemTContext.cxx b/xmloff/source/transform/RenameElemTContext.cxx index 026f6add68bc..5acc314c72aa 100644 --- a/xmloff/source/transform/RenameElemTContext.cxx +++ b/xmloff/source/transform/RenameElemTContext.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. @@ -29,9 +30,7 @@ #include "precompiled_xmloff.hxx" #include "RenameElemTContext.hxx" #include "MutableAttrList.hxx" -#ifndef _XMLOFF_TRANSFORMERBASE_HXX #include "TransformerBase.hxx" -#endif #include <xmloff/nmspmap.hxx> using ::rtl::OUString; @@ -91,3 +90,5 @@ void XMLRenameElemTransformerContext::EndElement() { GetTransformer().GetDocHandler()->endElement( m_aElemQName ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/RenameElemTContext.hxx b/xmloff/source/transform/RenameElemTContext.hxx index 398a8faa58bf..c73ff8b6dd09 100644 --- a/xmloff/source/transform/RenameElemTContext.hxx +++ b/xmloff/source/transform/RenameElemTContext.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. @@ -71,3 +72,4 @@ public: #endif // _XMLOFF_RENAMEELEMCONTEXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/StyleOASISTContext.cxx b/xmloff/source/transform/StyleOASISTContext.cxx index ca444e176a0b..2ef42bf0dfe2 100644 --- a/xmloff/source/transform/StyleOASISTContext.cxx +++ b/xmloff/source/transform/StyleOASISTContext.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,9 +39,7 @@ #include "PropType.hxx" #include "DeepTContext.hxx" #include "ProcAttrTContext.hxx" -#ifndef _XMLOFF_TRANSFOERMERBASE_HXX #include "TransformerBase.hxx" -#endif #include "TransformerActions.hxx" #include "ActionMapTypesOASIS.hxx" #include "MutableAttrList.hxx" @@ -496,7 +495,7 @@ void XMLPropertiesTContext_Impl::StartElement( case XML_ATACTION_DRAW_MIRROR_OASIS: // renames style:mirror to draw:mirror and adapts values { // keep original for writer graphic objects - // --> OD 2005-05-12 #i49139# - adapts attribute values, + // Adapts attribute values (#i49139#) OUString aNewAttrValue; SvXMLTokenEnumerator aTokenEnum( rAttrValue ); OUString aToken; @@ -504,7 +503,7 @@ void XMLPropertiesTContext_Impl::StartElement( { if ( aNewAttrValue.getLength() > 0 ) { - aNewAttrValue += rtl::OUString::createFromAscii( " " ); + aNewAttrValue += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( " " )); } if ( IsXMLToken( aToken, XML_HORIZONTAL_ON_EVEN ) ) @@ -521,7 +520,6 @@ void XMLPropertiesTContext_Impl::StartElement( } } pAttrList->AddAttribute( rAttrName, aNewAttrValue ); - // <-- // create old draw:mirror for drawing graphic objects OUString aAttrValue( GetXMLToken( IsXMLToken( rAttrValue, XML_HORIZONTAL ) ? XML_TRUE : XML_FALSE ) ); @@ -708,7 +706,7 @@ OUString XMLPropertiesTContext_Impl::MergeUnderline( eUnderline = XML_BOLD_WAVE; break; default: - OSL_ENSURE( false, "xmloff::XMLPropertiesTContext_Impl::MergeUnderline(), missing underline case!" ); + OSL_FAIL( "xmloff::XMLPropertiesTContext_Impl::MergeUnderline(), missing underline case!" ); break; } } @@ -723,7 +721,7 @@ OUString XMLPropertiesTContext_Impl::MergeUnderline( eUnderline = XML_NONE; break; default: - OSL_ENSURE( false, "xmloff::XMLPropertiesTContext_Impl::MergeUnderline(), missing underline case!" ); + OSL_FAIL( "xmloff::XMLPropertiesTContext_Impl::MergeUnderline(), missing underline case!" ); break; } } @@ -1011,3 +1009,5 @@ XMLTransformerActions *XMLStyleOASISTContext::CreateTransformerActions( return pActions; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/StyleOASISTContext.hxx b/xmloff/source/transform/StyleOASISTContext.hxx index 67ddfaa7480a..1f4f18986791 100644 --- a/xmloff/source/transform/StyleOASISTContext.hxx +++ b/xmloff/source/transform/StyleOASISTContext.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. @@ -74,3 +75,4 @@ public: #endif // _XMLOFF_STYLEOASISTCONTEXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/StyleOOoTContext.cxx b/xmloff/source/transform/StyleOOoTContext.cxx index dc0cfb75a100..f74ebdeeda31 100644 --- a/xmloff/source/transform/StyleOOoTContext.cxx +++ b/xmloff/source/transform/StyleOOoTContext.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. @@ -42,13 +43,9 @@ #include "MutableAttrList.hxx" #include "TransformerActions.hxx" #include "PropertyActionsOOo.hxx" -#ifndef _XMLOFF_TRANSFORMERBASE_HXX #include "TransformerBase.hxx" -#endif -#ifndef _XMLOFF_STYLEOASISTCONTEXT_HXX #include "StyleOOoTContext.hxx" -#endif #include <xmloff/xmluconv.hxx> #include <rtl/ustrbuf.hxx> #include <rtl/math.hxx> @@ -432,15 +429,15 @@ void XMLPropertiesOOoTContext_Impl::StartElement( OUString aProtectAttrValue; XMLTypedPropertiesOOoTContext_Impl * pProtectContext = 0; - // --> OD 2005-05-13 #i49139# - attribute <style:mirror> has to be priority - // over attribute <style:draw>. The filter from OpenDocument file format - // to OpenOffice.org file format produces styles with both attributes. + /* Attribute <style:mirror> has to be priority over attribute <style:draw>. + The filter from OpenDocument file format to OpenOffice.org file format + produces styles with both attributes. (#i49139#) + */ sal_Bool bExistStyleMirror( sal_False ); OUString aStyleMirrorAttrValue; sal_Bool bExistDrawMirror( sal_False ); OUString aDrawMirrorAttrValue; XMLTypedPropertiesOOoTContext_Impl* pMirrorContext( 0L ); - // <-- sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) @@ -612,7 +609,7 @@ void XMLPropertiesOOoTContext_Impl::StartElement( bDouble = sal_False; break; default: - OSL_ENSURE( false, "xmloff::XMLPropertiesOOoTContext_Impl::StartElement(), unknown underline token!" ); + OSL_FAIL( "xmloff::XMLPropertiesOOoTContext_Impl::StartElement(), unknown underline token!" ); break; } pContext->AddAttribute( @@ -715,7 +712,7 @@ void XMLPropertiesOOoTContext_Impl::StartElement( break; default: - OSL_ENSURE( false, "invalid spline type" ); + OSL_FAIL( "invalid spline type" ); pContext->AddAttribute( aNewAttrName, GetXMLToken( XML_NONE )); break; @@ -776,7 +773,7 @@ void XMLPropertiesOOoTContext_Impl::StartElement( eToken = XML_HOURGLASS; break; default: - OSL_ENSURE( false, "invalid named symbol" ); + OSL_FAIL( "invalid named symbol" ); break; } @@ -807,7 +804,7 @@ void XMLPropertiesOOoTContext_Impl::StartElement( aNewAttrName, GetXMLToken( XML_IMAGE )); break; default: - OSL_ENSURE( false, "invalid symbol type" ); + OSL_FAIL( "invalid symbol type" ); pContext->AddAttribute( aNewAttrName, GetXMLToken( XML_NONE )); break; @@ -892,16 +889,15 @@ void XMLPropertiesOOoTContext_Impl::StartElement( break; case XML_ATACTION_DRAW_MIRROR_OOO: // renames draw:mirror to style:mirror and adapts values { - // --> OD 2005-05-13 #i49139# + // OpenDocument file format: attribute value of <style:mirror> wrong (#i49139#) aDrawMirrorAttrValue = GetXMLToken( IsXMLToken( sAttrValue, XML_TRUE ) ? XML_HORIZONTAL : XML_NONE ); bExistDrawMirror = sal_True; pMirrorContext = pContext; - // <-- } break; - // --> OD 2005-05-12 #i49139# + // OpenDocument file format: attribute value of <style:mirror> wrong (#i49139#) case XML_ATACTION_STYLE_MIRROR_OOO: // adapts style:mirror values { SvXMLTokenEnumerator aTokenEnum( sAttrValue ); @@ -910,7 +906,7 @@ void XMLPropertiesOOoTContext_Impl::StartElement( { if ( aStyleMirrorAttrValue.getLength() > 0 ) { - aStyleMirrorAttrValue += rtl::OUString::createFromAscii( " " ); + aStyleMirrorAttrValue += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( " " )); } if ( IsXMLToken( aToken, XML_HORIZONTAL_ON_LEFT_PAGES ) ) @@ -930,7 +926,6 @@ void XMLPropertiesOOoTContext_Impl::StartElement( pMirrorContext = pContext; } break; - // <-- case XML_ATACTION_GAMMA_OOO: // converts double value to percentage { double fValue = sAttrValue.toDouble(); @@ -966,7 +961,7 @@ void XMLPropertiesOOoTContext_Impl::StartElement( } } - // --> OD 2005-05-13 #i49139# + // OpenDocument file format: attribute value of <style:mirror> wrong (#i49139#) if ( bExistStyleMirror ) { pMirrorContext->AddAttribute( @@ -981,7 +976,6 @@ void XMLPropertiesOOoTContext_Impl::StartElement( XML_NAMESPACE_STYLE, GetXMLToken( XML_MIRROR ) ), aDrawMirrorAttrValue); } - // <-- if( bMoveProtect || bSizeProtect || aProtectAttrValue.getLength() ) { @@ -1375,3 +1369,5 @@ XMLTransformerActions *XMLStyleOOoTContext::CreateTransformerActions( return pActions; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/StyleOOoTContext.hxx b/xmloff/source/transform/StyleOOoTContext.hxx index d28af6c5fe8e..4399d370fd8b 100644 --- a/xmloff/source/transform/StyleOOoTContext.hxx +++ b/xmloff/source/transform/StyleOOoTContext.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. @@ -73,3 +74,4 @@ public: #endif // _XMLOFF_STYLEOOOTCONTEXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/TContextVector.hxx b/xmloff/source/transform/TContextVector.hxx index f78dd9ce9265..6c3c42fb9432 100644 --- a/xmloff/source/transform/TContextVector.hxx +++ b/xmloff/source/transform/TContextVector.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. @@ -40,3 +41,4 @@ class XMLTransformerContextVector : #endif // _XMLOFF_TCONTEXTVECTOR_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/Transformer.hxx b/xmloff/source/transform/Transformer.hxx index 6d7524813074..1ebef98030a2 100644 --- a/xmloff/source/transform/Transformer.hxx +++ b/xmloff/source/transform/Transformer.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 @@ class XMLTransformer : public ::cppu::WeakImplHelper4< }; #endif // _XMLOFF_TRANSFORMER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/TransformerAction.hxx b/xmloff/source/transform/TransformerAction.hxx index d8e1411e8420..1b30d0adb560 100644 --- a/xmloff/source/transform/TransformerAction.hxx +++ b/xmloff/source/transform/TransformerAction.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. @@ -33,3 +34,5 @@ #endif // _XMLOFF_TRANSFORMERACTION_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/TransformerActionInit.hxx b/xmloff/source/transform/TransformerActionInit.hxx index 6c551521b382..c4e10e739ffc 100644 --- a/xmloff/source/transform/TransformerActionInit.hxx +++ b/xmloff/source/transform/TransformerActionInit.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. @@ -49,3 +50,5 @@ struct XMLTransformerActionInit }; #endif // _XMLOFF_TRANSFORMERACTIONINIT_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/TransformerActions.cxx b/xmloff/source/transform/TransformerActions.cxx index c14e6a33038b..de8bcc3e8638 100644 --- a/xmloff/source/transform/TransformerActions.cxx +++ b/xmloff/source/transform/TransformerActions.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 @@ XMLTransformerActions::XMLTransformerActions( XMLTransformerActionInit *pInit ) if( pInit ) { XMLTransformerActions::key_type aKey; - XMLTransformerActions::data_type aData; + XMLTransformerActions::mapped_type aData; while( pInit->m_nActionType != XML_TACTION_EOT ) { aKey.m_nPrefix = pInit->m_nPrefix; @@ -70,7 +71,7 @@ void XMLTransformerActions::Add( XMLTransformerActionInit *pInit ) if( pInit ) { XMLTransformerActions::key_type aKey; - XMLTransformerActions::data_type aData; + XMLTransformerActions::mapped_type aData; while( pInit->m_nActionType != XML_TACTION_EOT ) { aKey.m_nPrefix = pInit->m_nPrefix; @@ -90,3 +91,5 @@ void XMLTransformerActions::Add( XMLTransformerActionInit *pInit ) } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/TransformerActions.hxx b/xmloff/source/transform/TransformerActions.hxx index e542d8222cfe..1fd68e006b6f 100644 --- a/xmloff/source/transform/TransformerActions.hxx +++ b/xmloff/source/transform/TransformerActions.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. @@ -31,7 +32,7 @@ #include <rtl/ustring.hxx> #include <xmloff/nmspmap.hxx> -#include <hash_map> +#include <boost/unordered_map.hpp> #include "TransformerActionInit.hxx" #include "TransformerAction.hxx" @@ -148,7 +149,7 @@ struct TransformerAction_Impl // ----------------------------------------------------------------------------- class XMLTransformerActions : - public ::std::hash_map< NameKey_Impl, TransformerAction_Impl, + public ::boost::unordered_map< NameKey_Impl, TransformerAction_Impl, NameHash_Impl, NameHash_Impl > { public: @@ -159,3 +160,5 @@ public: }; #endif // _XMLOFF_TRANSFORMERACTIONS_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/TransformerBase.cxx b/xmloff/source/transform/TransformerBase.cxx index 61bb73120da6..59bd7a366b23 100644 --- a/xmloff/source/transform/TransformerBase.cxx +++ b/xmloff/source/transform/TransformerBase.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,17 +44,11 @@ #include "MutableAttrList.hxx" #include "TransformerActions.hxx" #include "ElemTransformerAction.hxx" -// --> OD 2005-06-29 #i50322# #include "PropertyActionsOOo.hxx" -// <-- -#ifndef _XMLOFF_TRANSFORMERTOKENMAP_HXX #include "TransformerTokenMap.hxx" -#endif #include <xmloff/xmluconv.hxx> -#ifndef _XMLOFF_TRANSFORMERBASE_HXX #include "TransformerBase.hxx" -#endif #include "TContextVector.hxx" using ::rtl::OUString; @@ -66,8 +61,6 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::i18n; using namespace ::com::sun::star::xml::sax; -// ----------------------------------------------------------------------------- - namespace { bool lcl_ConvertAttr( OUString & rOutAttribute, sal_Int32 nParam ) @@ -87,8 +80,6 @@ bool lcl_ConvertAttr( OUString & rOutAttribute, sal_Int32 nParam ) } } // anonymous namespace -// ----------------------------------------------------------------------------- - XMLTransformerContext *XMLTransformerBase::CreateContext( sal_uInt16 nPrefix, const OUString& rLocalName, const OUString& rQName ) { @@ -334,7 +325,7 @@ void SAL_CALL XMLTransformerBase::startElement( const OUString& rName, } void SAL_CALL XMLTransformerBase::endElement( const OUString& -#ifdef DBG_UTIL +#if OSL_DEBUG_LEVEL > 0 rName #endif ) @@ -345,7 +336,7 @@ rName // Get topmost context ::rtl::Reference< XMLTransformerContext > xContext = m_pContexts->back(); -#ifdef DBG_UTIL +#if OSL_DEBUG_LEVEL > 0 OSL_ENSURE( xContext->GetQName() == rName, "XMLTransformerBase::endElement: popped context has wrong lname" ); #endif @@ -442,7 +433,7 @@ void SAL_CALL XMLTransformerBase::initialize( const Sequence< Any >& aArguments for( sal_Int32 nIndex = 0; nIndex < nAnyCount; nIndex++, pAny++ ) { - // #b6236750# use isAssignableFrom instead of comparing the types to + // use isAssignableFrom instead of comparing the types to // allow XExtendedDocumentHandler instead of XDocumentHandler (used in // writeOasis2OOoLibraryElement in sfx2). // The Any shift operator can't be used to query the type because it @@ -613,12 +604,10 @@ XMLMutableAttributeList *XMLTransformerBase::ProcessAttrList( if( SvXMLUnitConverter::convertMeasure(nMeasure, aAttrValue, MAP_100TH_MM ) ) { - // --> OD 2004-10-29 #i13778#,#i36248# - // apply correct twip-to-1/100mm + // #i13778#,#i36248# apply correct twip-to-1/100mm nMeasure = (sal_Int32)( nMeasure >= 0 ? ((nMeasure*127+36)/72) : ((nMeasure*127-36)/72) ); - // <-- rtl::OUStringBuffer aBuffer; SvXMLUnitConverter::convertMeasure( aBuffer, nMeasure, MAP_100TH_MM, nDestUnit ); @@ -775,12 +764,10 @@ XMLMutableAttributeList *XMLTransformerBase::ProcessAttrList( if( SvXMLUnitConverter::convertMeasure(nMeasure, aAttrValue, MAP_100TH_MM ) ) { - // --> OD 2004-10-29 #i13778#,#i36248# - // apply correct 1/100mm-to-twip conversion + // #i13778#,#i36248#/ apply correct 1/100mm-to-twip conversion nMeasure = (sal_Int32)( nMeasure >= 0 ? ((nMeasure*72+63)/127) : ((nMeasure*72-63)/127) ); - // <-- OUStringBuffer aBuffer; SvXMLUnitConverter::convertMeasure( aBuffer, nMeasure, MAP_100TH_MM, nDestUnit ); @@ -861,7 +848,7 @@ XMLMutableAttributeList *XMLTransformerBase::ProcessAttrList( pMutableAttrList->SetValueByIndex( i, aBuffer.makeStringAndClear() ); } break; - // --> OD 2005-06-10 #i50322# - special handling for the + // #i50322# - special handling for the // transparency of writer background graphics. case XML_ATACTION_WRITER_BACK_GRAPHIC_TRANSPARENCY: { @@ -887,7 +874,6 @@ XMLMutableAttributeList *XMLTransformerBase::ProcessAttrList( bRename = sal_True; } break; - // <-- default: OSL_ENSURE( !this, "unknown action" ); break; @@ -1069,8 +1055,8 @@ sal_Bool XMLTransformerBase::EncodeStyleName( OUString& rName ) const ->xCharClass = Reference < XCharacterClassification >( xFactory->createInstance( - OUString::createFromAscii( - "com.sun.star.i18n.CharacterClassification_Unicode") ), + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.i18n.CharacterClassification_Unicode")) ), UNO_QUERY ); OSL_ENSURE( xCharClass.is(), @@ -1487,3 +1473,5 @@ bool XMLTransformerBase::isWriter() const xSI->supportsService( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.WebDocument" ) ) ) || xSI->supportsService( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.GlobalDocument" ) ) ) ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/TransformerBase.hxx b/xmloff/source/transform/TransformerBase.hxx index 1f5f8c51123f..2cbcd14f6681 100644 --- a/xmloff/source/transform/TransformerBase.hxx +++ b/xmloff/source/transform/TransformerBase.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. @@ -36,9 +37,7 @@ #include <com/sun/star/frame/XModel.hpp> #include <xmloff/xmltoken.hxx> -#ifndef _XMLOFF_TRANSFORMER_HXX_ #include "Transformer.hxx" -#endif namespace rtl { class OUString; } namespace com { namespace sun { namespace star { @@ -206,3 +205,5 @@ public: }; #endif // _XMLOFF_TRANSFORMER_BASE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/TransformerContext.cxx b/xmloff/source/transform/TransformerContext.cxx index 09635ad560b3..4e3f7ef6a1fe 100644 --- a/xmloff/source/transform/TransformerContext.cxx +++ b/xmloff/source/transform/TransformerContext.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,13 +34,9 @@ #include <com/sun/star/xml/sax/XAttributeList.hpp> #include <xmloff/nmspmap.hxx> -#ifndef _XMLOFF_TRANSFOERMERBASE_HXX #include "TransformerBase.hxx" -#endif -#ifndef _XMLOFF_TRANSFOERMERCONTEXT_HXX #include "TransformerContext.hxx" -#endif using ::rtl::OUString; @@ -111,3 +108,5 @@ void XMLTransformerContext::ExportContent() { OSL_ENSURE( !this, "context is not persistent" ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/TransformerContext.hxx b/xmloff/source/transform/TransformerContext.hxx index e6bba90bae5e..07b33e026ed9 100644 --- a/xmloff/source/transform/TransformerContext.hxx +++ b/xmloff/source/transform/TransformerContext.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. @@ -114,3 +115,4 @@ public: #endif // _XMLOFF_TRANSFORMERCONTEXT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/TransformerTokenMap.cxx b/xmloff/source/transform/TransformerTokenMap.cxx index a3020cf2fa3b..a42c2c62976e 100644 --- a/xmloff/source/transform/TransformerTokenMap.cxx +++ b/xmloff/source/transform/TransformerTokenMap.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_TRANSFORMERTOKENMAP_HXX #include "TransformerTokenMap.hxx" -#endif using namespace ::xmloff::token; @@ -52,3 +51,5 @@ XMLTransformerTokenMap::XMLTransformerTokenMap( XMLTokenEnum *pInit ) XMLTransformerTokenMap::~XMLTransformerTokenMap() { } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/TransformerTokenMap.hxx b/xmloff/source/transform/TransformerTokenMap.hxx index 971ee3b96971..d5963cc0082f 100644 --- a/xmloff/source/transform/TransformerTokenMap.hxx +++ b/xmloff/source/transform/TransformerTokenMap.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. @@ -30,16 +31,14 @@ #include <rtl/ustring.hxx> #include <comphelper/stl_types.hxx> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <xmloff/xmltoken.hxx> -#ifndef _XMLOFF_TRANSFORMERTOKENMAP_HXX #include "TransformerTokenMap.hxx" -#endif class XMLTransformerTokenMap : - public ::std::hash_map< ::rtl::OUString, ::xmloff::token::XMLTokenEnum, + public ::boost::unordered_map< ::rtl::OUString, ::xmloff::token::XMLTokenEnum, ::rtl::OUStringHash, ::comphelper::UStringEqual > { public: @@ -48,3 +47,5 @@ public: }; #endif // _XMLOFF_TRANSFORMERTOKENMAPS_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/XMLFilterRegistration.cxx b/xmloff/source/transform/XMLFilterRegistration.cxx index f201474015fc..4db6da9a91b5 100644 --- a/xmloff/source/transform/XMLFilterRegistration.cxx +++ b/xmloff/source/transform/XMLFilterRegistration.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. @@ -182,7 +183,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char * pImpl } catch( uno::Exception& ) { - OSL_ENSURE( sal_False, "xof::component_getFactory: Exception!" ); + OSL_FAIL( "xof::component_getFactory: Exception!" ); } } @@ -193,3 +194,4 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char * pImpl } #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/xof.component b/xmloff/source/transform/xof.component index 8f9c88f7fa0d..8f9c88f7fa0d 100644..100755 --- a/xmloff/source/transform/xof.component +++ b/xmloff/source/transform/xof.component diff --git a/xmloff/source/xforms/SchemaContext.cxx b/xmloff/source/xforms/SchemaContext.cxx index 14f12bc5df69..38bda73bebf0 100644 --- a/xmloff/source/xforms/SchemaContext.cxx +++ b/xmloff/source/xforms/SchemaContext.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. @@ -98,3 +99,5 @@ SvXMLImportContext* SchemaContext::HandleChild( mxRepository ) : new SvXMLImportContext( GetImport(), nPrefix, rLocalName ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/SchemaContext.hxx b/xmloff/source/xforms/SchemaContext.hxx index e3a0be34c29f..2819df1c5500 100644 --- a/xmloff/source/xforms/SchemaContext.hxx +++ b/xmloff/source/xforms/SchemaContext.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. @@ -82,3 +83,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/SchemaRestrictionContext.cxx b/xmloff/source/xforms/SchemaRestrictionContext.cxx index 0663aa2531f4..befc06a7e521 100644 --- a/xmloff/source/xforms/SchemaRestrictionContext.cxx +++ b/xmloff/source/xforms/SchemaRestrictionContext.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. @@ -131,7 +132,7 @@ void SchemaRestrictionContext::CreateDataType() } catch( const Exception& ) { - DBG_ERROR( "exception during type creation" ); + OSL_FAIL( "exception during type creation" ); } DBG_ASSERT( mxDataType.is(), "can't create type" ); } @@ -356,7 +357,7 @@ SvXMLImportContext* SchemaRestrictionContext::HandleChild( break; default: - DBG_ERROR( "unknown facet" ); + OSL_FAIL( "unknown facet" ); } // finally, set the property @@ -378,3 +379,5 @@ SvXMLImportContext* SchemaRestrictionContext::HandleChild( return new SvXMLImportContext( GetImport(), nPrefix, rLocalName ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/SchemaRestrictionContext.hxx b/xmloff/source/xforms/SchemaRestrictionContext.hxx index c08251aadbbe..d86a71232098 100644 --- a/xmloff/source/xforms/SchemaRestrictionContext.hxx +++ b/xmloff/source/xforms/SchemaRestrictionContext.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. @@ -89,3 +90,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/SchemaSimpleTypeContext.cxx b/xmloff/source/xforms/SchemaSimpleTypeContext.cxx index 821dd768fbf9..96f8da4dc99f 100644 --- a/xmloff/source/xforms/SchemaSimpleTypeContext.cxx +++ b/xmloff/source/xforms/SchemaSimpleTypeContext.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,10 +107,12 @@ SvXMLImportContext* SchemaSimpleTypeContext::HandleChild( mxRepository, msTypeName ); break; default: - DBG_ERROR( "Booo!" ); + OSL_FAIL( "Booo!" ); } return ( pContext != NULL ) ? pContext : new SvXMLImportContext( GetImport(), nPrefix, rLocalName ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/SchemaSimpleTypeContext.hxx b/xmloff/source/xforms/SchemaSimpleTypeContext.hxx index cf4221f7168c..33e24351fe1f 100644 --- a/xmloff/source/xforms/SchemaSimpleTypeContext.hxx +++ b/xmloff/source/xforms/SchemaSimpleTypeContext.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. @@ -84,3 +85,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/TokenContext.cxx b/xmloff/source/xforms/TokenContext.cxx index d1310effeeb8..ab9298773e2c 100644 --- a/xmloff/source/xforms/TokenContext.cxx +++ b/xmloff/source/xforms/TokenContext.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 @@ void TokenContext::Characters( const ::rtl::OUString& rCharacters ) if( ::std::find_if( pBegin, pEnd, ::std::not1(::std::ptr_fun(lcl_IsWhiteSpace)) ) != pEnd ) GetImport().SetError( XMLERROR_UNKNOWN_CHARACTERS, rCharacters ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/TokenContext.hxx b/xmloff/source/xforms/TokenContext.hxx index 7200eb0891a1..33ef27ac3798 100644 --- a/xmloff/source/xforms/TokenContext.hxx +++ b/xmloff/source/xforms/TokenContext.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. @@ -112,3 +113,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/XFormsBindContext.cxx b/xmloff/source/xforms/XFormsBindContext.cxx index 67bbf8f70b84..71cc356d0e1a 100644 --- a/xmloff/source/xforms/XFormsBindContext.cxx +++ b/xmloff/source/xforms/XFormsBindContext.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. @@ -127,7 +128,7 @@ void XFormsBindContext::HandleAttribute( sal_uInt16 nToken, rValue ) ) ); break; default: - DBG_ERROR( "should not happen" ); + OSL_FAIL( "should not happen" ); break; } } @@ -155,7 +156,7 @@ SvXMLImportContext* XFormsBindContext::HandleChild( const OUString&, const Reference<XAttributeList>& ) { - DBG_ERROR( "no children supported" ); + OSL_FAIL( "no children supported" ); return NULL; } @@ -188,3 +189,5 @@ void lcl_fillNamespaceContainer( } while( nKeyIter != XML_NAMESPACE_UNKNOWN ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/XFormsBindContext.hxx b/xmloff/source/xforms/XFormsBindContext.hxx index af2d7a440e3a..f6e723a9f424 100644 --- a/xmloff/source/xforms/XFormsBindContext.hxx +++ b/xmloff/source/xforms/XFormsBindContext.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. @@ -86,3 +87,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/XFormsInstanceContext.cxx b/xmloff/source/xforms/XFormsInstanceContext.cxx index 06cabce7267f..eeb6621eb2ff 100644 --- a/xmloff/source/xforms/XFormsInstanceContext.cxx +++ b/xmloff/source/xforms/XFormsInstanceContext.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,7 +143,7 @@ void XFormsInstanceContext::HandleAttribute( msId = rValue; break; default: - DBG_ERROR( "should not happen" ); + OSL_FAIL( "should not happen" ); break; } } @@ -153,6 +154,8 @@ SvXMLImportContext* XFormsInstanceContext::HandleChild( const OUString&, const Reference<XAttributeList>& ) { - DBG_ERROR( "to be handled by CreateChildContext" ); + OSL_FAIL( "to be handled by CreateChildContext" ); return NULL; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/XFormsInstanceContext.hxx b/xmloff/source/xforms/XFormsInstanceContext.hxx index 2772aef7fd2f..5c5367018d9f 100644 --- a/xmloff/source/xforms/XFormsInstanceContext.hxx +++ b/xmloff/source/xforms/XFormsInstanceContext.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. @@ -97,3 +98,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/XFormsModelContext.cxx b/xmloff/source/xforms/XFormsModelContext.cxx index 074cbd7ddb8d..7af420c45eba 100644 --- a/xmloff/source/xforms/XFormsModelContext.cxx +++ b/xmloff/source/xforms/XFormsModelContext.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. @@ -109,7 +110,7 @@ void XFormsModelContext::HandleAttribute( GetImport().SetError( XMLERROR_XFORMS_NO_SCHEMA_SUPPORT ); break; default: - DBG_ERROR( "this should not happen" ); + OSL_FAIL( "this should not happen" ); break; } } @@ -144,7 +145,7 @@ SvXMLImportContext* XFormsModelContext::HandleChild( ->getDataTypeRepository() ); break; default: - DBG_ERROR( "Boooo!" ); + OSL_FAIL( "Boooo!" ); break; } @@ -161,3 +162,5 @@ void XFormsModelContext::EndElement() GetImport().initXForms(); lcl_addXFormsModel( GetImport().GetModel(), getModel() ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/XFormsModelContext.hxx b/xmloff/source/xforms/XFormsModelContext.hxx index 5731b606f1bb..8c89fcd8470b 100644 --- a/xmloff/source/xforms/XFormsModelContext.hxx +++ b/xmloff/source/xforms/XFormsModelContext.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. @@ -83,3 +84,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/XFormsModelExport.hxx b/xmloff/source/xforms/XFormsModelExport.hxx index 2286d9ea2fb2..202692a4f080 100644 --- a/xmloff/source/xforms/XFormsModelExport.hxx +++ b/xmloff/source/xforms/XFormsModelExport.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. @@ -40,3 +41,5 @@ void exportXFormsModel( SvXMLExport&, const com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet>& ); #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/XFormsSubmissionContext.cxx b/xmloff/source/xforms/XFormsSubmissionContext.cxx index 7835cf5dc0a7..e86bfc7701bb 100644 --- a/xmloff/source/xforms/XFormsSubmissionContext.cxx +++ b/xmloff/source/xforms/XFormsSubmissionContext.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. @@ -105,7 +106,7 @@ XFormsSubmissionContext::~XFormsSubmissionContext() Any toBool( const OUString& rValue ) { Any aValue; - sal_Bool bValue; + bool bValue; if( SvXMLUnitConverter::convertBool( bValue, rValue ) ) { aValue <<= ( bValue ? true : false ); @@ -165,7 +166,7 @@ void XFormsSubmissionContext::HandleAttribute( sal_uInt16 nToken, lcl_setValue( mxSubmission, OUSTRING("IncludeNamespacePrefixes"), rValue ); break; default: - DBG_ERROR( "unknown attribute" ); + OSL_FAIL( "unknown attribute" ); break; } } @@ -177,6 +178,8 @@ SvXMLImportContext* XFormsSubmissionContext::HandleChild( const OUString&, const Reference<XAttributeList>& ) { - DBG_ERROR( "no children supported" ); + OSL_FAIL( "no children supported" ); return NULL; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/XFormsSubmissionContext.hxx b/xmloff/source/xforms/XFormsSubmissionContext.hxx index 00cd2849603b..a08ab8663f67 100644 --- a/xmloff/source/xforms/XFormsSubmissionContext.hxx +++ b/xmloff/source/xforms/XFormsSubmissionContext.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. @@ -81,3 +82,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/xformsapi.cxx b/xmloff/source/xforms/xformsapi.cxx index 794798c5366a..4d23ba45d3d9 100644 --- a/xmloff/source/xforms/xformsapi.cxx +++ b/xmloff/source/xforms/xformsapi.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. @@ -116,6 +117,7 @@ void lcl_addXFormsModel( // TODO: implement proper error handling DBG_ASSERT( bSuccess, "can't import model" ); + (void)bSuccess; } Reference<XPropertySet> lcl_findXFormsBindingOrSubmission( @@ -342,7 +344,9 @@ rtl::OUString lcl_getBasicTypeName( } catch( const Exception& ) { - DBG_ERROR( "exception during type creation" ); + OSL_FAIL( "exception during type creation" ); } return sTypeName; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/xformsapi.hxx b/xmloff/source/xforms/xformsapi.hxx index 4b5987594478..fc24b06248f3 100644 --- a/xmloff/source/xforms/xformsapi.hxx +++ b/xmloff/source/xforms/xformsapi.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. @@ -91,3 +92,5 @@ rtl::OUString lcl_getBasicTypeName( const rtl::OUString& rXMLName ); #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/xformsexport.cxx b/xmloff/source/xforms/xformsexport.cxx index 3d90170f11f4..afd8731473b3 100644 --- a/xmloff/source/xforms/xformsexport.cxx +++ b/xmloff/source/xforms/xformsexport.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. @@ -535,7 +536,7 @@ OUString lcl_getXSDType( SvXMLExport& rExport, case com::sun::star::xsd::DataTypeClass::QName: case com::sun::star::xsd::DataTypeClass::NOTATION: default: - DBG_ERROR( "unknown data type" ); + OSL_FAIL( "unknown data type" ); } return rExport.GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_XSD, @@ -679,7 +680,7 @@ OUString lcl_bool( const Any& rAny ) bool bResult = bool(); if( rAny >>= bResult ) return GetXMLToken( bResult ? XML_TRUE : XML_FALSE ); - DBG_ERROR( "expected boolean value" ); + OSL_FAIL( "expected boolean value" ); return OUString(); } @@ -833,3 +834,5 @@ void getXFormsSettings( const Reference< XNameAccess >& _rXForms, Sequence< Prop DBG_UNHANDLED_EXCEPTION(); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/xformsimport.cxx b/xmloff/source/xforms/xformsimport.cxx index 84908444498e..c2b06e0dcdc8 100644 --- a/xmloff/source/xforms/xformsimport.cxx +++ b/xmloff/source/xforms/xformsimport.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. @@ -157,7 +158,7 @@ void applyXFormsSettings( const Reference< XNameAccess >& _rXForms, const Sequen Reference< XNameAccess > xModelSettings( aSettings.get( "XFormModels" ), UNO_QUERY ); if ( !xModelSettings.is() ) { - OSL_ENSURE( false, "applyXFormsSettings: wrong type for the XFormModels settings!" ); + OSL_FAIL( "applyXFormsSettings: wrong type for the XFormModels settings!" ); return; } @@ -176,7 +177,7 @@ void applyXFormsSettings( const Reference< XNameAccess >& _rXForms, const Sequen // the model itself if ( !_rXForms->hasByName( *pModelName ) ) { - OSL_ENSURE( false, "applyXFormsSettings: have settings for a non-existent XForms model!" ); + OSL_FAIL( "applyXFormsSettings: have settings for a non-existent XForms model!" ); continue; } @@ -191,7 +192,7 @@ void applyXFormsSettings( const Reference< XNameAccess >& _rXForms, const Sequen { if ( !xModelPSI->hasPropertyByName( pSetting->Name ) ) { - OSL_ENSURE( false, "applyXFormsSettings: non-existent model property!" ); + OSL_FAIL( "applyXFormsSettings: non-existent model property!" ); continue; } @@ -204,3 +205,5 @@ void applyXFormsSettings( const Reference< XNameAccess >& _rXForms, const Sequen DBG_UNHANDLED_EXCEPTION(); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/util/xo.component b/xmloff/util/xo.component index 7fe2119636d1..7fe2119636d1 100644..100755 --- a/xmloff/util/xo.component +++ b/xmloff/util/xo.component diff --git a/xmloff/xml/components.xml b/xmloff/xml/components.xml index 860f8e23f0d6..860f8e23f0d6 100644..100755 --- a/xmloff/xml/components.xml +++ b/xmloff/xml/components.xml |