820a29950b
Attempt to clean up most but certainly not all the spelling mistakes that found home in OpenOffice through decades. We could probably blame the international nature of the code but it is somewhat shameful that this wasn't done before. (cherry picked from commit 28206a7cb43aff5adb10f8235ad1680c3941ee3e) Conflicts: include/osl/file.hxx include/osl/pipe_decl.hxx include/osl/socket.h include/osl/socket_decl.hxx include/sal/main.h include/svx/dbaexchange.hxx include/svx/dlgctrl.hxx include/svx/msdffdef.hxx include/svx/sdr/contact/objectcontactofpageview.hxx include/svx/svdpntv.hxx include/ucbhelper/content.hxx include/ucbhelper/interceptedinteraction.hxx include/ucbhelper/resultsethelper.hxx include/unotools/sharedunocomponent.hxx include/unotools/viewoptions.hxx include/vcl/pdfwriter.hxx include/xmloff/txtparae.hxx include/xmloff/uniref.hxx rhino/rhino1_7R3.patch rsc/inc/rscrsc.hxx sal/inc/osl/conditn.h sal/inc/osl/security.h sal/inc/osl/semaphor.h sal/inc/osl/semaphor.hxx sal/inc/rtl/string.hxx sal/inc/rtl/tres.h sal/inc/systools/win32/StrConvert.h sal/osl/os2/file_path_helper.h sal/osl/os2/file_path_helper.hxx sal/osl/os2/file_url.cxx sal/osl/os2/file_url.h sal/osl/os2/makefile.mk sal/osl/os2/pipe.cxx sal/osl/os2/process.c sal/osl/os2/profile.c sal/osl/os2/socket.c sal/osl/os2/system.h sal/osl/unx/asm/interlck_sparc.s sal/osl/unx/file_url.cxx sal/osl/unx/signal.c sal/osl/unx/system.h sal/osl/w32/MAKEFILE.MK sal/osl/w32/interlck.c sal/osl/w32/module.cxx sal/osl/w32/security.c sal/qa/buildall.pl sal/qa/osl/file/osl_File.cxx sal/qa/osl/module/osl_Module_Const.h sal/qa/osl/mutex/osl_Mutex.cxx sal/qa/osl/pipe/osl_Pipe.cxx sal/qa/osl/process/osl_Thread.cxx sal/qa/osl/socket/osl_StreamSocket.cxx sal/qa/osl/socket/sockethelper.cxx sal/qa/rtl_strings/rtl_OUString.cxx sal/rtl/source/unload.cxx sal/systools/win32/kill/kill.cxx sal/systools/win32/uwinapi/MoveFileExA.cpp sal/test/bootstrap.pl sal/typesconfig/typesconfig.c sal/workben/tgetpwnam.cxx sax/inc/sax/parser/saxparser.hxx sc/addin/datefunc/dfa.cl sc/addin/datefunc/dfa.src sc/addin/rot13/rot13.cl sc/addin/rot13/rot13.src sc/inc/attarray.hxx sc/inc/chgtrack.hxx sc/inc/column.hxx sc/inc/compressedarray.hxx sc/inc/document.hxx sc/inc/table.hxx sc/source/core/data/column.cxx sc/source/core/data/dptablecache.cxx sc/source/core/data/dptabres.cxx sc/source/core/data/dptabsrc.cxx sc/source/core/data/global.cxx sc/source/core/tool/chgtrack.cxx sc/source/core/tool/compiler.cxx sc/source/filter/excel/xestyle.cxx sc/source/filter/excel/xichart.cxx sc/source/filter/inc/fapihelper.hxx sc/source/filter/inc/xistyle.hxx sc/source/filter/xml/xmlsubti.cxx sc/source/ui/Accessibility/AccessibleCell.cxx sc/source/ui/Accessibility/AccessibleContextBase.cxx sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx sc/source/ui/Accessibility/AccessibleEditObject.cxx sc/source/ui/Accessibility/AccessiblePreviewCell.cxx sc/source/ui/app/inputwin.cxx sc/source/ui/docshell/docfunc.cxx sc/source/ui/drawfunc/fupoor.cxx sc/source/ui/miscdlgs/linkarea.cxx sc/source/ui/unoobj/chart2uno.cxx sc/source/ui/unoobj/nameuno.cxx sc/source/ui/vba/vbacharacters.hxx sc/source/ui/vba/vbarange.cxx sc/source/ui/vba/vbawindow.cxx scaddins/source/analysis/analysishelper.cxx scaddins/source/analysis/analysishelper.hxx scaddins/source/datefunc/datefunc.cxx scripting/examples/python/Capitalise.py scripting/source/pyprov/officehelper.py sd/source/filter/eppt/eppt.cxx sd/source/filter/eppt/epptso.cxx sd/source/ui/dlg/prltempl.cxx sd/source/ui/dlg/tpoption.cxx sd/source/ui/func/fuediglu.cxx sd/source/ui/func/fupoor.cxx sd/source/ui/func/fusel.cxx sd/source/ui/func/smarttag.cxx sd/source/ui/inc/OutlinerIteratorImpl.hxx sd/source/ui/inc/SlideViewShell.hxx sd/source/ui/inc/fuediglu.hxx sd/source/ui/inc/fusel.hxx sd/source/ui/slideshow/slideshowimpl.cxx sd/source/ui/slidesorter/cache/SlsQueueProcessorThread.hxx sd/source/ui/slidesorter/controller/SlsHideSlideFunction.cxx sd/source/ui/slidesorter/controller/SlsSelectionCommand.hxx sd/source/ui/slidesorter/inc/controller/SlsAnimationFunction.hxx sd/source/ui/slidesorter/view/SlsButtonBar.cxx sd/source/ui/view/Outliner.cxx sd/source/ui/view/drviewsh.cxx sd/source/ui/view/frmview.cxx sdext/source/presenter/PresenterFrameworkObserver.hxx sdext/source/presenter/PresenterSlideShowView.cxx setup_native/scripts/deregister_extensions setup_native/scripts/register_extensions setup_native/source/opensolaris/bundledextensions/README setup_native/source/opensolaris/bundledextensions/svc-ooo_bundled_extensions setup_native/source/win32/customactions/patch/swappatchfiles.cxx setup_native/source/win32/customactions/reg4msdoc/registrar.cxx setup_native/source/win32/customactions/reg4msdoc/userregistrar.cxx sfx2/inc/sfx2/sfxbasemodel.hxx sfx2/qa/complex/sfx2/DocumentProperties.java sfx2/source/appl/appopen.cxx sfx2/source/appl/appquit.cxx sfx2/source/appl/appserv.cxx sfx2/source/bastyp/sfxhtml.cxx sfx2/source/dialog/dockwin.cxx sfx2/source/doc/docfile.cxx sfx2/source/doc/docvor.cxx sfx2/source/doc/graphhelp.cxx sfx2/source/doc/objcont.cxx sfx2/source/doc/objserv.cxx sfx2/source/doc/objstor.cxx sfx2/source/doc/objuno.cxx sfx2/source/doc/objxtor.cxx sfx2/source/doc/printhelper.cxx sfx2/source/doc/sfxbasemodel.cxx sfx2/source/notify/eventsupplier.cxx sfx2/source/view/frmload.cxx sfx2/source/view/sfxbasecontroller.cxx shell/qa/zip/ziptest.cxx shell/source/backends/wininetbe/wininetbackend.cxx shell/source/win32/shlxthandler/util/utilities.cxx solenv/bin/build.pl solenv/bin/build_release.pl solenv/bin/cws.pl solenv/bin/download_external_dependencies.pl solenv/bin/make_download.pl solenv/bin/make_installer.pl solenv/bin/modules/Cws.pm solenv/bin/modules/ExtensionsLst.pm solenv/bin/modules/installer/control.pm solenv/bin/modules/installer/downloadsigner.pm solenv/bin/modules/installer/javainstaller.pm solenv/bin/modules/installer/packagepool.pm solenv/bin/modules/installer/patch/InstallationSet.pm solenv/bin/modules/installer/scriptitems.pm solenv/bin/modules/installer/windows/feature.pm solenv/bin/modules/installer/windows/msiglobal.pm solenv/bin/modules/installer/windows/sign.pm solenv/bin/modules/installer/worker.pm solenv/bin/modules/installer/xpdinstaller.pm solenv/bin/modules/osarch.pm solenv/bin/modules/packager/work.pm solenv/bin/modules/pre2par/parameter.pm solenv/bin/patch_tool.pl solenv/bin/transform_description.pl solenv/doc/gbuild/doxygen.cfg solenv/gbuild/LinkTarget.mk solenv/gbuild/gbuild.mk solenv/inc/os2gcci.mk solenv/inc/settings.mk solenv/inc/startup/Readme solenv/inc/target.mk solenv/inc/tg_compv.mk solenv/inc/tg_javav.mk solenv/inc/unitools.mk solenv/inc/unxbsdi.mk solenv/inc/unxbsdi2.mk solenv/inc/unxbsds.mk solenv/inc/unxfbsd.mk solenv/inc/unxlng.mk sot/source/sdstor/stg.cxx sot/source/sdstor/stgelem.cxx sot/source/sdstor/ucbstorage.cxx starmath/inc/toolbox.hxx starmath/source/mathmlexport.cxx starmath/source/node.cxx starmath/source/toolbox.cxx starmath/source/view.cxx stoc/source/bootstrap/bootstrap.xml stoc/source/corereflection/criface.cxx stoc/source/invocation/invocation.cxx stoc/source/security/access_controller.cxx stoc/source/servicemanager/servicemanager.cxx stoc/source/tdmanager/tdmgr.cxx stoc/test/javavm/testjavavm.cxx stoc/test/testconv.cxx stoc/test/testcorefl.cxx stoc/test/testintrosp.cxx svl/inc/svl/inettype.hxx svl/inc/svl/urihelper.hxx svl/qa/complex/ConfigItems/helper/HistoryOptTest.cxx svl/qa/complex/ConfigItems/helper/HistoryOptTest.hxx svl/source/config/itemholder2.hxx svl/source/items/itemset.cxx svl/source/numbers/zforlist.cxx svl/source/numbers/zformat.cxx svl/source/numbers/zforscan.cxx svtools/bmpmaker/bmp.cxx svtools/inc/svtools/helpagentwindow.hxx svtools/inc/svtools/menuoptions.hxx svtools/inc/svtools/miscopt.hxx svtools/inc/svtools/optionsdrawinglayer.hxx svtools/inc/svtools/stringtransfer.hxx svtools/inc/svtools/svlbitm.hxx svtools/inc/svtools/svtdata.hxx svtools/inc/svtools/valueset.hxx svtools/source/brwbox/editbrowsebox.cxx svtools/source/config/itemholder2.hxx svtools/source/contnr/contentenumeration.hxx svx/inc/svx/fmsrcimp.hxx svx/inc/svx/svdobj.hxx svx/inc/svx/xtable.hxx svx/source/accessibility/DGColorNameLookUp.cxx svx/source/accessibility/svxrectctaccessiblecontext.cxx svx/source/dialog/pfiledlg.cxx svx/source/fmcomp/fmgridcl.cxx svx/source/fmcomp/fmgridif.cxx svx/source/fmcomp/gridctrl.cxx svx/source/form/filtnav.cxx svx/source/form/fmPropBrw.cxx svx/source/form/fmshimp.cxx svx/source/form/fmsrcimp.cxx svx/source/gallery2/galtheme.cxx svx/source/inc/docrecovery.hxx svx/source/sdr/event/eventhandler.cxx svx/source/svdraw/svdedtv2.cxx svx/source/svdraw/svdedxv.cxx svx/source/svdraw/svdhdl.cxx svx/source/svdraw/svdobj.cxx svx/source/svdraw/svdograf.cxx svx/source/svdraw/svdoole2.cxx svx/source/svdraw/svdotxtr.cxx svx/source/svdraw/svdundo.cxx svx/source/svdraw/svdxcgv.cxx svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx sw/inc/SwNumberTree.hxx sw/inc/ndnotxt.hxx sw/source/core/access/acccell.cxx sw/source/core/access/acccell.hxx sw/source/core/access/accframebase.cxx sw/source/core/access/accframebase.hxx sw/source/core/access/accmap.cxx sw/source/core/access/accpage.cxx sw/source/core/access/accpage.hxx sw/source/core/access/accpara.cxx sw/source/core/access/accpara.hxx sw/source/core/bastyp/swrect.cxx sw/source/core/crsr/findtxt.cxx sw/source/core/doc/docdde.cxx sw/source/core/doc/notxtfrm.cxx sw/source/core/docnode/section.cxx sw/source/core/draw/dcontact.cxx sw/source/core/edit/edlingu.cxx sw/source/core/inc/anchoredobjectposition.hxx sw/source/core/layout/paintfrm.cxx sw/source/core/layout/tabfrm.cxx sw/source/core/layout/trvlfrm.cxx sw/source/core/ole/ndole.cxx sw/source/core/text/atrstck.cxx sw/source/core/text/inftxt.cxx sw/source/core/text/itratr.cxx sw/source/core/text/itrform2.cxx sw/source/core/text/itrform2.hxx sw/source/core/text/porfld.cxx sw/source/core/text/txtfly.cxx sw/source/core/txtnode/thints.cxx sw/source/core/txtnode/txtedt.cxx sw/source/core/uibase/dochdl/swdtflvr.cxx sw/source/core/uibase/docvw/PostItMgr.cxx sw/source/core/uibase/docvw/SidebarWin.cxx sw/source/core/uibase/docvw/edtwin.cxx sw/source/core/uibase/envelp/labimg.cxx sw/source/core/uibase/uiview/pview.cxx sw/source/core/uibase/uno/unomailmerge.cxx sw/source/core/undo/unattr.cxx sw/source/core/undo/untbl.cxx sw/source/core/unocore/unochart.cxx sw/source/core/view/vdraw.cxx sw/source/core/view/vnew.cxx sw/source/filter/basflt/fltini.cxx sw/source/filter/html/wrthtml.cxx sw/source/filter/inc/wwstyles.hxx sw/source/filter/rtf/rtffly.cxx sw/source/filter/rtf/swparrtf.cxx sw/source/filter/ww8/docxattributeoutput.cxx sw/source/filter/ww8/dump/msvbasic.cxx sw/source/filter/ww8/dump/ww8scan.cxx sw/source/filter/ww8/dump/ww8scan.hxx sw/source/filter/ww8/dump/ww8struc.hxx sw/source/filter/ww8/wrtww8.cxx sw/source/filter/ww8/ww8graf.cxx sw/source/filter/ww8/ww8par.cxx sw/source/filter/ww8/ww8par2.cxx sw/source/filter/ww8/ww8par2.hxx sw/source/filter/ww8/ww8par3.cxx sw/source/filter/ww8/ww8par6.cxx sw/source/filter/ww8/ww8scan.cxx sw/source/filter/ww8/ww8scan.hxx sw/source/ui/dbui/dbinsdlg.cxx sw/source/ui/inc/tablemgr.hxx sw/source/ui/inc/uitool.hxx sw/source/ui/lingu/olmenu.cxx sw/source/ui/uiview/viewport.cxx sysui/desktop/productversion.mk sysui/desktop/slackware/makefile.mk testgraphical/source/CallExternals.pm testgraphical/source/fill_documents_loop.pl testgraphical/ui/java/ConvwatchGUIProject/src/IniFile.java toolkit/doc/layout/notes.txt toolkit/doc/layout/oldnotes.txt toolkit/source/awt/vclxtabcontrol.cxx toolkit/src2xml/source/srcparser.py toolkit/workben/layout/editor.cxx tools/inc/tools/simplerm.hxx tools/inc/tools/solar.h tools/source/communi/geninfo.cxx tools/source/fsys/dirent.cxx tools/source/fsys/filecopy.cxx tools/source/fsys/os2.cxx tools/source/inet/inetmime.cxx tools/source/rc/resmgr.cxx ucb/source/core/ucbcmds.cxx ucb/source/ucp/file/filglob.cxx ucb/source/ucp/odma/odma_content.cxx ucb/source/ucp/tdoc/ucptdoc.xml ucb/source/ucp/webdav/makefile.mk ucbhelper/inc/ucbhelper/simplecertificatevalidationrequest.hxx ucbhelper/source/client/content.cxx ucbhelper/source/client/interceptedinteraction.cxx udkapi/com/sun/star/beans/XPropertiesChangeListener.idl udkapi/com/sun/star/io/ObjectOutputStream.idl udkapi/com/sun/star/io/XMarkableStream.idl udkapi/com/sun/star/io/XTextOutputStream.idl udkapi/com/sun/star/reflection/CoreReflection.idl udkapi/com/sun/star/reflection/XTypeDescriptionEnumerationAccess.idl udkapi/com/sun/star/test/XSimpleTest.idl unodevtools/source/skeletonmaker/skeletoncommon.cxx unodevtools/source/skeletonmaker/skeletoncommon.hxx unotools/inc/unotools/cacheoptions.hxx unotools/inc/unotools/cmdoptions.hxx unotools/inc/unotools/dynamicmenuoptions.hxx unotools/inc/unotools/extendedsecurityoptions.hxx unotools/inc/unotools/fontoptions.hxx unotools/inc/unotools/historyoptions.hxx unotools/inc/unotools/idhelper.hxx unotools/inc/unotools/internaloptions.hxx unotools/inc/unotools/localisationoptions.hxx unotools/inc/unotools/moduleoptions.hxx unotools/inc/unotools/printwarningoptions.hxx unotools/inc/unotools/securityoptions.hxx unotools/inc/unotools/startoptions.hxx unotools/inc/unotools/workingsetoptions.hxx unotools/source/config/cmdoptions.cxx unotools/source/config/compatibility.cxx unotools/source/config/configitem.cxx unotools/source/config/configmgr.cxx unotools/source/config/dynamicmenuoptions.cxx unotools/source/config/fontcfg.cxx unotools/source/config/itemholder1.hxx unotools/source/config/moduleoptions.cxx unotools/source/config/pathoptions.cxx unotools/source/config/viewoptions.cxx unotools/source/misc/sharedunocomponent.cxx uui/source/fltdlg.cxx uui/source/iahndl-filter.cxx vbahelper/inc/vbahelper/collectionbase.hxx vbahelper/source/msforms/vbacontrol.cxx vbahelper/source/vbahelper/collectionbase.cxx vcl/aqua/source/gdi/atsfonts.cxx vcl/inc/aqua/salmathutils.hxx vcl/inc/graphite_cache.hxx vcl/inc/jobset.h vcl/inc/os2/salgdi.h vcl/inc/osx/saldata.hxx vcl/inc/salgdi.hxx vcl/inc/salwtype.hxx vcl/inc/unx/wmadaptor.hxx vcl/inc/vcl/print.hxx vcl/inc/vcl/strhelper.hxx vcl/os2/source/app/salinst.cxx vcl/os2/source/app/saltimer.cxx vcl/os2/source/gdi/salgdi2.cxx vcl/osx/salframeview.mm vcl/osx/salprn.cxx vcl/qa/cppunit/dndtest.cxx vcl/source/app/dbggui.cxx vcl/source/control/ilstbox.cxx vcl/source/gdi/cvtsvm.cxx vcl/source/gdi/gdimtf.cxx vcl/source/gdi/outdev4.cxx vcl/source/gdi/outdev6.cxx vcl/source/gdi/pdfwriter_impl.cxx vcl/source/gdi/pdfwriter_impl2.cxx vcl/source/gdi/print.cxx vcl/source/gdi/print2.cxx vcl/source/glyphs/gcach_layout.cxx vcl/source/glyphs/glyphcache.cxx vcl/source/glyphs/graphite_layout.cxx vcl/source/window/printdlg.cxx vcl/source/window/tabdlg.cxx vcl/source/window/window.cxx vcl/source/window/winproc.cxx vcl/unx/generic/app/saldisp.cxx vcl/unx/generic/dtrans/X11_selection.hxx vcl/unx/gtk/app/gtkdata.cxx vcl/win/source/gdi/salgdi2.cxx vcl/win/source/gdi/salgdi3.cxx vcl/win/source/window/salframe.cxx vos/inc/vos/pipe.hxx vos/inc/vos/process.hxx vos/inc/vos/signal.hxx vos/inc/vos/socket.hxx vos/inc/vos/thread.hxx vos/source/pipe.cxx vos/source/socket.cxx wizards/com/sun/star/wizards/agenda/AgendaTemplate.java wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java wizards/com/sun/star/wizards/agenda/TopicsControl.java wizards/com/sun/star/wizards/web/FTPDialog.java wizards/com/sun/star/wizards/web/ImageListDialog.java wizards/com/sun/star/wizards/web/Process.java wizards/com/sun/star/wizards/web/ProcessStatusRenderer.java wizards/com/sun/star/wizards/web/TOCPreview.java wizards/com/sun/star/wizards/web/WWD_Startup.java wizards/com/sun/star/wizards/web/data/TypeDetection.java wizards/com/sun/star/wizards/web/export/ImpressHTMLExporter.java writerfilter/inc/doctok/WW8Document.hxx writerfilter/source/dmapper/DomainMapper.cxx writerfilter/source/dmapper/NumberingManager.cxx writerfilter/source/dmapper/PropertyMap.cxx writerfilter/source/dmapper/StyleSheetTable.cxx writerfilter/source/doctok/WW8StructBase.hxx writerfilter/source/doctok/resources.xmi writerfilter/source/ooxml/README.efforts xmerge/source/activesync/XMergeFilter.cpp xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/SxcDocumentDeserializerImpl.java xmerge/source/palmtests/qa/comparator/pdbcomparison.java xmerge/source/palmtests/qa/test_spec/convertor_test_spec.html xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/DefinedName.java xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Workbook.java xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Worksheet.java xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/SymbolLookup.java xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentDescriptor.java xmerge/workben/jstyle.pl xmlhelp/source/cxxhelp/provider/databases.hxx xmlhelp/source/cxxhelp/provider/provider.cxx xmlhelp/source/treeview/tvread.cxx xmloff/inc/txtfldi.hxx xmloff/inc/xmloff/xmlmultiimagehelper.hxx xmloff/inc/xmloff/xmluconv.hxx xmloff/source/core/xmlexp.cxx xmloff/source/draw/shapeexport2.cxx xmloff/source/draw/shapeexport3.cxx xmloff/source/meta/xmlversion.cxx xmloff/source/style/impastp4.cxx xmloff/source/style/xmlaustp.cxx xmloff/source/text/XMLSectionExport.cxx xmloff/source/text/txtflde.cxx xmloff/source/text/txtimp.cxx xmloff/source/text/txtparae.cxx xmloff/source/text/txtparai.cxx xmloff/source/text/txtvfldi.cxx xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx Change-Id: Ie072e7c3a60c5dae16a67ac36d1f372c5065c99c
412 lines
19 KiB
C++
412 lines
19 KiB
C++
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
/*
|
|
* This file is part of the LibreOffice project.
|
|
*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
*
|
|
* This file incorporates work covered by the following license notice:
|
|
*
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
* with this work for additional information regarding copyright
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
* except in compliance with the License. You may obtain a copy of
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
*/
|
|
|
|
#ifndef INCLUDED_XMLOFF_SOURCE_FORMS_PROPERTYEXPORT_HXX
|
|
#define INCLUDED_XMLOFF_SOURCE_FORMS_PROPERTYEXPORT_HXX
|
|
|
|
#include <sal/config.h>
|
|
|
|
#include <set>
|
|
|
|
#include "formattributes.hxx"
|
|
#include <com/sun/star/beans/XPropertySet.hpp>
|
|
#include <com/sun/star/beans/XPropertyState.hpp>
|
|
#include <callbacks.hxx>
|
|
#include <xmloff/xmlexp.hxx>
|
|
#include "callbacks.hxx"
|
|
#include "strings.hxx"
|
|
|
|
namespace xmloff
|
|
{
|
|
|
|
#define BOOLATTR_DEFAULT_FALSE 0x00
|
|
#define BOOLATTR_DEFAULT_TRUE 0x01
|
|
#define BOOLATTR_DEFAULT_VOID 0x02
|
|
#define BOOLATTR_DEFAULT_MASK 0x03
|
|
|
|
#define BOOLATTR_INVERSE_SEMANTICS 0x04
|
|
// if sal_True, indicates that the semantic of the property referred by <arg>_pPropertyName</arg>
|
|
// is inverse to the semantic of the XML attribute.<br/>
|
|
// I.e. if the property value is <TRUE/>, <FALSE/> has to be written and vice versa.
|
|
// <p>Be careful with <arg>_bDefault</arg> and <arg>_bInverseSemantics</arg>: if <arg>_bInverseSemantics</arg>
|
|
// is <TRUE/>, the current property value is inverted <em>before</em> comparing it to the default.</p>
|
|
|
|
class IFormsExportContext;
|
|
//= OPropertyExport
|
|
/** provides export related tools for attribute handling
|
|
|
|
<p>(The name is somewhat misleading. It's not only a PropertyExport, but in real a ElementExport.
|
|
Anyway.)</p>
|
|
*/
|
|
class OPropertyExport
|
|
{
|
|
private:
|
|
typedef std::set<OUString> StringSet;
|
|
StringSet m_aRemainingProps;
|
|
// see examinePersistence
|
|
|
|
void exportRelativeTargetLocation(const OUString& _sPropertyName,sal_Int32 _nProperty,bool _bAddType);
|
|
|
|
protected:
|
|
IFormsExportContext& m_rContext;
|
|
|
|
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
|
|
m_xProps;
|
|
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
|
|
m_xPropertyInfo;
|
|
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState >
|
|
m_xPropertyState;
|
|
|
|
// caching
|
|
OUString m_sValueTrue;
|
|
OUString m_sValueFalse;
|
|
|
|
public:
|
|
/** constructs an object capable of handling attributes for export
|
|
@param _rContext
|
|
the export context to which's attribute list the property translation should be added
|
|
@param m_xControl
|
|
the property set to be exported
|
|
*/
|
|
OPropertyExport(IFormsExportContext& _rContext,
|
|
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxProps);
|
|
|
|
protected:
|
|
/** examines a property set given for all properties which's value are to made persistent
|
|
|
|
<p>upon return the <method>m_aRemainingProps</method> will be filled with the names of all properties
|
|
which need to be stored</p>
|
|
*/
|
|
void examinePersistence();
|
|
|
|
template< typename T > void exportRemainingPropertiesSequence(
|
|
com::sun::star::uno::Any const & value,
|
|
token::XMLTokenEnum eValueAttName);
|
|
|
|
void exportRemainingProperties();
|
|
|
|
/** indicates that a property has been handled by a derived class, without using the helper methods of this
|
|
class.
|
|
|
|
<p>Calling this method is necessary in case you use the suggested mechanism for the generic export of
|
|
properties. This means that you want to use <method>exportRemainingProperties</method>, which exports
|
|
all properties which need to ('cause they haven't been exported with one of the other type-specific
|
|
methods).</p>
|
|
|
|
<p>In this case you should call exportedProperty for every property you export yourself, so the property
|
|
will be flagged as <em>already handled</em></p>
|
|
*/
|
|
void exportedProperty(const OUString& _rPropertyName)
|
|
{ m_aRemainingProps.erase(_rPropertyName); }
|
|
|
|
/** add an attribute which is represented by a string property to the export context
|
|
|
|
@param _nNamespaceKey
|
|
the key of the namespace to use for the attribute name. Is used with the namespace map
|
|
provided by the export context.
|
|
@param _pAttributeName
|
|
the name of the attribute to add. Must not contain any namespace
|
|
@param _pPropertyName
|
|
the name of the property to ask the control for
|
|
*/
|
|
void exportStringPropertyAttribute(
|
|
const sal_uInt16 _nNamespaceKey,
|
|
const sal_Char* _pAttributeName,
|
|
const OUString& _rPropertyName
|
|
);
|
|
|
|
/** add an attribute which is represented by a boolean property to the export context
|
|
|
|
@param _nNamespaceKey
|
|
the key of the namespace to use for the attribute name. Is used with the namespace map
|
|
provided by the export context.
|
|
@param _pAttributeName
|
|
the name of the attribute to add. Must not contain any namespace (it's added automatically)
|
|
@param _pPropertyName
|
|
the name of the property to ask the control for
|
|
@param _nBooleanAttributeFlags
|
|
specifies the default and the "alignment" (inverse semantics) of the boolean property
|
|
*/
|
|
void exportBooleanPropertyAttribute(
|
|
const sal_uInt16 _nNamespaceKey,
|
|
const sal_Char* _pAttributeName,
|
|
const OUString& _rPropertyName,
|
|
const sal_Int8 _nBooleanAttributeFlags);
|
|
|
|
/** add an attribute which is represented by a sal_Int16 property to the export context
|
|
|
|
@param _nNamespaceKey
|
|
the key of the namespace to use for the attribute name. Is used with the namespace map
|
|
provided by the export context.
|
|
@param _pAttributeName
|
|
the name of the attribute to add. Must not contain any namespace (it's added automatically)
|
|
@param _pPropertyName
|
|
the name of the property to ask the control for
|
|
@param _nDefault
|
|
the default of the attribute. See force parameter.
|
|
@param force
|
|
if true and the property is not set or does not contain a sal_Int16,
|
|
then _nDefault is written out.
|
|
if false and the current property value equals _nDefault,
|
|
then no attribute is added.
|
|
*/
|
|
void exportInt16PropertyAttribute(
|
|
const sal_uInt16 _nNamespaceKey,
|
|
const sal_Char* _pAttributeName,
|
|
const OUString& _rPropertyName,
|
|
const sal_Int16 _nDefault,
|
|
const bool force = false);
|
|
|
|
/** add an attribute which is represented by a sal_Int32 property to the export context
|
|
|
|
@param _nNamespaceKey
|
|
the key of the namespace to use for the attribute name. Is used with the namespace map
|
|
provided by the export context.
|
|
@param _pAttributeName
|
|
the name of the attribute to add. Must not contain any namespace (it's added automatically)
|
|
@param _pPropertyName
|
|
the name of the property to ask the control for
|
|
@param _nDefault
|
|
the default of the attribute. If the current property value equals this default, no
|
|
attribute is added.
|
|
*/
|
|
void exportInt32PropertyAttribute(
|
|
const sal_uInt16 _nNamespaceKey,
|
|
const sal_Char* _pAttributeName,
|
|
const OUString& _rPropertyName,
|
|
const sal_Int32 _nDefault);
|
|
|
|
/** add an attribute which is represented by a enum property to the export context
|
|
|
|
@param _nNamespaceKey
|
|
the key of the namespace to use for the attribute name. Is used with the namespace map
|
|
provided by the export context.
|
|
@param _pAttributeName
|
|
the name of the attribute to add. Must not contain any namespace (it's added automatically)
|
|
@param _pPropertyName
|
|
the name of the property to ask the control for
|
|
@param _pValueMap
|
|
the map to use when converting the property value to an attribute value
|
|
@param _nDefault
|
|
the default of the attribute. If the current property value equals this default, no
|
|
attribute is added.
|
|
*/
|
|
void exportEnumPropertyAttribute(
|
|
const sal_uInt16 _nNamespaceKey,
|
|
const sal_Char* _pAttributeName,
|
|
const OUString& _rPropertyName,
|
|
const SvXMLEnumMapEntry* _pValueMap,
|
|
const sal_Int32 _nDefault,
|
|
const bool _bVoidDefault = false);
|
|
|
|
// some very special methods for some very special attribute/property pairs
|
|
|
|
/** add the hlink:target-frame attribute to the export context.
|
|
|
|
<p>The value of this attribute is extracted from the TargetFrame property of the object given.</p>
|
|
|
|
<p>The property needs a special handling because conflicts between the default values for the attribute
|
|
and the property.</p>
|
|
*/
|
|
void exportTargetFrameAttribute();
|
|
|
|
/** add the form:href attribute to the export context.
|
|
|
|
<p>The value of this attribute is extracted from the TargetURL property of the object given.</p>
|
|
|
|
<p>The property needs a special handling because the URL's need to be made relative</p>
|
|
|
|
<p>If _bAddType is set, an additional xlink:type="simple" attribute is also added.</p>
|
|
*/
|
|
inline void exportTargetLocationAttribute(bool _bAddType) { exportRelativeTargetLocation(PROPERTY_TARGETURL,CCA_TARGET_LOCATION,_bAddType); }
|
|
|
|
/** add the form:image attribute to the export context.
|
|
|
|
<p>The value of this attribute is extracted from the ImageURL property of the object given.</p>
|
|
|
|
<p>The property needs a special handling because the URL's need to be made relative</p>
|
|
*/
|
|
inline void exportImageDataAttribute() { exportRelativeTargetLocation(PROPERTY_IMAGEURL,CCA_IMAGE_DATA,false); }
|
|
|
|
/** flag the style properties as 'already exported'
|
|
|
|
<p>We don't have style support right now, so the only thing the method does is removing the style-relevant
|
|
properties from the list of yet-to-be-exported properties (<member>m_aRemainingProps</member>)</p>
|
|
*/
|
|
void flagStyleProperties();
|
|
|
|
/** add an arbitrary attribute extracted from an arbitrary property to the export context
|
|
|
|
<p>The current value of the property specified with <arg>_pPropertyName</arg> is taken and converted
|
|
into a string, no matter what type it has. (Okay, there are the usual limitations: We know Date, Datetime,
|
|
double, integer ... to name just a few).</p>
|
|
|
|
<p>In case the property value is <NULL/> (void), no attribute is added</p>
|
|
|
|
<p>In case the property value is an empty string, and the property is a not allowed to be <NULL/> (void),
|
|
no attribute is added</p>
|
|
|
|
<p>In case the property value is a sequence of any type, no attribute is added, 'cause sequences can't be
|
|
transported as attribute. In the debug version, an additional assertion will occur if you nonetheless try
|
|
to do this.</p>
|
|
|
|
@param _nNamespaceKey
|
|
the key of the namespace to use for the attribute name. Is used with the namespace map
|
|
provided by the export context.
|
|
@param _pAttributeName
|
|
the name of the attribute to add. Must not contain any namespace (it's added automatically)
|
|
@param _pPropertyName
|
|
the name of the property to ask the object for
|
|
*/
|
|
void exportGenericPropertyAttribute(
|
|
const sal_uInt16 _nAttributeNamespaceKey,
|
|
const sal_Char* _pAttributeName,
|
|
const sal_Char* _pPropertyName);
|
|
|
|
/** exports a property value, which is a string sequence, as attribute
|
|
|
|
<p>The elements of the string sequence given are quoted and concatenated, with the characters used for
|
|
this to be chosen by the caller</p>
|
|
|
|
<p>If you use the quote character, no check (except assertions) is made if one of the list items
|
|
contains the quote character</p>
|
|
|
|
<p>If you don't use the quote character, no check (except assertions) is made if one of the list items
|
|
contains the separator character (which would be deadly when reimporting the string)</p>
|
|
|
|
@param _nNamespaceKey
|
|
the key of the namespace to use for the attribute name. Is used with the namespace map
|
|
provided by the export context.
|
|
@param _pAttributeName
|
|
the name of the attribute to add. Must not contain any namespace (it's added automatically)
|
|
@param _pPropertyName
|
|
the name of the property to ask the object for
|
|
@param _aQuoteCharacter
|
|
the character to use to quote the sequence elements with. May be 0, in this case no quoting happens
|
|
@param _aListSeparator
|
|
the character to use to separate the list entries
|
|
*/
|
|
void exportStringSequenceAttribute(
|
|
const sal_uInt16 _nAttributeNamespaceKey,
|
|
const sal_Char* _pAttributeName,
|
|
const OUString& _rPropertyName,
|
|
const sal_Unicode _aQuoteCharacter = '"',
|
|
const sal_Unicode _aListSeparator = ',');
|
|
|
|
/** determines whether the given property is to be exported
|
|
|
|
<p>Currently, the method simply checks whether the property's state is <em>not</em> PropertyState.DEFAULT,
|
|
or whether the property is a dynamic property (i.e. added via an <code>XPropertyContainer</code>).
|
|
So, take care when using the method - the heuristics is not applicable for all properties.</p>
|
|
*/
|
|
bool shouldExportProperty( const OUString& i_propertyName ) const;
|
|
|
|
/** tries to convert an arbitrary <type scope="com.sun:star.uno">Any</type> into an string
|
|
|
|
<p>If the type contained in the Any is not supported, the returned string will be empty. In the
|
|
debug version, an additional assertion occurs.</p>
|
|
|
|
@param _rValue
|
|
the value to convert
|
|
*/
|
|
OUString implConvertAny(
|
|
const ::com::sun::star::uno::Any& _rValue);
|
|
|
|
/**
|
|
@return
|
|
token which can be used in the <code>form:property</code> element's <code>type</code> attribute
|
|
to describe the type of a value.<br/>
|
|
Possible types returned are
|
|
<ul>
|
|
<li><b>boolean</b>: <arg>_rValue</arg> was interpreted as boolean value before converting
|
|
it into a string</li>
|
|
<li><b>float</b>: <arg>_rValue</arg> was interpreted as 64 bit floating point 16bit integer, 32bit integer or 64 bit integer value before
|
|
converting it into a string</li>
|
|
<li><b>string</b>: <arg>_rValue</arg> did not need any conversion as it already was a string</li>
|
|
</ul>
|
|
If the type is not convertible, float is returned
|
|
*/
|
|
::xmloff::token::XMLTokenEnum implGetPropertyXMLType(const ::com::sun::star::uno::Type& _rType);
|
|
|
|
#ifdef DBG_UTIL
|
|
void AddAttribute(sal_uInt16 _nPrefix, const sal_Char* _pName, const OUString& _rValue);
|
|
void AddAttribute( sal_uInt16 _nPrefix, const OUString& _rName, const OUString& _rValue );
|
|
void AddAttributeASCII( sal_uInt16 nPrefix, const sal_Char *pName, const sal_Char *pValue );
|
|
void AddAttribute(sal_uInt16 _nPrefix, ::xmloff::token::XMLTokenEnum _eName, const OUString& _rValue);
|
|
void AddAttribute(sal_uInt16 _nPrefix, ::xmloff::token::XMLTokenEnum _eName, ::xmloff::token::XMLTokenEnum _eValue );
|
|
#else
|
|
// in the product version, inline this, so it does not cost us extra time calling into our method
|
|
inline void AddAttribute(sal_uInt16 _nPrefix, const sal_Char* _pName, const OUString& _rValue)
|
|
{ m_rContext.getGlobalContext().AddAttribute(_nPrefix, _pName, _rValue); }
|
|
inline void AddAttribute( sal_uInt16 _nPrefix, const OUString& _rName, const OUString& _rValue )
|
|
{ m_rContext.getGlobalContext().AddAttribute( _nPrefix, _rName, _rValue ); }
|
|
inline void AddAttributeASCII( sal_uInt16 _nPrefix, const sal_Char* _pName, const sal_Char *pValue )
|
|
{ m_rContext.getGlobalContext().AddAttributeASCII(_nPrefix, _pName, pValue); }
|
|
inline void AddAttribute(sal_uInt16 _nPrefix, ::xmloff::token::XMLTokenEnum _eName, const OUString& _rValue)
|
|
{ m_rContext.getGlobalContext().AddAttribute(_nPrefix, _eName, _rValue); }
|
|
inline void AddAttribute(sal_uInt16 _nPrefix, ::xmloff::token::XMLTokenEnum _eName, ::xmloff::token::XMLTokenEnum _eValue )
|
|
{ m_rContext.getGlobalContext().AddAttribute(_nPrefix, _eName, _eValue); }
|
|
#endif
|
|
|
|
#ifdef DBG_UTIL
|
|
protected:
|
|
/** check a given property set for the existence and type correctness of a given property
|
|
|
|
<p>This method is available in the non-product version only.</p>
|
|
|
|
@param _rPropertyName
|
|
the name of the property to ask the control model for
|
|
@param _pType
|
|
the expected type of the property. May be NULL, in this case no type check is made.
|
|
@return sal_True, if the property exists and is of the correct type
|
|
*/
|
|
void dbg_implCheckProperty(
|
|
const OUString& _rPropertyName,
|
|
const ::com::sun::star::uno::Type* _pType);
|
|
|
|
// void dbg_implCheckProperty(
|
|
// const sal_Char* _rPropertyName,
|
|
// const ::com::sun::star::uno::Type* _pType)
|
|
// {
|
|
// dbg_implCheckProperty(OUString::createFromAscii(_rPropertyName), _pType);
|
|
// }
|
|
#endif
|
|
};
|
|
|
|
//= helper
|
|
#ifdef DBG_UTIL
|
|
#define DBG_CHECK_PROPERTY(name, type) \
|
|
dbg_implCheckProperty(name, &::getCppuType(static_cast< type* >(NULL)))
|
|
|
|
#define DBG_CHECK_PROPERTY_NO_TYPE(name) \
|
|
dbg_implCheckProperty(name, NULL)
|
|
|
|
#define DBG_CHECK_PROPERTY_ASCII_NO_TYPE( name ) \
|
|
dbg_implCheckProperty( OUString::createFromAscii( name ), NULL )
|
|
#else
|
|
#define DBG_CHECK_PROPERTY(name, type)
|
|
#define DBG_CHECK_PROPERTY_NO_TYPE(name)
|
|
#define DBG_CHECK_PROPERTY_ASCII_NO_TYPE( name )
|
|
#endif
|
|
|
|
} // namespace xmloff
|
|
|
|
#endif // INCLUDED_XMLOFF_SOURCE_FORMS_PROPERTYEXPORT_HXX
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|