summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Module_ooo.mk1
-rw-r--r--Repository.mk6
-rw-r--r--RepositoryFixes.mk12
-rw-r--r--autodoc/source/parser_i/idoc/docu_pe2.cxx126
-rw-r--r--autodoc/source/parser_i/inc/s2_dsapi/docu_pe2.hxx9
-rw-r--r--basctl/source/basicide/baside2b.cxx1
-rw-r--r--basctl/source/basicide/basidesh.cxx5
-rw-r--r--basctl/source/basicide/bastype2.cxx2
-rw-r--r--basic/source/app/app.cxx9
-rw-r--r--basic/source/app/app.hxx1
-rw-r--r--basic/source/app/appwin.cxx8
-rw-r--r--basic/source/runtime/dllmgr.cxx17
-rwxr-xr-xbasic/source/runtime/step2.cxx2
-rw-r--r--canvas/source/cairo/cairo_canvasfont.cxx5
-rwxr-xr-xcanvas/source/directx/dx_textlayout_drawhelper.cxx7
-rw-r--r--canvas/source/vcl/canvasfont.cxx5
-rwxr-xr-x[-rw-r--r--]cli_ure/version/version.txt24
-rw-r--r--codemaker/source/bonobowrappermaker/corbaoptions.cxx3
-rw-r--r--codemaker/source/cppumaker/cppuoptions.cxx17
-rw-r--r--codemaker/source/cunomaker/cunooptions.cxx5
-rw-r--r--codemaker/source/idlmaker/idloptions.cxx5
-rw-r--r--codemaker/source/javamaker/javaoptions.cxx17
-rw-r--r--configure.in29
-rw-r--r--cppcanvas/inc/cppcanvas/renderer.hxx3
-rw-r--r--cppcanvas/source/mtfrenderer/implrenderer.cxx10
-rw-r--r--cpputools/source/registercomponent/registercomponent.cxx4
-rw-r--r--cui/source/tabpages/numpages.cxx11
-rwxr-xr-x[-rw-r--r--]cui/source/tabpages/page.cxx7
-rw-r--r--desktop/os2/source/applauncher/makefile.mk6
-rw-r--r--desktop/os2/source/applauncher/os2quickstart.cxx (renamed from desktop/os2/source/applauncher/quickstart.cxx)0
-rw-r--r--desktop/prj/build.lst5
-rw-r--r--desktop/prj/d.lst7
-rw-r--r--desktop/source/app/app.cxx12
-rw-r--r--[-rwxr-xr-x]desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx2
-rw-r--r--desktop/util/ooverinfo.rc2
-rwxr-xr-xdesktop/util/ooverinfo2.rc2
-rw-r--r--[-rwxr-xr-x]desktop/util/verinfo.rc4
-rw-r--r--desktop/win32/source/QuickStart/OOQuickStart.rc (renamed from sysui/source/win32/QuickStart/OOQuickStart.rc)8
-rw-r--r--desktop/win32/source/QuickStart/QuickStart.cpp (renamed from sysui/source/win32/QuickStart/QuickStart.cpp)0
-rw-r--r--desktop/win32/source/QuickStart/QuickStart.h (renamed from sysui/source/win32/QuickStart/QuickStart.h)0
-rw-r--r--desktop/win32/source/QuickStart/StdAfx.h (renamed from sysui/source/win32/QuickStart/StdAfx.h)0
-rw-r--r--desktop/win32/source/QuickStart/makefile.mk (renamed from sysui/source/win32/QuickStart/makefile.mk)0
-rw-r--r--desktop/win32/source/QuickStart/resource.h (renamed from sysui/source/win32/QuickStart/resource.h)0
-rw-r--r--desktop/win32/source/QuickStart/so/QuickStart.rc (renamed from sysui/source/win32/QuickStart/so/QuickStart.rc)8
-rw-r--r--desktop/win32/source/QuickStart/so/makefile.mk (renamed from sysui/source/win32/QuickStart/so/makefile.mk)4
-rw-r--r--desktop/win32/source/applauncher/makefile.mk4
-rw-r--r--desktop/win32/source/guiloader/makefile.mk4
-rw-r--r--dmake/config.h.in3
-rwxr-xr-xdmake/configure2
-rwxr-xr-xdmake/configure.in2
-rw-r--r--dmake/dmake.c50
-rw-r--r--dmake/expand.c668
-rw-r--r--dmake/function.c68
-rw-r--r--dmake/infer.c389
-rw-r--r--dmake/parse.c204
-rw-r--r--dmake/rulparse.c779
-rw-r--r--dmake/sysintf.c22
-rw-r--r--dmake/unix/runargv.c171
-rw-r--r--drawinglayer/inc/drawinglayer/attribute/fontattribute.hxx2
-rw-r--r--drawinglayer/source/attribute/fontattribute.cxx20
-rw-r--r--drawinglayer/source/primitive2d/textlayoutdevice.cxx2
-rw-r--r--drawinglayer/source/processor2d/canvasprocessor.cxx5
-rw-r--r--dtrans/source/win32/dtobj/XTDataObject.cxx2
-rw-r--r--dtrans/source/win32/dtobj/XTDataObject.hxx2
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/fontitem.hxx21
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/svxacorr.hxx1
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/editobj.cxx4
-rw-r--r--editeng/source/editeng/edtspell.cxx7
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/edtspell.hxx1
-rwxr-xr-xediteng/source/editeng/impedit4.cxx10
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/textconv.cxx10
-rw-r--r--editeng/source/items/numitem.cxx2
-rwxr-xr-x[-rw-r--r--]editeng/source/items/textitem.cxx20
-rwxr-xr-x[-rw-r--r--]editeng/source/misc/svxacorr.cxx51
-rwxr-xr-x[-rw-r--r--]editeng/source/uno/unofdesc.cxx10
-rw-r--r--extensions/source/ole/unoobjw.cxx2
-rw-r--r--filter/source/docbook/sofftodocbookheadings.xsl87
-rw-r--r--filter/source/xslt/export/wordml/ooo2wordml_draw.xsl4
-rw-r--r--filter/source/xslt/import/wordml/wordml2ooo_draw.xsl4
-rw-r--r--filter/source/xslt/odf2xhtml/export/common/styles/style_collector.xsl1610
-rw-r--r--filter/source/xslt/odf2xhtml/export/common/table_of_content.xsl118
-rw-r--r--filter/source/xslt/odf2xhtml/export/xhtml/body.xsl113
-rw-r--r--filter/source/xslt/odf2xhtml/export/xhtml/header.xsl9
-rw-r--r--filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl2
-rw-r--r--filter/source/xsltdialog/xmlfilterjar.cxx16
-rw-r--r--filter/source/xsltfilter/Manifest2
-rw-r--r--filter/source/xsltfilter/com/sun/star/comp/xsltfilter/Base64.java (renamed from filter/source/xsltfilter/Base64.java)2
-rw-r--r--filter/source/xsltfilter/com/sun/star/comp/xsltfilter/XSLTFilterOLEExtracter.java (renamed from filter/source/xsltfilter/XSLTFilterOLEExtracter.java)2
-rw-r--r--filter/source/xsltfilter/com/sun/star/comp/xsltfilter/XSLTransformer.java (renamed from filter/source/xsltfilter/XSLTransformer.java)57
-rw-r--r--filter/source/xsltfilter/makefile.mk10
-rw-r--r--framework/inc/services/substitutepathvars.hxx205
-rwxr-xr-xframework/qa/complex/path_substitution/PathSubstitutionTest.java24
-rw-r--r--framework/qa/unoapi/makefile.mk48
-rw-r--r--framework/source/services/substitutepathvars.cxx329
-rw-r--r--graphite/graphite-2.3.1_debug.patch13
-rw-r--r--graphite/makefile.mk2
-rw-r--r--idlc/inc/idlc/idlctypes.hxx2
-rw-r--r--idlc/inc/idlc/options.hxx17
-rw-r--r--idlc/source/astexpression.cxx21
-rw-r--r--idlc/source/idlcmain.cxx19
-rw-r--r--idlc/source/options.cxx547
-rw-r--r--idlc/source/preproc/eval.c15
-rw-r--r--idlc/source/preproc/lex.c10
-rw-r--r--idlc/source/preproc/unix.c1
-rw-r--r--instsetoo_native/util/openoffice.lst8
-rw-r--r--moz/prj/d.lst19
-rw-r--r--odk/examples/CLI/CSharp/Spreadsheet/Makefile15
-rw-r--r--odk/examples/CLI/VB.NET/WriterDemo/Makefile7
-rw-r--r--odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.components10
-rw-r--r--odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.java32
-rw-r--r--odk/examples/DevelopersGuide/Charts/Makefile36
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.components8
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java36
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/JobsAddon/Makefile39
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/Makefile41
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx56
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/Makefile41
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java18
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon_java.components8
-rw-r--r--odk/examples/DevelopersGuide/Components/CppComponent/Makefile44
-rw-r--r--odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx67
-rw-r--r--odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx21
-rw-r--r--odk/examples/DevelopersGuide/Components/JavaComponent/JavaComponent.components11
-rw-r--r--odk/examples/DevelopersGuide/Components/JavaComponent/Makefile57
-rw-r--r--odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java22
-rw-r--r--odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.components8
-rw-r--r--odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.java14
-rw-r--r--odk/examples/DevelopersGuide/Components/SimpleLicense/Makefile10
-rw-r--r--odk/examples/DevelopersGuide/Components/Thumbs/Makefile2
-rw-r--r--odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/ImageShrink.components8
-rw-r--r--odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/ImageShrink.java17
-rw-r--r--odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/Makefile23
-rw-r--r--odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/Makefile4
-rw-r--r--odk/examples/DevelopersGuide/Components/Thumbs/thumbs.mk21
-rw-r--r--odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.components8
-rw-r--r--odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java14
-rw-r--r--odk/examples/DevelopersGuide/Components/dialogcomponent/Makefile10
-rw-r--r--odk/examples/DevelopersGuide/Database/DriverSkeleton/Makefile47
-rw-r--r--odk/examples/DevelopersGuide/Database/DriverSkeleton/SServices.cxx58
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/Makefile2
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/Makefile2
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java18
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/Makefile8
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/SampleFilter.components10
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/Makefile38
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/fdcomp.cxx53
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx58
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/Makefile46
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java14
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXmlFilter_java.components8
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/Makefile44
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Linguistic/Makefile115
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.components8
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.java32
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleSpellChecker.components8
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleSpellChecker.java32
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleThesaurus.components8
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleThesaurus.java32
-rw-r--r--odk/examples/DevelopersGuide/ProfUNO/CppBinding/Makefile38
-rw-r--r--odk/examples/DevelopersGuide/ProfUNO/CppBinding/office_connect.ini2
-rw-r--r--odk/examples/DevelopersGuide/ProfUNO/CppBinding/office_connectrc2
-rw-r--r--odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.components9
-rw-r--r--odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java24
-rw-r--r--odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.components8
-rw-r--r--odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.java63
-rw-r--r--odk/examples/DevelopersGuide/Spreadsheet/Makefile20
-rw-r--r--odk/examples/cpp/DocumentLoader/DocumentLoader.cxx39
-rw-r--r--odk/examples/cpp/DocumentLoader/Makefile37
-rw-r--r--odk/examples/cpp/complextoolbarcontrols/Makefile55
-rw-r--r--odk/examples/cpp/complextoolbarcontrols/exports.cxx65
-rw-r--r--odk/examples/cpp/counter/Makefile42
-rw-r--r--odk/examples/cpp/counter/counter.cxx58
-rw-r--r--odk/examples/cpp/counter/countermain.cxx68
-rw-r--r--odk/examples/cpp/remoteclient/Makefile65
-rw-r--r--odk/examples/cpp/remoteclient/remoteclient.cxx54
-rwxr-xr-x[-rw-r--r--]odk/examples/java/EmbedDocument/EmbeddedObject/Makefile12
-rw-r--r--odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObject.components8
-rwxr-xr-xodk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObjectFactory.java14
-rw-r--r--odk/examples/java/MinimalComponent/Makefile18
-rw-r--r--odk/examples/java/MinimalComponent/MinimalComponent.components8
-rw-r--r--odk/examples/java/MinimalComponent/MinimalComponent.java14
-rw-r--r--odk/examples/java/PropertySet/Makefile10
-rw-r--r--odk/examples/java/PropertySet/PropTest.components8
-rw-r--r--odk/examples/java/PropertySet/PropTest.java14
-rw-r--r--odk/examples/java/Spreadsheet/CalcAddins.components9
-rw-r--r--odk/examples/java/Spreadsheet/CalcAddins.java16
-rw-r--r--odk/examples/java/Spreadsheet/Makefile58
-rw-r--r--odk/examples/java/ToDo/Makefile10
-rw-r--r--odk/examples/java/ToDo/ToDo.components8
-rw-r--r--odk/examples/java/ToDo/ToDo.java12
-rw-r--r--odk/settings/component.uno.def1
-rw-r--r--odk/settings/settings.mk65
-rw-r--r--odk/util/check.pl2
-rw-r--r--odk/util/makefile.pmk2
-rw-r--r--offapi/com/sun/star/accessibility/XAccessibleMultiLineText.idl2
-rw-r--r--offapi/com/sun/star/animations/XAnimationListener.idl2
-rw-r--r--offapi/com/sun/star/awt/EnhancedMouseEvent.idl2
-rw-r--r--offapi/com/sun/star/awt/UnoControlButtonModel.idl12
-rw-r--r--offapi/com/sun/star/awt/UnoControlCheckBoxModel.idl8
-rw-r--r--offapi/com/sun/star/awt/UnoControlComboBoxModel.idl4
-rw-r--r--offapi/com/sun/star/awt/UnoControlContainerModel.idl2
-rw-r--r--offapi/com/sun/star/awt/UnoControlCurrencyFieldModel.idl10
-rw-r--r--offapi/com/sun/star/awt/UnoControlDateFieldModel.idl12
-rw-r--r--offapi/com/sun/star/awt/UnoControlDialogModel.idl6
-rw-r--r--offapi/com/sun/star/awt/UnoControlDialogModelProvider.idl2
-rw-r--r--offapi/com/sun/star/awt/UnoControlEditModel.idl14
-rw-r--r--offapi/com/sun/star/awt/UnoControlFileControlModel.idl6
-rw-r--r--offapi/com/sun/star/awt/UnoControlFixedHyperlinkModel.idl4
-rw-r--r--offapi/com/sun/star/awt/UnoControlFixedTextModel.idl4
-rw-r--r--offapi/com/sun/star/awt/UnoControlFormattedFieldModel.idl10
-rw-r--r--offapi/com/sun/star/awt/UnoControlImageControlModel.idl2
-rw-r--r--offapi/com/sun/star/awt/UnoControlListBoxModel.idl2
-rw-r--r--offapi/com/sun/star/awt/UnoControlNumericFieldModel.idl10
-rw-r--r--offapi/com/sun/star/awt/UnoControlPatternFieldModel.idl6
-rw-r--r--offapi/com/sun/star/awt/UnoControlProgressBarModel.idl2
-rw-r--r--offapi/com/sun/star/awt/UnoControlRadioButtonModel.idl8
-rw-r--r--offapi/com/sun/star/awt/UnoControlScrollBarModel.idl12
-rwxr-xr-x[-rw-r--r--]offapi/com/sun/star/awt/UnoControlSpinButtonModel.idl2
-rw-r--r--offapi/com/sun/star/awt/UnoControlTimeFieldModel.idl12
-rw-r--r--offapi/com/sun/star/awt/XEnhancedMouseClickHandler.idl2
-rw-r--r--offapi/com/sun/star/awt/grid/DefaultGridColumnModel.idl2
-rw-r--r--offapi/com/sun/star/awt/grid/DefaultGridDataModel.idl2
-rw-r--r--offapi/com/sun/star/awt/grid/GridColumn.idl2
-rw-r--r--offapi/com/sun/star/awt/grid/GridColumnEvent.idl2
-rw-r--r--offapi/com/sun/star/awt/grid/GridDataEvent.idl2
-rw-r--r--offapi/com/sun/star/awt/grid/GridInvalidDataException.idl2
-rw-r--r--offapi/com/sun/star/awt/grid/GridInvalidModelException.idl2
-rw-r--r--offapi/com/sun/star/awt/grid/UnoControlGrid.idl2
-rw-r--r--offapi/com/sun/star/awt/grid/UnoControlGridModel.idl2
-rw-r--r--offapi/com/sun/star/awt/grid/XGridColumn.idl2
-rw-r--r--offapi/com/sun/star/awt/grid/XGridColumnListener.idl2
-rw-r--r--offapi/com/sun/star/awt/grid/XGridColumnModel.idl2
-rw-r--r--offapi/com/sun/star/awt/grid/XGridControl.idl2
-rw-r--r--offapi/com/sun/star/awt/grid/XGridDataListener.idl2
-rw-r--r--offapi/com/sun/star/awt/grid/XGridDataModel.idl2
-rw-r--r--offapi/com/sun/star/configuration/DefaultProvider.idl4
-rw-r--r--offapi/com/sun/star/configuration/Update.idl2
-rw-r--r--offapi/com/sun/star/configuration/XUpdate.idl2
-rw-r--r--offapi/com/sun/star/configuration/backend/InteractionHandler.idl2
-rw-r--r--offapi/com/sun/star/configuration/backend/Layer.idl2
-rw-r--r--offapi/com/sun/star/configuration/backend/LayerFilter.idl2
-rw-r--r--offapi/com/sun/star/configuration/backend/MergeRecoveryRequest.idl2
-rw-r--r--offapi/com/sun/star/configuration/backend/Schema.idl2
-rw-r--r--offapi/com/sun/star/configuration/backend/StratumCreationException.idl2
-rw-r--r--offapi/com/sun/star/deployment/DeploymentException.idl2
-rw-r--r--offapi/com/sun/star/deployment/ExtensionManager.idl2
-rw-r--r--offapi/com/sun/star/deployment/ExtensionRemovedException.idl2
-rw-r--r--offapi/com/sun/star/deployment/InvalidRemovedParameterException.idl2
-rw-r--r--offapi/com/sun/star/deployment/PackageRegistryBackend.idl2
-rw-r--r--offapi/com/sun/star/deployment/PlatformException.idl2
-rw-r--r--offapi/com/sun/star/deployment/XExtensionManager.idl2
-rwxr-xr-xoffapi/com/sun/star/deployment/XPackage.idl4
-rw-r--r--offapi/com/sun/star/deployment/XPackageManager.idl2
-rw-r--r--offapi/com/sun/star/deployment/XPackageManagerFactory.idl2
-rw-r--r--offapi/com/sun/star/deployment/XPackageRegistry.idl2
-rw-r--r--offapi/com/sun/star/deployment/XPackageTypeInfo.idl2
-rw-r--r--offapi/com/sun/star/deployment/thePackageManagerFactory.idl2
-rw-r--r--offapi/com/sun/star/deployment/ui/PackageManagerDialog.idl2
-rw-r--r--offapi/com/sun/star/deployment/ui/UpdateRequiredDialog.idl2
-rw-r--r--offapi/com/sun/star/document/CorruptedFilterConfigurationException.idl2
-rw-r--r--offapi/com/sun/star/document/DocumentEvent.idl2
-rw-r--r--offapi/com/sun/star/document/XDocumentEventBroadcaster.idl2
-rw-r--r--offapi/com/sun/star/document/XDocumentEventListener.idl2
-rw-r--r--offapi/com/sun/star/document/XMLBasicExporter.idl2
-rw-r--r--offapi/com/sun/star/document/XMLBasicImporter.idl2
-rw-r--r--offapi/com/sun/star/document/XMLOasisBasicExporter.idl2
-rw-r--r--offapi/com/sun/star/document/XMLOasisBasicImporter.idl2
-rw-r--r--offapi/com/sun/star/form/FormComponent.idl2
-rw-r--r--offapi/com/sun/star/form/XErrorListener.idl1
-rw-r--r--offapi/com/sun/star/form/component/GridControl.idl2
-rw-r--r--offapi/com/sun/star/form/inspection/DefaultFormComponentInspectorModel.idl4
-rw-r--r--offapi/com/sun/star/form/runtime/FeatureState.idl2
-rw-r--r--offapi/com/sun/star/form/runtime/FilterEvent.idl2
-rw-r--r--offapi/com/sun/star/form/runtime/FormFeature.idl2
-rw-r--r--offapi/com/sun/star/form/runtime/FormOperations.idl2
-rw-r--r--offapi/com/sun/star/form/runtime/XFeatureInvalidation.idl2
-rw-r--r--offapi/com/sun/star/form/runtime/XFilterController.idl2
-rw-r--r--offapi/com/sun/star/form/runtime/XFilterControllerListener.idl2
-rw-r--r--offapi/com/sun/star/form/runtime/XFormController.idl2
-rw-r--r--offapi/com/sun/star/form/runtime/XFormOperations.idl2
-rw-r--r--offapi/com/sun/star/frame/CommandGroup.idl2
-rw-r--r--offapi/com/sun/star/frame/DispatchInformation.idl2
-rw-r--r--offapi/com/sun/star/frame/Frame.idl2
-rw-r--r--offapi/com/sun/star/frame/LayoutManager.idl2
-rw-r--r--offapi/com/sun/star/frame/LayoutManagerEvents.idl2
-rw-r--r--offapi/com/sun/star/frame/ModuleManager.idl2
-rw-r--r--offapi/com/sun/star/frame/PopupMenuController.idl2
-rw-r--r--offapi/com/sun/star/frame/PopupMenuControllerFactory.idl2
-rw-r--r--offapi/com/sun/star/frame/StatusbarController.idl2
-rw-r--r--offapi/com/sun/star/frame/StatusbarControllerFactory.idl2
-rw-r--r--offapi/com/sun/star/frame/ToolbarController.idl2
-rw-r--r--offapi/com/sun/star/frame/TransientDocumentsDocumentContentFactory.idl2
-rw-r--r--offapi/com/sun/star/frame/UnknownModuleException.idl2
-rw-r--r--offapi/com/sun/star/frame/XDispatchInformationProvider.idl2
-rw-r--r--offapi/com/sun/star/frame/XInplaceLayout.idl2
-rw-r--r--offapi/com/sun/star/frame/XLayoutManager.idl2
-rw-r--r--offapi/com/sun/star/frame/XLayoutManagerEventBroadcaster.idl2
-rw-r--r--offapi/com/sun/star/frame/XLayoutManagerListener.idl2
-rw-r--r--offapi/com/sun/star/frame/XMenuBarAcceptor.idl2
-rw-r--r--offapi/com/sun/star/frame/XMenuBarMergingAcceptor.idl2
-rw-r--r--offapi/com/sun/star/frame/XModule.idl2
-rw-r--r--offapi/com/sun/star/frame/XModuleManager.idl2
-rw-r--r--offapi/com/sun/star/frame/XPopupMenuController.idl2
-rw-r--r--offapi/com/sun/star/frame/XStatusbarController.idl2
-rw-r--r--offapi/com/sun/star/frame/XSubToolbarController.idl2
-rw-r--r--offapi/com/sun/star/frame/XSynchronousDispatch.idl2
-rw-r--r--offapi/com/sun/star/frame/XToolbarController.idl2
-rw-r--r--offapi/com/sun/star/frame/XToolbarControllerListener.idl2
-rw-r--r--offapi/com/sun/star/frame/XTransientDocumentsDocumentContentFactory.idl2
-rw-r--r--offapi/com/sun/star/geometry/AffineMatrix2D.idl2
-rw-r--r--offapi/com/sun/star/geometry/AffineMatrix3D.idl2
-rw-r--r--offapi/com/sun/star/geometry/EllipticalArc.idl2
-rw-r--r--offapi/com/sun/star/geometry/IntegerBezierSegment2D.idl2
-rw-r--r--offapi/com/sun/star/geometry/IntegerPoint2D.idl2
-rw-r--r--offapi/com/sun/star/geometry/IntegerRectangle2D.idl2
-rw-r--r--offapi/com/sun/star/geometry/IntegerSize2D.idl2
-rw-r--r--offapi/com/sun/star/geometry/Matrix2D.idl2
-rw-r--r--offapi/com/sun/star/geometry/RealBezierSegment2D.idl2
-rw-r--r--offapi/com/sun/star/geometry/RealPoint2D.idl2
-rw-r--r--offapi/com/sun/star/geometry/RealRectangle2D.idl2
-rw-r--r--offapi/com/sun/star/geometry/RealRectangle3D.idl2
-rw-r--r--offapi/com/sun/star/geometry/RealSize2D.idl2
-rw-r--r--offapi/com/sun/star/geometry/XMapping2D.idl2
-rw-r--r--offapi/com/sun/star/i18n/OrdinalSuffix.idl2
-rw-r--r--offapi/com/sun/star/i18n/TextConversionOption.idl2
-rw-r--r--offapi/com/sun/star/i18n/XOrdinalSuffix.idl2
-rw-r--r--offapi/com/sun/star/linguistic2/ConversionDictionary.idl2
-rw-r--r--offapi/com/sun/star/linguistic2/ConversionDictionaryType.idl2
-rw-r--r--offapi/com/sun/star/linguistic2/ConversionPropertyType.idl2
-rw-r--r--offapi/com/sun/star/linguistic2/XConversionPropertyType.idl2
-rw-r--r--offapi/com/sun/star/mail/MailAttachment.idl2
-rw-r--r--offapi/com/sun/star/mail/MailException.idl2
-rw-r--r--offapi/com/sun/star/mail/MailMessage.idl2
-rw-r--r--offapi/com/sun/star/mail/MailServer.idl2
-rw-r--r--offapi/com/sun/star/mail/MailServiceProvider.idl2
-rw-r--r--offapi/com/sun/star/mail/MailServiceType.idl2
-rw-r--r--offapi/com/sun/star/mail/NoMailServiceProviderException.idl2
-rw-r--r--offapi/com/sun/star/mail/NoMailTransportProviderException.idl2
-rw-r--r--offapi/com/sun/star/mail/SendMailMessageFailedException.idl2
-rw-r--r--offapi/com/sun/star/mail/XAuthenticator.idl2
-rw-r--r--offapi/com/sun/star/mail/XConnectionListener.idl2
-rw-r--r--offapi/com/sun/star/mail/XMailMessage.idl2
-rw-r--r--offapi/com/sun/star/mail/XMailServer.idl2
-rw-r--r--offapi/com/sun/star/mail/XMailService.idl2
-rw-r--r--offapi/com/sun/star/mail/XMailServiceProvider.idl2
-rw-r--r--offapi/com/sun/star/mail/XSmtpService.idl2
-rw-r--r--offapi/com/sun/star/rendering/AnimationAttributes.idl2
-rw-r--r--offapi/com/sun/star/rendering/AnimationRepeat.idl2
-rw-r--r--offapi/com/sun/star/rendering/CanvasFactory.idl2
-rw-r--r--offapi/com/sun/star/rendering/Caret.idl2
-rw-r--r--offapi/com/sun/star/rendering/CompositeOperation.idl2
-rw-r--r--offapi/com/sun/star/rendering/EmphasisMark.idl2
-rw-r--r--offapi/com/sun/star/rendering/FillRule.idl2
-rw-r--r--offapi/com/sun/star/rendering/FloatingPointBitmapFormat.idl2
-rw-r--r--offapi/com/sun/star/rendering/FloatingPointBitmapLayout.idl2
-rw-r--r--offapi/com/sun/star/rendering/FontInfo.idl2
-rw-r--r--offapi/com/sun/star/rendering/FontMetrics.idl2
-rw-r--r--offapi/com/sun/star/rendering/FontRequest.idl2
-rw-r--r--offapi/com/sun/star/rendering/IntegerBitmapLayout.idl2
-rw-r--r--offapi/com/sun/star/rendering/InterpolationMode.idl2
-rw-r--r--offapi/com/sun/star/rendering/PathCapType.idl2
-rw-r--r--offapi/com/sun/star/rendering/PathJoinType.idl2
-rw-r--r--offapi/com/sun/star/rendering/RenderState.idl2
-rw-r--r--offapi/com/sun/star/rendering/RenderingIntent.idl2
-rw-r--r--offapi/com/sun/star/rendering/RepaintResult.idl2
-rw-r--r--offapi/com/sun/star/rendering/StringContext.idl2
-rw-r--r--offapi/com/sun/star/rendering/TextDirection.idl2
-rw-r--r--offapi/com/sun/star/rendering/TextHit.idl2
-rw-r--r--offapi/com/sun/star/rendering/Texture.idl2
-rw-r--r--offapi/com/sun/star/rendering/TexturingMode.idl2
-rw-r--r--offapi/com/sun/star/rendering/ViewState.idl2
-rw-r--r--offapi/com/sun/star/rendering/VolatileContentDestroyedException.idl2
-rw-r--r--offapi/com/sun/star/rendering/XAnimatedSprite.idl2
-rw-r--r--offapi/com/sun/star/rendering/XAnimation.idl2
-rw-r--r--offapi/com/sun/star/rendering/XBezierPolyPolygon2D.idl2
-rw-r--r--offapi/com/sun/star/rendering/XBitmap.idl2
-rw-r--r--offapi/com/sun/star/rendering/XBitmapCanvas.idl2
-rw-r--r--offapi/com/sun/star/rendering/XBitmapPalette.idl2
-rw-r--r--offapi/com/sun/star/rendering/XBufferController.idl2
-rw-r--r--offapi/com/sun/star/rendering/XCachedPrimitive.idl2
-rw-r--r--offapi/com/sun/star/rendering/XCanvas.idl2
-rw-r--r--offapi/com/sun/star/rendering/XIntegerBitmap.idl2
-rw-r--r--offapi/com/sun/star/rendering/XLinePolyPolygon2D.idl2
-rw-r--r--offapi/com/sun/star/rendering/XPolyPolygon2D.idl2
-rw-r--r--offapi/com/sun/star/rendering/XTextLayout.idl2
-rw-r--r--offapi/com/sun/star/report/XReportControlFormat.idl2
-rw-r--r--offapi/com/sun/star/resource/OfficeResourceLoader.idl2
-rwxr-xr-xoffapi/com/sun/star/script/browse/BrowseNode.idl2
-rwxr-xr-xoffapi/com/sun/star/script/browse/BrowseNodeFactory.idl4
-rw-r--r--offapi/com/sun/star/sdb/DatabaseContext.idl2
-rw-r--r--offapi/com/sun/star/sdb/DatabaseDocument.idl2
-rw-r--r--offapi/com/sun/star/sdb/DocumentSaveRequest.idl2
-rw-r--r--offapi/com/sun/star/sdb/OfficeDatabaseDocument.idl2
-rw-r--r--offapi/com/sun/star/sdb/XDatabaseRegistrations.idl2
-rw-r--r--offapi/com/sun/star/sdb/XDatabaseRegistrationsListener.idl2
-rw-r--r--offapi/com/sun/star/sdb/XInteractionDocumentSave.idl2
-rw-r--r--offapi/com/sun/star/sdb/application/DatabaseObject.idl2
-rw-r--r--offapi/com/sun/star/sdb/application/XDatabaseDocumentUI.idl2
-rw-r--r--offapi/com/sun/star/sdb/application/XTableUIProvider.idl2
-rw-r--r--offapi/com/sun/star/sdbc/DataType.idl2
-rw-r--r--offapi/com/sun/star/security/SerialNumberAdapter.idl2
-rw-r--r--offapi/com/sun/star/sheet/ActivationEvent.idl2
-rw-r--r--offapi/com/sun/star/sheet/CellAreaLink.idl2
-rw-r--r--offapi/com/sun/star/sheet/DDEItemInfo.idl2
-rw-r--r--offapi/com/sun/star/sheet/DDELinkInfo.idl2
-rw-r--r--offapi/com/sun/star/sheet/DataPilotDescriptor.idl6
-rw-r--r--offapi/com/sun/star/sheet/DataPilotItem.idl2
-rw-r--r--offapi/com/sun/star/sheet/DataPilotOutputRangeType.idl2
-rw-r--r--offapi/com/sun/star/sheet/DataPilotSource.idl6
-rw-r--r--offapi/com/sun/star/sheet/DataPilotSourceMember.idl2
-rw-r--r--offapi/com/sun/star/sheet/DataPilotTable.idl2
-rw-r--r--offapi/com/sun/star/sheet/DataPilotTableHeaderData.idl2
-rw-r--r--offapi/com/sun/star/sheet/DataPilotTablePositionData.idl2
-rw-r--r--offapi/com/sun/star/sheet/DataPilotTablePositionType.idl2
-rw-r--r--offapi/com/sun/star/sheet/DataPilotTableResultData.idl2
-rw-r--r--offapi/com/sun/star/sheet/DatabaseImportDescriptor.idl4
-rw-r--r--offapi/com/sun/star/sheet/DatabaseRange.idl4
-rw-r--r--offapi/com/sun/star/sheet/ExternalDocLink.idl2
-rw-r--r--offapi/com/sun/star/sheet/ExternalDocLinks.idl2
-rw-r--r--offapi/com/sun/star/sheet/ExternalLinkInfo.idl2
-rw-r--r--offapi/com/sun/star/sheet/ExternalLinkType.idl2
-rw-r--r--offapi/com/sun/star/sheet/ExternalSheetCache.idl2
-rw-r--r--offapi/com/sun/star/sheet/FormulaParser.idl2
-rw-r--r--offapi/com/sun/star/sheet/SheetCell.idl2
-rw-r--r--offapi/com/sun/star/sheet/SheetCellRange.idl2
-rw-r--r--offapi/com/sun/star/sheet/TablePageStyle.idl4
-rw-r--r--offapi/com/sun/star/sheet/XActivationBroadcaster.idl2
-rw-r--r--offapi/com/sun/star/sheet/XActivationEventListener.idl2
-rw-r--r--offapi/com/sun/star/sheet/XDataPilotTable2.idl2
-rw-r--r--offapi/com/sun/star/sheet/XDrillDownDataSupplier.idl2
-rw-r--r--offapi/com/sun/star/sheet/XEnhancedMouseClickBroadcaster.idl2
-rw-r--r--offapi/com/sun/star/sheet/XExternalDocLink.idl2
-rw-r--r--offapi/com/sun/star/sheet/XExternalDocLinks.idl2
-rw-r--r--offapi/com/sun/star/sheet/XExternalSheetCache.idl2
-rw-r--r--offapi/com/sun/star/sheet/XScenarioEnhanced.idl2
-rw-r--r--offapi/com/sun/star/smarttags/SmartTagAction.idl2
-rw-r--r--offapi/com/sun/star/smarttags/SmartTagRecognizer.idl2
-rw-r--r--offapi/com/sun/star/smarttags/SmartTagRecognizerMode.idl2
-rw-r--r--offapi/com/sun/star/smarttags/XSmartTagAction.idl2
-rw-r--r--offapi/com/sun/star/smarttags/XSmartTagRecognizer.idl2
-rw-r--r--offapi/com/sun/star/style/CharacterProperties.idl2
-rw-r--r--offapi/com/sun/star/style/NumberingType.idl2
-rw-r--r--offapi/com/sun/star/task/XRestartManager.idl2
-rw-r--r--offapi/com/sun/star/text/BaseFrameProperties.idl2
-rw-r--r--offapi/com/sun/star/text/Cell.idl2
-rw-r--r--offapi/com/sun/star/text/DocumentSettings.idl8
-rw-r--r--offapi/com/sun/star/text/FootnoteSettings.idl2
-rw-r--r--offapi/com/sun/star/text/GenericTextDocument.idl18
-rw-r--r--offapi/com/sun/star/text/LineNumberingProperties.idl2
-rw-r--r--offapi/com/sun/star/text/Paragraph.idl2
-rw-r--r--offapi/com/sun/star/text/PositionLayoutDir.idl2
-rw-r--r--offapi/com/sun/star/text/RelOrientation.idl2
-rw-r--r--offapi/com/sun/star/text/Shape.idl10
-rw-r--r--offapi/com/sun/star/text/TextMarkupType.idl2
-rw-r--r--offapi/com/sun/star/text/TextPortion.idl2
-rw-r--r--offapi/com/sun/star/text/TextTableRow.idl2
-rw-r--r--offapi/com/sun/star/text/ViewSettings.idl20
-rw-r--r--offapi/com/sun/star/text/XTextMarkup.idl2
-rw-r--r--offapi/com/sun/star/text/fieldmaster/Database.idl4
-rw-r--r--offapi/com/sun/star/text/textfield/DatabaseName.idl4
-rw-r--r--offapi/com/sun/star/text/textfield/DatabaseNextSet.idl4
-rw-r--r--offapi/com/sun/star/text/textfield/DatabaseNumberOfSet.idl4
-rw-r--r--offapi/com/sun/star/text/textfield/DatabaseSetNumber.idl4
-rw-r--r--offapi/com/sun/star/ucb/TransientDocumentsContentProvider.idl2
-rw-r--r--offapi/com/sun/star/ucb/TransientDocumentsDocumentContent.idl2
-rw-r--r--offapi/com/sun/star/ucb/TransientDocumentsFolderContent.idl2
-rw-r--r--offapi/com/sun/star/ucb/TransientDocumentsRootContent.idl2
-rw-r--r--offapi/com/sun/star/ucb/TransientDocumentsStreamContent.idl2
-rw-r--r--offapi/com/sun/star/ui/ConfigurableUIElement.idl2
-rw-r--r--offapi/com/sun/star/ui/ConfigurationEvent.idl2
-rw-r--r--offapi/com/sun/star/ui/DockingArea.idl2
-rw-r--r--offapi/com/sun/star/ui/GlobalAcceleratorConfiguration.idl2
-rw-r--r--offapi/com/sun/star/ui/ImageType.idl2
-rw-r--r--offapi/com/sun/star/ui/ItemDescriptor.idl2
-rw-r--r--offapi/com/sun/star/ui/ItemStyle.idl2
-rw-r--r--offapi/com/sun/star/ui/ItemType.idl2
-rw-r--r--offapi/com/sun/star/ui/ModuleUICategoryDescription.idl2
-rw-r--r--offapi/com/sun/star/ui/ModuleUICommandDescription.idl2
-rw-r--r--offapi/com/sun/star/ui/ModuleUIConfigurationManager.idl2
-rw-r--r--offapi/com/sun/star/ui/ModuleUIConfigurationManagerSupplier.idl2
-rw-r--r--offapi/com/sun/star/ui/ModuleWindowStateConfiguration.idl2
-rw-r--r--offapi/com/sun/star/ui/UICategoryDescription.idl2
-rw-r--r--offapi/com/sun/star/ui/UICommandDescription.idl2
-rw-r--r--offapi/com/sun/star/ui/UIConfigurationManager.idl2
-rw-r--r--offapi/com/sun/star/ui/UIElement.idl2
-rw-r--r--offapi/com/sun/star/ui/UIElementFactory.idl2
-rw-r--r--offapi/com/sun/star/ui/UIElementFactoryManager.idl2
-rw-r--r--offapi/com/sun/star/ui/UIElementSettings.idl2
-rw-r--r--offapi/com/sun/star/ui/UIElementType.idl2
-rw-r--r--offapi/com/sun/star/ui/WindowContentFactory.idl2
-rw-r--r--offapi/com/sun/star/ui/WindowStateConfiguration.idl2
-rw-r--r--offapi/com/sun/star/ui/XAcceleratorConfiguration.idl2
-rw-r--r--offapi/com/sun/star/ui/XDockingAreaAcceptor.idl2
-rw-r--r--offapi/com/sun/star/ui/XModuleUIConfigurationManager.idl2
-rw-r--r--offapi/com/sun/star/ui/XModuleUIConfigurationManagerSupplier.idl2
-rw-r--r--offapi/com/sun/star/ui/XUIConfiguration.idl2
-rw-r--r--offapi/com/sun/star/ui/XUIConfigurationListener.idl2
-rw-r--r--offapi/com/sun/star/ui/XUIConfigurationManager.idl2
-rw-r--r--offapi/com/sun/star/ui/XUIConfigurationManagerSupplier.idl2
-rw-r--r--offapi/com/sun/star/ui/XUIConfigurationPersistence.idl2
-rw-r--r--offapi/com/sun/star/ui/XUIConfigurationStorage.idl2
-rw-r--r--offapi/com/sun/star/ui/XUIElementFactory.idl2
-rw-r--r--offapi/com/sun/star/ui/XUIElementFactoryRegistration.idl2
-rw-r--r--offapi/com/sun/star/ui/XUIElementSettings.idl2
-rw-r--r--offapi/com/sun/star/ui/XUIFunctionListener.idl2
-rw-r--r--offapi/com/sun/star/util/Endianness.idl2
-rw-r--r--offapi/com/sun/star/util/OfficeInstallationDirectories.idl2
-rw-r--r--offapi/com/sun/star/util/PathSubstitution.idl82
-rw-r--r--offapi/com/sun/star/util/XBroadcaster.idl2
-rw-r--r--offapi/com/sun/star/util/XOfficeInstallationDirectories.idl2
-rw-r--r--offapi/com/sun/star/xml/dom/XNode.idl2
-rw-r--r--offapi/drafts/com/sun/star/form/ListEntryEvent.idl77
-rw-r--r--offapi/drafts/com/sun/star/form/XBindableValue.idl81
-rw-r--r--offapi/drafts/com/sun/star/form/XListEntryListener.idl92
-rw-r--r--offapi/drafts/com/sun/star/form/XListEntrySink.idl71
-rw-r--r--offapi/drafts/com/sun/star/form/XListEntrySource.idl103
-rw-r--r--offapi/drafts/com/sun/star/form/XValueBinding.idl101
-rw-r--r--offapi/prj/build.lst3
-rw-r--r--offapi/prj/d.lst8
-rw-r--r--offapi/type_reference/typelibrary_history.txt5
-rw-r--r--offapi/type_reference/types.rdbbin7307264 -> 7307264 bytes
-rw-r--r--offapi/util/makefile.mk1
-rwxr-xr-xofficecfg/registry/data/org/openoffice/Office/Canvas.xcu2
-rw-r--r--package/inc/ZipPackageFolder.hxx7
-rw-r--r--package/source/zippackage/ZipPackageFolder.cxx635
-rw-r--r--postprocess/packcomponents/makefile.mk4
-rw-r--r--registry/tools/checksingleton.cxx459
-rw-r--r--registry/tools/fileurl.cxx90
-rw-r--r--registry/tools/fileurl.hxx (renamed from offapi/drafts/com/sun/star/form/IncompatibleTypesException.idl)34
-rw-r--r--registry/tools/makefile.mk18
-rw-r--r--registry/tools/options.cxx153
-rw-r--r--registry/tools/options.hxx67
-rw-r--r--registry/tools/rdbedit.cxx318
-rw-r--r--registry/tools/regcompare.cxx1555
-rw-r--r--registry/tools/regmerge.cxx277
-rw-r--r--registry/tools/regview.cxx72
-rwxr-xr-xrhino/makefile.mk3
-rw-r--r--rhino/rhino1_5R5-updateToolTip.patch23
-rw-r--r--rsc/source/tools/rscchar.cxx16
-rw-r--r--sal/osl/unx/file.cxx3
-rw-r--r--sal/osl/unx/file_misc.cxx6
-rw-r--r--sal/osl/unx/file_path_helper.cxx80
-rw-r--r--sal/osl/unx/process_impl.cxx19
-rw-r--r--sal/osl/unx/profile.c1
-rw-r--r--sal/osl/unx/socket.c39
-rw-r--r--sal/rtl/source/alloc.c1541
-rw-r--r--sal/rtl/source/alloc_arena.c37
-rw-r--r--sal/rtl/source/alloc_cache.c53
-rwxr-xr-xsal/rtl/source/alloc_fini.cxx (renamed from sal/rtl/source/memory_fini.cxx)23
-rw-r--r--sal/rtl/source/alloc_global.c10
-rw-r--r--sal/rtl/source/alloc_impl.h24
-rw-r--r--sal/rtl/source/makefile.mk9
-rwxr-xr-x[-rw-r--r--]sc/source/core/data/documen9.cxx4
-rwxr-xr-x[-rw-r--r--]sc/source/core/tool/autoform.cxx2
-rw-r--r--scp2/source/ooo/scpaction_ooo.scp9
-rw-r--r--scripting/java/com/sun/star/script/framework/provider/SwingInvocation.java44
-rw-r--r--scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java44
-rw-r--r--scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java77
-rwxr-xr-xsd/source/core/stlpool.cxx3
-rw-r--r--[-rwxr-xr-x]sd/source/ui/framework/factories/BasicViewFactory.cxx3
-rwxr-xr-xsd/source/ui/framework/factories/BasicViewFactory.hxx1
-rwxr-xr-xsd/source/ui/framework/module/ModuleController.cxx4
-rwxr-xr-xsd/source/ui/func/fuhhconv.cxx10
-rwxr-xr-xsd/source/ui/presenter/PresenterTextView.cxx2
-rw-r--r--sd/source/ui/slidesorter/controller/SlideSorterController.cxx5
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/TaskPaneFocusManager.cxx19
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/TaskPaneFocusManager.hxx1
-rwxr-xr-xsd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.cxx2
-rw-r--r--sdext/source/pdfimport/config/description.xml2
-rw-r--r--sdext/source/pdfimport/filterdet.cxx4
-rw-r--r--sdext/source/pdfimport/inc/pdfparse.hxx2
-rw-r--r--sdext/source/pdfimport/pdfparse/pdfentries.cxx147
-rw-r--r--sdext/source/pdfimport/pdfparse/pdfparse.cxx4
-rw-r--r--sdext/source/pdfimport/tree/drawtreevisiting.cxx11
-rw-r--r--sdext/source/pdfimport/tree/drawtreevisiting.hxx4
-rwxr-xr-xsdext/source/pdfimport/wrapper/wrapper.cxx52
-rw-r--r--sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx19
-rw-r--r--set_soenv.in4
-rw-r--r--sfx2/qa/cppunit/makefile.mk (renamed from unoxml/source/dom/makefile.mk)76
-rw-r--r--sfx2/qa/unoapi/makefile.mk48
-rw-r--r--sfx2/source/doc/SfxDocumentMetaData.cxx46
-rwxr-xr-x[-rw-r--r--]sfx2/source/view/viewprn.cxx50
-rw-r--r--slideshow/source/engine/animationnodes/basenode.hxx2
-rw-r--r--slideshow/source/engine/shapes/drawshape.hxx2
-rw-r--r--slideshow/source/engine/shapes/gdimtftools.cxx5
-rw-r--r--slideshow/source/engine/slide/slideimpl.cxx2
-rw-r--r--slideshow/source/engine/transitions/randomwipe.cxx10
-rwxr-xr-xsolenv/bin/build.pl6
-rw-r--r--solenv/bin/modules/installer/epmfile.pm12
-rw-r--r--solenv/bin/modules/installer/simplepackage.pm1
-rw-r--r--solenv/config/sdev300.ini5
-rw-r--r--solenv/gbuild/LinkTarget.mk4
-rwxr-xr-xsolenv/gbuild/platform/linux.mk8
-rwxr-xr-xsolenv/gbuild/platform/macosx.mk7
-rwxr-xr-xsolenv/gbuild/platform/solaris.mk7
-rwxr-xr-xsolenv/gbuild/platform/windows.mk19
-rw-r--r--solenv/gbuild/platform/winmingw.mk15
-rw-r--r--solenv/inc/minor.mk6
-rw-r--r--solenv/inc/unxlngppc.mk3
-rw-r--r--soltools/cpp/_eval.c13
-rw-r--r--soltools/cpp/_lex.c2
-rw-r--r--sot/source/sdstor/stgio.cxx3
-rw-r--r--store/source/lockbyte.cxx3
-rw-r--r--store/source/lockbyte.hxx2
-rw-r--r--store/source/object.hxx2
-rw-r--r--store/source/storbase.cxx3
-rw-r--r--store/source/stordir.hxx2
-rw-r--r--svl/qa/complex/passwordcontainer/makefile.mk134
-rw-r--r--svtools/qa/unoapi/makefile.mk48
-rw-r--r--svtools/source/contnr/svlbox.cxx1
-rwxr-xr-x[-rw-r--r--]svtools/source/filter.vcl/filter/FilterConfigItem.cxx0
-rw-r--r--svx/source/dialog/svxruler.cxx2
-rwxr-xr-x[-rw-r--r--]svx/source/mnuctrls/fntctl.cxx2
-rwxr-xr-x[-rw-r--r--]svx/source/svdraw/svdibrow.cxx6
-rwxr-xr-x[-rw-r--r--]svx/source/svdraw/svdmodel.cxx40
-rwxr-xr-xsw/JunitTest_sw_complex.mk13
-rwxr-xr-xsw/inc/fmtmeta.hxx25
-rw-r--r--sw/inc/ndhints.hxx10
-rw-r--r--sw/inc/swtypes.hxx2
-rw-r--r--sw/inc/txtatr.hxx21
-rw-r--r--sw/inc/txtrfmrk.hxx2
-rw-r--r--sw/inc/txttxmrk.hxx3
-rw-r--r--sw/inc/unotext.hxx12
-rw-r--r--sw/qa/complex/accessibility/makefile.mk (renamed from unoxml/qa/complex/unoxml/makefile.mk)23
-rw-r--r--sw/qa/complex/checkColor/makefile.mk (renamed from unoxml/source/events/makefile.mk)42
-rw-r--r--sw/qa/complex/writer/TestDocument.java3
-rw-r--r--sw/qa/unoapi/makefile.mk48
-rwxr-xr-x[-rw-r--r--]sw/source/core/crsr/swcrsr.cxx11
-rw-r--r--sw/source/core/doc/doclay.cxx18
-rwxr-xr-x[-rw-r--r--]sw/source/core/doc/tblafmt.cxx4
-rwxr-xr-x[-rw-r--r--]sw/source/core/edit/acorrect.cxx20
-rw-r--r--sw/source/core/edit/autofmt.cxx3
-rwxr-xr-x[-rw-r--r--]sw/source/core/inc/acorrect.hxx1
-rw-r--r--sw/source/core/text/txttab.cxx112
-rw-r--r--sw/source/core/txtnode/atrref.cxx2
-rw-r--r--sw/source/core/txtnode/atrtox.cxx2
-rw-r--r--sw/source/core/txtnode/fmtatr2.cxx85
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx26
-rw-r--r--sw/source/core/txtnode/thints.cxx9
-rw-r--r--sw/source/core/txtnode/txtatr2.cxx18
-rwxr-xr-x[-rw-r--r--]sw/source/core/txtnode/txtedt.cxx10
-rw-r--r--sw/source/core/unocore/unorefmk.cxx2
-rw-r--r--sw/source/core/unocore/unotext.cxx55
-rwxr-xr-x[-rw-r--r--]sw/source/filter/ww8/rtfexport.cxx17
-rwxr-xr-x[-rw-r--r--]sw/source/filter/ww8/rtfexport.hxx2
-rwxr-xr-x[-rw-r--r--]sw/source/filter/ww8/wrtw8nds.cxx24
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx1
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx1
-rw-r--r--sw/source/filter/ww8/wrtww8gr.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx5
-rw-r--r--sw/source/filter/xml/XMLRedlineImportHelper.cxx52
-rw-r--r--sw/source/ui/app/apphdl.cxx23
-rw-r--r--sw/source/ui/app/swmodul1.cxx7
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx2
-rwxr-xr-x[-rw-r--r--]sw/source/ui/index/cnttab.src4
-rwxr-xr-x[-rw-r--r--]sw/source/ui/lingu/hhcwrp.cxx10
-rwxr-xr-x[-rw-r--r--]sw/source/ui/shells/textsh.cxx8
-rw-r--r--sw/source/ui/table/tabledlg.cxx10
-rwxr-xr-x[-rw-r--r--]sw/source/ui/uno/unotxdoc.cxx2
-rwxr-xr-x[-rw-r--r--]sw/source/ui/uno/unotxvw.cxx2
-rw-r--r--sw/source/ui/utlui/navipi.cxx4
-rw-r--r--sw/source/ui/wrtsh/wrtsh1.cxx6
-rwxr-xr-x[-rw-r--r--]sw/uiconfig/sglobal/menubar/menubar.xml2
-rwxr-xr-x[-rw-r--r--]sw/uiconfig/sweb/menubar/menubar.xml2
-rwxr-xr-x[-rw-r--r--]sw/uiconfig/swform/menubar/menubar.xml2
-rwxr-xr-x[-rw-r--r--]sw/uiconfig/swreport/menubar/menubar.xml2
-rwxr-xr-x[-rw-r--r--]sw/uiconfig/swriter/menubar/menubar.xml2
-rwxr-xr-x[-rw-r--r--]sw/uiconfig/swxform/menubar/menubar.xml2
-rw-r--r--sysui/desktop/icons/makefile.mk63
-rwxr-xr-xsysui/desktop/icons/so7-base-doc.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so7-calc-doc.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so7-calc-tem.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so7-chart-doc.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so7-draw-doc.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so7-draw-tem.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so7-impress-doc.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so7-impress-tem.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so7-master-doc.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so7-math-doc.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so7-writer-doc.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so7-writer-tem.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so8-base-app.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so8-base-doc.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so8-calc-app.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so8-calc-doc.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so8-calc-tem.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so8-chart-doc.icobin10134 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so8-configuration.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so8-draw-app.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so8-draw-doc.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so8-draw-tem.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so8-empty-doc.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so8-empty-tem.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so8-image-doc.icobin10134 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so8-impress-app.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so8-impress-doc.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so8-impress-tem.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so8-macro-doc.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so8-main-app.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so8-master-doc.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so8-math-app.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so8-math-doc.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so8-open.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so8-printer.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so8-web-doc.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so8-writer-app.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so8-writer-doc.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so8-writer-tem.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so9_base_app.icobin295606 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so9_base_doc.icobin295606 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so9_calc_app.icobin295606 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so9_calc_doc.icobin295606 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so9_calc_tem.icobin295606 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so9_chart_doc.icobin295606 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so9_draw_app.icobin295606 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so9_draw_doc.icobin295606 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so9_draw_tem.icobin295606 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so9_empty_doc.icobin295606 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so9_empty_tem.icobin295606 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so9_global_doc.icobin295606 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so9_html_doc.icobin295606 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so9_impress_app.icobin295606 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so9_impress_doc.icobin295606 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so9_impress_tem.icobin295606 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so9_macro_doc.icobin295606 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so9_main_app.icobin295606 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so9_math_app.icobin295606 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so9_math_doc.icobin295606 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so9_open.icobin295606 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so9_writer_app.icobin295606 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so9_writer_doc.icobin295606 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so9_writer_tem.icobin295606 -> 0 bytes
-rw-r--r--sysui/prj/build.lst6
-rw-r--r--sysui/prj/d.lst4
-rwxr-xr-xtestautomation/chart2/optional/includes/ch2_lvl1a.inc1
-rw-r--r--testautomation/global/tools/includes/optional/t_ole.inc22
-rw-r--r--testautomation/graphics/optional/includes/global/g_stylist.inc10
-rw-r--r--testautomation/graphics/optional/includes/impress/i_us2_present.inc3
-rw-r--r--testautomation/graphics/required/includes/global/id_004.inc2
-rw-r--r--testautomation/writer/optional/includes/clipboard/clipbrd_func.inc9
-rw-r--r--testautomation/writer/optional/includes/contextmenu/w_contextmenu1.inc8
-rw-r--r--testautomation/writer/optional/includes/drawing/w_drawing_tools1.inc2
-rw-r--r--testautomation/writer/optional/includes/drawing/w_drawing_tools2.inc4
-rw-r--r--testautomation/writer/optional/includes/fields/w_fields2.inc2
-rw-r--r--testautomation/writer/optional/includes/fields/w_fields3.inc4
-rw-r--r--testautomation/writer/optional/includes/fields/w_fields4.inc2
-rw-r--r--testautomation/writer/optional/includes/fields/w_fields5.inc4
-rw-r--r--testautomation/writer/optional/includes/formatcharacter/w_format_character1.inc2
-rw-r--r--testautomation/writer/optional/includes/formatpage/w_formatpage1.inc4
-rw-r--r--testautomation/writer/optional/includes/formatparagraph/w_formatparagraph1.inc4
-rw-r--r--testautomation/writer/optional/includes/formatparagraph/w_formatparagraph2.inc6
-rw-r--r--testautomation/writer/optional/includes/insertgraphic/w_insertgraphic1.inc2
-rw-r--r--testautomation/writer/optional/includes/insertgraphic/w_insertgraphic3.inc6
-rw-r--r--testautomation/writer/optional/includes/loadsave/w_loadsave.inc2
-rw-r--r--testautomation/writer/optional/includes/navigator/w_navigator.inc10
-rw-r--r--testautomation/writer/optional/includes/number/w_205_.inc24
-rw-r--r--testautomation/writer/optional/includes/number/w_205a_.inc2
-rw-r--r--testautomation/writer/optional/includes/option/wh_o_2.inc2
-rw-r--r--testautomation/writer/optional/includes/redlining/w_redlining1.inc4
-rw-r--r--testautomation/writer/optional/includes/redlining/w_redlining2.inc2
-rw-r--r--testautomation/writer/optional/includes/regression/issuezilla/w_issuezilla_regression.inc4
-rw-r--r--testautomation/writer/optional/includes/section/w_section_2.inc2
-rw-r--r--testautomation/writer/optional/includes/shortcut/w_shortcuts.inc2
-rw-r--r--testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc22
-rw-r--r--testautomation/writer/optional/includes/stylist/w_stylist.inc16
-rw-r--r--testautomation/writer/optional/includes/textframes/w_textframes2.inc4
-rw-r--r--testautomation/writer/required/includes/w_001_.inc2
-rw-r--r--testautomation/writer/required/includes/w_001a_.inc2
-rw-r--r--testautomation/writer/required/includes/w_001b_.inc16
-rw-r--r--testautomation/writer/required/includes/w_002_.inc4
-rw-r--r--testautomation/writer/required/includes/w_004_.inc3
-rw-r--r--testautomation/writer/required/includes/w_004b_.inc12
-rw-r--r--testautomation/writer/required/includes/w_005b_.inc2
-rw-r--r--testautomation/writer/required/includes/w_007_.inc2
-rw-r--r--testautomation/writer/required/includes/w_010_.inc8
-rw-r--r--testautomation/writer/required/includes/w_011_.inc6
-rw-r--r--testautomation/writer/required/includes/w_020_.inc4
-rw-r--r--testautomation/writer/tools/includes/w_tool1.inc4
-rwxr-xr-xtestautomation/writer/tools/includes/w_tool2.inc2
-rw-r--r--testautomation/writer/tools/includes/w_tool6.inc2
-rw-r--r--testautomation/writer/tools/includes/w_tools_undo.inc140
-rw-r--r--testtools/source/bridgetest/bridgetest.cxx2
-rw-r--r--testtools/source/bridgetest/cppobj.cxx4
-rwxr-xr-xtesttools/source/cliversioning/version_libs/version_3_3.dllbin0 -> 11776 bytes
-rw-r--r--toolkit/qa/unoapi/makefile.mk48
-rw-r--r--tools/inc/tools/mempool.hxx17
-rwxr-xr-xtools/source/memtools/mempool.cxx14
-rw-r--r--tools/workben/makefile.mk68
-rw-r--r--tools/workben/mempooltest.cxx18
-rw-r--r--udkapi/com/sun/star/container/XStringKeyMap.idl2
-rw-r--r--udkapi/com/sun/star/io/XAsyncOutputMonitor.idl2
-rwxr-xr-xudkapi/com/sun/star/java/InvalidJavaSettingsException.idl2
-rw-r--r--udkapi/com/sun/star/java/JavaNotFoundException.idl2
-rwxr-xr-xudkapi/com/sun/star/java/RestartRequiredException.idl2
-rw-r--r--udkapi/com/sun/star/reflection/XInterfaceAttributeTypeDescription2.idl2
-rw-r--r--udkapi/com/sun/star/reflection/XInterfaceTypeDescription2.idl2
-rw-r--r--udkapi/com/sun/star/reflection/XParameter.idl2
-rw-r--r--udkapi/com/sun/star/reflection/XPublished.idl2
-rw-r--r--udkapi/com/sun/star/reflection/XServiceConstructorDescription.idl2
-rw-r--r--udkapi/com/sun/star/reflection/XServiceTypeDescription2.idl2
-rw-r--r--udkapi/com/sun/star/reflection/XSingletonTypeDescription2.idl2
-rw-r--r--udkapi/com/sun/star/reflection/XStructTypeDescription.idl2
-rw-r--r--udkapi/com/sun/star/script/BasicErrorException.idl2
-rw-r--r--udkapi/com/sun/star/uri/ExternalUriReferenceTranslator.idl2
-rw-r--r--udkapi/com/sun/star/uri/RelativeUriExcessParentSegments.idl2
-rw-r--r--udkapi/com/sun/star/uri/UriReferenceFactory.idl2
-rw-r--r--udkapi/com/sun/star/uri/UriSchemeParser_vndDOTsunDOTstarDOTscript.idl2
-rw-r--r--udkapi/com/sun/star/uri/VndSunStarPkgUrlReferenceFactory.idl2
-rw-r--r--udkapi/com/sun/star/uri/XExternalUriReferenceTranslator.idl2
-rw-r--r--udkapi/com/sun/star/uri/XUriReference.idl2
-rw-r--r--udkapi/com/sun/star/uri/XUriReferenceFactory.idl2
-rw-r--r--udkapi/com/sun/star/uri/XUriSchemeParser.idl2
-rw-r--r--udkapi/com/sun/star/uri/XVndSunStarPkgUrlReferenceFactory.idl2
-rw-r--r--udkapi/com/sun/star/uri/XVndSunStarScriptUrl.idl2
-rw-r--r--unodevtools/source/skeletonmaker/skeletonmaker.cxx3
-rwxr-xr-x[-rw-r--r--]unoil/climaker/version.txt6
-rw-r--r--unoil/util/makefile.mk2
-rw-r--r--unoxml/JunitTest_unordf_complex.mk52
-rw-r--r--unoxml/JunitTest_unoxml_complex.mk52
-rw-r--r--unoxml/Library_unordf.mk74
-rw-r--r--unoxml/Library_unoxml.mk96
-rw-r--r--unoxml/Makefile (renamed from offapi/drafts/com/sun/star/form/makefile.mk)32
-rw-r--r--unoxml/Module_unoxml.mk40
-rw-r--r--unoxml/prj/build.lst10
-rw-r--r--unoxml/prj/d.lst5
-rw-r--r--unoxml/prj/makefile.mk (renamed from unoxml/source/xpath/makefile.mk)32
-rw-r--r--unoxml/qa/complex/unoxml/DOMTest.java2986
-rw-r--r--unoxml/qa/complex/unoxml/TestDocument.java3
-rw-r--r--unoxml/source/dom/attr.cxx172
-rw-r--r--unoxml/source/dom/attr.hxx50
-rw-r--r--unoxml/source/dom/attributesmap.cxx163
-rw-r--r--unoxml/source/dom/attributesmap.hxx53
-rw-r--r--unoxml/source/dom/cdatasection.cxx14
-rw-r--r--unoxml/source/dom/cdatasection.hxx25
-rw-r--r--unoxml/source/dom/characterdata.cxx77
-rw-r--r--unoxml/source/dom/characterdata.hxx31
-rw-r--r--unoxml/source/dom/childlist.cxx41
-rw-r--r--unoxml/source/dom/childlist.hxx30
-rw-r--r--unoxml/source/dom/comment.cxx11
-rw-r--r--unoxml/source/dom/comment.hxx25
-rw-r--r--unoxml/source/dom/document.cxx739
-rw-r--r--unoxml/source/dom/document.hxx85
-rw-r--r--unoxml/source/dom/documentbuilder.cxx151
-rw-r--r--unoxml/source/dom/documentbuilder.hxx42
-rw-r--r--unoxml/source/dom/documentfragment.cxx26
-rw-r--r--unoxml/source/dom/documentfragment.hxx24
-rw-r--r--unoxml/source/dom/documenttype.cxx37
-rw-r--r--unoxml/source/dom/documenttype.hxx24
-rw-r--r--unoxml/source/dom/domimplementation.cxx47
-rw-r--r--unoxml/source/dom/domimplementation.hxx20
-rw-r--r--unoxml/source/dom/element.cxx651
-rw-r--r--unoxml/source/dom/element.hxx35
-rw-r--r--unoxml/source/dom/elementlist.cxx98
-rw-r--r--unoxml/source/dom/elementlist.hxx55
-rw-r--r--unoxml/source/dom/entitiesmap.cxx54
-rw-r--r--unoxml/source/dom/entitiesmap.hxx52
-rw-r--r--unoxml/source/dom/entity.cxx36
-rw-r--r--unoxml/source/dom/entity.hxx28
-rw-r--r--unoxml/source/dom/entityreference.cxx30
-rw-r--r--unoxml/source/dom/entityreference.hxx29
-rw-r--r--unoxml/source/dom/node.cxx796
-rw-r--r--unoxml/source/dom/node.hxx81
-rw-r--r--unoxml/source/dom/notation.cxx21
-rw-r--r--unoxml/source/dom/notation.hxx24
-rw-r--r--unoxml/source/dom/notationsmap.cxx57
-rw-r--r--unoxml/source/dom/notationsmap.hxx50
-rw-r--r--unoxml/source/dom/processinginstruction.cxx99
-rw-r--r--unoxml/source/dom/processinginstruction.hxx36
-rw-r--r--unoxml/source/dom/saxbuilder.cxx35
-rw-r--r--unoxml/source/dom/saxbuilder.hxx8
-rw-r--r--unoxml/source/dom/text.cxx49
-rw-r--r--unoxml/source/dom/text.hxx36
-rw-r--r--unoxml/source/events/event.cxx61
-rw-r--r--unoxml/source/events/event.hxx55
-rw-r--r--unoxml/source/events/eventdispatcher.cxx143
-rw-r--r--unoxml/source/events/eventdispatcher.hxx80
-rw-r--r--unoxml/source/events/mouseevent.cxx54
-rw-r--r--unoxml/source/events/mouseevent.hxx53
-rw-r--r--unoxml/source/events/mutationevent.cxx44
-rw-r--r--unoxml/source/events/mutationevent.hxx50
-rw-r--r--unoxml/source/events/testlistener.cxx4
-rw-r--r--unoxml/source/events/testlistener.hxx35
-rw-r--r--unoxml/source/events/uievent.cxx44
-rw-r--r--unoxml/source/events/uievent.hxx51
-rw-r--r--unoxml/source/rdf/librdf_repository.cxx5
-rw-r--r--unoxml/source/rdf/librdf_services.cxx5
-rw-r--r--unoxml/source/rdf/makefile.mk92
-rw-r--r--unoxml/source/service/makefile.mk86
-rw-r--r--unoxml/source/service/services.cxx4
-rw-r--r--unoxml/source/xpath/nodelist.cxx31
-rw-r--r--unoxml/source/xpath/nodelist.hxx29
-rw-r--r--unoxml/source/xpath/xpathapi.cxx133
-rw-r--r--unoxml/source/xpath/xpathapi.hxx30
-rw-r--r--unoxml/source/xpath/xpathobject.cxx112
-rw-r--r--unoxml/source/xpath/xpathobject.hxx39
-rwxr-xr-xvcl/aqua/inc/salframeview.h1
-rw-r--r--vcl/aqua/source/dtrans/DropTarget.cxx43
-rw-r--r--vcl/aqua/source/dtrans/DropTarget.hxx2
-rwxr-xr-xvcl/aqua/source/window/salframeview.mm5
-rw-r--r--vcl/inc/vcl/cursor.hxx6
-rw-r--r--vcl/source/control/ilstbox.cxx2
-rw-r--r--vcl/source/gdi/jobset.cxx7
-rwxr-xr-xvcl/source/gdi/print3.cxx28
-rw-r--r--vcl/source/window/cursor.cxx20
-rwxr-xr-x[-rw-r--r--]vcl/source/window/printdlg.cxx11
-rw-r--r--vcl/source/window/window.cxx7
-rw-r--r--vcl/unx/kde4/KDEData.cxx2
-rw-r--r--vcl/unx/kde4/KDEData.hxx2
-rw-r--r--vcl/unx/kde4/KDESalDisplay.cxx2
-rw-r--r--vcl/unx/kde4/KDESalFrame.cxx16
-rw-r--r--vcl/unx/kde4/KDESalFrame.hxx6
-rw-r--r--vcl/unx/kde4/KDESalGraphics.cxx22
-rw-r--r--vcl/unx/kde4/KDESalGraphics.hxx14
-rw-r--r--vcl/unx/kde4/KDESalInstance.cxx4
-rw-r--r--vcl/unx/kde4/KDESalInstance.hxx4
-rw-r--r--vcl/unx/kde4/KDEXLib.cxx2
-rw-r--r--vcl/unx/kde4/VCLKDEApplication.cxx2
-rw-r--r--vcl/unx/kde4/VCLKDEApplication.hxx2
-rwxr-xr-xvcl/win/source/gdi/salgdi.cxx4
-rw-r--r--xmloff/source/core/xmlexp.cxx9
-rw-r--r--xmloff/source/style/xmlnume.cxx24
-rw-r--r--xmloff/source/style/xmlnumi.cxx16
-rw-r--r--xmloff/source/text/XMLAutoTextEventExport.cxx3
-rw-r--r--xmloff/source/text/txtprhdl.cxx3
-rw-r--r--xmloff/source/transform/PropertyActionsOOo.cxx2
-rw-r--r--xpdf/makefile.mk2
-rw-r--r--xpdf/xpdf-3.02-ooopwd.patch101
927 files changed, 16134 insertions, 11239 deletions
diff --git a/Module_ooo.mk b/Module_ooo.mk
index 307daf7c4b00..f35cc58c0eaa 100644
--- a/Module_ooo.mk
+++ b/Module_ooo.mk
@@ -40,6 +40,7 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\
sw \
toolkit \
tools \
+ unoxml \
xmloff \
vbahelper \
))
diff --git a/Repository.mk b/Repository.mk
index 87bbafa59baf..9259250a8b84 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -75,6 +75,8 @@ $(eval $(call gb_Helper_register_libraries,OOOLIBS, \
tk \
tl \
utl \
+ unordf \
+ unoxml \
vbahelper \
vcl \
xcr \
@@ -87,8 +89,10 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_URE, \
))
$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
- icuuc \
cppunit \
+ icuuc \
+ rdf \
+ xslt \
))
diff --git a/RepositoryFixes.mk b/RepositoryFixes.mk
index 406cb6a9eee6..10e06091b845 100644
--- a/RepositoryFixes.mk
+++ b/RepositoryFixes.mk
@@ -75,6 +75,8 @@ gb_Library_FILENAMES := $(patsubst tl:itl%,tl:itools%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst vbahelper:ivbahelper%,vbahelper:vbahelper%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst vos3:ivos3%,vos3:ivos%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst xml2:ixml2%,xml2:libxml2$(gb_Library_IARCEXT),$(gb_Library_FILENAMES))
+gb_Library_FILENAMES := $(patsubst xslt:ixslt%,xslt:libxslt$(gb_Library_IARCEXT),$(gb_Library_FILENAMES))
+gb_Library_FILENAMES := $(patsubst rdf:irdf%,rdf:librdf.dll$(gb_Library_IARCEXT),$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst z:iz%,z:zlib%,$(gb_Library_FILENAMES))
ifeq ($(gb_PRODUCT),$(true))
gb_Library_FILENAMES := $(patsubst stl:istl%,stl:stlport_vc71%,$(gb_Library_FILENAMES))
@@ -120,6 +122,8 @@ gb_Library_FILENAMES := $(patsubst tl:itl%,tl:itools%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst vbahelper:ivbahelper%,vbahelper:vbahelper%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst vos3:ivos3%,vos3:ivos%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst xml2:ixml2%,xml2:libxml2%,$(gb_Library_FILENAMES))
+gb_Library_FILENAMES := $(patsubst xslt:ixslt%,xslt:libxslt%,$(gb_Library_FILENAMES))
+gb_Library_FILENAMES := $(patsubst rdf:irdf%,rdf:librdf%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst z:iz%,z:zlib%,$(gb_Library_FILENAMES))
ifeq ($(gb_PRODUCT),$(true))
gb_Library_FILENAMES := $(patsubst stl:istl%,stl:stlport_vc71%,$(gb_Library_FILENAMES))
@@ -179,6 +183,14 @@ ifeq ($(SYSTEM_LIBXML),YES)
gb_Library_TARGETS := $(filter-out xml2,$(gb_Library_TARGETS))
endif
+ifeq ($(SYSTEM_LIBXSLT),YES)
+gb_Library_TARGETS := $(filter-out xslt,$(gb_Library_TARGETS))
+endif
+
+ifeq ($(SYSTEM_REDLAND),YES)
+gb_Library_TARGETS := $(filter-out rdf,$(gb_Library_TARGETS))
+endif
+
ifeq ($(SYSTEM_ICU),YES)
gb_Library_TARGETS := $(filter-out icuuc,$(gb_Library_TARGETS))
endif
diff --git a/autodoc/source/parser_i/idoc/docu_pe2.cxx b/autodoc/source/parser_i/idoc/docu_pe2.cxx
index 084dbbf0660c..30400dc5945a 100644
--- a/autodoc/source/parser_i/idoc/docu_pe2.cxx
+++ b/autodoc/source/parser_i/idoc/docu_pe2.cxx
@@ -30,6 +30,7 @@
// NOT FULLY DEFINED SERVICES
+#include <cctype>
#include <ary/doc/d_oldidldocu.hxx>
#include <ary_i/d_token.hxx>
#include <parser/parserinfo.hxx>
@@ -128,7 +129,7 @@ SapiDocu_PE::Process_AtTag( const Tok_AtTag & i_rToken )
else if (i_rToken.Id() == Tok_AtTag::since)
{
pCurAtTag = new DT_SinceAtTag;
- fCurTokenAddFunction = &SapiDocu_PE::SetCurSinceAtTagVersion;
+ fCurTokenAddFunction = &SapiDocu_PE::SetCurSinceAtTagVersion_OOo;
}
else
{
@@ -495,10 +496,11 @@ SapiDocu_PE::SetCurSeeAlsoAtTagLinkText_3( DYN ary::inf::DocuToken & let_drNewTo
fCurTokenAddFunction = &SapiDocu_PE::AddDocuToken2CurAtTag;
}
-
+const String
+ C_sSinceFormat("Correct version format: \"OOo <major>.<minor>[.<micro> if micro is not 0]\".");
void
-SapiDocu_PE::SetCurSinceAtTagVersion( DYN ary::inf::DocuToken & let_drNewToken )
+SapiDocu_PE::SetCurSinceAtTagVersion_OOo( DYN ary::inf::DocuToken & let_drNewToken )
{
csv_assert(pCurAtTag);
@@ -511,26 +513,62 @@ SapiDocu_PE::SetCurSinceAtTagVersion( DYN ary::inf::DocuToken & let_drNewToken )
const String
sVersion(pToken->GetText());
- const char
- cFirst = *sVersion.begin();
- const char
- cCiphersend = '9' + 1;
+ if (NOT CheckVersionSyntax_OOo(sVersion))
+ {
+ Cerr() << "Version information in @since tag has incorrect format.\n"
+ << "Found: \"" << sVersion << "\"\n"
+ << C_sSinceFormat
+ << Endl();
+ exit(1);
+ }
+
const autodoc::CommandLine &
rCommandLine = autodoc::CommandLine::Get_();
+ if (NOT rCommandLine.DoesTransform_SinceTag())
+ pCurAtTag->AddToken(let_drNewToken);
+ fCurTokenAddFunction = &SapiDocu_PE::SetCurSinceAtTagVersion_Number;
+}
- if ( rCommandLine.DoesTransform_SinceTag())
- {
- // The @since version number shall be interpreted,
+void
+SapiDocu_PE::SetCurSinceAtTagVersion_Number( DYN ary::inf::DocuToken & let_drNewToken )
+{
+ csv_assert(pCurAtTag);
- if ( NOT csv::in_range('0', cFirst, cCiphersend) )
+ DT_TextToken * pToken = dynamic_cast< DT_TextToken* >(&let_drNewToken);
+ if (pToken == 0)
+ {
+ if (dynamic_cast< DT_White* >(&let_drNewToken) != 0)
{
- // But this is a non-number-part, so we wait for
- // the next one.
- delete &let_drNewToken;
- return;
+ String &
+ sValue = pCurAtTag->Access_Text().Access_TextOfFirstToken();
+ StreamLock
+ sHelp(1000);
+ sValue = sHelp() << sValue << " " << c_str;
}
- else if (rCommandLine.DisplayOf_SinceTagValue(sVersion).empty())
+
+ delete &let_drNewToken;
+ return;
+ }
+
+ const String
+ sVersion(pToken->GetText());
+ if (NOT CheckVersionSyntax_Number(sVersion))
+ {
+ Cerr() << "Version information in @since tag has incorrect format.\n"
+ << "Found: \"" << sVersion << "\"\n"
+ << C_sSinceFormat
+ << Endl();
+ exit(1);
+ }
+
+ const autodoc::CommandLine &
+ rCommandLine = autodoc::CommandLine::Get_();
+ if ( rCommandLine.DoesTransform_SinceTag())
+ {
+ pCurAtTag->AddToken(let_drNewToken);
+
+ if (rCommandLine.DisplayOf_SinceTagValue(sVersion).empty())
{
// This is the numbered part, but we don't know it.
delete &let_drNewToken;
@@ -544,10 +582,10 @@ SapiDocu_PE::SetCurSinceAtTagVersion( DYN ary::inf::DocuToken & let_drNewToken )
throw X_Docu("since", sl().c_str());
}
}
-
- // Either since tags are not specially interpreted, or
- // we got a known one.
- pCurAtTag->AddToken(let_drNewToken);
+ else
+ {
+ AddDocuToken2SinceAtTag(let_drNewToken);
+ }
fCurTokenAddFunction = &SapiDocu_PE::AddDocuToken2SinceAtTag;
}
@@ -573,6 +611,54 @@ SapiDocu_PE::AddDocuToken2SinceAtTag( DYN ary::inf::DocuToken & let_drNewToken )
delete &let_drNewToken;
}
+bool
+SapiDocu_PE::CheckVersionSyntax_OOo(const String & i_versionPart1)
+{
+ return i_versionPart1 == "OOo"
+ OR i_versionPart1 == "OpenOffice.org";
+}
+
+bool
+SapiDocu_PE::CheckVersionSyntax_Number(const String & i_versionPart2)
+{
+ if (i_versionPart2.length () == 0)
+ return false;
+
+ const char
+ pt = '.';
+ unsigned int countDigit = 0;
+ unsigned int countPoint = 0;
+ const char *
+ pFirstPoint = 0;
+ const char *
+ pLastPoint = 0;
+
+ for ( const char * p = i_versionPart2.begin();
+ *p != 0;
+ ++p )
+ {
+ if ( std::isdigit(*p) )
+ ++countDigit;
+ else if (*p == pt)
+ {
+ if (countPoint == 0)
+ pFirstPoint = p;
+ pLastPoint = p;
+ ++countPoint;
+ }
+ }
+
+ if ( countDigit + countPoint == i_versionPart2.length() // only digits and points
+ AND pFirstPoint != 0 AND countPoint < 3 // 1 or 2 points
+ AND pFirstPoint + 1 != pLastPoint // there are digits between two points
+ AND *i_versionPart2.begin() != pt AND *(pLastPoint + 1) != 0 // points are surrounded by digits
+ AND (*(pLastPoint + 1) != '0' OR pLastPoint == pFirstPoint) ) // the first micro-digit is not 0
+ {
+ return true;
+ }
+ return false;
+}
+
const char *
AtTagTitle( const Tok_AtTag & i_rToken )
{
diff --git a/autodoc/source/parser_i/inc/s2_dsapi/docu_pe2.hxx b/autodoc/source/parser_i/inc/s2_dsapi/docu_pe2.hxx
index 2d1757bbb308..89bf5b504b0f 100644
--- a/autodoc/source/parser_i/inc/s2_dsapi/docu_pe2.hxx
+++ b/autodoc/source/parser_i/inc/s2_dsapi/docu_pe2.hxx
@@ -144,13 +144,20 @@ class SapiDocu_PE : public TokenInterpreter
void SetCurSeeAlsoAtTagLinkText_3(
DYN ary::inf::DocuToken &
let_drNewToken );
- void SetCurSinceAtTagVersion(
+ void SetCurSinceAtTagVersion_OOo(
+ DYN ary::inf::DocuToken &
+ let_drNewToken );
+ void SetCurSinceAtTagVersion_Number(
DYN ary::inf::DocuToken &
let_drNewToken );
void AddDocuToken2SinceAtTag(
DYN ary::inf::DocuToken &
let_drNewToken );
+ bool CheckVersionSyntax_OOo(
+ const String & i_versionPart1 );
+ bool CheckVersionSyntax_Number(
+ const String & i_versionPart2 );
// DATA
Dyn<ary::doc::OldIdlDocu>
pDocu;
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 25aa457cfcc2..e92c2fa0453a 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -465,6 +465,7 @@ void __EXPORT EditorWindow::KeyInput( const KeyEvent& rKEvt )
{
pBindings->Invalidate( SID_SAVEDOC );
pBindings->Invalidate( SID_DOC_MODIFIED );
+ pBindings->Invalidate( SID_UNDO );
}
if ( rKEvt.GetKeyCode().GetCode() == KEY_INSERT )
pBindings->Invalidate( SID_ATTR_INSERT );
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index 2786aa3311be..e7088aff5096 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -309,7 +309,10 @@ void BasicIDEShell::onDocumentSave( const ScriptDocument& /*_rDocument*/ )
void BasicIDEShell::onDocumentSaveDone( const ScriptDocument& /*_rDocument*/ )
{
- // not interested in
+ // #i115671: Update SID_SAVEDOC after saving is completed
+ SfxBindings* pBindings = BasicIDE::GetBindingsPtr();
+ if ( pBindings )
+ pBindings->Invalidate( SID_SAVEDOC );
}
void BasicIDEShell::onDocumentSaveAs( const ScriptDocument& /*_rDocument*/ )
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index 356973647060..a66619a0a159 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -383,7 +383,7 @@ void BasicTreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const
// dialogs
if ( nMode & BROWSEMODE_DIALOGS )
{
- Reference< script::XLibraryContainer > xDlgLibContainer( rDocument.getLibraryContainer( E_SCRIPTS ) );
+ Reference< script::XLibraryContainer > xDlgLibContainer( rDocument.getLibraryContainer( E_DIALOGS ) );
if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) && xDlgLibContainer->isLibraryLoaded( aOULibName ) )
{
diff --git a/basic/source/app/app.cxx b/basic/source/app/app.cxx
index cd3e1dd0061f..34f9e5096fb1 100644
--- a/basic/source/app/app.cxx
+++ b/basic/source/app/app.cxx
@@ -857,6 +857,15 @@ void BasicFrame::Resize()
}
}
+Rectangle BasicFrame::GetInnerRect() const
+{
+ Rectangle aRect( Point(0,0), GetOutputSizePixel() );
+ aRect.Bottom() = pStatus->GetPosPixel().Y()-1;
+ if( aRect.Bottom() < 0 ) // sanity check
+ aRect.Bottom() = 0;
+ return aRect;
+}
+
void BasicFrame::Move()
{
Config aConf(Config::GetConfigName( Config::GetDefDirectory(), CUniString("testtool") ));
diff --git a/basic/source/app/app.hxx b/basic/source/app/app.hxx
index 5a501ec5efcf..47dd5056fb58 100644
--- a/basic/source/app/app.hxx
+++ b/basic/source/app/app.hxx
@@ -188,6 +188,7 @@ public:
void SetAppMode( const String &aNewMode ){ aAppMode = aNewMode; UpdateTitle(); }
String GenRealString( const String &aResString );
+ Rectangle GetInnerRect() const;
};
diff --git a/basic/source/app/appwin.cxx b/basic/source/app/appwin.cxx
index 4d0a5f95fca4..eb80a96f4183 100644
--- a/basic/source/app/appwin.cxx
+++ b/basic/source/app/appwin.cxx
@@ -121,14 +121,8 @@ void AppWin::Maximize()
pFrame->nMaximizedWindows++;
nWinState = TT_WIN_STATE_MAX;
}
- sal_Int32 nTitleHeight;
- {
- sal_Int32 nDummy1, nDummy2, nDummy3;
- pFrame->GetBorder( nDummy1, nTitleHeight, nDummy2, nDummy3 );
- }
- Size aSize = pFrame->GetOutputSizePixel();
- aSize.Height() -= nTitleHeight;
+ Size aSize = pFrame->GetInnerRect().GetSize();
aSize.Height() -= 2;
aSize.Width() -= 2;
SetSizePixel( aSize );
diff --git a/basic/source/runtime/dllmgr.cxx b/basic/source/runtime/dllmgr.cxx
index 8cc6ce7edd82..8baf819372ba 100644
--- a/basic/source/runtime/dllmgr.cxx
+++ b/basic/source/runtime/dllmgr.cxx
@@ -36,6 +36,7 @@
#include "basic/sbx.hxx"
#include "basic/sbxvar.hxx"
+#include "runtime.hxx"
#include "osl/thread.h"
#include "rtl/ref.hxx"
#include "rtl/string.hxx"
@@ -266,9 +267,15 @@ SbError marshal(
std::vector< char > & blob, std::size_t offset, MarshalData & data)
{
OSL_ASSERT(variable != 0);
- if ((variable->GetFlags() & SBX_REFERENCE) == 0) {
- if ((variable->GetType() & SbxARRAY) == 0) {
- switch (variable->GetType()) {
+
+ SbxDataType eVarType = variable->GetType();
+ bool bByVal = (variable->GetFlags() & SBX_REFERENCE) == 0;
+ if( !bByVal && !SbiRuntime::isVBAEnabled() && eVarType == SbxSTRING )
+ bByVal = true;
+
+ if (bByVal) {
+ if ((eVarType & SbxARRAY) == 0) {
+ switch (eVarType) {
case SbxINTEGER:
add(blob, variable->GetInteger(), outer ? 4 : 2, offset);
break;
@@ -317,8 +324,8 @@ SbError marshal(
}
}
} else {
- if ((variable->GetType() & SbxARRAY) == 0) {
- switch (variable->GetType()) {
+ if ((eVarType & SbxARRAY) == 0) {
+ switch (eVarType) {
case SbxINTEGER:
case SbxLONG:
case SbxSINGLE:
diff --git a/basic/source/runtime/step2.cxx b/basic/source/runtime/step2.cxx
index 02b22a35b732..bbb3668b5b69 100755
--- a/basic/source/runtime/step2.cxx
+++ b/basic/source/runtime/step2.cxx
@@ -521,7 +521,7 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem )
pPar->Put( NULL, 0 );
}
// Index-Access bei UnoObjekten beruecksichtigen
- else if( pElem->GetType() == SbxOBJECT && (!pElem->ISA(SbxMethod) || !pElem->IsBroadcaster()) )
+ else if( pElem->GetType() == SbxOBJECT && (!pElem->ISA(SbxMethod) || (bVBAEnabled && !pElem->IsBroadcaster()) ) )
{
pPar = pElem->GetParameters();
if ( pPar )
diff --git a/canvas/source/cairo/cairo_canvasfont.cxx b/canvas/source/cairo/cairo_canvasfont.cxx
index e90276f2ba33..5da2e10e7969 100644
--- a/canvas/source/cairo/cairo_canvasfont.cxx
+++ b/canvas/source/cairo/cairo_canvasfont.cxx
@@ -30,6 +30,8 @@
#include <canvas/debug.hxx>
+#include <com/sun/star/rendering/PanoseProportion.hpp>
+
#include <rtl/math.hxx>
#include <basegfx/numeric/ftools.hxx>
@@ -83,6 +85,9 @@ namespace cairocanvas
// TODO(F2): improve panose->vclenum conversion
maFont->SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) );
maFont->SetItalic( (rFontRequest.FontDescription.FontDescription.Letterform<=8) ? ITALIC_NONE : ITALIC_NORMAL );
+ maFont->SetPitch(
+ rFontRequest.FontDescription.FontDescription.Proportion == rendering::PanoseProportion::MONO_SPACED
+ ? PITCH_FIXED : PITCH_VARIABLE);
maFont->SetLanguage(MsLangId::convertLocaleToLanguage(rFontRequest.Locale));
diff --git a/canvas/source/directx/dx_textlayout_drawhelper.cxx b/canvas/source/directx/dx_textlayout_drawhelper.cxx
index b246cf5bedeb..7fd29805e2f7 100755
--- a/canvas/source/directx/dx_textlayout_drawhelper.cxx
+++ b/canvas/source/directx/dx_textlayout_drawhelper.cxx
@@ -39,6 +39,7 @@
#include <boost/scoped_array.hpp>
#include <boost/bind.hpp>
#include <com/sun/star/rendering/FontRequest.hpp>
+#include <com/sun/star/rendering/PanoseProportion.hpp>
#include <com/sun/star/rendering/XCanvasFont.hpp>
#include <comphelper/sequence.hxx>
#include <comphelper/scopeguard.hxx>
@@ -132,6 +133,9 @@ namespace dxcanvas
aFont.SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? sal_True : sal_False );
aFont.SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) );
aFont.SetItalic( (rFontRequest.FontDescription.FontDescription.Letterform<=8) ? ITALIC_NONE : ITALIC_NORMAL );
+ aFont.SetPitch(
+ rFontRequest.FontDescription.FontDescription.Proportion == rendering::PanoseProportion::MONO_SPACED
+ ? PITCH_FIXED : PITCH_VARIABLE);
aFont.SetLanguage(MsLangId::convertLocaleToLanguage(rFontRequest.Locale));
@@ -264,6 +268,9 @@ namespace dxcanvas
aFont.SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? sal_True : sal_False );
aFont.SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) );
aFont.SetItalic( (rFontRequest.FontDescription.FontDescription.Letterform<=8) ? ITALIC_NONE : ITALIC_NORMAL );
+ aFont.SetPitch(
+ rFontRequest.FontDescription.FontDescription.Proportion == rendering::PanoseProportion::MONO_SPACED
+ ? PITCH_FIXED : PITCH_VARIABLE);
// adjust to stretched font
if(!::rtl::math::approxEqual(rFontMatrix.m00, rFontMatrix.m11))
diff --git a/canvas/source/vcl/canvasfont.cxx b/canvas/source/vcl/canvasfont.cxx
index 4ca0084983db..9f10c788bd24 100644
--- a/canvas/source/vcl/canvasfont.cxx
+++ b/canvas/source/vcl/canvasfont.cxx
@@ -35,6 +35,8 @@
#include <i18npool/mslangid.hxx>
#include <vcl/metric.hxx>
+#include <com/sun/star/rendering/PanoseProportion.hpp>
+
#include "canvasfont.hxx"
#include "textlayout.hxx"
@@ -63,6 +65,9 @@ namespace vclcanvas
// TODO(F2): improve panose->vclenum conversion
maFont->SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) );
maFont->SetItalic( (rFontRequest.FontDescription.FontDescription.Letterform<=8) ? ITALIC_NONE : ITALIC_NORMAL );
+ maFont->SetPitch(
+ rFontRequest.FontDescription.FontDescription.Proportion == rendering::PanoseProportion::MONO_SPACED
+ ? PITCH_FIXED : PITCH_VARIABLE);
maFont->SetLanguage(MsLangId::convertLocaleToLanguage(rFontRequest.Locale));
diff --git a/cli_ure/version/version.txt b/cli_ure/version/version.txt
index 8cbdedf654d4..b5ec562837f6 100644..100755
--- a/cli_ure/version/version.txt
+++ b/cli_ure/version/version.txt
@@ -25,23 +25,23 @@
#
#*************************************************************************
-CLI_URETYPES_NEW_VERSION=1.0.7.0
-CLI_URETYPES_OLD_VERSION=1.0.0.0-1.0.6.0
-CLI_URETYPES_POLICY_VERSION=7.0.0.0
+CLI_URETYPES_NEW_VERSION=1.0.8.0
+CLI_URETYPES_OLD_VERSION=1.0.0.0-1.0.7.0
+CLI_URETYPES_POLICY_VERSION=8.0.0.0
CLI_URETYPES_POLICY_ASSEMBLY=policy.1.0.cli_uretypes
-CLI_BASETYPES_NEW_VERSION=1.0.18.0
-CLI_BASETYPES_OLD_VERSION=1.0.0.0-1.0.17.0
-CLI_BASETYPES_POLICY_VERSION=18.0.0.0
+CLI_BASETYPES_NEW_VERSION=1.0.19.0
+CLI_BASETYPES_OLD_VERSION=1.0.0.0-1.0.18.0
+CLI_BASETYPES_POLICY_VERSION=19.0.0.0
CLI_BASETYPES_POLICY_ASSEMBLY=policy.1.0.cli_basetypes
-CLI_URE_NEW_VERSION=1.0.21.0
-CLI_URE_OLD_VERSION=1.0.0.0-1.0.20.0
-CLI_URE_POLICY_VERSION=21.0.0.0
+CLI_URE_NEW_VERSION=1.0.22.0
+CLI_URE_OLD_VERSION=1.0.0.0-1.0.21.0
+CLI_URE_POLICY_VERSION=22.0.0.0
CLI_URE_POLICY_ASSEMBLY=policy.1.0.cli_ure
-CLI_CPPUHELPER_NEW_VERSION=1.0.21.0
-CLI_CPPUHELPER_OLD_VERSION=1.0.0.0-1.0.20.0
-CLI_CPPUHELPER_POLICY_VERSION=21.0.0.0
+CLI_CPPUHELPER_NEW_VERSION=1.0.22.0
+CLI_CPPUHELPER_OLD_VERSION=1.0.0.0-1.0.21.0
+CLI_CPPUHELPER_POLICY_VERSION=22.0.0.0
CLI_CPPUHELPER_POLICY_ASSEMBLY=policy.1.0.cli_cppuhelper
diff --git a/codemaker/source/bonobowrappermaker/corbaoptions.cxx b/codemaker/source/bonobowrappermaker/corbaoptions.cxx
index 3c644b6ff4dd..1bb75810031a 100644
--- a/codemaker/source/bonobowrappermaker/corbaoptions.cxx
+++ b/codemaker/source/bonobowrappermaker/corbaoptions.cxx
@@ -247,9 +247,8 @@ OString CorbaOptions::prepareHelp()
OString CorbaOptions::prepareVersion()
{
- OString version("\nSun Microsystems (R) ");
+ OString version(m_program);
version += m_program + " Version 2.0\n\n";
-
return version;
}
diff --git a/codemaker/source/cppumaker/cppuoptions.cxx b/codemaker/source/cppumaker/cppuoptions.cxx
index 1bc398391c9d..da8ce2089c6e 100644
--- a/codemaker/source/cppumaker/cppuoptions.cxx
+++ b/codemaker/source/cppumaker/cppuoptions.cxx
@@ -34,6 +34,12 @@
#include "osl/thread.h"
#include "osl/process.h"
+#ifdef SAL_UNX
+#define SEPARATOR '/'
+#else
+#define SEPARATOR '\\'
+#endif
+
using namespace rtl;
sal_Bool CppuOptions::initOptions(int ac, char* av[], sal_Bool bCmdFile)
@@ -46,7 +52,9 @@ sal_Bool CppuOptions::initOptions(int ac, char* av[], sal_Bool bCmdFile)
{
bCmdFile = sal_True;
- m_program = av[0];
+ OString name(av[0]);
+ sal_Int32 index = name.lastIndexOf(SEPARATOR);
+ m_program = name.copy((index > 0 ? index+1 : 0));
if (ac < 2)
{
@@ -338,7 +346,7 @@ OString CppuOptions::prepareHelp()
help += " necessary information is available for bridging the type in UNO.\n";
help += " -G = generate only target files which does not exists.\n";
help += " -Gc = generate only target files which content will be changed.\n";
- help += " -X<file> = extra types which will not be taken into account for generation.\n";
+ help += " -X<file> = extra types which will not be taken into account for generation.\n\n";
help += prepareVersion();
return help;
@@ -346,9 +354,8 @@ OString CppuOptions::prepareHelp()
OString CppuOptions::prepareVersion()
{
- OString version("\nSun Microsystems (R) ");
- version += m_program + " Version 2.0\n\n";
-
+ OString version(m_program);
+ version += " Version 2.0\n\n";
return version;
}
diff --git a/codemaker/source/cunomaker/cunooptions.cxx b/codemaker/source/cunomaker/cunooptions.cxx
index 50a1223d004f..909ab3edc8dd 100644
--- a/codemaker/source/cunomaker/cunooptions.cxx
+++ b/codemaker/source/cunomaker/cunooptions.cxx
@@ -321,9 +321,8 @@ OString CunoOptions::prepareHelp()
OString CunoOptions::prepareVersion()
{
- OString version("\nSun Microsystems (R) ");
- version += m_program + " Version 1.0\n\n";
-
+ OString version(m_program);
+ version += " Version 1.0\n\n";
return version;
}
diff --git a/codemaker/source/idlmaker/idloptions.cxx b/codemaker/source/idlmaker/idloptions.cxx
index 306e43293223..e495f555e5cb 100644
--- a/codemaker/source/idlmaker/idloptions.cxx
+++ b/codemaker/source/idlmaker/idloptions.cxx
@@ -242,9 +242,8 @@ OString IdlOptions::prepareHelp()
OString IdlOptions::prepareVersion()
{
- OString version("\nSun Microsystems (R) ");
- version += m_program + " Version 2.0\n\n";
-
+ OString version(m_program);
+ version += " Version 2.0\n\n";
return version;
}
diff --git a/codemaker/source/javamaker/javaoptions.cxx b/codemaker/source/javamaker/javaoptions.cxx
index 24b9b1509cfc..58235bd32616 100644
--- a/codemaker/source/javamaker/javaoptions.cxx
+++ b/codemaker/source/javamaker/javaoptions.cxx
@@ -33,6 +33,12 @@
#include "osl/process.h"
#include "osl/thread.h"
+#ifdef SAL_UNX
+#define SEPARATOR '/'
+#else
+#define SEPARATOR '\\'
+#endif
+
using namespace rtl;
sal_Bool JavaOptions::initOptions(int ac, char* av[], sal_Bool bCmdFile)
@@ -45,7 +51,9 @@ sal_Bool JavaOptions::initOptions(int ac, char* av[], sal_Bool bCmdFile)
{
bCmdFile = sal_True;
- m_program = av[0];
+ OString name(av[0]);
+ sal_Int32 index = name.lastIndexOf(SEPARATOR);
+ m_program = name.copy((index > 0 ? index+1 : 0));
if (ac < 2)
{
@@ -282,7 +290,7 @@ OString JavaOptions::prepareHelp()
help += " -nD = no dependent types are generated.\n";
help += " -G = generate only target files which does not exists.\n";
help += " -Gc = generate only target files which content will be changed.\n";
- help += " -X<file> = extra types which will not be taken into account for generation.\n";
+ help += " -X<file> = extra types which will not be taken into account for generation.\n\n";
help += prepareVersion();
return help;
@@ -290,9 +298,8 @@ OString JavaOptions::prepareHelp()
OString JavaOptions::prepareVersion()
{
- OString version("\nSun Microsystems (R) ");
- version += m_program + " Version 2.0\n\n";
-
+ OString version(m_program);
+ version += " Version 2.0\n\n";
return version;
}
diff --git a/configure.in b/configure.in
index eca0540550a5..ec4d9ce11df4 100644
--- a/configure.in
+++ b/configure.in
@@ -1946,6 +1946,30 @@ fi
AC_SUBST(LFS_CFLAGS)
dnl ===================================================================
+dnl Check if valgrind.h is available
+dnl ===================================================================
+if test -n "$enable_dbgutil" && test "$enable_dbgutil" != "no"; then
+ dnl Test $prefix (currently only testing for /usr and /usr/local)
+ dnl so that VALGRIND_CFLAGS = -I$prefix/include/valgrind
+ VALGRIND_CFLAGS=""
+ prev_cppflags=$CPPFLAGS
+ if test -z "$VALGRIND_CFLAGS"; then
+ CPPFLAGS="-I/usr/include/valgrind"
+ AC_CHECK_HEADER([valgrind.h], [VALGRIND_CFLAGS=$CPPFLAGS], [unset ac_cv_header_valgrind_h])
+ fi
+ if test -z "$VALGRIND_CFLAGS"; then
+ CPPFLAGS="-I/usr/local/include/valgrind"
+ AC_CHECK_HEADER([valgrind.h], [VALGRIND_CFLAGS=$CPPFLAGS], [])
+ fi
+ if test -n "$VALGRIND_CFLAGS"; then
+ CPPFLAGS=$VALGRIND_CFLAGS
+ AC_CHECK_HEADER([memcheck.h], [], [VALGRIND_CFLAGS=""])
+ fi
+ CPPFLAGS=$prev_cppflags
+fi
+AC_SUBST([VALGRIND_CFLAGS])
+
+dnl ===================================================================
dnl Check if cups/cups.h is available
dnl ===================================================================
if test "$test_cups" = "yes" -a "$ENABLE_CUPS" = "TRUE" ; then
@@ -3458,9 +3482,10 @@ if test "z$enable_odk" = "z" -o "$enable_odk" != "no"; then
AC_MSG_RESULT(yes)
fi
if echo "$WITH_MINGWIN" | $EGREP -q "/"; then
- if ! test -x "`echo $WITH_MINGWIN | $SED -e s/g++/strip/`"; then MINGSTRIP=false; else MINGWSTRIP=$(basename $(echo $WITH_MINGWIN | $SED -e s/g++/strip/)); fi
+ if ! test -x "`echo $WITH_MINGWIN | $SED -e s/g++/strip/ | $SED -e s/c++/strip/`"; then MINGSTRIP=false; else MINGWSTRIP=$(basename $(echo $WITH_MINGWIN | $SED -e s/g++/strip/ | $SED -e s/c++/strip/)); fi
else
- AC_CHECK_TOOL(MINGWSTRIP, `echo $WITH_MINGWIN | $SED -e s/g++/strip/`, false)
+ AC_CHECK_TOOL(MINGWSTRIP, `echo $WITH_MINGWIN | $SED -e s/g++/strip/ |
+$SED -e s/c++/strip/`, false)
fi
if test "$MINGWSTRIP" = "false"; then
AC_MSG_ERROR(MinGW32 binutils needed. Install them.)
diff --git a/cppcanvas/inc/cppcanvas/renderer.hxx b/cppcanvas/inc/cppcanvas/renderer.hxx
index 0b8bb43d7e3e..09852ff9e530 100644
--- a/cppcanvas/inc/cppcanvas/renderer.hxx
+++ b/cppcanvas/inc/cppcanvas/renderer.hxx
@@ -136,6 +136,9 @@ namespace cppcanvas
/// Optionally forces the given font letter form (italics etc.) for all text actions
::boost::optional< sal_Int8 > maFontLetterForm;
+ /// Optionally forces the given font proportion (condensed, monospaced etc.) for all text actions
+ ::boost::optional< sal_Int8 > maFontProportion;
+
/// Optionally forces underlining for all text actions
::boost::optional< bool > maFontUnderline;
};
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index e8a6468611f7..1e0611ab037a 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -43,6 +43,7 @@
#include <com/sun/star/rendering/TexturingMode.hpp>
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/geometry/RealPoint2D.hpp>
+#include <com/sun/star/rendering/PanoseProportion.hpp>
#include <com/sun/star/rendering/ViewState.hpp>
#include <com/sun/star/rendering/RenderState.hpp>
#include <com/sun/star/rendering/XCanvasFont.hpp>
@@ -863,6 +864,12 @@ namespace cppcanvas
rParms.mrParms.maFontLetterForm.is_initialized() ?
*rParms.mrParms.maFontLetterForm :
(rFont.GetItalic() == ITALIC_NONE) ? 0 : 9;
+ aFontRequest.FontDescription.FontDescription.Proportion =
+ rParms.mrParms.maFontProportion.is_initialized() ?
+ *rParms.mrParms.maFontProportion :
+ (rFont.GetPitch() == PITCH_FIXED)
+ ? rendering::PanoseProportion::MONO_SPACED
+ : rendering::PanoseProportion::ANYTHING;
LanguageType aLang = rFont.GetLanguage();
aFontRequest.Locale = MsLangId::convertLanguageToLocale(aLang, false);
@@ -2980,7 +2987,8 @@ namespace cppcanvas
if( rParams.maFontName.is_initialized() ||
rParams.maFontWeight.is_initialized() ||
rParams.maFontLetterForm.is_initialized() ||
- rParams.maFontUnderline.is_initialized() )
+ rParams.maFontUnderline.is_initialized() ||
+ rParams.maFontProportion.is_initialized() )
{
::cppcanvas::internal::OutDevState& rState = getState( aStateStack );
diff --git a/cpputools/source/registercomponent/registercomponent.cxx b/cpputools/source/registercomponent/registercomponent.cxx
index c487d95c59a5..f13fae54c508 100644
--- a/cpputools/source/registercomponent/registercomponent.cxx
+++ b/cpputools/source/registercomponent/registercomponent.cxx
@@ -575,7 +575,7 @@ void DoIt::operator() (const OUString & url) throw()
if ( ! _bSilent )
{
- fprintf(stderr, "register component '%s' in registry '%s' succesful!\n", sUrl.getStr(), _sRegName.getStr());
+ fprintf(stderr, "register component '%s' in registry '%s' successful!\n", sUrl.getStr(), _sRegName.getStr());
}
}
@@ -604,7 +604,7 @@ void DoIt::operator() (const OUString & url) throw()
if (bRet)
{
if ( ! _bSilent )
- fprintf(stderr, "revoke component '%s' from registry '%s' succesful!\n", sUrl.getStr(), _sRegName.getStr());
+ fprintf(stderr, "revoke component '%s' from registry '%s' successful!\n", sUrl.getStr(), _sRegName.getStr());
}
else
{
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 5d2e85da8a3b..708c840ee407 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -613,6 +613,9 @@ IMPL_LINK(SvxBulletPickTabPage, NumSelectHdl_Impl, ValueSet*, EMPTYARG)
{
SvxNumberFormat aFmt(pActNum->GetLevel(i));
aFmt.SetNumberingType( SVX_NUM_CHAR_SPECIAL );
+ // #i93908# clear suffix for bullet lists
+ aFmt.SetPrefix(::rtl::OUString());
+ aFmt.SetSuffix(::rtl::OUString());
aFmt.SetBulletFont(&rActBulletFont);
aFmt.SetBulletChar(cChar );
aFmt.SetCharFmtName(sBulletCharFmtName);
@@ -859,6 +862,9 @@ IMPL_LINK(SvxNumPickTabPage, NumSelectHdl_Impl, ValueSet*, EMPTYARG)
sal_uInt16 nUpperLevelOrChar = (sal_uInt16)pLevelSettings->nParentNumbering;
if(aFmt.GetNumberingType() == SVX_NUM_CHAR_SPECIAL)
{
+ // #i93908# clear suffix for bullet lists
+ aFmt.SetPrefix(::rtl::OUString());
+ aFmt.SetSuffix(::rtl::OUString());
if( pLevelSettings->sBulletFont.getLength() &&
pLevelSettings->sBulletFont.compareTo(
rActBulletFont.GetName()))
@@ -908,9 +914,10 @@ IMPL_LINK(SvxNumPickTabPage, NumSelectHdl_Impl, ValueSet*, EMPTYARG)
aFmt.SetCharFmtName(sNumCharFmtName);
// #62069# // #92724#
aFmt.SetBulletRelSize(100);
+ // #i93908#
+ aFmt.SetPrefix(pLevelSettings->sPrefix);
+ aFmt.SetSuffix(pLevelSettings->sSuffix);
}
- aFmt.SetPrefix(pLevelSettings->sPrefix);
- aFmt.SetSuffix(pLevelSettings->sSuffix);
pActNum->SetLevel(i, aFmt);
}
}
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index 5bc52b99f3a9..0000fe6e1714 100644..100755
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -608,6 +608,7 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet )
ResStringArray aPaperAry( CUI_RES( nAryId ) );
sal_uInt32 nCnt = aPaperAry.Count();
+ sal_uInt16 nUserPos = LISTBOX_ENTRY_NOTFOUND;
for ( sal_uInt32 i = 0; i < nCnt; ++i )
{
String aStr = aPaperAry.GetString(i);
@@ -617,9 +618,11 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet )
if ( eSize == ePaper )
nActPos = nPos;
+ if( eSize == PAPER_USER )
+ nUserPos = nPos;
}
- // aktuelles Papierformat selektieren
- aPaperSizeBox.SelectEntryPos( nActPos );
+ // preselect current paper format - #115915#: ePaper might not be in aPaperSizeBox so use PAPER_USER instead
+ aPaperSizeBox.SelectEntryPos( nActPos != LISTBOX_ENTRY_NOTFOUND ? nActPos : nUserPos );
// Applikationsspezifisch
diff --git a/desktop/os2/source/applauncher/makefile.mk b/desktop/os2/source/applauncher/makefile.mk
index bf71b57c2fdf..7eec8aee9c23 100644
--- a/desktop/os2/source/applauncher/makefile.mk
+++ b/desktop/os2/source/applauncher/makefile.mk
@@ -47,7 +47,7 @@ OBJFILES= \
$(OBJ)$/sbase.obj \
$(OBJ)$/smath.obj \
$(OBJ)$/officeloader.obj \
- $(OBJ)$/quickstart.obj
+ $(OBJ)$/os2quickstart.obj
APP1TARGET=swriter
APP1NOSAL=TRUE
@@ -106,13 +106,13 @@ APP7OBJS = \
$(OBJ)$/launcher.obj\
$(OBJ)$/officeloader.obj
-APP8TARGET=quickstart
+APP8TARGET=os2quickstart
APP8NOSAL=TRUE
APP8LINKRES=$(MISC)$/$(TARGET)8.res
APP8ICON=$(SOLARRESDIR)$/icons$/ooo-main-app.ico
APP8OBJS = \
$(OBJ)$/launcher.obj\
- $(OBJ)$/quickstart.obj
+ $(OBJ)$/os2quickstart.obj
# --- Targets ------------------------------------------------------
diff --git a/desktop/os2/source/applauncher/quickstart.cxx b/desktop/os2/source/applauncher/os2quickstart.cxx
index 63585434bb50..63585434bb50 100644
--- a/desktop/os2/source/applauncher/quickstart.cxx
+++ b/desktop/os2/source/applauncher/os2quickstart.cxx
diff --git a/desktop/prj/build.lst b/desktop/prj/build.lst
index fc782c35a71b..f1dee0761ccd 100644
--- a/desktop/prj/build.lst
+++ b/desktop/prj/build.lst
@@ -17,6 +17,9 @@ dt desktop\win32\source\guistdio nmake - w dt_guistdio dt_inc N
dt desktop\win32\source\applauncher nmake - w dt_applauncher dt_inc NULL
dt desktop\win32\source\applauncher\ooo nmake - w dt_applauncher_ooo dt_applauncher.w dt_inc NULL
dt desktop\win32\source\rebase nmake - w dt_rebase dt_inc NULL
+dt desktop\win32\source\QuickStart nmake - w dt_win32_quickstart NULL
+dt desktop\win32\source\QuickStart\so nmake - w dt_win32_quickstart_so dt_win32_quickstart.w NULL
+
dt desktop\os2\source\applauncher nmake - p dt_applauncher dt_inc NULL
dt desktop\unx\source\officeloader nmake - u dt_officeloader_unx dt_inc NULL
dt desktop\source\pagein nmake - u dt_pagein dt_inc NULL
@@ -35,7 +38,7 @@ dt desktop\source\deployment\registry\configuration nmake - all dt_dp_registry_c
dt desktop\source\deployment\registry\help nmake - all dt_dp_registry_help dt_inc NULL
dt desktop\source\deployment\registry\executable nmake - all dt_dp_registry_executable dt_inc NULL
dt desktop\scripts nmake - u dt_scripts dt_inc NULL
-dt desktop\util nmake - all dt_util dt_app dt_pagein.u dt_so_comp dt_spl dt_wrapper.w dt_officeloader.w dt_officeloader_unx.u dt_migr dt_rebase.w NULL
+dt desktop\util nmake - all dt_util dt_app dt_pagein.u dt_so_comp dt_spl dt_wrapper.w dt_officeloader.w dt_officeloader_unx.u dt_migr dt_rebase.w dt_win32_quickstart_so.w NULL
dt desktop\zipintro nmake - all dt_zipintro NULL
dt desktop\registry\data\org\openoffice\Office nmake - all sn_regconfig NULL
dt desktop\source\registration\com\sun\star\servicetag\resources get - all sn_svctagres NULL
diff --git a/desktop/prj/d.lst b/desktop/prj/d.lst
index b6e14a5ce722..be7b77388763 100644
--- a/desktop/prj/d.lst
+++ b/desktop/prj/d.lst
@@ -31,7 +31,7 @@ mkdir: %_DEST%\bin%_EXT%\odf4ms
..\%__SRC%\bin\swriter.exe %_DEST%\bin%_EXT%\swriter.exe
..\%__SRC%\bin\sbase.exe %_DEST%\bin%_EXT%\sbase.exe
..\%__SRC%\bin\sweb.exe %_DEST%\bin%_EXT%\sweb.exe
-..\%__SRC%\bin\quickstart.exe %_DEST%\bin%_EXT%\quickstart.exe
+..\%__SRC%\bin\os2quickstart.exe %_DEST%\bin%_EXT%\quickstart.exe
..\%__SRC%\bin\so\scalc.exe %_DEST%\bin%_EXT%\so\scalc.exe
..\%__SRC%\bin\so\sdraw.exe %_DEST%\bin%_EXT%\so\sdraw.exe
..\%__SRC%\bin\so\simpress.exe %_DEST%\bin%_EXT%\so\simpress.exe
@@ -40,6 +40,11 @@ mkdir: %_DEST%\bin%_EXT%\odf4ms
..\%__SRC%\bin\so\sbase.exe %_DEST%\bin%_EXT%\so\sbase.exe
..\%__SRC%\bin\so\sweb.exe %_DEST%\bin%_EXT%\so\sweb.exe
+..\%__SRC%\bin\quickstart.exe %_DEST%\bin%_EXT%\quickstart.exe
+..\%__SRC%\bin\quickstart.exe %_DEST%\bin%_EXT%\install_quickstart.exe
+..\%__SRC%\bin\soquickstart.exe %_DEST%\bin%_EXT%\so\quickstart.exe
+..\%__SRC%\bin\soquickstart.exe %_DEST%\bin%_EXT%\so\install_quickstart.exe
+
..\%__SRC%\misc\soffice.exe.manifest %_DEST%\bin%_EXT%\soffice.exe.manifest
..\%__SRC%\misc\soffice.bin.manifest %_DEST%\bin%_EXT%\soffice.bin.manifest
..\%__SRC%\bin\wrp*.dll %_DEST%\bin%_EXT%\wrp*.dll
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index a2f602082fe4..3b5ed1916f9b 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1215,7 +1215,7 @@ void Desktop::retrieveCrashReporterState()
{
static const ::rtl::OUString CFG_PACKAGE_RECOVERY = ::rtl::OUString::createFromAscii("org.openoffice.Office.Recovery/");
static const ::rtl::OUString CFG_PATH_CRASHREPORTER = ::rtl::OUString::createFromAscii("CrashReporter" );
- static const ::rtl::OUString CFG_ENTRY_ENABLED = ::rtl::OUString::createFromAscii("Enabled" );
+ static const ::rtl::OUString CFG_ENTRY_ENABLED = ::rtl::OUString::createFromAscii("Enabled" );
css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = ::comphelper::getProcessServiceFactory();
@@ -1627,7 +1627,8 @@ void Desktop::Main()
// there is no other instance using our data files from a remote host
RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109) Desktop::Main -> Lockfile" );
m_pLockfile = new Lockfile;
- if ( !pCmdLineArgs->IsInvisible() && !pCmdLineArgs->IsNoLockcheck() && !m_pLockfile->check( Lockfile_execWarning )) {
+ if ( !pCmdLineArgs->IsHeadless() && !pCmdLineArgs->IsInvisible() &&
+ !pCmdLineArgs->IsNoLockcheck() && !m_pLockfile->check( Lockfile_execWarning )) {
// Lockfile exists, and user clicked 'no'
return;
}
@@ -1802,7 +1803,7 @@ void Desktop::Main()
if ( !pExecGlobals->bRestartRequested )
{
- if ((!pCmdLineArgs->WantsToLoadDocument() ) &&
+ if ((!pCmdLineArgs->WantsToLoadDocument() && !pCmdLineArgs->IsInvisible() && !pCmdLineArgs->IsHeadless() ) &&
(SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::E_SSTARTMODULE)) &&
(!bExistsRecoveryData ) &&
(!bExistsSessionData ) &&
@@ -2116,9 +2117,9 @@ sal_Bool Desktop::InitializeQuickstartMode( Reference< XMultiServiceFactory >& r
// unfortunately this broke the QUARTZ behavior which is to always run
// in quickstart mode since Mac applications do not usually quit
// when the last document closes
- //#ifndef QUARTZ
+ #ifndef QUARTZ
if ( bQuickstart )
- //#endif
+ #endif
{
Reference < XComponent > xQuickstart( rSMgr->createInstanceWithArguments(
DEFINE_CONST_UNICODE( "com.sun.star.office.Quickstart" ), aSeq ),
@@ -3203,6 +3204,7 @@ void Desktop::OpenSplashScreen()
sal_Bool bVisible = sal_False;
// Show intro only if this is normal start (e.g. no server, no quickstart, no printing )
if ( !pCmdLine->IsInvisible() &&
+ !pCmdLine->IsHeadless() &&
!pCmdLine->IsQuickstart() &&
!pCmdLine->IsMinimized() &&
!pCmdLine->IsNoLogo() &&
diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
index 8bd8a6191201..a8a1025959f1 100755..100644
--- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
@@ -165,7 +165,7 @@ public:
m_bWarnUser( false )
{}
- Dialog * activeDialog() { return m_pDialogHelper->getWindow(); }
+ Dialog * activeDialog() { return m_pDialogHelper ? m_pDialogHelper->getWindow() : NULL; }
void setTitle( const OUString& rNewTitle ) { m_sTitle = rNewTitle; }
void startProgress();
diff --git a/desktop/util/ooverinfo.rc b/desktop/util/ooverinfo.rc
index 6d92e2a99500..3ddff6b66b02 100644
--- a/desktop/util/ooverinfo.rc
+++ b/desktop/util/ooverinfo.rc
@@ -112,7 +112,7 @@ VS_VERSION_INFO versioninfo
15 ICON "icons\\oasis-formula.ico"
16 ICON "icons\\oasis-web-template.ico"
17 ICON "icons\\empty-document.ico"
-18 ICON "icons\\ooo-configuration.ico"
+18 ICON "icons\\empty-document.ico"
19 ICON "icons\\ooo3_open.ico"
20 ICON "icons\\empty-document.ico"
21 ICON "icons\\ooo3_writer_app.ico"
diff --git a/desktop/util/ooverinfo2.rc b/desktop/util/ooverinfo2.rc
index 17af6818551e..caacb294122d 100755
--- a/desktop/util/ooverinfo2.rc
+++ b/desktop/util/ooverinfo2.rc
@@ -50,7 +50,7 @@ ICON 14 "icons/oasis-database.ico"
ICON 15 "icons/oasis-formula.ico"
ICON 16 "icons/oasis-web-template.ico"
ICON 17 "icons/empty-document.ico"
-ICON 18 "icons/ooo-configuration.ico"
+ICON 18 "icons/empty-document.ico"
ICON 19 "icons/ooo-open.ico"
ICON 20 "icons/empty-document.ico"
ICON 21 "icons/ooo-writer-app.ico"
diff --git a/desktop/util/verinfo.rc b/desktop/util/verinfo.rc
index 7d589956ec83..5a2b03769963 100755..100644
--- a/desktop/util/verinfo.rc
+++ b/desktop/util/verinfo.rc
@@ -117,8 +117,8 @@ VS_VERSION_INFO versioninfo
15 ICON "icons\\oasis-formula.ico"
16 ICON "icons\\oasis-web-template.ico"
17 ICON "icons\\empty-document.ico"
-18 ICON "icons\\so8-configuration.ico"
-19 ICON "icons\\so9_open.ico"
+18 ICON "icons\\empty-document.ico"
+19 ICON "icons\\so9_main_app.ico"
20 ICON "icons\\empty-document.ico"
21 ICON "icons\\so9_writer_app.ico"
22 ICON "icons\\so9_calc_app.ico"
diff --git a/sysui/source/win32/QuickStart/OOQuickStart.rc b/desktop/win32/source/QuickStart/OOQuickStart.rc
index 0dc4dab256b6..9baf7e864f5f 100644
--- a/sysui/source/win32/QuickStart/OOQuickStart.rc
+++ b/desktop/win32/source/QuickStart/OOQuickStart.rc
@@ -31,10 +31,10 @@ LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
-ICON_ACTIVE ICON DISCARDABLE "../../desktop/icons/ooo3_main_app.ico"
-IDI_QUICKSTART ICON DISCARDABLE "../../desktop/icons/ooo3_main_app.ico"
-IDI_SMALL ICON DISCARDABLE "../../desktop/icons/ooo3_main_app.ico"
-ICON_INACTIVE ICON DISCARDABLE "../../desktop/icons/ooo3_main_app.ico"
+ICON_ACTIVE ICON DISCARDABLE "icons/ooo3_main_app.ico"
+IDI_QUICKSTART ICON DISCARDABLE "icons/ooo3_main_app.ico"
+IDI_SMALL ICON DISCARDABLE "icons/ooo3_main_app.ico"
+ICON_INACTIVE ICON DISCARDABLE "icons/ooo3_main_app.ico"
/////////////////////////////////////////////////////////////////////////////
diff --git a/sysui/source/win32/QuickStart/QuickStart.cpp b/desktop/win32/source/QuickStart/QuickStart.cpp
index 3467e35524f8..3467e35524f8 100644
--- a/sysui/source/win32/QuickStart/QuickStart.cpp
+++ b/desktop/win32/source/QuickStart/QuickStart.cpp
diff --git a/sysui/source/win32/QuickStart/QuickStart.h b/desktop/win32/source/QuickStart/QuickStart.h
index d0afd98ec430..d0afd98ec430 100644
--- a/sysui/source/win32/QuickStart/QuickStart.h
+++ b/desktop/win32/source/QuickStart/QuickStart.h
diff --git a/sysui/source/win32/QuickStart/StdAfx.h b/desktop/win32/source/QuickStart/StdAfx.h
index a4bdd66f630c..a4bdd66f630c 100644
--- a/sysui/source/win32/QuickStart/StdAfx.h
+++ b/desktop/win32/source/QuickStart/StdAfx.h
diff --git a/sysui/source/win32/QuickStart/makefile.mk b/desktop/win32/source/QuickStart/makefile.mk
index 41242d849dfb..41242d849dfb 100644
--- a/sysui/source/win32/QuickStart/makefile.mk
+++ b/desktop/win32/source/QuickStart/makefile.mk
diff --git a/sysui/source/win32/QuickStart/resource.h b/desktop/win32/source/QuickStart/resource.h
index d34beb00c5c9..d34beb00c5c9 100644
--- a/sysui/source/win32/QuickStart/resource.h
+++ b/desktop/win32/source/QuickStart/resource.h
diff --git a/sysui/source/win32/QuickStart/so/QuickStart.rc b/desktop/win32/source/QuickStart/so/QuickStart.rc
index c48dc2358d0d..732904dc745a 100644
--- a/sysui/source/win32/QuickStart/so/QuickStart.rc
+++ b/desktop/win32/source/QuickStart/so/QuickStart.rc
@@ -31,10 +31,10 @@ LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
-ICON_ACTIVE ICON DISCARDABLE "../../../desktop/icons/so9_main_app.ico"
-IDI_QUICKSTART ICON DISCARDABLE "../../../desktop/icons/so9_main_app.ico"
-IDI_SMALL ICON DISCARDABLE "../../../desktop/icons/so9_main_app.ico"
-ICON_INACTIVE ICON DISCARDABLE "../../../desktop/icons/so9_main_app.ico"
+ICON_ACTIVE ICON DISCARDABLE "icons/so9_main_app.ico"
+IDI_QUICKSTART ICON DISCARDABLE "icons/so9_main_app.ico"
+IDI_SMALL ICON DISCARDABLE "icons/so9_main_app.ico"
+ICON_INACTIVE ICON DISCARDABLE "icons/so9_main_app.ico"
/////////////////////////////////////////////////////////////////////////////
diff --git a/sysui/source/win32/QuickStart/so/makefile.mk b/desktop/win32/source/QuickStart/so/makefile.mk
index 6c7897232576..50154c7d50b2 100644
--- a/sysui/source/win32/QuickStart/so/makefile.mk
+++ b/desktop/win32/source/QuickStart/so/makefile.mk
@@ -41,6 +41,8 @@ UWINAPILIB =
# --- Resources ----------------------------------------------------
+.IF "$(LINK_SO)"=="TRUE"
+
RCFILES=QuickStart.rc
INCPRE=..
@@ -68,6 +70,8 @@ APP1STDLIBS+=$(SHELL32LIB)\
APP1NOSVRES=$(RES)$/$(TARGET).res
+.ENDIF # "$(LINK_SO)"=="TRUE"
+
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
diff --git a/desktop/win32/source/applauncher/makefile.mk b/desktop/win32/source/applauncher/makefile.mk
index f0f5743f38a1..d08309bbed24 100644
--- a/desktop/win32/source/applauncher/makefile.mk
+++ b/desktop/win32/source/applauncher/makefile.mk
@@ -53,6 +53,7 @@ OBJFILES= \
$(OBJ)$/sweb.obj
# SO launcher
+.IF "$(LINK_SO)"=="TRUE"
.IF "$(BUILD_SPECIAL)"!=""
APP1DEPN= $(APP1RES) verinfo.rc
APP1TARGET=so$/swriter
@@ -139,7 +140,8 @@ APP7VERINFO=verinfo.rc
APP7PRODUCTDEF+=-DRES_APP_NAME=sweb
-.ENDIF # "$(BUILD_SPECIAL)"!=""
+.ENDIF # "$(BUILD_SPECIAL)"!=""
+.ENDIF # "$(LINK_SO)"=="TRUE"
# --- Targets ------------------------------------------------------
diff --git a/desktop/win32/source/guiloader/makefile.mk b/desktop/win32/source/guiloader/makefile.mk
index 5bb1c523ff19..7912471fba13 100644
--- a/desktop/win32/source/guiloader/makefile.mk
+++ b/desktop/win32/source/guiloader/makefile.mk
@@ -48,14 +48,16 @@ APP1OBJS=\
$(SOLARLIBDIR)$/pathutils-obj.obj
STDLIB1=$(SHLWAPILIB)
+.IF "$(LINK_SO)"=="TRUE"
APP2TARGET=so$/guiloader
APP2NOSAL=TRUE
-APP2ICON=$(SOLARRESDIR)$/icons/so8-main-app.ico
+APP2ICON=$(SOLARRESDIR)$/icons/so9_main_app.ico
APP2OBJS=\
$(OBJ)$/extendloaderenvironment.obj \
$(OBJ)$/genericloader.obj \
$(SOLARLIBDIR)$/pathutils-obj.obj
STDLIB2=$(SHLWAPILIB)
+.ENDIF # "$(LINK_SO)"=="TRUE"
# --- Targets ------------------------------------------------------
diff --git a/dmake/config.h.in b/dmake/config.h.in
index c8aa63a861b9..ed639aa99b03 100644
--- a/dmake/config.h.in
+++ b/dmake/config.h.in
@@ -55,6 +55,9 @@
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
#undef HAVE_NDIR_H
+/* Define to 1 if you have the `setenv' function. */
+#undef HAVE_SETENV
+
/* Define to 1 if you have the `settz' function. */
#undef HAVE_SETTZ
diff --git a/dmake/configure b/dmake/configure
index f8a1bd822914..7e6d05ab8a65 100755
--- a/dmake/configure
+++ b/dmake/configure
@@ -7437,7 +7437,7 @@ done
-for ac_func in getcwd getwd strerror setvbuf tzset settz mkstemp tempnam gettimeofday
+for ac_func in getcwd getwd strerror setvbuf tzset settz mkstemp tempnam gettimeofday setenv
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
diff --git a/dmake/configure.in b/dmake/configure.in
index 498c7b2372de..c903d94faab8 100755
--- a/dmake/configure.in
+++ b/dmake/configure.in
@@ -211,7 +211,7 @@ AC_FUNC_MEMCMP
AC_TYPE_SIGNAL
AC_FUNC_UTIME_NULL
AC_FUNC_VPRINTF
-AC_CHECK_FUNCS(getcwd getwd strerror setvbuf tzset settz mkstemp tempnam gettimeofday)
+AC_CHECK_FUNCS(getcwd getwd strerror setvbuf tzset settz mkstemp tempnam gettimeofday setenv)
# Usefull, but special to newlib/MSVC
AC_CHECK_FUNCS(strlwr)
diff --git a/dmake/dmake.c b/dmake/dmake.c
index b96bf4ce3146..ddfe3a88ad06 100644
--- a/dmake/dmake.c
+++ b/dmake/dmake.c
@@ -380,16 +380,19 @@ char **argv;
_warn = TRUE;
/* If -r was not given find and parse startup-makefile. */
- if( Rules ) {
- char *fname;
-
- /* Search_file() also checks the environment variable. */
- if( (mkfil=Search_file("MAKESTARTUP", &fname)) != NIL(FILE) ) {
- Parse(mkfil);
- Def_macro( "MAKESTARTUP", fname, M_EXPANDED|M_MULTI|M_FORCE );
- }
- else
- Fatal( "Configuration file `%s' not found", fname );
+ if( Rules )
+ {
+ char *fname = NIL(char);
+
+ /* Search_file() also checks the environment variable. */
+ if( (mkfil=Search_file("MAKESTARTUP", &fname)) != NIL(FILE) )
+ {
+ Parse(mkfil);
+ Def_macro( "MAKESTARTUP", fname, M_EXPANDED|M_MULTI|M_FORCE );
+ }
+ else
+ Fatal( "Configuration file `%s' not found", fname );
+ if ( fname != NIL(char)) { FREE( fname ); fname = NIL(char); }
}
/* Define the targets set on the command line now. */
@@ -428,8 +431,7 @@ char **argv;
char *p;
if( strcmp(f, "stdin") == 0 ) f = "-";
- p = DmStrAdd( "-f", f, FALSE );
- Def_macro( "MAKEFILE", p, M_PRECIOUS|M_NOEXPORT );
+ Def_macro( "MAKEFILE", p = DmStrAdd( "-f", f, FALSE ), M_PRECIOUS|M_NOEXPORT ); FREE(p);
Parse( mkfil );
}
else if( !Rules )
@@ -663,23 +665,25 @@ char **rname;
*/
if( (hp = GET_MACRO(macname)) != NIL(HASH) ) {
- /* Only expand if needed. */
- if( hp->ht_flag & M_EXPANDED ) {
- ename = fname = DmStrDup(hp->ht_value);
- } else {
- ename = fname = Expand(hp->ht_value);
- }
+ /* Only expand if needed. */
+ if( hp->ht_flag & M_EXPANDED ) {
+ ename = fname = DmStrDup(hp->ht_value);
+ } else {
+ ename = fname = Expand(hp->ht_value);
+ }
- if( hp->ht_flag & M_PRECIOUS ) fil = Openfile(fname, FALSE, FALSE);
+ if( hp->ht_flag & M_PRECIOUS ) fil = Openfile(fname, FALSE, FALSE);
}
if( fil == NIL(FILE) ) {
- fname=Expand(Read_env_string(macname));
- if( (fil = Openfile(fname, FALSE, FALSE)) != NIL(FILE) ) FREE(ename);
+ fname=Expand(Read_env_string(macname));
+ if( (fil = Openfile(fname, FALSE, FALSE)) != NIL(FILE) ) FREE(ename);
}
- if( fil == NIL(FILE) && hp != NIL(HASH) )
- fil = Openfile(fname=ename, FALSE, FALSE);
+ if( fil == NIL(FILE) && hp != NIL(HASH) ) {
+ if ( fname != NIL(char) ) { FREE(fname); fname = NIL(char); }
+ fil = Openfile(fname=ename, FALSE, FALSE);
+ }
if( rname ) *rname = fname;
diff --git a/dmake/expand.c b/dmake/expand.c
index b7232303177e..50bbbdc46760 100644
--- a/dmake/expand.c
+++ b/dmake/expand.c
@@ -133,23 +133,23 @@ char *src; /* pointer to source string */
/* START <+...+> KLUDGE */
if( (ks=DmStrStr(start,"<+")) != NIL(char)
- && (ke=DmStrStr(ks,"+>")) != NIL(char) ){
- char *t1, *t2;
-
- res = DmStrJoin( res, t2=Expand(t1=DmSubStr(start,ks)), -1, TRUE);
- FREE(t1); FREE(t2);
-
- t1 = DmSubStr(ks+2, ke+1); t1[ke-ks-2] = ')';
- t2 = DmStrJoin( "$(mktmp ", t1, -1,FALSE);
- FREE(t1);
- res = DmStrJoin( res, t2=Expand(t2), -1, TRUE);
- FREE(t2);
- src = ke+2;
+ && (ke=DmStrStr(ks,"+>")) != NIL(char) ) {
+ char *t1, *t2;
+
+ res = DmStrJoin( res, t2=Expand(t1=DmSubStr(start,ks)), -1, TRUE);
+ FREE(t1); FREE(t2);
+
+ t1 = DmSubStr(ks+2, ke+1); t1[ke-ks-2] = ')';
+ t2 = DmStrJoin( "$(mktmp ", t1, -1,FALSE);
+ FREE(t1);
+ res = DmStrJoin( res, t1=Expand(t2), -1, TRUE);
+ FREE(t1); FREE(t2);
+ src = ke+2;
}
/* END <+...+> KLUDGE */
else {
- res = DmStrJoin( res, tmp = ScanToken(start,&src,TRUE), -1, TRUE );
- FREE( tmp );
+ res = DmStrJoin( res, tmp = ScanToken(start,&src,TRUE), -1, TRUE );
+ FREE( tmp );
}
}
@@ -726,36 +726,36 @@ int doexpand; /* If TRUE enables macro expansion */
break;
case '\\': /* Transform \<nl> -> ' '. */
- if( s[1] != '\n' ) {
- done = !lev;
- break;
- } else {
- size_t len;
- s[1] = ' ';
- len = strlen(s+1)+1;
- memmove( s, s+1, len );
- }
- /*FALLTHRU*/
+ if( s[1] != '\n' ) {
+ done = !lev;
+ break;
+ } else {
+ size_t len;
+ s[1] = ' ';
+ len = strlen(s+1)+1;
+ memmove( s, s+1, len );
+ }
+ /*FALLTHRU*/
case ' ':
case '\t':
if ( lev == 1 ) fflag = 1;
break;
case '\0': /* check for null */
- *ps = s;
- done = TRUE;
- if( lev ) { /* catch $( or ${ without closing bracket */
- Fatal( "Syntax error in macro [$%s]. The closing bracket [%c] is missing.\n", start, edelim );
- } else
- Fatal( "DEBUG: This cannot occur! [%s].\n", start );
- break;
-
- case ')': /* close macro brace */
- case '}':
+ *ps = s;
+ done = TRUE;
+ if( lev ) { /* catch $( or ${ without closing bracket */
+ Fatal( "Syntax error in macro [$%s]. The closing bracket [%c] is missing.\n", start, edelim );
+ } else
+ Fatal( "DEBUG: This cannot occur! [%s].\n", start );
+ break;
+
+ case ')': /* close macro brace */
+ case '}':
if( !lev ) /* A closing bracket without an .. */
- Fatal("Syntax error in macro [$%s]. Closing bracket [%c] cannot be a macro name.\n", start, *s );
+ Fatal("Syntax error in macro [$%s]. Closing bracket [%c] cannot be a macro name.\n", start, *s );
else if( *s == edelim ) --lev;
- /*FALLTHRU*/
+ /*FALLTHRU*/
default: /* Done when lev == 0. This means either no */
done = !lev; /* opening bracket (single letter macro) or */
@@ -768,14 +768,14 @@ int doexpand; /* If TRUE enables macro expansion */
/* Check if this is a $A type macro. If so then we have to
* handle it a little differently. */
if( bflag )
- macro_name = DmSubStr( start+1, s-1 );
+ macro_name = DmSubStr( start+1, s-1 );
else
- macro_name = DmSubStr( start, s );
+ macro_name = DmSubStr( start, s );
/* If we don't have to expand the macro we're done. */
if (!doexpand) {
- *ps = s;
- DB_RETURN(macro_name);
+ *ps = s;
+ DB_RETURN(macro_name);
}
/* Check to see if the macro name contains spaces, if so then treat it
@@ -783,251 +783,251 @@ int doexpand; /* If TRUE enables macro expansion */
* deal with it. We do not call the function expander if the function
* invocation begins with a '$' */
if( fflag && *macro_name != '$' ) {
- result = Exec_function(macro_name);
+ result = Exec_function(macro_name);
}
else {
- /* Check if the macro is a recursive macro name, if so then
- * EXPAND the name before expanding the value */
- if( strchr( macro_name, '$' ) != NIL(char) ) {
- recurse_name = Expand( macro_name );
- FREE( macro_name );
- macro_name = recurse_name;
- }
+ /* Check if the macro is a recursive macro name, if so then
+ * EXPAND the name before expanding the value */
+ if( strchr( macro_name, '$' ) != NIL(char) ) {
+ recurse_name = Expand( macro_name );
+ FREE( macro_name );
+ macro_name = recurse_name;
+ }
- /* Code to do value expansion goes here, NOTE: macros whose assign bit
- is one have been evaluated and assigned, they contain no further
- expansions and thus do not need their values expanded again. */
+ /* Code to do value expansion goes here, NOTE: macros whose assign bit
+ is one have been evaluated and assigned, they contain no further
+ expansions and thus do not need their values expanded again. */
- if( (hp = GET_MACRO( macro_name )) != NIL(HASH) ) {
- if( hp->ht_flag & M_MARK )
- Fatal( "Detected circular macro [%s]", hp->ht_name );
+ if( (hp = GET_MACRO( macro_name )) != NIL(HASH) ) {
+ if( hp->ht_flag & M_MARK )
+ Fatal( "Detected circular macro [%s]", hp->ht_name );
- if( !(hp->ht_flag & M_EXPANDED) ) {
- hp->ht_flag |= M_MARK;
- result = Expand( hp->ht_value );
- hp->ht_flag ^= M_MARK;
- }
- else if( hp->ht_value != NIL(char) )
- result = DmStrDup( hp->ht_value );
- else
- result = DmStrDup( "" );
+ if( !(hp->ht_flag & M_EXPANDED) ) {
+ hp->ht_flag |= M_MARK;
+ result = Expand( hp->ht_value );
+ hp->ht_flag ^= M_MARK;
+ }
+ else if( hp->ht_value != NIL(char) )
+ result = DmStrDup( hp->ht_value );
+ else
+ result = DmStrDup( "" );
- }
- else {
- /* The use of an undefined macro implicitly defines it but
- * leaves its value to NIL(char). */
- hp = Def_macro( macro_name, NIL(char), M_EXPANDED );
- /* Setting M_INIT assures that this macro is treated unset like
- * default internal macros. (Necessary for *= and *:=) */
- hp->ht_flag |= M_INIT;
-
- result = DmStrDup( "" );
- }
- /* Mark macros as used only if we are not expanding them for
- * the purpose of a .IF test, so we can warn about redef after use*/
- if( !If_expand ) hp->ht_flag |= M_USED;
+ }
+ else {
+ /* The use of an undefined macro implicitly defines it but
+ * leaves its value to NIL(char). */
+ hp = Def_macro( macro_name, NIL(char), M_EXPANDED );
+ /* Setting M_INIT assures that this macro is treated unset like
+ * default internal macros. (Necessary for *= and *:=) */
+ hp->ht_flag |= M_INIT;
+
+ result = DmStrDup( "" );
+ }
+ /* Mark macros as used only if we are not expanding them for
+ * the purpose of a .IF test, so we can warn about redef after use*/
+ if( !If_expand ) hp->ht_flag |= M_USED;
}
if( mflag ) {
- char separator;
- int modifier_list = 0;
- int aug_mod = FALSE;
- char *pat1;
- char *pat2;
- char *p;
-
- /* We are inside of a macro expansion. The "build up macro name,
- * find its while loop above should have caught all \<nl> and
- * converted them to a real space. Let's verify this. */
- for( p=s; *p && *p != edelim && *p; p++ ) {
- if( p[0] == '\\' && p[1] == '\n' ) {
- size_t len;
- p[1] = ' ';
- len = strlen(p+1)+1;
- memmove( p, p+1, len );
- }
- }
- if( !*p )
- Fatal( "Syntax error in macro modifier pattern [$%s]. The closing bracket [%c] is missing.\n", start, edelim );
-
- /* Yet another brain damaged AUGMAKE kludge. We should accept the
- * AUGMAKE bullshit of $(f:pat=sub) form of macro expansion. In
- * order to do this we will forgo the normal processing if the
- * AUGMAKE solution pans out, otherwise we will try to process the
- * modifiers ala dmake.
- *
- * So we look for = in modifier string.
- * If found we process it and not do the normal stuff */
-
- for( p=s; *p && *p != '=' && *p != edelim; p++ );
-
- if( *p == '=' ) {
- char *tmp;
-
- pat1 = Expand(tmp = DmSubStr(s,p)); FREE(tmp);
- s = p+1;
- p = _scan_ballanced_parens(s+1, edelim);
-
- if ( !*p ) {
- Fatal( "Incomplete macro expression [%s]", s );
- p = s+1;
+ char separator;
+ int modifier_list = 0;
+ int aug_mod = FALSE;
+ char *pat1;
+ char *pat2;
+ char *p;
+
+ /* We are inside of a macro expansion. The "build up macro name,
+ * find its while loop above should have caught all \<nl> and
+ * converted them to a real space. Let's verify this. */
+ for( p=s; *p && *p != edelim && *p; p++ ) {
+ if( p[0] == '\\' && p[1] == '\n' ) {
+ size_t len;
+ p[1] = ' ';
+ len = strlen(p+1)+1;
+ memmove( p, p+1, len );
+ }
+ }
+ if( !*p )
+ Fatal( "Syntax error in macro modifier pattern [$%s]. The closing bracket [%c] is missing.\n", start, edelim );
+
+ /* Yet another brain damaged AUGMAKE kludge. We should accept the
+ * AUGMAKE bullshit of $(f:pat=sub) form of macro expansion. In
+ * order to do this we will forgo the normal processing if the
+ * AUGMAKE solution pans out, otherwise we will try to process the
+ * modifiers ala dmake.
+ *
+ * So we look for = in modifier string.
+ * If found we process it and not do the normal stuff */
+
+ for( p=s; *p && *p != '=' && *p != edelim; p++ );
+
+ if( *p == '=' ) {
+ char *tmp;
+
+ pat1 = Expand(tmp = DmSubStr(s,p)); FREE(tmp);
+ s = p+1;
+ p = _scan_ballanced_parens(s+1, edelim);
+
+ if ( !*p ) {
+ Fatal( "Incomplete macro expression [%s]", s );
+ p = s+1;
+ }
+ pat2 = Expand(tmp = DmSubStr(s,p)); FREE(tmp);
+
+ result = Apply_edit( result, pat1, pat2, TRUE, TRUE );
+ FREE( pat1 );
+ FREE( pat2 );
+ s = p;
+ aug_mod = TRUE;
}
- pat2 = Expand(tmp = DmSubStr(s,p)); FREE(tmp);
-
- result = Apply_edit( result, pat1, pat2, TRUE, TRUE );
- FREE( pat1 );
- FREE( pat2 );
- s = p;
- aug_mod = TRUE;
- }
- if( !aug_mod )
- while( *s && *s != edelim ) { /* while not at end of macro */
- char switch_char;
+ if( !aug_mod )
+ while( *s && *s != edelim ) { /* while not at end of macro */
+ char switch_char;
- switch( switch_char = *s++ ) {
- case '1': modifier_list |= JUST_FIRST_FLAG; break;
+ switch( switch_char = *s++ ) {
+ case '1': modifier_list |= JUST_FIRST_FLAG; break;
- case 'b':
- case 'B': modifier_list |= FILE_FLAG; break;
+ case 'b':
+ case 'B': modifier_list |= FILE_FLAG; break;
- case 'd':
- case 'D': modifier_list |= DIRECTORY_FLAG; break;
+ case 'd':
+ case 'D': modifier_list |= DIRECTORY_FLAG; break;
- case 'f':
- case 'F': modifier_list |= FILE_FLAG | SUFFIX_FLAG; break;
+ case 'f':
+ case 'F': modifier_list |= FILE_FLAG | SUFFIX_FLAG; break;
- case 'e':
- case 'E': modifier_list |= SUFFIX_FLAG; break;
+ case 'e':
+ case 'E': modifier_list |= SUFFIX_FLAG; break;
- case 'l':
- case 'L': modifier_list |= TOLOWER_FLAG; break;
+ case 'l':
+ case 'L': modifier_list |= TOLOWER_FLAG; break;
- case 'i':
- case 'I': modifier_list |= INFNAME_FLAG; break;
+ case 'i':
+ case 'I': modifier_list |= INFNAME_FLAG; break;
- case 'u':
- case 'U': modifier_list |= TOUPPER_FLAG; break;
+ case 'u':
+ case 'U': modifier_list |= TOUPPER_FLAG; break;
- case 'm':
- case 'M':
- if( modifier_list || ( (*s != edelim) && (*s != ':') ) ) {
+ case 'm':
+ case 'M':
+ if( modifier_list || ( (*s != edelim) && (*s != ':') ) ) {
Warning( "Map escape modifier must appear alone, ignored");
modifier_list = 0;
- }
- else {
+ }
+ else {
/* map the escape codes in the separator string first */
for(p=result; (p = strchr(p,ESCAPE_CHAR)) != NIL(char); p++)
- Map_esc( p );
- }
- /* find the end of the macro spec, or the start of a new
- * modifier list for further processing of the result */
+ Map_esc( p );
+ }
+ /* find the end of the macro spec, or the start of a new
+ * modifier list for further processing of the result */
- for( ; (*s != edelim) && (*s != ':') && *s; s++ );
- if( !*s )
- Fatal( "Syntax error in macro. [$%s].\n", start );
- if( *s == ':' ) s++;
- break;
+ for( ; (*s != edelim) && (*s != ':') && *s; s++ );
+ if( !*s )
+ Fatal( "Syntax error in macro. [$%s].\n", start );
+ if( *s == ':' ) s++;
+ break;
- case 'n':
- case 'N': modifier_list |= NORMPATH_FLAG; break;
+ case 'n':
+ case 'N': modifier_list |= NORMPATH_FLAG; break;
- case 'S':
- case 's':
- if( modifier_list ) {
+ case 'S':
+ case 's':
+ if( modifier_list ) {
Warning( "Edit modifier must appear alone, ignored");
modifier_list = 0;
- }
- else {
+ }
+ else {
separator = *s++;
for( p=s; *p != separator && *p; p++ );
if( !*p )
- Fatal( "Syntax error in subst macro. [$%s].\n", start );
+ Fatal( "Syntax error in subst macro. [$%s].\n", start );
else {
- char *t1, *t2;
- pat1 = DmSubStr( s, p );
- for(s=p=p+1; (*p != separator) && *p; p++ );
- /* Before the parsing fixes in iz36027 the :s macro modifier
- * erroneously worked with patterns with missing pattern
- * separator, i.e. $(XXX:s#pat#sub). This is an error because
- * it prohibits the use of following macro modifiers.
- * I.e. $(XXX:s#pat#sub:u) falsely replaces with "sub:u".
- * ??? Remove this special case once OOo compiles without
- * any of this warnings. */
- if( !*p ) {
- if( *(p-1) == edelim ) {
- p--;
- Warning( "Syntax error in subst macro. Bracket found, but third delimiter [%c] missing in [$%s].\n", separator, start );
- }
- else {
- Fatal( "Syntax error in subst macro. Third delimiter [%c] missing in [$%s].\n", separator, start );
+ char *t1, *t2;
+ pat1 = DmSubStr( s, p );
+ for(s=p=p+1; (*p != separator) && *p; p++ );
+ /* Before the parsing fixes in iz36027 the :s macro modifier
+ * erroneously worked with patterns with missing pattern
+ * separator, i.e. $(XXX:s#pat#sub). This is an error because
+ * it prohibits the use of following macro modifiers.
+ * I.e. $(XXX:s#pat#sub:u) falsely replaces with "sub:u".
+ * ??? Remove this special case once OOo compiles without
+ * any of this warnings. */
+ if( !*p ) {
+ if( *(p-1) == edelim ) {
+ p--;
+ Warning( "Syntax error in subst macro. Bracket found, but third delimiter [%c] missing in [$%s].\n", separator, start );
+ }
+ else {
+ Fatal( "Syntax error in subst macro. Third delimiter [%c] missing in [$%s].\n", separator, start );
+ }
}
- }
- pat2 = DmSubStr( s, p );
- t1 = Expand(pat1); FREE(pat1);
- t2 = Expand(pat2); FREE(pat2);
- result = Apply_edit( result, t1, t2, TRUE, FALSE );
- FREE( t1 );
- FREE( t2 );
+ pat2 = DmSubStr( s, p );
+ t1 = Expand(pat1); FREE(pat1);
+ t2 = Expand(pat2); FREE(pat2);
+ result = Apply_edit( result, t1, t2, TRUE, FALSE );
+ FREE( t1 );
+ FREE( t2 );
}
s = p;
- }
- /* find the end of the macro spec, or the start of a new
- * modifier list for further processing of the result */
-
- for( ; (*s != edelim) && (*s != ':') && *s; s++ );
- if( !*s )
- Fatal( "Syntax error in macro. [$%s].\n", start );
- if( *s == ':' ) s++;
- break;
-
- case 'T':
- case 't':
- case '^':
- case '+':
- if( modifier_list ) {
+ }
+ /* find the end of the macro spec, or the start of a new
+ * modifier list for further processing of the result */
+
+ for( ; (*s != edelim) && (*s != ':') && *s; s++ );
+ if( !*s )
+ Fatal( "Syntax error in macro. [$%s].\n", start );
+ if( *s == ':' ) s++;
+ break;
+
+ case 'T':
+ case 't':
+ case '^':
+ case '+':
+ if( modifier_list ) {
Warning( "Tokenize modifier must appear alone, ignored");
modifier_list = 0;
- }
- else {
+ }
+ else {
separator = *s++;
if( separator == '$' ) {
- p = _scan_ballanced_parens(s,'\0');
-
- if ( *p ) {
- char *tmp;
- pat1 = Expand(tmp = DmSubStr(s-1,p));
- FREE(tmp);
- result = Tokenize(result, pat1, switch_char, TRUE);
- FREE(pat1);
- }
- else {
- Warning( "Incomplete macro expression [%s]", s );
- }
- s = p;
+ p = _scan_ballanced_parens(s,'\0');
+
+ if ( *p ) {
+ char *tmp;
+ pat1 = Expand(tmp = DmSubStr(s-1,p));
+ FREE(tmp);
+ result = Tokenize(result, pat1, switch_char, TRUE);
+ FREE(pat1);
+ }
+ else {
+ Warning( "Incomplete macro expression [%s]", s );
+ }
+ s = p;
}
else if ( separator == '\"' ) {
- /* we change the semantics to allow $(v:t")") */
- for (p = s; *p && *p != separator; p++)
- if (*p == '\\')
- if (p[1] == '\\' || p[1] == '"')
- p++;
-
- if( *p == 0 )
- Fatal( "Unterminated separator string" );
- else {
- pat1 = DmSubStr( s, p );
- result = Tokenize( result, pat1, switch_char, TRUE);
- FREE( pat1 );
- }
- s = p;
+ /* we change the semantics to allow $(v:t")") */
+ for (p = s; *p && *p != separator; p++)
+ if (*p == '\\')
+ if (p[1] == '\\' || p[1] == '"')
+ p++;
+
+ if( *p == 0 )
+ Fatal( "Unterminated separator string" );
+ else {
+ pat1 = DmSubStr( s, p );
+ result = Tokenize( result, pat1, switch_char, TRUE);
+ FREE( pat1 );
+ }
+ s = p;
}
else {
Warning(
- "Separator must be a quoted string or macro expression");
+ "Separator must be a quoted string or macro expression");
}
/* find the end of the macro spec, or the start of a new
@@ -1035,26 +1035,26 @@ int doexpand; /* If TRUE enables macro expansion */
for( ; (*s != edelim) && (*s != ':'); s++ );
if( *s == ':' ) s++;
- }
- break;
+ }
+ break;
- case ':':
- if( modifier_list ) {
+ case ':':
+ if( modifier_list ) {
result = Apply_modifiers( modifier_list, result );
modifier_list = 0;
- }
- break;
+ }
+ break;
- default:
- Warning( "Illegal modifier in macro, ignored" );
- break;
- }
- }
+ default:
+ Warning( "Illegal modifier in macro, ignored" );
+ break;
+ }
+ }
- if( modifier_list ) /* apply modifier */
- result = Apply_modifiers( modifier_list, result );
+ if( modifier_list ) /* apply modifier */
+ result = Apply_modifiers( modifier_list, result );
- s++;
+ s++;
}
*ps = s;
@@ -1077,68 +1077,68 @@ char *s;
char **ps;
int *flag;
{
- char *t;
- char *start;
- char *res;
- int lev = 1;
- int done = 0;
-
- DB_ENTER( "_scan_brace" );
-
- start = s;
- while( !done )
- switch( *s++ ) {
- case '{':
- if( *s == '{' ) break; /* ignore {{ */
- lev++;
- break;
-
- case '}':
- if( *s == '}' ) break; /* ignore }} */
- if( lev )
- if( --lev == 0 ) done = TRUE;
- break;
-
- case '$':
- if( *s == '{' || *s == '}' ) {
- if( (t = strchr(s,'}')) != NIL(char) )
- s = t;
- s++;
- }
- break;
+ char *t;
+ char *start;
+ char *res;
+ int lev = 1;
+ int done = 0;
+
+ DB_ENTER( "_scan_brace" );
+
+ start = s;
+ while( !done )
+ switch( *s++ ) {
+ case '{':
+ if( *s == '{' ) break; /* ignore {{ */
+ lev++;
+ break;
+
+ case '}':
+ if( *s == '}' ) break; /* ignore }} */
+ if( lev )
+ if( --lev == 0 ) done = TRUE;
+ break;
+
+ case '$':
+ if( *s == '{' || *s == '}' ) {
+ if( (t = strchr(s,'}')) != NIL(char) )
+ s = t;
+ s++;
+ }
+ break;
- case '\0':
- if( lev ) {
- done = TRUE;
- s--;
- /* error malformed macro expansion */
- }
- break;
+ case '\0':
+ if( lev ) {
+ done = TRUE;
+ s--;
+ /* error malformed macro expansion */
}
+ break;
+ }
- start = DmSubStr( start, (lev) ? s : s-1 );
+ start = DmSubStr( start, (lev) ? s : s-1 );
- if( lev ) {
- /* Braces were not ballanced so just return the string.
- * Do not expand it. */
+ if( lev ) {
+ /* Braces were not ballanced so just return the string.
+ * Do not expand it. */
- res = DmStrJoin( "{", start, -1, FALSE );
- *flag = 0;
- }
- else {
- *flag = 1;
- res = Expand( start );
+ res = DmStrJoin( "{", start, -1, FALSE );
+ *flag = 0;
+ }
+ else {
+ *flag = 1;
+ res = Expand( start );
- if( (t = DmStrSpn( res, " \t" )) != res ) {
- size_t len = strlen(t)+1;
- memmove( res, t, len );
- }
- }
+ if( (t = DmStrSpn( res, " \t" )) != res ) {
+ size_t len = strlen(t)+1;
+ memmove( res, t, len );
+ }
+ }
- FREE( start ); /* this is ok! start is assigned a DmSubStr above */
- *ps = s;
+ FREE( start ); /* this is ok! start is assigned a DmSubStr above */
+ *ps = s;
- DB_RETURN( res );
+ DB_RETURN( res );
}
@@ -1155,31 +1155,31 @@ _cross_prod( x, y )/*
char *x;
char *y;
{
- static char *buf = NULL;
- static int buf_siz = 0;
- char *brkx;
- char *brky;
- char *cy;
- char *cx;
- char *res;
- int i;
-
- if( *x && *y ) {
- res = DmStrDup( "" ); cx = x;
- while( *cx ) {
- cy = y;
- brkx = DmStrPbrk( cx, " \t\n" );
- if( (brkx-cx == 2) && *cx == '\"' && *(cx+1) == '\"' ) cx = brkx;
-
- while( *cy ) {
+ static char *buf = NULL;
+ static int buf_siz = 0;
+ char *brkx;
+ char *brky;
+ char *cy;
+ char *cx;
+ char *res;
+ int i;
+
+ if( *x && *y ) {
+ res = DmStrDup( "" ); cx = x;
+ while( *cx ) {
+ cy = y;
+ brkx = DmStrPbrk( cx, " \t\n" );
+ if( (brkx-cx == 2) && *cx == '\"' && *(cx+1) == '\"' ) cx = brkx;
+
+ while( *cy ) {
brky = DmStrPbrk( cy, " \t\n" );
if( (brky-cy == 2) && *cy == '\"' && *(cy+1) == '\"' ) cy = brky;
i = brkx-cx + brky-cy + 2;
if( i > buf_siz ) { /* grow buf to the correct size */
- if( buf != NIL(char) ) FREE( buf );
- if( (buf = MALLOC( i, char )) == NIL(char)) No_ram();
- buf_siz = i;
+ if( buf != NIL(char) ) FREE( buf );
+ if( (buf = MALLOC( i, char )) == NIL(char)) No_ram();
+ buf_siz = i;
}
strncpy( buf, cx, (i = brkx-cx) );
@@ -1189,16 +1189,16 @@ char *y;
strcat( buf, " " );
res = DmStrJoin( res, buf, -1, TRUE );
cy = DmStrSpn( brky, " \t\n" );
- }
- cx = DmStrSpn( brkx, " \t\n" );
}
+ cx = DmStrSpn( brkx, " \t\n" );
+ }
- FREE( x );
- res[ strlen(res)-1 ] = '\0';
- }
- else
- res = DmStrJoin( x, y, -1, TRUE );
+ FREE( x );
+ res[ strlen(res)-1 ] = '\0';
+ }
+ else
+ res = DmStrJoin( x, y, -1, TRUE );
- FREE( y );
- return( res );
+ FREE( y );
+ return( res );
}
diff --git a/dmake/function.c b/dmake/function.c
index c0942db09213..cd86810849e5 100644
--- a/dmake/function.c
+++ b/dmake/function.c
@@ -465,45 +465,45 @@ static char *
_exec_uniq( args )
char *args;
{
- char *res = NIL(char);
- char *data = Expand(args);
- char **tokens;
- char **tokens_after;
- char *p;
- char *white = " \t\n";
- int j;
- int i;
- char *last = "";
- int k = 0;
-
- for(i=0,p=DmStrSpn(data,white);*p;p=DmStrSpn(DmStrPbrk(p,white),white),i++);
-
- if( i != 0 ) {
- TALLOC(tokens, i, char *);
- TALLOC(tokens_after, i, char *);
-
- for( i=0,p=DmStrSpn(data,white); *p; p=DmStrSpn(p,white),i++){
- tokens[i] = p;
- p = DmStrPbrk(p,white);
- if( *p ) *p++ = '\0';
- }
-
- qsort( tokens, i, sizeof(char *), _mystrcmp );
-
- for( j=0; j<i; j++ ) {
- if (strcmp(tokens[j], last) != 0) {
+ char *res = NIL(char);
+ char *data = Expand(args);
+ char **tokens;
+ char **tokens_after;
+ char *p;
+ char *white = " \t\n";
+ int j;
+ int i;
+ char *last = "";
+ int k = 0;
+
+ for(i=0,p=DmStrSpn(data,white);*p;p=DmStrSpn(DmStrPbrk(p,white),white),i++);
+
+ if( i != 0 ) {
+ TALLOC(tokens, i, char *);
+ TALLOC(tokens_after, i, char *);
+
+ for( i=0,p=DmStrSpn(data,white); *p; p=DmStrSpn(p,white),i++){
+ tokens[i] = p;
+ p = DmStrPbrk(p,white);
+ if( *p ) *p++ = '\0';
+ }
+
+ qsort( tokens, i, sizeof(char *), _mystrcmp );
+
+ for( j=0; j<i; j++ ) {
+ if (strcmp(tokens[j], last) != 0) {
tokens_after[k++] = tokens[j];
last = tokens[j];
- }
}
+ }
- for( j=0; j<k; j++ ) res = DmStrApp(res, tokens_after[j]);
- FREE(data);
- FREE(tokens);
- FREE(tokens_after);
- }
+ for( j=0; j<k; j++ ) res = DmStrApp(res, tokens_after[j]);
+ FREE(tokens);
+ FREE(tokens_after);
+ }
- return(res);
+ FREE(data);
+ return(res);
}
static int
diff --git a/dmake/infer.c b/dmake/infer.c
index e424b34fb201..02682bc16f19 100644
--- a/dmake/infer.c
+++ b/dmake/infer.c
@@ -66,157 +66,162 @@ Infer_recipe( cp, setdirroot )/*
CELLPTR cp;
CELLPTR setdirroot;
{
- ICELLPTR nomatch, match;
-
- DB_ENTER("Infer_recipe");
-
- if( cp->ce_attr & A_NOINFER ) {DB_VOID_RETURN;}
-
- DB_PRINT("inf", ("Inferring rule for [%s]", cp->CE_NAME));
-
- match = NIL(ICELL);
- nomatch = add_iset( NIL(ICELL), NIL(ICELL), NIL(CELL), NIL(DFALINK),
- setdirroot, Prep+count_dots(cp->CE_NAME), 0,
- DmStrDup(cp->CE_NAME), NIL(char),
- cp->ce_time != (time_t)0L);
-
- /* Make sure we try whole heartedly to infer at least one suffix */
- if( nomatch->ic_dmax == 0 ) ++nomatch->ic_dmax;
-
- DB_EXECUTE( "inf", _dump_iset("nomatch",nomatch); );
-
- /* If nomatch is non-empty there was no match with an existing
- * prerrequisite, try to derive one. */
- while( nomatch != NIL(ICELL) ) {
- ICELLPTR new_nomatch = NIL(ICELL);
- ICELLPTR ic, pmatch, mmatch;
- CELLPTR prereq;
-
- for( ic=nomatch; ic != NIL(ICELL); ic=ic->ic_next ) {
- int ipush = FALSE;
-
- if( ic->ic_dir ) ipush = Push_dir(ic->ic_dir, ic->ic_name, FALSE);
- match = union_iset(match, derive_prerequisites(ic, &new_nomatch));
- if( ipush ) Pop_dir(FALSE);
- }
-
- DB_EXECUTE( "inf", _dump_iset("match",match); );
- DB_EXECUTE( "inf", _dump_iset("nomatch",new_nomatch); );
-
- /* We have now deduced the two sets MATCH and NOMATCH. MATCH holds the
- * set of edges that we encountered that matched. If this set is empty
- * then we can apply transitive closure (if enabled) to the elements of
- * NOMATCH to see if we can find some other method to make the target.
- *
- * If MATCH is non-empty, we have found a method for making the target.
- * It is the shortest method for doing so (ie. uses fewest number of
- * steps). If MATCH contains more than one element then we have a
- * possible ambiguity.
- */
- if( match == NIL(ICELL) ) {
- nomatch = new_nomatch;
-
- /* Skip the rest and try one level deeper. */
- if( Transitive ) continue;
-
- goto all_done;
- }
-
- /* Ok, we have a set of possible matches in MATCH, we should check the
- * set for ambiguity. If more than one inference path exists of the
- * same depth, then we may issue an ambiguous inference error message.
- *
- * The message is suppressed if MATCH contains two elements and one of
- * them is the empty-prerequisite-rule. In this case we ignore the
- * ambiguity and take the rule that infers the prerequisite.
- *
- * Also if there are any chains that rely on a non-existant prerequisite
- * that may get made because it has a recipe then we prefer any that
- * rely on existing final prerequisites over those that we have to make.
- */
-
- /* Split out those that have to be made from those that end in
- * prerequisites that already exist. */
- pmatch = mmatch = NIL(ICELL);
- for(; match; match = ic ) {
- /* This loop checks all possible matches. */
- DB_PRINT("inf", ("Target [%s] : prerequisite [%s]",
- match->ic_meta->CE_NAME, match->ic_name));
-
- ic = match->ic_next;
- match->ic_next = NIL(ICELL);
-
- if( match->ic_exists )
+ ICELLPTR nomatch, match;
+
+ DB_ENTER("Infer_recipe");
+
+ if( cp->ce_attr & A_NOINFER ) {DB_VOID_RETURN;}
+
+ DB_PRINT("inf", ("Inferring rule for [%s]", cp->CE_NAME));
+
+ match = NIL(ICELL);
+ {
+ char *tmp;
+ nomatch = add_iset( NIL(ICELL), NIL(ICELL), NIL(CELL), NIL(DFALINK),
+ setdirroot, Prep+count_dots(cp->CE_NAME), 0,
+ tmp = DmStrDup(cp->CE_NAME), NIL(char),
+ cp->ce_time != (time_t)0L);
+ FREE(tmp);
+ }
+
+ /* Make sure we try whole heartedly to infer at least one suffix */
+ if( nomatch->ic_dmax == 0 ) ++nomatch->ic_dmax;
+
+ DB_EXECUTE( "inf", _dump_iset("nomatch",nomatch); );
+
+ /* If nomatch is non-empty there was no match with an existing
+ * prerrequisite, try to derive one. */
+ while( nomatch != NIL(ICELL) ) {
+ ICELLPTR new_nomatch = NIL(ICELL);
+ ICELLPTR ic, pmatch, mmatch;
+ CELLPTR prereq;
+
+ for( ic=nomatch; ic != NIL(ICELL); ic=ic->ic_next ) {
+ int ipush = FALSE;
+
+ if( ic->ic_dir ) ipush = Push_dir(ic->ic_dir, ic->ic_name, FALSE);
+ match = union_iset(match, derive_prerequisites(ic, &new_nomatch));
+ if( ipush ) Pop_dir(FALSE);
+ }
+
+ DB_EXECUTE( "inf", _dump_iset("match",match); );
+ DB_EXECUTE( "inf", _dump_iset("nomatch",new_nomatch); );
+
+ /* We have now deduced the two sets MATCH and NOMATCH. MATCH holds the
+ * set of edges that we encountered that matched. If this set is empty
+ * then we can apply transitive closure (if enabled) to the elements of
+ * NOMATCH to see if we can find some other method to make the target.
+ *
+ * If MATCH is non-empty, we have found a method for making the target.
+ * It is the shortest method for doing so (ie. uses fewest number of
+ * steps). If MATCH contains more than one element then we have a
+ * possible ambiguity.
+ */
+ if( match == NIL(ICELL) ) {
+ nomatch = new_nomatch;
+
+ /* Skip the rest and try one level deeper. */
+ if( Transitive ) continue;
+
+ goto all_done;
+ }
+
+ /* Ok, we have a set of possible matches in MATCH, we should check the
+ * set for ambiguity. If more than one inference path exists of the
+ * same depth, then we may issue an ambiguous inference error message.
+ *
+ * The message is suppressed if MATCH contains two elements and one of
+ * them is the empty-prerequisite-rule. In this case we ignore the
+ * ambiguity and take the rule that infers the prerequisite.
+ *
+ * Also if there are any chains that rely on a non-existant prerequisite
+ * that may get made because it has a recipe then we prefer any that
+ * rely on existing final prerequisites over those that we have to make.
+ */
+
+ /* Split out those that have to be made from those that end in
+ * prerequisites that already exist. */
+ pmatch = mmatch = NIL(ICELL);
+ for(; match; match = ic ) {
+ /* This loop checks all possible matches. */
+ DB_PRINT("inf", ("Target [%s] : prerequisite [%s]",
+ match->ic_meta->CE_NAME, match->ic_name));
+
+ ic = match->ic_next;
+ match->ic_next = NIL(ICELL);
+
+ if( match->ic_exists )
pmatch = union_iset(pmatch, match);
- else
+ else
mmatch = union_iset(mmatch, match);
- }
+ }
- /* Prefer %-targets with existing prerequisites. */
- if( pmatch )
- match = pmatch;
- else
- match = mmatch;
+ /* Prefer %-targets with existing prerequisites. */
+ if( pmatch )
+ match = pmatch;
+ else
+ match = mmatch;
- /* Make sure it is unique. It would be easy to check
- * match->ic_meta->ce_prq for existence and prefer no prerequisites
- * over prerequisites that are present, but we are currently not
- * doing it. */
- if( match->ic_next != NIL(ICELL) ) {
- int count = 1;
+ /* Make sure it is unique. It would be easy to check
+ * match->ic_meta->ce_prq for existence and prefer no prerequisites
+ * over prerequisites that are present, but we are currently not
+ * doing it. */
+ if( match->ic_next != NIL(ICELL) ) {
+ int count = 1;
- Warning( "Ambiguous inference chains for target '%s'", cp->CE_NAME );
- for( ic=match; ic; ic=ic->ic_next )
+ Warning( "Ambiguous inference chains for target '%s'", cp->CE_NAME );
+ for( ic=match; ic; ic=ic->ic_next )
(void) dump_inf_chain(ic, TRUE, count++);
- Warning( "First matching rule is chosen.");
- }
-
- /* MATCH now points at the derived prerequisite chain(s). We must now
- * take cp, and construct the correct graph so that the make may
- * proceed. */
-
- /* The folowing shows only the first element, i.e. the last matching
- * recipe that was found. */
- if( Verbose & V_INFER ) {
- char *tmp = dump_inf_chain(match, TRUE, FALSE);
- printf("%s: Inferring prerequistes and recipes using:\n%s: ... %s\n",
- Pname, Pname, tmp );
- FREE(tmp); }
+ Warning( "First matching rule is chosen.");
+ }
+
+ /* MATCH now points at the derived prerequisite chain(s). We must now
+ * take cp, and construct the correct graph so that the make may
+ * proceed. */
+
+ /* The folowing shows only the first element, i.e. the last matching
+ * recipe that was found. */
+ if( Verbose & V_INFER ) {
+ char *tmp = dump_inf_chain(match, TRUE, FALSE);
+ printf("%s: Inferring prerequistes and recipes using:\n%s: ... %s\n",
+ Pname, Pname, tmp );
+ FREE(tmp);
+ }
- pmatch = NIL(ICELL);
- prereq = NIL(CELL);
+ pmatch = NIL(ICELL);
+ prereq = NIL(CELL);
- /* This loop treats the inferred targets last to first. */
- while( match ) {
- CELLPTR infcell=NIL(CELL);
+ /* This loop treats the inferred targets last to first. */
+ while( match ) {
+ CELLPTR infcell=NIL(CELL);
- /* Compute the inferred prerequisite first. */
- if( match->ic_name ) {
+ /* Compute the inferred prerequisite first. */
+ if( match->ic_name ) {
if( match->ic_meta )
- infcell = Def_cell( match->ic_name );
+ infcell = Def_cell( match->ic_name );
else
- infcell = cp;
+ infcell = cp;
infcell->ce_flag |= F_TARGET;
if( infcell != cp ) {
- infcell->ce_flag |= F_INFER|F_REMOVE;
- DB_PRINT("remove", ("Mark for deletion [%s]",
- infcell->CE_NAME));
+ infcell->ce_flag |= F_INFER|F_REMOVE;
+ DB_PRINT("remove", ("Mark for deletion [%s]",
+ infcell->CE_NAME));
}
if( !match->ic_flag )
- infcell->ce_attr |= A_NOINFER;
- }
+ infcell->ce_attr |= A_NOINFER;
+ }
- /* Add global prerequisites from previous rule if there are any and
- * the recipe. */
- if( pmatch ) {
+ /* Add global prerequisites from previous rule if there are any and
+ * the recipe. */
+ if( pmatch ) {
CELLPTR imeta = pmatch->ic_meta;
LINKPTR lp;
DB_PRINT("inf", ("%%-target [%s] - infered target [%s]\n",
- imeta->CE_NAME, infcell->CE_NAME));
+ imeta->CE_NAME, infcell->CE_NAME));
infcell->ce_per = pmatch->ic_dfa->dl_per;
infcell->ce_attr |= (imeta->ce_attr & A_TRANSFER);
@@ -226,31 +231,31 @@ CELLPTR setdirroot;
* the this target it might have been created and stated
* therefore these values need to be reset. */
if( infcell->ce_attr & A_PHONY ){
- infcell->ce_time = 0L;
- infcell->ce_flag &= ~F_STAT;
+ infcell->ce_time = 0L;
+ infcell->ce_flag &= ~F_STAT;
}
if( !(infcell->ce_flag & F_RULES) ) {
- infcell->ce_flag |= (imeta->ce_flag&(F_SINGLE|F_GROUP))|F_RULES;
- infcell->ce_recipe = imeta->ce_recipe;
+ infcell->ce_flag |= (imeta->ce_flag&(F_SINGLE|F_GROUP))|F_RULES;
+ infcell->ce_recipe = imeta->ce_recipe;
}
/* Add any conditional macro definitions that may be associated
* with the inferred cell. */
if (imeta->ce_cond != NIL(STRING)) {
- STRINGPTR sp,last;
-
- last = infcell->ce_cond;
- for(sp=imeta->ce_cond; sp; sp=sp->st_next) {
- STRINGPTR new;
- TALLOC(new, 1, STRING);
- new->st_string = DmStrDup(sp->st_string);
- if(last)
- last->st_next = new;
- else
- infcell->ce_cond = new;
- last = new;
- }
+ STRINGPTR sp,last;
+
+ last = infcell->ce_cond;
+ for(sp=imeta->ce_cond; sp; sp=sp->st_next) {
+ STRINGPTR new;
+ TALLOC(new, 1, STRING);
+ new->st_string = DmStrDup(sp->st_string);
+ if(last)
+ last->st_next = new;
+ else
+ infcell->ce_cond = new;
+ last = new;
+ }
}
pmatch->ic_dfa->dl_per = NIL(char);
@@ -258,63 +263,63 @@ CELLPTR setdirroot;
/* If infcell already had a .SETDIR directory set then modify it
* based on whether it was the original cell or some intermediary. */
if( imeta->ce_dir ) {
- if( infcell->ce_dir && infcell == cp ) {
- /* cp->ce_dir was set and we have pushed the directory prior
- * to calling this routine.
- * We build a new path by appending imeta->ce_dir to the
- * current directory of the original cell.
- * We should therefore pop it and push the new concatenated
- * directory required by the inference.
- * This leaks memory as cp->ce_dir is not freed before
- * setting the new the new infcell->ce_dir value but as
- * the pointer could be a `A_POOL` member we accept this. */
- infcell->ce_dir = DmStrDup(Build_path(infcell->ce_dir,
- imeta->ce_dir));
- }
- else {
- /* Inherit a copy of the .SETDIR value. Use a copy because
- * the original could have been freed in the meantime
- * in Make() by the FREE() before _pool_lookup(). This can
- * also leak if infcell->ce_dir was set before. */
- infcell->ce_dir = DmStrDup(imeta->ce_dir);
- }
+ if( infcell->ce_dir && infcell == cp ) {
+ /* cp->ce_dir was set and we have pushed the directory prior
+ * to calling this routine.
+ * We build a new path by appending imeta->ce_dir to the
+ * current directory of the original cell.
+ * We should therefore pop it and push the new concatenated
+ * directory required by the inference.
+ * This leaks memory as cp->ce_dir is not freed before
+ * setting the new the new infcell->ce_dir value but as
+ * the pointer could be a `A_POOL` member we accept this. */
+ infcell->ce_dir = DmStrDup(Build_path(infcell->ce_dir,
+ imeta->ce_dir));
+ }
+ else {
+ /* Inherit a copy of the .SETDIR value. Use a copy because
+ * the original could have been freed in the meantime
+ * in Make() by the FREE() before _pool_lookup(). This can
+ * also leak if infcell->ce_dir was set before. */
+ infcell->ce_dir = DmStrDup(imeta->ce_dir);
+ }
}
for( lp=imeta->ce_indprq; lp != NIL(LINK); lp=lp->cl_next ) {
- char *name = lp->cl_prq->CE_NAME;
- CELLPTR tcp;
-
- name = buildname( cp->CE_NAME, name, infcell->ce_per );
- tcp = Def_cell( name );
- tcp->ce_flag |= F_REMOVE;
- Add_prerequisite( infcell, tcp, FALSE, FALSE );
-
- if( Verbose & V_INFER )
- printf( "%s: Inferred indirect prerequisite [%s]\n",
- Pname, name );
- FREE(name);
+ char *name = lp->cl_prq->CE_NAME;
+ CELLPTR tcp;
+
+ name = buildname( cp->CE_NAME, name, infcell->ce_per );
+ tcp = Def_cell( name );
+ tcp->ce_flag |= F_REMOVE;
+ Add_prerequisite( infcell, tcp, FALSE, FALSE );
+
+ if( Verbose & V_INFER )
+ printf( "%s: Inferred indirect prerequisite [%s]\n",
+ Pname, name );
+ FREE(name);
}
- }
+ }
- /* Add the previous cell as the prerequisite */
- if( prereq )
+ /* Add the previous cell as the prerequisite */
+ if( prereq )
(Add_prerequisite(infcell,prereq,FALSE,FALSE))->cl_flag |=F_TARGET;
- pmatch = match; /* Previous member in inference chain ... */
- prereq = infcell; /* is a prerequisite to the next match. */
- /* ip->ic_parent is the next target in the inference chain to be
- * build. If it is empty we are done. */
- match = match->ic_parent;
- }
+ pmatch = match; /* Previous member in inference chain ... */
+ prereq = infcell; /* is a prerequisite to the next match. */
+ /* ip->ic_parent is the next target in the inference chain to be
+ * build. If it is empty we are done. */
+ match = match->ic_parent;
+ }
- DB_PRINT("inf", ("Terminated due to a match"));
- break;
- }
+ DB_PRINT("inf", ("Terminated due to a match"));
+ break;
+ }
-all_done:
- free_icells();
+ all_done:
+ free_icells();
- DB_VOID_RETURN;
+ DB_VOID_RETURN;
}
diff --git a/dmake/parse.c b/dmake/parse.c
index 2344192b8541..550f14223a91 100644
--- a/dmake/parse.c
+++ b/dmake/parse.c
@@ -35,142 +35,142 @@ Parse( fil )/*
============== Parse the makefile input */
FILE *fil;
{
- int rule = FALSE; /* have seen a recipe line */
- char *p; /* termporary pointer into Buffer */
- char *pTmpBuf;
+ int rule = FALSE; /* have seen a recipe line */
+ char *p; /* termporary pointer into Buffer */
+ char *pTmpBuf;
- DB_ENTER( "Parse" );
+ DB_ENTER( "Parse" );
- State = NORMAL_SCAN;
- Group = FALSE; /* true if scanning a group rcpe */
- while( TRUE ) {
- if( Get_line( Buffer, fil ) ) {
- if( Group ) Fatal( "Incomplete rule recipe group detected" );
+ State = NORMAL_SCAN;
+ Group = FALSE; /* true if scanning a group rcpe */
+ while( TRUE ) {
+ if( Get_line( Buffer, fil ) ) {
+ if( Group ) Fatal( "Incomplete rule recipe group detected" );
- /* If we are still in RULE_SCAN mode there might be unbound recipes. */
- if( State == RULE_SCAN )
+ /* If we are still in RULE_SCAN mode there might be unbound recipes. */
+ if( State == RULE_SCAN )
Bind_rules_to_targets( F_DEFAULT );
- if( fil != NIL( FILE ) ) /* end of parsable input */
+ if( fil != NIL( FILE ) ) /* end of parsable input */
Closefile();
- DB_VOID_RETURN;
- }
- else {
+ DB_VOID_RETURN;
+ }
+ else {
#ifdef _MPW
- if ( Buffer[0] == 10 )
- pTmpBuf = Buffer+1;
- else
+ if ( Buffer[0] == 10 )
+ pTmpBuf = Buffer+1;
+ else
#endif
- pTmpBuf = Buffer;
+ pTmpBuf = Buffer;
#ifdef _MPW
- p = pTmpBuf;
- while ( *p )
- {
- if ( *p == 10 )
- *p = '\t';
- p++;
- }
+ p = pTmpBuf;
+ while ( *p )
+ {
+ if ( *p == 10 )
+ *p = '\t';
+ p++;
+ }
#endif
- switch( State ) {
- case RULE_SCAN:
+ switch( State ) {
+ case RULE_SCAN:
- /* Check for the `[' that starts off a group recipe definition.
- * It must appear as the first non-white space
- * character in the line. */
+ /* Check for the `[' that starts off a group recipe definition.
+ * It must appear as the first non-white space
+ * character in the line. */
- p = DmStrSpn( Buffer, " \t\r\n" );
- if( Set_group_attributes( p ) ) {
+ p = DmStrSpn( Buffer, " \t\r\n" );
+ if( Set_group_attributes( p ) ) {
if( Group )
- Fatal( "New group recipe begin found within group recipe." );
+ Fatal( "New group recipe begin found within group recipe." );
else if( rule )
- Fatal( "Cannot mix single and group recipe lines." );
+ Fatal( "Cannot mix single and group recipe lines." );
+ else
+ Group = TRUE;
+
+ rule = TRUE;
+
+ break; /* ignore the group start */
+ }
+
+ if( Group ) {
+ if( *p != ']' ) {
+ Add_recipe_to_list( pTmpBuf, TRUE, TRUE );
+ rule = TRUE;
+ }
else
- Group = TRUE;
-
- rule = TRUE;
-
- break; /* ignore the group start */
- }
-
- if( Group ) {
- if( *p != ']' ) {
- Add_recipe_to_list( pTmpBuf, TRUE, TRUE );
- rule = TRUE;
- }
- else
- State = NORMAL_SCAN;
- }
- else {
- if( *pTmpBuf == '\t'
- || (Notabs && *pTmpBuf == ' ') ) {
- Add_recipe_to_list( pTmpBuf, FALSE, FALSE );
- rule = TRUE;
- }
- else if( *p == ']' )
- Fatal( "Found unmatched ']'" );
- else if( *pTmpBuf ) /* Something that was no recipe. */
- State = NORMAL_SCAN;
+ State = NORMAL_SCAN;
+ }
+ else {
+ if( *pTmpBuf == '\t'
+ || (Notabs && *pTmpBuf == ' ') ) {
+ Add_recipe_to_list( pTmpBuf, FALSE, FALSE );
+ rule = TRUE;
+ }
+ else if( *p == ']' )
+ Fatal( "Found unmatched ']'" );
+ else if( *pTmpBuf ) /* Something that was no recipe. */
+ State = NORMAL_SCAN;
/* The only thing that was not handled was an empty line. */
- }
+ }
- if( State == RULE_SCAN ) break; /* ie. keep going */
+ if( State == RULE_SCAN ) break; /* ie. keep going */
- Bind_rules_to_targets( (Group) ? F_GROUP: F_DEFAULT );
+ Bind_rules_to_targets( (Group) ? F_GROUP: F_DEFAULT );
- rule = FALSE;
- if( Group ) {
- Group = FALSE;
- break;
- }
- /*FALLTRHOUGH*/
+ rule = FALSE;
+ if( Group ) {
+ Group = FALSE;
+ break;
+ }
+ /*FALLTRHOUGH*/
- /* In this case we broke out of the rule scan because we do not
- * have a recipe line that begins with a <TAB>, so lets
- * try to scan the thing as a macro or rule definition. */
+ /* In this case we broke out of the rule scan because we do not
+ * have a recipe line that begins with a <TAB>, so lets
+ * try to scan the thing as a macro or rule definition. */
- case NORMAL_SCAN:
- if( !*pTmpBuf ) continue; /* we have null input line */
+ case NORMAL_SCAN:
+ if( !*pTmpBuf ) continue; /* we have null input line */
- /* STUPID AUGMAKE uses "include" at the start of a line as
- * a signal to include a new file, so let's look for it.
- * if we see it replace it by .INCLUDE: and stick this back
- * into the buffer. */
- if( !strncmp( "include", pTmpBuf, 7 ) &&
- (pTmpBuf[7] == ' ' || pTmpBuf[7] == '\t') )
- {
- char *tmp;
+ /* STUPID AUGMAKE uses "include" at the start of a line as
+ * a signal to include a new file, so let's look for it.
+ * if we see it replace it by .INCLUDE: and stick this back
+ * into the buffer. */
+ if( !strncmp( "include", pTmpBuf, 7 ) &&
+ (pTmpBuf[7] == ' ' || pTmpBuf[7] == '\t') )
+ {
+ char *tmp;
- tmp = DmStrJoin( ".INCLUDE:", pTmpBuf+7, -1, FALSE );
- strcpy( pTmpBuf, tmp );
- FREE( tmp );
- }
+ tmp = DmStrJoin( ".INCLUDE:", pTmpBuf+7, -1, FALSE );
+ strcpy( pTmpBuf, tmp );
+ FREE( tmp );
+ }
- /* look for a macro definition, they all contain an = sign
- * if we fail to recognize it as a legal macro op then try to
- * parse the same line as a rule definition, it's one or the
- * other */
+ /* look for a macro definition, they all contain an = sign
+ * if we fail to recognize it as a legal macro op then try to
+ * parse the same line as a rule definition, it's one or the
+ * other */
- if( Parse_macro(pTmpBuf, M_DEFAULT) ) break;/* it's a macro def*/
- if( Parse_rule_def( &State ) ) break;/* it's a rule def */
+ if( Parse_macro(pTmpBuf, M_DEFAULT) ) break;/* it's a macro def*/
+ if( Parse_rule_def( &State ) ) break;/* it's a rule def */
- /* if it is an empty or blank line then ignore it */
- if( !*Buffer || *DmStrSpn( Buffer, " \t\r\n" ) == '\0' ) break;
+ /* if it is an empty or blank line then ignore it */
+ if( !*Buffer || *DmStrSpn( Buffer, " \t\r\n" ) == '\0' ) break;
- /* otherwise assume it was a line of unrecognized input, or a
- * recipe line out of place so print a message */
+ /* otherwise assume it was a line of unrecognized input, or a
+ * recipe line out of place so print a message */
- Fatal( "Expecting macro or rule defn, found neither" );
- break;
+ Fatal( "Expecting macro or rule defn, found neither" );
+ break;
- default:
- Fatal( "Internal -- UNKNOWN Parser state %d", State );
- }
+ default:
+ Fatal( "Internal -- UNKNOWN Parser state %d", State );
}
- }
+ }
+ }
}
diff --git a/dmake/rulparse.c b/dmake/rulparse.c
index af7915fb129b..f47f166ef7ae 100644
--- a/dmake/rulparse.c
+++ b/dmake/rulparse.c
@@ -75,72 +75,72 @@ Parse_rule_def( state )/*
*/
int *state;
{
- TKSTR input; /* input string struct for token search */
- CELLPTR targets; /* list of targets if any */
- CELLPTR prereq; /* list of prereq if any */
- CELLPTR prereqtail; /* tail of prerequisite list */
- CELLPTR cp; /* temporary cell pointer for list making */
- char *result; /* temporary storage for result */
- char *tok; /* temporary pointer for tokens */
- char *set_dir; /* value of setdir attribute */
- char *brk; /* break char list for Get_token */
- char *firstrcp; /* first recipe line, from ; in rule line */
- t_attr attr; /* sum of attribute flags for current tgts*/
- t_attr at; /* temp place to keep an attribute code */
- int op; /* rule operator */
- int special; /* indicate special targets in rule */
- int augmeta; /* indicate .<suffix> like target */
- int percent; /* indicate percent rule target */
- int percent_prq; /* indicate mixed %-rule prereq possible */
-
- DB_ENTER( "Parse_rule_def" );
-
- op = 0;
- attr = 0;
- special = 0;
- augmeta = 0;
- percent = 0;
- set_dir = NIL( char );
- targets = NIL(CELL);
- prereq = NIL(CELL);
- prereqtail = NIL(CELL);
- percent_prq = 0;
-
- /* Check to see if the line is of the form:
- * targets : prerequisites; first recipe line
- * If so remember the first_recipe part of the line. */
-
- firstrcp = strchr( Buffer, ';' );
- if( firstrcp != NIL( char ) ) {
- *firstrcp++ = 0;
- firstrcp = DmStrSpn( firstrcp, " \t" );
- }
-
- result = Expand( Buffer );
- /* Remove CONTINUATION_CHAR, keep the <nl> */
- for( brk=strchr(result,CONTINUATION_CHAR); brk != NIL(char); brk=strchr(brk,CONTINUATION_CHAR) )
- if( brk[1] == '\n' )
- *brk = ' ';
- else
- brk++;
-
- DB_PRINT( "par", ("Scanning: [%s]", result) );
-
- SET_TOKEN( &input, result );
- brk = ":-^!|";
- Def_targets = TRUE;
+ TKSTR input; /* input string struct for token search */
+ CELLPTR targets; /* list of targets if any */
+ CELLPTR prereq; /* list of prereq if any */
+ CELLPTR prereqtail; /* tail of prerequisite list */
+ CELLPTR cp; /* temporary cell pointer for list making */
+ char *result; /* temporary storage for result */
+ char *tok; /* temporary pointer for tokens */
+ char *set_dir; /* value of setdir attribute */
+ char *brk; /* break char list for Get_token */
+ char *firstrcp; /* first recipe line, from ; in rule line */
+ t_attr attr; /* sum of attribute flags for current tgts*/
+ t_attr at; /* temp place to keep an attribute code */
+ int op; /* rule operator */
+ int special; /* indicate special targets in rule */
+ int augmeta; /* indicate .<suffix> like target */
+ int percent; /* indicate percent rule target */
+ int percent_prq; /* indicate mixed %-rule prereq possible */
+
+ DB_ENTER( "Parse_rule_def" );
+
+ op = 0;
+ attr = 0;
+ special = 0;
+ augmeta = 0;
+ percent = 0;
+ set_dir = NIL( char );
+ targets = NIL(CELL);
+ prereq = NIL(CELL);
+ prereqtail = NIL(CELL);
+ percent_prq = 0;
+
+ /* Check to see if the line is of the form:
+ * targets : prerequisites; first recipe line
+ * If so remember the first_recipe part of the line. */
+
+ firstrcp = strchr( Buffer, ';' );
+ if( firstrcp != NIL( char ) ) {
+ *firstrcp++ = 0;
+ firstrcp = DmStrSpn( firstrcp, " \t" );
+ }
+
+ result = Expand( Buffer );
+ /* Remove CONTINUATION_CHAR, keep the <nl> */
+ for( brk=strchr(result,CONTINUATION_CHAR); brk != NIL(char); brk=strchr(brk,CONTINUATION_CHAR) )
+ if( brk[1] == '\n' )
+ *brk = ' ';
+ else
+ brk++;
+
+ DB_PRINT( "par", ("Scanning: [%s]", result) );
+
+ SET_TOKEN( &input, result );
+ brk = ":-^!|";
+ Def_targets = TRUE;
+
+ /* Scan the input rule line collecting targets, the operator, and any
+ * prerequisites. Stop when we run out of targets and prerequisites. */
+
+ while( *(tok = Get_token( &input, brk, TRUE )) != '\0' )
+ if( !op ) {
+ /* we are scanning targets and attributes
+ * check to see if token is an operator. */
+
+ op = Rule_op( tok );
- /* Scan the input rule line collecting targets, the operator, and any
- * prerequisites. Stop when we run out of targets and prerequisites. */
-
- while( *(tok = Get_token( &input, brk, TRUE )) != '\0' )
if( !op ) {
- /* we are scanning targets and attributes
- * check to see if token is an operator. */
-
- op = Rule_op( tok );
-
- if( !op ) {
/* Define a new cell, or get pointer to pre-existing cell. */
/* Do we need cells for attributes? If not move the definition
* to the target part. */
@@ -151,209 +151,209 @@ int *state;
DB_PRINT( "par", ("tg_cell [%s]", tok) );
if( (at = _is_attribute(tok)) != 0 ) {
- /* Ignore .SILENT when -vr is active. */
- if( (Verbose & V_FORCEECHO) && (at == A_SILENT) )
- at = 0;
+ /* Ignore .SILENT when -vr is active. */
+ if( (Verbose & V_FORCEECHO) && (at == A_SILENT) )
+ at = 0;
- /* Logically OR the attributes specified into one main
- * ATTRIBUTE mask. */
+ /* Logically OR the attributes specified into one main
+ * ATTRIBUTE mask. */
- if( at == A_SETDIR ) {
- if( set_dir != NIL( char ) )
- Warning( "Multiple .SETDIR attribute ignored" );
- else
- set_dir = DmStrDup( tok );
- }
+ if( at == A_SETDIR ) {
+ if( set_dir != NIL( char ) )
+ Warning( "Multiple .SETDIR attribute ignored" );
+ else
+ set_dir = DmStrDup( tok );
+ }
- attr |= at;
+ attr |= at;
}
else {
- /* Not an attribute, this must be a target. */
- int tmp;
-
- tmp = _is_special( tok );
-
- if( _is_percent( tok ) ) {
- /* First %-target checks if there were non-%-targets before. */
- if( !percent && targets != NIL(CELL) )
- Fatal( "A %%-target must not be mixed with non-%%-targets, offending target [%s]", tok );
-
- percent++;
- cp->ce_flag |= F_PERCENT;
- } else {
- if( percent )
- Fatal( "A non-%%-target must not be mixed with %%-targets, offending target [%s]", tok );
- }
-
- if( _is_magic( tok ) ) {
- /* Check that AUGMAKE targets are not mixed with other
- * targets. The return value of _is_magic() is discarded and
- * calculated again in _do_targets() if this rule definition
- * really is a .<suffix> like target.
- * If we would allow only one target per line we could easily
- * store the result for later, but for multiple .<suffix>
- * targets this creates too much overhead.
- * These targets should be rare (obsolete?) anyway. */
- if( !augmeta && targets != NIL(CELL) )
- Fatal( "An AUGMAKE meta target must not be mixed with non AUGMAKE meta targets, offending target [%s]", tok );
-
- augmeta++;
- cp->ce_flag |= F_MAGIC; /* do_magic will also add F_PERCENT later. */
- } else {
- if( augmeta )
- Fatal( "A non AUGMAKE meta target must not be mixed with AUGMAKE meta targets, offending target [%s]", tok );
- }
-
- if( special )
- Fatal( "Special target must appear alone, found [%s]", tok );
- else if( !(cp->ce_flag & F_MARK) ) {
- /* Targets are kept in this list in lexically sorted order.
- * This allows for easy equality comparison of target
- * sets.*/
- CELLPTR prev,cur;
- for(prev=NIL(CELL),cur=targets;cur;prev=cur,cur=cur->ce_link)
- if(strcmp(cur->CE_NAME,cp->CE_NAME) > 0)
- break;
-
- cp->ce_link = cur;
-
- if (!prev)
- targets = cp;
+ /* Not an attribute, this must be a target. */
+ int tmp;
+
+ tmp = _is_special( tok );
+
+ if( _is_percent( tok ) ) {
+ /* First %-target checks if there were non-%-targets before. */
+ if( !percent && targets != NIL(CELL) )
+ Fatal( "A %%-target must not be mixed with non-%%-targets, offending target [%s]", tok );
+
+ percent++;
+ cp->ce_flag |= F_PERCENT;
+ } else {
+ if( percent )
+ Fatal( "A non-%%-target must not be mixed with %%-targets, offending target [%s]", tok );
+ }
+
+ if( _is_magic( tok ) ) {
+ /* Check that AUGMAKE targets are not mixed with other
+ * targets. The return value of _is_magic() is discarded and
+ * calculated again in _do_targets() if this rule definition
+ * really is a .<suffix> like target.
+ * If we would allow only one target per line we could easily
+ * store the result for later, but for multiple .<suffix>
+ * targets this creates too much overhead.
+ * These targets should be rare (obsolete?) anyway. */
+ if( !augmeta && targets != NIL(CELL) )
+ Fatal( "An AUGMAKE meta target must not be mixed with non AUGMAKE meta targets, offending target [%s]", tok );
+
+ augmeta++;
+ cp->ce_flag |= F_MAGIC; /* do_magic will also add F_PERCENT later. */
+ } else {
+ if( augmeta )
+ Fatal( "A non AUGMAKE meta target must not be mixed with AUGMAKE meta targets, offending target [%s]", tok );
+ }
+
+ if( special )
+ Fatal( "Special target must appear alone, found [%s]", tok );
+ else if( !(cp->ce_flag & F_MARK) ) {
+ /* Targets are kept in this list in lexically sorted order.
+ * This allows for easy equality comparison of target
+ * sets.*/
+ CELLPTR prev,cur;
+ for(prev=NIL(CELL),cur=targets;cur;prev=cur,cur=cur->ce_link)
+ if(strcmp(cur->CE_NAME,cp->CE_NAME) > 0)
+ break;
+
+ cp->ce_link = cur;
+
+ if (!prev)
+ targets = cp;
+ else
+ prev->ce_link = cp;
+
+ cp->ce_flag |= F_MARK | F_EXPLICIT;
+ special = tmp;
+ }
else
- prev->ce_link = cp;
-
- cp->ce_flag |= F_MARK | F_EXPLICIT;
- special = tmp;
- }
- else
- Warning( "Duplicate target [%s]", cp->CE_NAME );
+ Warning( "Duplicate target [%s]", cp->CE_NAME );
}
- }
- else {
+ }
+ else {
/* found an operator so empty out break list and clear mark
* bits on target list, setting them all to F_VISITED*/
brk = "";
for( cp=targets; cp != NIL(CELL); cp=cp->ce_link ) {
- cp->ce_flag ^= F_MARK;
- cp->ce_flag |= F_VISITED;
+ cp->ce_flag ^= F_MARK;
+ cp->ce_flag |= F_VISITED;
}
Def_targets = FALSE;
- }
}
- else {
- /* Scanning prerequisites so build the prerequisite list. We use
- * F_MARK flag to make certain we have only a single copy of the
- * prerequisite in the list */
+ }
+ else {
+ /* Scanning prerequisites so build the prerequisite list. We use
+ * F_MARK flag to make certain we have only a single copy of the
+ * prerequisite in the list */
- cp = Def_cell( tok );
+ cp = Def_cell( tok );
- /* %-prerequisits require eiter a %-target or this might be a rule of
- * the "ATTRIBUTE_LIST : targets" form. */
- if( _is_percent( tok ) ) {
+ /* %-prerequisits require eiter a %-target or this might be a rule of
+ * the "ATTRIBUTE_LIST : targets" form. */
+ if( _is_percent( tok ) ) {
if( percent || ((targets == NIL(CELL)) && attr) )
- percent_prq = 1;
+ percent_prq = 1;
else
- Fatal( "Syntax error in %% rule, missing %% target");
- }
+ Fatal( "Syntax error in %% rule, missing %% target");
+ }
- if( cp->ce_flag & F_VISITED ) {
+ if( cp->ce_flag & F_VISITED ) {
if( cp->ce_attr & A_COMPOSITE )
- continue;
+ continue;
else
- Fatal( "Detected circular dependency in graph at [%s]",
- cp->CE_NAME );
- }
- else if( !(cp->ce_flag & F_MARK) ) {
+ Fatal( "Detected circular dependency in graph at [%s]",
+ cp->CE_NAME );
+ }
+ else if( !(cp->ce_flag & F_MARK) ) {
DB_PRINT( "par", ("pq_cell [%s]", tok) );
cp->ce_flag |= F_MARK;
if( prereqtail == NIL(CELL) ) /* keep prereq's in order */
- prereq = cp;
+ prereq = cp;
else
- prereqtail->ce_link = cp;
+ prereqtail->ce_link = cp;
prereqtail = cp;
cp->ce_link = NIL(CELL);
- }
- else if( !(cp->ce_attr & A_LIBRARY) && (Verbose & V_WARNALL))
- Warning("Duplicate entry [%s] in prerequisite list",cp->CE_NAME);
}
-
- /* Check to see if we have a percent rule that has only global
- * prerequisites, i.e. they are of the form: "%.a : foo".
- * If so then set the flag so that later on, we don't issue
- * an error if such targets supply an empty set of rules. */
-
- if( percent && !percent_prq && (prereq != NIL(CELL)) )
- _sv_globprq_only = 1;
-
- /* It's ok to have targets with attributes, and no prerequisites, but it's
- * not ok to have no targets and no attributes, or no operator */
-
- if( !op ) {
- CLEAR_TOKEN( &input );
- DB_PRINT( "par", ("Not a rule [%s]", Buffer) );
- DB_RETURN( 0 );
- }
-
- /* More than one percent target didn't work with prior versions. */
- if( (percent > 1) && !(op & R_OP_OR) )
- Warning( "Prior to dmake 4.5 only one\n"
- "%%-target per target-definition worked reliably. Check your makefiles.\n" );
-
- if( !attr && targets == NIL(CELL) ) {
- Fatal( "Missing targets or attributes in rule" );
- if( set_dir != NIL( char )) FREE( set_dir );
- DB_RETURN( 0 );
- }
-
- /* We have established we have a legal rules line, so we must process it.
- * In doing so we must handle any special targets. Special targets must
- * appear alone possibly accompanied by attributes.
- * NOTE: special != 0 ==> targets != NIL(CELL) */
-
- if( prereqtail != NIL(CELL) ) prereqtail->ce_link = NIL(CELL);
-
- /* Clear out MARK bits used in duplicate checking. I originally wanted
- * to do this as the lists get processed but that got too error prone
- * so I bit the bullit and added these two loops. */
-
- for( cp=prereq; cp != NIL(CELL); cp=cp->ce_link ) cp->ce_flag &= ~F_MARK;
- for( cp=targets; cp != NIL(CELL); cp=cp->ce_link ) cp->ce_flag &= ~F_VISITED;
-
- /* Check to see if the previous recipe was bound, if not the call
- * Bind_rules_to_targets() to bind the recipe (_sv_rules) to the
- * target(s) (_sv_targets). */
- /* was: if( _sv_rules != NIL(STRING) ) Bind_rules_to_targets( F_DEFAULT );*/
- /* Only Add_recipe_to_list() sets _sv_rules and Bind_rules_to_targets()
- * clears the (static) variables again. Bind_rules_to_targets() is
- * (should be) called after State is leaving RULE_SCAN in Parse().
- * Abort if there are unbound recipes. FIXME: Remove this paragraph
- * if this never occurs. */
- if( _sv_rules != NIL(STRING) )
- Fatal( "Internal Error: _sv_rules not empty." );
-
- /* Add the first recipe line to the list */
- if( firstrcp != NIL( char ) )
- Add_recipe_to_list( firstrcp, TRUE, FALSE );
-
- /* Save these prior to calling _do_targets, since _build_graph needs the
- * _sv_setdir value for matching edges. */
- _sv_op = op;
- _sv_setdir = set_dir;
-
- if( special )
- /* _do_special() can alter *state */
- _do_special( special, op, attr, set_dir, targets, prereq, state );
- else
- *state = _do_targets( op, attr, set_dir, targets, prereq );
-
- if( (*state != RULE_SCAN) && (_sv_rules != NIL(STRING)) )
- Fatal( "Unexpected recipe found." );
-
- DB_RETURN( 1 );
+ else if( !(cp->ce_attr & A_LIBRARY) && (Verbose & V_WARNALL))
+ Warning("Duplicate entry [%s] in prerequisite list",cp->CE_NAME);
+ }
+
+ /* Check to see if we have a percent rule that has only global
+ * prerequisites, i.e. they are of the form: "%.a : foo".
+ * If so then set the flag so that later on, we don't issue
+ * an error if such targets supply an empty set of rules. */
+
+ if( percent && !percent_prq && (prereq != NIL(CELL)) )
+ _sv_globprq_only = 1;
+
+ /* It's ok to have targets with attributes, and no prerequisites, but it's
+ * not ok to have no targets and no attributes, or no operator */
+
+ CLEAR_TOKEN( &input ); FREE(result); result = NIL(char);
+ if( !op ) {
+ DB_PRINT( "par", ("Not a rule [%s]", Buffer) );
+ DB_RETURN( 0 );
+ }
+
+ /* More than one percent target didn't work with prior versions. */
+ if( (percent > 1) && !(op & R_OP_OR) )
+ Warning( "Prior to dmake 4.5 only one\n"
+ "%%-target per target-definition worked reliably. Check your makefiles.\n" );
+
+ if( !attr && targets == NIL(CELL) ) {
+ Fatal( "Missing targets or attributes in rule" );
+ if( set_dir != NIL( char )) FREE( set_dir );
+ DB_RETURN( 0 );
+ }
+
+ /* We have established we have a legal rules line, so we must process it.
+ * In doing so we must handle any special targets. Special targets must
+ * appear alone possibly accompanied by attributes.
+ * NOTE: special != 0 ==> targets != NIL(CELL) */
+
+ if( prereqtail != NIL(CELL) ) prereqtail->ce_link = NIL(CELL);
+
+ /* Clear out MARK bits used in duplicate checking. I originally wanted
+ * to do this as the lists get processed but that got too error prone
+ * so I bit the bullit and added these two loops. */
+
+ for( cp=prereq; cp != NIL(CELL); cp=cp->ce_link ) cp->ce_flag &= ~F_MARK;
+ for( cp=targets; cp != NIL(CELL); cp=cp->ce_link ) cp->ce_flag &= ~F_VISITED;
+
+ /* Check to see if the previous recipe was bound, if not the call
+ * Bind_rules_to_targets() to bind the recipe (_sv_rules) to the
+ * target(s) (_sv_targets). */
+ /* was: if( _sv_rules != NIL(STRING) ) Bind_rules_to_targets( F_DEFAULT );*/
+ /* Only Add_recipe_to_list() sets _sv_rules and Bind_rules_to_targets()
+ * clears the (static) variables again. Bind_rules_to_targets() is
+ * (should be) called after State is leaving RULE_SCAN in Parse().
+ * Abort if there are unbound recipes. FIXME: Remove this paragraph
+ * if this never occurs. */
+ if( _sv_rules != NIL(STRING) )
+ Fatal( "Internal Error: _sv_rules not empty." );
+
+ /* Add the first recipe line to the list */
+ if( firstrcp != NIL( char ) )
+ Add_recipe_to_list( firstrcp, TRUE, FALSE );
+
+ /* Save these prior to calling _do_targets, since _build_graph needs the
+ * _sv_setdir value for matching edges. */
+ _sv_op = op;
+ _sv_setdir = set_dir;
+
+ if( special )
+ /* _do_special() can alter *state */
+ _do_special( special, op, attr, set_dir, targets, prereq, state );
+ else
+ *state = _do_targets( op, attr, set_dir, targets, prereq );
+
+ if( (*state != RULE_SCAN) && (_sv_rules != NIL(STRING)) )
+ Fatal( "Unexpected recipe found." );
+
+ DB_RETURN( 1 );
}
@@ -576,240 +576,239 @@ CELLPTR target;
CELLPTR prereq;
int *state;
{
- HASHPTR hp; /* pointer to macro def cell */
- CELLPTR cp; /* temporary pointer into cells list */
- CELLPTR dp; /* pointer to directory dir cell */
- LINKPTR lp; /* pointer at prerequisite list */
- char *dir; /* current dir to prepend */
- char *path; /* resulting path to try to read */
- char *name; /* File name for processing a .INCLUDE */
- char *tmp; /* temporary string pointer */
- FILE *fil; /* File descriptor returned by Openfile */
+ HASHPTR hp; /* pointer to macro def cell */
+ CELLPTR cp; /* temporary pointer into cells list */
+ CELLPTR dp; /* pointer to directory dir cell */
+ LINKPTR lp; /* pointer at prerequisite list */
+ char *dir; /* current dir to prepend */
+ char *path; /* resulting path to try to read */
+ char *name; /* File name for processing a .INCLUDE */
+ char *tmp; /* temporary string pointer */
+ FILE *fil; /* File descriptor returned by Openfile */
- DB_ENTER( "_do_special" );
+ DB_ENTER( "_do_special" );
- target->ce_flag = F_SPECIAL; /* mark the target as special */
+ target->ce_flag = F_SPECIAL; /* mark the target as special */
- switch( special ) {
- case ST_EXPORT:
- for( ; prereq != NIL(CELL); prereq = prereq->ce_link ) {
- DB_PRINT( "par", ("Exporting [%s]", prereq->CE_NAME) );
- hp = GET_MACRO( prereq->CE_NAME );
+ switch( special ) {
+ case ST_EXPORT:
+ for( ; prereq != NIL(CELL); prereq = prereq->ce_link ) {
+ DB_PRINT( "par", ("Exporting [%s]", prereq->CE_NAME) );
+ hp = GET_MACRO( prereq->CE_NAME );
- if( hp != NIL(HASH) ) {
- char *tmpstr = hp->ht_value;
+ if( hp != NIL(HASH) ) {
+ char *tmpstr = hp->ht_value;
- if( tmpstr == NIL(char) ) tmpstr = "";
+ if( tmpstr == NIL(char) ) tmpstr = "";
- if( Write_env_string( prereq->CE_NAME, tmpstr ) != 0 )
+ if( Write_env_string( prereq->CE_NAME, tmpstr ) != 0 )
Warning( "Could not export %s", prereq->CE_NAME );
- }
- }
- break;
+ }
+ }
+ break;
- /* Simply cause the parser to fail on the next input read */
- case ST_EXIT:
- Skip_to_eof = TRUE;
- break;
+ /* Simply cause the parser to fail on the next input read */
+ case ST_EXIT:
+ Skip_to_eof = TRUE;
+ break;
- case ST_IMPORT:
- for( ; prereq != NIL(CELL); prereq = prereq->ce_link ) {
- char *tmpstr;
+ case ST_IMPORT:
+ for( ; prereq != NIL(CELL); prereq = prereq->ce_link ) {
+ char *tmpstr;
- DB_PRINT( "par", ("Importing [%s]", prereq->CE_NAME) );
+ DB_PRINT( "par", ("Importing [%s]", prereq->CE_NAME) );
- if( strcmp(prereq->CE_NAME, ".EVERYTHING") == 0 ) {
- t_attr sattr = Glob_attr;
- Glob_attr |= A_SILENT;
+ if( strcmp(prereq->CE_NAME, ".EVERYTHING") == 0 ) {
+ t_attr sattr = Glob_attr;
+ Glob_attr |= A_SILENT;
- ReadEnvironment();
+ ReadEnvironment();
- Glob_attr = sattr;
- }
- else {
- tmpstr = Read_env_string( prereq->CE_NAME );
+ Glob_attr = sattr;
+ }
+ else {
+ tmpstr = Read_env_string( prereq->CE_NAME );
- if( tmpstr != NIL(char) )
+ if( tmpstr != NIL(char) )
Def_macro(prereq->CE_NAME, tmpstr, M_EXPANDED|M_LITERAL);
- else
+ else
if( !((Glob_attr | attr) & A_IGNORE) )
- Fatal("Imported macro `%s' not found",prereq->CE_NAME);
- }
- }
+ Fatal("Imported macro `%s' not found",prereq->CE_NAME);
+ }
+ }
- attr &= ~A_IGNORE;
- break;
+ attr &= ~A_IGNORE;
+ break;
- case ST_INCLUDE:
- {
- int pushed = FALSE;
- int first = (attr & A_FIRST);
- int ignore = (((Glob_attr | attr) & A_IGNORE) != 0);
- int found = FALSE;
- int noinf = (attr & A_NOINFER);
- LINKPTR prqlnk = NIL(LINK);
- LINKPTR prqlst = NIL(LINK);
+ case ST_INCLUDE:
+ {
+ int pushed = FALSE;
+ int first = (attr & A_FIRST);
+ int ignore = (((Glob_attr | attr) & A_IGNORE) != 0);
+ int found = FALSE;
+ int noinf = (attr & A_NOINFER);
+ LINKPTR prqlnk = NIL(LINK);
+ LINKPTR prqlst = NIL(LINK);
- if( prereq == NIL(CELL) ) Fatal( "No .INCLUDE file(s) specified" );
+ if( prereq == NIL(CELL) ) Fatal( "No .INCLUDE file(s) specified" );
- dp = Def_cell( ".INCLUDEDIRS" );
+ dp = Def_cell( ".INCLUDEDIRS" );
- if( (attr & A_SETDIR) && *(dir = strchr(set_dir, '=')+1) )
+ if( (attr & A_SETDIR) && *(dir = strchr(set_dir, '=')+1) )
pushed = Push_dir( dir, ".INCLUDE", ignore );
- for( cp=prereq; cp != NIL(CELL); cp = cp->ce_link ) {
+ for( cp=prereq; cp != NIL(CELL); cp = cp->ce_link ) {
LINKPTR ltmp;
TALLOC(ltmp, 1, LINK);
ltmp->cl_prq = cp;
if( prqlnk == NIL(LINK) )
- prqlst = ltmp;
+ prqlst = ltmp;
else
- prqlnk->cl_next = ltmp;
+ prqlnk->cl_next = ltmp;
prqlnk = ltmp;
- }
+ }
- for( ; prqlst != NIL(LINK); FREE(prqlst), prqlst=prqlnk ) {
+ for( ; prqlst != NIL(LINK); FREE(prqlst), prqlst=prqlnk ) {
prqlnk = prqlst->cl_next;
cp = prqlst->cl_prq;
name = cp->CE_NAME;
/* Leave this here, it ensures that prqlst gets propely free'd */
if ( first && found )
- continue;
+ continue;
if( *name == '<' ) {
- /* We have a file name enclosed in <....>
- * so get rid of the <> arround the file name */
+ /* We have a file name enclosed in <....>
+ * so get rid of the <> arround the file name */
- name++;
- if( (tmp = strrchr( name, '>' )) != NIL( char ) )
- *tmp = 0;
+ name++;
+ if( (tmp = strrchr( name, '>' )) != NIL( char ) )
+ *tmp = 0;
- if( If_root_path( name ) )
- fil = Openfile( name, FALSE, FALSE );
- else
- fil = NIL(FILE);
+ if( If_root_path( name ) )
+ fil = Openfile( name, FALSE, FALSE );
+ else
+ fil = NIL(FILE);
}
else
- fil = Openfile( name, FALSE, FALSE );
+ fil = Openfile( name, FALSE, FALSE );
if( fil == NIL(FILE) && !If_root_path( name ) ) { /*if true ==> not found in current dir*/
- /* Now we must scan the list of prerequisites for .INCLUDEDIRS
- * looking for the file in each of the specified directories.
- * if we don't find it then we issue an error. The error
- * message is suppressed if the .IGNORE attribute of attr is
- * set. If a file is found we call Parse on the file to
- * perform the parse and then continue on from where we left
- * off. */
+ /* Now we must scan the list of prerequisites for .INCLUDEDIRS
+ * looking for the file in each of the specified directories.
+ * if we don't find it then we issue an error. The error
+ * message is suppressed if the .IGNORE attribute of attr is
+ * set. If a file is found we call Parse on the file to
+ * perform the parse and then continue on from where we left
+ * off. */
- for(lp=dp->CE_PRQ; lp && fil == NIL(FILE); lp=lp->cl_next) {
- dir = lp->cl_prq->CE_NAME;
- if( strchr(dir, '$') ) dir = Expand(dir);
- path = Build_path( dir, name );
+ for(lp=dp->CE_PRQ; lp && fil == NIL(FILE); lp=lp->cl_next) {
+ dir = lp->cl_prq->CE_NAME;
+ if( strchr(dir, '$') ) dir = Expand(dir);
+ path = Build_path( dir, name );
- DB_PRINT( "par", ("Trying to include [%s]", path) );
+ DB_PRINT( "par", ("Trying to include [%s]", path) );
- fil = Openfile( path, FALSE, FALSE );
- if( dir != lp->cl_prq->CE_NAME ) FREE(dir);
- }
+ fil = Openfile( path, FALSE, FALSE );
+ if( dir != lp->cl_prq->CE_NAME ) FREE(dir);
+ }
}
if (!noinf && fil == NIL(FILE)) {
- t_attr glob = Glob_attr;
- t_attr cattr = prqlst->cl_prq->ce_attr;
+ t_attr glob = Glob_attr;
+ t_attr cattr = prqlst->cl_prq->ce_attr;
- prqlst->cl_next = NIL(LINK);
- Glob_attr |= (attr&A_IGNORE);
- prqlst->cl_prq->ce_attr &= ~A_FRINGE;
+ prqlst->cl_next = NIL(LINK);
+ Glob_attr |= (attr&A_IGNORE);
+ prqlst->cl_prq->ce_attr &= ~A_FRINGE;
- if( Verbose & V_FILE_IO )
- printf( "%s: Inferring include file [%s].\n",
- Pname, name );
- fil = TryFiles(prqlst);
+ if( Verbose & V_FILE_IO )
+ printf( "%s: Inferring include file [%s].\n",
+ Pname, name );
+ fil = TryFiles(prqlst);
- Glob_attr = glob;
- prqlst->cl_prq->ce_attr |= (cattr & A_FRINGE);
+ Glob_attr = glob;
+ prqlst->cl_prq->ce_attr |= (cattr & A_FRINGE);
}
if( fil != NIL(FILE) ) {
- if( Verbose & V_FILE_IO )
- printf( "%s: Parsing include file [%s].\n",
- Pname, name );
- Parse( fil );
- found = TRUE;
+ if( Verbose & V_FILE_IO )
+ printf( "%s: Parsing include file [%s].\n",
+ Pname, name );
+ Parse( fil );
+ found = TRUE;
}
else if( !(ignore || first) )
- Fatal( "Include file %s, not found", name );
+ Fatal( "Include file %s, not found", name );
else if( Verbose & V_FILE_IO )
- printf( "%s: Include file [%s] was not found.\n",
- Pname, name );
- }
+ printf( "%s: Include file [%s] was not found.\n",
+ Pname, name );
+ }
- if ( !ignore && first && !found )
+ if ( !ignore && first && !found )
Fatal( "No include file was found" );
- if( pushed ) Pop_dir(FALSE);
- attr &= ~(A_IGNORE|A_SETDIR|A_FIRST|A_NOINFER);
- }
- break;
+ if( pushed ) Pop_dir(FALSE);
+ attr &= ~(A_IGNORE|A_SETDIR|A_FIRST|A_NOINFER);
+ }
+ break;
+
+ case ST_SOURCE:
+ if( prereq != NIL(CELL) )
+ _do_targets( op & (R_OP_CL | R_OP_MI | R_OP_UP), attr, set_dir,
+ target, prereq );
+ else {
+ /* The old semantics of .SOURCE were that an empty list of
+ * prerequisites clears the .SOURCE list. So we must implement
+ * that here as a clearout prerequisite operation. Since this is
+ * a standard operation with the :- opcode we can simply call the
+ * proper routine with the target cell and it should do the trick
+ */
- case ST_SOURCE:
- if( prereq != NIL(CELL) )
- _do_targets( op & (R_OP_CL | R_OP_MI | R_OP_UP), attr, set_dir,
- target, prereq );
- else {
- /* The old semantics of .SOURCE were that an empty list of
- * prerequisites clears the .SOURCE list. So we must implement
- * that here as a clearout prerequisite operation. Since this is
- * a standard operation with the :- opcode we can simply call the
- * proper routine with the target cell and it should do the trick
- */
+ if( op == R_OP_CL || (op & R_OP_MI) )
+ Clear_prerequisites( target );
+ }
- if( op == R_OP_CL || (op & R_OP_MI) )
- Clear_prerequisites( target );
- }
+ op &= ~(R_OP_MI | R_OP_UP);
+ break;
- op &= ~(R_OP_MI | R_OP_UP);
- break;
-
- case ST_KEEP:
- if( Keep_state != NIL(char) ) break;
- Def_macro( ".KEEP_STATE", "_state.mk", M_EXPANDED );
- break;
+ case ST_KEEP:
+ if( Keep_state != NIL(char) ) break;
+ Def_macro( ".KEEP_STATE", "_state.mk", M_EXPANDED );
+ break;
- case ST_REST:
- /* The rest of the special targets can all take recipes, as such they
- * must be able to affect the state of the parser. */
+ case ST_REST:
+ /* The rest of the special targets can all take recipes, as such they
+ * must be able to affect the state of the parser. */
- {
- int s_targ = Target;
+ {
+ int s_targ = Target;
- Target = TRUE;
- _sp_target = TRUE;
- *state = _do_targets( op, attr, set_dir, target, prereq );
- Target = s_targ;
+ Target = TRUE;
+ _sp_target = TRUE;
+ *state = _do_targets( op, attr, set_dir, target, prereq );
+ Target = s_targ;
- target->ce_flag |= F_TARGET;
+ target->ce_flag |= F_TARGET;
- attr = A_DEFAULT;
- op = R_OP_CL;
- }
- break;
+ attr = A_DEFAULT;
+ op = R_OP_CL;
+ }
+ break;
- default:break;
- }
+ default:break;
+ }
- if( op != R_OP_CL ) Warning( "Modifier(s) for operator ignored" );
- if( attr != A_DEFAULT ) Warning( "Extra attributes ignored" );
+ if( op != R_OP_CL ) Warning( "Modifier(s) for operator ignored" );
+ if( attr != A_DEFAULT ) Warning( "Extra attributes ignored" );
- DB_VOID_RETURN;
+ DB_VOID_RETURN;
}
-
static int
_do_targets( op, attr, set_dir, targets, prereq )/*
===================================================
diff --git a/dmake/sysintf.c b/dmake/sysintf.c
index d7b482a3e405..65104114923f 100644
--- a/dmake/sysintf.c
+++ b/dmake/sysintf.c
@@ -420,7 +420,6 @@ char *ename;
}
-
/*
** Set the value of the environment string ename to value.
** Returns 0 if success, non-zero if failure
@@ -430,16 +429,23 @@ Write_env_string(ename, value)
char *ename;
char *value;
{
- char* p;
- char* envstr = DmStrAdd(ename, value, FALSE);
+#if defined(HAVE_SETENV)
- p = envstr+strlen(ename); /* Don't change this code, DmStrAdd does not */
- *p++ = '='; /* add the space if *value is 0, it does */
- if( !*value ) *p = '\0'; /* allocate enough memory for one though. */
+ return( setenv(ename, value, 1) );
- return( putenv(envstr) );
-}
+#else /* !HAVE_SETENV */
+
+ char* p;
+ char* envstr = DmStrAdd(ename, value, FALSE);
+ p = envstr+strlen(ename); /* Don't change this code, DmStrAdd does not */
+ *p++ = '='; /* add the space if *value is 0, it does */
+ if( !*value ) *p = '\0'; /* allocate enough memory for one though. */
+
+ return( putenv(envstr) ); /* Possibly leaking 'envstr' */
+
+#endif /* !HAVE_SETENV */
+}
PUBLIC void
diff --git a/dmake/unix/runargv.c b/dmake/unix/runargv.c
index 4be342bbb273..e8e39d21bd3d 100644
--- a/dmake/unix/runargv.c
+++ b/dmake/unix/runargv.c
@@ -878,41 +878,36 @@ int wfc;
/* Never change MAXPROCESS after _procs is allocated. */
if( _procs_size != Max_proc ) {
- /* If procs was never initialize this is OK, do it now. */
- if( _procs == NIL(PR) ) {
- _procs_size = Max_proc;
- TALLOC( _procs, Max_proc, PR );
+ /* If procs was never initialize this is OK, do it now. */
+ if( _procs == NIL(PR) ) {
+ _procs_size = Max_proc;
+ TALLOC( _procs, Max_proc, PR );
#if defined(USE_CREATEPROCESS)
- TALLOC( _wpList, Max_proc, HANDLE );
+ TALLOC( _wpList, Max_proc, HANDLE );
- /* Signed int values are cast to DMHANDLE in various places, use this
- * sanity check to verify that DMHANDLE is large enough. */
- if( sizeof(int) > sizeof(DMHANDLE) )
- Fatal( "Internal Error: Check type of DMHANDLE!" );
+ /* Signed int values are cast to DMHANDLE in various places, use this
+ * sanity check to verify that DMHANDLE is large enough. */
+ if( sizeof(int) > sizeof(DMHANDLE) )
+ Fatal( "Internal Error: Check type of DMHANDLE!" );
#endif
- }
- else {
- Fatal( "MAXPROCESS changed from `%d' to `%d' after a command was executed!", _procs_size, Max_proc );
- }
+ }
+ else {
+ Fatal( "MAXPROCESS changed from `%d' to `%d' after a command was executed!", _procs_size, Max_proc );
+ }
}
if( Measure & M_RECIPE )
Do_profile_output( "s", M_RECIPE, target );
- /* If _use_i!=-1 then this function is called by _finished_child()
- * ( through runargv() ). */
+ /* If _use_i ! =-1 then this function is called by _finished_child() ( through runargv() ),
+ and we re-use the process queue number given by _use_i. */
if( (i = _use_i) == -1 ) {
- for( i=0; i<Max_proc; i++ )
- if( !_procs[i].pr_valid )
- break;
- }
- else {
- /* Re-use the process queue number given by _use_i.
- * Free the pointer before using it again below. */
- FREE( _procs[i].pr_dir );
+ for( i=0; i<Max_proc; i++ )
+ if( !_procs[i].pr_valid )
+ break;
}
- pp = _procs+i;
+ pp = &(_procs[i]);
pp->pr_valid = 1;
pp->pr_pid = pid.pid;
@@ -921,7 +916,9 @@ int wfc;
pp->pr_ignore = ignore;
pp->pr_last = last;
pp->pr_wfc = wfc;
- /* Freed above and after the last recipe in _finished child(). */
+
+ if( pp->pr_dir != NIL(char) )
+ FREE(pp->pr_dir);
pp->pr_dir = DmStrDup(Get_current_dir());
Current_target = NIL(CELL);
@@ -953,80 +950,80 @@ _finished_child(cid, status)/*
DMHANDLE cid;
int status;
{
- register int i;
- char *dir;
-
- if((int)cid < 1) { /* Force int. */
- /* internal command */
- i = -((int)cid);
- }
- else {
- for( i=0; i<Max_proc; i++ )
- if( _procs[i].pr_valid && _procs[i].pr_pid == cid )
+ register int i;
+ char *dir;
+
+ if((int)cid < 1) { /* Force int. */
+ /* internal command */
+ i = -((int)cid);
+ }
+ else {
+ for( i=0; i<Max_proc; i++ )
+ if( _procs[i].pr_valid && _procs[i].pr_pid == cid )
break;
- /* Some children we didn't make esp true if using /bin/sh to execute a
- * a pipe and feed the output as a makefile into dmake. */
- if( i == Max_proc ) {
- Warning("Internal Warning: finished pid %d is not in pq!?", cid);
- return;
- }
- }
+ /* Some children we didn't make esp true if using /bin/sh to execute a
+ * a pipe and feed the output as a makefile into dmake. */
+ if( i == Max_proc ) {
+ Warning("Internal Warning: finished pid %d is not in pq!?", cid);
+ return;
+ }
+ }
- /* Not a running process anymore, the next runargv() will not use
- * _attach_cmd(). */
- _procs[i].pr_valid = 0;
+ /* Not a running process anymore, the next runargv() will not use
+ * _attach_cmd(). */
+ _procs[i].pr_valid = 0;
- if( Measure & M_RECIPE )
- Do_profile_output( "e", M_RECIPE, _procs[i].pr_target );
+ if( Measure & M_RECIPE )
+ Do_profile_output( "e", M_RECIPE, _procs[i].pr_target );
- _proc_cnt--;
- dir = DmStrDup(Get_current_dir());
- Set_dir( _procs[i].pr_dir );
+ _proc_cnt--;
+ dir = DmStrDup(Get_current_dir());
+ Set_dir( _procs[i].pr_dir );
- if( _procs[i].pr_recipe != NIL(RCP) && !_abort_flg ) {
- RCPPTR rp = _procs[i].pr_recipe;
+ if( _procs[i].pr_recipe != NIL(RCP) && !_abort_flg ) {
+ RCPPTR rp = _procs[i].pr_recipe;
- Current_target = _procs[i].pr_target;
- Handle_result( status, _procs[i].pr_ignore, FALSE, _procs[i].pr_target );
- Current_target = NIL(CELL);
+ Current_target = _procs[i].pr_target;
+ Handle_result( status, _procs[i].pr_ignore, FALSE, _procs[i].pr_target );
+ Current_target = NIL(CELL);
- if ( _procs[i].pr_target->ce_attr & A_ERROR ) {
- _procs[i].pr_last = TRUE;
- goto ABORT_REMAINDER_OF_RECIPE;
- }
+ if ( _procs[i].pr_target->ce_attr & A_ERROR ) {
+ _procs[i].pr_last = TRUE;
+ goto ABORT_REMAINDER_OF_RECIPE;
+ }
- _procs[i].pr_recipe = rp->prp_next;
+ _procs[i].pr_recipe = rp->prp_next;
- _use_i = i;
- /* Run next recipe line. The rp->prp_attr propagates a possible
- * wfc condition. */
- runargv( _procs[i].pr_target, rp->prp_group,
- rp->prp_last, rp->prp_attr, &rp->prp_cmd );
- _use_i = -1;
+ _use_i = i;
+ /* Run next recipe line. The rp->prp_attr propagates a possible
+ * wfc condition. */
+ runargv( _procs[i].pr_target, rp->prp_group,
+ rp->prp_last, rp->prp_attr, &rp->prp_cmd );
+ _use_i = -1;
- FREE( rp->prp_cmd );
- FREE( rp );
+ FREE( rp->prp_cmd );
+ FREE( rp );
- /* If all process queues are used wait for the next process to
- * finish. Is this really needed here? */
- if( _proc_cnt == Max_proc ) {
- Wait_for_child( FALSE, -1 );
- }
- }
- else {
- /* empty the queue on abort. */
- if( _abort_flg )
- _procs[i].pr_recipe = NIL(RCP);
+ /* If all process queues are used wait for the next process to
+ * finish. Is this really needed here? */
+ if( _proc_cnt == Max_proc ) {
+ Wait_for_child( FALSE, -1 );
+ }
+ }
+ else {
+ /* empty the queue on abort. */
+ if( _abort_flg )
+ _procs[i].pr_recipe = NIL(RCP);
- Handle_result(status,_procs[i].pr_ignore,_abort_flg,_procs[i].pr_target);
+ Handle_result(status,_procs[i].pr_ignore,_abort_flg,_procs[i].pr_target);
- ABORT_REMAINDER_OF_RECIPE:
- if( _procs[i].pr_last ) {
- FREE(_procs[i].pr_dir ); /* Set in _add_child() */
+ ABORT_REMAINDER_OF_RECIPE:
+ if( _procs[i].pr_last ) {
+ FREE(_procs[i].pr_dir ); _procs[i].pr_dir = NIL(char); /* Set in _add_child() */
- if( !Doing_bang ) {
+ if( !Doing_bang ) {
/* Update_time_stamp() triggers the deletion of intermediate
* targets. This starts a new process queue, so we have to
* clear the _use_i variable. */
@@ -1035,12 +1032,12 @@ int status;
_use_i = -1;
Update_time_stamp( _procs[i].pr_target );
_use_i = my_use_i;
- }
}
- }
+ }
+ }
- Set_dir(dir);
- FREE(dir);
+ Set_dir(dir);
+ FREE(dir);
}
diff --git a/drawinglayer/inc/drawinglayer/attribute/fontattribute.hxx b/drawinglayer/inc/drawinglayer/attribute/fontattribute.hxx
index 6dffd80b332e..da7aedc6f983 100644
--- a/drawinglayer/inc/drawinglayer/attribute/fontattribute.hxx
+++ b/drawinglayer/inc/drawinglayer/attribute/fontattribute.hxx
@@ -65,6 +65,7 @@ namespace drawinglayer
bool bSymbol = false,
bool bVertical = false,
bool bItalic = false,
+ bool bMonospaced = false,
bool bOutline = false,
bool bRTL = false,
bool bBiDiStrong = false);
@@ -89,6 +90,7 @@ namespace drawinglayer
bool getOutline() const;
bool getRTL() const;
bool getBiDiStrong() const;
+ bool getMonospaced() const;
};
} // end of namespace attribute
} // end of namespace drawinglayer
diff --git a/drawinglayer/source/attribute/fontattribute.cxx b/drawinglayer/source/attribute/fontattribute.cxx
index 7d10d3a37384..d4246376d9ca 100644
--- a/drawinglayer/source/attribute/fontattribute.cxx
+++ b/drawinglayer/source/attribute/fontattribute.cxx
@@ -55,6 +55,7 @@ namespace drawinglayer
unsigned mbOutline : 1; // Outline Flag
unsigned mbRTL : 1; // RTL Flag
unsigned mbBiDiStrong : 1; // BiDi Flag
+ unsigned mbMonospaced : 1;
ImpFontAttribute(
const String& rFamilyName,
@@ -63,6 +64,7 @@ namespace drawinglayer
bool bSymbol,
bool bVertical,
bool bItalic,
+ bool bMonospaced,
bool bOutline,
bool bRTL,
bool bBiDiStrong)
@@ -75,7 +77,8 @@ namespace drawinglayer
mbItalic(bItalic),
mbOutline(bOutline),
mbRTL(bRTL),
- mbBiDiStrong(bBiDiStrong)
+ mbBiDiStrong(bBiDiStrong),
+ mbMonospaced(bMonospaced)
{
}
@@ -89,6 +92,7 @@ namespace drawinglayer
bool getOutline() const { return mbOutline; }
bool getRTL() const { return mbRTL; }
bool getBiDiStrong() const { return mbBiDiStrong; }
+ bool getMonospaced() const { return mbMonospaced; }
bool operator==(const ImpFontAttribute& rCompare) const
{
@@ -100,7 +104,8 @@ namespace drawinglayer
&& getItalic() == rCompare.getItalic()
&& getOutline() == rCompare.getOutline()
&& getRTL() == rCompare.getRTL()
- && getBiDiStrong() == rCompare.getBiDiStrong());
+ && getBiDiStrong() == rCompare.getBiDiStrong()
+ && getMonospaced() == rCompare.getMonospaced());
}
static ImpFontAttribute* get_global_default()
@@ -112,7 +117,7 @@ namespace drawinglayer
pDefault = new ImpFontAttribute(
String(), String(),
0,
- false, false, false, false, false, false);
+ false, false, false, false, false, false, false);
// never delete; start with RefCount 1, not 0
pDefault->mnRefCount++;
@@ -129,11 +134,12 @@ namespace drawinglayer
bool bSymbol,
bool bVertical,
bool bItalic,
+ bool bMonospaced,
bool bOutline,
bool bRTL,
bool bBiDiStrong)
: mpFontAttribute(new ImpFontAttribute(
- rFamilyName, rStyleName, nWeight, bSymbol, bVertical, bItalic, bOutline, bRTL, bBiDiStrong))
+ rFamilyName, rStyleName, nWeight, bSymbol, bVertical, bItalic, bMonospaced, bOutline, bRTL, bBiDiStrong))
{
}
@@ -246,6 +252,12 @@ namespace drawinglayer
return mpFontAttribute->getBiDiStrong();
}
+ bool FontAttribute::getMonospaced() const
+ {
+ return mpFontAttribute->getMonospaced();
+ }
+
+
} // end of namespace attribute
} // end of namespace drawinglayer
diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index c9774bea3f34..9aafd195a707 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -406,6 +406,7 @@ namespace drawinglayer
aRetval.SetWeight(static_cast<FontWeight>(rFontAttribute.getWeight()));
aRetval.SetItalic(rFontAttribute.getItalic() ? ITALIC_NORMAL : ITALIC_NONE);
aRetval.SetOutline(rFontAttribute.getOutline());
+ aRetval.SetPitch(rFontAttribute.getMonospaced() ? PITCH_FIXED : PITCH_VARIABLE);
aRetval.SetLanguage(MsLangId::convertLocaleToLanguage(rLocale));
#ifdef WIN32
@@ -445,6 +446,7 @@ namespace drawinglayer
RTL_TEXTENCODING_SYMBOL == rFont.GetCharSet(),
rFont.IsVertical(),
ITALIC_NONE != rFont.GetItalic(),
+ PITCH_FIXED == rFont.GetPitch(),
rFont.IsOutline(),
bRTL,
bBiDiStrong);
diff --git a/drawinglayer/source/processor2d/canvasprocessor.cxx b/drawinglayer/source/processor2d/canvasprocessor.cxx
index e20f1a417dcc..23661fe3747b 100644
--- a/drawinglayer/source/processor2d/canvasprocessor.cxx
+++ b/drawinglayer/source/processor2d/canvasprocessor.cxx
@@ -57,6 +57,7 @@
#include <basegfx/tuple/b2i64tuple.hxx>
#include <basegfx/range/b2irange.hxx>
#include <com/sun/star/rendering/XIntegerReadOnlyBitmap.hpp>
+#include <com/sun/star/rendering/PanoseProportion.hpp>
#include <com/sun/star/rendering/CompositeOperation.hpp>
#include <com/sun/star/rendering/StrokeAttributes.hpp>
#include <com/sun/star/rendering/PathJoinType.hpp>
@@ -1517,6 +1518,10 @@ namespace drawinglayer
aFontRequest.FontDescription.IsVertical = rFontAttr.getVertical() ? util::TriState_YES : util::TriState_NO;
// TODO(F2): improve vclenum->panose conversion
aFontRequest.FontDescription.FontDescription.Weight = static_cast< sal_uInt8 >(rFontAttr.getWeight());
+ aFontRequest.FontDescription.FontDescription.Proportion =
+ rFontAttr.getMonospaced()
+ ? rendering::PanoseProportion::MONO_SPACED
+ : rendering::PanoseProportion::ANYTHING;
aFontRequest.FontDescription.FontDescription.Letterform = rFontAttr.getItalic() ? 9 : 0;
// init CellSize to 1.0, else a default font height will be used
diff --git a/dtrans/source/win32/dtobj/XTDataObject.cxx b/dtrans/source/win32/dtobj/XTDataObject.cxx
index e17a931d7380..8b86048cd330 100644
--- a/dtrans/source/win32/dtobj/XTDataObject.cxx
+++ b/dtrans/source/win32/dtobj/XTDataObject.cxx
@@ -36,7 +36,7 @@
#ifndef _TXDATAOBJECT_HXX_
#include "XTDataObject.hxx"
#endif
-#include <com/sun/star/datatransfer/dataflavor.hpp>
+#include <com/sun/star/datatransfer/DataFlavor.hpp>
#include "..\misc\ImplHelper.hxx"
#include "DTransHelper.hxx"
#include "TxtCnvtHlp.hxx"
diff --git a/dtrans/source/win32/dtobj/XTDataObject.hxx b/dtrans/source/win32/dtobj/XTDataObject.hxx
index b7b20af56ac7..b9794cad029e 100644
--- a/dtrans/source/win32/dtobj/XTDataObject.hxx
+++ b/dtrans/source/win32/dtobj/XTDataObject.hxx
@@ -42,7 +42,7 @@
#endif
#ifndef _FETCLIST_HXX_
-#include "FEtcList.hxx"
+#include "FetcList.hxx"
#endif
#if defined _MSC_VER
diff --git a/editeng/inc/editeng/fontitem.hxx b/editeng/inc/editeng/fontitem.hxx
index 4ec96052769c..c64c8d99d9e4 100644..100755
--- a/editeng/inc/editeng/fontitem.hxx
+++ b/editeng/inc/editeng/fontitem.hxx
@@ -81,30 +81,23 @@ public:
String &rText, const IntlWrapper * = 0 ) const;
// ZugriffsMethoden:
- inline String &GetFamilyName() { return aFamilyName; }
+ void SetFamilyName( const String& rFamilyName ) { aFamilyName = rFamilyName; }
inline const String &GetFamilyName() const { return aFamilyName; }
- inline String &GetStyleName() { return aStyleName; }
+ void SetStyleName(const String &rStyleName ) { aStyleName = rStyleName; }
inline const String &GetStyleName() const { return aStyleName; }
- inline FontFamily &GetFamily() { return eFamily; }
+ void SetFamily( FontFamily _eFamily ) { eFamily = _eFamily; }
inline FontFamily GetFamily() const { return eFamily; }
- inline FontPitch &GetPitch() { return ePitch; }
+ void SetPitch(FontPitch _ePitch ) { ePitch = _ePitch; }
inline FontPitch GetPitch() const { return ePitch; }
- inline rtl_TextEncoding &GetCharSet() { return eTextEncoding; }
+ void SetCharSet(rtl_TextEncoding _eEncoding) { eTextEncoding = _eEncoding; }
+
inline rtl_TextEncoding GetCharSet() const { return eTextEncoding; }
- inline SvxFontItem& operator=(const SvxFontItem& rFont)
- {
- aFamilyName = rFont.GetFamilyName();
- aStyleName = rFont.GetStyleName();
- eFamily = rFont.GetFamily();
- ePitch = rFont.GetPitch();
- eTextEncoding = rFont.GetCharSet();
- return *this;
- }
+ SvxFontItem& operator=(const SvxFontItem& rFont);
static void EnableStoreUnicodeNames( sal_Bool bEnable );
diff --git a/editeng/inc/editeng/svxacorr.hxx b/editeng/inc/editeng/svxacorr.hxx
index f355a669a304..73dc7664562e 100644..100755
--- a/editeng/inc/editeng/svxacorr.hxx
+++ b/editeng/inc/editeng/svxacorr.hxx
@@ -79,6 +79,7 @@ public:
virtual sal_Bool Delete( xub_StrLen nStt, xub_StrLen nEnd ) = 0;
virtual sal_Bool Insert( xub_StrLen nPos, const String& rTxt ) = 0;
virtual sal_Bool Replace( xub_StrLen nPos, const String& rTxt ) = 0;
+ virtual sal_Bool ReplaceRange( xub_StrLen nPos, xub_StrLen nLen, const String& rTxt ) = 0;
virtual sal_Bool SetAttr( xub_StrLen nStt, xub_StrLen nEnd, sal_uInt16 nSlotId,
SfxPoolItem& ) = 0;
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx
index cda87dea9f7d..cb042b721c4d 100644..100755
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -1472,7 +1472,7 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream )
if ( hConv )
{
SvxFontItem aNewFontItem( rFontItem );
- aNewFontItem.GetFamilyName() = GetFontToSubsFontName( hConv );
+ aNewFontItem.SetFamilyName( GetFontToSubsFontName( hConv ) );
pC->GetAttribs().Remove( nAttr );
XEditAttribute* pNewAttr = CreateAttrib( aNewFontItem, pAttr->GetStart(), pAttr->GetEnd() );
@@ -1503,7 +1503,7 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream )
if ( hConv )
{
SvxFontItem aNewFontItem( rFontItem );
- aNewFontItem.GetFamilyName() = GetFontToSubsFontName( hConv );
+ aNewFontItem.SetFamilyName( GetFontToSubsFontName( hConv ) );
pC->GetParaAttribs().Put( aNewFontItem );
for ( sal_uInt16 nChar = 0; nChar < pC->GetText().Len(); nChar++ )
diff --git a/editeng/source/editeng/edtspell.cxx b/editeng/source/editeng/edtspell.cxx
index afc329040e29..5fc43f461cac 100644
--- a/editeng/source/editeng/edtspell.cxx
+++ b/editeng/source/editeng/edtspell.cxx
@@ -583,8 +583,13 @@ sal_Bool EdtAutoCorrDoc::Insert( sal_uInt16 nPos, const String& rTxt )
sal_Bool EdtAutoCorrDoc::Replace( sal_uInt16 nPos, const String& rTxt )
{
+ return ReplaceRange( nPos, rTxt.Len(), rTxt );
+}
+
+sal_Bool EdtAutoCorrDoc::ReplaceRange( xub_StrLen nPos, xub_StrLen nSourceLength, const String& rTxt )
+{
// Eigentlich ein Replace einfuehren => Entspr. UNDO
- sal_uInt16 nEnd = nPos+rTxt.Len();
+ sal_uInt16 nEnd = nPos+nSourceLength;
if ( nEnd > pCurNode->Len() )
nEnd = pCurNode->Len();
diff --git a/editeng/source/editeng/edtspell.hxx b/editeng/source/editeng/edtspell.hxx
index 3ed82ac367f1..49978cdd310d 100644..100755
--- a/editeng/source/editeng/edtspell.hxx
+++ b/editeng/source/editeng/edtspell.hxx
@@ -158,6 +158,7 @@ public:
virtual sal_Bool Delete( sal_uInt16 nStt, sal_uInt16 nEnd );
virtual sal_Bool Insert( sal_uInt16 nPos, const String& rTxt );
virtual sal_Bool Replace( sal_uInt16 nPos, const String& rTxt );
+ virtual sal_Bool ReplaceRange( xub_StrLen nPos, xub_StrLen nLen, const String& rTxt );
virtual sal_Bool SetAttr( sal_uInt16 nStt, sal_uInt16 nEnd, sal_uInt16 nSlotId, SfxPoolItem& );
virtual sal_Bool SetINetAttr( sal_uInt16 nStt, sal_uInt16 nEnd, const String& rURL );
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 4b4b5e4514a8..71caa4f176fa 100755
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -1682,11 +1682,11 @@ void ImpEditEngine::SetLanguageAndFont(
{
// set new font attribute
SvxFontItem aFontItem = (SvxFontItem&) aNewSet.Get( nFontWhichId );
- aFontItem.GetFamilyName() = pFont->GetName();
- aFontItem.GetFamily() = pFont->GetFamily();
- aFontItem.GetStyleName() = pFont->GetStyleName();
- aFontItem.GetPitch() = pFont->GetPitch();
- aFontItem.GetCharSet() = pFont->GetCharSet();
+ aFontItem.SetFamilyName( pFont->GetName());
+ aFontItem.SetFamily( pFont->GetFamily());
+ aFontItem.SetStyleName( pFont->GetStyleName());
+ aFontItem.SetPitch( pFont->GetPitch());
+ aFontItem.SetCharSet( pFont->GetCharSet() );
aNewSet.Put( aFontItem );
}
diff --git a/editeng/source/editeng/textconv.cxx b/editeng/source/editeng/textconv.cxx
index b92284eb60bf..d2dc1c8a846d 100644..100755
--- a/editeng/source/editeng/textconv.cxx
+++ b/editeng/source/editeng/textconv.cxx
@@ -302,11 +302,11 @@ void TextConvWrapper::SetLanguageAndFont( const ESelection &rESel,
{
// set new font attribute
SvxFontItem aFontItem = (SvxFontItem&) aNewSet.Get( nFontWhichId );
- aFontItem.GetFamilyName() = pFont->GetName();
- aFontItem.GetFamily() = pFont->GetFamily();
- aFontItem.GetStyleName() = pFont->GetStyleName();
- aFontItem.GetPitch() = pFont->GetPitch();
- aFontItem.GetCharSet() = pFont->GetCharSet();
+ aFontItem.SetFamilyName( pFont->GetName());
+ aFontItem.SetFamily( pFont->GetFamily());
+ aFontItem.SetStyleName( pFont->GetStyleName());
+ aFontItem.SetPitch( pFont->GetPitch());
+ aFontItem.SetCharSet(pFont->GetCharSet());
aNewSet.Put( aFontItem );
}
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index 8c0e533a40f4..5f2dc3a2d803 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -406,6 +406,8 @@ SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pC
---------------------------------------------------------------------------*/
SvxNumberFormat& SvxNumberFormat::operator=( const SvxNumberFormat& rFormat )
{
+ if (& rFormat == this) { return *this; }
+
SetNumberingType(rFormat.GetNumberingType());
eNumAdjust = rFormat.eNumAdjust ;
nInclUpperLevels = rFormat.nInclUpperLevels ;
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index f1dc1f6c6f85..f0fa8cd02d8f 100644..100755
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -256,6 +256,16 @@ SvxFontItem::SvxFontItem( const FontFamily eFam, const XubString& aName,
}
// -----------------------------------------------------------------------
+SvxFontItem& SvxFontItem::operator=(const SvxFontItem& rFont)
+{
+ aFamilyName = rFont.GetFamilyName();
+ aStyleName = rFont.GetStyleName();
+ eFamily = rFont.GetFamily();
+ ePitch = rFont.GetPitch();
+ eTextEncoding = rFont.GetCharSet();
+ return *this;
+}
+// -----------------------------------------------------------------------
sal_Bool SvxFontItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
@@ -3806,11 +3816,11 @@ void GetDefaultFonts( SvxFontItem& rLatin, SvxFontItem& rAsian, SvxFontItem& rCo
aOutTypeArr[ n ].nLanguage,
DEFAULTFONT_FLAGS_ONLYONE, 0 ) );
SvxFontItem* pItem = aItemArr[ n ];
- pItem->GetFamily() = aFont.GetFamily();
- pItem->GetFamilyName() = aFont.GetName();
- pItem->GetStyleName().Erase();
- pItem->GetPitch() = aFont.GetPitch();
- pItem->GetCharSet() = aFont.GetCharSet();
+ pItem->SetFamily( aFont.GetFamily() );
+ pItem->SetFamilyName( aFont.GetName() );
+ pItem->SetStyleName( String() );
+ pItem->SetPitch( aFont.GetPitch());
+ pItem->SetCharSet(aFont.GetCharSet());
}
}
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index e15e92200e0c..1eebd5349fe4 100644..100755
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -47,6 +47,7 @@
#include <com/sun/star/i18n/UnicodeType.hdl>
#include <unotools/collatorwrapper.hxx>
#include <com/sun/star/i18n/CollatorOptions.hpp>
+#include <com/sun/star/i18n/UnicodeScript.hpp>
#include <unotools/localedatawrapper.hxx>
#include <unotools/transliterationwrapper.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -139,6 +140,41 @@ inline int IsUpperLetter( sal_Int32 nCharType )
0 == ( ::com::sun::star::i18n::KCharacterType::LOWER & nCharType);
}
+bool lcl_IsUnsupportedUnicodeChar( CharClass& rCC, const String& rTxt,
+ xub_StrLen nStt, xub_StrLen nEnd )
+{
+ for( ; nStt < nEnd; ++nStt )
+ {
+#if OSL_DEBUG_LEVEL > 1
+ sal_Int32 nCharType;
+ sal_Int32 nChType;
+ nCharType = rCC.getCharacterType( rTxt, nStt );
+ nChType = rCC.getType( rTxt, nStt );
+#endif
+ short nScript = rCC.getScript( rTxt, nStt );
+ switch( nScript )
+ {
+ case ::com::sun::star::i18n::UnicodeScript_kCJKRadicalsSupplement:
+ case ::com::sun::star::i18n::UnicodeScript_kHangulJamo:
+ case ::com::sun::star::i18n::UnicodeScript_kCJKSymbolPunctuation:
+ case ::com::sun::star::i18n::UnicodeScript_kHiragana:
+ case ::com::sun::star::i18n::UnicodeScript_kKatakana:
+ case ::com::sun::star::i18n::UnicodeScript_kHangulCompatibilityJamo:
+ case ::com::sun::star::i18n::UnicodeScript_kEnclosedCJKLetterMonth:
+ case ::com::sun::star::i18n::UnicodeScript_kCJKCompatibility:
+ case ::com::sun::star::i18n::UnicodeScript_k_CJKUnifiedIdeographsExtensionA:
+ case ::com::sun::star::i18n::UnicodeScript_kCJKUnifiedIdeograph:
+ case ::com::sun::star::i18n::UnicodeScript_kHangulSyllable:
+ case ::com::sun::star::i18n::UnicodeScript_kCJKCompatibilityIdeograph:
+ case ::com::sun::star::i18n::UnicodeScript_kHalfwidthFullwidthForm:
+ return true;
+ default: ; //do nothing
+ }
+
+ }
+ return false;
+}
+
sal_Bool lcl_IsSymbolChar( CharClass& rCC, const String& rTxt,
xub_StrLen nStt, xub_StrLen nEnd )
{
@@ -456,7 +492,7 @@ sal_Bool SvxAutoCorrect::FnCptlSttWrd( SvxAutoCorrDoc& rDoc, const String& rTxt,
sal_Unicode cSave = rTxt.GetChar( nSttPos );
String sChar( cSave );
rCC.toLower( sChar );
- if( sChar.GetChar(0) != cSave && rDoc.Replace( nSttPos, sChar ))
+ if( sChar.GetChar(0) != cSave && rDoc.ReplaceRange( nSttPos, 1, sChar ))
{
if( SaveWordWrdSttLst & nFlags )
rDoc.SaveCpltSttWord( CptlSttWrd, nSttPos, sWord, cSave );
@@ -888,7 +924,7 @@ sal_Bool SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
String sChar( *pWordStt );
rCC.toUpper( sChar );
return sChar != *pWordStt &&
- rDoc.Replace( xub_StrLen( pWordStt - pStart ), sChar );
+ rDoc.ReplaceRange( xub_StrLen( pWordStt - pStart ), 1, sChar );
}
aText = *pPrevPara;
@@ -1068,7 +1104,7 @@ sal_Bool SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
nSttPos = sal::static_int_cast< xub_StrLen >( pWordStt - rTxt.GetBuffer() );
String sChar( cSave );
rCC.toUpper( sChar );
- sal_Bool bRet = sChar.GetChar(0) != cSave && rDoc.Replace( nSttPos, sChar );
+ sal_Bool bRet = sChar.GetChar(0) != cSave && rDoc.ReplaceRange( nSttPos, 1, sChar );
// das Wort will vielleicht jemand haben
if( bRet && SaveWordCplSttLst & nFlags )
@@ -1299,7 +1335,7 @@ sal_uLong SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
eLang = MsLangId::getSystemLanguage();
CharClass& rCC = GetCharClass( eLang );
- // Bug 19285: Symbolzeichen nicht anfassen
+ // no symbol characters
if( lcl_IsSymbolChar( rCC, rTxt, nCapLttrPos, nInsPos ))
break;
@@ -1368,13 +1404,16 @@ sal_uLong SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
else
{
nRet = 0;
+ bool bUnsupported = lcl_IsUnsupportedUnicodeChar( rCC, rTxt, nCapLttrPos, nInsPos );
// Grossbuchstabe am Satz-Anfang ??
- if( IsAutoCorrFlag( CptlSttSntnc ) &&
+ if( !bUnsupported &&
+ IsAutoCorrFlag( CptlSttSntnc ) &&
FnCptlSttSntnc( rDoc, rTxt, sal_True, nCapLttrPos, nInsPos, eLang ) )
nRet |= CptlSttSntnc;
// Zwei Grossbuchstaben am Wort-Anfang ??
- if( IsAutoCorrFlag( CptlSttWrd ) &&
+ if( !bUnsupported &&
+ IsAutoCorrFlag( CptlSttWrd ) &&
FnCptlSttWrd( rDoc, rTxt, nCapLttrPos, nInsPos, eLang ) )
nRet |= CptlSttWrd;
diff --git a/editeng/source/uno/unofdesc.cxx b/editeng/source/uno/unofdesc.cxx
index d81af6ccff0c..bc2245e7e6a9 100644..100755
--- a/editeng/source/uno/unofdesc.cxx
+++ b/editeng/source/uno/unofdesc.cxx
@@ -91,11 +91,11 @@ void SvxUnoFontDescriptor::FillItemSet( const awt::FontDescriptor& rDesc, SfxIte
{
SvxFontItem aFontItem( EE_CHAR_FONTINFO );
- aFontItem.GetFamilyName()= rDesc.Name;
- aFontItem.GetStyleName() = rDesc.StyleName;
- aFontItem.GetFamily() = (FontFamily)rDesc.Family;
- aFontItem.GetCharSet() = rDesc.CharSet;
- aFontItem.GetPitch() = (FontPitch)rDesc.Pitch;
+ aFontItem.SetFamilyName( rDesc.Name);
+ aFontItem.SetStyleName( rDesc.StyleName);
+ aFontItem.SetFamily( (FontFamily)rDesc.Family);
+ aFontItem.SetCharSet( rDesc.CharSet );
+ aFontItem.SetPitch( (FontPitch)rDesc.Pitch);
rSet.Put(aFontItem);
}
diff --git a/extensions/source/ole/unoobjw.cxx b/extensions/source/ole/unoobjw.cxx
index 496ec6fea8db..182726cd95bc 100644
--- a/extensions/source/ole/unoobjw.cxx
+++ b/extensions/source/ole/unoobjw.cxx
@@ -931,7 +931,7 @@ HRESULT InterfaceOleWrapper_Impl::doInvoke( DISPPARAMS * pdispparams, VARIANT *
// try to write back out parameter
if (outIndex.getLength() > 0)
{
- const INT16* pOutIndex = outIndex.getConstArray();
+ const sal_Int16* pOutIndex = outIndex.getConstArray();
const Any* pOutParams = outParams.getConstArray();
for (sal_Int32 i = 0; i < outIndex.getLength(); i++)
diff --git a/filter/source/docbook/sofftodocbookheadings.xsl b/filter/source/docbook/sofftodocbookheadings.xsl
index cfddf901b2d4..3fda55612a05 100644
--- a/filter/source/docbook/sofftodocbookheadings.xsl
+++ b/filter/source/docbook/sofftodocbookheadings.xsl
@@ -163,20 +163,20 @@
<!-- if the first heading is not of the section1 level -->
<xsl:if test="generate-id(.) != generate-id($firstHeading)">
<!-- create an anonymous section1 and embrace all headings preceding the first real existent section1 -->
- <xsl:text disable-output-escaping="yes">&lt;sect1&gt;</xsl:text>
- <title></title>
- <!-- create sections for all the first section1 preluding headings -->
- <xsl:for-each select="key('getHeadingsByOutline', $section1_OutlineLevel)[1]/preceding::text:h">
- <xsl:call-template name="make-section">
- <xsl:with-param name="previousSectionLevel" select="$section1_OutlineLevel"/>
- <xsl:with-param name="currentSectionLevel">
- <xsl:call-template name="getSectionLevel">
- <xsl:with-param name="outlineLevel" select="@text:level"/>
- </xsl:call-template>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:for-each>
- <xsl:text disable-output-escaping="yes">&lt;/sect1&gt;</xsl:text>
+ <xsl:element name="sect1">
+ <title></title>
+ <!-- create sections for all the first section1 preluding headings -->
+ <xsl:for-each select="key('getHeadingsByOutline', $section1_OutlineLevel)[1]/preceding::text:h">
+ <xsl:call-template name="make-section">
+ <xsl:with-param name="previousSectionLevel" select="$section1_OutlineLevel"/>
+ <xsl:with-param name="currentSectionLevel">
+ <xsl:call-template name="getSectionLevel">
+ <xsl:with-param name="outlineLevel" select="@text:level"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:element>
</xsl:if>
</xsl:for-each>
<!-- match all headings, which are mapped to section1 to create a nested section structure used in docbook (see first comment after copyright) -->
@@ -278,30 +278,22 @@
<xsl:choose>
<!-- empty title as it is an empty section between two headings with an outline level difference higher than 1 -->
<xsl:when test="$currentSectionLevel &gt; $previousSectionLevel+1">
- <xsl:text disable-output-escaping="yes">&lt;sect</xsl:text>
- <xsl:value-of select="$previousSectionLevel +1"/>
- <xsl:text disable-output-escaping="yes">&gt;</xsl:text>
- <title></title>
- <xsl:call-template name="make-section">
- <xsl:with-param name="currentSectionLevel" select="$currentSectionLevel"/>
- <xsl:with-param name="previousSectionLevel" select="$previousSectionLevel +1"/>
- </xsl:call-template>
- <xsl:text disable-output-escaping="yes">&lt;/sect</xsl:text>
- <xsl:value-of select="$previousSectionLevel +1"/>
- <xsl:text disable-output-escaping="yes">&gt;</xsl:text>
+ <xsl:element name="{concat('sect', $previousSectionLevel + 1)}">
+ <title></title>
+ <xsl:call-template name="make-section">
+ <xsl:with-param name="currentSectionLevel" select="$currentSectionLevel"/>
+ <xsl:with-param name="previousSectionLevel" select="$previousSectionLevel +1"/>
+ </xsl:call-template>
+ </xsl:element>
</xsl:when>
<xsl:otherwise>
- <xsl:text disable-output-escaping="yes">&lt;sect</xsl:text>
- <xsl:value-of select="$currentSectionLevel"/>
- <xsl:text disable-output-escaping="yes">&gt;</xsl:text>
- <title>
- <xsl:apply-templates/>
- </title>
- <xsl:apply-templates select="key('nestedContent', generate-id())"/>
- <xsl:apply-templates select="key('nestedHeadings', generate-id())" mode="recreateStructure"/>
- <xsl:text disable-output-escaping="yes">&lt;/sect</xsl:text>
- <xsl:value-of select="$currentSectionLevel"/>
- <xsl:text disable-output-escaping="yes">&gt;</xsl:text>
+ <xsl:element name="{concat('sect', $currentSectionLevel)}">
+ <title>
+ <xsl:apply-templates/>
+ </title>
+ <xsl:apply-templates select="key('nestedContent', generate-id())"/>
+ <xsl:apply-templates select="key('nestedHeadings', generate-id())" mode="recreateStructure"/>
+ </xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
@@ -370,23 +362,12 @@
</appendix>
</xsl:when>
<xsl:otherwise>
- <xsl:variable name="sectvar">
- <xsl:text>sect</xsl:text>
- <xsl:value-of select="count(ancestor::text:section)+1"/>
- </xsl:variable>
- <xsl:variable name="idvar">
- <xsl:text> id="</xsl:text>
- <xsl:value-of select="@text:name"/>
- <xsl:text>"</xsl:text>
- </xsl:variable>
- <xsl:text disable-output-escaping="yes">&lt;</xsl:text>
- <xsl:value-of select="$sectvar"/>
- <xsl:value-of select="$idvar"/>
- <xsl:text disable-output-escaping="yes">&gt;</xsl:text>
- <xsl:apply-templates/>
- <xsl:text disable-output-escaping="yes">&lt;/</xsl:text>
- <xsl:value-of select="$sectvar"/>
- <xsl:text disable-output-escaping="yes">&gt;</xsl:text>
+ <xsl:element name="{concat('sect', count(ancestor::text:section) + 1)}">
+ <xsl:attribute name="id">
+ <xsl:value-of select="@text:name"/>
+ </xsl:attribute>
+ <xsl:apply-templates/>
+ </xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
diff --git a/filter/source/xslt/export/wordml/ooo2wordml_draw.xsl b/filter/source/xslt/export/wordml/ooo2wordml_draw.xsl
index 40b146f1481e..2badb7cd6814 100644
--- a/filter/source/xslt/export/wordml/ooo2wordml_draw.xsl
+++ b/filter/source/xslt/export/wordml/ooo2wordml_draw.xsl
@@ -27,7 +27,7 @@
-->
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml" xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:aml="http://schemas.microsoft.com/aml/2001/core" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xalan="http://xml.apache.org/xalan" xmlns:oleextracter="MyOleExtracter" xmlns:ole="java:XSLTFilterOLEExtracter" xmlns:java="http://saxon.sf.net/java-type" exclude-result-prefixes="office table style text draw svg dc config xlink meta oooc dom ooo chart math dr3d form script ooow draw xalan ole oleextracter java" extension-element-prefixes="oleextracter">
<xsl:include href="ooo2wordml_custom_draw.xsl"/>
- <xsl:param name="oleExtractor" as="java:XSLTFilterOLEExtracter" select="ole:new()"/>
+ <xsl:param name="oleExtractor" as="java:com.sun.star.comp.xsltfilter.XSLTFilterOLEExtracter" select="ole:new()"/>
<xsl:param name="XMultiServiceFactory" as="java:com.sun.star.lang.XMultiServiceFactory" select="ole:init($oleExtractor, 'uno:socket,host=localhost,port=8100;urp;StarOffice.ServiceManager')"/>
<xsl:key name="stroke-dash-style" match="draw:stroke-dash" use="@draw:name"/>
@@ -1880,6 +1880,6 @@
</xsl:template>
<xsl:template match="draw:object-ole"/>
<xalan:component prefix="oleextracter" elements="init exit" functions="getByName insertByName">
- <xalan:script lang="javaclass" src="xalan://XSLTFilterOLEExtracter"/>
+ <xalan:script lang="javaclass" src="xalan://com.sun.star.comp.xsltfilter.XSLTFilterOLEExtracter"/>
</xalan:component>
</xsl:stylesheet>
diff --git a/filter/source/xslt/import/wordml/wordml2ooo_draw.xsl b/filter/source/xslt/import/wordml/wordml2ooo_draw.xsl
index e0737d1374fa..0a1228779268 100644
--- a/filter/source/xslt/import/wordml/wordml2ooo_draw.xsl
+++ b/filter/source/xslt/import/wordml/wordml2ooo_draw.xsl
@@ -28,7 +28,7 @@
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml" xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:aml="http://schemas.microsoft.com/aml/2001/core" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xalan="http://xml.apache.org/xalan" xmlns:oleextracter="MyOleExtracter" xmlns:ole="java:XSLTFilterOLEExtracter" xmlns:java="http://saxon.sf.net/java-type" exclude-result-prefixes="w wx aml o dt v xalan ole oleextracter java" extension-element-prefixes="oleextracter">
<xsl:include href="wordml2ooo_custom_draw.xsl"/>
<xsl:include href="wordml2ooo_path.xsl"/>
- <xsl:param name="oleExtractor" as="java:XSLTFilterOLEExtracter" select="ole:new()"/>
+ <xsl:param name="oleExtractor" as="java:com.sun.star.comp.xsltfilter.XSLTFilterOLEExtracter" select="ole:new()"/>
<xsl:param name="XMultiServiceFactory" as="java:com.sun.star.lang.XMultiServiceFactory" select="ole:init($oleExtractor, 'uno:socket,host=localhost,port=8100;urp;StarOffice.ServiceManager')"/>
@@ -2208,6 +2208,6 @@
</xsl:choose>
</xsl:template>
<xalan:component prefix="oleextracter" elements="init exit" functions="getByName insertByName">
- <xalan:script lang="javaclass" src="xalan://XSLTFilterOLEExtracter"/>
+ <xalan:script lang="javaclass" src="xalan://com.sun.star.comp.xsltfilter.XSLTFilterOLEExtracter"/>
</xalan:component>
</xsl:stylesheet>
diff --git a/filter/source/xslt/odf2xhtml/export/common/styles/style_collector.xsl b/filter/source/xslt/odf2xhtml/export/common/styles/style_collector.xsl
index 2aa2fdc50bc3..5f75027d33e6 100644
--- a/filter/source/xslt/odf2xhtml/export/common/styles/style_collector.xsl
+++ b/filter/source/xslt/odf2xhtml/export/common/styles/style_collector.xsl
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
Copyright 2000, 2010 Oracle and/or its affiliates.
@@ -24,805 +24,805 @@
<http://www.openoffice.org/license.html>
for a copy of the LGPLv3 License.
--->
-<!--
- For further documentation and updates visit http://xml.openoffice.org/odf2xhtml
--->
-<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
- xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0"
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:dom="http://www.w3.org/2001/xml-events"
- xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"
- xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
- xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
- xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"
- xmlns:math="http://www.w3.org/1998/Math/MathML"
- xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
- xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
- xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:ooo="http://openoffice.org/2004/office"
- xmlns:oooc="http://openoffice.org/2004/calc"
- xmlns:ooow="http://openoffice.org/2004/writer"
- xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0"
- xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
- xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"
- xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
- xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
- xmlns:xforms="http://www.w3.org/2002/xforms"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:xt="http://www.jclark.com/xt"
- xmlns:common="http://exslt.org/common"
- xmlns:xalan="http://xml.apache.org/xalan"
- exclude-result-prefixes="chart config dc dom dr3d draw fo form math meta number office ooo oooc ooow script style svg table text xforms xlink xsd xsi xt common xalan">
-
-
-
- <!-- ***************************************** -->
- <!-- *** Gathering office style properties *** -->
- <!-- ***************************************** -->
-
- <!-- REASON FOR STYLESHEET:
- In the OpenOffice documents styles are represented by a hierarchy.
- (e.g. most styles are inherited from a default style).
- Many other languages (as XHTML/CSS) do not support inherited styles.
- The style inheritance have to be made flat/absolute for each style.
-
- A further reason was, that the earlier style collection mechanism
- had problems with CSS inline, which do not inherit from XML office defaults
- nor font:family defaults as the style header does
- (cp. stylesheet 'style_collector.xsl' and the 'write-default-styles' template)
-
- RESULT OF STYLESHEET:
- All styles will be returned in a variable containing styles with their inherited *:
-
- <all-styles>
- <style style:family="foo" style:name="x1">
- <* fo:padding-left="0cm" fo:margin-right="0cm" />
- </style>
- <style style:family="muh" style:name="x2" >
- <* fo:padding-left="3cm" ... />
- </style>
- ...
-
- </all-styles>
- -->
-
-
- <xsl:template name="collect-global-odf-properties">
- <!-- to access the variable as a node-set by XPATH expressions, it is necessary to convert it
- from a result-tree-fragment (RTF) to a node set by a in a XSLT 1.0 non standarized function -->
- <xsl:variable name="globalDataRTF">
- <xsl:call-template name="collect-document-links-RTF" />
- </xsl:variable>
-
- <xsl:choose>
- <xsl:when test="function-available('common:node-set')">
- <xsl:call-template name="collect-style-properties">
- <xsl:with-param name="globalData" select="common:node-set($globalDataRTF)" />
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="function-available('xalan:nodeset')">
- <xsl:call-template name="collect-style-properties">
- <xsl:with-param name="globalData" select="xalan:nodeset($globalDataRTF)" />
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="function-available('xt:node-set')">
- <xsl:call-template name="collect-style-properties">
- <xsl:with-param name="globalData" select="xt:node-set($globalDataRTF)" />
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message terminate="yes">The required node-set function was not found!</xsl:message>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
-
-
- <xsl:template name="collect-style-properties">
- <xsl:param name="globalData" />
-
- <!-- Add the input file references to the new collected style properties -->
- <xsl:variable name="globalDataRTF">
- <xsl:copy-of select="$globalData" />
- <xsl:call-template name="collect-style-properties-RTF">
- <xsl:with-param name="globalData" select="$globalData" />
- </xsl:call-template>
- </xsl:variable>
-
- <xsl:choose>
- <xsl:when test="function-available('common:node-set')">
- <xsl:call-template name="map-odf-style-properties">
- <xsl:with-param name="globalData" select="common:node-set($globalDataRTF)" />
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="function-available('xalan:nodeset')">
- <xsl:call-template name="map-odf-style-properties">
- <xsl:with-param name="globalData" select="xalan:nodeset($globalDataRTF)" />
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="function-available('xt:node-set')">
- <xsl:call-template name="map-odf-style-properties">
- <xsl:with-param name="globalData" select="xt:node-set($globalDataRTF)" />
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message terminate="yes">The required node-set function was not found!</xsl:message>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
-
- <xsl:template name="collect-document-links-RTF">
- <!-- works for zipped office files, unzipped office files as for flat filter single office file format as well -->
- <xsl:variable name="documentLinksRTF">
- <xsl:choose>
- <xsl:when test="office:document-content">
- <xsl:element name="styles-file" namespace="">
- <xsl:copy-of select="document(concat($sourceBaseURL, 'styles.xml'))" />
- </xsl:element>
- <xsl:element name="meta-file" namespace="">
- <xsl:copy-of select="document(concat($sourceBaseURL, 'meta.xml'))" />
- </xsl:element>
- </xsl:when>
- <xsl:otherwise>
- <xsl:element name="styles-file" namespace="">
- <xsl:copy-of select="/" />
- </xsl:element>
- <xsl:element name="meta-file" namespace="">
- <xsl:copy-of select="/" />
- </xsl:element>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:choose>
- <xsl:when test="function-available('common:node-set')">
- <xsl:call-template name="collect-document-links">
- <xsl:with-param name="documentLinks" select="common:node-set($documentLinksRTF)" />
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="function-available('xalan:nodeset')">
- <xsl:call-template name="collect-document-links">
- <xsl:with-param name="documentLinks" select="xalan:nodeset($documentLinksRTF)" />
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="function-available('xt:node-set')">
- <xsl:call-template name="collect-document-links">
- <xsl:with-param name="documentLinks" select="xt:node-set($documentLinksRTF)" />
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message terminate="yes">The required node-set function was not found!</xsl:message>
- </xsl:otherwise>
- </xsl:choose>
-
- </xsl:template>
-
-
- <xsl:template name="collect-document-links">
- <xsl:param name="documentLinks" />
-
- <xsl:element name="styles-file" namespace="">
- <xsl:copy-of select="$documentLinks/styles-file/*" />
- </xsl:element>
-
- <xsl:element name="meta-file" namespace="">
- <xsl:copy-of select="$documentLinks/meta-file/*" />
- </xsl:element>
-
- <xsl:copy-of select="$documentLinks/styles-file/*/office:styles" />
- <xsl:copy-of select="$documentLinks/styles-file/*/office:font-face-decls" />
-
- <!-- office:automatic-styles may be containted in two files (i.e. content.xml and styles.xml).
- Wild card necessary as top level element differs from flat office files ("SampleName.fsxw") -->
- <xsl:copy-of select="/*/office:automatic-styles" />
-
- </xsl:template>
-
-
- <xsl:template name="collect-style-properties-RTF">
- <xsl:param name="globalData" />
-
- <!--** DEFAULT STYLES: First adding some office defaults unwritten in XML -->
- <xsl:variable name="defaultOfficeStyle-RTF">
- <xsl:element name="style" namespace="">
- <xsl:element name="style:properties" />
- </xsl:element>
- </xsl:variable>
-
- <xsl:choose>
- <xsl:when test="function-available('common:node-set')">
- <xsl:call-template name="collect-properties-defaults">
- <xsl:with-param name="globalData" select="$globalData" />
- <xsl:with-param name="defaultOfficeStyle" select="common:node-set($defaultOfficeStyle-RTF)" />
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="function-available('xalan:nodeset')">
- <xsl:call-template name="collect-properties-defaults">
- <xsl:with-param name="globalData" select="$globalData" />
- <xsl:with-param name="defaultOfficeStyle" select="xalan:nodeset($defaultOfficeStyle-RTF)" />
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="function-available('xt:node-set')">
- <xsl:call-template name="collect-properties-defaults">
- <xsl:with-param name="globalData" select="$globalData" />
- <xsl:with-param name="defaultOfficeStyle" select="xt:node-set($defaultOfficeStyle-RTF)" />
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message terminate="yes">ERROR: Function not found: 'Nodeset'</xsl:message>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
-
- <xsl:template name="collect-properties-defaults">
- <xsl:param name="globalData" />
- <xsl:param name="defaultOfficeStyle" />
-
- <!--** DEFAULT STYLES: Adding the default styles of a style:family, by adding each office:styles/style:default-style element **-->
- <xsl:variable name="defaultFamilyStyles-RTF">
- <xsl:for-each select="$globalData/office:styles/style:default-style">
- <xsl:element name="style" namespace="">
- <xsl:copy-of select="@style:family" />
- <xsl:call-template name="create-inherited-style-properties">
- <xsl:with-param name="inheritedStyleProperties" select="$defaultOfficeStyle/style/*" />
- </xsl:call-template>
- </xsl:element>
- </xsl:for-each>
- </xsl:variable>
-
- <xsl:choose>
- <xsl:when test="function-available('common:node-set')">
- <xsl:call-template name="collect-properties">
- <xsl:with-param name="globalData" select="$globalData" />
- <xsl:with-param name="defaultOfficeStyle" select="$defaultOfficeStyle" />
- <xsl:with-param name="defaultFamilyStyles" select="common:node-set($defaultFamilyStyles-RTF)" />
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="function-available('xalan:nodeset')">
- <xsl:call-template name="collect-properties">
- <xsl:with-param name="globalData" select="$globalData" />
- <xsl:with-param name="defaultOfficeStyle" select="$defaultOfficeStyle" />
- <xsl:with-param name="defaultFamilyStyles" select="xalan:nodeset($defaultFamilyStyles-RTF)" />
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="function-available('xt:node-set')">
- <xsl:call-template name="collect-properties">
- <xsl:with-param name="globalData" select="$globalData" />
- <xsl:with-param name="defaultOfficeStyle" select="$defaultOfficeStyle" />
- <xsl:with-param name="defaultFamilyStyles" select="xt:node-set($defaultFamilyStyles-RTF)" />
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message terminate="yes">ERROR: Function not found: nodeset</xsl:message>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
-
- <xsl:template name="collect-properties">
- <xsl:param name="globalData" />
- <xsl:param name="defaultOfficeStyle" />
- <xsl:param name="defaultFamilyStyles" />
-
- <!--** traversee all style trees - branch after branch - collecting style properties **-->
- <xsl:element name="all-doc-styles" namespace="">
-
- <!-- Background Information:
-
- There are two different types of styles in the Office:
- 1) The office:styles from the user pre-defined style templates
- 2) The automatic:styles, which are created whenever a user uses explicit style formatting.
-
- The office:styles only have parent styles in the office:styles,
- but automatic:styles may inherit from both office:styles and themself.
- -->
-
- <!--** traversee all office:styles trees beginning with the top-level styles **-->
- <xsl:for-each select="$globalData/office:styles/style:style[not(@style:parent-style-name)]">
- <!-- Looking for parents from style:family
- <xsl:for-each select="$globalData/office:styles/style:style[@style:family=current()/@style:family][not(@style:parent-style-name)]"> -->
- <xsl:choose>
- <xsl:when test="$defaultFamilyStyles/style[@style:family=current()/@style:family]">
- <xsl:call-template name="inherit-style-for-self-and-children">
- <xsl:with-param name="globalData" select="$globalData" />
- <xsl:with-param name="inheritedStyleProperties" select="$defaultFamilyStyles/style[@style:family=current()/@style:family]/*" />
- <xsl:with-param name="searchOnlyInAutomaticStyles" select="false()" />
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="inherit-style-for-self-and-children">
- <xsl:with-param name="globalData" select="$globalData" />
- <xsl:with-param name="inheritedStyleProperties" select="$defaultOfficeStyle/style/*" />
- <xsl:with-param name="searchOnlyInAutomaticStyles" select="false()" />
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- <!--** creates a style element with style:name and style:family attribute and
- an element representing the absolute style properties style:property ** -->
- </xsl:for-each>
-
- <!--** traversee all office:automatic-styles trees beginning with the top-level styles **-->
- <xsl:for-each select="$globalData/office:automatic-styles/style:style[not(@style:parent-style-name)]">
- <!--** creates a style element with style:name and style:family attribute and
- an element representing the absolute style properties style:property ** -->
- <xsl:choose>
- <xsl:when test="$defaultFamilyStyles/style[@style:family=current()/@style:family]">
- <xsl:call-template name="inherit-style-for-self-and-children">
- <xsl:with-param name="globalData" select="$globalData" />
- <xsl:with-param name="inheritedStyleProperties" select="$defaultFamilyStyles/style[@style:family=current()/@style:family]/*" />
- <xsl:with-param name="searchOnlyInAutomaticStyles" select="true()" />
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="inherit-style-for-self-and-children">
- <xsl:with-param name="globalData" select="$globalData" />
- <xsl:with-param name="inheritedStyleProperties" select="$defaultOfficeStyle/style/*" />
- <xsl:with-param name="searchOnlyInAutomaticStyles" select="true()" />
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
-
- </xsl:for-each>
-
- </xsl:element>
- <!-- debug output in case only styles should be given out (regression test) -->
- <xsl:if test="$onlyStyleOutputEnabled">
- <xsl:element name="defaultOfficeStyle" namespace="">
- <xsl:copy-of select="$defaultOfficeStyle" />
- </xsl:element>
- <xsl:element name="defaultFamilyStyles" namespace="">
- <xsl:copy-of select="$defaultFamilyStyles" />
- </xsl:element>
- </xsl:if>
-
- </xsl:template>
-
-
- <xsl:template name="inherit-style-for-self-and-children">
- <xsl:param name="globalData" />
- <xsl:param name="inheritedStyleProperties" />
- <xsl:param name="searchOnlyInAutomaticStyles" />
-
- <!--** create an absolute style by inherting properties from the given parent properties **-->
- <xsl:variable name="newStyleProperties-RTF">
- <xsl:call-template name="create-inherited-style-properties">
- <xsl:with-param name="inheritedStyleProperties" select="$inheritedStyleProperties" />
- </xsl:call-template>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="function-available('common:node-set')">
- <xsl:variable name="newStyleProperties" select="common:node-set($newStyleProperties-RTF)" />
-
- <xsl:element name="style" namespace="">
- <xsl:copy-of select="@style:family" />
- <xsl:copy-of select="@style:name" />
- <xsl:copy-of select="$newStyleProperties" />
- </xsl:element>
-
- <xsl:choose>
- <xsl:when test="$searchOnlyInAutomaticStyles">
- <xsl:call-template name="get-children">
- <xsl:with-param name="globalData" select="$globalData" />
- <xsl:with-param name="searchOnlyInAutomaticStyles" select="true()" />
- <xsl:with-param name="inheritedStyleProperties" select="$newStyleProperties/*" />
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <!--** for all automatic-children of the current office:styles **-->
- <xsl:call-template name="get-children">
- <xsl:with-param name="globalData" select="$globalData" />
- <xsl:with-param name="searchOnlyInAutomaticStyles" select="false()" />
- <xsl:with-param name="inheritedStyleProperties" select="$newStyleProperties/*" />
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="function-available('xalan:nodeset')">
- <xsl:variable name="newStyleProperties" select="xalan:nodeset($newStyleProperties-RTF)" />
-
- <xsl:element name="style" namespace="">
- <xsl:copy-of select="@style:family" />
- <xsl:copy-of select="@style:name" />
- <xsl:copy-of select="$newStyleProperties" />
- </xsl:element>
-
- <xsl:choose>
- <xsl:when test="$searchOnlyInAutomaticStyles">
- <xsl:call-template name="get-children">
- <xsl:with-param name="globalData" select="$globalData" />
- <xsl:with-param name="searchOnlyInAutomaticStyles" select="true()" />
- <xsl:with-param name="inheritedStyleProperties" select="$newStyleProperties/*" />
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <!--** for all automatic-children of the current office:styles **-->
- <xsl:call-template name="get-children">
- <xsl:with-param name="globalData" select="$globalData" />
- <xsl:with-param name="searchOnlyInAutomaticStyles" select="false()" />
- <xsl:with-param name="inheritedStyleProperties" select="$newStyleProperties/*" />
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="function-available('xt:node-set')">
- <xsl:variable name="newStyleProperties" select="xt:node-set($newStyleProperties-RTF)" />
-
- <xsl:element name="style" namespace="">
- <xsl:copy-of select="@style:family" />
- <xsl:copy-of select="@style:name" />
- <xsl:copy-of select="$newStyleProperties" />
- </xsl:element>
-
- <xsl:choose>
- <xsl:when test="$searchOnlyInAutomaticStyles">
- <xsl:call-template name="get-children">
- <xsl:with-param name="globalData" select="$globalData" />
- <xsl:with-param name="searchOnlyInAutomaticStyles" select="true()" />
- <xsl:with-param name="inheritedStyleProperties" select="$newStyleProperties/*" />
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <!--** for all automatic-children of the current office:styles **-->
- <xsl:call-template name="get-children">
- <xsl:with-param name="globalData" select="$globalData" />
- <xsl:with-param name="searchOnlyInAutomaticStyles" select="false()" />
- <xsl:with-param name="inheritedStyleProperties" select="$newStyleProperties/*" />
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message terminate="yes">ERROR: Function not found: nodeset</xsl:message>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
-
- <xsl:template name="get-children">
- <xsl:param name="globalData" />
- <xsl:param name="searchOnlyInAutomaticStyles" />
- <xsl:param name="inheritedStyleProperties" select="*" />
-
-<!-- QUESTION: Parent style is only unique by name and family, but what about cross family inheritance? -->
- <!-- For each child style (that is every style which has the given parentStyleName as style:parent-style-name and the same style:family -->
- <xsl:variable name="parentStyleFamily" select="@style:family" />
- <xsl:variable name="parentStyleName" select="@style:name" />
- <xsl:if test="not($searchOnlyInAutomaticStyles)">
- <xsl:for-each select="$globalData/office:styles/style:style[@style:family=$parentStyleFamily and @style:parent-style-name=$parentStyleName]">
- <xsl:call-template name="inherit-style-for-self-and-children">
- <xsl:with-param name="globalData" select="$globalData" />
- <xsl:with-param name="inheritedStyleProperties" select="$inheritedStyleProperties" />
- <xsl:with-param name="searchOnlyInAutomaticStyles" select="$searchOnlyInAutomaticStyles" />
- </xsl:call-template>
- </xsl:for-each>
- </xsl:if>
- <xsl:for-each select="$globalData/office:automatic-styles/style:style[@style:family=$parentStyleFamily and @style:parent-style-name=$parentStyleName]">
- <xsl:call-template name="inherit-style-for-self-and-children">
- <xsl:with-param name="globalData" select="$globalData" />
- <xsl:with-param name="inheritedStyleProperties" select="$inheritedStyleProperties" />
- <xsl:with-param name="searchOnlyInAutomaticStyles" select="$searchOnlyInAutomaticStyles" />
- </xsl:call-template>
- </xsl:for-each>
- </xsl:template>
-
-
- <xsl:template name="create-inherited-style-properties">
- <xsl:param name="inheritedStyleProperties" />
-
- <xsl:element name="style:properties">
- <!-- Writing all inherited style properties -->
- <xsl:for-each select="$inheritedStyleProperties/@*">
- <xsl:sort select="name()" />
- <xsl:copy-of select="." />
- </xsl:for-each>
-
- <!--All current attributes will override already inserted attributes of the same name
- XSLT Spec: "Adding an attribute to an element replaces any existing attribute of that element with the same expanded-name." -->
- <xsl:for-each select="*/@*[name() != 'style:font-size-rel']">
- <xsl:copy-of select="." />
- </xsl:for-each>
-
- <xsl:if test="*/@style:font-size-rel">
-<!--
- The intheritedStyleProperties should include a absolute Font Size, but
- <style:properties
- xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
- xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
- style:font-name="Courier New"
- fo:language="en"
- fo:country="US"
- style:font-name-asian=Courier New"
- style:font-name-complex="Courier New"/>
--->
- <xsl:variable name="fontSizeAbsolute">
- <xsl:call-template name="convert2pt">
- <xsl:with-param name="value" select="$inheritedStyleProperties/@fo:font-size" />
- </xsl:call-template>
- </xsl:variable>
-
- <xsl:variable name="fontSizeRelative">
- <xsl:call-template name="convert2pt">
- <xsl:with-param name="value" select="*/@style:font-size-rel" />
- </xsl:call-template>
- </xsl:variable>
-
- <xsl:attribute name="fo:font-size">
- <xsl:value-of select="$fontSizeAbsolute + $fontSizeRelative"/>
- <xsl:text>pt</xsl:text>
- </xsl:attribute>
- </xsl:if>
-
- <!-- providing tabulator indentation -->
- <xsl:copy-of select="$inheritedStyleProperties/style:tab-stops"/>
- <xsl:copy-of select="*/style:tab-stops"/>
- </xsl:element>
- </xsl:template>
-
- <!-- debugging & testing purpose -->
- <xsl:template name="write-collected-styles">
- <xsl:param name="globalData" />
-
- <xsl:message>&lt;all-doc-styles&gt;</xsl:message>
- <xsl:for-each select="$globalData/all-doc-styles/style">
- <xsl:message>&lt;style</xsl:message>
- <xsl:message>style:family="<xsl:value-of select="current()/@style:family" />"&gt;</xsl:message>
- <xsl:message>style:name="<xsl:value-of select="current()/@style:name" />" </xsl:message>
- <xsl:message> &lt;*</xsl:message>
- <xsl:for-each select="*/@*">
- <xsl:message>
- <xsl:text></xsl:text>
- <xsl:value-of select="name()" />="<xsl:value-of select="." />"</xsl:message>
- </xsl:for-each>
- <xsl:message>/&gt;</xsl:message>
- <xsl:message>&lt;/style&gt;</xsl:message>
- </xsl:for-each>
- <xsl:message>&lt;/all-doc-styles&gt;</xsl:message>
- </xsl:template>
-
- <xsl:template name="map-odf-style-properties">
- <xsl:param name="globalData" />
-
- <xsl:choose>
- <!--+++++ DEBUG STYLE OUTPUT FOR REGRESSION TEST +++++-->
- <!-- create styles file from the style variable (testing switch) -->
- <xsl:when test="$onlyStyleOutputEnabled">
-
- <xsl:element name="debug-output" namespace="">
- <xsl:copy-of select="$globalData" />
- <xsl:call-template name="map-odf-properties">
- <xsl:with-param name="globalData" select="$globalData" />
- </xsl:call-template>
- </xsl:element>
- </xsl:when>
-
- <!-- create XHTML file -->
- <xsl:otherwise>
- <!-- to access the variable like a node-set it is necessary to convert it
- from a result-tree-fragment (RTF) to a node set using the James Clark extension -->
- <xsl:variable name="globalDataRTF">
- <!-- raw properties still needed for table width attribute creation -->
- <xsl:copy-of select="$globalData" />
- <xsl:call-template name="map-odf-properties">
- <xsl:with-param name="globalData" select="$globalData" />
- </xsl:call-template>
- </xsl:variable>
-
- <xsl:choose>
- <xsl:when test="function-available('common:node-set')">
- <xsl:call-template name="start-main">
- <xsl:with-param name="globalData" select="common:node-set($globalDataRTF)" />
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="function-available('xalan:nodeset')">
- <xsl:call-template name="start-main">
- <xsl:with-param name="globalData" select="xalan:nodeset($globalDataRTF)" />
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="function-available('xt:node-set')">
- <xsl:call-template name="start-main">
- <xsl:with-param name="globalData" select="xt:node-set($globalDataRTF)" />
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message terminate="yes">ERROR: Function not found: nodeset</xsl:message>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <!-- REASON FOR TEMPLATE:
- The OpenOffice style properities gathered in the variable 'globalData' have to be mapped to the CSS style format
- -->
- <xsl:template name="map-odf-properties">
- <xsl:param name="globalData" />
- <xsl:element name="all-styles" namespace="">
- <xsl:for-each select="$globalData/all-doc-styles/style">
- <xsl:sort select="@style:family" />
- <xsl:sort select="@style:name" />
-
- <xsl:call-template name="writeUsedStyles">
- <xsl:with-param name="globalData" select="$globalData" />
- <xsl:with-param name="style" select="."/>
- </xsl:call-template>
- </xsl:for-each>
- </xsl:element>
- </xsl:template>
-
- <xsl:key name="elementUsingStyle" match="/*/office:body//*" use="@text:style-name | @draw:style-name | @draw:text-style-name | @table:style-name | @table:default-cell-style-name"/>
- <xsl:key name="listLabelStyleInStyles" match="/*/office:styles/text:list-style/* |
- /*/office:styles/style:graphic-properties/text:list-style/*" use="@text:style-name"/>
-
- <xsl:key name="listLabelStyleInContent" match="/*/office:automatic-styles/text:list-style/* | /*/office:automatic-styles/style:graphic-properties/text:list-style/*" use="@text:style-name"/>
-
-
- <xsl:variable name="documentRoot" select="/" />
- <xsl:template name="writeUsedStyles">
- <xsl:param name="globalData" />
- <xsl:param name="style"/>
-
- <!-- for-each changes the key environment from the previously globalData back to the document root -->
- <xsl:for-each select="$documentRoot">
- <!-- only styles, which are used in the content are written as CSS styles -->
- <xsl:choose>
- <xsl:when test="key('elementUsingStyle', $style/@style:name)/@* or key('listLabelStyleInContent', $style/@style:name)/@*">
- <xsl:call-template name="writeUsedStyles2">
- <xsl:with-param name="globalData" select="$globalData" />
- <xsl:with-param name="style" select="$style" />
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="not(office:document-content)">
- <xsl:if test="key('listLabelStyleInStyles', $style/@style:name)/@* or /*/office:styles/text:notes-configuration[@text:citation-style-name = $style/@style:name or /*/office:styles/@text:citation-body-style-name=$style/@style:name]">
- <!-- if there are consecutive paragraphs with borders (OR background AND margin ), only the first and the last have the top/bottom border
- unless style:join-border="false" -->
- <xsl:call-template name="writeUsedStyles2">
- <xsl:with-param name="globalData" select="$globalData" />
- <xsl:with-param name="style" select="$style" />
- </xsl:call-template>
- </xsl:if>
- </xsl:when>
- <xsl:otherwise>
- <xsl:for-each select="document($stylesFileURL)">
- <xsl:if test="key('listLabelStyleInStyles', $style/@style:name)/@* or /*/office:styles/text:notes-configuration[@text:citation-style-name = $style/@style:name or /*/office:styles/@text:citation-body-style-name=$style/@style:name]">
- <!-- if there are consecutive paragraphs with borders (OR background AND margin ), only the first and the last have the top/bottom border
- unless style:join-border="false" -->
- <xsl:call-template name="writeUsedStyles2">
- <xsl:with-param name="globalData" select="$globalData" />
- <xsl:with-param name="style" select="$style" />
- </xsl:call-template>
- </xsl:if>
- </xsl:for-each>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- </xsl:template>
-
- <xsl:template name="writeUsedStyles2">
- <xsl:param name="globalData" />
- <xsl:param name="style"/>
- <xsl:choose>
- <xsl:when test="
- $style/@style:family='paragraph'
- and((
- (
- $style/*/@fo:border-top
- or $style/*/@fo:border-bottom
- or $style/*/@fo:border
- )
- and
- (
- not($style/*/@style:join-border)
- or $style/*/@style:join-border = 'true'
- )
- )
- or
- (
- (
- $style/*/@fo:margin-top
- or $style/*/@fo:margin-bottom
- or $style/*/@fo:margin
- )
- and
- ( $style/*/@fo:background-color
- and
- not($style/*/fo:background-color='transparent')
- )
- )
- )">
- <xsl:element name="style" namespace="">
- <xsl:copy-of select="$style/@style:family" />
- <xsl:attribute name="style:name"><xsl:value-of select="concat($style/@style:name, '_borderStart')" /></xsl:attribute>
- <xsl:element name="final-properties" namespace="">
- <xsl:apply-templates select="$style/*/@*[not(name() = 'fo:border-bottom')][not(name() = 'fo:padding-bottom')][not(name() = 'fo:margin-bottom')][not(name() = 'fo:margin')]">
- <xsl:with-param name="globalData" select="$globalData" />
- </xsl:apply-templates>
- <xsl:apply-templates mode="paragraphMerge" select="$style/*/@*[name() = 'fo:margin-bottom' or name() = 'fo:margin']">
- <xsl:with-param name="globalData" select="$globalData" />
- </xsl:apply-templates>
- <xsl:text> border-bottom-style:none; </xsl:text>
- </xsl:element>
- </xsl:element>
- <xsl:element name="style" namespace="">
- <xsl:copy-of select="$style/@style:family" />
- <xsl:copy-of select="$style/@style:name" />
- <xsl:attribute name="mergedBorders"><xsl:value-of select="true()" /></xsl:attribute>
- <xsl:element name="final-properties" namespace="">
- <xsl:apply-templates select="$style/*/@*[not(name() = 'fo:border-top') and not(name() = 'fo:border-bottom')][not(name() = 'fo:padding-top') and not(name() = 'fo:padding-bottom')][not(name() = 'fo:margin-top') and not(name() = 'fo:margin-bottom')][not(name() = 'fo:margin')]">
- <xsl:with-param name="globalData" select="$globalData" />
- </xsl:apply-templates>
- <xsl:apply-templates mode="paragraphMerge" select="$style/*/@*[name() = 'fo:margin-top' or name() = 'fo:margin-bottom' or name() = 'fo:margin']">
- <xsl:with-param name="globalData" select="$globalData" />
- </xsl:apply-templates>
- <xsl:text> border-top-style:none; border-bottom-style:none; </xsl:text>
- </xsl:element>
- </xsl:element>
- <xsl:element name="style" namespace="">
- <xsl:copy-of select="$style/@style:family" />
- <xsl:attribute name="style:name"><xsl:value-of select="concat($style/@style:name, '_borderEnd')" /></xsl:attribute>
- <xsl:element name="final-properties" namespace="">
- <xsl:apply-templates select="$style/*/@*[not(name() = 'fo:border-top')][not(name() = 'fo:padding-top')][not(name() = 'fo:margin-top')][not(name() = 'fo:margin')]">
- <xsl:with-param name="globalData" select="$globalData" />
- </xsl:apply-templates>
- <xsl:apply-templates mode="paragraphMerge" select="$style/*/@*[name() = 'fo:margin-top' or name() = 'fo:margin']">
- <xsl:with-param name="globalData" select="$globalData" />
- </xsl:apply-templates>
- <xsl:text> border-top-style:none;</xsl:text>
- </xsl:element>
- </xsl:element>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="not(key('listLabelStyleInStyles', $style/@style:name)/@*)">
- <xsl:element name="style" namespace="">
- <xsl:copy-of select="$style/@style:family" />
- <xsl:copy-of select="$style/@style:name" />
- <xsl:element name="final-properties" namespace="">
- <xsl:apply-templates select="$style/*/@*">
- <xsl:with-param name="globalData" select="$globalData" />
- </xsl:apply-templates>
- </xsl:element>
- </xsl:element>
- </xsl:when>
- <xsl:otherwise>
- <xsl:element name="style" namespace="">
- <xsl:attribute name="style:family">none</xsl:attribute>
- <xsl:attribute name="style:name"><xsl:value-of select="$style/@style:name"/></xsl:attribute>
- <xsl:element name="final-properties" namespace="">
- <xsl:apply-templates select="$style/*/@*">
- <xsl:with-param name="globalData" select="$globalData" />
- </xsl:apply-templates>
- </xsl:element>
- </xsl:element>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template mode="paragraphMerge" match="@fo:margin | @fo:margin-top | @fo:margin-bottom | @fo:margin-left | @fo:margin-right">
- <xsl:text>padding</xsl:text>
- <xsl:value-of select="substring-after(name(), 'fo:margin')"/>
- <xsl:text>:</xsl:text>
- <!-- Map once erroneusly used inch shortage 'inch' to CSS shortage 'in' -->
- <xsl:choose>
- <xsl:when test="contains(., 'inch')">
- <xsl:value-of select="substring-before(.,'ch')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="."/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text>; </xsl:text>
- </xsl:template>
-</xsl:stylesheet> \ No newline at end of file
+-->
+<!--
+ For further documentation and updates visit http://xml.openoffice.org/odf2xhtml
+-->
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
+ xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:dom="http://www.w3.org/2001/xml-events"
+ xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"
+ xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
+ xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
+ xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"
+ xmlns:math="http://www.w3.org/1998/Math/MathML"
+ xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
+ xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
+ xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
+ xmlns:ooo="http://openoffice.org/2004/office"
+ xmlns:oooc="http://openoffice.org/2004/calc"
+ xmlns:ooow="http://openoffice.org/2004/writer"
+ xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0"
+ xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
+ xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"
+ xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
+ xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
+ xmlns:xforms="http://www.w3.org/2002/xforms"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:xt="http://www.jclark.com/xt"
+ xmlns:common="http://exslt.org/common"
+ xmlns:xalan="http://xml.apache.org/xalan"
+ exclude-result-prefixes="chart config dc dom dr3d draw fo form math meta number office ooo oooc ooow script style svg table text xforms xlink xsd xsi xt common xalan">
+
+
+
+ <!-- ***************************************** -->
+ <!-- *** Gathering office style properties *** -->
+ <!-- ***************************************** -->
+
+ <!-- REASON FOR STYLESHEET:
+ In the OpenOffice documents styles are represented by a hierarchy.
+ (e.g. most styles are inherited from a default style).
+ Many other languages (as XHTML/CSS) do not support inherited styles.
+ The style inheritance have to be made flat/absolute for each style.
+
+ A further reason was, that the earlier style collection mechanism
+ had problems with CSS inline, which do not inherit from XML office defaults
+ nor font:family defaults as the style header does
+ (cp. stylesheet 'style_collector.xsl' and the 'write-default-styles' template)
+
+ RESULT OF STYLESHEET:
+ All styles will be returned in a variable containing styles with their inherited *:
+
+ <all-styles>
+ <style style:family="foo" style:name="x1">
+ <* fo:padding-left="0cm" fo:margin-right="0cm" />
+ </style>
+ <style style:family="muh" style:name="x2" >
+ <* fo:padding-left="3cm" ... />
+ </style>
+ ...
+
+ </all-styles>
+ -->
+
+
+ <xsl:template name="collect-global-odf-properties">
+ <!-- to access the variable as a node-set by XPATH expressions, it is necessary to convert it
+ from a result-tree-fragment (RTF) to a node set by a in a XSLT 1.0 non standarized function -->
+ <xsl:variable name="globalDataRTF">
+ <xsl:call-template name="collect-document-links-RTF" />
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="function-available('common:node-set')">
+ <xsl:call-template name="collect-style-properties">
+ <xsl:with-param name="globalData" select="common:node-set($globalDataRTF)" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="function-available('xalan:nodeset')">
+ <xsl:call-template name="collect-style-properties">
+ <xsl:with-param name="globalData" select="xalan:nodeset($globalDataRTF)" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="function-available('xt:node-set')">
+ <xsl:call-template name="collect-style-properties">
+ <xsl:with-param name="globalData" select="xt:node-set($globalDataRTF)" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message terminate="yes">The required node-set function was not found!</xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+
+
+ <xsl:template name="collect-style-properties">
+ <xsl:param name="globalData" />
+
+ <!-- Add the input file references to the new collected style properties -->
+ <xsl:variable name="globalDataRTF">
+ <xsl:copy-of select="$globalData" />
+ <xsl:call-template name="collect-style-properties-RTF">
+ <xsl:with-param name="globalData" select="$globalData" />
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="function-available('common:node-set')">
+ <xsl:call-template name="map-odf-style-properties">
+ <xsl:with-param name="globalData" select="common:node-set($globalDataRTF)" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="function-available('xalan:nodeset')">
+ <xsl:call-template name="map-odf-style-properties">
+ <xsl:with-param name="globalData" select="xalan:nodeset($globalDataRTF)" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="function-available('xt:node-set')">
+ <xsl:call-template name="map-odf-style-properties">
+ <xsl:with-param name="globalData" select="xt:node-set($globalDataRTF)" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message terminate="yes">The required node-set function was not found!</xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+
+ <xsl:template name="collect-document-links-RTF">
+ <!-- works for zipped office files, unzipped office files as for flat filter single office file format as well -->
+ <xsl:variable name="documentLinksRTF">
+ <xsl:choose>
+ <xsl:when test="office:document-content">
+ <xsl:element name="styles-file" namespace="">
+ <xsl:copy-of select="document(concat($sourceBaseURL, 'styles.xml'), .)" />
+ </xsl:element>
+ <xsl:element name="meta-file" namespace="">
+ <xsl:copy-of select="document(concat($sourceBaseURL, 'meta.xml'), .)" />
+ </xsl:element>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:element name="styles-file" namespace="">
+ <xsl:copy-of select="/" />
+ </xsl:element>
+ <xsl:element name="meta-file" namespace="">
+ <xsl:copy-of select="/" />
+ </xsl:element>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="function-available('common:node-set')">
+ <xsl:call-template name="collect-document-links">
+ <xsl:with-param name="documentLinks" select="common:node-set($documentLinksRTF)" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="function-available('xalan:nodeset')">
+ <xsl:call-template name="collect-document-links">
+ <xsl:with-param name="documentLinks" select="xalan:nodeset($documentLinksRTF)" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="function-available('xt:node-set')">
+ <xsl:call-template name="collect-document-links">
+ <xsl:with-param name="documentLinks" select="xt:node-set($documentLinksRTF)" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message terminate="yes">The required node-set function was not found!</xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ </xsl:template>
+
+
+ <xsl:template name="collect-document-links">
+ <xsl:param name="documentLinks" />
+
+ <xsl:element name="styles-file" namespace="">
+ <xsl:copy-of select="$documentLinks/styles-file/*" />
+ </xsl:element>
+
+ <xsl:element name="meta-file" namespace="">
+ <xsl:copy-of select="$documentLinks/meta-file/*" />
+ </xsl:element>
+
+ <xsl:copy-of select="$documentLinks/styles-file/*/office:styles" />
+ <xsl:copy-of select="$documentLinks/styles-file/*/office:font-face-decls" />
+
+ <!-- office:automatic-styles may be containted in two files (i.e. content.xml and styles.xml).
+ Wild card necessary as top level element differs from flat office files ("SampleName.fsxw") -->
+ <xsl:copy-of select="/*/office:automatic-styles" />
+
+ </xsl:template>
+
+
+ <xsl:template name="collect-style-properties-RTF">
+ <xsl:param name="globalData" />
+
+ <!--** DEFAULT STYLES: First adding some office defaults unwritten in XML -->
+ <xsl:variable name="defaultOfficeStyle-RTF">
+ <xsl:element name="style" namespace="">
+ <xsl:element name="style:properties" />
+ </xsl:element>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="function-available('common:node-set')">
+ <xsl:call-template name="collect-properties-defaults">
+ <xsl:with-param name="globalData" select="$globalData" />
+ <xsl:with-param name="defaultOfficeStyle" select="common:node-set($defaultOfficeStyle-RTF)" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="function-available('xalan:nodeset')">
+ <xsl:call-template name="collect-properties-defaults">
+ <xsl:with-param name="globalData" select="$globalData" />
+ <xsl:with-param name="defaultOfficeStyle" select="xalan:nodeset($defaultOfficeStyle-RTF)" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="function-available('xt:node-set')">
+ <xsl:call-template name="collect-properties-defaults">
+ <xsl:with-param name="globalData" select="$globalData" />
+ <xsl:with-param name="defaultOfficeStyle" select="xt:node-set($defaultOfficeStyle-RTF)" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message terminate="yes">ERROR: Function not found: 'Nodeset'</xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+
+ <xsl:template name="collect-properties-defaults">
+ <xsl:param name="globalData" />
+ <xsl:param name="defaultOfficeStyle" />
+
+ <!--** DEFAULT STYLES: Adding the default styles of a style:family, by adding each office:styles/style:default-style element **-->
+ <xsl:variable name="defaultFamilyStyles-RTF">
+ <xsl:for-each select="$globalData/office:styles/style:default-style">
+ <xsl:element name="style" namespace="">
+ <xsl:copy-of select="@style:family" />
+ <xsl:call-template name="create-inherited-style-properties">
+ <xsl:with-param name="inheritedStyleProperties" select="$defaultOfficeStyle/style/*" />
+ </xsl:call-template>
+ </xsl:element>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="function-available('common:node-set')">
+ <xsl:call-template name="collect-properties">
+ <xsl:with-param name="globalData" select="$globalData" />
+ <xsl:with-param name="defaultOfficeStyle" select="$defaultOfficeStyle" />
+ <xsl:with-param name="defaultFamilyStyles" select="common:node-set($defaultFamilyStyles-RTF)" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="function-available('xalan:nodeset')">
+ <xsl:call-template name="collect-properties">
+ <xsl:with-param name="globalData" select="$globalData" />
+ <xsl:with-param name="defaultOfficeStyle" select="$defaultOfficeStyle" />
+ <xsl:with-param name="defaultFamilyStyles" select="xalan:nodeset($defaultFamilyStyles-RTF)" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="function-available('xt:node-set')">
+ <xsl:call-template name="collect-properties">
+ <xsl:with-param name="globalData" select="$globalData" />
+ <xsl:with-param name="defaultOfficeStyle" select="$defaultOfficeStyle" />
+ <xsl:with-param name="defaultFamilyStyles" select="xt:node-set($defaultFamilyStyles-RTF)" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message terminate="yes">ERROR: Function not found: nodeset</xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+
+ <xsl:template name="collect-properties">
+ <xsl:param name="globalData" />
+ <xsl:param name="defaultOfficeStyle" />
+ <xsl:param name="defaultFamilyStyles" />
+
+ <!--** traversee all style trees - branch after branch - collecting style properties **-->
+ <xsl:element name="all-doc-styles" namespace="">
+
+ <!-- Background Information:
+
+ There are two different types of styles in the Office:
+ 1) The office:styles from the user pre-defined style templates
+ 2) The automatic:styles, which are created whenever a user uses explicit style formatting.
+
+ The office:styles only have parent styles in the office:styles,
+ but automatic:styles may inherit from both office:styles and themself.
+ -->
+
+ <!--** traversee all office:styles trees beginning with the top-level styles **-->
+ <xsl:for-each select="$globalData/office:styles/style:style[not(@style:parent-style-name)]">
+ <!-- Looking for parents from style:family
+ <xsl:for-each select="$globalData/office:styles/style:style[@style:family=current()/@style:family][not(@style:parent-style-name)]"> -->
+ <xsl:choose>
+ <xsl:when test="$defaultFamilyStyles/style[@style:family=current()/@style:family]">
+ <xsl:call-template name="inherit-style-for-self-and-children">
+ <xsl:with-param name="globalData" select="$globalData" />
+ <xsl:with-param name="inheritedStyleProperties" select="$defaultFamilyStyles/style[@style:family=current()/@style:family]/*" />
+ <xsl:with-param name="searchOnlyInAutomaticStyles" select="false()" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="inherit-style-for-self-and-children">
+ <xsl:with-param name="globalData" select="$globalData" />
+ <xsl:with-param name="inheritedStyleProperties" select="$defaultOfficeStyle/style/*" />
+ <xsl:with-param name="searchOnlyInAutomaticStyles" select="false()" />
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ <!--** creates a style element with style:name and style:family attribute and
+ an element representing the absolute style properties style:property ** -->
+ </xsl:for-each>
+
+ <!--** traversee all office:automatic-styles trees beginning with the top-level styles **-->
+ <xsl:for-each select="$globalData/office:automatic-styles/style:style[not(@style:parent-style-name)]">
+ <!--** creates a style element with style:name and style:family attribute and
+ an element representing the absolute style properties style:property ** -->
+ <xsl:choose>
+ <xsl:when test="$defaultFamilyStyles/style[@style:family=current()/@style:family]">
+ <xsl:call-template name="inherit-style-for-self-and-children">
+ <xsl:with-param name="globalData" select="$globalData" />
+ <xsl:with-param name="inheritedStyleProperties" select="$defaultFamilyStyles/style[@style:family=current()/@style:family]/*" />
+ <xsl:with-param name="searchOnlyInAutomaticStyles" select="true()" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="inherit-style-for-self-and-children">
+ <xsl:with-param name="globalData" select="$globalData" />
+ <xsl:with-param name="inheritedStyleProperties" select="$defaultOfficeStyle/style/*" />
+ <xsl:with-param name="searchOnlyInAutomaticStyles" select="true()" />
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ </xsl:for-each>
+
+ </xsl:element>
+ <!-- debug output in case only styles should be given out (regression test) -->
+ <xsl:if test="$onlyStyleOutputEnabled">
+ <xsl:element name="defaultOfficeStyle" namespace="">
+ <xsl:copy-of select="$defaultOfficeStyle" />
+ </xsl:element>
+ <xsl:element name="defaultFamilyStyles" namespace="">
+ <xsl:copy-of select="$defaultFamilyStyles" />
+ </xsl:element>
+ </xsl:if>
+
+ </xsl:template>
+
+
+ <xsl:template name="inherit-style-for-self-and-children">
+ <xsl:param name="globalData" />
+ <xsl:param name="inheritedStyleProperties" />
+ <xsl:param name="searchOnlyInAutomaticStyles" />
+
+ <!--** create an absolute style by inherting properties from the given parent properties **-->
+ <xsl:variable name="newStyleProperties-RTF">
+ <xsl:call-template name="create-inherited-style-properties">
+ <xsl:with-param name="inheritedStyleProperties" select="$inheritedStyleProperties" />
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="function-available('common:node-set')">
+ <xsl:variable name="newStyleProperties" select="common:node-set($newStyleProperties-RTF)" />
+
+ <xsl:element name="style" namespace="">
+ <xsl:copy-of select="@style:family" />
+ <xsl:copy-of select="@style:name" />
+ <xsl:copy-of select="$newStyleProperties" />
+ </xsl:element>
+
+ <xsl:choose>
+ <xsl:when test="$searchOnlyInAutomaticStyles">
+ <xsl:call-template name="get-children">
+ <xsl:with-param name="globalData" select="$globalData" />
+ <xsl:with-param name="searchOnlyInAutomaticStyles" select="true()" />
+ <xsl:with-param name="inheritedStyleProperties" select="$newStyleProperties/*" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <!--** for all automatic-children of the current office:styles **-->
+ <xsl:call-template name="get-children">
+ <xsl:with-param name="globalData" select="$globalData" />
+ <xsl:with-param name="searchOnlyInAutomaticStyles" select="false()" />
+ <xsl:with-param name="inheritedStyleProperties" select="$newStyleProperties/*" />
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="function-available('xalan:nodeset')">
+ <xsl:variable name="newStyleProperties" select="xalan:nodeset($newStyleProperties-RTF)" />
+
+ <xsl:element name="style" namespace="">
+ <xsl:copy-of select="@style:family" />
+ <xsl:copy-of select="@style:name" />
+ <xsl:copy-of select="$newStyleProperties" />
+ </xsl:element>
+
+ <xsl:choose>
+ <xsl:when test="$searchOnlyInAutomaticStyles">
+ <xsl:call-template name="get-children">
+ <xsl:with-param name="globalData" select="$globalData" />
+ <xsl:with-param name="searchOnlyInAutomaticStyles" select="true()" />
+ <xsl:with-param name="inheritedStyleProperties" select="$newStyleProperties/*" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <!--** for all automatic-children of the current office:styles **-->
+ <xsl:call-template name="get-children">
+ <xsl:with-param name="globalData" select="$globalData" />
+ <xsl:with-param name="searchOnlyInAutomaticStyles" select="false()" />
+ <xsl:with-param name="inheritedStyleProperties" select="$newStyleProperties/*" />
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="function-available('xt:node-set')">
+ <xsl:variable name="newStyleProperties" select="xt:node-set($newStyleProperties-RTF)" />
+
+ <xsl:element name="style" namespace="">
+ <xsl:copy-of select="@style:family" />
+ <xsl:copy-of select="@style:name" />
+ <xsl:copy-of select="$newStyleProperties" />
+ </xsl:element>
+
+ <xsl:choose>
+ <xsl:when test="$searchOnlyInAutomaticStyles">
+ <xsl:call-template name="get-children">
+ <xsl:with-param name="globalData" select="$globalData" />
+ <xsl:with-param name="searchOnlyInAutomaticStyles" select="true()" />
+ <xsl:with-param name="inheritedStyleProperties" select="$newStyleProperties/*" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <!--** for all automatic-children of the current office:styles **-->
+ <xsl:call-template name="get-children">
+ <xsl:with-param name="globalData" select="$globalData" />
+ <xsl:with-param name="searchOnlyInAutomaticStyles" select="false()" />
+ <xsl:with-param name="inheritedStyleProperties" select="$newStyleProperties/*" />
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message terminate="yes">ERROR: Function not found: nodeset</xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+
+ <xsl:template name="get-children">
+ <xsl:param name="globalData" />
+ <xsl:param name="searchOnlyInAutomaticStyles" />
+ <xsl:param name="inheritedStyleProperties" select="*" />
+
+<!-- QUESTION: Parent style is only unique by name and family, but what about cross family inheritance? -->
+ <!-- For each child style (that is every style which has the given parentStyleName as style:parent-style-name and the same style:family -->
+ <xsl:variable name="parentStyleFamily" select="@style:family" />
+ <xsl:variable name="parentStyleName" select="@style:name" />
+ <xsl:if test="not($searchOnlyInAutomaticStyles)">
+ <xsl:for-each select="$globalData/office:styles/style:style[@style:family=$parentStyleFamily and @style:parent-style-name=$parentStyleName]">
+ <xsl:call-template name="inherit-style-for-self-and-children">
+ <xsl:with-param name="globalData" select="$globalData" />
+ <xsl:with-param name="inheritedStyleProperties" select="$inheritedStyleProperties" />
+ <xsl:with-param name="searchOnlyInAutomaticStyles" select="$searchOnlyInAutomaticStyles" />
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:for-each select="$globalData/office:automatic-styles/style:style[@style:family=$parentStyleFamily and @style:parent-style-name=$parentStyleName]">
+ <xsl:call-template name="inherit-style-for-self-and-children">
+ <xsl:with-param name="globalData" select="$globalData" />
+ <xsl:with-param name="inheritedStyleProperties" select="$inheritedStyleProperties" />
+ <xsl:with-param name="searchOnlyInAutomaticStyles" select="$searchOnlyInAutomaticStyles" />
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:template>
+
+
+ <xsl:template name="create-inherited-style-properties">
+ <xsl:param name="inheritedStyleProperties" />
+
+ <xsl:element name="style:properties">
+ <!-- Writing all inherited style properties -->
+ <xsl:for-each select="$inheritedStyleProperties/@*">
+ <xsl:sort select="name()" />
+ <xsl:copy-of select="." />
+ </xsl:for-each>
+
+ <!--All current attributes will override already inserted attributes of the same name
+ XSLT Spec: "Adding an attribute to an element replaces any existing attribute of that element with the same expanded-name." -->
+ <xsl:for-each select="*/@*[name() != 'style:font-size-rel']">
+ <xsl:copy-of select="." />
+ </xsl:for-each>
+
+ <xsl:if test="*/@style:font-size-rel">
+<!--
+ The intheritedStyleProperties should include a absolute Font Size, but
+ <style:properties
+ xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
+ xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
+ style:font-name="Courier New"
+ fo:language="en"
+ fo:country="US"
+ style:font-name-asian=Courier New"
+ style:font-name-complex="Courier New"/>
+-->
+ <xsl:variable name="fontSizeAbsolute">
+ <xsl:call-template name="convert2pt">
+ <xsl:with-param name="value" select="$inheritedStyleProperties/@fo:font-size" />
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="fontSizeRelative">
+ <xsl:call-template name="convert2pt">
+ <xsl:with-param name="value" select="*/@style:font-size-rel" />
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:attribute name="fo:font-size">
+ <xsl:value-of select="$fontSizeAbsolute + $fontSizeRelative"/>
+ <xsl:text>pt</xsl:text>
+ </xsl:attribute>
+ </xsl:if>
+
+ <!-- providing tabulator indentation -->
+ <xsl:copy-of select="$inheritedStyleProperties/style:tab-stops"/>
+ <xsl:copy-of select="*/style:tab-stops"/>
+ </xsl:element>
+ </xsl:template>
+
+ <!-- debugging & testing purpose -->
+ <xsl:template name="write-collected-styles">
+ <xsl:param name="globalData" />
+
+ <xsl:message>&lt;all-doc-styles&gt;</xsl:message>
+ <xsl:for-each select="$globalData/all-doc-styles/style">
+ <xsl:message>&lt;style</xsl:message>
+ <xsl:message>style:family="<xsl:value-of select="current()/@style:family" />"&gt;</xsl:message>
+ <xsl:message>style:name="<xsl:value-of select="current()/@style:name" />" </xsl:message>
+ <xsl:message> &lt;*</xsl:message>
+ <xsl:for-each select="*/@*">
+ <xsl:message>
+ <xsl:text></xsl:text>
+ <xsl:value-of select="name()" />="<xsl:value-of select="." />"</xsl:message>
+ </xsl:for-each>
+ <xsl:message>/&gt;</xsl:message>
+ <xsl:message>&lt;/style&gt;</xsl:message>
+ </xsl:for-each>
+ <xsl:message>&lt;/all-doc-styles&gt;</xsl:message>
+ </xsl:template>
+
+ <xsl:template name="map-odf-style-properties">
+ <xsl:param name="globalData" />
+
+ <xsl:choose>
+ <!--+++++ DEBUG STYLE OUTPUT FOR REGRESSION TEST +++++-->
+ <!-- create styles file from the style variable (testing switch) -->
+ <xsl:when test="$onlyStyleOutputEnabled">
+
+ <xsl:element name="debug-output" namespace="">
+ <xsl:copy-of select="$globalData" />
+ <xsl:call-template name="map-odf-properties">
+ <xsl:with-param name="globalData" select="$globalData" />
+ </xsl:call-template>
+ </xsl:element>
+ </xsl:when>
+
+ <!-- create XHTML file -->
+ <xsl:otherwise>
+ <!-- to access the variable like a node-set it is necessary to convert it
+ from a result-tree-fragment (RTF) to a node set using the James Clark extension -->
+ <xsl:variable name="globalDataRTF">
+ <!-- raw properties still needed for table width attribute creation -->
+ <xsl:copy-of select="$globalData" />
+ <xsl:call-template name="map-odf-properties">
+ <xsl:with-param name="globalData" select="$globalData" />
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="function-available('common:node-set')">
+ <xsl:call-template name="start-main">
+ <xsl:with-param name="globalData" select="common:node-set($globalDataRTF)" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="function-available('xalan:nodeset')">
+ <xsl:call-template name="start-main">
+ <xsl:with-param name="globalData" select="xalan:nodeset($globalDataRTF)" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="function-available('xt:node-set')">
+ <xsl:call-template name="start-main">
+ <xsl:with-param name="globalData" select="xt:node-set($globalDataRTF)" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message terminate="yes">ERROR: Function not found: nodeset</xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- REASON FOR TEMPLATE:
+ The OpenOffice style properities gathered in the variable 'globalData' have to be mapped to the CSS style format
+ -->
+ <xsl:template name="map-odf-properties">
+ <xsl:param name="globalData" />
+ <xsl:element name="all-styles" namespace="">
+ <xsl:for-each select="$globalData/all-doc-styles/style">
+ <xsl:sort select="@style:family" />
+ <xsl:sort select="@style:name" />
+
+ <xsl:call-template name="writeUsedStyles">
+ <xsl:with-param name="globalData" select="$globalData" />
+ <xsl:with-param name="style" select="."/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:element>
+ </xsl:template>
+
+ <xsl:key name="elementUsingStyle" match="*" use="@text:style-name | @draw:style-name | @draw:text-style-name | @table:style-name | @table:default-cell-style-name"/>
+ <xsl:key name="listLabelStyleInStyles" match="/*/office:styles/text:list-style/* |
+ /*/office:styles/style:graphic-properties/text:list-style/*" use="@text:style-name"/>
+
+ <xsl:key name="listLabelStyleInContent" match="/*/office:automatic-styles/text:list-style/* | /*/office:automatic-styles/style:graphic-properties/text:list-style/*" use="@text:style-name"/>
+
+
+ <xsl:variable name="documentRoot" select="/" />
+ <xsl:template name="writeUsedStyles">
+ <xsl:param name="globalData" />
+ <xsl:param name="style"/>
+
+ <!-- for-each changes the key environment from the previously globalData back to the document root -->
+ <xsl:for-each select="$documentRoot">
+ <!-- only styles, which are used in the content are written as CSS styles -->
+ <xsl:choose>
+ <xsl:when test="key('elementUsingStyle', $style/@style:name)/@* or key('listLabelStyleInContent', $style/@style:name)/@*">
+ <xsl:call-template name="writeUsedStyles2">
+ <xsl:with-param name="globalData" select="$globalData" />
+ <xsl:with-param name="style" select="$style" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="not(office:document-content)">
+ <xsl:if test="key('listLabelStyleInStyles', $style/@style:name)/@* or /*/office:styles/text:notes-configuration[@text:citation-style-name = $style/@style:name or /*/office:styles/@text:citation-body-style-name=$style/@style:name]">
+ <!-- if there are consecutive paragraphs with borders (OR background AND margin ), only the first and the last have the top/bottom border
+ unless style:join-border="false" -->
+ <xsl:call-template name="writeUsedStyles2">
+ <xsl:with-param name="globalData" select="$globalData" />
+ <xsl:with-param name="style" select="$style" />
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="document($stylesFileURL)">
+ <xsl:if test="key('listLabelStyleInStyles', $style/@style:name)/@* or /*/office:styles/text:notes-configuration[@text:citation-style-name = $style/@style:name or /*/office:styles/@text:citation-body-style-name=$style/@style:name]">
+ <!-- if there are consecutive paragraphs with borders (OR background AND margin ), only the first and the last have the top/bottom border
+ unless style:join-border="false" -->
+ <xsl:call-template name="writeUsedStyles2">
+ <xsl:with-param name="globalData" select="$globalData" />
+ <xsl:with-param name="style" select="$style" />
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="writeUsedStyles2">
+ <xsl:param name="globalData" />
+ <xsl:param name="style"/>
+ <xsl:choose>
+ <xsl:when test="
+ $style/@style:family='paragraph'
+ and((
+ (
+ $style/*/@fo:border-top
+ or $style/*/@fo:border-bottom
+ or $style/*/@fo:border
+ )
+ and
+ (
+ not($style/*/@style:join-border)
+ or $style/*/@style:join-border = 'true'
+ )
+ )
+ or
+ (
+ (
+ $style/*/@fo:margin-top
+ or $style/*/@fo:margin-bottom
+ or $style/*/@fo:margin
+ )
+ and
+ ( $style/*/@fo:background-color
+ and
+ not($style/*/fo:background-color='transparent')
+ )
+ )
+ )">
+ <xsl:element name="style" namespace="">
+ <xsl:copy-of select="$style/@style:family" />
+ <xsl:attribute name="style:name"><xsl:value-of select="concat($style/@style:name, '_borderStart')" /></xsl:attribute>
+ <xsl:element name="final-properties" namespace="">
+ <xsl:apply-templates select="$style/*/@*[not(name() = 'fo:border-bottom')][not(name() = 'fo:padding-bottom')][not(name() = 'fo:margin-bottom')][not(name() = 'fo:margin')]">
+ <xsl:with-param name="globalData" select="$globalData" />
+ </xsl:apply-templates>
+ <xsl:apply-templates mode="paragraphMerge" select="$style/*/@*[name() = 'fo:margin-bottom' or name() = 'fo:margin']">
+ <xsl:with-param name="globalData" select="$globalData" />
+ </xsl:apply-templates>
+ <xsl:text> border-bottom-style:none; </xsl:text>
+ </xsl:element>
+ </xsl:element>
+ <xsl:element name="style" namespace="">
+ <xsl:copy-of select="$style/@style:family" />
+ <xsl:copy-of select="$style/@style:name" />
+ <xsl:attribute name="mergedBorders"><xsl:value-of select="true()" /></xsl:attribute>
+ <xsl:element name="final-properties" namespace="">
+ <xsl:apply-templates select="$style/*/@*[not(name() = 'fo:border-top') and not(name() = 'fo:border-bottom')][not(name() = 'fo:padding-top') and not(name() = 'fo:padding-bottom')][not(name() = 'fo:margin-top') and not(name() = 'fo:margin-bottom')][not(name() = 'fo:margin')]">
+ <xsl:with-param name="globalData" select="$globalData" />
+ </xsl:apply-templates>
+ <xsl:apply-templates mode="paragraphMerge" select="$style/*/@*[name() = 'fo:margin-top' or name() = 'fo:margin-bottom' or name() = 'fo:margin']">
+ <xsl:with-param name="globalData" select="$globalData" />
+ </xsl:apply-templates>
+ <xsl:text> border-top-style:none; border-bottom-style:none; </xsl:text>
+ </xsl:element>
+ </xsl:element>
+ <xsl:element name="style" namespace="">
+ <xsl:copy-of select="$style/@style:family" />
+ <xsl:attribute name="style:name"><xsl:value-of select="concat($style/@style:name, '_borderEnd')" /></xsl:attribute>
+ <xsl:element name="final-properties" namespace="">
+ <xsl:apply-templates select="$style/*/@*[not(name() = 'fo:border-top')][not(name() = 'fo:padding-top')][not(name() = 'fo:margin-top')][not(name() = 'fo:margin')]">
+ <xsl:with-param name="globalData" select="$globalData" />
+ </xsl:apply-templates>
+ <xsl:apply-templates mode="paragraphMerge" select="$style/*/@*[name() = 'fo:margin-top' or name() = 'fo:margin']">
+ <xsl:with-param name="globalData" select="$globalData" />
+ </xsl:apply-templates>
+ <xsl:text> border-top-style:none;</xsl:text>
+ </xsl:element>
+ </xsl:element>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="not(key('listLabelStyleInStyles', $style/@style:name)/@*)">
+ <xsl:element name="style" namespace="">
+ <xsl:copy-of select="$style/@style:family" />
+ <xsl:copy-of select="$style/@style:name" />
+ <xsl:element name="final-properties" namespace="">
+ <xsl:apply-templates select="$style/*/@*">
+ <xsl:with-param name="globalData" select="$globalData" />
+ </xsl:apply-templates>
+ </xsl:element>
+ </xsl:element>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:element name="style" namespace="">
+ <xsl:attribute name="style:family">none</xsl:attribute>
+ <xsl:attribute name="style:name"><xsl:value-of select="$style/@style:name"/></xsl:attribute>
+ <xsl:element name="final-properties" namespace="">
+ <xsl:apply-templates select="$style/*/@*">
+ <xsl:with-param name="globalData" select="$globalData" />
+ </xsl:apply-templates>
+ </xsl:element>
+ </xsl:element>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template mode="paragraphMerge" match="@fo:margin | @fo:margin-top | @fo:margin-bottom | @fo:margin-left | @fo:margin-right">
+ <xsl:text>padding</xsl:text>
+ <xsl:value-of select="substring-after(name(), 'fo:margin')"/>
+ <xsl:text>:</xsl:text>
+ <!-- Map once erroneusly used inch shortage 'inch' to CSS shortage 'in' -->
+ <xsl:choose>
+ <xsl:when test="contains(., 'inch')">
+ <xsl:value-of select="substring-before(.,'ch')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="."/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:text>; </xsl:text>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/filter/source/xslt/odf2xhtml/export/common/table_of_content.xsl b/filter/source/xslt/odf2xhtml/export/common/table_of_content.xsl
index 5934e2e3a87e..acdc3dd0412d 100644
--- a/filter/source/xslt/odf2xhtml/export/common/table_of_content.xsl
+++ b/filter/source/xslt/odf2xhtml/export/common/table_of_content.xsl
@@ -2,23 +2,23 @@
<!--
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>
@@ -50,7 +50,7 @@
<xsl:param name="globalData"/>
<xsl:choose>
- <xsl:when test="*/text:tab[1] or */*/text:tab[1]">
+ <xsl:when test="parent::table-of-content and */text:tab[1] or */*/text:tab[1]">
<xsl:call-template name="createIndexBodyTable">
<xsl:with-param name="globalData" select="$globalData"/>
</xsl:call-template>
@@ -93,18 +93,18 @@
<xsl:attribute name="border">0</xsl:attribute>
<xsl:attribute name="cellspacing">0</xsl:attribute>
<xsl:attribute name="cellpadding">0</xsl:attribute>
- <xsl:if test="parent::*/@text:style-name">
+ <xsl:if test="parent::*/@text:style-name">
<!-- parent as index:body has no style -->
- <xsl:variable name="value" select="$globalData/all-doc-styles/style[@style:name = current()/parent::*/@text:style-name]/*/@style:rel-width"/>
- <xsl:if test="$value">
- <xsl:attribute name="width">
- <xsl:value-of select="$value"/>
- </xsl:attribute>
- </xsl:if>
- <xsl:attribute name="class">
- <xsl:value-of select="translate(parent::*/@text:style-name, '.,;: %()[]/\+', '_____________')"/>
- </xsl:attribute>
- </xsl:if>
+ <xsl:variable name="value" select="$globalData/all-doc-styles/style[@style:name = current()/parent::*/@text:style-name]/*/@style:rel-width"/>
+ <xsl:if test="$value">
+ <xsl:attribute name="width">
+ <xsl:value-of select="$value"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:attribute name="class">
+ <xsl:value-of select="translate(parent::*/@text:style-name, '.,;: %()[]/\+', '_____________')"/>
+ </xsl:attribute>
+ </xsl:if>
<xsl:element namespace="{$namespace}" name="colgroup">
<xsl:choose>
@@ -489,32 +489,66 @@ Scenarios unmatched:
<!-- CREATION OF A CONTENT TABLE LINK -->
<!-- ************************************** -->
+ <xsl:key name="bookmark" match="text:bookmark | text:bookmark-start" use="@text:name"/>
<!-- content table link -->
<xsl:template match="text:a" mode="content-table">
<xsl:param name="globalData"/>
- <xsl:variable name="text">
- <xsl:choose>
- <!-- heuristic assumption that first in a content table row, there is numbering (if at all) and than the text,
- furthermore that a tab will separate the to be neglected page number -->
- <xsl:when test="text:tab">
- <xsl:value-of select="text()[1]"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="text()"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <!-- REFERENCE HANDLING - HREF -->
- <xsl:element namespace="{$namespace}" name="a">
- <xsl:attribute name="href">
- <xsl:text>#</xsl:text>
- <xsl:value-of select='concat("a_", translate(normalize-space($text), "&#xA;&amp;&lt;&gt;.,;: %()[]/\+", "_______________________________"))'/>
- </xsl:attribute>
- <xsl:value-of select="$text"/>
- </xsl:element>
+ <xsl:variable name="name" select="substring(@xlink:href,2)"/>
+
+ <xsl:variable name="text">
+ <xsl:choose>
+ <!-- heuristic assumption that first in a content table row, there is numbering (if at all) and than the text,
+ furthermore that a tab will separate the to be neglected page number -->
+ <xsl:when test="text:tab">
+ <xsl:call-template name="write-text-without-line-numbers">
+ <xsl:with-param name="textCount" select="count(text())"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="text()"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- REFERENCE HANDLING - HREF -->
+ <xsl:element namespace="{$namespace}" name="a">
+ <xsl:attribute name="href">
+ <xsl:text>#</xsl:text>
+ <xsl:choose>
+ <xsl:when test="key('bookmark',$name)">
+ <xsl:value-of select="$name"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select='concat("a_", translate(normalize-space($text), "&#xA;&amp;&lt;&gt;.,;: %()[]/\+", "_______________________________"))'/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <xsl:value-of select="$text"/>
+ </xsl:element>
+ </xsl:template>
+
+ <!-- Heuristic: write out text separated by elements, leaving the last number out (mostly text number) -->
+ <xsl:template name="write-text-without-line-numbers">
+ <xsl:param name="textCount"/>
+ <xsl:param name="textNodeNumber" select="1"/>
+
+ <xsl:choose>
+ <xsl:when test="$textCount &gt; $textNodeNumber">
+ <xsl:value-of select="text()[$textNodeNumber]"/>
+ <xsl:call-template name="write-text-without-line-numbers">
+ <xsl:with-param name="textCount" select="$textCount"/>
+ <xsl:with-param name="textNodeNumber" select="$textNodeNumber + 1"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:if test="not(number(text()[$textNodeNumber]) &gt; -1)">
+ <xsl:value-of select="text()[$textNodeNumber]"/>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+
</xsl:template>
<xsl:template match="text:s" mode="content-table">
@@ -542,13 +576,13 @@ Scenarios unmatched:
</xsl:element>
</xsl:if>
</xsl:template>
-
+
<xsl:template match="text()" mode="content-table">
- <!-- Heuristic to remove page numbers (useless in HTML) in the content table
+ <!-- Heuristic to remove page numbers (useless in HTML) in the content table
usually after a tab -->
<xsl:if test="name(preceding-sibling::*[1]) != 'text:tab' and not(number() &gt; -1)">
<xsl:value-of select="."/>
</xsl:if>
</xsl:template>
-
+
</xsl:stylesheet>
diff --git a/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl b/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
index 1c47b8f25ce8..99c2b45d1b0a 100644
--- a/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
+++ b/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
@@ -57,7 +57,6 @@
<xsl:key match="style:master-page" name="masterPageElements" use="@style:name"/>
<xsl:key match="style:page-layout" name="pageLayoutElements" use="@style:name"/>
<xsl:key name="writingModeStyles" match="/*/office:styles/style:style/style:paragraph-properties/@style:writing-mode | /*/office:automatic-styles/style:style/style:paragraph-properties/@style:writing-mode" use="'test'"/>
-
<xsl:template name="create-body">
<xsl:param name="globalData"/>
<xsl:call-template name="create-body.collect-page-properties">
@@ -76,7 +75,8 @@
<xsl:if test="key('elementUsingStyle', ../@style:name)">
<!-- Check every master-page-name if it is not emtpy and return as ';' separated list -->
<xsl:if test="string-length(../@style:master-page-name) &gt; 0">
- <xsl:value-of select="../@style:master-page-name"/>;</xsl:if>
+ <xsl:value-of select="../@style:master-page-name"/>;
+ </xsl:if>
</xsl:if>
</xsl:for-each>
</xsl:variable>
@@ -86,7 +86,7 @@
<xsl:variable name="pagePropertiesRTF">
<xsl:choose>
<xsl:when test="not($pageLayoutName) or $pageLayoutName = ''">
- <xsl:value-of select="$globalData/styles-file/*/office:automatic-styles/style:page-layout[1]/style:page-layout-properties"/>
+ <xsl:copy-of select="$globalData/styles-file/*/office:automatic-styles/style:page-layout[1]/style:page-layout-properties"/>
</xsl:when>
<xsl:otherwise>
<!-- Find the according style:page-layout and store the properties in a variable -->
@@ -404,7 +404,7 @@
&#160; is an unbreakable whitespace to give conent to the element and force a browser not to ignore the element -->
<div style="clear:both; line-height:0; width:0; height:0; margin:0; padding:0;">&#160;</div>
</xsl:when>
- <xsl:when test="text:tab">
+ <xsl:when test="text:tab and not(ancestor::text:index-body)">
<!-- If there is a tabulator (ie. text:tab) within a paragraph, a heuristic for ODF tabulators creates a
span for every text:tab embracing the following text nodes aligning them according to the tabulator.
A line break or another text:tab starts a new text:span, line break even the tab counter for the line.
@@ -511,8 +511,9 @@
<!-- every frame sibling have to be incapuslated within a div with left indent -->
<xsl:element name="span">
<xsl:choose>
- <xsl:when test="count($tabStops/style:tab-stop) &lt; 3">
+ <xsl:when test="count($tabStops/style:tab-stop) &gt; 0 and count($tabStops/style:tab-stop) &lt; 3">
<!-- only allow the heuristic when the style has less than 3 TABS -->
+ <!-- ignore heuristics if no TABS are defined -->
<xsl:attribute name="style">
<xsl:call-template name="createTabIndent">
<xsl:with-param name="globalData" select="$globalData"/>
@@ -615,6 +616,11 @@
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
+ <!--<xsl:message>TAB: tabCount=
+ <xsl:value-of select="$tabCount"/>, tabPosition=
+ <xsl:value-of select="$tabPosition"/>, tabIndent=
+ <xsl:value-of select="$tabIndent"/>
+ </xsl:message>-->
<xsl:choose>
<xsl:when test="$tabIndent='NaN'">
<xsl:variable name="tabPositionTmp">
@@ -785,7 +791,7 @@
<xsl:with-param name="globalData" select="$globalData"/>
<xsl:with-param name="previousFrameWidths" select="$previousFrameWidths"/>
<xsl:with-param name="previousFrameHeights" select="$previousFrameHeights"/>
- <xsl:with-param name="parentMarginLeft" select="$parentMarginLeft"/>
+ <xsl:with-param name="parentMarginLeft" select="$parentMarginLeft"/>
</xsl:call-template>
<!-- next elements will be called after the creation with the new indent (plus width of frame) -->
</xsl:when>
@@ -891,7 +897,9 @@
<xsl:with-param name="previousFrameHeights" select="$previousFrameHeights"/>
</xsl:call-template>
<!-- after the last draw:frame sibling the CSS float is disabled -->
- <div style="clear:both; line-height:0; width:0; height:0; margin:0; padding:0;">&#160;</div>
+ <xsl:if test="@text:anchor-type!='as-char'">
+ <div style="clear:both; line-height:0; width:0; height:0; margin:0; padding:0;">&#160;</div>
+ </xsl:if>
</xsl:template>
<xsl:template name="getPageMarginLeft">
@@ -903,7 +911,8 @@
<xsl:if test="key('elementUsingStyle', ../@style:name)">
<!-- Check every master-page-name if it is not emtpy and return as ';' separated list -->
<xsl:if test="string-length(../@style:master-page-name) &gt; 0">
- <xsl:value-of select="../@style:master-page-name"/>;</xsl:if>
+ <xsl:value-of select="../@style:master-page-name"/>;
+ </xsl:if>
</xsl:if>
</xsl:for-each>
</xsl:variable>
@@ -1030,21 +1039,21 @@
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>-->
- <xsl:call-template name="createDrawFrame2">
- <xsl:with-param name="globalData" select="$globalData"/>
- <xsl:with-param name="previousFrameWidths" select="$previousFrameWidths + $svgWidth"/>
- <xsl:with-param name="parentMarginLeftNew" select="$parentMarginLeftNew"/>
- <xsl:with-param name="leftPosition" select="$leftPosition"/>
- <xsl:with-param name="svgY" select="$svgY"/>
- </xsl:call-template>
- <xsl:apply-templates select="following-sibling::node()[1]" mode="frameFloating">
- <xsl:with-param name="globalData" select="$globalData"/>
- <xsl:with-param name="previousFrameWidths" select="$previousFrameWidths + $svgWidth"/>
- <xsl:with-param name="parentMarginLeft" select="$parentMarginLeftNew"/>
- <xsl:with-param name="leftPosition" select="$leftPosition"/>
- <xsl:with-param name="createDiv" select="true()"/>
- <xsl:with-param name="noDivBefore" select="false()"/>
- </xsl:apply-templates>
+ <xsl:call-template name="createDrawFrame2">
+ <xsl:with-param name="globalData" select="$globalData"/>
+ <xsl:with-param name="previousFrameWidths" select="$previousFrameWidths + $svgWidth"/>
+ <xsl:with-param name="parentMarginLeftNew" select="$parentMarginLeftNew"/>
+ <xsl:with-param name="leftPosition" select="$leftPosition"/>
+ <xsl:with-param name="svgY" select="$svgY"/>
+ </xsl:call-template>
+ <xsl:apply-templates select="following-sibling::node()[1]" mode="frameFloating">
+ <xsl:with-param name="globalData" select="$globalData"/>
+ <xsl:with-param name="previousFrameWidths" select="$previousFrameWidths + $svgWidth"/>
+ <xsl:with-param name="parentMarginLeft" select="$parentMarginLeftNew"/>
+ <xsl:with-param name="leftPosition" select="$leftPosition"/>
+ <xsl:with-param name="createDiv" select="true()"/>
+ <xsl:with-param name="noDivBefore" select="false()"/>
+ </xsl:apply-templates>
<!--
</xsl:otherwise>
@@ -1058,20 +1067,31 @@
<xsl:param name="leftPosition" />
<xsl:param name="svgY" />
- <xsl:comment>Next 'div' is a draw:frame.</xsl:comment>
- <xsl:element name="div">
+ <xsl:variable name="elem-name">
+ <xsl:choose>
+ <xsl:when test="@text:anchor-type='as-char'">span</xsl:when>
+ <xsl:otherwise>div</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:comment>Next '
+ <xsl:value-of select="$elem-name"/>' is a draw:frame.
+ </xsl:comment>
+ <xsl:element name="{$elem-name}">
<xsl:attribute name="style">
<xsl:call-template name="widthAndHeight"/>
-
- <!-- all images float (CSS float reltaive) with a left position calculated by svg:x - parentMarginLeft - previousFrameWidths -->
- <xsl:text> float:left; padding:0; position:relative; left:</xsl:text>
- <xsl:value-of select="$leftPosition"/>
- <xsl:text>cm; </xsl:text>
- <!-- if the frame is anchored on a char -->
- <xsl:if test="@text:anchor-type='char'">
- <xsl:text>top:</xsl:text>
- <xsl:value-of select="$svgY"/>
+ <!-- MIB -->
+ <xsl:text> padding:0; </xsl:text>
+ <xsl:if test="@text:anchor-type!='as-char'">
+ <!-- all images float (CSS float reltaive) with a left position calculated by svg:x - parentMarginLeft - previousFrameWidths -->
+ <xsl:text> float:left; position:relative; left:</xsl:text>
+ <xsl:value-of select="$leftPosition"/>
<xsl:text>cm; </xsl:text>
+ <!-- if the frame is anchored on a char -->
+ <xsl:if test="@text:anchor-type='char'">
+ <xsl:text>top:</xsl:text>
+ <xsl:value-of select="$svgY"/>
+ <xsl:text>cm; </xsl:text>
+ </xsl:if>
</xsl:if>
</xsl:attribute>
<xsl:apply-templates select="@*">
@@ -1083,6 +1103,8 @@
</xsl:element>
</xsl:template>
+ <xsl:template match="svg:desc"/>
+
<xsl:template name="widthAndHeight">
<xsl:if test="@svg:height | @svg:width">
<xsl:choose>
@@ -1498,7 +1520,9 @@
<xsl:message>
Accessibility Warning:
No alternate text ('svg:desc' element) set for
- image '<xsl:value-of select="@xlink:href"/>'!</xsl:message>
+ image '
+ <xsl:value-of select="@xlink:href"/>'!
+ </xsl:message>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
@@ -1926,7 +1950,6 @@
<xsl:when test="$isEmptyList or $isListHeader">
<xsl:apply-templates>
<xsl:with-param name="globalData" select="$globalData"/>
- <xsl:with-param name="isNextLevelNumberingReset" select="$isListHeader or $isNextLevelNumberingReset"/>
<xsl:with-param name="itemLabel" select="$itemLabelNew"/>
<xsl:with-param name="listLevel" select="$listLevel + 1"/>
<xsl:with-param name="listStyleName" select="$listStyleName"/>
@@ -2206,7 +2229,7 @@
<xsl:when test="$currentListLevel &lt; $listLevel">
<xsl:choose>
<!-- if it has content the counting is ended -->
- <xsl:when test="not($isEmptyList or $isListHeader)">
+ <xsl:when test="*[name() = 'text:h' or name() = 'text:p'] or $isListHeader">
<!-- 2DO: Perhaps the children still have to be processed -->
<xsl:value-of select="$itemNumber + $pseudoLevel"/>
</xsl:when>
@@ -2261,7 +2284,7 @@
<xsl:with-param name="pseudoLevel">
<xsl:choose>
<!-- empty list item does not count -->
- <xsl:when test="$isEmptyList or $isListHeader">
+ <xsl:when test="not(*[name() = 'text:h' or name() = 'text:p']) or $isListHeader">
<xsl:value-of select="$pseudoLevel"/>
</xsl:when>
<xsl:otherwise>1</xsl:otherwise>
@@ -2853,6 +2876,20 @@
</xsl:apply-templates>
</xsl:template>
+ <!-- ***************** -->
+ <!-- *** Bookmarks *** -->
+ <!-- ***************** -->
+
+ <xsl:template match="text:bookmark|text:bookmark-start">
+ <xsl:element name="a">
+ <xsl:attribute name="name">
+ <xsl:value-of select="@text:name"/>
+ </xsl:attribute>
+ </xsl:element>
+ </xsl:template>
+
+ <xsl:template match="text:bookmark-end"/>
+
<!-- DISABLING this tab handling as the tab width is only relative
<xsl:template match="text:tab">
<xsl:param name="globalData"/>
diff --git a/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl b/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl
index ab2c9bbaa866..7e834862c2d6 100644
--- a/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl
+++ b/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl
@@ -441,15 +441,16 @@
<link rel="transformation" href="http://xml.openoffice.org/odf2xhtml/rdf-extract.xsl" />
-->
- <!-- base URL of document for resolving relative links -->
+ <!-- base URL of document for resolving relative links
+ NOTE: CHROME has a problem, with relative references as from content table, referencing to root directory instead of document
<xsl:element name="base">
- <xsl:attribute name="href">
+ <xsl:attribute name="href">-->
<!-- earlier 'targetURL' was used for an absoulte reference of base provided by the Office (file URL)
<xsl:value-of select="$targetURL" />
now '.' let relative links work, even if document has been moved -->
- <xsl:text>.</xsl:text>
+ <!--<xsl:text>.</xsl:text>
</xsl:attribute>
- </xsl:element>
+ </xsl:element>-->
</xsl:template>
<!-- generic template for adding common meta tags -->
diff --git a/filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl b/filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl
index f0ac642a00eb..3d2cd7881bed 100644
--- a/filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl
+++ b/filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl
@@ -79,7 +79,7 @@
indent = "no"
omit-xml-declaration = "no"
doctype-public = "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
- doctype-system = "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd" />
+ doctype-system = "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd" />
diff --git a/filter/source/xsltdialog/xmlfilterjar.cxx b/filter/source/xsltdialog/xmlfilterjar.cxx
index 0a01310b3b40..8e61dcebfe8b 100644
--- a/filter/source/xsltdialog/xmlfilterjar.cxx
+++ b/filter/source/xsltdialog/xmlfilterjar.cxx
@@ -389,8 +389,20 @@ bool XMLFilterJarHelper::copyFile( Reference< XHierarchicalNameAccess > xIfc, OU
if( !createDirectory( rURL ) )
return false;
- SvFileStream aOutputStream(rURL, STREAM_WRITE );
- Reference< XOutputStream > xOS( new utl::OOutputStreamWrapper( aOutputStream ) );
+ ::osl::File file(rURL);
+ ::osl::FileBase::RC rc =
+ file.open(OpenFlag_Write|OpenFlag_Create);
+ if (::osl::FileBase::E_EXIST == rc) {
+ rc = file.open(OpenFlag_Write);
+ if (::osl::FileBase::E_None == rc) {
+ file.setSize(0); // #i97170# truncate
+ }
+ }
+ if (::osl::FileBase::E_None != rc) {
+ throw RuntimeException();
+ }
+ Reference< XOutputStream > const xOS(
+ new comphelper::OSLOutputStreamWrapper(file));
return copyStreams( xIS, xOS );
}
diff --git a/filter/source/xsltfilter/Manifest b/filter/source/xsltfilter/Manifest
index b189662d31e3..e20aea34d7bc 100644
--- a/filter/source/xsltfilter/Manifest
+++ b/filter/source/xsltfilter/Manifest
@@ -1,3 +1,3 @@
-RegistrationClassName: XSLTransformer
+RegistrationClassName: com.sun.star.comp.xsltfilter.XSLTransformer
Class-Path: saxon9.jar
UNO-Type-Path:
diff --git a/filter/source/xsltfilter/Base64.java b/filter/source/xsltfilter/com/sun/star/comp/xsltfilter/Base64.java
index 1032282ea8a6..f92012e854f5 100644
--- a/filter/source/xsltfilter/Base64.java
+++ b/filter/source/xsltfilter/com/sun/star/comp/xsltfilter/Base64.java
@@ -1,3 +1,5 @@
+package com.sun.star.comp.xsltfilter;
+
/************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
diff --git a/filter/source/xsltfilter/XSLTFilterOLEExtracter.java b/filter/source/xsltfilter/com/sun/star/comp/xsltfilter/XSLTFilterOLEExtracter.java
index f91146b45bb9..078e03135ced 100644
--- a/filter/source/xsltfilter/XSLTFilterOLEExtracter.java
+++ b/filter/source/xsltfilter/com/sun/star/comp/xsltfilter/XSLTFilterOLEExtracter.java
@@ -1,3 +1,5 @@
+package com.sun.star.comp.xsltfilter;
+
/************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
diff --git a/filter/source/xsltfilter/XSLTransformer.java b/filter/source/xsltfilter/com/sun/star/comp/xsltfilter/XSLTransformer.java
index 315170ec7f98..1a6d8cf16d8d 100644
--- a/filter/source/xsltfilter/XSLTransformer.java
+++ b/filter/source/xsltfilter/com/sun/star/comp/xsltfilter/XSLTransformer.java
@@ -1,3 +1,5 @@
+package com.sun.star.comp.xsltfilter;
+
/************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -77,6 +79,7 @@ import com.sun.star.uno.UnoRuntime;
//Uno to java Adaptor
import com.sun.star.lib.uno.adapter.XInputStreamToInputStreamAdapter;
import com.sun.star.lib.uno.adapter.XOutputStreamToOutputStreamAdapter;
+import javax.xml.transform.Templates;
import net.sf.saxon.FeatureKeys;
@@ -97,7 +100,6 @@ public class XSLTransformer
*/
private XInputStream m_xis;
private XOutputStream m_xos; // private static HashMap templatecache;
- private static final int STREAM_BUFFER_SIZE = 4000;
private static final String STATSPROP = "XSLTransformer.statsfile";
private static PrintStream statsp;
private String stylesheeturl;
@@ -110,11 +112,11 @@ public class XSLTransformer
private Thread t; // listeners
private Vector listeners = new Vector(); //
private XMultiServiceFactory svcfactory; // cache for transformations by stylesheet
- private static Hashtable transformers = new Hashtable();
+ private static Hashtable xsltReferences = new Hashtable();
// struct for cached stylesheets
private static class Transformation {
- public Transformer transformer;
+ public Templates cachedXSLT;
public long lastmod;
}
// Resolve URIs to an empty source
@@ -259,9 +261,10 @@ public class XSLTransformer
// in order to help performance and to remedy a a possible memory
// leak in xalan, where it seems, that Transformer instances cannot
// be reclaimed though they are no longer referenced here, we use
- // a cache of weak references to transformers created for specific
+ // a cache of weak references (ie. xsltReferences) created for specific
// style sheet URLs see also #i48384#
+ Templates xsltTemplate = null;
Transformer transformer = null;
Transformation transformation = null;
// File stylefile = new File(new URI(stylesheeturl));
@@ -278,36 +281,37 @@ public class XSLTransformer
}
}
- synchronized (transformers) {
+ synchronized (xsltReferences) {
java.lang.ref.WeakReference ref = null;
- // try to get the transformer reference from the cache
- if ((ref = (java.lang.ref.WeakReference) transformers.get(stylesheeturl)) == null ||
+ // try to get the xsltTemplate reference from the cache
+ if ((ref = (java.lang.ref.WeakReference) xsltReferences.get(stylesheeturl)) == null ||
(transformation = ((Transformation) ref.get())) == null ||
((Transformation) ref.get()).lastmod < lastmod) {
// we cannot find a valid reference for this stylesheet
// or the stylsheet was updated
if (ref != null) {
- transformers.remove(stylesheeturl);
+ xsltReferences.remove(stylesheeturl);
}
- // create new transformer for this stylesheet
+ // create new xsltTemplate for this stylesheet
TransformerFactory tfactory = TransformerFactory.newInstance();
debug("TransformerFactory is '" + tfactory.getClass().getName() + "'");
// some external saxons (Debian, Ubuntu, ...) have this disabled
// per default
tfactory.setAttribute(FeatureKeys.ALLOW_EXTERNAL_FUNCTIONS, new Boolean(true));
- transformer = tfactory.newTransformer(new StreamSource(stylesheeturl));
- transformer.setOutputProperty("encoding", "UTF-8");
- // transformer.setURIResolver(XSLTransformer.this);
+ xsltTemplate = tfactory.newTemplates(new StreamSource(stylesheeturl));
// store the transformation into the cache
transformation = new Transformation();
transformation.lastmod = lastmod;
- transformation.transformer = transformer;
+ transformation.cachedXSLT = xsltTemplate;
ref = new java.lang.ref.WeakReference(transformation);
- transformers.put(stylesheeturl, ref);
+ xsltReferences.put(stylesheeturl, ref);
}
}
- transformer = transformation.transformer;
+ xsltTemplate = transformation.cachedXSLT;
+ transformer = xsltTemplate.newTransformer();
+ transformer.setOutputProperty("encoding", "UTF-8");
+ // transformer.setURIResolver(XSLTransformer.this);
// invalid to set 'null' as parameter as 'null' is not a valid Java object
if (sourceurl != null) {
@@ -356,12 +360,33 @@ public class XSLTransformer
if (is != null) {
is.close();
}
+ } catch (java.lang.Throwable ex) {
+ if (statsp != null) {
+ statsp.println(ex.getClass().getName() + ": " + ex.getMessage());
+ ex.printStackTrace(statsp);
+ }
+ }
+ try {
if (os != null) {
os.close();
}
+ } catch (java.lang.Throwable ex) {
+ if (statsp != null) {
+ statsp.println(ex.getClass().getName() + ": " + ex.getMessage());
+ ex.printStackTrace(statsp);
+ }
+ }
+ try {
if (m_xis != null) {
m_xis.closeInput();
}
+ } catch (java.lang.Throwable ex) {
+ if (statsp != null) {
+ statsp.println(ex.getClass().getName() + ": " + ex.getMessage());
+ ex.printStackTrace(statsp);
+ }
+ }
+ try {
if (m_xos != null) {
m_xos.closeOutput();
}
@@ -469,7 +494,7 @@ public class XSLTransformer
public static XSingleServiceFactory __getServiceFactory(
String implName, XMultiServiceFactory multiFactory, XRegistryKey regKey) {
XSingleServiceFactory xSingleServiceFactory = null;
- if (implName.equals(XSLTransformer.class.getName())) {
+ if (implName.indexOf("XSLTransformer") != -1) {
xSingleServiceFactory = FactoryHelper.getServiceFactory(XSLTransformer.class,
_serviceName, multiFactory, regKey);
}
diff --git a/filter/source/xsltfilter/makefile.mk b/filter/source/xsltfilter/makefile.mk
index f96534df4e2d..b275a1c5f71d 100644
--- a/filter/source/xsltfilter/makefile.mk
+++ b/filter/source/xsltfilter/makefile.mk
@@ -26,7 +26,7 @@
#*************************************************************************
PRJ = ..$/..
PRJNAME = filter
-#PACKAGE = com$/sun$/star$/documentconversion$/XSLTFilter
+PACKAGE = com/sun/star/comp/xsltfilter
TARGET =XSLTFilter
ENABLE_EXCEPTIONS=TRUE
LIBTARGET=NO
@@ -62,7 +62,7 @@ JAVAFILES = $(subst,$(CLASSDIR)$/, $(subst,.class,.java $(JAVACLASSFILES)))
CUSTOMMANIFESTFILE = Manifest
JARCOMPRESS = TRUE
-JARCLASSDIRS = XSLTransformer*.class XSLTFilterOLEExtracter*.class
+JARCLASSDIRS = com/sun/star/comp/xsltfilter
JARTARGET = $(TARGET).jar
.IF "$(SYSTEM_SAXON)" == "YES"
@@ -72,7 +72,11 @@ JARFILES += saxon9.jar
.ENDIF
# --- Files --------------------------------------------------------
-JAVACLASSFILES=$(CLASSDIR)$/XSLTransformer.class $(CLASSDIR)$/XSLTFilterOLEExtracter.class
+JAVACLASSFILES= \
+ $(CLASSDIR)/com/sun/star/comp/xsltfilter/XSLTransformer.class \
+ $(CLASSDIR)/com/sun/star/comp/xsltfilter/XSLTFilterOLEExtracter.class \
+ $(CLASSDIR)/com/sun/star/comp/xsltfilter/Base64.class \
+
.ENDIF
# --- Targets ------------------------------------------------------
diff --git a/framework/inc/services/substitutepathvars.hxx b/framework/inc/services/substitutepathvars.hxx
index 9bf4b1ead43d..8825386d1b57 100644
--- a/framework/inc/services/substitutepathvars.hxx
+++ b/framework/inc/services/substitutepathvars.hxx
@@ -36,7 +36,7 @@
#include <hash_map>
//_________________________________________________________________________________________________________________
-// my own includes
+// my own includes
//_________________________________________________________________________________________________________________
#include <threadhelp/threadhelpbase.hxx>
#include <macros/generic.hxx>
@@ -46,7 +46,7 @@
#include <stdtypes.h>
//_________________________________________________________________________________________________________________
-// interface includes
+// interface includes
//_________________________________________________________________________________________________________________
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
@@ -54,7 +54,7 @@
#include <com/sun/star/util/XStringSubstitution.hpp>
//_________________________________________________________________________________________________________________
-// other includes
+// other includes
//_________________________________________________________________________________________________________________
#include <cppuhelper/implbase2.hxx>
#include <rtl/ustring.hxx>
@@ -68,24 +68,24 @@ namespace framework
// Must be zero value based
enum EnvironmentType
{
- ET_HOST = 0 ,
- ET_YPDOMAIN ,
- ET_DNSDOMAIN ,
- ET_NTDOMAIN ,
- ET_OS ,
- ET_UNKNOWN ,
- ET_COUNT
+ ET_HOST = 0 ,
+ ET_YPDOMAIN ,
+ ET_DNSDOMAIN ,
+ ET_NTDOMAIN ,
+ ET_OS ,
+ ET_UNKNOWN ,
+ ET_COUNT
};
// Must be zero value based
enum OperatingSystem
{
- OS_WINDOWS = 0,
- OS_UNIX ,
- OS_SOLARIS ,
- OS_LINUX ,
- OS_UNKNOWN ,
- OS_COUNT
+ OS_WINDOWS = 0,
+ OS_UNIX ,
+ OS_SOLARIS ,
+ OS_LINUX ,
+ OS_UNKNOWN ,
+ OS_COUNT
};
struct SubstituteRule
@@ -97,15 +97,16 @@ struct SubstituteRule
EnvironmentType aType ) :
aSubstVariable( aVarName ), aSubstValue( aValue ), aEnvValue( aVal ), aEnvType( aType ) {}
- rtl::OUString aSubstVariable;
- rtl::OUString aSubstValue;
- com::sun::star::uno::Any aEnvValue;
- EnvironmentType aEnvType;
+ rtl::OUString aSubstVariable;
+ rtl::OUString aSubstValue;
+ com::sun::star::uno::Any aEnvValue;
+ EnvironmentType aEnvType;
};
struct SubstitutePathNotify
{
SubstitutePathNotify() {};
+
const com::sun::star::uno::Sequence<rtl::OUString> aPropertyNames;
};
@@ -131,45 +132,45 @@ class SubstitutePathVariables_Impl : public utl::ConfigItem
static OperatingSystem GetOperatingSystemFromString( const rtl::OUString& );
static EnvironmentType GetEnvTypeFromString( const rtl::OUString& );
- void GetSharePointsRules( SubstituteVariables& aSubstVarMap );
+ void GetSharePointsRules( SubstituteVariables& aSubstVarMap );
/** is called from the ConfigManager before application ends or from the
PropertyChangeListener if the sub tree broadcasts changes. */
- virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
- virtual void Commit();
-
- private:
- // Wrapper methods for low-level functions
- OperatingSystem GetOperatingSystem();
- const rtl::OUString& GetYPDomainName();
- const rtl::OUString& GetDNSDomainName();
- const rtl::OUString& GetNTDomainName();
- const rtl::OUString& GetHostName();
-
- sal_Bool FilterRuleSet( const SubstituteRuleVector& aRuleSet, SubstituteRule& aActiveRule );
-
- void ReadSharePointsFromConfiguration( com::sun::star::uno::Sequence< rtl::OUString >& aSharePointsSeq );
- void ReadSharePointRuleSetFromConfiguration( const rtl::OUString& aSharePointName,
- const rtl::OUString& aSharePointNodeName,
- SubstituteRuleVector& aRuleSet );
-
- // Stored values for domains and host
- sal_Bool m_bYPDomainRetrieved;
- rtl::OUString m_aYPDomain;
- sal_Bool m_bDNSDomainRetrieved;
- rtl::OUString m_aDNSDomain;
- sal_Bool m_bNTDomainRetrieved;
- rtl::OUString m_aNTDomain;
- sal_Bool m_bHostRetrieved;
- rtl::OUString m_aHost;
- sal_Bool m_bOSRetrieved;
- OperatingSystem m_eOSType;
-
- Link m_aListenerNotify;
- const rtl::OUString m_aSharePointsNodeName;
- const rtl::OUString m_aDirPropertyName;
- const rtl::OUString m_aEnvPropertyName;
- const rtl::OUString m_aLevelSep;
+ virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
+ virtual void Commit();
+
+ private:
+ // Wrapper methods for low-level functions
+ OperatingSystem GetOperatingSystem();
+ const rtl::OUString& GetYPDomainName();
+ const rtl::OUString& GetDNSDomainName();
+ const rtl::OUString& GetNTDomainName();
+ const rtl::OUString& GetHostName();
+
+ bool FilterRuleSet( const SubstituteRuleVector& aRuleSet, SubstituteRule& aActiveRule );
+
+ void ReadSharePointsFromConfiguration( com::sun::star::uno::Sequence< rtl::OUString >& aSharePointsSeq );
+ void ReadSharePointRuleSetFromConfiguration( const rtl::OUString& aSharePointName,
+ const rtl::OUString& aSharePointNodeName,
+ SubstituteRuleVector& aRuleSet );
+
+ // Stored values for domains and host
+ bool m_bYPDomainRetrieved;
+ rtl::OUString m_aYPDomain;
+ bool m_bDNSDomainRetrieved;
+ rtl::OUString m_aDNSDomain;
+ bool m_bNTDomainRetrieved;
+ rtl::OUString m_aNTDomain;
+ bool m_bHostRetrieved;
+ rtl::OUString m_aHost;
+ bool m_bOSRetrieved;
+ OperatingSystem m_eOSType;
+
+ Link m_aListenerNotify;
+ const rtl::OUString m_aSharePointsNodeName;
+ const rtl::OUString m_aDirPropertyName;
+ const rtl::OUString m_aEnvPropertyName;
+ const rtl::OUString m_aLevelSep;
};
enum PreDefVariable
@@ -234,8 +235,8 @@ struct ReSubstUserVarOrder
typedef std::list< ReSubstFixedVarOrder > ReSubstFixedVarOrderVector;
typedef std::list< ReSubstUserVarOrder > ReSubstUserVarOrderVector;
-class SubstitutePathVariables : private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
- public ::cppu::WeakImplHelper2< ::com::sun::star::util::XStringSubstitution, css::lang::XServiceInfo>
+class SubstitutePathVariables : private ThreadHelpBase, // Struct for right initalization of mutex member! Must be first of baseclasses.
+ public ::cppu::WeakImplHelper2< ::com::sun::star::util::XStringSubstitution, css::lang::XServiceInfo >
{
friend class SubstitutePathVariables_Impl;
@@ -254,51 +255,51 @@ class SubstitutePathVariables : private ThreadHelpBase
virtual ::rtl::OUString SAL_CALL getSubstituteVariableValue( const ::rtl::OUString& variable )
throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
- protected:
- DECL_LINK( implts_ConfigurationNotify, SubstitutePathNotify* );
-
- void SetPredefinedPathVariables( PredefinedPathVariables& );
- rtl::OUString ConvertOSLtoUCBURL( const rtl::OUString& aOSLCompliantURL ) const;
-
- // Special case (transient) values can change during runtime!
- // Don't store them in the pre defined struct
- rtl::OUString GetWorkPath() const;
- rtl::OUString GetWorkVariableValue() const;
- rtl::OUString GetPathVariableValue() const;
-
- rtl::OUString GetHomeVariableValue() const;
-
- // XStringSubstitution implementation methods
- rtl::OUString impl_substituteVariable( const ::rtl::OUString& aText, sal_Bool bSustRequired )
- throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
- rtl::OUString impl_reSubstituteVariables( const ::rtl::OUString& aText )
- throw (::com::sun::star::uno::RuntimeException);
- ::rtl::OUString impl_getSubstituteVariableValue( const ::rtl::OUString& variable )
- throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
-
- private:
- class VarNameToIndexMap : public std::hash_map< ::rtl::OUString,
- PreDefVariable,
- OUStringHashCode,
- ::std::equal_to< ::rtl::OUString > >
- {
- inline void free()
+ protected:
+ DECL_LINK( implts_ConfigurationNotify, SubstitutePathNotify* );
+
+ void SetPredefinedPathVariables( PredefinedPathVariables& );
+ rtl::OUString ConvertOSLtoUCBURL( const rtl::OUString& aOSLCompliantURL ) const;
+
+ // Special case (transient) values can change during runtime!
+ // Don't store them in the pre defined struct
+ rtl::OUString GetWorkPath() const;
+ rtl::OUString GetWorkVariableValue() const;
+ rtl::OUString GetPathVariableValue() const;
+
+ rtl::OUString GetHomeVariableValue() const;
+
+ // XStringSubstitution implementation methods
+ rtl::OUString impl_substituteVariable( const ::rtl::OUString& aText, bool bSustRequired )
+ throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
+ rtl::OUString impl_reSubstituteVariables( const ::rtl::OUString& aText )
+ throw (::com::sun::star::uno::RuntimeException);
+ ::rtl::OUString impl_getSubstituteVariableValue( const ::rtl::OUString& variable )
+ throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
+
+ private:
+ class VarNameToIndexMap : public std::hash_map< ::rtl::OUString,
+ PreDefVariable,
+ OUStringHashCode,
+ ::std::equal_to< ::rtl::OUString > >
{
- VarNameToIndexMap().swap( *this );
- }
- };
-
- // heavy used string
- const rtl::OUString m_aVarStart;
- const rtl::OUString m_aVarEnd;
-
- VarNameToIndexMap m_aPreDefVarMap; // Mapping from pre-def variable names to enum for array access
- SubstituteVariables m_aSubstVarMap; // Active rule set map indexed by variable name!
- PredefinedPathVariables m_aPreDefVars; // All predefined variables
- SubstitutePathVariables_Impl m_aImpl; // Implementation class that access the configuration
- ReSubstFixedVarOrderVector m_aReSubstFixedVarOrder; // To speed up resubstitution fixed variables (order for lookup)
- ReSubstUserVarOrderVector m_aReSubstUserVarOrder; // To speed up resubstitution user variables
- com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
+ inline void free()
+ {
+ VarNameToIndexMap().swap( *this );
+ }
+ };
+
+ // heavy used string
+ const rtl::OUString m_aVarStart;
+ const rtl::OUString m_aVarEnd;
+
+ VarNameToIndexMap m_aPreDefVarMap; // Mapping from pre-def variable names to enum for array access
+ SubstituteVariables m_aSubstVarMap; // Active rule set map indexed by variable name!
+ PredefinedPathVariables m_aPreDefVars; // All predefined variables
+ SubstitutePathVariables_Impl m_aImpl; // Implementation class that access the configuration
+ ReSubstFixedVarOrderVector m_aReSubstFixedVarOrder; // To speed up resubstitution fixed variables (order for lookup)
+ ReSubstUserVarOrderVector m_aReSubstUserVarOrder; // To speed up resubstitution user variables
+ com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
};
}
diff --git a/framework/qa/complex/path_substitution/PathSubstitutionTest.java b/framework/qa/complex/path_substitution/PathSubstitutionTest.java
index aeea9907e6bc..e936fbf6ccad 100755
--- a/framework/qa/complex/path_substitution/PathSubstitutionTest.java
+++ b/framework/qa/complex/path_substitution/PathSubstitutionTest.java
@@ -63,20 +63,20 @@ public class PathSubstitutionTest
/**
* Create an array with all substitution variables
*/
- @Before private void initialize()
+ @Before public void initialize()
{
substVars = new VariableContainer();
- substVars.add("$(prog)", false, true);
- substVars.add("$(inst)", false, true);
- substVars.add("$(user)", false, true);
- substVars.add("$(work)", false, true);
- substVars.add("$(home)", false, true);
- substVars.add("$(temp)", false, true);
+ substVars.add("$(prog)", true, true);
+ substVars.add("$(inst)", true, true);
+ substVars.add("$(user)", true, true);
+ substVars.add("$(work)", true, true);
+ substVars.add("$(home)", true, true);
+ substVars.add("$(temp)", true, true);
substVars.add("$(lang)", false, false);
substVars.add("$(langid)", false, false);
substVars.add("$(vlang)", false, false);
// path won't resubstitute
- substVars.add("$(path)", false, false);
+ substVars.add("$(path)", true, false);
}
/**
@@ -106,8 +106,6 @@ public class PathSubstitutionTest
return;
}
-// initialize();
-
for (int i = 0; i < substVars.size(); i++)
{
String var = substVars.getVariable(i);
@@ -148,6 +146,12 @@ public class PathSubstitutionTest
//in middle of text works
substString = "file:///starting/" + var + "/path";
+ String sCanSubstAllPos;
+ if (substVars.onlySubstituteAtBegin(i))
+ sCanSubstAllPos = "NO";
+ else
+ sCanSubstAllPos = "YES";
+ System.out.println("Variable can substitute within string: "+sCanSubstAllPos);
System.out.println("Substitute '" + substString + "'");
newValue = oObj.substituteVariables(substString, false);
System.out.println("Return value '" + newValue + "'");
diff --git a/framework/qa/unoapi/makefile.mk b/framework/qa/unoapi/makefile.mk
new file mode 100644
index 000000000000..38a6cf7cced8
--- /dev/null
+++ b/framework/qa/unoapi/makefile.mk
@@ -0,0 +1,48 @@
+#*************************************************************************
+# 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.
+#***********************************************************************/
+
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
+
+PRJ = ../..
+PRJNAME = framework
+TARGET = qa_unoapi
+
+.IF "$(OOO_JUNIT_JAR)" != ""
+PACKAGE = org/openoffice/framework/qa/unoapi
+JAVATESTFILES = Test.java
+JAVAFILES = $(JAVATESTFILES)
+JARFILES = OOoRunner.jar ridl.jar test.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
+.END
+
+.INCLUDE: settings.mk
+.INCLUDE: target.mk
+.INCLUDE: installationtest.mk
+
+ALLTAR : javatest
+
+.END
diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx
index 90c460b74298..5fde74764eda 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -29,7 +29,7 @@
#include "precompiled_framework.hxx"
//_________________________________________________________________________________________________________________
-// my own includes
+// my own includes
//_________________________________________________________________________________________________________________
#include "services/substitutepathvars.hxx"
#include <threadhelp/resetableguard.hxx>
@@ -37,12 +37,12 @@
#include "services.h"
//_________________________________________________________________________________________________________________
-// interface includes
+// interface includes
//_________________________________________________________________________________________________________________
#include <com/sun/star/beans/XPropertySet.hpp>
//_________________________________________________________________________________________________________________
-// includes of other projects
+// includes of other projects
//_________________________________________________________________________________________________________________
#include <unotools/configitem.hxx>
#include <unotools/localfilehelper.hxx>
@@ -69,38 +69,38 @@
#include <string.h>
//_________________________________________________________________________________________________________________
-// Defines
+// Defines
//_________________________________________________________________________________________________________________
//
-#define STRPOS_NOTFOUND (sal_Int32)-1
+#define STRPOS_NOTFOUND (sal_Int32)-1
-#define ASCII_STR( val ) rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( val ))
+#define ASCII_STR( val ) rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( val ))
-#define SEARCHPATH_DELIMITER ';'
+#define SEARCHPATH_DELIMITER ';'
// Variable start/end characters
-#define SIGN_STARTVARIABLE ASCII_STR("$(")
-#define SIGN_ENDVARIABLE ASCII_STR(")")
+#define SIGN_STARTVARIABLE ASCII_STR("$(")
+#define SIGN_ENDVARIABLE ASCII_STR(")")
// Length of SUBSTITUTE_... to replace it with real values.
-#define REPLACELENGTH_INST 7
-#define REPLACELENGTH_PROG 7
-#define REPLACELENGTH_USER 7
-#define REPLACELENGTH_WORK 7
-#define REPLACELENGTH_HOME 7
-#define REPLACELENGTH_TEMP 7
-#define REPLACELENGTH_PATH 7
+#define REPLACELENGTH_INST 7
+#define REPLACELENGTH_PROG 7
+#define REPLACELENGTH_USER 7
+#define REPLACELENGTH_WORK 7